Mirai's Miscellaneous Misadventures
M46 / core / ground.c
#include <mimimi.h>
unsigned char mimimi_ground_tile(struct mimimi_ground *ground, int x, int y)
{
if (x < 0) return 0;
if (y < 0) return 0;
if (x >= ground->width) return 0;
if (y >= ground->height) return 0;
return ground->tiles[x + y * ground->width];
}