Add destructor for SpatialGridID and Path, remove unused Animation code

This commit is contained in:
2023-12-29 09:06:53 +01:00
parent 0c9fae7781
commit 6e2c68cb70
4 changed files with 25 additions and 100 deletions

View File

@@ -118,7 +118,8 @@ bool initTreesLayer(BzTileMap *map, BzTileLayer *layer) {
f32 posX = layer->offsetX + x * sizeX;
f32 posY = layer->offsetY + y * sizeY;
ecs_entity_t e = ecs_new_id(ECS);
bzSpatialGridInsert(game->entityGrid, &e, posX, posY, sizeX, sizeY);
SpatialGridID gridID = bzSpatialGridInsert(game->entityGrid, &e, posX, posY, sizeX, sizeY);
ecs_set(ECS, e, SpatialGridID, {gridID});
posX += sizeX * 0.5f;
posY += sizeY * 0.5f;
ecs_add(ECS, e, TextureTerrain);