aboutsummaryrefslogtreecommitdiff
path: root/src/demo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/demo.c')
-rw-r--r--src/demo.c62
1 files changed, 5 insertions, 57 deletions
diff --git a/src/demo.c b/src/demo.c
index f5b5c29..95347cb 100644
--- a/src/demo.c
+++ b/src/demo.c
@@ -13,17 +13,6 @@
#include "engine/sprite_controller.h"
-#include "GameLoop/startingScreen.h"
-#include "GameLoop/shop.h"
-// states
-typedef enum {
- hh_e_STATE_startingScreen,
- hh_e_STATE_Shop,
- hh_e_STATE_Gameplay,
- hh_e_STATE_GameOver,
- hh_e_STATE_HighScore
-} hh_e_GameState;
-hh_e_GameState hh_gameStates;
hh_s_entity_player g_hh_player_1 = {
.pos_x = 31000, // 0b0000 0001 0011 0110
@@ -56,59 +45,18 @@ typedef struct {
hh_entity hh_g_player, hh_g_player_new;
-void hh_demo_setup() {
+void hh_demo_setup() {
+
hh_setup_palettes();
+ hh_setup_screen();
- //hh_setup_screen();
}
+
void hh_demo_loop(unsigned long frame) {
// hh_player_movement();
- switch (hh_gameStates)
- {
- case hh_e_STATE_startingScreen:
- if(hh_show_startingScreen()){
- hh_gameStates = hh_e_STATE_Shop;
- }
- break;
- case hh_e_STATE_Shop:
- // TODO:
-
- if(hh_show_Shop()){
- hh_gameStates = hh_e_STATE_Gameplay;
- }
- // function: new level is chosen goto level
- break;
- case hh_e_STATE_Gameplay:
- static int run_test=0;
- if(!run_test){
- hh_setup_screen();
- run_test=1;
-
- }
- else{
- hh_player_actions();
- }
- // TODO:
- // function: if level complete goto shop
- // function: if player is dead goto game over
- break;
- case hh_e_STATE_GameOver:
- // TODO:
- // function: show game over screen
- // function: after time goto high score
- break;
- case hh_e_STATE_HighScore:
- // TODO:
- // fucntion: show all previously scored points
- // function: button pressed goto starting screen
- break;
- default:
- hh_gameStates = hh_e_STATE_startingScreen;
- break;
- }
-
+ hh_player_actions();
}