Mirai's Miscellaneous Misadventures
M43 / core / ground.c
1
2
3
4#include <mimimi.h>
5
6unsigned char mimimi_ground_tile(struct mimimi_ground *ground, int x, int y)
7{
8 if (x < 0) return 0;
9 if (y < 0) return 0;
10 if (x >= ground->width) return 0;
11 if (y >= ground->height) return 0;
12 return ground->tiles[x + y * ground->width];
13}