code cleanup:

- rename typedefs to a lowercase variant
- change variable names to shorter variants
This commit is contained in:
2025-02-10 12:28:05 +01:00
parent 94ca7e3d08
commit 3fd7806e5f
14 changed files with 121 additions and 119 deletions

View File

@@ -10,21 +10,21 @@
#define COLUMNS ((int8_t)10)
#define ROWS ((int8_t)24)
typedef const colour8* const CRow;
typedef colour8* Row;
typedef colour8 const* const row_const;
typedef colour8* row;
typedef struct {
Row rows[ROWS];
AudioDevice const* audio_device;
AudioData music;
row rows[ROWS];
audio_device const* audio_device;
audio_data music;
uint16_t score;
ShapeId nxt[7]; // the order of the shape ids that they should appear in
shape_id nxt[7]; // the order of the shape ids that they should appear in
uint8_t curr_idx; // current shape index
int8_t sel_x; // selected shape x position
int8_t sel_y; // selected shape y position
} GameData;
} game_data;
void next_shape(GameData* game_data);
void game_init(GameData* game_data); // initializes the game
void game_update(GameData* game_data, uint8_t const* keys); // updates the game's state
void game_free(GameData* game_data); // free all data stored with the game
void next_shape(game_data* dat);
void game_init(game_data* dat); // initializes the game
void game_update(game_data* dat, uint8_t const* keys); // updates the game's state
void game_free(game_data* dat); // free all data stored with the game