Fumofumotris/source/fumotris/tetr.h

29 lines
522 B
C
Raw Normal View History

2024-03-25 05:34:59 +00:00
#include <iso646.h>
#include <pthread.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
2024-04-30 21:41:31 +00:00
#include "fumocommon.h"
2024-03-25 05:34:59 +00:00
#include "term.h"
2024-04-30 21:41:31 +00:00
2024-03-25 05:34:59 +00:00
struct TetrMap {
size_t wid;
size_t hgt;
size_t area;
int x;
int y;
u8 rot;
u8 *blks;
};
2024-04-02 20:06:14 +00:00
struct TetrMap NewTetrMap(u8 *blks, size_t wid, size_t hgt);
2024-03-25 05:34:59 +00:00
2024-04-03 23:31:47 +00:00
void TetrMapToTermBuf(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);