aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornathansmith117 <thenathansmithsmith@gmail.com>2024-03-05 19:27:22 +0000
committernathansmith117 <thenathansmithsmith@gmail.com>2024-03-05 19:27:22 +0000
commit4c74b7100c26aca80a65a853524b44085dcf4508 (patch)
treedade6bc98966efa3d3722206f1544ee754e3c609 /src
parent4a507152a4f8272ac9434bba2700fe614ba1c284 (diff)
downloadPenguinYippies-4c74b7100c26aca80a65a853524b44085dcf4508.tar.gz
PenguinYippies-4c74b7100c26aca80a65a853524b44085dcf4508.tar.bz2
PenguinYippies-4c74b7100c26aca80a65a853524b44085dcf4508.zip
Working on shop thingy
Diffstat (limited to 'src')
-rw-r--r--src/gameScreen.c32
-rw-r--r--src/gameScreen.h7
2 files changed, 35 insertions, 4 deletions
diff --git a/src/gameScreen.c b/src/gameScreen.c
index 07a3cc7..18a8173 100644
--- a/src/gameScreen.c
+++ b/src/gameScreen.c
@@ -4,6 +4,8 @@
void initGameScreen(GameScreen* gameScreen, Game* game)
{
+ gameScreen->place = CLICKY_DESKTOP_PLACE;
+
Assets* assets = &game->assets;
int width = WINDOW_WIDTH;
int height = WINDOW_HEIGHT;
@@ -69,6 +71,11 @@ void initGameScreen(GameScreen* gameScreen, Game* game)
);
}
+void updateGameScreenShop(GameScreen* gameScreen, Game* game)
+{
+
+}
+
void updateGameScreen(GameScreen* gameScreen, Game* game)
{
// Draw background.
@@ -84,8 +91,14 @@ void updateGameScreen(GameScreen* gameScreen, Game* game)
);
// Navigation buttons.
- updateTexturedButton(&gameScreen->toGameButton);
- updateTexturedButton(&gameScreen->toEmperorsEmporiumButton);
+ if (updateTexturedButton(&gameScreen->toGameButton))
+ {
+ gameScreen->place = CLICKY_DESKTOP_PLACE;
+ }
+ if (updateTexturedButton(&gameScreen->toEmperorsEmporiumButton))
+ {
+ gameScreen->place = SHOP_PLACE;
+ }
// Button panel.
runAnimation(&gameScreen->buttonPanelSharedAnimation);
@@ -94,8 +107,19 @@ void updateGameScreen(GameScreen* gameScreen, Game* game)
updateTexturedButton(&gameScreen->rebirthButton);
updateTexturedButton(&gameScreen->statisticsButton);
- // Clickies clickies.
- updateClickies(game, &game->clickies);
+ // assssssss hehehe
+ switch (gameScreen->place)
+ {
+ case CLICKY_DESKTOP_PLACE:
+ // Clickies clickies.
+ updateClickies(game, &game->clickies);
+ break;
+ case SHOP_PLACE:
+ updateGameScreenShop(gameScreen, game);
+ break;
+ default:
+ break;
+ }
// Stones.
char stonesBuf[30];
diff --git a/src/gameScreen.h b/src/gameScreen.h
index 58e534c..003f66b 100644
--- a/src/gameScreen.h
+++ b/src/gameScreen.h
@@ -6,7 +6,14 @@
#ifndef GAME_SCREEN_H
#define GAME_SCREEN_H
+typedef enum GamePlayPlace {
+ CLICKY_DESKTOP_PLACE,
+ SHOP_PLACE
+} GamePlayPlace;
+
typedef struct GameScreen {
+ GamePlayPlace place;
+
TexturedButton toGameButton;
TexturedButton toEmperorsEmporiumButton;