Added main menu.
This commit is contained in:
@ -104,18 +104,8 @@ tile_t mapTileGetByPosition(
|
||||
const uint16_t y,
|
||||
const uint8_t layer
|
||||
) {
|
||||
assertTrue(
|
||||
x < map->width,
|
||||
"X position must be less than map width."
|
||||
);
|
||||
assertTrue(
|
||||
y < map->height,
|
||||
"Y position must be less than map height."
|
||||
);
|
||||
assertTrue(
|
||||
layer < map->layers,
|
||||
"Layer must be less than map layers."
|
||||
);
|
||||
if(x >= map->width || y >= map->height) return TILE_NULL;
|
||||
if(layer >= map->layers) return TILE_NULL;
|
||||
|
||||
return map->tiles[
|
||||
(layer * map->width * map->height) +
|
||||
|
Reference in New Issue
Block a user