Update to use game_tileset.h
This commit is contained in:
@@ -31,8 +31,8 @@ bool canPlaceBuilding(BzTileMap *map, BuildingType type, BzTile tileX, BzTile ti
|
||||
BzTile tile = bzTileLayerGetTile(buildLayer, x, y);
|
||||
tile = bzTilesetGetTile(tileset, tile);
|
||||
tile = getTileBuilding(tile);
|
||||
if (tile == BUILDINGS_ROAD)
|
||||
return false;
|
||||
//if (tile == BUILDINGS_ROAD)
|
||||
// return false;
|
||||
if (bzTileMapHasCollision(map, x, y)) {
|
||||
return false;
|
||||
}
|
||||
@@ -57,7 +57,7 @@ ecs_entity_t placeBuilding(BzTileMap *map, BuildingType type, BzTile tileX, BzTi
|
||||
|
||||
ecs_set(ECS, e, TilePosition, { .x = tileX, .y = tileY });
|
||||
ecs_set(ECS, e, TileSize, { .sizeX = sizeX, .sizeY = sizeY });
|
||||
ecs_set(ECS, e, Owner, { .playerID = BUILDINGS_PLAYER_RED });
|
||||
//ecs_set(ECS, e, Owner, { .playerID = BUILDINGS_PLAYER_RED });
|
||||
|
||||
for (i32 y = tileY; y < tileY + sizeY; y++) {
|
||||
for (i32 x = tileX; x < tileX + sizeX; x++) {
|
||||
|
||||
Reference in New Issue
Block a user