diff options
author | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-02-22 22:37:18 +0000 |
---|---|---|
committer | nathansmith117 <thenathansmithsmith@gmail.com> | 2024-02-22 22:37:18 +0000 |
commit | 8409c0fef6be37b3b5081402c1669207a1dc9ca3 (patch) | |
tree | 74a35a59860450e4915d01c8313545a242d87747 /src/clicky.h | |
parent | 23707911599413826ee20044cf4eeecbb8e3bdb7 (diff) | |
download | PenguinYippies-8409c0fef6be37b3b5081402c1669207a1dc9ca3.tar.gz PenguinYippies-8409c0fef6be37b3b5081402c1669207a1dc9ca3.tar.bz2 PenguinYippies-8409c0fef6be37b3b5081402c1669207a1dc9ca3.zip |
Working on clicky list
Diffstat (limited to 'src/clicky.h')
-rw-r--r-- | src/clicky.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/clicky.h b/src/clicky.h index 12b3b12..8a91c68 100644 --- a/src/clicky.h +++ b/src/clicky.h @@ -1,11 +1,14 @@ #include "gameCommon.h" #include "animation.h" +#define MAX_CLICKIES 256 + #ifndef CLICKY_H #define CLICKY_H typedef struct Clicky Clicky; typedef void (*ClickyUpdateCB)(Game* game, Clicky* clicky); +typedef void (*ClickyFreeCB)(Clicky clicky); // A fixable clicky clicky. There shall be many clicky clickies. typedef struct Clicky { @@ -13,18 +16,25 @@ typedef struct Clicky { Texture* texture; Rectangle rect; - // Used for color collision stuff. - Color* colors; - void* data; ClickyUpdateCB updateCB; + ClickyFreeCB freeCB; + + // Used for reacting to clicks. + bool wasClicked; } Clicky; -void updateClicky(Game* game, Clicky* clicky); +typedef struct Clickies { + Clicky clickies[MAX_CLICKIES]; + size_t clickiesCount; +} Clickies; + +void initClickies(Clickies* clickies); +void closeClickies(Clickies* clickies); +void updateClickies(Game* game, Clickies* clickies); // A silly silly penguin lol. Clicky createPenguinLolClicky(Game* game); -void freePenginLolClicky(Clicky clicky); #endif |