aboutsummaryrefslogtreecommitdiff
path: root/src/GameLoop/startingScreen.c
diff options
context:
space:
mode:
authorUnavailableDev <69792062+UnavailableDev@users.noreply.github.com>2023-03-22 10:42:34 +0100
committerGitHub <noreply@github.com>2023-03-22 10:42:34 +0100
commit7f51cd925883bbf958baa289d4d19231667c9eba (patch)
tree21800c4233b3be015cb9aa1f1448b2ab4db4c832 /src/GameLoop/startingScreen.c
parente43428eef0d96839cd9a5b2d25e31c90555cfb6c (diff)
parent49112a1999c008fb6fa6c9c368eb2be0d92d15dc (diff)
Merge pull request #44 from UnavailableDev/game-engine
Game engine
Diffstat (limited to 'src/GameLoop/startingScreen.c')
-rw-r--r--src/GameLoop/startingScreen.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/GameLoop/startingScreen.c b/src/GameLoop/startingScreen.c
new file mode 100644
index 0000000..4fc5af9
--- /dev/null
+++ b/src/GameLoop/startingScreen.c
@@ -0,0 +1,32 @@
+#include "startingScreen.h"
+#include "input.h"
+#include "engine/title_screen.h"
+#include "engine/draw_screen.h"
+// #include "engine/player_controller.h"
+
+bool hh_show_startingScreen(){
+ static hh_e_screenStates hh_e_startingScreen = hh_e_STATE_SHOW;
+
+ switch (hh_e_startingScreen)
+ {
+ case hh_e_STATE_SHOW:
+ hh_clear_screen();
+ hh_init_title_screen();
+ hh_e_startingScreen = hh_e_STATE_Input;
+ return false;
+ break;
+ case hh_e_STATE_Input:
+ if(g_hh_controller_p1.button_primary){
+ hh_e_startingScreen = hh_e_STATE_END;
+ }
+ break;
+ case hh_e_STATE_END:
+ hh_e_startingScreen = hh_e_STATE_SHOW;
+ return true;
+ break;
+ default:
+ hh_e_startingScreen = hh_e_STATE_SHOW;
+ break;
+ }
+ return false;
+}