mirror of
https://git.sr.ht/~kikoodx/momento
synced 2024-06-05 18:21:25 +02:00
14 lines
309 B
C
14 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];
|
||
|
}
|