store selected shape id in game data

This commit is contained in:
2025-01-28 16:29:48 +01:00
parent 2fb10106f4
commit a2dd3914da

View File

@@ -3,16 +3,25 @@
#include <stdint.h>
#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;