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>
|
|
|
|
|
|
|
|
#include "fumotris.h"
|
|
|
|
#include "term.h"
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
void TetrMapToTermBuf(struct TetrMap *map, struct TermBuf *term);
|
|
|
|
|
|
|
|
bool TetrCollisionCheck(struct TetrMap *board, struct TetrMap *piece, int dx, int dy);
|