Rework pathfinding to use Vector2, form formations
This commit is contained in:
@@ -285,6 +285,12 @@ void bzTileMapDestroy(BzTileMap *map) {
|
||||
*map = BZ_TILEMAP_INVALID;
|
||||
}
|
||||
|
||||
|
||||
void bzTileMapPosToTile(BzTileMap *map, Vector2 pos, BzTile *x, BzTile *y) {
|
||||
if (x) *x = (BzTile) (pos.x / (f32) map->tileWidth);
|
||||
if (y) *y = (BzTile) (pos.y / (f32) map->tileHeight);
|
||||
}
|
||||
|
||||
void bzTileMapOverrideLayer(BzTileMap *map, i32 slotID, BzTileLayerFunc func) {
|
||||
BZ_ASSERT(slotID >= 0 && slotID < map->layerCount);
|
||||
BzTileLayer *layer = map->layers + slotID;
|
||||
|
||||
Reference in New Issue
Block a user