mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 14:05:45 +01:00
code cleanup:
- rename typedefs to a lowercase variant - change variable names to shorter variants
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user