diff --git a/game/game_tileset.h b/game/game_tileset.h index e78356f..86e4ee8 100644 --- a/game/game_tileset.h +++ b/game/game_tileset.h @@ -279,7 +279,7 @@ static BuildingType getTileBuilding(BzTileID tile) { } } -static BuildingType getBuildingTile(BuildingType type) { +static BzTileID getBuildingTile(BuildingType type) { switch (type) { case BUILDING_KEEP: return 5892; default: return -1; @@ -332,7 +332,7 @@ typedef enum AnimType { ANIM_NONE, } AnimType; -static EntityType getEntityTile(EntityType type) { +static BzTileID getEntityTile(EntityType type) { switch (type) { case ENTITY_WORKER: return 27; case ENTITY_WOOD: return 7424; @@ -418,7 +418,7 @@ typedef enum ItemType { ITEM_NONE, } ItemType; -static ItemType getItemTile(ItemType type) { +static BzTileID getItemTile(ItemType type) { switch (type) { case ITEM_STAFF: return 7680; case ITEM_PICKAXE: return 7681; diff --git a/scripts/extract_common.py b/scripts/extract_common.py index f464db6..4ef46b1 100644 --- a/scripts/extract_common.py +++ b/scripts/extract_common.py @@ -173,7 +173,7 @@ class EnumWriter: def output_enum_to_tile(self, func_name): writer = self.writer - writer.output(f"static {self.enum_type} {func_name}({self.enum_type} type) ") + writer.output(f"static BzTileID {func_name}({self.enum_type} type) ") writer.block_start() writer.output("switch (type) ")