diff --git a/test.cpp b/test.cpp index 09824a7..5ecaf90 100644 --- a/test.cpp +++ b/test.cpp @@ -1,12 +1,273 @@ +#include "res/maps/AgathasRoom.blk.h" +#include "res/maps/BikeShop.blk.h" +#include "res/maps/BillsHouse.blk.h" +#include "res/maps/BluesHouse.blk.h" +#include "res/maps/BrunosRoom.blk.h" +#include "res/maps/CeladonChiefHouse.blk.h" +#include "res/maps/CeladonCity.blk.h" +#include "res/maps/CeladonDiner.blk.h" +#include "res/maps/CeladonGym.blk.h" +#include "res/maps/CeladonHotel.blk.h" +#include "res/maps/CeladonMansion1F.blk.h" +#include "res/maps/CeladonMansion2F.blk.h" +#include "res/maps/CeladonMansion3F.blk.h" +#include "res/maps/CeladonMansionRoof.blk.h" +#include "res/maps/ViridianSchoolHouse.blk.h" +#include "res/maps/CeladonMart1F.blk.h" +#include "res/maps/CeladonMart2F.blk.h" +#include "res/maps/CeladonMart3F.blk.h" +#include "res/maps/CeladonMart4F.blk.h" +#include "res/maps/CeladonMart5F.blk.h" +#include "res/maps/CeladonMartElevator.blk.h" +#include "res/maps/CeladonMartRoof.blk.h" +#include "res/maps/MtMoonPokecenter.blk.h" +#include "res/maps/CeruleanBadgeHouse.blk.h" +#include "res/maps/CeruleanCave1F.blk.h" +#include "res/maps/CeruleanCave2F.blk.h" +#include "res/maps/CeruleanCaveB1F.blk.h" +#include "res/maps/CeruleanCity.blk.h" +#include "res/maps/CeruleanGym.blk.h" +#include "res/maps/VermilionMart.blk.h" +#include "res/maps/CeruleanPokecenter.blk.h" +#include "res/maps/ViridianNicknameHouse.blk.h" +#include "res/maps/CeruleanTrashedHouse.blk.h" +#include "res/maps/ChampionsRoom.blk.h" +#include "res/maps/CinnabarGym.blk.h" +#include "res/maps/CinnabarIsland.blk.h" +#include "res/maps/CinnabarLab.blk.h" +#include "res/maps/CinnabarLabFossilRoom.blk.h" +#include "res/maps/CinnabarLabMetronomeRoom.blk.h" +#include "res/maps/CinnabarLabTradeRoom.blk.h" +#include "res/maps/PewterMart.blk.h" +#include "res/maps/FuchsiaPokecenter.blk.h" +#include "res/maps/Colosseum.blk.h" +#include "res/maps/CopycatsHouse1F.blk.h" +#include "res/maps/RedsHouse2F.blk.h" +#include "res/maps/Daycare.blk.h" +#include "res/maps/DiglettsCave.blk.h" +#include "res/maps/DiglettsCaveRoute2.blk.h" +#include "res/maps/DiglettsCaveRoute2.blk.h" +#include "res/maps/FightingDojo.blk.h" +#include "res/maps/FuchsiaBillsGrandpasHouse.blk.h" +#include "res/maps/FuchsiaCity.blk.h" +#include "res/maps/FuchsiaGoodRodHouse.blk.h" +#include "res/maps/FuchsiaGym.blk.h" +#include "res/maps/FuchsiaMart.blk.h" +#include "res/maps/FuchsiaMeetingRoom.blk.h" +#include "res/maps/FuchsiaPokecenter.blk.h" +#include "res/maps/GameCorner.blk.h" +#include "res/maps/GameCornerPrizeRoom.blk.h" +#include "res/maps/HallOfFame.blk.h" +#include "res/maps/IndigoPlateau.blk.h" +#include "res/maps/IndigoPlateauLobby.blk.h" +#include "res/maps/LancesRoom.blk.h" +#include "res/maps/ViridianNicknameHouse.blk.h" +#include "res/maps/VermilionMart.blk.h" +#include "res/maps/PewterPokecenter.blk.h" +#include "res/maps/LavenderTown.blk.h" +#include "res/maps/LoreleisRoom.blk.h" +#include "res/maps/ViridianNicknameHouse.blk.h" +#include "res/maps/ViridianNicknameHouse.blk.h" +#include "res/maps/MtMoon1F.blk.h" +#include "res/maps/MtMoonB1F.blk.h" +#include "res/maps/MtMoonB2F.blk.h" +#include "res/maps/MtMoonPokecenter.blk.h" +#include "res/maps/Museum1F.blk.h" +#include "res/maps/Museum2F.blk.h" +#include "res/maps/ViridianNicknameHouse.blk.h" +#include "res/maps/OaksLab.blk.h" #include "res/maps/PalletTown.blk.h" -#include "res/gfx/tilesets/overworld.4bpp.h" +#include "res/maps/PewterCity.blk.h" +#include "res/maps/PewterGym.blk.h" +#include "res/maps/PewterMart.blk.h" +#include "res/maps/ViridianNicknameHouse.blk.h" +#include "res/maps/PewterPokecenter.blk.h" +#include "res/maps/ViridianNicknameHouse.blk.h" +#include "res/maps/PokemonFanClub.blk.h" +#include "res/maps/PokemonMansion1F.blk.h" +#include "res/maps/PokemonMansion2F.blk.h" +#include "res/maps/PokemonMansion3F.blk.h" +#include "res/maps/PokemonMansionB1F.blk.h" +#include "res/maps/PokemonTower1F.blk.h" +#include "res/maps/PokemonTower2F.blk.h" +#include "res/maps/PokemonTower3F.blk.h" +#include "res/maps/PokemonTower4F.blk.h" +#include "res/maps/PokemonTower5F.blk.h" +#include "res/maps/PokemonTower6F.blk.h" +#include "res/maps/PokemonTower7F.blk.h" +#include "res/maps/PowerPlant.blk.h" +#include "res/maps/RedsHouse1F.blk.h" +#include "res/maps/RedsHouse2F.blk.h" +#include "res/maps/RocketHideoutB1F.blk.h" +#include "res/maps/RocketHideoutB2F.blk.h" +#include "res/maps/RocketHideoutB3F.blk.h" +#include "res/maps/RocketHideoutB4F.blk.h" +#include "res/maps/RocketHideoutElevator.blk.h" +#include "res/maps/RockTunnel1F.blk.h" +#include "res/maps/RockTunnelB1F.blk.h" +#include "res/maps/MtMoonPokecenter.blk.h" +#include "res/maps/Route1.blk.h" +#include "res/maps/Route10.blk.h" +#include "res/maps/Route11.blk.h" +#include "res/maps/Route11Gate1F.blk.h" +#include "res/maps/Route11Gate2F.blk.h" +#include "res/maps/Route12.blk.h" +#include "res/maps/Route12Gate1F.blk.h" +#include "res/maps/Route11Gate2F.blk.h" +#include "res/maps/Daycare.blk.h" +#include "res/maps/Route13.blk.h" +#include "res/maps/Route14.blk.h" +#include "res/maps/Route15.blk.h" +#include "res/maps/Route11Gate1F.blk.h" +#include "res/maps/Route11Gate2F.blk.h" +#include "res/maps/Route16.blk.h" +#include "res/maps/ViridianNicknameHouse.blk.h" +#include "res/maps/Route16Gate1F.blk.h" +#include "res/maps/Route11Gate2F.blk.h" +#include "res/maps/Route17.blk.h" +#include "res/maps/Route18.blk.h" +#include "res/maps/Route11Gate1F.blk.h" +#include "res/maps/Route11Gate2F.blk.h" +#include "res/maps/Route19.blk.h" +#include "res/maps/Route2.blk.h" +#include "res/maps/Route20.blk.h" +#include "res/maps/Route21.blk.h" +#include "res/maps/Route22.blk.h" +#include "res/maps/Route22Gate.blk.h" +#include "res/maps/Route23.blk.h" +#include "res/maps/Route24.blk.h" +#include "res/maps/Route25.blk.h" +#include "res/maps/ViridianForestNorthGate.blk.h" +#include "res/maps/ViridianNicknameHouse.blk.h" +#include "res/maps/Route3.blk.h" +#include "res/maps/Route4.blk.h" +#include "res/maps/Route5.blk.h" +#include "res/maps/Route5Gate.blk.h" +#include "res/maps/Route6.blk.h" +#include "res/maps/Route6Gate.blk.h" +#include "res/maps/Route7.blk.h" +#include "res/maps/Route7Gate.blk.h" +#include "res/maps/Route8.blk.h" +#include "res/maps/Route8Gate.blk.h" +#include "res/maps/Route9.blk.h" +#include "res/maps/SafariZoneCenter.blk.h" +#include "res/maps/SafariZoneCenterRestHouse.blk.h" +#include "res/maps/SafariZoneEast.blk.h" +#include "res/maps/SafariZoneCenterRestHouse.blk.h" +#include "res/maps/SafariZoneGate.blk.h" +#include "res/maps/SafariZoneNorth.blk.h" +#include "res/maps/SafariZoneCenterRestHouse.blk.h" +#include "res/maps/SafariZoneSecretHouse.blk.h" +#include "res/maps/SafariZoneWest.blk.h" +#include "res/maps/SafariZoneCenterRestHouse.blk.h" +#include "res/maps/SaffronCity.blk.h" +#include "res/maps/SaffronGym.blk.h" +#include "res/maps/VermilionMart.blk.h" +#include "res/maps/ViridianNicknameHouse.blk.h" +#include "res/maps/PewterPokecenter.blk.h" +#include "res/maps/SeafoamIslands1F.blk.h" +#include "res/maps/SeafoamIslandsB1F.blk.h" +#include "res/maps/SeafoamIslandsB2F.blk.h" +#include "res/maps/SeafoamIslandsB3F.blk.h" +#include "res/maps/SeafoamIslandsB4F.blk.h" +#include "res/maps/SilphCo10F.blk.h" +#include "res/maps/SilphCo11F.blk.h" +#include "res/maps/SilphCo1F.blk.h" +#include "res/maps/SilphCo2F.blk.h" +#include "res/maps/SilphCo3F.blk.h" +#include "res/maps/SilphCo4F.blk.h" +#include "res/maps/SilphCo5F.blk.h" +#include "res/maps/SilphCo6F.blk.h" +#include "res/maps/SilphCo7F.blk.h" +#include "res/maps/SilphCo8F.blk.h" +#include "res/maps/SilphCo9F.blk.h" +#include "res/maps/SilphCoElevator.blk.h" +#include "res/maps/SSAnne1F.blk.h" +#include "res/maps/SSAnne1FRooms.blk.h" +#include "res/maps/SSAnne2F.blk.h" +#include "res/maps/SSAnne2FRooms.blk.h" +#include "res/maps/SSAnne3F.blk.h" +#include "res/maps/SSAnneB1F.blk.h" +#include "res/maps/SSAnne2FRooms.blk.h" +#include "res/maps/SSAnneBow.blk.h" +#include "res/maps/SSAnneCaptainsRoom.blk.h" +#include "res/maps/SSAnneKitchen.blk.h" +#include "res/maps/TradeCenter.blk.h" +#include "res/maps/UndergroundPathNorthSouth.blk.h" +#include "res/maps/UndergroundPathRoute5.blk.h" +#include "res/maps/UndergroundPathRoute5.blk.h" +#include "res/maps/UndergroundPathRoute5.blk.h" +#include "res/maps/UndergroundPathRoute8.blk.h" +#include "res/maps/UndergroundPathWestEast.blk.h" +#include "res/maps/VermilionCity.blk.h" +#include "res/maps/VermilionDock.blk.h" +#include "res/maps/VermilionGym.blk.h" +#include "res/maps/VermilionMart.blk.h" +#include "res/maps/Daycare.blk.h" +#include "res/maps/ViridianNicknameHouse.blk.h" +#include "res/maps/PewterPokecenter.blk.h" +#include "res/maps/VermilionTradeHouse.blk.h" +#include "res/maps/VictoryRoad1F.blk.h" +#include "res/maps/VictoryRoad2F.blk.h" +#include "res/maps/VictoryRoad3F.blk.h" +#include "res/maps/ViridianCity.blk.h" +#include "res/maps/ViridianForest.blk.h" +#include "res/maps/ViridianForestNorthGate.blk.h" +#include "res/maps/ViridianForestNorthGate.blk.h" +#include "res/maps/ViridianGym.blk.h" +#include "res/maps/ViridianMart.blk.h" +#include "res/maps/ViridianNicknameHouse.blk.h" +#include "res/maps/ViridianPokecenter.blk.h" +#include "res/maps/ViridianSchoolHouse.blk.h" +#include "res/maps/WardensHouse.blk.h" +#include "res/gfx/blocksets/cavern.bst.h" +#include "res/gfx/tilesets/cavern.2bpp.h" +#include "res/gfx/blocksets/cemetery.bst.h" +#include "res/gfx/tilesets/cemetery.2bpp.h" +#include "res/gfx/blocksets/club.bst.h" +#include "res/gfx/tilesets/club.2bpp.h" +#include "res/gfx/blocksets/gym.bst.h" +#include "res/gfx/tilesets/gym.2bpp.h" +#include "res/gfx/blocksets/facility.bst.h" +#include "res/gfx/tilesets/facility.2bpp.h" +#include "res/gfx/blocksets/forest.bst.h" +#include "res/gfx/tilesets/forest.2bpp.h" +#include "res/gfx/blocksets/gate.bst.h" +#include "res/gfx/tilesets/gate.2bpp.h" +#include "res/gfx/blocksets/gate.bst.h" +#include "res/gfx/tilesets/gate.2bpp.h" +#include "res/gfx/blocksets/gym.bst.h" +#include "res/gfx/tilesets/gym.2bpp.h" +#include "res/gfx/blocksets/house.bst.h" +#include "res/gfx/tilesets/house.2bpp.h" +#include "res/gfx/blocksets/interior.bst.h" +#include "res/gfx/tilesets/interior.2bpp.h" +#include "res/gfx/blocksets/lab.bst.h" +#include "res/gfx/tilesets/lab.2bpp.h" +#include "res/gfx/blocksets/lobby.bst.h" +#include "res/gfx/tilesets/lobby.2bpp.h" +#include "res/gfx/blocksets/mansion.bst.h" +#include "res/gfx/tilesets/mansion.2bpp.h" +#include "res/gfx/blocksets/pokecenter.bst.h" +#include "res/gfx/tilesets/pokecenter.2bpp.h" +#include "res/gfx/blocksets/gate.bst.h" +#include "res/gfx/tilesets/gate.2bpp.h" #include "res/gfx/blocksets/overworld.bst.h" - -/* -uint8_t const * const VictoryRoad1F_Blocks_start = reinterpret_cast(&_binary_res_maps_VictoryRoad1F_blk_start); -uint32_t const VictoryRoad1F_Blocks_end = reinterpret_cast(&_binary_res_maps_VictoryRoad1F_blk_end); -uint32_t const VictoryRoad1F_Blocks_size = reinterpret_cast(&_binary_res_maps_VictoryRoad1F_blk_size); -*/ +#include "res/gfx/tilesets/overworld.2bpp.h" +#include "res/gfx/blocksets/plateau.bst.h" +#include "res/gfx/tilesets/plateau.2bpp.h" +#include "res/gfx/blocksets/pokecenter.bst.h" +#include "res/gfx/tilesets/pokecenter.2bpp.h" +#include "res/gfx/blocksets/reds_house.bst.h" +#include "res/gfx/tilesets/reds_house.2bpp.h" +#include "res/gfx/blocksets/reds_house.bst.h" +#include "res/gfx/tilesets/reds_house.2bpp.h" +#include "res/gfx/blocksets/ship.bst.h" +#include "res/gfx/tilesets/ship.2bpp.h" +#include "res/gfx/blocksets/ship_port.bst.h" +#include "res/gfx/tilesets/ship_port.2bpp.h" +#include "res/gfx/blocksets/underground.bst.h" +#include "res/gfx/tilesets/underground.2bpp.h" struct start_size_t { uint8_t const * const start; @@ -16,9 +277,32 @@ struct start_size_t { struct tileset_t { start_size_t blockset; start_size_t tileset; - + enum tileset { + cavern, + cemetery, + club, + dojo, + facility, + forest, + forest_gate, + gate, + gym, + house, + interior, + lab, + lobby, + mansion, + mart, + museum, overworld, + plateau, + pokecenter, + reds_house_1, + reds_house_2, + ship, + ship_port, + underground, }; }; @@ -27,32 +311,1180 @@ struct map_t { enum tileset_t::tileset tileset; uint32_t width; uint32_t height; - + enum map { + agathas_room, + bike_shop, + bills_house, + blues_house, + brunos_room, + celadon_chief_house, + celadon_city, + celadon_diner, + celadon_gym, + celadon_hotel, + celadon_mansion_1f, + celadon_mansion_2f, + celadon_mansion_3f, + celadon_mansion_roof, + celadon_mansion_roof_house, + celadon_mart_1f, + celadon_mart_2f, + celadon_mart_3f, + celadon_mart_4f, + celadon_mart_5f, + celadon_mart_elevator, + celadon_mart_roof, + celadon_pokecenter, + cerulean_badge_house, + cerulean_cave_1f, + cerulean_cave_2f, + cerulean_cave_b1f, + cerulean_city, + cerulean_gym, + cerulean_mart, + cerulean_pokecenter, + cerulean_trade_house, + cerulean_trashed_house, + champions_room, + cinnabar_gym, + cinnabar_island, + cinnabar_lab, + cinnabar_lab_fossil_room, + cinnabar_lab_metronome_room, + cinnabar_lab_trade_room, + cinnabar_mart, + cinnabar_pokecenter, + colosseum, + copycats_house_1f, + copycats_house_2f, + daycare, + digletts_cave, + digletts_cave_route_11, + digletts_cave_route_2, + fighting_dojo, + fuchsia_bills_grandpas_house, + fuchsia_city, + fuchsia_good_rod_house, + fuchsia_gym, + fuchsia_mart, + fuchsia_meeting_room, + fuchsia_pokecenter, + game_corner, + game_corner_prize_room, + hall_of_fame, + indigo_plateau, + indigo_plateau_lobby, + lances_room, + lavender_cubone_house, + lavender_mart, + lavender_pokecenter, + lavender_town, + loreleis_room, + mr_fujis_house, + mr_psychics_house, + mt_moon_1f, + mt_moon_b1f, + mt_moon_b2f, + mt_moon_pokecenter, + museum_1f, + museum_2f, + name_raters_house, + oaks_lab, pallet_town, + pewter_city, + pewter_gym, + pewter_mart, + pewter_nidoran_house, + pewter_pokecenter, + pewter_speech_house, + pokemon_fan_club, + pokemon_mansion_1f, + pokemon_mansion_2f, + pokemon_mansion_3f, + pokemon_mansion_b1f, + pokemon_tower_1f, + pokemon_tower_2f, + pokemon_tower_3f, + pokemon_tower_4f, + pokemon_tower_5f, + pokemon_tower_6f, + pokemon_tower_7f, + power_plant, + reds_house_1f, + reds_house_2f, + rocket_hideout_b1f, + rocket_hideout_b2f, + rocket_hideout_b3f, + rocket_hideout_b4f, + rocket_hideout_elevator, + rock_tunnel_1f, + rock_tunnel_b1f, + rock_tunnel_pokecenter, + route_1, + route_10, + route_11, + route_11_gate_1f, + route_11_gate_2f, + route_12, + route_12_gate_1f, + route_12_gate_2f, + route_12_super_rod_house, + route_13, + route_14, + route_15, + route_15_gate_1f, + route_15_gate_2f, + route_16, + route_16_fly_house, + route_16_gate_1f, + route_16_gate_2f, + route_17, + route_18, + route_18_gate_1f, + route_18_gate_2f, + route_19, + route_2, + route_20, + route_21, + route_22, + route_22_gate, + route_23, + route_24, + route_25, + route_2_gate, + route_2_trade_house, + route_3, + route_4, + route_5, + route_5_gate, + route_6, + route_6_gate, + route_7, + route_7_gate, + route_8, + route_8_gate, + route_9, + safari_zone_center, + safari_zone_center_rest_house, + safari_zone_east, + safari_zone_east_rest_house, + safari_zone_gate, + safari_zone_north, + safari_zone_north_rest_house, + safari_zone_secret_house, + safari_zone_west, + safari_zone_west_rest_house, + saffron_city, + saffron_gym, + saffron_mart, + saffron_pidgey_house, + saffron_pokecenter, + seafoam_islands_1f, + seafoam_islands_b1f, + seafoam_islands_b2f, + seafoam_islands_b3f, + seafoam_islands_b4f, + silph_co_10f, + silph_co_11f, + silph_co_1f, + silph_co_2f, + silph_co_3f, + silph_co_4f, + silph_co_5f, + silph_co_6f, + silph_co_7f, + silph_co_8f, + silph_co_9f, + silph_co_elevator, + ss_anne_1f, + ss_anne_1f_rooms, + ss_anne_2f, + ss_anne_2f_rooms, + ss_anne_3f, + ss_anne_b1f, + ss_anne_b1f_rooms, + ss_anne_bow, + ss_anne_captains_room, + ss_anne_kitchen, + trade_center, + underground_path_north_south, + underground_path_route_5, + underground_path_route_6, + underground_path_route_7, + underground_path_route_8, + underground_path_west_east, + vermilion_city, + vermilion_dock, + vermilion_gym, + vermilion_mart, + vermilion_old_rod_house, + vermilion_pidgey_house, + vermilion_pokecenter, + vermilion_trade_house, + victory_road_1f, + victory_road_2f, + victory_road_3f, + viridian_city, + viridian_forest, + viridian_forest_north_gate, + viridian_forest_south_gate, + viridian_gym, + viridian_mart, + viridian_nickname_house, + viridian_pokecenter, + viridian_school_house, + wardens_house, }; }; -//uint8_t overworld_coll[] = {0x00, 0x10, 0x1b, 0x20, 0x21, 0x23, 0x2c, 0x2d, 0x2e, 0x30, 0x31, 0x33, 0x39, 0x3c, 0x3e, 0x52, 0x54, 0x58, 0x5b, 0xff}; - const tileset_t tilesets[] = { + [tileset_t::cavern] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_cavern_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_cavern_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_cavern_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_cavern_2bpp_size), + } + }, + [tileset_t::cemetery] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_cemetery_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_cemetery_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_cemetery_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_cemetery_2bpp_size), + } + }, + [tileset_t::club] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_club_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_club_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_club_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_club_2bpp_size), + } + }, + [tileset_t::dojo] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_gym_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_gym_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_gym_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_gym_2bpp_size), + } + }, + [tileset_t::facility] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_facility_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_facility_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_facility_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_facility_2bpp_size), + } + }, + [tileset_t::forest] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_forest_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_forest_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_forest_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_forest_2bpp_size), + } + }, + [tileset_t::forest_gate] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_gate_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_gate_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_gate_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_gate_2bpp_size), + } + }, + [tileset_t::gate] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_gate_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_gate_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_gate_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_gate_2bpp_size), + } + }, + [tileset_t::gym] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_gym_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_gym_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_gym_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_gym_2bpp_size), + } + }, + [tileset_t::house] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_house_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_house_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_house_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_house_2bpp_size), + } + }, + [tileset_t::interior] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_interior_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_interior_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_interior_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_interior_2bpp_size), + } + }, + [tileset_t::lab] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_lab_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_lab_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_lab_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_lab_2bpp_size), + } + }, + [tileset_t::lobby] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_lobby_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_lobby_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_lobby_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_lobby_2bpp_size), + } + }, + [tileset_t::mansion] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_mansion_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_mansion_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_mansion_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_mansion_2bpp_size), + } + }, + [tileset_t::mart] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_pokecenter_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_pokecenter_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_pokecenter_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_pokecenter_2bpp_size), + } + }, + [tileset_t::museum] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_gate_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_gate_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_gate_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_gate_2bpp_size), + } + }, [tileset_t::overworld] = { - // via TilesetHeader attributes - // always 128px wide ; 16 cells wide .blockset = { reinterpret_cast(&_binary_res_gfx_blocksets_overworld_bst_start), reinterpret_cast(&_binary_res_gfx_blocksets_overworld_bst_size), }, .tileset = { - reinterpret_cast(&_binary_res_gfx_tilesets_overworld_4bpp_start), - reinterpret_cast(&_binary_res_gfx_tilesets_overworld_4bpp_size), + reinterpret_cast(&_binary_res_gfx_tilesets_overworld_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_overworld_2bpp_size), } - } + }, + [tileset_t::plateau] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_plateau_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_plateau_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_plateau_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_plateau_2bpp_size), + } + }, + [tileset_t::pokecenter] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_pokecenter_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_pokecenter_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_pokecenter_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_pokecenter_2bpp_size), + } + }, + [tileset_t::reds_house_1] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_reds_house_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_reds_house_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_reds_house_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_reds_house_2bpp_size), + } + }, + [tileset_t::reds_house_2] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_reds_house_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_reds_house_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_reds_house_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_reds_house_2bpp_size), + } + }, + [tileset_t::ship] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_ship_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_ship_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_ship_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_ship_2bpp_size), + } + }, + [tileset_t::ship_port] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_ship_port_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_ship_port_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_ship_port_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_ship_port_2bpp_size), + } + }, + [tileset_t::underground] = { + .blockset = { + reinterpret_cast(&_binary_res_gfx_blocksets_underground_bst_start), + reinterpret_cast(&_binary_res_gfx_blocksets_underground_bst_size), + }, + .tileset = { + reinterpret_cast(&_binary_res_gfx_tilesets_underground_2bpp_start), + reinterpret_cast(&_binary_res_gfx_tilesets_underground_2bpp_size), + } + }, }; const map_t maps[] = { + [map_t::agathas_room] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_AgathasRoom_blk_start), + reinterpret_cast(&_binary_res_maps_AgathasRoom_blk_size), + }, + .tileset = tileset_t::cemetery, + .width = 5, + .height = 6, + }, + [map_t::bike_shop] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_BikeShop_blk_start), + reinterpret_cast(&_binary_res_maps_BikeShop_blk_size), + }, + .tileset = tileset_t::club, + .width = 4, + .height = 4, + }, + [map_t::bills_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_BillsHouse_blk_start), + reinterpret_cast(&_binary_res_maps_BillsHouse_blk_size), + }, + .tileset = tileset_t::interior, + .width = 4, + .height = 4, + }, + [map_t::blues_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_BluesHouse_blk_start), + reinterpret_cast(&_binary_res_maps_BluesHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::brunos_room] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_BrunosRoom_blk_start), + reinterpret_cast(&_binary_res_maps_BrunosRoom_blk_size), + }, + .tileset = tileset_t::gym, + .width = 5, + .height = 6, + }, + [map_t::celadon_chief_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonChiefHouse_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonChiefHouse_blk_size), + }, + .tileset = tileset_t::mansion, + .width = 4, + .height = 4, + }, + [map_t::celadon_city] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonCity_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonCity_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 25, + .height = 18, + }, + [map_t::celadon_diner] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonDiner_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonDiner_blk_size), + }, + .tileset = tileset_t::lobby, + .width = 5, + .height = 4, + }, + [map_t::celadon_gym] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonGym_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonGym_blk_size), + }, + .tileset = tileset_t::gym, + .width = 5, + .height = 9, + }, + [map_t::celadon_hotel] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonHotel_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonHotel_blk_size), + }, + .tileset = tileset_t::pokecenter, + .width = 7, + .height = 4, + }, + [map_t::celadon_mansion_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonMansion1F_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonMansion1F_blk_size), + }, + .tileset = tileset_t::mansion, + .width = 4, + .height = 6, + }, + [map_t::celadon_mansion_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonMansion2F_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonMansion2F_blk_size), + }, + .tileset = tileset_t::mansion, + .width = 4, + .height = 6, + }, + [map_t::celadon_mansion_3f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonMansion3F_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonMansion3F_blk_size), + }, + .tileset = tileset_t::mansion, + .width = 4, + .height = 6, + }, + [map_t::celadon_mansion_roof] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonMansionRoof_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonMansionRoof_blk_size), + }, + .tileset = tileset_t::mansion, + .width = 4, + .height = 6, + }, + [map_t::celadon_mansion_roof_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianSchoolHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianSchoolHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::celadon_mart_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonMart1F_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonMart1F_blk_size), + }, + .tileset = tileset_t::lobby, + .width = 10, + .height = 4, + }, + [map_t::celadon_mart_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonMart2F_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonMart2F_blk_size), + }, + .tileset = tileset_t::lobby, + .width = 10, + .height = 4, + }, + [map_t::celadon_mart_3f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonMart3F_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonMart3F_blk_size), + }, + .tileset = tileset_t::lobby, + .width = 10, + .height = 4, + }, + [map_t::celadon_mart_4f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonMart4F_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonMart4F_blk_size), + }, + .tileset = tileset_t::lobby, + .width = 10, + .height = 4, + }, + [map_t::celadon_mart_5f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonMart5F_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonMart5F_blk_size), + }, + .tileset = tileset_t::lobby, + .width = 10, + .height = 4, + }, + [map_t::celadon_mart_elevator] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonMartElevator_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonMartElevator_blk_size), + }, + .tileset = tileset_t::lobby, + .width = 2, + .height = 2, + }, + [map_t::celadon_mart_roof] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeladonMartRoof_blk_start), + reinterpret_cast(&_binary_res_maps_CeladonMartRoof_blk_size), + }, + .tileset = tileset_t::lobby, + .width = 10, + .height = 4, + }, + [map_t::celadon_pokecenter] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_MtMoonPokecenter_blk_start), + reinterpret_cast(&_binary_res_maps_MtMoonPokecenter_blk_size), + }, + .tileset = tileset_t::pokecenter, + .width = 7, + .height = 4, + }, + [map_t::cerulean_badge_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeruleanBadgeHouse_blk_start), + reinterpret_cast(&_binary_res_maps_CeruleanBadgeHouse_blk_size), + }, + .tileset = tileset_t::ship, + .width = 4, + .height = 4, + }, + [map_t::cerulean_cave_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeruleanCave1F_blk_start), + reinterpret_cast(&_binary_res_maps_CeruleanCave1F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 15, + .height = 9, + }, + [map_t::cerulean_cave_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeruleanCave2F_blk_start), + reinterpret_cast(&_binary_res_maps_CeruleanCave2F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 15, + .height = 9, + }, + [map_t::cerulean_cave_b1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeruleanCaveB1F_blk_start), + reinterpret_cast(&_binary_res_maps_CeruleanCaveB1F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 15, + .height = 9, + }, + [map_t::cerulean_city] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeruleanCity_blk_start), + reinterpret_cast(&_binary_res_maps_CeruleanCity_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 20, + .height = 18, + }, + [map_t::cerulean_gym] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeruleanGym_blk_start), + reinterpret_cast(&_binary_res_maps_CeruleanGym_blk_size), + }, + .tileset = tileset_t::gym, + .width = 5, + .height = 7, + }, + [map_t::cerulean_mart] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_VermilionMart_blk_start), + reinterpret_cast(&_binary_res_maps_VermilionMart_blk_size), + }, + .tileset = tileset_t::mart, + .width = 4, + .height = 4, + }, + [map_t::cerulean_pokecenter] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeruleanPokecenter_blk_start), + reinterpret_cast(&_binary_res_maps_CeruleanPokecenter_blk_size), + }, + .tileset = tileset_t::pokecenter, + .width = 7, + .height = 4, + }, + [map_t::cerulean_trade_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::cerulean_trashed_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CeruleanTrashedHouse_blk_start), + reinterpret_cast(&_binary_res_maps_CeruleanTrashedHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::champions_room] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ChampionsRoom_blk_start), + reinterpret_cast(&_binary_res_maps_ChampionsRoom_blk_size), + }, + .tileset = tileset_t::gym, + .width = 4, + .height = 4, + }, + [map_t::cinnabar_gym] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CinnabarGym_blk_start), + reinterpret_cast(&_binary_res_maps_CinnabarGym_blk_size), + }, + .tileset = tileset_t::facility, + .width = 10, + .height = 9, + }, + [map_t::cinnabar_island] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CinnabarIsland_blk_start), + reinterpret_cast(&_binary_res_maps_CinnabarIsland_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 9, + }, + [map_t::cinnabar_lab] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CinnabarLab_blk_start), + reinterpret_cast(&_binary_res_maps_CinnabarLab_blk_size), + }, + .tileset = tileset_t::lab, + .width = 9, + .height = 4, + }, + [map_t::cinnabar_lab_fossil_room] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CinnabarLabFossilRoom_blk_start), + reinterpret_cast(&_binary_res_maps_CinnabarLabFossilRoom_blk_size), + }, + .tileset = tileset_t::lab, + .width = 4, + .height = 4, + }, + [map_t::cinnabar_lab_metronome_room] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CinnabarLabMetronomeRoom_blk_start), + reinterpret_cast(&_binary_res_maps_CinnabarLabMetronomeRoom_blk_size), + }, + .tileset = tileset_t::lab, + .width = 4, + .height = 4, + }, + [map_t::cinnabar_lab_trade_room] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CinnabarLabTradeRoom_blk_start), + reinterpret_cast(&_binary_res_maps_CinnabarLabTradeRoom_blk_size), + }, + .tileset = tileset_t::lab, + .width = 4, + .height = 4, + }, + [map_t::cinnabar_mart] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PewterMart_blk_start), + reinterpret_cast(&_binary_res_maps_PewterMart_blk_size), + }, + .tileset = tileset_t::mart, + .width = 4, + .height = 4, + }, + [map_t::cinnabar_pokecenter] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_FuchsiaPokecenter_blk_start), + reinterpret_cast(&_binary_res_maps_FuchsiaPokecenter_blk_size), + }, + .tileset = tileset_t::pokecenter, + .width = 7, + .height = 4, + }, + [map_t::colosseum] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Colosseum_blk_start), + reinterpret_cast(&_binary_res_maps_Colosseum_blk_size), + }, + .tileset = tileset_t::club, + .width = 5, + .height = 4, + }, + [map_t::copycats_house_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_CopycatsHouse1F_blk_start), + reinterpret_cast(&_binary_res_maps_CopycatsHouse1F_blk_size), + }, + .tileset = tileset_t::reds_house_1, + .width = 4, + .height = 4, + }, + [map_t::copycats_house_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_RedsHouse2F_blk_start), + reinterpret_cast(&_binary_res_maps_RedsHouse2F_blk_size), + }, + .tileset = tileset_t::reds_house_2, + .width = 4, + .height = 4, + }, + [map_t::daycare] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Daycare_blk_start), + reinterpret_cast(&_binary_res_maps_Daycare_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::digletts_cave] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_DiglettsCave_blk_start), + reinterpret_cast(&_binary_res_maps_DiglettsCave_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 20, + .height = 18, + }, + [map_t::digletts_cave_route_11] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_DiglettsCaveRoute2_blk_start), + reinterpret_cast(&_binary_res_maps_DiglettsCaveRoute2_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 4, + .height = 4, + }, + [map_t::digletts_cave_route_2] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_DiglettsCaveRoute2_blk_start), + reinterpret_cast(&_binary_res_maps_DiglettsCaveRoute2_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 4, + .height = 4, + }, + [map_t::fighting_dojo] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_FightingDojo_blk_start), + reinterpret_cast(&_binary_res_maps_FightingDojo_blk_size), + }, + .tileset = tileset_t::dojo, + .width = 5, + .height = 6, + }, + [map_t::fuchsia_bills_grandpas_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_FuchsiaBillsGrandpasHouse_blk_start), + reinterpret_cast(&_binary_res_maps_FuchsiaBillsGrandpasHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::fuchsia_city] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_FuchsiaCity_blk_start), + reinterpret_cast(&_binary_res_maps_FuchsiaCity_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 20, + .height = 18, + }, + [map_t::fuchsia_good_rod_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_FuchsiaGoodRodHouse_blk_start), + reinterpret_cast(&_binary_res_maps_FuchsiaGoodRodHouse_blk_size), + }, + .tileset = tileset_t::ship, + .width = 4, + .height = 4, + }, + [map_t::fuchsia_gym] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_FuchsiaGym_blk_start), + reinterpret_cast(&_binary_res_maps_FuchsiaGym_blk_size), + }, + .tileset = tileset_t::gym, + .width = 5, + .height = 9, + }, + [map_t::fuchsia_mart] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_FuchsiaMart_blk_start), + reinterpret_cast(&_binary_res_maps_FuchsiaMart_blk_size), + }, + .tileset = tileset_t::mart, + .width = 4, + .height = 4, + }, + [map_t::fuchsia_meeting_room] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_FuchsiaMeetingRoom_blk_start), + reinterpret_cast(&_binary_res_maps_FuchsiaMeetingRoom_blk_size), + }, + .tileset = tileset_t::lab, + .width = 7, + .height = 4, + }, + [map_t::fuchsia_pokecenter] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_FuchsiaPokecenter_blk_start), + reinterpret_cast(&_binary_res_maps_FuchsiaPokecenter_blk_size), + }, + .tileset = tileset_t::pokecenter, + .width = 7, + .height = 4, + }, + [map_t::game_corner] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_GameCorner_blk_start), + reinterpret_cast(&_binary_res_maps_GameCorner_blk_size), + }, + .tileset = tileset_t::lobby, + .width = 10, + .height = 9, + }, + [map_t::game_corner_prize_room] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_GameCornerPrizeRoom_blk_start), + reinterpret_cast(&_binary_res_maps_GameCornerPrizeRoom_blk_size), + }, + .tileset = tileset_t::lobby, + .width = 5, + .height = 4, + }, + [map_t::hall_of_fame] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_HallOfFame_blk_start), + reinterpret_cast(&_binary_res_maps_HallOfFame_blk_size), + }, + .tileset = tileset_t::gym, + .width = 5, + .height = 4, + }, + [map_t::indigo_plateau] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_IndigoPlateau_blk_start), + reinterpret_cast(&_binary_res_maps_IndigoPlateau_blk_size), + }, + .tileset = tileset_t::plateau, + .width = 10, + .height = 9, + }, + [map_t::indigo_plateau_lobby] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_IndigoPlateauLobby_blk_start), + reinterpret_cast(&_binary_res_maps_IndigoPlateauLobby_blk_size), + }, + .tileset = tileset_t::mart, + .width = 8, + .height = 6, + }, + [map_t::lances_room] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_LancesRoom_blk_start), + reinterpret_cast(&_binary_res_maps_LancesRoom_blk_size), + }, + .tileset = tileset_t::dojo, + .width = 13, + .height = 13, + }, + [map_t::lavender_cubone_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::lavender_mart] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_VermilionMart_blk_start), + reinterpret_cast(&_binary_res_maps_VermilionMart_blk_size), + }, + .tileset = tileset_t::mart, + .width = 4, + .height = 4, + }, + [map_t::lavender_pokecenter] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PewterPokecenter_blk_start), + reinterpret_cast(&_binary_res_maps_PewterPokecenter_blk_size), + }, + .tileset = tileset_t::pokecenter, + .width = 7, + .height = 4, + }, + [map_t::lavender_town] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_LavenderTown_blk_start), + reinterpret_cast(&_binary_res_maps_LavenderTown_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 9, + }, + [map_t::loreleis_room] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_LoreleisRoom_blk_start), + reinterpret_cast(&_binary_res_maps_LoreleisRoom_blk_size), + }, + .tileset = tileset_t::gym, + .width = 5, + .height = 6, + }, + [map_t::mr_fujis_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::mr_psychics_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::mt_moon_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_MtMoon1F_blk_start), + reinterpret_cast(&_binary_res_maps_MtMoon1F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 20, + .height = 18, + }, + [map_t::mt_moon_b1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_MtMoonB1F_blk_start), + reinterpret_cast(&_binary_res_maps_MtMoonB1F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 14, + .height = 14, + }, + [map_t::mt_moon_b2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_MtMoonB2F_blk_start), + reinterpret_cast(&_binary_res_maps_MtMoonB2F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 20, + .height = 18, + }, + [map_t::mt_moon_pokecenter] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_MtMoonPokecenter_blk_start), + reinterpret_cast(&_binary_res_maps_MtMoonPokecenter_blk_size), + }, + .tileset = tileset_t::pokecenter, + .width = 7, + .height = 4, + }, + [map_t::museum_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Museum1F_blk_start), + reinterpret_cast(&_binary_res_maps_Museum1F_blk_size), + }, + .tileset = tileset_t::museum, + .width = 10, + .height = 4, + }, + [map_t::museum_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Museum2F_blk_start), + reinterpret_cast(&_binary_res_maps_Museum2F_blk_size), + }, + .tileset = tileset_t::museum, + .width = 7, + .height = 4, + }, + [map_t::name_raters_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::oaks_lab] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_OaksLab_blk_start), + reinterpret_cast(&_binary_res_maps_OaksLab_blk_size), + }, + .tileset = tileset_t::dojo, + .width = 5, + .height = 6, + }, [map_t::pallet_town] = { - // blocks is indirect via blocks_list .blocks = { reinterpret_cast(&_binary_res_maps_PalletTown_blk_start), reinterpret_cast(&_binary_res_maps_PalletTown_blk_size), @@ -60,5 +1492,1293 @@ const map_t maps[] = { .tileset = tileset_t::overworld, .width = 10, .height = 9, - } + }, + [map_t::pewter_city] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PewterCity_blk_start), + reinterpret_cast(&_binary_res_maps_PewterCity_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 20, + .height = 18, + }, + [map_t::pewter_gym] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PewterGym_blk_start), + reinterpret_cast(&_binary_res_maps_PewterGym_blk_size), + }, + .tileset = tileset_t::gym, + .width = 5, + .height = 7, + }, + [map_t::pewter_mart] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PewterMart_blk_start), + reinterpret_cast(&_binary_res_maps_PewterMart_blk_size), + }, + .tileset = tileset_t::mart, + .width = 4, + .height = 4, + }, + [map_t::pewter_nidoran_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::pewter_pokecenter] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PewterPokecenter_blk_start), + reinterpret_cast(&_binary_res_maps_PewterPokecenter_blk_size), + }, + .tileset = tileset_t::pokecenter, + .width = 7, + .height = 4, + }, + [map_t::pewter_speech_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::pokemon_fan_club] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PokemonFanClub_blk_start), + reinterpret_cast(&_binary_res_maps_PokemonFanClub_blk_size), + }, + .tileset = tileset_t::interior, + .width = 4, + .height = 4, + }, + [map_t::pokemon_mansion_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PokemonMansion1F_blk_start), + reinterpret_cast(&_binary_res_maps_PokemonMansion1F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 14, + }, + [map_t::pokemon_mansion_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PokemonMansion2F_blk_start), + reinterpret_cast(&_binary_res_maps_PokemonMansion2F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 14, + }, + [map_t::pokemon_mansion_3f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PokemonMansion3F_blk_start), + reinterpret_cast(&_binary_res_maps_PokemonMansion3F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 9, + }, + [map_t::pokemon_mansion_b1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PokemonMansionB1F_blk_start), + reinterpret_cast(&_binary_res_maps_PokemonMansionB1F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 14, + }, + [map_t::pokemon_tower_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PokemonTower1F_blk_start), + reinterpret_cast(&_binary_res_maps_PokemonTower1F_blk_size), + }, + .tileset = tileset_t::cemetery, + .width = 10, + .height = 9, + }, + [map_t::pokemon_tower_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PokemonTower2F_blk_start), + reinterpret_cast(&_binary_res_maps_PokemonTower2F_blk_size), + }, + .tileset = tileset_t::cemetery, + .width = 10, + .height = 9, + }, + [map_t::pokemon_tower_3f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PokemonTower3F_blk_start), + reinterpret_cast(&_binary_res_maps_PokemonTower3F_blk_size), + }, + .tileset = tileset_t::cemetery, + .width = 10, + .height = 9, + }, + [map_t::pokemon_tower_4f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PokemonTower4F_blk_start), + reinterpret_cast(&_binary_res_maps_PokemonTower4F_blk_size), + }, + .tileset = tileset_t::cemetery, + .width = 10, + .height = 9, + }, + [map_t::pokemon_tower_5f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PokemonTower5F_blk_start), + reinterpret_cast(&_binary_res_maps_PokemonTower5F_blk_size), + }, + .tileset = tileset_t::cemetery, + .width = 10, + .height = 9, + }, + [map_t::pokemon_tower_6f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PokemonTower6F_blk_start), + reinterpret_cast(&_binary_res_maps_PokemonTower6F_blk_size), + }, + .tileset = tileset_t::cemetery, + .width = 10, + .height = 9, + }, + [map_t::pokemon_tower_7f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PokemonTower7F_blk_start), + reinterpret_cast(&_binary_res_maps_PokemonTower7F_blk_size), + }, + .tileset = tileset_t::cemetery, + .width = 10, + .height = 9, + }, + [map_t::power_plant] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PowerPlant_blk_start), + reinterpret_cast(&_binary_res_maps_PowerPlant_blk_size), + }, + .tileset = tileset_t::facility, + .width = 20, + .height = 18, + }, + [map_t::reds_house_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_RedsHouse1F_blk_start), + reinterpret_cast(&_binary_res_maps_RedsHouse1F_blk_size), + }, + .tileset = tileset_t::reds_house_1, + .width = 4, + .height = 4, + }, + [map_t::reds_house_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_RedsHouse2F_blk_start), + reinterpret_cast(&_binary_res_maps_RedsHouse2F_blk_size), + }, + .tileset = tileset_t::reds_house_2, + .width = 4, + .height = 4, + }, + [map_t::rocket_hideout_b1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_RocketHideoutB1F_blk_start), + reinterpret_cast(&_binary_res_maps_RocketHideoutB1F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 14, + }, + [map_t::rocket_hideout_b2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_RocketHideoutB2F_blk_start), + reinterpret_cast(&_binary_res_maps_RocketHideoutB2F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 14, + }, + [map_t::rocket_hideout_b3f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_RocketHideoutB3F_blk_start), + reinterpret_cast(&_binary_res_maps_RocketHideoutB3F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 14, + }, + [map_t::rocket_hideout_b4f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_RocketHideoutB4F_blk_start), + reinterpret_cast(&_binary_res_maps_RocketHideoutB4F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 12, + }, + [map_t::rocket_hideout_elevator] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_RocketHideoutElevator_blk_start), + reinterpret_cast(&_binary_res_maps_RocketHideoutElevator_blk_size), + }, + .tileset = tileset_t::lobby, + .width = 3, + .height = 4, + }, + [map_t::rock_tunnel_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_RockTunnel1F_blk_start), + reinterpret_cast(&_binary_res_maps_RockTunnel1F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 20, + .height = 18, + }, + [map_t::rock_tunnel_b1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_RockTunnelB1F_blk_start), + reinterpret_cast(&_binary_res_maps_RockTunnelB1F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 20, + .height = 18, + }, + [map_t::rock_tunnel_pokecenter] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_MtMoonPokecenter_blk_start), + reinterpret_cast(&_binary_res_maps_MtMoonPokecenter_blk_size), + }, + .tileset = tileset_t::pokecenter, + .width = 7, + .height = 4, + }, + [map_t::route_1] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route1_blk_start), + reinterpret_cast(&_binary_res_maps_Route1_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 18, + }, + [map_t::route_10] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route10_blk_start), + reinterpret_cast(&_binary_res_maps_Route10_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 36, + }, + [map_t::route_11] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route11_blk_start), + reinterpret_cast(&_binary_res_maps_Route11_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 30, + .height = 9, + }, + [map_t::route_11_gate_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route11Gate1F_blk_start), + reinterpret_cast(&_binary_res_maps_Route11Gate1F_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 5, + }, + [map_t::route_11_gate_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route11Gate2F_blk_start), + reinterpret_cast(&_binary_res_maps_Route11Gate2F_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::route_12] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route12_blk_start), + reinterpret_cast(&_binary_res_maps_Route12_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 54, + }, + [map_t::route_12_gate_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route12Gate1F_blk_start), + reinterpret_cast(&_binary_res_maps_Route12Gate1F_blk_size), + }, + .tileset = tileset_t::gate, + .width = 5, + .height = 4, + }, + [map_t::route_12_gate_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route11Gate2F_blk_start), + reinterpret_cast(&_binary_res_maps_Route11Gate2F_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::route_12_super_rod_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Daycare_blk_start), + reinterpret_cast(&_binary_res_maps_Daycare_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::route_13] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route13_blk_start), + reinterpret_cast(&_binary_res_maps_Route13_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 30, + .height = 9, + }, + [map_t::route_14] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route14_blk_start), + reinterpret_cast(&_binary_res_maps_Route14_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 27, + }, + [map_t::route_15] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route15_blk_start), + reinterpret_cast(&_binary_res_maps_Route15_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 30, + .height = 9, + }, + [map_t::route_15_gate_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route11Gate1F_blk_start), + reinterpret_cast(&_binary_res_maps_Route11Gate1F_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 5, + }, + [map_t::route_15_gate_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route11Gate2F_blk_start), + reinterpret_cast(&_binary_res_maps_Route11Gate2F_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::route_16] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route16_blk_start), + reinterpret_cast(&_binary_res_maps_Route16_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 20, + .height = 9, + }, + [map_t::route_16_fly_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::route_16_gate_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route16Gate1F_blk_start), + reinterpret_cast(&_binary_res_maps_Route16Gate1F_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 7, + }, + [map_t::route_16_gate_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route11Gate2F_blk_start), + reinterpret_cast(&_binary_res_maps_Route11Gate2F_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::route_17] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route17_blk_start), + reinterpret_cast(&_binary_res_maps_Route17_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 72, + }, + [map_t::route_18] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route18_blk_start), + reinterpret_cast(&_binary_res_maps_Route18_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 25, + .height = 9, + }, + [map_t::route_18_gate_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route11Gate1F_blk_start), + reinterpret_cast(&_binary_res_maps_Route11Gate1F_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 5, + }, + [map_t::route_18_gate_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route11Gate2F_blk_start), + reinterpret_cast(&_binary_res_maps_Route11Gate2F_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::route_19] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route19_blk_start), + reinterpret_cast(&_binary_res_maps_Route19_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 27, + }, + [map_t::route_2] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route2_blk_start), + reinterpret_cast(&_binary_res_maps_Route2_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 36, + }, + [map_t::route_20] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route20_blk_start), + reinterpret_cast(&_binary_res_maps_Route20_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 50, + .height = 9, + }, + [map_t::route_21] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route21_blk_start), + reinterpret_cast(&_binary_res_maps_Route21_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 45, + }, + [map_t::route_22] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route22_blk_start), + reinterpret_cast(&_binary_res_maps_Route22_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 20, + .height = 9, + }, + [map_t::route_22_gate] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route22Gate_blk_start), + reinterpret_cast(&_binary_res_maps_Route22Gate_blk_size), + }, + .tileset = tileset_t::gate, + .width = 5, + .height = 4, + }, + [map_t::route_23] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route23_blk_start), + reinterpret_cast(&_binary_res_maps_Route23_blk_size), + }, + .tileset = tileset_t::plateau, + .width = 10, + .height = 72, + }, + [map_t::route_24] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route24_blk_start), + reinterpret_cast(&_binary_res_maps_Route24_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 18, + }, + [map_t::route_25] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route25_blk_start), + reinterpret_cast(&_binary_res_maps_Route25_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 30, + .height = 9, + }, + [map_t::route_2_gate] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianForestNorthGate_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianForestNorthGate_blk_size), + }, + .tileset = tileset_t::gate, + .width = 5, + .height = 4, + }, + [map_t::route_2_trade_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::route_3] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route3_blk_start), + reinterpret_cast(&_binary_res_maps_Route3_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 35, + .height = 9, + }, + [map_t::route_4] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route4_blk_start), + reinterpret_cast(&_binary_res_maps_Route4_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 45, + .height = 9, + }, + [map_t::route_5] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route5_blk_start), + reinterpret_cast(&_binary_res_maps_Route5_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 18, + }, + [map_t::route_5_gate] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route5Gate_blk_start), + reinterpret_cast(&_binary_res_maps_Route5Gate_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 3, + }, + [map_t::route_6] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route6_blk_start), + reinterpret_cast(&_binary_res_maps_Route6_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 18, + }, + [map_t::route_6_gate] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route6Gate_blk_start), + reinterpret_cast(&_binary_res_maps_Route6Gate_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 3, + }, + [map_t::route_7] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route7_blk_start), + reinterpret_cast(&_binary_res_maps_Route7_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 10, + .height = 9, + }, + [map_t::route_7_gate] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route7Gate_blk_start), + reinterpret_cast(&_binary_res_maps_Route7Gate_blk_size), + }, + .tileset = tileset_t::gate, + .width = 3, + .height = 4, + }, + [map_t::route_8] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route8_blk_start), + reinterpret_cast(&_binary_res_maps_Route8_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 30, + .height = 9, + }, + [map_t::route_8_gate] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route8Gate_blk_start), + reinterpret_cast(&_binary_res_maps_Route8Gate_blk_size), + }, + .tileset = tileset_t::gate, + .width = 3, + .height = 4, + }, + [map_t::route_9] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Route9_blk_start), + reinterpret_cast(&_binary_res_maps_Route9_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 30, + .height = 9, + }, + [map_t::safari_zone_center] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SafariZoneCenter_blk_start), + reinterpret_cast(&_binary_res_maps_SafariZoneCenter_blk_size), + }, + .tileset = tileset_t::forest, + .width = 15, + .height = 13, + }, + [map_t::safari_zone_center_rest_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SafariZoneCenterRestHouse_blk_start), + reinterpret_cast(&_binary_res_maps_SafariZoneCenterRestHouse_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::safari_zone_east] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SafariZoneEast_blk_start), + reinterpret_cast(&_binary_res_maps_SafariZoneEast_blk_size), + }, + .tileset = tileset_t::forest, + .width = 15, + .height = 13, + }, + [map_t::safari_zone_east_rest_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SafariZoneCenterRestHouse_blk_start), + reinterpret_cast(&_binary_res_maps_SafariZoneCenterRestHouse_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::safari_zone_gate] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SafariZoneGate_blk_start), + reinterpret_cast(&_binary_res_maps_SafariZoneGate_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 3, + }, + [map_t::safari_zone_north] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SafariZoneNorth_blk_start), + reinterpret_cast(&_binary_res_maps_SafariZoneNorth_blk_size), + }, + .tileset = tileset_t::forest, + .width = 20, + .height = 18, + }, + [map_t::safari_zone_north_rest_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SafariZoneCenterRestHouse_blk_start), + reinterpret_cast(&_binary_res_maps_SafariZoneCenterRestHouse_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::safari_zone_secret_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SafariZoneSecretHouse_blk_start), + reinterpret_cast(&_binary_res_maps_SafariZoneSecretHouse_blk_size), + }, + .tileset = tileset_t::lab, + .width = 4, + .height = 4, + }, + [map_t::safari_zone_west] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SafariZoneWest_blk_start), + reinterpret_cast(&_binary_res_maps_SafariZoneWest_blk_size), + }, + .tileset = tileset_t::forest, + .width = 15, + .height = 13, + }, + [map_t::safari_zone_west_rest_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SafariZoneCenterRestHouse_blk_start), + reinterpret_cast(&_binary_res_maps_SafariZoneCenterRestHouse_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::saffron_city] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SaffronCity_blk_start), + reinterpret_cast(&_binary_res_maps_SaffronCity_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 20, + .height = 18, + }, + [map_t::saffron_gym] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SaffronGym_blk_start), + reinterpret_cast(&_binary_res_maps_SaffronGym_blk_size), + }, + .tileset = tileset_t::facility, + .width = 10, + .height = 9, + }, + [map_t::saffron_mart] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_VermilionMart_blk_start), + reinterpret_cast(&_binary_res_maps_VermilionMart_blk_size), + }, + .tileset = tileset_t::mart, + .width = 4, + .height = 4, + }, + [map_t::saffron_pidgey_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::saffron_pokecenter] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PewterPokecenter_blk_start), + reinterpret_cast(&_binary_res_maps_PewterPokecenter_blk_size), + }, + .tileset = tileset_t::pokecenter, + .width = 7, + .height = 4, + }, + [map_t::seafoam_islands_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SeafoamIslands1F_blk_start), + reinterpret_cast(&_binary_res_maps_SeafoamIslands1F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 15, + .height = 9, + }, + [map_t::seafoam_islands_b1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SeafoamIslandsB1F_blk_start), + reinterpret_cast(&_binary_res_maps_SeafoamIslandsB1F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 15, + .height = 9, + }, + [map_t::seafoam_islands_b2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SeafoamIslandsB2F_blk_start), + reinterpret_cast(&_binary_res_maps_SeafoamIslandsB2F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 15, + .height = 9, + }, + [map_t::seafoam_islands_b3f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SeafoamIslandsB3F_blk_start), + reinterpret_cast(&_binary_res_maps_SeafoamIslandsB3F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 15, + .height = 9, + }, + [map_t::seafoam_islands_b4f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SeafoamIslandsB4F_blk_start), + reinterpret_cast(&_binary_res_maps_SeafoamIslandsB4F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 15, + .height = 9, + }, + [map_t::silph_co_10f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SilphCo10F_blk_start), + reinterpret_cast(&_binary_res_maps_SilphCo10F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 8, + .height = 9, + }, + [map_t::silph_co_11f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SilphCo11F_blk_start), + reinterpret_cast(&_binary_res_maps_SilphCo11F_blk_size), + }, + .tileset = tileset_t::interior, + .width = 9, + .height = 9, + }, + [map_t::silph_co_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SilphCo1F_blk_start), + reinterpret_cast(&_binary_res_maps_SilphCo1F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 9, + }, + [map_t::silph_co_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SilphCo2F_blk_start), + reinterpret_cast(&_binary_res_maps_SilphCo2F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 9, + }, + [map_t::silph_co_3f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SilphCo3F_blk_start), + reinterpret_cast(&_binary_res_maps_SilphCo3F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 9, + }, + [map_t::silph_co_4f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SilphCo4F_blk_start), + reinterpret_cast(&_binary_res_maps_SilphCo4F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 9, + }, + [map_t::silph_co_5f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SilphCo5F_blk_start), + reinterpret_cast(&_binary_res_maps_SilphCo5F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 15, + .height = 9, + }, + [map_t::silph_co_6f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SilphCo6F_blk_start), + reinterpret_cast(&_binary_res_maps_SilphCo6F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 13, + .height = 9, + }, + [map_t::silph_co_7f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SilphCo7F_blk_start), + reinterpret_cast(&_binary_res_maps_SilphCo7F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 13, + .height = 9, + }, + [map_t::silph_co_8f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SilphCo8F_blk_start), + reinterpret_cast(&_binary_res_maps_SilphCo8F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 13, + .height = 9, + }, + [map_t::silph_co_9f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SilphCo9F_blk_start), + reinterpret_cast(&_binary_res_maps_SilphCo9F_blk_size), + }, + .tileset = tileset_t::facility, + .width = 13, + .height = 9, + }, + [map_t::silph_co_elevator] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SilphCoElevator_blk_start), + reinterpret_cast(&_binary_res_maps_SilphCoElevator_blk_size), + }, + .tileset = tileset_t::lobby, + .width = 2, + .height = 2, + }, + [map_t::ss_anne_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SSAnne1F_blk_start), + reinterpret_cast(&_binary_res_maps_SSAnne1F_blk_size), + }, + .tileset = tileset_t::ship, + .width = 20, + .height = 9, + }, + [map_t::ss_anne_1f_rooms] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SSAnne1FRooms_blk_start), + reinterpret_cast(&_binary_res_maps_SSAnne1FRooms_blk_size), + }, + .tileset = tileset_t::ship, + .width = 12, + .height = 8, + }, + [map_t::ss_anne_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SSAnne2F_blk_start), + reinterpret_cast(&_binary_res_maps_SSAnne2F_blk_size), + }, + .tileset = tileset_t::ship, + .width = 20, + .height = 9, + }, + [map_t::ss_anne_2f_rooms] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SSAnne2FRooms_blk_start), + reinterpret_cast(&_binary_res_maps_SSAnne2FRooms_blk_size), + }, + .tileset = tileset_t::ship, + .width = 12, + .height = 8, + }, + [map_t::ss_anne_3f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SSAnne3F_blk_start), + reinterpret_cast(&_binary_res_maps_SSAnne3F_blk_size), + }, + .tileset = tileset_t::ship, + .width = 10, + .height = 3, + }, + [map_t::ss_anne_b1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SSAnneB1F_blk_start), + reinterpret_cast(&_binary_res_maps_SSAnneB1F_blk_size), + }, + .tileset = tileset_t::ship, + .width = 15, + .height = 4, + }, + [map_t::ss_anne_b1f_rooms] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SSAnne2FRooms_blk_start), + reinterpret_cast(&_binary_res_maps_SSAnne2FRooms_blk_size), + }, + .tileset = tileset_t::ship, + .width = 12, + .height = 8, + }, + [map_t::ss_anne_bow] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SSAnneBow_blk_start), + reinterpret_cast(&_binary_res_maps_SSAnneBow_blk_size), + }, + .tileset = tileset_t::ship, + .width = 10, + .height = 7, + }, + [map_t::ss_anne_captains_room] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SSAnneCaptainsRoom_blk_start), + reinterpret_cast(&_binary_res_maps_SSAnneCaptainsRoom_blk_size), + }, + .tileset = tileset_t::ship, + .width = 3, + .height = 4, + }, + [map_t::ss_anne_kitchen] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_SSAnneKitchen_blk_start), + reinterpret_cast(&_binary_res_maps_SSAnneKitchen_blk_size), + }, + .tileset = tileset_t::ship, + .width = 7, + .height = 8, + }, + [map_t::trade_center] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_TradeCenter_blk_start), + reinterpret_cast(&_binary_res_maps_TradeCenter_blk_size), + }, + .tileset = tileset_t::club, + .width = 5, + .height = 4, + }, + [map_t::underground_path_north_south] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_UndergroundPathNorthSouth_blk_start), + reinterpret_cast(&_binary_res_maps_UndergroundPathNorthSouth_blk_size), + }, + .tileset = tileset_t::underground, + .width = 4, + .height = 24, + }, + [map_t::underground_path_route_5] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_UndergroundPathRoute5_blk_start), + reinterpret_cast(&_binary_res_maps_UndergroundPathRoute5_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::underground_path_route_6] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_UndergroundPathRoute5_blk_start), + reinterpret_cast(&_binary_res_maps_UndergroundPathRoute5_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::underground_path_route_7] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_UndergroundPathRoute5_blk_start), + reinterpret_cast(&_binary_res_maps_UndergroundPathRoute5_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::underground_path_route_8] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_UndergroundPathRoute8_blk_start), + reinterpret_cast(&_binary_res_maps_UndergroundPathRoute8_blk_size), + }, + .tileset = tileset_t::gate, + .width = 4, + .height = 4, + }, + [map_t::underground_path_west_east] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_UndergroundPathWestEast_blk_start), + reinterpret_cast(&_binary_res_maps_UndergroundPathWestEast_blk_size), + }, + .tileset = tileset_t::underground, + .width = 25, + .height = 4, + }, + [map_t::vermilion_city] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_VermilionCity_blk_start), + reinterpret_cast(&_binary_res_maps_VermilionCity_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 20, + .height = 18, + }, + [map_t::vermilion_dock] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_VermilionDock_blk_start), + reinterpret_cast(&_binary_res_maps_VermilionDock_blk_size), + }, + .tileset = tileset_t::ship_port, + .width = 14, + .height = 6, + }, + [map_t::vermilion_gym] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_VermilionGym_blk_start), + reinterpret_cast(&_binary_res_maps_VermilionGym_blk_size), + }, + .tileset = tileset_t::gym, + .width = 5, + .height = 9, + }, + [map_t::vermilion_mart] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_VermilionMart_blk_start), + reinterpret_cast(&_binary_res_maps_VermilionMart_blk_size), + }, + .tileset = tileset_t::mart, + .width = 4, + .height = 4, + }, + [map_t::vermilion_old_rod_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_Daycare_blk_start), + reinterpret_cast(&_binary_res_maps_Daycare_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::vermilion_pidgey_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::vermilion_pokecenter] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_PewterPokecenter_blk_start), + reinterpret_cast(&_binary_res_maps_PewterPokecenter_blk_size), + }, + .tileset = tileset_t::pokecenter, + .width = 7, + .height = 4, + }, + [map_t::vermilion_trade_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_VermilionTradeHouse_blk_start), + reinterpret_cast(&_binary_res_maps_VermilionTradeHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::victory_road_1f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_VictoryRoad1F_blk_start), + reinterpret_cast(&_binary_res_maps_VictoryRoad1F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 10, + .height = 9, + }, + [map_t::victory_road_2f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_VictoryRoad2F_blk_start), + reinterpret_cast(&_binary_res_maps_VictoryRoad2F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 15, + .height = 9, + }, + [map_t::victory_road_3f] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_VictoryRoad3F_blk_start), + reinterpret_cast(&_binary_res_maps_VictoryRoad3F_blk_size), + }, + .tileset = tileset_t::cavern, + .width = 15, + .height = 9, + }, + [map_t::viridian_city] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianCity_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianCity_blk_size), + }, + .tileset = tileset_t::overworld, + .width = 20, + .height = 18, + }, + [map_t::viridian_forest] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianForest_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianForest_blk_size), + }, + .tileset = tileset_t::forest, + .width = 17, + .height = 24, + }, + [map_t::viridian_forest_north_gate] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianForestNorthGate_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianForestNorthGate_blk_size), + }, + .tileset = tileset_t::forest_gate, + .width = 5, + .height = 4, + }, + [map_t::viridian_forest_south_gate] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianForestNorthGate_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianForestNorthGate_blk_size), + }, + .tileset = tileset_t::forest_gate, + .width = 5, + .height = 4, + }, + [map_t::viridian_gym] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianGym_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianGym_blk_size), + }, + .tileset = tileset_t::gym, + .width = 10, + .height = 9, + }, + [map_t::viridian_mart] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianMart_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianMart_blk_size), + }, + .tileset = tileset_t::mart, + .width = 4, + .height = 4, + }, + [map_t::viridian_nickname_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianNicknameHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::viridian_pokecenter] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianPokecenter_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianPokecenter_blk_size), + }, + .tileset = tileset_t::pokecenter, + .width = 7, + .height = 4, + }, + [map_t::viridian_school_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_ViridianSchoolHouse_blk_start), + reinterpret_cast(&_binary_res_maps_ViridianSchoolHouse_blk_size), + }, + .tileset = tileset_t::house, + .width = 4, + .height = 4, + }, + [map_t::wardens_house] = { + .blocks = { + reinterpret_cast(&_binary_res_maps_WardensHouse_blk_start), + reinterpret_cast(&_binary_res_maps_WardensHouse_blk_size), + }, + .tileset = tileset_t::lab, + .width = 5, + .height = 4, + }, }; + diff --git a/tools/generate/__main__.py b/tools/generate/__main__.py index 1f836af..b5c67a0 100644 --- a/tools/generate/__main__.py +++ b/tools/generate/__main__.py @@ -1,22 +1,178 @@ +from pathlib import Path from pprint import pprint +import io from parse import parse +def sorted_map_headers(): + # hack to remove unused/duplicate underground_path_route_7 + map_headers = sorted(parse.map_headers, key=lambda m: m.name2) + return filter(lambda m: m.name1 != "UndergroundPathRoute7Copy", map_headers) + +def includes(): + for map_header in sorted_map_headers(): + block_path = parse.maps_blocks_list[map_header.blocks()] + yield f'#include "res/{block_path}.h"' + for tileset_name in sorted(parse.tileset_constants_list): + tileset_index = parse.tileset_constants_list[tileset_name] + tileset_header = parse.tileset_headers_list[tileset_index] + + blockset_path = parse.gfx_tilesets_list[tileset_header.blockset()] + gfx_path = parse.gfx_tilesets_list[tileset_header.gfx()] + + yield f'#include "res/{blockset_path}.h"' + yield f'#include "res/{gfx_path}.h"' + yield "" + +def struct_start_size_t(): + return [ + "struct start_size_t {", + "uint8_t const * const start;", + "uint32_t size;", + "};", + ] + +def struct_tileset_t(): + tileset_names = ( + f"{name.lower()}," + for name in sorted(parse.tileset_constants_list) + ) + return [ + "struct tileset_t {", + "start_size_t blockset;", + "start_size_t tileset;", + "", + "enum tileset {", + *tileset_names, + "};", + "};", + ] + +def struct_map_t(): + map_names = ( + f"{map_header.name2.lower()}," + for map_header in sorted_map_headers() + ) + return [ + "struct map_t {", + "start_size_t blocks;", + "enum tileset_t::tileset tileset;", + "uint32_t width;", + "uint32_t height;", + "", + "enum map {", + *map_names, + "};", + "};", + ] + +def binary_res(path, suffix): + # _binary_res_gfx_blocksets_overworld_bst_start + name = path.replace('/', '_').replace('.', '_') + return f"_binary_res_{name}_{suffix}" + +def start_size_value(path): + start = binary_res(path, "start") + size = binary_res(path, "size") + + return [ + f"reinterpret_cast(&{start}),", + f"reinterpret_cast(&{size}),", + ] + +def blockset_tileset(name: str): + tileset_index = parse.tileset_constants_list[name] + tileset_header = parse.tileset_headers_list[tileset_index] + + blockset_path = parse.gfx_tilesets_list[tileset_header.blockset()] + gfx_path = parse.gfx_tilesets_list[tileset_header.gfx()] + + return [ + f"[tileset_t::{name.lower()}] = {{", + ".blockset = {", + *start_size_value(blockset_path), + "},", + ".tileset = {", + *start_size_value(gfx_path), + "}", + "}," + ] + +def tilesets(): + yield "const tileset_t tilesets[] = {" + for tileset in sorted(parse.tileset_constants_list): + yield from blockset_tileset(tileset) + yield "};" + +def map(map_header): + block_path = parse.maps_blocks_list[map_header.blocks()] + map_constant = parse.map_constants_list[map_header.name2] + return [ + f"[map_t::{map_header.name2.lower()}] = {{", + ".blocks = {", + *start_size_value(block_path), + "},", + f".tileset = tileset_t::{map_header.tileset.lower()},", + f".width = {map_constant.width},", + f".height = {map_constant.height},", + "},", + ] + +def maps(): + yield "const map_t maps[] = {" + for map_header in sorted_map_headers(): + yield from map(map_header) + yield "};" + +def _render(out, lines): + indent = " " + level = 0 + for l in lines: + if l and l[0] == "}": + level -= 2 + assert level >= 0, out.getvalue() + + out.write(indent * level + l + "\n") + + if l and l[-1] == "{": + level += 2 + + if level == 0 and l and l[-1] == ";": + out.write("\n") + return out + +def renderer(): + out = io.StringIO() + def render(lines): + return _render(out, lines) + return render, out + def generate(): - pprint(parse.maps_blocks_list) + #pprint(parse.maps_blocks_list) #pprint(parse.map_headers) #pprint(parse.tileset_constants_list) #pprint(parse.tileset_headers_list) #pprint(parse.gfx_tilesets_list) + render, out = renderer() + + render(includes()) + render(struct_start_size_t()) + render(struct_tileset_t()) + render(struct_map_t()) + render(tilesets()) + render(maps()) + + print(out.getvalue(), end='') generate() """ map_headers[0].tileset == 'OVERWORLD' -map_headers[0].width() == 'PALLET_TOWN_WIDTH' -map_headers[0].height() == 'PALLET_TOWN_HEIGHT' +map_headers[0].name1 = 'PalletTown' +map_headers[0].name2 = 'PALLET_TOWN' map_headers[0].blocks() == 'PalletTown_Blocks' -maps_blocks['PalletTown_Blocks'] == 'maps/PalletTown.blk' +map_constants_list['PALLET_TOWN'] == MapConstant(10, 19) +maps_blocks_list['PalletTown_Blocks'] == 'maps/PalletTown.blk' tileset_constants_list['OVERWORLD'] == 0 tileset_headers_list[0].name == 'Overworld' tileset_headers_list[0].blockset() == 'Overworld_Block' diff --git a/tools/parse/map_constants.py b/tools/parse/map_constants.py index f6ab57a..57dab0d 100644 --- a/tools/parse/map_constants.py +++ b/tools/parse/map_constants.py @@ -12,7 +12,6 @@ def tokenize_lines(lines): @dataclass class MapConstant: - name: str width: int height: int @@ -20,8 +19,7 @@ def flatten(tokens): for macro, args in tokens: if macro == 'map_const': name, width, height = args - yield MapConstant( - name, + yield name, MapConstant( int(width), int(height) ) @@ -30,4 +28,7 @@ def parse(prefix): path = prefix / "constants/map_constants.asm" with open(path) as f: tokens = tokenize_lines(f.read().split("\n")) - return list(flatten(tokens)) + l = list(flatten(tokens)) + d = dict(l) + assert len(l) == len(d) + return d