From a2dd3914da659e0edae5b4081ddcb7d169611b31 Mon Sep 17 00:00:00 2001 From: Quinn Date: Tue, 28 Jan 2025 16:29:48 +0100 Subject: [PATCH] store selected shape id in game data --- src/game/game.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/game/game.h b/src/game/game.h index 3d4335a..37d70df 100644 --- a/src/game/game.h +++ b/src/game/game.h @@ -3,16 +3,25 @@ #include #include "../window/colour.h" +#include "tetromino/shapes.h" // stores the data used in the game #define COLUMNS ((uint8_t)16) #define ROWS ((uint8_t)(COLUMNS * 2)) +typedef struct { + ShapeId id; + uint8_t x; + uint8_t y; +} SelectedShape; + typedef struct { Colour columns[COLUMNS]; } Row; + typedef struct { + SelectedShape selected; Row row[ROWS]; } GameData;