diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2025-04-06 18:53:05 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2025-04-06 18:53:05 +0100 |
commit | 7064baa135947cb0321db111ad510ba832966d68 (patch) | |
tree | 824ec2a4c73778831408049d930226ee0737aa01 /src/types.c | |
parent | 133d07d5e7781c86cc11cd86e80ad1ff5325fc36 (diff) | |
download | ldjam57-7064baa135947cb0321db111ad510ba832966d68.tar |
only allow placing stuff available in the level
Diffstat (limited to 'src/types.c')
-rw-r--r-- | src/types.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/types.c b/src/types.c index fdb9aa0..b2f1ee6 100644 --- a/src/types.c +++ b/src/types.c @@ -101,19 +101,20 @@ typedef struct { } Button; typedef struct { - int grid[GRIDWIDTH * GRIDHEIGHT]; + char grid[GRIDWIDTH * GRIDHEIGHT]; int goalx, goaly; - int placeableCells[MAX_PLACEABLE_CELLS]; // Color + char placeableCells[MAX_PLACEABLE_CELLS]; // Color } Level; typedef struct { uint64_t lastTick; char playing; - int grid[GRIDWIDTH * GRIDHEIGHT]; + char levelComplete; + char grid[GRIDWIDTH * GRIDHEIGHT]; int goalx, goaly; ButtonState buttonStates[N_BUTTONS]; int currentLevel; - int placedCells[MAX_PLACEABLE_CELLS]; // indices into Level placeableCells + char placeableCells[MAX_PLACEABLE_CELLS]; } State; // Mirror these in src/index.html.in |