mirror of
https://codeberg.org/hkzlab/TK2048.git
synced 2025-12-25 21:22:15 +11:00
34 lines
1,015 B
C
34 lines
1,015 B
C
#ifndef _GAME_GRAPHICS_HEADER_
|
|
#define _GAME_GRAPHICS_HEADER_
|
|
|
|
#include <stdint.h>
|
|
|
|
#define BRD_DOUBLING_UP(a) (a & 0x01)
|
|
#define BRD_DOUBLING_DOWN(a) (a & 0x02)
|
|
#define BRD_DOUBLING_LEFT(a) (a & 0x04)
|
|
#define BRD_DOUBLING_RIGHT(a) (a & 0x08)
|
|
|
|
#define BRD_SKIP_UP(a) (a & 0x10)
|
|
#define BRD_SKIP_DOWN(a) (a & 0x20)
|
|
#define BRD_SKIP_LEFT(a) (a & 0x40)
|
|
#define BRD_SKIP_RIGHT(a) (a & 0x80)
|
|
|
|
typedef enum {
|
|
ARROW_UP,
|
|
ARROW_DOWN,
|
|
ARROW_LEFT,
|
|
ARROW_RIGHT
|
|
} arrow_direction;
|
|
|
|
void ddraw_field_borders_on_buffer(uint8_t brd);
|
|
void draw_game_background(uint16_t hi_score);
|
|
void draw_number(uint16_t n, uint8_t len, uint8_t x, uint8_t y);
|
|
void draw_tiles(void);
|
|
void ddraw_single_tile(uint8_t offset);
|
|
void swap_display_buffers(void);
|
|
void clear_display_buffers(void);
|
|
void clear_box(uint8_t w, uint8_t h, uint8_t off_x, uint8_t off_y, uint8_t *disp_buf);
|
|
void ddraw_direction_arrows(arrow_direction dir);
|
|
void ddraw_endgame_box(int8_t done, uint16_t score, uint16_t hi_score);
|
|
|
|
#endif /* _GAME_GRAPHICS_HEADER_ */
|