Fixing all other macros by adding RL_ prefix.
This commit is contained in:
parent
8579d1386d
commit
b6cb51e3e8
6 changed files with 1821 additions and 1821 deletions
|
|
@ -124,7 +124,7 @@ void InitEndingScreen(void)
|
|||
// Generate newspaper with title and subtitle
|
||||
Image imNewspaper = LoadImage("resources/textures/ending_newspaper.png");
|
||||
fontNews = LoadFontEx("resources/fonts/Lora-Bold.ttf", 32, 250, 0);
|
||||
ImageDrawTextEx(&imNewspaper, (Vector2){ 50, 220 }, fontNews, headline, fontNews.baseSize, 0, DARKGRAY);
|
||||
ImageDrawTextEx(&imNewspaper, (Vector2){ 50, 220 }, fontNews, headline, fontNews.baseSize, 0, RL_DARKGRAY);
|
||||
|
||||
texNewspaper = LoadTextureFromImage(imNewspaper);
|
||||
//UnloadFont(fontNews);
|
||||
|
|
@ -162,20 +162,20 @@ void UpdateEndingScreen(void)
|
|||
// Ending Screen Draw logic
|
||||
void DrawEndingScreen(void)
|
||||
{
|
||||
DrawTexture(texBackground, 0, 0, WHITE);
|
||||
DrawTexture(texBackground, 0, 0, RL_WHITE);
|
||||
|
||||
DrawTexturePro(texNewspaper, (Rectangle){ 0, 0, texNewspaper.width, texNewspaper.height },
|
||||
(Rectangle){ GetScreenWidth()/2, GetScreenHeight()/2, texNewspaper.width*scale, texNewspaper.height*scale },
|
||||
(Vector2){ (float)texNewspaper.width*scale/2, (float)texNewspaper.height*scale/2 }, rotation, WHITE);
|
||||
(Vector2){ (float)texNewspaper.width*scale/2, (float)texNewspaper.height*scale/2 }, rotation, RL_WHITE);
|
||||
|
||||
DrawTextureEx(texVignette, (Vector2){ 0, 0 }, 0.0f, 2.0f, WHITE);
|
||||
DrawTextureEx(texVignette, (Vector2){ 0, 0 }, 0.0f, 2.0f, RL_WHITE);
|
||||
|
||||
// Draw debug information
|
||||
DrawTextEx(fontNews, headline, (Vector2){ 10, 10 }, fontNews.baseSize, 0, RAYWHITE);
|
||||
DrawTextEx(fontNews, headline, (Vector2){ 10, 10 }, fontNews.baseSize, 0, RL_RAYWHITE);
|
||||
|
||||
for (int i = 0; i < missions[currentMission].wordsCount; i++)
|
||||
{
|
||||
DrawText(codingWords[messageWords[i].id], 10, 60 + 30*i, 20, (messageWords[i].id == missions[currentMission].sols[i]) ? GREEN : RED);
|
||||
DrawText(codingWords[messageWords[i].id], 10, 60 + 30*i, 20, (messageWords[i].id == missions[currentMission].sols[i]) ? RL_GREEN : RL_RED);
|
||||
}
|
||||
|
||||
if (state == 1) DrawButton("continuar");
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ void InitGameplayScreen(void)
|
|||
#else
|
||||
// Generate coding words atlas directly from text
|
||||
Image imWordsBase = LoadImage("resources/textures/words_base.png");
|
||||
Image imWords = GenImageColor(imWordsBase.width, imWordsBase.height*MAX_CODING_WORDS, WHITE);
|
||||
Image imWords = GenImageColor(imWordsBase.width, imWordsBase.height*MAX_CODING_WORDS, RL_WHITE);
|
||||
|
||||
for (int i = 0; i < MAX_CODING_WORDS; i++)
|
||||
{
|
||||
|
|
@ -156,7 +156,7 @@ void InitGameplayScreen(void)
|
|||
|
||||
ImageDrawTextEx(&imWords,(Vector2){ imWordsBase.width/2 - MeasureTextEx(fontMessage, codingWords[i],
|
||||
fontMessage.baseSize, 0).x/2, imWordsBase.height*i }, fontMessage, codingWords[i],
|
||||
fontMessage.baseSize, 0, BLACK);
|
||||
fontMessage.baseSize, 0, RL_BLACK);
|
||||
}
|
||||
|
||||
texWordsAtlas = LoadTextureFromImage(imWords);
|
||||
|
|
@ -377,25 +377,25 @@ void UpdateGameplayScreen(void)
|
|||
// Gameplay Screen Draw logic
|
||||
void DrawGameplayScreen(void)
|
||||
{
|
||||
DrawTexture(texBackground, 0, 0, WHITE);
|
||||
DrawTexture(texBackground, 0, 0, RL_WHITE);
|
||||
|
||||
DrawTextEx(fontMessage, missions[currentMission].msg, msgOffset, fontMessage.baseSize, 0, BLACK);
|
||||
DrawTextEx(fontMessage, missions[currentMission].msg, msgOffset, fontMessage.baseSize, 0, RL_BLACK);
|
||||
|
||||
for (int i = 0; i < missions[currentMission].wordsCount; i++)
|
||||
{
|
||||
Rectangle recLines = messageWords[i].rec;
|
||||
DrawRectangleLines(recLines.x, recLines.y, recLines.width, recLines.height, Fade(RED, 0.35f));
|
||||
if(messageWords[i].hover) DrawRectangleRec(messageWords[i].rec, Fade(RED, 0.30f));
|
||||
DrawText(FormatText("%i", messageWords[i].id), i*25, 0, 30, RED);
|
||||
DrawRectangleLines(recLines.x, recLines.y, recLines.width, recLines.height, Fade(RL_RED, 0.35f));
|
||||
if(messageWords[i].hover) DrawRectangleRec(messageWords[i].rec, Fade(RL_RED, 0.30f));
|
||||
DrawText(FormatText("%i", messageWords[i].id), i*25, 0, 30, RL_RED);
|
||||
}
|
||||
for (int i = 0; i < MAX_CODING_WORDS; i++)
|
||||
{
|
||||
if (words[i].picked) DrawTextureRec(texWordsAtlas, (Rectangle){ 0, i*35, 140, 35 }, (Vector2){ words[i].rec.x, words[i].rec.y }, MAROON);
|
||||
else if (words[i].hover) DrawTextureRec(texWordsAtlas, (Rectangle){ 0, i*35, 140, 35 }, (Vector2){ words[i].rec.x, words[i].rec.y }, RED);
|
||||
else DrawTextureRec(texWordsAtlas, (Rectangle){ 0, i*35, 140, 35 }, (Vector2){ words[i].rec.x, words[i].rec.y }, WHITE);
|
||||
if (words[i].picked) DrawTextureRec(texWordsAtlas, (Rectangle){ 0, i*35, 140, 35 }, (Vector2){ words[i].rec.x, words[i].rec.y }, RL_MAROON);
|
||||
else if (words[i].hover) DrawTextureRec(texWordsAtlas, (Rectangle){ 0, i*35, 140, 35 }, (Vector2){ words[i].rec.x, words[i].rec.y }, RL_RED);
|
||||
else DrawTextureRec(texWordsAtlas, (Rectangle){ 0, i*35, 140, 35 }, (Vector2){ words[i].rec.x, words[i].rec.y }, RL_WHITE);
|
||||
}
|
||||
|
||||
DrawTexturePro(texVignette, (Rectangle){0,0,texVignette.width, texVignette.height}, (Rectangle){0,0,GetScreenWidth(), GetScreenHeight()}, (Vector2){0,0}, 0, WHITE);
|
||||
DrawTexturePro(texVignette, (Rectangle){0,0,texVignette.width, texVignette.height}, (Rectangle){0,0,GetScreenWidth(), GetScreenHeight()}, (Vector2){0,0}, 0, RL_WHITE);
|
||||
|
||||
if (canSend) DrawButton("enviar");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ void UpdateLogoScreen(void)
|
|||
// Logo Screen Draw logic
|
||||
void DrawLogoScreen(void)
|
||||
{
|
||||
DrawTexture(logoCW, GetScreenWidth()/2 - logoCW.width/2, GetScreenHeight()/2 - logoCW.height/2, Fade(WHITE, fadeValue));
|
||||
DrawTexture(logoCW, GetScreenWidth()/2 - logoCW.width/2, GetScreenHeight()/2 - logoCW.height/2, Fade(RL_WHITE, fadeValue));
|
||||
}
|
||||
|
||||
// Logo Screen Unload logic
|
||||
|
|
|
|||
|
|
@ -135,9 +135,9 @@ void InitMissionScreen(void)
|
|||
missionLenght = 0;
|
||||
missionSpeed = 1;
|
||||
|
||||
numberColor = RAYWHITE;
|
||||
missionColor = LIGHTGRAY;
|
||||
keywordColor = (Color){198, 49, 60, 255}; //RED
|
||||
numberColor = RL_RAYWHITE;
|
||||
missionColor = RL_LIGHTGRAY;
|
||||
keywordColor = (Color){198, 49, 60, 255}; //RL_RED
|
||||
|
||||
numberPosition = (Vector2){150, 185};
|
||||
missionPosition = (Vector2){numberPosition.x, numberPosition.y + 60};
|
||||
|
|
@ -187,8 +187,8 @@ void UpdateMissionScreen(void)
|
|||
void DrawMissionScreen(void)
|
||||
{
|
||||
// TODO: Draw MISSION screen here!
|
||||
DrawTexture(texBackground, 0,0, WHITE);
|
||||
DrawTexturePro(texBackline, sourceRecBackLine, destRecBackLine, (Vector2){0,0},0, Fade(WHITE, fadeBackLine));
|
||||
DrawTexture(texBackground, 0,0, RL_WHITE);
|
||||
DrawTexturePro(texBackline, sourceRecBackLine, destRecBackLine, (Vector2){0,0},0, Fade(RL_WHITE, fadeBackLine));
|
||||
|
||||
if (writeNumber) DrawTextEx(fontMission, FormatText("Filtración #%02i ", currentMission + 1), numberPosition, missionSize + 10, 0, numberColor);
|
||||
DrawTextEx(fontMission, SubText(missions[currentMission].brief, 0, missionLenght), missionPosition, missionSize, 0, missionColor);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ void InitTitleScreen(void)
|
|||
transmissionPosition = (Vector2){519, 221};
|
||||
missionPositon = (Vector2){580, 261};
|
||||
|
||||
titleColor = BLACK;
|
||||
titleColor = RL_BLACK;
|
||||
speedText = 15;
|
||||
|
||||
missionLenght = 0;
|
||||
|
|
@ -136,7 +136,7 @@ void UpdateTitleScreen(void)
|
|||
// Title Screen Draw logic
|
||||
void DrawTitleScreen(void)
|
||||
{
|
||||
DrawTexture(texBackground, 0,0, WHITE);
|
||||
DrawTexture(texBackground, 0,0, RL_WHITE);
|
||||
DrawTextEx(fontTitle, SubText(textTitle, 0, transmissionLenght), transmissionPosition, titleSize, 0, titleColor);
|
||||
DrawTextEx(fontTitle, SubText(textTitle, 12, missionLenght), missionPositon, titleSize, 0, titleColor);
|
||||
|
||||
|
|
|
|||
|
|
@ -79,10 +79,10 @@ int main(void)
|
|||
recButton.x = screenWidth - recButton.width;
|
||||
recButton.y = screenHeight - recButton.height - 50;
|
||||
fadeButton = 0.8f;
|
||||
colorButton = RED;
|
||||
colorButton = RL_RED;
|
||||
textPositionButton = (Vector2){recButton.x + recButton.width/2, recButton.y + recButton.height/2};
|
||||
fontSizeButton = 30;
|
||||
textColorButton = WHITE;
|
||||
textColorButton = RL_WHITE;
|
||||
|
||||
currentMission = 0;
|
||||
totalMissions = 4;
|
||||
|
|
@ -234,7 +234,7 @@ static void UpdateTransition(void)
|
|||
// Draw transition effect (full-screen rectangle)
|
||||
static 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
|
||||
|
|
@ -310,7 +310,7 @@ static void UpdateDrawFrame(void)
|
|||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
ClearBackground(RL_RAYWHITE);
|
||||
|
||||
switch(currentScreen)
|
||||
{
|
||||
|
|
@ -448,7 +448,7 @@ bool IsButtonPressed()
|
|||
void DrawButton(const char *text)
|
||||
{
|
||||
//DrawRectangleRec(recButton, Fade(colorButton, fadeButton));
|
||||
DrawTexturePro(texButton, (Rectangle){0,0,texButton.width, texButton.height}, recButton, (Vector2){0,0},0, Fade(WHITE, fadeButton));
|
||||
DrawTexturePro(texButton, (Rectangle){0,0,texButton.width, texButton.height}, recButton, (Vector2){0,0},0, Fade(RL_WHITE, fadeButton));
|
||||
Vector2 measure = MeasureTextEx(fontMission, text, fontSizeButton, 0);
|
||||
Vector2 textPos = {textPositionButton.x - measure.x/2 + 10, textPositionButton.y - measure.y/2 - 10};
|
||||
DrawTextEx(fontMission, text, textPos , fontSizeButton, 0, textColorButton);
|
||||
|
|
|
|||
Loading…
Reference in a new issue