aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornathansmith117 <thenathansmithsmith@gmail.com>2024-03-11 17:27:31 +0000
committernathansmith117 <thenathansmithsmith@gmail.com>2024-03-11 17:27:31 +0000
commit57a682c295eb665dfa935031446df255471f8edd (patch)
tree43f32d4064e1ed0d1b94129f36fb4f15f52f7716 /src
parent372297622a2da74a31c54e44283c4d2333ebf53f (diff)
downloadPenguinYippies-57a682c295eb665dfa935031446df255471f8edd.tar.gz
PenguinYippies-57a682c295eb665dfa935031446df255471f8edd.tar.bz2
PenguinYippies-57a682c295eb665dfa935031446df255471f8edd.zip
Moved things around a tiny ittle bit
Diffstat (limited to 'src')
-rw-r--r--src/gameScreen.c32
-rw-r--r--src/gameScreen.h3
-rw-r--r--src/shop.c40
-rw-r--r--src/shop.h15
4 files changed, 62 insertions, 28 deletions
diff --git a/src/gameScreen.c b/src/gameScreen.c
index f46496c..28e114a 100644
--- a/src/gameScreen.c
+++ b/src/gameScreen.c
@@ -70,6 +70,8 @@ void initGameScreen(GameScreen* gameScreen, Game* game)
WHITE,
BLACK
);
+
+ initShop(&gameScreen->shop, game);
}
void updateGameScreenButtonPanel(GameScreen* gameScreen, Game* game)
@@ -90,33 +92,6 @@ void updateGameScreenClickyDesktop(GameScreen* gameScreen, Game* game)
updateClickies(game, &game->clickies);
}
-void updateGameScreenShop(GameScreen* gameScreen, Game* game)
-{
- Texture shopBoard = game->assets.textures[SHOP_BOARD_TEXTURE];
-
- // Board thingy.
- DrawTexturePro(
- shopBoard,
- (Rectangle){0.0, 0.0, shopBoard.width, shopBoard.height},
- (Rectangle){0.0, 0.0, WINDOW_WIDTH, WINDOW_HEIGHT},
- (Vector2){0.0, 0.0},
- 0.0,
- WHITE
- );
-
- // Penguin thingy thing thing
- Texture yoyoyo = game->assets.textures[EMPEROR_SHOP_UI_TEXTURE];
-
- DrawTexturePro(
- yoyoyo,
- (Rectangle){0.0, 0.0, yoyoyo.width, yoyoyo.height},
- (Rectangle){0.0, 0.0, WINDOW_WIDTH, WINDOW_HEIGHT},
- (Vector2){0.0, 0.0},
- 0.0,
- WHITE
- );
-}
-
void updateGameScreen(GameScreen* gameScreen, Game* game)
{
// Draw background.
@@ -148,7 +123,7 @@ void updateGameScreen(GameScreen* gameScreen, Game* game)
updateGameScreenClickyDesktop(gameScreen, game);
break;
case SHOP_PLACE:
- updateGameScreenShop(gameScreen, game);
+ updateShop(&gameScreen->shop, game);
break;
default:
break;
@@ -165,5 +140,6 @@ void updateGameScreen(GameScreen* gameScreen, Game* game)
void closeGameScreen(GameScreen* gameScreen)
{
closeAnimation(&gameScreen->buttonPanelSharedAnimation);
+ closeShop(&gameScreen->shop);
}
diff --git a/src/gameScreen.h b/src/gameScreen.h
index 003f66b..5c9953d 100644
--- a/src/gameScreen.h
+++ b/src/gameScreen.h
@@ -2,6 +2,7 @@
#include "animation.h"
#include "ui.h"
#include "clicky.h"
+#include "shop.h"
#ifndef GAME_SCREEN_H
#define GAME_SCREEN_H
@@ -23,6 +24,8 @@ typedef struct GameScreen {
TexturedButton achievementsButton;
TexturedButton rebirthButton;
TexturedButton statisticsButton;
+
+ Shop shop;
} GameScreen;
void initGameScreen(GameScreen* gameScreen, Game* game);
diff --git a/src/shop.c b/src/shop.c
new file mode 100644
index 0000000..68ce2f9
--- /dev/null
+++ b/src/shop.c
@@ -0,0 +1,40 @@
+#include "shop.h"
+#include "game.h"
+#include "assets.h"
+
+void initShop(Shop* shop, Game* game)
+{
+
+}
+
+void updateShop(Shop* shop, Game* game)
+{
+ Texture shopBoard = game->assets.textures[SHOP_BOARD_TEXTURE];
+
+ // Board thingy.
+ DrawTexturePro(
+ shopBoard,
+ (Rectangle){0.0, 0.0, shopBoard.width, shopBoard.height},
+ (Rectangle){0.0, 0.0, WINDOW_WIDTH, WINDOW_HEIGHT},
+ (Vector2){0.0, 0.0},
+ 0.0,
+ WHITE
+ );
+
+ // Penguin thingy thing thing
+ Texture yoyoyo = game->assets.textures[EMPEROR_SHOP_UI_TEXTURE];
+
+ DrawTexturePro(
+ yoyoyo,
+ (Rectangle){0.0, 0.0, yoyoyo.width, yoyoyo.height},
+ (Rectangle){0.0, 0.0, WINDOW_WIDTH, WINDOW_HEIGHT},
+ (Vector2){0.0, 0.0},
+ 0.0,
+ WHITE
+ );
+}
+
+void closeShop(Shop* shop)
+{
+
+}
diff --git a/src/shop.h b/src/shop.h
new file mode 100644
index 0000000..bae42b3
--- /dev/null
+++ b/src/shop.h
@@ -0,0 +1,15 @@
+#include "gameCommon.h"
+
+// The fullname is waaayyy toooo looonnnng for lazy lazy me
+
+#ifndef SHOP_H
+#define SHOP_H
+
+typedef struct Shop {
+} Shop;
+
+void initShop(Shop* shop, Game* game);
+void updateShop(Shop* shop, Game* game);
+void closeShop(Shop* shop);
+
+#endif