Mirai's Miscellaneous Misadventures

M52 / core / ground.c

1/* license: AGPLv3 or later */
2/* copyright 2024 zamfofex */
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}