]> git.bts.cx Git - benzene.git/blob - src/bz/game/tilemap.h
Sprites
[benzene.git] / src / bz / game / tilemap.h
1 #ifndef BZ_GAME_TILEMAP_H
2 #define BZ_GAME_TILEMAP_H
3
4 #include <bz/memory/arena.h>
5 #include <bz/types/common.h>
6 #include <bz/types/identifier.h>
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 typedef struct BZTilemap BZTilemap;
13 typedef BZTilemap * BZTilemapID;
14
15 extern BZTilemapID bzGameLoadTilemap(BZMemoryArenaID arena, const char *identifierFmt, ...);
16
17 extern uint8_t bzGameGetTilemapTile(BZTilemapID tilemap, uint8_t mx, uint8_t my);
18 extern uint8_t bzGameSetTilemapTile(BZTilemapID tilemap, uint8_t mx, uint8_t my, uint8_t idx);
19
20 extern uint8_t bzGameGetTilemapSprite(BZTilemapID tilemap, uint8_t mx, uint8_t my);
21 extern bool bzGameGetTilemapHasFlag(BZTilemapID tilemap, uint8_t mx, uint8_t my, BZIdentifierHash tag);
22
23 extern uint32_t bzGameCalculateTilemapFlagsMask(BZTilemapID tilemap, size_t tagCount, BZIdentifierHash tags[]);
24
25 #ifdef __cplusplus
26 }
27 #endif
28
29 #endif