Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1#ifndef TETRIS_BOARD_H
2#define TETRIS_BOARD_H
3
4#include <snes.h>
5
6#define BOARD_W 10
7#define BOARD_ROWS 24 /* full board: rows 0-23 (0-3 hidden spawn, 4-23 visible) */
8#define VISIBLE_TOP 4 /* first visible row (standard 20 visible rows) */
9
10typedef struct {
12 u8 rows[4];
14
15void boardClear(void);
16u8 boardCheckCollision(u8 type, u8 rot, s8 row, s8 col);
17void boardLockPiece(u8 type, u8 rot, s8 row, s8 col);
20u8 boardGetCell(u8 row, u8 col);
21
22#endif /* TETRIS_BOARD_H */
u8 boardCheckCollision(u8 type, u8 rot, s8 row, s8 col)
Definition board.c:21
void boardLockPiece(u8 type, u8 rot, s8 row, s8 col)
Definition board.c:41
void boardClear(void)
Definition board.c:7
u8 boardFindFullLines(LineClearResult *result)
Definition board.c:55
void boardRemoveLines(LineClearResult *result)
Definition board.c:80
u8 boardGetCell(u8 row, u8 col)
Definition board.c:16
signed char s8
8-bit signed integer (-128 to 127)
Definition types.h:43
unsigned char u8
8-bit unsigned integer (0 to 255)
Definition types.h:46
OpenSNES Master Header.
Definition board.h:10
u8 count
Definition board.h:11