diff options
author | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-02-21 18:56:55 +0000 |
---|---|---|
committer | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-02-21 18:56:55 +0000 |
commit | 2ebbdb237a52551d4bb93fe2ab0778479765f9e8 (patch) | |
tree | d09a36e0eb5350e336276784566f12ed6be4bbb4 /src | |
parent | c11c0383fc4609dd67012d9e3aa44b7fa58c999c (diff) | |
download | PenguinYippies-2ebbdb237a52551d4bb93fe2ab0778479765f9e8.tar.gz PenguinYippies-2ebbdb237a52551d4bb93fe2ab0778479765f9e8.tar.bz2 PenguinYippies-2ebbdb237a52551d4bb93fe2ab0778479765f9e8.zip |
Looks like the demo
Diffstat (limited to 'src')
-rw-r--r-- | src/clicky.c | 2 | ||||
-rw-r--r-- | src/gameScreen.c | 9 | ||||
-rw-r--r-- | src/gameScreen.h | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/clicky.c b/src/clicky.c index d8d64f9..64e5645 100644 --- a/src/clicky.c +++ b/src/clicky.c @@ -30,7 +30,7 @@ Clicky createPenguinLolClicky(Game* game) clicky.animation = createAnimation(&game->assets.animations[PENGUIN_LOL_ANIMATION], ANIMATION_DEFAULT_DELAY); clicky.animation.repeat = false; clicky.texture = NULL; - clicky.rect = (Rectangle){0.0, 0.0, 128.0, 128.0}; + clicky.rect = (Rectangle){0.0, 0.0, 256.0, 256.0}; clicky.data = NULL; clicky.updateCB = updatePenguinLol; diff --git a/src/gameScreen.c b/src/gameScreen.c index dc14bc1..d949343 100644 --- a/src/gameScreen.c +++ b/src/gameScreen.c @@ -67,6 +67,11 @@ void initGameScreen(GameScreen* gameScreen, Game* game) WHITE, BLACK ); + + // Clickies. + gameScreen->penguinLol = createPenguinLolClicky(game); + gameScreen->penguinLol.rect.x = WINDOW_WIDTH / 2.0 - 128.0; + gameScreen->penguinLol.rect.y = WINDOW_HEIGHT / 2.0 - 128.0; } void updateGameScreen(GameScreen* gameScreen, Game* game) @@ -93,10 +98,14 @@ void updateGameScreen(GameScreen* gameScreen, Game* game) updateTexturedButton(&gameScreen->achievementsButton); updateTexturedButton(&gameScreen->rebirthButton); updateTexturedButton(&gameScreen->statisticsButton); + + // update clickies. + updateClicky(game, &gameScreen->penguinLol); } void closeGameScreen(GameScreen* gameScreen) { closeAnimation(&gameScreen->buttonPanelSharedAnimation); + freePenginLolClicky(gameScreen->penguinLol); } diff --git a/src/gameScreen.h b/src/gameScreen.h index 45be947..0acf650 100644 --- a/src/gameScreen.h +++ b/src/gameScreen.h @@ -1,6 +1,7 @@ #include "gameCommon.h" #include "animation.h" #include "ui.h" +#include "clicky.h" #ifndef GAME_SCREEN_H #define GAME_SCREEN_H @@ -15,6 +16,8 @@ typedef struct GameScreen { TexturedButton achievementsButton; TexturedButton rebirthButton; TexturedButton statisticsButton; + + Clicky penguinLol; } GameScreen; void initGameScreen(GameScreen* gameScreen, Game* game); |