Mirai's Miscellaneous Misadventures

M49 / core / ground.c

/* license: AGPLv3 or later */
/* copyright 2024 zamfofex */

#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];
}