zephr/game: textures, icons, and buttons

- zephr: correctly set cursor when hovering button
- zephr: added texture loading and displaying
- zephr: added icon button
- game: added help and settings icon buttons
This commit is contained in:
2023-12-27 22:42:35 +02:00
parent 2fc8ac6456
commit 2f88c53a07
13 changed files with 263 additions and 57 deletions
+9
View File
@@ -10,6 +10,13 @@ typedef enum MoveDir {
MOVE_DIR_RIGHT,
} MoveDir;
typedef enum IconTexture {
HELP_ICON,
SETTINGS_ICON,
ICON_TEXTURE_COUNT,
} IconTexture;
typedef struct Tile {
u16 value;
u16 new_value;
@@ -27,6 +34,8 @@ typedef struct Game {
bool spawning_new_tile;
bool game_over;
u32 score;
TextureId icon_textures[ICON_TEXTURE_COUNT];
} Game;
void draw_board(void);