diff options
Diffstat (limited to 'src/types.c')
-rw-r--r-- | src/types.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/types.c b/src/types.c index bfe0d7d..4c7a3cb 100644 --- a/src/types.c +++ b/src/types.c @@ -8,6 +8,7 @@ #define GRIDHEIGHT 16 #define TICK_LENGTH 200 #define GRID_OFFSET_X 64 +#define MAX_PLACEABLE_CELLS 16 typedef struct { unsigned char r, g, b, a; @@ -48,9 +49,20 @@ enum { }; enum { - BUTTON_CONTINUE, - BUTTON_RETRY, + IMAGE_NULL, + IMAGE_CONTINUE, + IMAGE_EXIT, + IMAGE_PAUSE, + IMAGE_PLAY, + IMAGE_RETRY, + N_IMAGES, +}; + +enum { BUTTON_BACK, + BUTTON_RETRY, + BUTTON_PLAY, + BUTTON_CONTINUE, N_BUTTONS, }; @@ -69,11 +81,18 @@ typedef struct { } Button; typedef struct { + int grid[GRIDWIDTH * GRIDHEIGHT]; + int goalx, goaly; + int placeableCells[MAX_PLACEABLE_CELLS]; // Color +} Level; + +typedef struct { uint64_t lastTick; char playing; int grid[GRIDWIDTH * GRIDHEIGHT]; int goalx, goaly; ButtonState buttonStates[N_BUTTONS]; + int currentLevel; } State; // Mirror these in src/index.html.in |