mirror of
https://github.com/raysan5/raylib.git
synced 2025-11-20 17:16:26 +00:00
Merge pull request #657 from noshbar/minor-game-fixes
3 minor sample game cleanups:
This commit is contained in:
@@ -132,7 +132,7 @@ void DrawLevel06Screen(void)
|
|||||||
DrawRectangleRec(movingRecs[i], GRAY);
|
DrawRectangleRec(movingRecs[i], GRAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!done & (mouseOverNum >= 0)) DrawRectangleLines(movingRecs[mouseOverNum].x - 5, movingRecs[mouseOverNum].y - 5, movingRecs[mouseOverNum].width + 10, movingRecs[mouseOverNum].height + 10, Fade(LIGHTGRAY, 0.8f));
|
if (!done && (mouseOverNum >= 0)) DrawRectangleLines(movingRecs[mouseOverNum].x - 5, movingRecs[mouseOverNum].y - 5, movingRecs[mouseOverNum].width + 10, movingRecs[mouseOverNum].height + 10, Fade(LIGHTGRAY, 0.8f));
|
||||||
|
|
||||||
if (levelFinished)
|
if (levelFinished)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -954,7 +954,7 @@ void UpdateGameplayScreen(void)
|
|||||||
playerActive = false;
|
playerActive = false;
|
||||||
killer = 5;
|
killer = 5;
|
||||||
}
|
}
|
||||||
else if (CheckCollisionRecs(bee, player) && (state == FINALFORM) && (state != KICK))
|
else if (CheckCollisionRecs(bee, player) && (state == FINALFORM))
|
||||||
{
|
{
|
||||||
isHitBee = true;
|
isHitBee = true;
|
||||||
beeVelocity = 8;
|
beeVelocity = 8;
|
||||||
|
|||||||
@@ -111,9 +111,11 @@ void InitEndingScreen(void)
|
|||||||
// WARNING: It fails if the last sentence word has a '.' after space
|
// WARNING: It fails if the last sentence word has a '.' after space
|
||||||
char *title = StringReplace(headline, messageWords[i].text, codingWords[messageWords[i].id]);
|
char *title = StringReplace(headline, messageWords[i].text, codingWords[messageWords[i].id]);
|
||||||
|
|
||||||
strcpy(headline, title); // Base headline updated
|
if (title != NULL)
|
||||||
|
{
|
||||||
if (title != NULL) free(title);
|
strcpy(headline, title); // Base headline updated
|
||||||
|
free(title);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user