aboutsummaryrefslogtreecommitdiff
path: root/src/GameLoop
diff options
context:
space:
mode:
authorUnavailableDev <ggwildplay@gmail.com>2023-03-22 10:29:24 +0100
committerUnavailableDev <ggwildplay@gmail.com>2023-03-22 10:29:24 +0100
commitcd9f96be0d1ca49f269d8dc7c801479ef382d21b (patch)
treed3768b4d9a8ef8cb1c6ee5e6dcea785adb902d5c /src/GameLoop
parent439be80c80498586a299c28ce1be3ea765b414a9 (diff)
parent746b9a43b745e6f7cbac4cbe529d3f5f719d1eea (diff)
Merge branch 'dev' of https://github.com/heavydemon21/avans-arcade into game-engine
Diffstat (limited to 'src/GameLoop')
-rw-r--r--src/GameLoop/shop.c30
-rw-r--r--src/GameLoop/shop.h16
-rw-r--r--src/GameLoop/startingScreen.c32
-rw-r--r--src/GameLoop/startingScreen.h14
4 files changed, 92 insertions, 0 deletions
diff --git a/src/GameLoop/shop.c b/src/GameLoop/shop.c
new file mode 100644
index 0000000..eb6bed5
--- /dev/null
+++ b/src/GameLoop/shop.c
@@ -0,0 +1,30 @@
+#include "shop.h"
+
+
+bool hh_show_Shop(){
+ static hh_e_ShopStates hh_e_Shop = hh_e_STATE_SHOW;
+
+ switch (hh_e_Shop)
+ {
+ case hh_e_STATE_SHOW:
+ //hh_clear_screen();
+
+ //hh_setup_shop();
+ hh_e_Shop = hh_e_STATE_Input;
+ return false;
+ break;
+ case hh_e_STATE_Input:
+ if(g_hh_controller_p1.button_primary){
+ hh_e_Shop = hh_e_STATE_END;
+ }
+ break;
+ case hh_e_STATE_END:
+ hh_e_Shop = hh_e_STATE_SHOW;
+ return true;
+ break;
+ default:
+ hh_e_Shop = hh_e_STATE_SHOW;
+ break;
+ }
+ return false;
+}
diff --git a/src/GameLoop/shop.h b/src/GameLoop/shop.h
new file mode 100644
index 0000000..4014f58
--- /dev/null
+++ b/src/GameLoop/shop.h
@@ -0,0 +1,16 @@
+#include "input.h"
+#include "engine/draw_screen.h"
+
+
+
+#include <stdint.h>
+#include <stdbool.h>
+
+typedef enum {
+ hh_e_STATE_SHOW,
+ hh_e_STATE_Input,
+ hh_e_STATE_END
+} hh_e_ShopStates;
+
+
+bool hh_show_Shop();
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;
+}
diff --git a/src/GameLoop/startingScreen.h b/src/GameLoop/startingScreen.h
new file mode 100644
index 0000000..f51cc66
--- /dev/null
+++ b/src/GameLoop/startingScreen.h
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+
+typedef enum {
+ hh_e_STATE_SHOW,
+ hh_e_STATE_Input,
+ hh_e_STATE_END
+} hh_e_screenStates;
+
+
+bool hh_show_startingScreen();
+