Remove entity map in favor of spatial grid
This commit is contained in:
@@ -66,14 +66,14 @@ BzTileset bzTilesetCreate(const BzTilesetDesc *desc) {
|
||||
}
|
||||
}
|
||||
|
||||
cute_tiled_free_external_tileset(cuteTileset);
|
||||
|
||||
if (tileset.tiles.width != cuteTileset->imagewidth ||
|
||||
tileset.tiles.height != cuteTileset->imageheight) {
|
||||
cute_tiled_free_external_tileset(cuteTileset);
|
||||
bzTilesetDestroy(&tileset);
|
||||
return BZ_TILESET_INVALID;
|
||||
}
|
||||
|
||||
cute_tiled_free_external_tileset(cuteTileset);
|
||||
tileset.isValid = true;
|
||||
return tileset;
|
||||
}
|
||||
@@ -107,6 +107,7 @@ BzTileShape bzTilesetGetTileCollider(BzTileset *tileset, BzTile tileID) {
|
||||
|
||||
void bzTilesetDestroy(BzTileset *tileset) {
|
||||
UnloadTexture(tileset->tiles);
|
||||
bzFree(tileset->tileColliders);
|
||||
*tileset = BZ_TILESET_INVALID;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user