diff options
| author | 2024-10-24 14:18:30 -0400 | |
|---|---|---|
| committer | 2024-10-24 14:18:30 -0400 | |
| commit | f85bfe4cfdc6b03ff66a874d4d1028e291bccda4 (patch) | |
| tree | bce1383916209e9618797ff4586385dffeb5f1e0 | |
| parent | 599d68f3b14e7945ddea79b5baade4d9baeb5332 (diff) | |
| download | cetris-f85bfe4cfdc6b03ff66a874d4d1028e291bccda4.tar.gz cetris-f85bfe4cfdc6b03ff66a874d4d1028e291bccda4.tar.bz2 cetris-f85bfe4cfdc6b03ff66a874d4d1028e291bccda4.zip | |
small type fixes
| -rwxr-xr-x | lib/cetris.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/cetris.h b/lib/cetris.h index 5ae3dae..6f3ea77 100755 --- a/lib/cetris.h +++ b/lib/cetris.h @@ -12,7 +12,7 @@ typedef struct { - char x; + char x; char y; } ctrs_vec2; @@ -224,7 +224,7 @@ static const ctrs_vec2 basic_movements[3] = { static void update_board(ctrs_game *g); static void -set_piece(ctrs_game *g, uint8_t type, ctrs_mino* mino) +set_piece(ctrs_game *g, unsigned char type, ctrs_mino* mino) { memset(mino, 0, sizeof(ctrs_mino)); @@ -758,9 +758,9 @@ ctrs_init_game(ctrs_game *g) memset(g, 0, sizeof(ctrs_game) - sizeof(ctrs_config)); - g->board = calloc(g->config.board_x, sizeof(unsigned char *)); + g->board = (unsigned char **)calloc(g->config.board_x, sizeof(unsigned char *)); for (int i = 0; i < g->config.board_x; i++) - g->board[i] = calloc(g->config.board_y, sizeof(unsigned char)); + g->board[i] = (unsigned char *)calloc(g->config.board_y, sizeof(unsigned char)); g->line_remove_tick = (unsigned long *)calloc(g->config.board_y, sizeof(unsigned long)); @@ -769,7 +769,7 @@ ctrs_init_game(ctrs_game *g) g->highest_line = g->config.board_y; - for (int i = 0; i < 7; i++) + for (unsigned char i = 0; i < 7; i++) g->next_queue[i] = i; shuffle_queue(g); |