Fumofumotris/source/fumotris/tetr.h

26 lines
444 B
C
Raw Normal View History

2024-03-25 05:34:59 +00:00
#include <stdio.h>
#include <stdlib.h>
2024-04-30 21:41:31 +00:00
#include "fumocommon.h"
2024-05-07 22:10:15 +00:00
#include "terminal.h"
2024-03-25 05:34:59 +00:00
2024-04-30 21:41:31 +00:00
2024-03-25 05:34:59 +00:00
struct TetrMap {
2024-05-07 22:10:15 +00:00
usize wid;
usize hgt;
2024-03-25 05:34:59 +00:00
int x;
int y;
2024-05-07 22:10:15 +00:00
u8f rot;
2024-03-25 05:34:59 +00:00
u8 *blks;
};
2024-05-07 22:10:15 +00:00
bool CreateTetrMap(struct TetrMap *map, usize wid, usize hgt);
void FreeTetrMap(struct TetrMap *map);
2024-03-25 05:34:59 +00:00
2024-05-07 22:10:15 +00:00
void TetrMapDraw(struct TetrMap *map, struct Terminal *term);
2024-03-25 05:34:59 +00:00
bool TetrCollisionCheck(struct TetrMap *board, struct TetrMap *piece, int dx, int dy);