aboutsummaryrefslogtreecommitdiffstats
path: root/src/clicky.h
diff options
context:
space:
mode:
authornathansmith117 <thenathansmithsmith@gmail.com>2024-03-13 18:07:43 +0000
committernathansmith117 <thenathansmithsmith@gmail.com>2024-03-13 18:07:43 +0000
commit8372a776ad2e06b99e4704403504ba74932276ec (patch)
tree1c688217d8420474ad4c8b68c721d1a27d9df43d /src/clicky.h
parent694efe00e1e01af8534672b60970a3e0555e5f34 (diff)
downloadPenguinYippies-8372a776ad2e06b99e4704403504ba74932276ec.tar.gz
PenguinYippies-8372a776ad2e06b99e4704403504ba74932276ec.tar.bz2
PenguinYippies-8372a776ad2e06b99e4704403504ba74932276ec.zip
Made a clicker
Diffstat (limited to 'src/clicky.h')
-rw-r--r--src/clicky.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/clicky.h b/src/clicky.h
index cb96397..e38ecdf 100644
--- a/src/clicky.h
+++ b/src/clicky.h
@@ -3,6 +3,8 @@
#define MAX_CLICKIES 256
+#define CLICKER_DEFAULT_DELAY 0.5
+
#ifndef CLICKY_H
#define CLICKY_H
@@ -24,6 +26,12 @@ typedef struct Clicky {
bool wasClicked;
} Clicky;
+// ittle thingy used by the clicker
+typedef struct Clicker {
+ double timeLastClicked;
+ double delay;
+} Clicker;
+
typedef struct Clickies {
Clicky clickies[MAX_CLICKIES];
size_t clickiesCount;
@@ -37,5 +45,8 @@ void updateClickies(Game* game, Clickies* clickies);
// A silly silly penguin lol.
Clicky createPenguinLolClicky(Game* game);
+// Create a clicker.
+Clicky createClickerClicky(Game* game);
+
#endif