Add entity map

This commit is contained in:
2023-11-15 18:32:43 +01:00
parent 79adcad8de
commit 4c37622240
14 changed files with 253 additions and 18 deletions

View File

@@ -93,6 +93,12 @@ bool init(void *userData) {
.objectGroups[OBJECTS_GAME]=(BzTileObjectsDesc) {"Game"},
.objectGroups[OBJECTS_ENTITIES]=(BzTileObjectsDesc ) {"Entities"}
});
game->entityMap = entityMapCreate(&(EntityMapDesc) {
.maxWidth=game->map.width * game->map.tileWidth,
.maxHeight=game->map.height * game->map.tileHeight,
.cellResolution=game->map.tileWidth,
.cellDepth=10
});
bzTileMapOverrideLayer(&game->map, LAYER_BUILDING_OWNER, initBuildingsLayer);