mirror of https://git.sr.ht/~kikoodx/momento
16 lines
309 B
C
16 lines
309 B
C
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
|
/* Copyright (C) 2021 KikooDX */
|
|
|
|
#include "level.h"
|
|
#include "tiles.h"
|
|
|
|
extern struct Level level;
|
|
|
|
Tile
|
|
level_get_tile(int x, int y)
|
|
{
|
|
if (x < 0 || y < 0 || x >= level.width || y >= level.height)
|
|
return TILE_OOB;
|
|
return level.data[x + y * level.width];
|
|
}
|