diff options
author | quou <quou@disroot.org> | 2024-08-03 16:37:48 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-08-03 16:37:48 +1000 |
commit | 125be3c1880d9f64580bf9c753dd85c5cbc1cfc4 (patch) | |
tree | 82cba7f0b3b0dc39d30f5490e627d869703d2b72 /map.c | |
parent | b2f18b6c47eb15d35b632f36cee0c89207755018 (diff) |
Add helpers for getting map tiles
Diffstat (limited to 'map.c')
-rw-r--r-- | map.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -3,3 +3,11 @@ int map_size(int w, int h) { return sizeof(Map) + w * h * sizeof(Map_Tile); } + +Map_Tile* map_tiles(Map* m) { + return (Map_Tile*)&m[1]; +} + +const Map_Tile* map_tilesc(const Map* m) { + return (Map_Tile*)&m[1]; +} |