aboutsummaryrefslogtreecommitdiffstats
path: root/src/clicky.h
diff options
context:
space:
mode:
authornathansmith117 <thenathansmithsmith@gmail.com>2024-02-22 22:37:18 +0000
committernathansmith117 <thenathansmithsmith@gmail.com>2024-02-22 22:37:18 +0000
commit8409c0fef6be37b3b5081402c1669207a1dc9ca3 (patch)
tree74a35a59860450e4915d01c8313545a242d87747 /src/clicky.h
parent23707911599413826ee20044cf4eeecbb8e3bdb7 (diff)
downloadPenguinYippies-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.h20
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