aboutsummaryrefslogtreecommitdiffstats
path: root/src/shooterScreen.c
diff options
context:
space:
mode:
authornathansmith117 <thenathansmithsmith@gmail.com>2024-05-10 16:49:25 +0000
committernathansmith117 <thenathansmithsmith@gmail.com>2024-05-10 16:49:25 +0000
commit1b2a507416bc1fd8fd2bb07f94d8bcd096c19721 (patch)
tree11f53e8af7d00bbfe59feecc8e65a7401bcbd45b /src/shooterScreen.c
parentfca307d6af08116f675e0d04e5ace2e353ec718c (diff)
downloadPenguinYippies-1b2a507416bc1fd8fd2bb07f94d8bcd096c19721.tar.gz
PenguinYippies-1b2a507416bc1fd8fd2bb07f94d8bcd096c19721.tar.bz2
PenguinYippies-1b2a507416bc1fd8fd2bb07f94d8bcd096c19721.zip
%50 increase thingy added
Diffstat (limited to 'src/shooterScreen.c')
-rw-r--r--src/shooterScreen.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/shooterScreen.c b/src/shooterScreen.c
index 14cb34d..24207ed 100644
--- a/src/shooterScreen.c
+++ b/src/shooterScreen.c
@@ -226,6 +226,8 @@ void drawShooterScreenEndLevel(ShooterScreen* shooterScreen, Game* game)
if (shooterScreen->pnps > shooterScreen->bestPNPS)
{
shooterScreen->bestPNPS = shooterScreen->pnps;
+ shooterScreen->highScoreBeat = true;
+ game->stones *= 1.5; // %50 stone increase.
}
}
@@ -233,11 +235,17 @@ void drawShooterScreenEndLevel(ShooterScreen* shooterScreen, Game* game)
size_t bufSize = 100;
char buf[bufSize];
- snprintf(buf, bufSize, "Level done with a penguin naps per seconds (pnps) of: %f\n\tBest npns this game: %f",
+ snprintf(buf, bufSize, "Level done with a penguin naps per seconds (pnps) of: %f\n Best npns this game: %f",
shooterScreen->pnps, shooterScreen->bestPNPS);
// Draw it.
DrawText(buf, WINDOW_WIDTH / 4.0, WINDOW_HEIGHT / 2.0, 25, BLACK);
+
+ // high score beat.
+ if (shooterScreen->highScoreBeat)
+ {
+ DrawText("For beating the high score you get a %50 stone increase!", 20.0, WINDOW_HEIGHT / 2.0 - 100.0, 40.0, BLACK);
+ }
}
void updateShooterScreen(ShooterScreen* shooterScreen, Game* game)
@@ -326,8 +334,8 @@ void resetShooterScreen(ShooterScreen* shooterScreen)
// Time.
shooterScreen->startTime = GetTime();
-
shooterScreen->atEndLevel = false;
+ shooterScreen->highScoreBeat = false;
}
void enterShooterScreen(Game* game)