aboutsummaryrefslogtreecommitdiff
path: root/src/GameLoop
diff options
context:
space:
mode:
Diffstat (limited to 'src/GameLoop')
-rw-r--r--src/GameLoop/game_over.c28
-rw-r--r--src/GameLoop/game_over.h18
-rw-r--r--src/GameLoop/gameplay.c44
-rw-r--r--src/GameLoop/gameplay.h17
-rw-r--r--src/GameLoop/shop.c30
-rw-r--r--src/GameLoop/shop.h18
-rw-r--r--src/GameLoop/startingScreen.c32
-rw-r--r--src/GameLoop/startingScreen.h14
8 files changed, 0 insertions, 201 deletions
diff --git a/src/GameLoop/game_over.c b/src/GameLoop/game_over.c
deleted file mode 100644
index 09e6858..0000000
--- a/src/GameLoop/game_over.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "game_over.h"
-
-
-void hh_game_over(hh_e_GameState* hh_game_state){
- static hh_e_game_over hh_e_states_game_over = hh_e_game_over_SHOW;
-
- switch (hh_e_states_game_over)
- {
- case hh_e_game_over_SHOW:
- hh_clear_screen();
- hh_clear_sprite();
- // TODO: make function to show game over
- hh_e_states_game_over = hh_e_game_over_Input;
- break;
- case hh_e_game_over_Input:
- if(g_hh_controller_p1.button_primary){
- hh_e_states_game_over = hh_e_game_over_END;
- }
- break;
- case hh_e_game_over_END:
- hh_e_states_game_over = hh_e_game_over_SHOW;
- *hh_game_state = hh_e_STATE_GameOver;
- break;
- default:
- hh_e_states_game_over = hh_e_game_over_SHOW;
- break;
- }
-}
diff --git a/src/GameLoop/game_over.h b/src/GameLoop/game_over.h
deleted file mode 100644
index 0d40b6c..0000000
--- a/src/GameLoop/game_over.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#pragma once
-
-#include "input.h"
-#include "engine/draw_screen.h"
-#include "engine/level_const.h"
-
-
-#include <stdint.h>
-#include <stdbool.h>
-
-typedef enum {
- hh_e_game_over_SHOW,
- hh_e_game_over_Input,
- hh_e_game_over_END,
-} hh_e_game_over;
-
-
-void hh_game_over(hh_e_GameState*);
diff --git a/src/GameLoop/gameplay.c b/src/GameLoop/gameplay.c
deleted file mode 100644
index 72297f5..0000000
--- a/src/GameLoop/gameplay.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include "gameplay.h"
-
-
-
-void hh_gameplay(hh_g_all_levels game, hh_e_GameState* hh_game_state){
- static hh_e_gameplay gameplay = hh_e_setup_screen;
-
- switch (gameplay)
- {
- case hh_e_setup_screen:
- hh_setup_screen(game.level[game.currentLevel]);
- gameplay = hh_e_play_level;
- break;
- case hh_e_play_level:
- // TODO: here come all the different functions for the gameplay
- hh_player_actions();
-
-
-
- if(game.level[game.currentLevel].hh_level_completed){
- gameplay = hh_e_level_complete;
- }
- break;
- case hh_e_level_complete:
- if(game.currentLevel < 3){
- game.currentLevel++;
- gameplay = hh_e_setup_screen;
- }
- else {
- gameplay = hh_e_game_over;
- }
- break;
- case hh_e_game_over:
- // TODO make reset levels
- hh_reset_levels();
- gameplay = hh_e_setup_screen;
- *hh_game_state = hh_e_STATE_GameOver;
- break;
- default:
- break;
- }
-
-}
-void hh_reset_levels(){}
diff --git a/src/GameLoop/gameplay.h b/src/GameLoop/gameplay.h
deleted file mode 100644
index 6e8c1ec..0000000
--- a/src/GameLoop/gameplay.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-#include "engine/draw_screen.h"
-#include "engine/player_controller.h"
-#include "engine/sprite_controller.h"
-#include "GameLoop/startingScreen.h"
-#include "engine/level_const.h"
-
-typedef enum {
- hh_e_setup_screen,
- hh_e_play_level,
- hh_e_level_complete,
- hh_e_game_over,
-}hh_e_gameplay;
-
-void hh_reset_levels();
-void hh_gameplay(hh_g_all_levels, hh_e_GameState*);
-
diff --git a/src/GameLoop/shop.c b/src/GameLoop/shop.c
deleted file mode 100644
index 8e6dc71..0000000
--- a/src/GameLoop/shop.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "shop.h"
-
-
-void hh_Shop(hh_e_GameState* hh_game_state){
- static hh_e_ShopStates hh_e_Shop = hh_e_shop_SHOW;
-
- switch (hh_e_Shop)
- {
- case hh_e_shop_SHOW:
- hh_clear_screen();
- hh_clear_sprite();
- // TODO: make function to show shop
- //hh_setup_shop();
- hh_e_Shop = hh_e_shop_Input;
- break;
- case hh_e_shop_Input:
- // TODO: make it so that you can choose between shop
- if(g_hh_controller_p1.button_primary){
- hh_e_Shop = hh_e_shop_END;
- }
- break;
- case hh_e_shop_END:
- hh_e_Shop = hh_e_shop_SHOW;
- *hh_game_state = hh_e_STATE_Gameplay;
- break;
- default:
- hh_e_Shop = hh_e_shop_SHOW;
- break;
- }
-}
diff --git a/src/GameLoop/shop.h b/src/GameLoop/shop.h
deleted file mode 100644
index 1efc057..0000000
--- a/src/GameLoop/shop.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#pragma once
-
-#include "input.h"
-#include "engine/draw_screen.h"
-#include "engine/level_const.h"
-
-
-#include <stdint.h>
-#include <stdbool.h>
-
-typedef enum {
- hh_e_shop_SHOW,
- hh_e_shop_Input,
- hh_e_shop_END,
-} hh_e_ShopStates;
-
-
-void hh_Shop(hh_e_GameState*);
diff --git a/src/GameLoop/startingScreen.c b/src/GameLoop/startingScreen.c
deleted file mode 100644
index 4fc5af9..0000000
--- a/src/GameLoop/startingScreen.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#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
deleted file mode 100644
index f51cc66..0000000
--- a/src/GameLoop/startingScreen.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#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();
-