diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-01-04 14:41:22 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-01-04 14:41:22 +0100 |
commit | b99e5b1d2c6ccef7e9a714d2d4bcef050b99ff01 (patch) | |
tree | f5c5dd1b839568bd13ab9a94b81dd04bcfcc3649 /src/main.cpp | |
parent | shooting is fun hahahahahaha (diff) | |
download | threshold-b99e5b1d2c6ccef7e9a714d2d4bcef050b99ff01.tar.gz threshold-b99e5b1d2c6ccef7e9a714d2d4bcef050b99ff01.tar.bz2 threshold-b99e5b1d2c6ccef7e9a714d2d4bcef050b99ff01.tar.xz threshold-b99e5b1d2c6ccef7e9a714d2d4bcef050b99ff01.tar.zst threshold-b99e5b1d2c6ccef7e9a714d2d4bcef050b99ff01.zip |
start menu and retry
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 20a6cdc..0912639 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,3 +1,12 @@ +/*********************************/ +/* THRESHOLD ( // */ +/* main ( )/ */ +/* by salade )(/ */ +/* ________________ ( /) */ +/* ()__)____________))))) :^} */ +/*********************************/ + + #include "window.hpp" #include "gameplay.hpp" #include <iostream> @@ -28,6 +37,10 @@ int main(void) { } case (ENDING): { + if (IsKeyPressed(KEY_ENTER)) + { + gs = TITLE; + } break ; } } @@ -38,18 +51,22 @@ int main(void) { switch (gs) { case (TITLE): { - DrawText("LOGO SCREEN", 20, 20, 40, LIGHTGRAY); + DrawText("THRESHOLD", (SCREENWIDTH / 2) - 150, SCREENHEIGHT / 2, 40, RED); + DrawText("PRESS ENTER", (SCREENWIDTH / 2) - 150, (SCREENHEIGHT / 2) + 50, 40, MAROON); break ; } case (GAMEPLAY): { - game->getKeys(); + if (game->getKeys()) { + gs = ENDING; + } game->draw(); break ; } case (ENDING): { - DrawText("GOOD BYE SCREEN", 20, 20, 40, LIGHTGRAY); + DrawCircle(SCREENWIDTH / 2, SCREENHEIGHT / 2, 200, BLACK); + DrawText("GOOD BYE", (SCREENWIDTH / 2) - 100, SCREENHEIGHT / 2, 40, WHITE); break ; } } |