Fixing all other macros by adding RL_ prefix.

This commit is contained in:
Marco Lizza 2018-12-20 16:15:55 +01:00
commit b6cb51e3e8
14 changed files with 1821 additions and 1821 deletions

View file

@ -1,6 +1,6 @@
/***********************************************************************************
*
* KING GAME JAM - GRAY TEAM
* KING GAME JAM - RL_GRAY TEAM
*
* <Game title>
* <Game description>
@ -44,8 +44,8 @@ void DrawMonster(Monster monster, int scroll)
{
Vector2 scrollPos = { monster.position.x - scroll, monster.position.y };
if (monster.selected) DrawTextureRec(monster.texture, monster.frameRec, scrollPos, RED);
else DrawTextureRec(monster.texture, monster.frameRec, scrollPos, WHITE);
if (monster.selected) DrawTextureRec(monster.texture, monster.frameRec, scrollPos, RL_RED);
else DrawTextureRec(monster.texture, monster.frameRec, scrollPos, RL_WHITE);
}
void UnloadMonster(Monster monster)

View file

@ -1,6 +1,6 @@
/***********************************************************************************
*
* KING GAME JAM - GRAY TEAM
* KING GAME JAM - RL_GRAY TEAM
*
* <Game title>
* <Game description>
@ -191,10 +191,10 @@ void UpdatePlayer(void)
//
void DrawPlayer(void)
{
DrawTextureRec(player.texture, player.frameRec, player.position, WHITE);
DrawTextureRec(player.texture, player.frameRec, player.position, RL_WHITE);
// Draw mouse pointer on click
if (pointerAnim) DrawCircleV(pointerPosition, 20, Fade(RED, pointerAlpha));
if (pointerAnim) DrawCircleV(pointerPosition, 20, Fade(RL_RED, pointerAlpha));
DrawLifes();
}
@ -275,7 +275,7 @@ static void DrawLifes(void)
for(int i = 0; i < player.numLifes; i++)
{
DrawTexture(texLife, position.x + i*texLife.width, position.y, Fade(RAYWHITE, 0.7f));
DrawTexture(texLife, position.x + i*texLife.width, position.y, Fade(RL_RAYWHITE, 0.7f));
}
}
}

View file

@ -337,7 +337,7 @@ void UpdateAisle01Screen(void)
// Gameplay Screen Draw logic
void DrawAisle01Screen(void)
{
DrawTexture(background, -scroll, 0, WHITE);
DrawTexture(background, -scroll, 0, RL_WHITE);
// Draw monsters
DrawMonster(lamp, scroll);
@ -345,47 +345,47 @@ void DrawAisle01Screen(void)
// Draw door
Vector2 doorScrollPos = { doorCenter.position.x - scroll, doorCenter.position.y };
if (doorCenter.selected) DrawTextureRec(doors, doorCenter.frameRec, doorScrollPos, GREEN);
else DrawTextureRec(doors, doorCenter.frameRec, doorScrollPos, WHITE);
if (doorCenter.selected) DrawTextureRec(doors, doorCenter.frameRec, doorScrollPos, RL_GREEN);
else DrawTextureRec(doors, doorCenter.frameRec, doorScrollPos, RL_WHITE);
doorScrollPos = (Vector2){ doorLeft.position.x - scroll, doorLeft.position.y };
if (doorLeft.selected) DrawTextureRec(doors, doorLeft.frameRec, doorScrollPos, GREEN);
else DrawTextureRec(doors, doorLeft.frameRec, doorScrollPos, WHITE);
if (doorLeft.selected) DrawTextureRec(doors, doorLeft.frameRec, doorScrollPos, RL_GREEN);
else DrawTextureRec(doors, doorLeft.frameRec, doorScrollPos, RL_WHITE);
doorScrollPos = (Vector2){ doorRight.position.x - scroll, doorRight.position.y };
if (doorRight.selected) DrawTextureRec(doors, doorRight.frameRec, doorScrollPos, GREEN);
else DrawTextureRec(doors, doorRight.frameRec, doorScrollPos, WHITE);
if (doorRight.selected) DrawTextureRec(doors, doorRight.frameRec, doorScrollPos, RL_GREEN);
else DrawTextureRec(doors, doorRight.frameRec, doorScrollPos, RL_WHITE);
// Draw messsages
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(LIGHTGRAY, 0.5f));
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(RL_LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(RL_LIGHTGRAY, 0.5f));
if (msgState == 0)
{
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
}
else if (msgState == 1)
{
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, RL_BLACK);
}
else if (msgState == 2)
{
if ((msgCounter/30)%2)
{
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE);
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, RL_WHITE);
DrawRectangleRec(lamp.bounds, Fade(RED, 0.6f));
DrawRectangleRec(picture.bounds, Fade(RED, 0.6f));
DrawRectangleRec(lamp.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(picture.bounds, Fade(RL_RED, 0.6f));
}
}
else
{
if ((monsterHover) && ((msgCounter/30)%2))
{
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, BLACK);
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(RL_LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, RL_BLACK);
}
}

View file

@ -373,7 +373,7 @@ void UpdateAisle02Screen(void)
// Gameplay Screen Draw logic
void DrawAisle02Screen(void)
{
DrawTexture(background, -scroll, 0, WHITE);
DrawTexture(background, -scroll, 0, RL_WHITE);
// Draw monsters
DrawMonster(lamp, scroll);
@ -384,41 +384,41 @@ void DrawAisle02Screen(void)
// Draw door
Vector2 doorScrollPos = { doorLeft.position.x - scroll, doorLeft.position.y };
if (doorLeft.selected) DrawTextureRec(doors, doorLeft.frameRec, doorScrollPos, GREEN);
else DrawTextureRec(doors, doorLeft.frameRec, doorScrollPos, WHITE);
if (doorLeft.selected) DrawTextureRec(doors, doorLeft.frameRec, doorScrollPos, RL_GREEN);
else DrawTextureRec(doors, doorLeft.frameRec, doorScrollPos, RL_WHITE);
// Draw messsages
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(LIGHTGRAY, 0.5f));
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(RL_LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(RL_LIGHTGRAY, 0.5f));
if (msgState == 0)
{
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
}
else if (msgState == 1)
{
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, RL_BLACK);
}
else if (msgState == 2)
{
if ((msgCounter/30)%2)
{
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE);
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, RL_WHITE);
DrawRectangleRec(lamp.bounds, Fade(RED, 0.6f));
DrawRectangleRec(arc.bounds, Fade(RED, 0.6f));
DrawRectangleRec(chair.bounds, Fade(RED, 0.6f));
DrawRectangleRec(picture.bounds, Fade(RED, 0.6f));
DrawRectangleRec(lamp.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(arc.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(chair.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(picture.bounds, Fade(RL_RED, 0.6f));
}
}
else
{
if ((monsterHover) && ((msgCounter/30)%2))
{
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, BLACK);
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(RL_LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, RL_BLACK);
}
}

View file

@ -335,7 +335,7 @@ void UpdateArmoryScreen(void)
// Gameplay Screen Draw logic
void DrawArmoryScreen(void)
{
DrawTexture(background, 0, 0, WHITE);
DrawTexture(background, 0, 0, RL_WHITE);
// Draw monsters
DrawMonster(blazon01, 0);
@ -343,43 +343,43 @@ void DrawArmoryScreen(void)
DrawMonster(blazon03, 0);
// Draw door
if (doorLeft.selected) DrawTextureRec(doors, doorLeft.frameRec, doorLeft.position, GREEN);
else DrawTextureRec(doors, doorLeft.frameRec, doorLeft.position, WHITE);
if (doorLeft.selected) DrawTextureRec(doors, doorLeft.frameRec, doorLeft.position, RL_GREEN);
else DrawTextureRec(doors, doorLeft.frameRec, doorLeft.position, RL_WHITE);
if (doorRight.selected) DrawTextureRec(doors, doorRight.frameRec, doorRight.position, GREEN);
else DrawTextureRec(doors, doorRight.frameRec, doorRight.position, WHITE);
if (doorRight.selected) DrawTextureRec(doors, doorRight.frameRec, doorRight.position, RL_GREEN);
else DrawTextureRec(doors, doorRight.frameRec, doorRight.position, RL_WHITE);
// Draw messsages
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(LIGHTGRAY, 0.5f));
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(RL_LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(RL_LIGHTGRAY, 0.5f));
if (msgState == 0)
{
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
}
else if (msgState == 1)
{
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, RL_BLACK);
}
else if (msgState == 2)
{
if ((msgCounter/30)%2)
{
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE);
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, RL_WHITE);
DrawRectangleRec(blazon01.bounds, Fade(RED, 0.6f));
DrawRectangleRec(blazon02.bounds, Fade(RED, 0.6f));
DrawRectangleRec(blazon03.bounds, Fade(RED, 0.6f));
DrawRectangleRec(blazon01.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(blazon02.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(blazon03.bounds, Fade(RL_RED, 0.6f));
}
}
else
{
if ((monsterHover) && ((msgCounter/30)%2))
{
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, BLACK);
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(RL_LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, RL_BLACK);
}
}

View file

@ -269,46 +269,46 @@ void UpdateAtticScreen(void)
// Gameplay Screen Draw logic
void DrawAtticScreen(void)
{
DrawTexture(background, 0, 0, WHITE);
DrawTexture(background, 0, 0, RL_WHITE);
// Draw monsters
DrawMonster(lamp, 0);
DrawMonster(arc, 0);
// Draw door
if (doorRight.selected) DrawTextureRec(doors, doorRight.frameRec, doorRight.position, GREEN);
else DrawTextureRec(doors, doorRight.frameRec, doorRight.position, WHITE);
if (doorRight.selected) DrawTextureRec(doors, doorRight.frameRec, doorRight.position, RL_GREEN);
else DrawTextureRec(doors, doorRight.frameRec, doorRight.position, RL_WHITE);
// Draw messsages
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(LIGHTGRAY, 0.5f));
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(RL_LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(RL_LIGHTGRAY, 0.5f));
if (msgState == 0)
{
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
}
else if (msgState == 1)
{
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, RL_BLACK);
}
else if (msgState == 2)
{
if ((msgCounter/30)%2)
{
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE);
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, RL_WHITE);
DrawRectangleRec(lamp.bounds, Fade(RED, 0.6f));
DrawRectangleRec(arc.bounds, Fade(RED, 0.6f));
DrawRectangleRec(lamp.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(arc.bounds, Fade(RL_RED, 0.6f));
}
}
else
{
if ((monsterHover) && ((msgCounter/30)%2))
{
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, BLACK);
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(RL_LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, RL_BLACK);
}
}

View file

@ -317,7 +317,7 @@ void UpdateBathroomScreen(void)
// Gameplay Screen Draw logic
void DrawBathroomScreen(void)
{
DrawTexture(background, 0, 0, WHITE);
DrawTexture(background, 0, 0, RL_WHITE);
// Draw monsters
DrawMonster(lamp, 0);
@ -325,40 +325,40 @@ void DrawBathroomScreen(void)
DrawMonster(chair, 0);
// Draw door
if (doorRight.selected) DrawTextureRec(doors, doorRight.frameRec, doorRight.position, GREEN);
else DrawTextureRec(doors, doorRight.frameRec, doorRight.position, WHITE);
if (doorRight.selected) DrawTextureRec(doors, doorRight.frameRec, doorRight.position, RL_GREEN);
else DrawTextureRec(doors, doorRight.frameRec, doorRight.position, RL_WHITE);
// Draw messsages
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(LIGHTGRAY, 0.5f));
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(RL_LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(RL_LIGHTGRAY, 0.5f));
if (msgState == 0)
{
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
}
else if (msgState == 1)
{
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, RL_BLACK);
}
else if (msgState == 2)
{
if ((msgCounter/30)%2)
{
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE);
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, RL_WHITE);
DrawRectangleRec(lamp.bounds, Fade(RED, 0.6f));
DrawRectangleRec(mirror.bounds, Fade(RED, 0.6f));
DrawRectangleRec(chair.bounds, Fade(RED, 0.6f));
DrawRectangleRec(lamp.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(mirror.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(chair.bounds, Fade(RL_RED, 0.6f));
}
}
else
{
if ((monsterHover) && ((msgCounter/30)%2))
{
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, BLACK);
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(RL_LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, RL_BLACK);
}
}

View file

@ -69,12 +69,12 @@ void UpdateEndingScreen(void)
// Ending Screen Draw logic
void DrawEndingScreen(void)
{
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), DARKGRAY);
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), RL_DARKGRAY);
DrawTextEx(font, "CONGRATULATIONS!", (Vector2){ 50, 160 }, font.baseSize*3, 2, Fade(WHITE, alpha));
DrawTextEx(font, "SKULLY ESCAPED!", (Vector2){ 100, 300 }, font.baseSize*3, 2, Fade(WHITE, alpha));
DrawTextEx(font, "CONGRATULATIONS!", (Vector2){ 50, 160 }, font.baseSize*3, 2, Fade(RL_WHITE, alpha));
DrawTextEx(font, "SKULLY ESCAPED!", (Vector2){ 100, 300 }, font.baseSize*3, 2, Fade(RL_WHITE, alpha));
if ((framesCounter > 180) && ((framesCounter/40)%2)) DrawText("PRESS ENTER or CLICK", 380, 545, 40, BLACK);
if ((framesCounter > 180) && ((framesCounter/40)%2)) DrawText("PRESS ENTER or CLICK", 380, 545, 40, RL_BLACK);
}
// Ending Screen Unload logic

View file

@ -334,7 +334,7 @@ void UpdateKitchenScreen(void)
// Gameplay Screen Draw logic
void DrawKitchenScreen(void)
{
DrawTexture(background, 0, 0, WHITE);
DrawTexture(background, 0, 0, RL_WHITE);
// Draw monsters
DrawMonster(closet, 0);
@ -342,43 +342,43 @@ void DrawKitchenScreen(void)
DrawMonster(window, 0);
// Draw door
if (doorRight.selected) DrawTextureRec(doors, doorRight.frameRec, doorRight.position, GREEN);
else DrawTextureRec(doors, doorRight.frameRec, doorRight.position, WHITE);
if (doorRight.selected) DrawTextureRec(doors, doorRight.frameRec, doorRight.position, RL_GREEN);
else DrawTextureRec(doors, doorRight.frameRec, doorRight.position, RL_WHITE);
if (doorLeft.selected) DrawTextureRec(doors, doorLeft.frameRec, doorLeft.position, GREEN);
else DrawTextureRec(doors, doorLeft.frameRec, doorLeft.position, WHITE);
if (doorLeft.selected) DrawTextureRec(doors, doorLeft.frameRec, doorLeft.position, RL_GREEN);
else DrawTextureRec(doors, doorLeft.frameRec, doorLeft.position, RL_WHITE);
// Draw messsages
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(LIGHTGRAY, 0.5f));
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(RL_LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(RL_LIGHTGRAY, 0.5f));
if (msgState == 0)
{
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
}
else if (msgState == 1)
{
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, RL_BLACK);
}
else if (msgState == 2)
{
if ((msgCounter/30)%2)
{
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE);
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, RL_WHITE);
DrawRectangleRec(closet.bounds, Fade(RED, 0.6f));
DrawRectangleRec(window.bounds, Fade(RED, 0.6f));
DrawRectangleRec(chair.bounds, Fade(RED, 0.6f));
DrawRectangleRec(closet.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(window.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(chair.bounds, Fade(RL_RED, 0.6f));
}
}
else
{
if ((monsterHover) && ((msgCounter/30)%2))
{
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, BLACK);
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(RL_LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, RL_BLACK);
}
}

View file

@ -335,7 +335,7 @@ void UpdateLivingroomScreen(void)
// Gameplay Screen Draw logic
void DrawLivingroomScreen(void)
{
DrawTexture(background, 0, 0, WHITE);
DrawTexture(background, 0, 0, RL_WHITE);
// Draw monsters
DrawMonster(picture, 0);
@ -343,42 +343,42 @@ void DrawLivingroomScreen(void)
DrawMonster(phone, 0);
// Draw door
if (doorCenter.selected) DrawTextureRec(doors, doorCenter.frameRec, doorCenter.position, GREEN);
else DrawTextureRec(doors, doorCenter.frameRec, doorCenter.position, WHITE);
if (doorLeft.selected) DrawTextureRec(doors, doorLeft.frameRec, doorLeft.position, GREEN);
else DrawTextureRec(doors, doorLeft.frameRec, doorLeft.position, WHITE);
if (doorCenter.selected) DrawTextureRec(doors, doorCenter.frameRec, doorCenter.position, RL_GREEN);
else DrawTextureRec(doors, doorCenter.frameRec, doorCenter.position, RL_WHITE);
if (doorLeft.selected) DrawTextureRec(doors, doorLeft.frameRec, doorLeft.position, RL_GREEN);
else DrawTextureRec(doors, doorLeft.frameRec, doorLeft.position, RL_WHITE);
// Draw messsages
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(LIGHTGRAY, 0.5f));
if (msgState < 2) DrawRectangle(0, 40, GetScreenWidth(), 200, Fade(RL_LIGHTGRAY, 0.5f));
else if (msgState == 2) DrawRectangle(0, 80, GetScreenWidth(), 100, Fade(RL_LIGHTGRAY, 0.5f));
if (msgState == 0)
{
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
}
else if (msgState == 1)
{
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE);
DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, RL_WHITE);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK);
if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, RL_BLACK);
}
else if (msgState == 2)
{
if ((msgCounter/30)%2)
{
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE);
DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, RL_WHITE);
DrawRectangleRec(candle.bounds, Fade(RED, 0.6f));
DrawRectangleRec(phone.bounds, Fade(RED, 0.6f));
DrawRectangleRec(picture.bounds, Fade(RED, 0.6f));
DrawRectangleRec(candle.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(phone.bounds, Fade(RL_RED, 0.6f));
DrawRectangleRec(picture.bounds, Fade(RL_RED, 0.6f));
}
}
else
{
if ((monsterHover) && ((msgCounter/30)%2))
{
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, BLACK);
DrawRectangle(0, 0, GetScreenWidth(), 50, Fade(RL_LIGHTGRAY, 0.5f));
DrawText("PRESS SPACE or CLICK to INTERACT", 420, 15, 20, RL_BLACK);
}
}

View file

@ -87,11 +87,11 @@ void UpdateLogoScreen(void)
// Logo Screen Draw logic
void DrawLogoScreen(void)
{
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), RAYWHITE);
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), RL_RAYWHITE);
DrawTexture(logo, GetScreenWidth()/2 - logo.width/2, 130, Fade(WHITE, logoAlpha));
DrawTexture(logo, GetScreenWidth()/2 - logo.width/2, 130, Fade(RL_WHITE, logoAlpha));
DrawText("GRAY TEAM", 340, 450, 100, Fade(DARKGRAY, logoAlpha));
DrawText("RL_GRAY TEAM", 340, 450, 100, Fade(RL_DARKGRAY, logoAlpha));
}
// Logo Screen Unload logic

View file

@ -145,46 +145,46 @@ void rlDrawLogoScreen(void)
{
if (state == 0)
{
if ((framesCounter/10)%2) DrawRectangle(logoPositionX, logoPositionY, 16, 16, BLACK);
if ((framesCounter/10)%2) DrawRectangle(logoPositionX, logoPositionY, 16, 16, RL_BLACK);
}
else if (state == 1)
{
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK);
DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK);
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, RL_BLACK);
DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, RL_BLACK);
}
else if (state == 2)
{
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK);
DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK);
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, RL_BLACK);
DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, RL_BLACK);
DrawRectangle(logoPositionX + 240, logoPositionY, 16, rightSideRecHeight, BLACK);
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, BLACK);
DrawRectangle(logoPositionX + 240, logoPositionY, 16, rightSideRecHeight, RL_BLACK);
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, RL_BLACK);
}
else if (state == 3)
{
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, Fade(BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY + 16, 16, leftSideRecHeight - 32, Fade(BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, Fade(RL_BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY + 16, 16, leftSideRecHeight - 32, Fade(RL_BLACK, alpha));
DrawRectangle(logoPositionX + 240, logoPositionY + 16, 16, rightSideRecHeight - 32, Fade(BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, Fade(BLACK, alpha));
DrawRectangle(logoPositionX + 240, logoPositionY + 16, 16, rightSideRecHeight - 32, Fade(RL_BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, Fade(RL_BLACK, alpha));
DrawRectangle(GetScreenWidth()/2 - 112, GetScreenHeight()/2 - 112, 224, 224, Fade(RAYWHITE, alpha));
DrawRectangle(GetScreenWidth()/2 - 112, GetScreenHeight()/2 - 112, 224, 224, Fade(RL_RAYWHITE, alpha));
DrawText(raylib, GetScreenWidth()/2 - 44, GetScreenHeight()/2 + 48, 50, Fade(BLACK, alpha));
DrawText(raylib, GetScreenWidth()/2 - 44, GetScreenHeight()/2 + 48, 50, Fade(RL_BLACK, alpha));
}
else if (state == 4)
{
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, Fade(BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY + 16, 16, leftSideRecHeight - 32, Fade(BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, Fade(RL_BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY + 16, 16, leftSideRecHeight - 32, Fade(RL_BLACK, alpha));
DrawRectangle(logoPositionX + 240, logoPositionY + 16, 16, rightSideRecHeight - 32, Fade(BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, Fade(BLACK, alpha));
DrawRectangle(logoPositionX + 240, logoPositionY + 16, 16, rightSideRecHeight - 32, Fade(RL_BLACK, alpha));
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, Fade(RL_BLACK, alpha));
DrawRectangle(GetScreenWidth()/2 - 112, GetScreenHeight()/2 - 112, 224, 224, Fade(RAYWHITE, alpha));
DrawRectangle(GetScreenWidth()/2 - 112, GetScreenHeight()/2 - 112, 224, 224, Fade(RL_RAYWHITE, alpha));
DrawText(raylib, GetScreenWidth()/2 - 44, GetScreenHeight()/2 + 48, 50, Fade(BLACK, alpha));
DrawText(raylib, GetScreenWidth()/2 - 44, GetScreenHeight()/2 + 48, 50, Fade(RL_BLACK, alpha));
if (framesCounter > 20) DrawText("powered by", logoPositionX, logoPositionY - 27, 20, Fade(DARKGRAY, alpha));
if (framesCounter > 20) DrawText("powered by", logoPositionX, logoPositionY - 27, 20, Fade(RL_DARKGRAY, alpha));
}
}

View file

@ -71,11 +71,11 @@ void UpdateTitleScreen(void)
// Title Screen Draw logic
void DrawTitleScreen(void)
{
//DrawText("TITLE SCREEN", 100, 100, 140, Fade(BLACK, titleAlpha));
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), DARKGRAY);
DrawTexture(title, GetScreenWidth()/2 - title.width/2, 20, Fade(WHITE, titleAlpha));
//DrawText("TITLE SCREEN", 100, 100, 140, Fade(RL_BLACK, titleAlpha));
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), RL_DARKGRAY);
DrawTexture(title, GetScreenWidth()/2 - title.width/2, 20, Fade(RL_WHITE, titleAlpha));
if ((framesCounter > 180) && ((framesCounter/40)%2)) DrawText("PRESS ENTER to START", 380, 545, 40, BLACK);
if ((framesCounter > 180) && ((framesCounter/40)%2)) DrawText("PRESS ENTER to START", 380, 545, 40, RL_BLACK);
}
// Title Screen Unload logic

View file

@ -254,7 +254,7 @@ void UpdateTransition(void)
void DrawTransition(void)
{
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(BLACK, transAlpha));
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(RL_BLACK, transAlpha));
}
// Update and draw game frame
@ -378,7 +378,7 @@ void UpdateDrawFrame(void)
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
ClearBackground(RL_RAYWHITE);
switch(currentScreen)
{