diff options
63 files changed, 9070 insertions, 1172 deletions
diff --git a/audio/engine.asm b/audio/engine.asm index 8d66a08..e4f3a2f 100644 --- a/audio/engine.asm +++ b/audio/engine.asm @@ -502,7 +502,7 @@ FadeMusic: ; 3a:43ce ld [wVolume], a ret -SECTION "Audio engine, part 2", ROMX[$4CEE],BANK[$3A] ; TODO: disassemble what's above (gulp) and remove this +SECTION "Audio engine, part 2", ROMX[$4CEE], BANK[$3A] ; TODO: disassemble what's above (gulp) and remove this SetGlobalTempo: ; 3a:4cee push bc diff --git a/charmap.asm b/charmap.asm index 575a8eb..be20a37 100644 --- a/charmap.asm +++ b/charmap.asm @@ -101,7 +101,7 @@ charmap "<RIVAL>", $53 ; wRivalName charmap "#", $54 ; "POKé" charmap "<CONT>", $55 - charmap "<……>", $56 ; "……" + charmap "<⋯⋯>", $56 ; "⋯⋯" charmap "<DONE>", $57 charmap "<PROMPT>", $58 charmap "<TARGET>", $59 @@ -140,7 +140,7 @@ charmap "『", $72 charmap "』", $73 charmap "・", $74 - charmap "…", $75 + charmap "⋯", $75 charmap "ぁ", $76 charmap "ぇ", $77 diff --git a/constants.asm b/constants.asm index c559622..1046662 100644 --- a/constants.asm +++ b/constants.asm @@ -24,6 +24,8 @@ INCLUDE "constants/landmark_constants.asm" INCLUDE "constants/map_constants.asm" INCLUDE "constants/map_setup_constants.asm" INCLUDE "constants/tileset_constants.asm" +INCLUDE "constants/collision_constants.asm" +INCLUDE "constants/metatile_constants.asm" INCLUDE "constants/map_data_constants.asm" INCLUDE "constants/script_constants.asm" @@ -36,3 +38,5 @@ INCLUDE "constants/menu_constants.asm" INCLUDE "constants/wram_constants.asm" INCLUDE "constants/sgb_constants.asm" INCLUDE "constants/map_object_constants.asm" +INCLUDE "constants/main_menu_constants.asm" +INCLUDE "constants/movement_constants.asm" diff --git a/constants/collision_constants.asm b/constants/collision_constants.asm new file mode 100644 index 0000000..ebe3856 --- /dev/null +++ b/constants/collision_constants.asm @@ -0,0 +1,132 @@ +; collision IDs are built like this: +; 76543210 +; \__/|\_/ +; | | \-- SubType +; | \---- Flag +; \------ Type +; +; What exactly flag means or if it +; means anything is up to Type. +; Old Types: +; ??? +; New Types: +; 0 - Regular 8 - ??? +; 1 - Trees, Grass etc. 9 - Special Talk Action +; 2 - Water A - Jump Action +; 3 - Water 2 B - unused +; 4 - Land C - unused +; 5 - Land 2 D - unused +; 6 - ??? E - unused +; 7 - Warps F - unused + +COLLISION_TYPE_MASK EQU $f0 +COLLISION_SUBTYPE_MASK EQU $07 +COLLISION_WATER_SUBTYPE_MASK EQU $03 + +COLLISION_FLAG EQU $08 + +; old collision constants + +OLD_COLLISION_TYPE_REGULAR EQU $00 +OLD_COLLISION_TYPE_SCENERY EQU $10 +OLD_COLLISION_TYPE_WATER EQU $20 +OLD_COLLISION_TYPE_WATER2 EQU $40 + +OLD_COLLISION_WALKABLE EQU $00 +OLD_COLLISION_SOLID EQU $01 +OLD_COLLISION_FLOOR EQU $03 +OLD_COLLISION_WALL EQU $04 + +OLD_COLLISION_LEDGE EQU $11 + +OLD_COLLISION_WATER2_S EQU $40 + +OLD_COLLISION_ROCK EQU $51 + +OLD_COLLISION_CARPED EQU $60 +OLD_COLLISION_DOOR EQU $61 + +OLD_COLLISION_SIGNPOST EQU $70 +OLD_COLLISION_SHOP_SIGN EQU $71 +OLD_COLLISION_MART_ITEM EQU $72 +OLD_COLLISION_COUNTER EQU $73 + +OLD_COLLISION_CUT_TREE EQU $80 +OLD_COLLISION_GRASS EQU $82 + +; new collision constants + +COLLISION_TYPE_REGULAR EQU $00 +COLLISION_TYPE_SCENERY EQU $10 +COLLISION_TYPE_WATER EQU $20 +COLLISION_TYPE_WATER2 EQU $30 +COLLISION_TYPE_LAND EQU $40 +COLLISION_TYPE_LAND2 EQU $50 +COLLISION_TYPE_UNK EQU $60 +COLLISION_TYPE_WARPS EQU $70 +COLLISION_TYPE_UNKN2 EQU $80 +COLLISION_TYPE_SPECIAL EQU $90 +COLLISION_TYPE_JUMP EQU $A0 + +COLLISION_WALKABLE EQU $00 +COLLISION_SOLID EQU $07 +COLLISION_CUT_TREE EQU $12 +COLLISION_GRASS EQU $18 + +; water collisions + +COLLISION_WATER EQU $21 +COLLISION_WATERFALL EQU $22 +COLLISION_WATER_SOLID EQU $27 + +; water collisions 2 +COLLISION_WATER2_E EQU $30 +COLLISION_WATER2_W EQU $31 +COLLISION_WATER2_N EQU $32 +COLLISION_WATER2_S EQU $33 +; $34..$37 will behave like COLLISION_WATER2_E..COLLISION_WATER2_S + +; land collisions +COLLISION_LAND_SLOW EQU $40 +COLLISION_LAND_E EQU $41 +COLLISION_LAND_W EQU $42 +COLLISION_LAND_N EQU $43 +COLLISION_LAND_S EQU $44 +; $45..$47 will behave like COLLISION_LAND_E + +; land collisions 2 +COLLISION_LAND2_E EQU $50 +COLLISION_LAND2_W EQU $51 +COLLISION_LAND2_N EQU $52 +COLLISION_LAND2_S EQU $53 +; $54..$57 will behave like COLLISION_LAND2_E + + +; warp collisions +COLLISION_CARPET EQU $70 +COLLISION_DOOR EQU $71 +COLLISION_STEPS EQU $72 + +; special collisions +COLLISION_COUNTER EQU $90 +COLLISION_BOOKCASE EQU $91 +COLLISION_PC EQU $93 +COLLISION_RADIO EQU $94 +COLLISION_SIGNPOST EQU $95 +COLLISION_STRAIGHT_SIGNPOST EQU $97 + +; jump collisions +; perform jump in marked direction, else +; regular walking +COLLISION_JUMP_E EQU $a0 +COLLISION_JUMP_W EQU $a1 +COLLISION_JUMP_N EQU $a2 +COLLISION_JUMP_S EQU $a3 +COLLISION_JUMP_SE EQU $a4 +COLLISION_JUMP_SW EQU $a5 +COLLISION_JUMP_NE EQU $a6 +COLLISION_JUMP_NW EQU $a7 + +NEVER_SOLID EQU 0 +SOMETIMES_SOLID EQU 1 +ALWAYS_SOLID EQU 15 diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm index 536f4a4..52f74e5 100644 --- a/constants/gfx_constants.asm +++ b/constants/gfx_constants.asm @@ -35,6 +35,7 @@ HP_YELLOW EQU 1 HP_RED EQU 2 SPRITEBUFFERSIZE EQU 7*7 * 8 ; 7 * 7 (tiles) * 8 (bytes per tile) +DOUBLESPRITEBUFFERSIZE EQU 2*SPRITEBUFFERSIZE ; sprite_oam_struct members (see macros/wram.asm) const_def diff --git a/constants/landmark_constants.asm b/constants/landmark_constants.asm index b7a7542..56a7b02 100644 --- a/constants/landmark_constants.asm +++ b/constants/landmark_constants.asm @@ -1,47 +1,45 @@ const_def - const LANDMARK_NONE ; 00 - const LANDMARK_SILENT ; 01 - const LANDMARK_OLD ; 02 - const LANDMARK_WEST ; 03 - const LANDMARK_HIGH_TECH ; 04 - const LANDMARK_FOUNT ; 05 - const LANDMARK_BIRDON ; 06 - const LANDMARK_NEW_TYPE ; 07 - const LANDMARK_SUGAR ; 08 - const LANDMARK_BLUE_FOREST ; 09 - const LANDMARK_STAND ; 0a - const LANDMARK_KANTO ; 0b - const LANDMARK_PRINCE ; 0c - const LANDMARK_MT_FUJI ; 0d - const LANDMARK_SOUTH ; 0e - const LANDMARK_NORTH ; 0f - const LANDMARK_ROUTE_15 ; 10 - const LANDMARK_ROUTE_18 ; 11 - const LANDMARK_POWER_PLANT_1 ; 12 - const LANDMARK_POWER_PLANT_2 ; 13 - const LANDMARK_POWER_PLANT_3 ; 14 - const LANDMARK_POWER_PLANT_4 ; 15 - const LANDMARK_RUINS_1 ; 16 - const LANDMARK_RUINS_2 ; 17 - const LANDMARK_MINES_1 ; 18 - const LANDMARK_MINES_2 ; 19 - const LANDMARK_MINES_3 ; 1a - const LANDMARK_MINES_4 ; 1b - const LANDMARK_MINES_5 ; 1c - const LANDMARK_MINES_6 ; 1d - const LANDMARK_MINES_7 ; 1e - const LANDMARK_HIDEOUT_1 ; 1f - const LANDMARK_HIDEOUT_2 ; 20 - const LANDMARK_HIDEOUT_3 ; 21 - const LANDMARK_SLOWPOKE_WELL_1 ; 22 - const LANDMARK_SLOWPOKE_WELL_2 ; 23 - const LANDMARK_POKEMON_LEAGUE_1 ; 24 - const LANDMARK_POKEMON_LEAGUE_1_2 ; 25 - const LANDMARK_POKEMON_LEAGUE_2 ; 26 - const LANDMARK_POKEMON_LEAGUE_3 ; 27 - const LANDMARK_POKEMON_LEAGUE_4 ; 28 - const LANDMARK_POKEMON_LEAGUE_5 ; 29 - const LANDMARK_POKEMON_LEAGUE_6 ; 2a - const LANDMARK_POKEMON_LEAGUE_7 ; 2b - const LANDMARK_POKEMON_LEAGUE_7_2 ; 2c - const LANDMARK_SILENT_HILL ; 2d + const LANDMARK_NONE ; 00 + const LANDMARK_NORTH ; 01 + const LANDMARK_BULL_FOREST_ROUTE_3 ; 02 + const LANDMARK_BULL_FOREST ; 03 + const LANDMARK_BULL_FOREST_ROUTE_2 ; 04 + const LANDMARK_STAND ; 05 + const LANDMARK_STAND_ROUTE ; 06 + const LANDMARK_KANTO_EAST_ROUTE ; 07 + const LANDMARK_KANTO ; 08 + const LANDMARK_ROUTE_SILENT_EAST ; 09 + const LANDMARK_SILENT_HILL ; 0a + const LANDMARK_PRINCE ; 0b + const LANDMARK_MT_FUJI ; 0c + const LANDMARK_ROUTE_1_P1 ; 0d + const LANDMARK_ROUTE_1_P2 ; 0e + const LANDMARK_OLD_CITY ; 0f + const LANDMARK_ROUTE_2 ; 10 + const LANDMARK_WEST ; 11 + const LANDMARK_BAADON_ROUTE_1 ; 12 + const LANDMARK_BAADON ; 13 + const LANDMARK_BAADON_ROUTE_2 ; 14 + const LANDMARK_BAADON_ROUTE_3 ; 15 + const LANDMARK_ROUTE_15 ; 16 + const LANDMARK_NEWTYPE ; 17 + const LANDMARK_SUGAR_ROUTE ; 18 + const LANDMARK_SUGAR ; 19 + const LANDMARK_NEWTYPE_ROUTE ; 1a + const LANDMARK_ROUTE_18 ; 1b + const LANDMARK_BULL_FOREST_ROUTE_1 ; 1c + const LANDMARK_1C ; 1d + const LANDMARK_1D ; 1e + const LANDMARK_FONTO_ROUTE_3 ; 1f + const LANDMARK_FONTO ; 20 + const LANDMARK_FONTO_ROUTE_2 ; 21 + const LANDMARK_FONTO_ROUTE_6 ; 22 + const LANDMARK_FONTO_ROUTE_5 ; 23 + const LANDMARK_SOUTH ; 24 + const LANDMARK_FONTO_ROUTE_1 ; 25 + const LANDMARK_HAITEKU_WEST_ROUTE_OCEAN ; 26 + const LANDMARK_HAITEKU_WEST_ROUTE ; 27 + const LANDMARK_HAITEKU ; 28 + const LANDMARK_WASTE_BRIDGE ; 29 + const LANDMARK_FONTO_ROUTE_4 ; 2a + const LANDMARK_FONTO_BRIDGE ; 2b diff --git a/constants/main_menu_constants.asm b/constants/main_menu_constants.asm new file mode 100644 index 0000000..033e396 --- /dev/null +++ b/constants/main_menu_constants.asm @@ -0,0 +1,12 @@ + const_def + const M_NEW_GAME + const M_CONTINUE + const M_PLAY_GAME + const M_SET_TIME + + const_def + const CONTINUE + const NEW_GAME + const OPTION + const PLAY_POKEMON + const SET_TIME
\ No newline at end of file diff --git a/constants/map_constants.asm b/constants/map_constants.asm index d5e130e..828b01a 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -1,231 +1,293 @@ -; Map IDs +newgroup: MACRO +const_value = const_value + 1 + enum_start 1 +ENDM + +map_const: MACRO +;\1: map id +;\2: width: in blocks +;\3: height: in blocks +GROUP_\1 EQU const_value + enum MAP_\1 +\1_WIDTH EQU \2 +\1_HEIGHT EQU \3 +ENDM +; Map IDs const_def - const ROUTE_1_P1 - const ROUTE_1_P2 - const ROUTE_SILENT_EAST - const SILENT_HILL - const ROUTE_1_GATE_1F - const ROUTE_1_GATE_2F - const ROUTE_SILENT_EAST_GATE - const PLAYER_HOUSE_1F - const PLAYER_HOUSE_2F - const SILENT_POKECENTER - const SILENT_HILL_HOUSE - const SILENT_HILL_LAB - const SILENT_HILL_LAB_2 - const UNUSED_13 - const SHIZUKANA_OKA - const ROUTE_2 - const OLD_CITY - const ROUTE_2_GATE_1F - const ROUTE_2_GATE_2F - const ROUTE_2_HOUSE - const OLD_CITY_MUSEUM - const OLD_CITY_GYM - const OLD_CITY_TOWER_1F - const OLD_CITY_TOWER_2F - const OLD_CITY_TOWER_3F - const OLD_CITY_TOWER_4F - const OLD_CITY_TOWER_5F - const OLD_CITY_BILLS_HOUSE - const OLD_CITY_MART - const OLD_CITY_HOUSE - const OLD_CITY_POKECENTER_1F - const OLD_CITY_POKECENTER_2F - const OLD_CITY_POKECENTER_TRADE - const OLD_CITY_POKECENTER_BATTLE - const OLD_CITY_POKECENTER_TIME_MACHINE - const OLD_CITY_KURTS_HOUSE - const OLD_CITY_SCHOOL - const WEST - const WEST_MART_1F - const WEST_MART_2F - const WEST_MART_3F - const WEST_MART_4F - const WEST_MART_5F - const WEST_MART_6F - const WEST_MART_ELEVATOR - const WEST_RADIO_TOWER_1F - const WEST_RADIO_TOWER_2F - const WEST_RADIO_TOWER_3F - const WEST_RADIO_TOWER_4F - const WEST_RADIO_TOWER_5F - const WEST_ROCKET_RAIDED_HOUSE - const WEST_POKECENTER_1F - const WEST_POKECENTER_2F - const WEST_GYM - const WEST_HOUSE_1 - const WEST_HOUSE_2 - const HAITEKU_WEST_ROUTE - const HAITEKU_WEST_ROUTE_OCEAN - const HAITEKU - const HAITEKU_WEST_ROUTE_GATE - const HAITEKU_POKECENTER_1F - const HAITEKU_POKECENTER_2F - const HAITEKU_LEAGUE_1F - const HAITEKU_LEAGUE_2F - const HAITEKU_MART - const HAITEKU_HOUSE_1 - const HAITEKU_HOUSE_2 - const HAITEKU_IMPOSTER_OAK_HOUSE - const HAITEKU_AQUARIUM_1F - const HAITEKU_AQUARIUM_2F - const FONTO_ROUTE_1 - const FONTO_ROUTE_2 - const FONTO_ROUTE_3 - const FONTO_ROUTE_4 - const FONTO_ROUTE_5 - const FONTO_ROUTE_6 - const FONTO - const FONTO_ROUTE_GATE_1 - const FONTO_ROUTE_GATE_2 - const FONTO_ROUTE_GATE_3 - const FONTO_ROCKET_HOUSE - const FONTO_MART - const FONTO_HOUSE - const FONTO_POKECENTER_1F - const FONTO_POKECENTER_2F - const FONTO_LAB - const BAADON_ROUTE_1 - const BAADON_ROUTE_2 - const BAADON_ROUTE_3 - const BAADON - const BAADON_ROUTE_GATE_WEST - const BAADON_ROUTE_GATE_NEWTYPE - const BAADON_MART - const BAADON_POKECENTER_1F - const BAADON_POKECENTER_2F - const BAADON_HOUSE_1 - const BAADON_WALLPAPER_HOUSE - const BAADON_HOUSE_2 - const BAADON_LEAGUE_1F - const BAADON_LEAGUE_2F - const ROUTE_15 - const NEWTYPE_ROUTE - const ROUTE_18 - const NEWTYPE - const ROUTE_15_POKECENTER_1F - const ROUTE_15_POKECENTER_2F - const NEWTYPE_ROUTE_GATE - const ROUTE_18_POKECENTER_1F - const ROUTE_18_POKECENTER_2F - const NEWTYPE_POKECENTER_1F - const NEWTYPE_POKECENTER_2F - const NEWTYPE_LEAGUE_1F - const NEWTYPE_LEAGUE_2F - const NEWTYPE_SAILOR_HOUSE - const NEWTYPE_MART - const NEWTYPE_DOJO - const NEWTYPE_HOUSE_1 - const NEWTYPE_DINER - const NEWTYPE_HOUSE_2 - const NEWTYPE_HOUSE_3 - const SUGAR_ROUTE - const SUGAR - const SUGAR_ROUTE_GATE - const SUGAR_HOUSE - const SUGAR_HOUSE_2 - const SUGAR_MART - const SUGAR_POKECENTER_1F - const SUGAR_POKECENTER_2F - const BULL_FOREST_ROUTE_1 - const BULL_FOREST_ROUTE_2 - const BULL_FOREST_ROUTE_3 - const BULL_FOREST - const BULL_FOREST_ROUTE_1_HOUSE - const BULL_FOREST_ROUTE_GATE_STAND - const BULL_MART - const BULL_HOUSE_1 - const BULL_HOUSE_2 - const BULL_HOUSE_3 - const BULL_POKECENTER_1F - const BULL_POKECENTER_2F - const BULL_LEAGUE_1F - const BULL_LEAGUE_2F - const BULL_HOUSE_4 - const STAND_ROUTE - const STAND - const STAND_ROUTE_GATE_KANTO - const STAND_LAB - const STAND_POKECENTER_1F - const STAND_POKECENTER_2F - const STAND_OFFICE - const STAND_MART - const STAND_HOUSE - const STAND_ROCKET_HOUSE_1F - const STAND_ROCKET_HOUSE_2F - const STAND_LEAGUE_1F - const STAND_LEAGUE_2F - const KANTO_EAST_ROUTE - const KANTO - const KANTO_CERULEAN_HOUSE - const KANTO_POKECENTER_1F - const KANTO_POKECENTER_2F - const KANTO_LEAGUE_1F - const KANTO_LEAGUE_2F - const KANTO_LAVENDER_HOUSE - const KANTO_CELADON_MART_1F - const KANTO_CELADON_MART_2F - const KANTO_CELADON_MART_3F - const KANTO_CELADON_MART_4F - const KANTO_CELADON_MART_5F - const KANTO_CELADON_ELEVATOR - const KANTO_MART - const KANTO_GAMEFREAK_HQ_1 - const KANTO_GAMEFREAK_HQ_2 - const KANTO_GAMEFREAK_HQ_3 - const KANTO_GAMEFREAK_HQ_4 - const KANTO_GAMEFREAK_HQ_5 - const KANTO_SILPH_CO - const KANTO_VIRIDIAN_HOUSE - const KANTO_GAME_CORNER - const KANTO_UNUSED_AREA - const KANTO_GAME_CORNER_PRIZES - const KANTO_DINER - const KANTO_SCHOOL - const KANTO_HOSPITAL - const KANTO_POKECENTER_2_1F - const KANTO_POKECENTER_2_2F - const KANTO_REDS_HOUSE - const KANTO_GREENS_HOUSE_1F - const KANTO_GREENS_HOUSE_2F - const KANTO_ELDERS_HOUSE - const KANTO_OAKS_LAB - const KANTO_LEAGUE_2_1F - const KANTO_LEAGUE_2_2F - const KANTO_FISHING_GURU - const PRINCE_ROUTE - const PRINCE - const MT_FUJI_ROUTE - const MT_FUJI - const SOUTH - const SOUTH_HOUSE_1 - const SOUTH_POKECENTER_1F - const SOUTH_POKECENTER_2F - const SOUTH_MART - const SOUTH_HOUSE_2 - const NORTH - const NORTH_HOUSE_1 - const NORTH_MART - const NORTH_HOUSE_2 - const NORTH_POKECENTER_1F - const NORTH_POKECENTER_2F - const POWER_PLANT_1 - const POWER_PLANT_2 - const POWER_PLANT_3 - const POWER_PLANT_4 - const RUINS_OF_ALPH_ENTRANCE - const RUINS_OF_ALPH_MAIN - const CAVE_MINECARTS_1 - const CAVE_MINECARTS_2 - const CAVE_MINECARTS_3 - const CAVE_MINECARTS_4 - const CAVE_MINECARTS_5 - const CAVE_MINECARTS_6 - const CAVE_MINECARTS_7 - const OFFICE_1 - const OFFICE_2 - const OFFICE_3 - const SLOWPOKE_WELL_ENTRANCE - const SLOWPOKE_WELL_MAIN + + newgroup ; 1 + + map_const ROUTE_1_P1, 15, 9 ; 1 + map_const ROUTE_1_P2, 10, 18 ; 2 + map_const ROUTE_SILENT_EAST, 30, 9 ; 3 + map_const SILENT_HILL, 10, 9 ; 4 + map_const ROUTE_1_GATE_1F, 5, 4 ; 5 + map_const ROUTE_1_GATE_2F, 4, 3 ; 6 + map_const ROUTE_SILENT_EAST_GATE, 5, 4 ; 7 + map_const PLAYER_HOUSE_1F, 5, 4 ; 8 + map_const PLAYER_HOUSE_2F, 5, 4 ; 9 + map_const SILENT_POKECENTER, 8, 4 ; 10 + map_const SILENT_HILL_HOUSE, 5, 4 ; 11 + map_const SILENT_HILL_LAB, 4, 8 ; 12 + map_const SILENT_HILL_LAB_2, 4, 4 ; 13 + map_const UNUSED_13, 4, 4 ; 14 + map_const SHIZUKANA_OKA, 25, 18 ; 15 + + newgroup ; 2 + + map_const ROUTE_2, 15, 9 ; 1 + map_const OLD_CITY, 20, 18 ; 2 + map_const ROUTE_2_GATE_1F, 5, 4 ; 3 + map_const ROUTE_2_GATE_2F, 4, 3 ; 4 + map_const ROUTE_2_HOUSE, 4, 4 ; 5 + map_const OLD_CITY_MUSEUM, 8, 4 ; 6 + map_const OLD_CITY_GYM, 5, 9 ; 7 + map_const OLD_CITY_TOWER_1F, 4, 4 ; 8 + map_const OLD_CITY_TOWER_2F, 4, 4 ; 9 + map_const OLD_CITY_TOWER_3F, 4, 4 ; 10 + map_const OLD_CITY_TOWER_4F, 4, 4 ; 11 + map_const OLD_CITY_TOWER_5F, 3, 3 ; 12 + map_const OLD_CITY_BILLS_HOUSE, 4, 4 ; 13 + map_const OLD_CITY_MART, 6, 4 ; 14 + map_const OLD_CITY_HOUSE, 4, 4 ; 15 + map_const OLD_CITY_POKECENTER_1F, 8, 4 ; 16 + map_const OLD_CITY_POKECENTER_2F, 8, 4 ; 17 + map_const OLD_CITY_POKECENTER_TRADE, 5, 4 ; 18 + map_const OLD_CITY_POKECENTER_BATTLE, 5, 4 ; 19 + map_const OLD_CITY_POKECENTER_TIME_MACHINE, 8, 4 ; 20 + map_const OLD_CITY_KURTS_HOUSE, 8, 4 ; 21 + map_const OLD_CITY_SCHOOL, 4, 8 ; 22 + + newgroup ; 3 + + map_const WEST, 20, 18 ; 1 + map_const WEST_MART_1F, 8, 4 ; 2 + map_const WEST_MART_2F, 8, 4 ; 3 + map_const WEST_MART_3F, 8, 4 ; 4 + map_const WEST_MART_4F, 8, 4 ; 5 + map_const WEST_MART_5F, 8, 4 ; 6 + map_const WEST_MART_6F, 8, 4 ; 7 + map_const WEST_MART_ELEVATOR, 2, 2 ; 8 + map_const WEST_RADIO_TOWER_1F, 4, 4 ; 9 + map_const WEST_RADIO_TOWER_2F, 4, 4 ; 10 + map_const WEST_RADIO_TOWER_3F, 4, 4 ; 11 + map_const WEST_RADIO_TOWER_4F, 4, 4 ; 12 + map_const WEST_RADIO_TOWER_5F, 4, 4 ; 13 + map_const WEST_ROCKET_RAIDED_HOUSE, 5, 4 ; 14 + map_const WEST_POKECENTER_1F, 8, 4 ; 15 + map_const WEST_POKECENTER_2F, 8, 4 ; 16 + map_const WEST_GYM, 5, 9 ; 17 + map_const WEST_HOUSE_1, 5, 4 ; 18 + map_const WEST_HOUSE_2, 5, 4 ; 19 + + newgroup ; 4 + + map_const HAITEKU_WEST_ROUTE, 25, 9 ; 1 + map_const HAITEKU_WEST_ROUTE_OCEAN, 10, 27 ; 2 + map_const HAITEKU, 20, 18 ; 3 + map_const HAITEKU_WEST_ROUTE_GATE, 5, 4 ; 4 + map_const HAITEKU_POKECENTER_1F, 8, 4 ; 5 + map_const HAITEKU_POKECENTER_2F, 8, 4 ; 6 + map_const HAITEKU_LEAGUE_1F, 4, 8 ; 7 + map_const HAITEKU_LEAGUE_2F, 5, 9 ; 8 + map_const HAITEKU_MART, 6, 4 ; 9 + map_const HAITEKU_HOUSE_1, 5, 4 ; 10 + map_const HAITEKU_HOUSE_2, 5, 4 ; 11 + map_const HAITEKU_IMPOSTER_OAK_HOUSE, 5, 4 ; 12 + map_const HAITEKU_AQUARIUM_1F, 8, 4 ; 13 + map_const HAITEKU_AQUARIUM_2F, 8, 4 ; 14 + + newgroup + + map_const FONTO_ROUTE_1, 35, 9 + map_const FONTO_ROUTE_2, 10, 18 + map_const FONTO_ROUTE_3, 25, 9 + map_const FONTO_ROUTE_4, 10, 18 + map_const FONTO_ROUTE_5, 10, 18 + map_const FONTO_ROUTE_6, 35, 9 + map_const FONTO, 10, 9 + map_const FONTO_ROUTE_GATE_1, 5, 4 + map_const FONTO_ROUTE_GATE_2, 5, 4 + map_const FONTO_ROUTE_GATE_3, 5, 4 + map_const FONTO_ROCKET_HOUSE, 8, 4 + map_const FONTO_MART, 8, 4 + map_const FONTO_HOUSE, 5, 4 + map_const FONTO_POKECENTER_1F, 8, 4 + map_const FONTO_POKECENTER_2F, 8, 4 + map_const FONTO_LAB, 5, 4 + + newgroup + + map_const BAADON_ROUTE_1, 10, 27 + map_const BAADON_ROUTE_2, 50, 9 + map_const BAADON_ROUTE_3, 10, 18 + map_const BAADON, 10, 9 + map_const BAADON_ROUTE_GATE_WEST, 5, 4 + map_const BAADON_ROUTE_GATE_NEWTYPE, 5, 4 + map_const BAADON_MART, 8, 4 + map_const BAADON_POKECENTER_1F, 8, 4 + map_const BAADON_POKECENTER_2F, 8, 4 + map_const BAADON_HOUSE_1, 4, 4 + map_const BAADON_WALLPAPER_HOUSE, 4, 4 + map_const BAADON_HOUSE_2, 5, 4 + map_const BAADON_LEAGUE_1F, 4, 8 + map_const BAADON_LEAGUE_2F, 5, 9 + + newgroup + + map_const ROUTE_15, 15, 9 + map_const NEWTYPE_ROUTE, 15, 9 + map_const ROUTE_18, 10, 45 + map_const NEWTYPE, 20, 18 + map_const ROUTE_15_POKECENTER_1F, 8, 4 + map_const ROUTE_15_POKECENTER_2F, 8, 4 + map_const NEWTYPE_ROUTE_GATE, 5, 4 + map_const ROUTE_18_POKECENTER_1F, 8, 4 + map_const ROUTE_18_POKECENTER_2F, 8, 4 + map_const NEWTYPE_POKECENTER_1F, 8, 4 + map_const NEWTYPE_POKECENTER_2F, 8, 4 + map_const NEWTYPE_LEAGUE_1F, 4, 8 + map_const NEWTYPE_LEAGUE_2F, 5, 9 + map_const NEWTYPE_SAILOR_HOUSE, 5, 4 + map_const NEWTYPE_MART, 8, 4 + map_const NEWTYPE_DOJO, 4, 8 + map_const NEWTYPE_HOUSE_1, 5, 4 + map_const NEWTYPE_DINER, 4, 4 + map_const NEWTYPE_HOUSE_2, 5, 4 + map_const NEWTYPE_HOUSE_3, 5, 4 + + newgroup + + map_const SUGAR_ROUTE, 10, 27 + map_const SUGAR, 10, 9 + map_const SUGAR_ROUTE_GATE, 5, 4 + map_const SUGAR_HOUSE, 4, 8 + map_const SUGAR_HOUSE_2, 4, 4 + map_const SUGAR_MART, 8, 4 + map_const SUGAR_POKECENTER_1F, 8, 4 + map_const SUGAR_POKECENTER_2F, 8, 4 + + newgroup + + map_const BULL_FOREST_ROUTE_1, 25, 9 + map_const BULL_FOREST_ROUTE_2, 10, 27 + map_const BULL_FOREST_ROUTE_3, 10, 27 + map_const BULL_FOREST, 20, 18 + map_const BULL_FOREST_ROUTE_1_HOUSE, 5, 4 + map_const BULL_FOREST_ROUTE_GATE_STAND, 5, 4 + map_const BULL_MART, 8, 4 + map_const BULL_HOUSE_1, 4, 4 + map_const BULL_HOUSE_2, 5, 4 + map_const BULL_HOUSE_3, 5, 4 + map_const BULL_POKECENTER_1F, 8, 4 + map_const BULL_POKECENTER_2F, 8, 4 + map_const BULL_LEAGUE_1F, 4, 8 + map_const BULL_LEAGUE_2F, 5, 9 + map_const BULL_HOUSE_4, 5, 4 + + newgroup + + map_const STAND_ROUTE, 10, 27 + map_const STAND, 20, 18 + map_const STAND_ROUTE_GATE_KANTO, 5, 4 + map_const STAND_LAB, 4, 4 + map_const STAND_POKECENTER_1F, 8, 4 + map_const STAND_POKECENTER_2F, 8, 4 + map_const STAND_OFFICE, 8, 4 + map_const STAND_MART, 8, 4 + map_const STAND_HOUSE, 5, 4 + map_const STAND_ROCKET_HOUSE_1F, 8, 4 + map_const STAND_ROCKET_HOUSE_2F, 8, 4 + map_const STAND_LEAGUE_1F, 4, 8 + map_const STAND_LEAGUE_2F, 5, 9 + + newgroup + + map_const KANTO_EAST_ROUTE, 20, 9 + map_const KANTO, 30, 27 + map_const KANTO_CERULEAN_HOUSE, 5, 4 + map_const KANTO_POKECENTER_1F, 8, 4 + map_const KANTO_POKECENTER_2F, 8, 4 + map_const KANTO_LEAGUE_1F, 4, 8 + map_const KANTO_LEAGUE_2F, 5, 9 + map_const KANTO_LAVENDER_HOUSE, 5, 4 + map_const KANTO_CELADON_MART_1F, 8, 4 + map_const KANTO_CELADON_MART_2F, 8, 4 + map_const KANTO_CELADON_MART_3F, 8, 4 + map_const KANTO_CELADON_MART_4F, 8, 4 + map_const KANTO_CELADON_MART_5F, 8, 4 + map_const KANTO_CELADON_ELEVATOR, 2, 2 + map_const KANTO_MART, 8, 4 + map_const KANTO_GAMEFREAK_HQ_1, 4, 6 + map_const KANTO_GAMEFREAK_HQ_2, 4, 6 + map_const KANTO_GAMEFREAK_HQ_3, 4, 6 + map_const KANTO_GAMEFREAK_HQ_4, 4, 6 + map_const KANTO_GAMEFREAK_HQ_5, 4, 4 + map_const KANTO_SILPH_CO, 12, 8 + map_const KANTO_VIRIDIAN_HOUSE, 5, 4 + map_const KANTO_GAME_CORNER, 10, 7 + map_const KANTO_UNUSED_AREA, 4, 4 + map_const KANTO_GAME_CORNER_PRIZES, 5, 4 + map_const KANTO_DINER, 5, 4 + map_const KANTO_SCHOOL, 4, 8 + map_const KANTO_HOSPITAL, 8, 4 + map_const KANTO_POKECENTER_2_1F, 8, 4 + map_const KANTO_POKECENTER_2_2F, 8, 4 + map_const KANTO_REDS_HOUSE, 5, 4 + map_const KANTO_GREENS_HOUSE_1F, 4, 4 + map_const KANTO_GREENS_HOUSE_2F, 4, 4 + map_const KANTO_ELDERS_HOUSE, 5, 4 + map_const KANTO_OAKS_LAB, 4, 4 + map_const KANTO_LEAGUE_2_1F, 4, 8 + map_const KANTO_LEAGUE_2_2F, 5, 9 + map_const KANTO_FISHING_GURU, 5, 4 + + newgroup + + map_const PRINCE_ROUTE, 10, 5 + map_const PRINCE, 10, 9 + + newgroup + + map_const MT_FUJI_ROUTE, 10, 5 + map_const MT_FUJI, 10, 9 + + newgroup + + map_const SOUTH, 20, 18 + map_const SOUTH_HOUSE_1, 5, 4 + map_const SOUTH_POKECENTER_1F, 8, 4 + map_const SOUTH_POKECENTER_2F, 8, 4 + map_const SOUTH_MART, 8, 4 + map_const SOUTH_HOUSE_2, 5, 4 + + newgroup + + map_const NORTH, 10, 9 + map_const NORTH_HOUSE_1, 5, 4 + map_const NORTH_MART, 6, 4 + map_const NORTH_HOUSE_2, 5, 4 + map_const NORTH_POKECENTER_1F, 8, 4 + map_const NORTH_POKECENTER_2F, 8, 4 + + newgroup + + map_const POWER_PLANT_1, 10, 9 + map_const POWER_PLANT_2, 10, 9 + map_const POWER_PLANT_3, 15, 18 + map_const POWER_PLANT_4, 15, 18 + map_const RUINS_OF_ALPH_ENTRANCE, 10, 9 + map_const RUINS_OF_ALPH_MAIN, 25, 27 + map_const CAVE_MINECARTS_1, 20, 18 + map_const CAVE_MINECARTS_2, 20, 18 + map_const CAVE_MINECARTS_3, 20, 18 + map_const CAVE_MINECARTS_4, 20, 18 + map_const CAVE_MINECARTS_5, 20, 18 + map_const CAVE_MINECARTS_6, 10, 18 + map_const CAVE_MINECARTS_7, 10, 18 + map_const OFFICE_1, 10, 9 + map_const OFFICE_2, 15, 18 + map_const OFFICE_3, 10, 18 + map_const SLOWPOKE_WELL_ENTRANCE, 10, 9 + map_const SLOWPOKE_WELL_MAIN, 10, 18 diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm index e711e1d..8a60442 100644 --- a/constants/map_data_constants.asm +++ b/constants/map_data_constants.asm @@ -8,11 +8,25 @@ const GATE const DUNGEON +; connection directions (see data/maps/data.asm) + const_def + const EAST_F + const WEST_F + const SOUTH_F + const NORTH_F + +; wMapConnections + const_def + shift_const EAST + shift_const WEST + shift_const SOUTH + shift_const NORTH + ; SpawnPoints indexes (see data/maps/spawn_points.asm) const_value = -1 const SPAWN_N_A - + NUM_SPAWNS EQU 18 - + ; size of each spawn point data -SPAWN_POINT_SIZE EQU 4
\ No newline at end of file +SPAWN_POINT_SIZE EQU 4 diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm index c9bce93..81c52a3 100644 --- a/constants/map_object_constants.asm +++ b/constants/map_object_constants.asm @@ -70,3 +70,7 @@ MAPOBJECTTEMPLATE_SCRIPT_POINTER rb 1 ; 9 MAPOBJECTTEMPLATE_POINTER_HI rb 1 ; a MAPOBJECTTEMPLATE_EVENT_FLAG rw 1 ; b MAP_OBJECT_TEMPLATE_LENGTH SET _RS + +PLAYER_OBJECT_INDEX EQU 1 +COMPANION_OBJECT_INDEX EQU 2 +NUM_OBJECT_STRUCTS EQU 10 diff --git a/constants/metatile_constants.asm b/constants/metatile_constants.asm new file mode 100644 index 0000000..88d54ab --- /dev/null +++ b/constants/metatile_constants.asm @@ -0,0 +1,31 @@ +; all outside tileset share certain metatiles +; this is used in overworld code when editing the map +; D - dirt +; L - lawn +; T - small tree +; C - cut tree +; G - grass +METATILE_GROUND EQU $01 ; DD + ; DD +METATILE_LAWN EQU $04 ; LL + ; LL +METATILE_SMALL_TREES_N EQU $25 ; TT + ; LL +METATILE_SMALL_TREES_W EQU $28 ; TL + ; TL +METATILE_SMALL_TREES_E EQU $2a ; LT + ; LT +METATILE_CUT_SE_TREES_N EQU $30 ; TT + ; LC +METATILE_CUT_NW_TREES_E EQU $31 ; CT + ; LT +METATILE_CUT_NE_TREE_NW EQU $32 ; TC + ; LL +METATILE_CUT_NE_TREE_SE EQU $33 ; LC + ; LT +METATILE_SMALL_TREE_NW EQU $34 ; TL + ; LL +METATILE_SMALL_TREE_SE EQU $35 ; TL + ; LL +METATILE_GRASS EQU $3b ; GG + ; GG diff --git a/constants/movement_constants.asm b/constants/movement_constants.asm new file mode 100644 index 0000000..6347318 --- /dev/null +++ b/constants/movement_constants.asm @@ -0,0 +1,44 @@ + const_def + const FACE_DOWN ; $00 + const FACE_UP ; $01 + const FACE_LEFT ; $02 + const FACE_RIGHT ; $03 + const SLOW_STEP_DOWN ; $04 + const SLOW_STEP_UP ; $05 + const SLOW_STEP_LEFT ; $06 + const SLOW_STEP_RIGHT ; $07 + const STEP_DOWN ; $08 + const STEP_UP ; $09 + const STEP_LEFT ; $0a + const STEP_RIGHT ; $0b + const FAST_STEP_DOWN ; $0c + const FAST_STEP_UP ; $0d + const FAST_STEP_LEFT ; $0e + const FAST_STEP_RIGHT ; $0f + const FAST_STEP_DOWN2 ; $10 + const FAST_STEP_UP2 ; $11 + const FAST_STEP_LEFT2 ; $12 + const FAST_STEP_RIGHT2 ; $13 + const SLOW_JUMP_DOWN ; $14 + const SLOW_JUMP_UP ; $15 + const SLOW_JUMP_LEFT ; $16 + const SLOW_JUMP_RIGHT ; $17 + const JUMP_DOWN ; $18 + const JUMP_UP ; $19 + const JUMP_LEFT ; $1a + const JUMP_RIGHT ; $1b + const FAST_JUMP_DOWN ; $1c + const FAST_JUMP_UP ; $1d + const FAST_JUMP_LEFT ; $1e + const FAST_JUMP_RIGHT ; $1f + const FAST_JUMP_DOWN2 ; $20 + const FAST_JUMP_UP2 ; $21 + const FAST_JUMP_LEFT2 ; $22 + const FAST_JUMP_RIGHT2 ; $23 + const MOVEMENT_24 ; $24 + const MOVEMENT_25 ; $25 + const MOVEMENT_26 ; $26 + const MOVEMENT_27 ; $27 + const MOVEMENT_28 ; $28 + const MOVEMENT_29 ; $29 + const NO_MOVEMENT ; $2a diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm index 50b5d84..c53866b 100644 --- a/constants/sprite_constants.asm +++ b/constants/sprite_constants.asm @@ -91,3 +91,5 @@ const SPRITE_59 ; 59 duplicate SPRITE_OLD_LINK_RECEPTIONIST const SPRITE_EGG ; 5a const SPRITE_BOULDER ; 5b + +SPRITE_TILE_SIZE EQU 64 diff --git a/constants/text_constants.asm b/constants/text_constants.asm index f899ea3..e487d4c 100644 --- a/constants/text_constants.asm +++ b/constants/text_constants.asm @@ -1,6 +1,6 @@ ; name lengths NAME_LENGTH EQU 11 ; English -PLAYER_NAME_LENGTH EQU 8 ; English +PLAYER_NAME_LENGTH EQU 6 ; Japanese BOX_NAME_LENGTH EQU 9 ; English MON_NAME_LENGTH EQU 6 MOVE_NAME_LENGTH EQU 13 ; English diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm index c530a8b..8fc2c59 100644 --- a/constants/wram_constants.asm +++ b/constants/wram_constants.asm @@ -21,3 +21,9 @@ PLAYER_BIKE EQU 1 PLAYER_SKATE EQU 2 PLAYER_SURF EQU 4 PLAYER_SURF_PIKA EQU 8 + +; wDebugFlags:: ; ce63 + const_def + const DEBUG_BATTLE_F + const DEBUG_FIELD_F + const CONTINUED_F diff --git a/data/collision/collision_type_table.asm b/data/collision/collision_type_table.asm new file mode 100644 index 0000000..df3dc33 --- /dev/null +++ b/data/collision/collision_type_table.asm @@ -0,0 +1,69 @@ +INCLUDE "constants.asm" + +SECTION "Collision Type Table", ROMX[$4664], BANK[$03] + +CollisionTypeTable: ; 03:4664 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $00 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, ALWAYS_SOLID ; $04 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $08 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, ALWAYS_SOLID ; $0C + db NEVER_SOLID, NEVER_SOLID, SOMETIMES_SOLID, NEVER_SOLID ; $10 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $14 + db NEVER_SOLID, NEVER_SOLID, SOMETIMES_SOLID, NEVER_SOLID ; $18 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $1C + db SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID ; $20 + db SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID, ALWAYS_SOLID ; $24 + db SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID ; $28 + db SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID, ALWAYS_SOLID ; $30 + db SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID ; $34 + db SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID ; $38 + db SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID ; $3C + db SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID, SOMETIMES_SOLID ; $40 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $44 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $48 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $4C + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $50 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $54 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $58 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $5C + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $60 + db NEVER_SOLID, NEVER_SOLID, ALWAYS_SOLID, NEVER_SOLID ; $64 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $68 + db NEVER_SOLID, NEVER_SOLID, ALWAYS_SOLID, NEVER_SOLID ; $6C + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $70 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $74 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $78 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $7C + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $80 + db ALWAYS_SOLID, ALWAYS_SOLID, ALWAYS_SOLID, ALWAYS_SOLID ; $84 + db ALWAYS_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $88 + db ALWAYS_SOLID, ALWAYS_SOLID, ALWAYS_SOLID, ALWAYS_SOLID ; $8C + db ALWAYS_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $90 + db ALWAYS_SOLID, ALWAYS_SOLID, ALWAYS_SOLID, ALWAYS_SOLID ; $94 + db ALWAYS_SOLID, ALWAYS_SOLID, NEVER_SOLID, ALWAYS_SOLID ; $98 + db ALWAYS_SOLID, ALWAYS_SOLID, ALWAYS_SOLID, ALWAYS_SOLID ; $9C + db ALWAYS_SOLID, ALWAYS_SOLID, NEVER_SOLID, ALWAYS_SOLID ; $A0 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $A4 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $A8 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $AC + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $B0 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $B4 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $B8 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $BC + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $C0 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $C4 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $C8 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $CC + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $D0 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $D4 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $D8 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $DC + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $E0 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $E4 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $E8 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $EC + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $F0 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $F4 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $F8 + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, NEVER_SOLID ; $FC + db NEVER_SOLID, NEVER_SOLID, NEVER_SOLID, ALWAYS_SOLID ; $100 diff --git a/data/maps/attributes.asm b/data/maps/attributes.asm new file mode 100644 index 0000000..4ff1d0e --- /dev/null +++ b/data/maps/attributes.asm @@ -0,0 +1,836 @@ +INCLUDE "constants.asm" + +map_id: MACRO +;\1: map id + db GROUP_\1, MAP_\1 +ENDM + +map_attributes: MACRO +;\1: map name +;\2: map id +;\3: connections: combo of NORTH, SOUTH, WEST, and/or EAST, or 0 for none +CURRENT_MAP_WIDTH = \2_WIDTH +CURRENT_MAP_HEIGHT = \2_HEIGHT +\1_MapAttributes:: + db CURRENT_MAP_HEIGHT, CURRENT_MAP_WIDTH + dw \1_Blocks + dw \1_Unk + dw \1_MapScripts + dw \1_MapEvents + db \3 +ENDM + +; Connections go in order: north, south, west, east +connection: MACRO +;\1: direction +;\2: map name +;\3: map id +;\4: final y offset for east/west, x offset for north/south +;\5: map data y offset for east/west, x offset for north/south +;\6: strip length +if "\1" == "north" + map_id \3 + dw \2_Blocks + \3_WIDTH * (\3_HEIGHT - 3) + \5 + dw wOverworldMapBlocks + \4 + 3 + db \6 + db \3_WIDTH + db \3_HEIGHT * 2 - 1 + db (\4 - \5) * -2 + dw wOverworldMapBlocks + \3_HEIGHT * (\3_WIDTH + 6) + 1 +elif "\1" == "south" + map_id \3 + dw \2_Blocks + \5 + dw wOverworldMapBlocks + (CURRENT_MAP_HEIGHT + 3) * (CURRENT_MAP_WIDTH + 6) + \4 + 3 + db \6 + db \3_WIDTH + db 0 + db (\4 - \5) * -2 + dw wOverworldMapBlocks + \3_WIDTH + 7 +elif "\1" == "west" + map_id \3 + dw \2_Blocks + (\3_WIDTH * \5) + \3_WIDTH - 3 + dw wOverworldMapBlocks + (CURRENT_MAP_WIDTH + 6) * (\4 + 3) + db \6 + db \3_WIDTH + db (\4 - \5) * -2 + db \3_WIDTH * 2 - 1 + dw wOverworldMapBlocks + \3_WIDTH * 2 + 6 +elif "\1" == "east" + map_id \3 + dw \2_Blocks + (\3_WIDTH * \5) + dw wOverworldMapBlocks + (CURRENT_MAP_WIDTH + 6) * (\4 + 3 + 1) - 3 + db \6 + db \3_WIDTH + db (\4 - \5) * -2 + db 0 + dw wOverworldMapBlocks + \3_WIDTH + 7 +endc +ENDM + +SECTION "Route2Gate1F", ROMX[$4000], BANK[$25] + map_attributes Route2Gate1F, ROUTE_2_GATE_1F, 0 + +SECTION "Route2Gate2F", ROMX[$407C], BANK[$25] + map_attributes Route2Gate2F, ROUTE_2_GATE_2F, 0 + +SECTION "Route2House", ROMX[$40DC], BANK[$25] + map_attributes Route2House, ROUTE_2_HOUSE, 0 + +SECTION "OldCityMuseum", ROMX[$414A], BANK[$25] + map_attributes OldCityMuseum, OLD_CITY_MUSEUM, 0 + +SECTION "OldCityGym", ROMX[$41CD], BANK[$25] + map_attributes OldCityGym, OLD_CITY_GYM, 0 + +SECTION "OldCityTower1F", ROMX[$4289], BANK[$25] + map_attributes OldCityTower1F, OLD_CITY_TOWER_1F, 0 + +SECTION "OldCityTower2F", ROMX[$4319], BANK[$25] + map_attributes OldCityTower2F, OLD_CITY_TOWER_2F, 0 + +SECTION "OldCityTower3F", ROMX[$439E], BANK[$25] + map_attributes OldCityTower3F, OLD_CITY_TOWER_3F, 0 + +SECTION "OldCityTower4F", ROMX[$4423], BANK[$25] + map_attributes OldCityTower4F, OLD_CITY_TOWER_4F, 0 + +SECTION "OldCityTower5F", ROMX[$44A8], BANK[$25] + map_attributes OldCityTower5F, OLD_CITY_TOWER_5F, 0 + +SECTION "OldCityBillsHouse", ROMX[$44FC], BANK[$25] + map_attributes OldCityBillsHouse, OLD_CITY_BILLS_HOUSE, 0 + +SECTION "OldCityMart", ROMX[$456A], BANK[$25] + map_attributes OldCityMart, OLD_CITY_MART, 0 + +SECTION "OldCityHouse", ROMX[$45EE], BANK[$25] + map_attributes OldCityHouse, OLD_CITY_HOUSE, 0 + +SECTION "OldCityPokecenter1F", ROMX[$466E], BANK[$25] + map_attributes OldCityPokecenter1F, OLD_CITY_POKECENTER_1F, 0 + +SECTION "OldCityPokecenter2F", ROMX[$46FE], BANK[$25] + map_attributes OldCityPokecenter2F, OLD_CITY_POKECENTER_2F, 0 + +SECTION "OldCityPokecenterTrade", ROMX[$4826], BANK[$25] + map_attributes OldCityPokecenterTrade, OLD_CITY_POKECENTER_TRADE, 0 + +SECTION "OldCityPokecenterBattle", ROMX[$48AC], BANK[$25] + map_attributes OldCityPokecenterBattle, OLD_CITY_POKECENTER_BATTLE, 0 + +SECTION "OldCityPokecenterTimeMachine", ROMX[$492F], BANK[$25] + map_attributes OldCityPokecenterTimeMachine, OLD_CITY_POKECENTER_TIME_MACHINE, 0 + +SECTION "OldCityKurtsHouse", ROMX[$49AC], BANK[$25] + map_attributes OldCityKurtsHouse, OLD_CITY_KURTS_HOUSE, 0 + +SECTION "OldCitySchool", ROMX[$4A26], BANK[$25] + map_attributes OldCitySchool, OLD_CITY_SCHOOL, 0 + +SECTION "Route1Gate1F", ROMX[$4000], BANK[$26] + map_attributes Route1Gate1F, ROUTE_1_GATE_1F, 0 + +SECTION "Route1Gate2F", ROMX[$40DA], BANK[$26] + map_attributes Route1Gate2F, ROUTE_1_GATE_2F, 0 + +SECTION "WestMart1F", ROMX[$4224], BANK[$26] + map_attributes WestMart1F, WEST_MART_1F, 0 + +SECTION "WestMart2F", ROMX[$42A0], BANK[$26] + map_attributes WestMart2F, WEST_MART_2F, 0 + +SECTION "WestMart3F", ROMX[$4374], BANK[$26] + map_attributes WestMart3F, WEST_MART_3F, 0 + +SECTION "WestMart4F", ROMX[$4433], BANK[$26] + map_attributes WestMart4F, WEST_MART_4F, 0 + +SECTION "WestMart5F", ROMX[$44F2], BANK[$26] + map_attributes WestMart5F, WEST_MART_5F, 0 + +SECTION "WestMart6F", ROMX[$4581], BANK[$26] + map_attributes WestMart6F, WEST_MART_6F, 0 + +SECTION "WestMartElevator", ROMX[$460E], BANK[$26] + map_attributes WestMartElevator, WEST_MART_ELEVATOR, 0 + +SECTION "WestRadioTower1F", ROMX[$464B], BANK[$26] + map_attributes WestRadioTower1F, WEST_RADIO_TOWER_1F, 0 + +SECTION "WestRadioTower2F", ROMX[$46CA], BANK[$26] + map_attributes WestRadioTower2F, WEST_RADIO_TOWER_2F, 0 + +SECTION "WestRadioTower3F", ROMX[$4772], BANK[$26] + map_attributes WestRadioTower3F, WEST_RADIO_TOWER_3F, 0 + +SECTION "WestRadioTower4F", ROMX[$4827], BANK[$26] + map_attributes WestRadioTower4F, WEST_RADIO_TOWER_4F, 0 + +SECTION "WestRadioTower5F", ROMX[$48E9], BANK[$26] + map_attributes WestRadioTower5F, WEST_RADIO_TOWER_5F, 0 + +SECTION "WestRocketRaidedHouse", ROMX[$499F], BANK[$26] + map_attributes WestRocketRaidedHouse, WEST_ROCKET_RAIDED_HOUSE, 0 + +SECTION "WestPokecenter1F", ROMX[$4A49], BANK[$26] + map_attributes WestPokecenter1F, WEST_POKECENTER_1F, 0 + +SECTION "WestPokecenter2F", ROMX[$4AE1], BANK[$26] + map_attributes WestPokecenter2F, WEST_POKECENTER_2F, 0 + +SECTION "WestGym", ROMX[$4B5E], BANK[$26] + map_attributes WestGym, WEST_GYM, 0 + +SECTION "WestHouse1", ROMX[$4C1A], BANK[$26] + map_attributes WestHouse1, WEST_HOUSE_1, 0 + +SECTION "WestHouse2", ROMX[$4C9E], BANK[$26] + map_attributes WestHouse2, WEST_HOUSE_2, 0 + +SECTION "HaitekuWestRouteGate", ROMX[$4000], BANK[$27] + map_attributes HaitekuWestRouteGate, HAITEKU_WEST_ROUTE_GATE, 0 + +SECTION "HaitekuPokecenter1F", ROMX[$405B], BANK[$27] + map_attributes HaitekuPokecenter1F, HAITEKU_POKECENTER_1F, 0 + +SECTION "HaitekuPokecenter2F", ROMX[$40EF], BANK[$27] + map_attributes HaitekuPokecenter2F, HAITEKU_POKECENTER_2F, 0 + +SECTION "HaitekuLeague1F", ROMX[$4168], BANK[$27] + map_attributes HaitekuLeague1F, HAITEKU_LEAGUE_1F, 0 + +SECTION "HaitekuLeague2F", ROMX[$4209], BANK[$27] + map_attributes HaitekuLeague2F, HAITEKU_LEAGUE_2F, 0 + +SECTION "HaitekuMart", ROMX[$42A9], BANK[$27] + map_attributes HaitekuMart, HAITEKU_MART, 0 + +SECTION "HaitekuHouse1", ROMX[$4329], BANK[$27] + map_attributes HaitekuHouse1, HAITEKU_HOUSE_1, 0 + +SECTION "HaitekuHouse2", ROMX[$4383], BANK[$27] + map_attributes HaitekuHouse2, HAITEKU_HOUSE_2, 0 + +SECTION "HaitekuImposterOakHouse", ROMX[$43DD], BANK[$27] + map_attributes HaitekuImposterOakHouse, HAITEKU_IMPOSTER_OAK_HOUSE, 0 + +SECTION "HaitekuAquarium1F", ROMX[$4444], BANK[$27] + map_attributes HaitekuAquarium1F, HAITEKU_AQUARIUM_1F, 0 + +SECTION "HaitekuAquarium2F", ROMX[$44CB], BANK[$27] + map_attributes HaitekuAquarium2F, HAITEKU_AQUARIUM_2F, 0 + +SECTION "FontoRouteGate1", ROMX[$4537], BANK[$27] + map_attributes FontoRouteGate1, FONTO_ROUTE_GATE_1, 0 + +SECTION "FontoRouteGate2", ROMX[$4592], BANK[$27] + map_attributes FontoRouteGate2, FONTO_ROUTE_GATE_2, 0 + +SECTION "FontoRouteGate3", ROMX[$45ED], BANK[$27] + map_attributes FontoRouteGate3, FONTO_ROUTE_GATE_3, 0 + +SECTION "FontoRocketHouse", ROMX[$4648], BANK[$27] + map_attributes FontoRocketHouse, FONTO_ROCKET_HOUSE, 0 + +SECTION "FontoMart", ROMX[$46D5], BANK[$27] + map_attributes FontoMart, FONTO_MART, 0 + +SECTION "FontoHouse", ROMX[$4755], BANK[$27] + map_attributes FontoHouse, FONTO_HOUSE, 0 + +SECTION "FontoPokecenter1F", ROMX[$47AF], BANK[$27] + map_attributes FontoPokecenter1F, FONTO_POKECENTER_1F, 0 + +SECTION "FontoPokecenter2F", ROMX[$4843], BANK[$27] + map_attributes FontoPokecenter2F, FONTO_POKECENTER_2F, 0 + +SECTION "FontoLab", ROMX[$48BC], BANK[$27] + map_attributes FontoLab, FONTO_LAB, 0 + +SECTION "BaadonMart", ROMX[$4923], BANK[$27] + map_attributes BaadonMart, BAADON_MART, 0 + +SECTION "BaadonPokecenter1F", ROMX[$49A3], BANK[$27] + map_attributes BaadonPokecenter1F, BAADON_POKECENTER_1F, 0 + +SECTION "BaadonPokecenter2F", ROMX[$4A2A], BANK[$27] + map_attributes BaadonPokecenter2F, BAADON_POKECENTER_2F, 0 + +SECTION "BaadonHouse1", ROMX[$4AA3], BANK[$27] + map_attributes BaadonHouse1, BAADON_HOUSE_1, 0 + +SECTION "BaadonWallpaperHouse", ROMX[$4AF9], BANK[$27] + map_attributes BaadonWallpaperHouse, BAADON_WALLPAPER_HOUSE, 0 + +SECTION "BaadonHouse2", ROMX[$4B42], BANK[$27] + map_attributes BaadonHouse2, BAADON_HOUSE_2, 0 + +SECTION "BaadonLeague1F", ROMX[$4B9C], BANK[$27] + map_attributes BaadonLeague1F, BAADON_LEAGUE_1F, 0 + +SECTION "BaadonLeague2F", ROMX[$4C3D], BANK[$27] + map_attributes BaadonLeague2F, BAADON_LEAGUE_2F, 0 + +SECTION "BaadonRouteGateWest", ROMX[$4CDD], BANK[$27] + map_attributes BaadonRouteGateWest, BAADON_ROUTE_GATE_WEST, 0 + +SECTION "BaadonRouteGateNewtype", ROMX[$4D38], BANK[$27] + map_attributes BaadonRouteGateNewtype, BAADON_ROUTE_GATE_NEWTYPE, 0 + +SECTION "NewtypePokecenter1F", ROMX[$4D93], BANK[$27] + map_attributes NewtypePokecenter1F, NEWTYPE_POKECENTER_1F, 0 + +SECTION "NewtypePokecenter2F", ROMX[$4E27], BANK[$27] + map_attributes NewtypePokecenter2F, NEWTYPE_POKECENTER_2F, 0 + +SECTION "NewtypeLeague1F", ROMX[$4EA0], BANK[$27] + map_attributes NewtypeLeague1F, NEWTYPE_LEAGUE_1F, 0 + +SECTION "NewtypeLeague2F", ROMX[$4F41], BANK[$27] + map_attributes NewtypeLeague2F, NEWTYPE_LEAGUE_2F, 0 + +SECTION "NewtypeSailorHouse", ROMX[$4FE1], BANK[$27] + map_attributes NewtypeSailorHouse, NEWTYPE_SAILOR_HOUSE, 0 + +SECTION "NewtypeMart", ROMX[$503B], BANK[$27] + map_attributes NewtypeMart, NEWTYPE_MART, 0 + +SECTION "NewtypeDojo", ROMX[$50BB], BANK[$27] + map_attributes NewtypeDojo, NEWTYPE_DOJO, 0 + +SECTION "NewtypeHouse1", ROMX[$5155], BANK[$27] + map_attributes NewtypeHouse1, NEWTYPE_HOUSE_1, 0 + +SECTION "NewtypeDiner", ROMX[$51AF], BANK[$27] + map_attributes NewtypeDiner, NEWTYPE_DINER, 0 + +SECTION "NewtypeHouse2", ROMX[$522C], BANK[$27] + map_attributes NewtypeHouse2, NEWTYPE_HOUSE_2, 0 + +SECTION "NewtypeHouse3", ROMX[$5286], BANK[$27] + map_attributes NewtypeHouse3, NEWTYPE_HOUSE_3, 0 + +SECTION "Route15Pokecenter1F", ROMX[$52E0], BANK[$27] + map_attributes Route15Pokecenter1F, ROUTE_15_POKECENTER_1F, 0 + +SECTION "Route15Pokecenter2F", ROMX[$5374], BANK[$27] + map_attributes Route15Pokecenter2F, ROUTE_15_POKECENTER_2F, 0 + +SECTION "NewtypeRouteGate", ROMX[$53C6], BANK[$27] + map_attributes NewtypeRouteGate, NEWTYPE_ROUTE_GATE, 0 + +SECTION "Route18Pokecenter1F", ROMX[$5421], BANK[$27] + map_attributes Route18Pokecenter1F, ROUTE_18_POKECENTER_1F, 0 + +SECTION "Route18Pokecenter2F", ROMX[$54B5], BANK[$27] + map_attributes Route18Pokecenter2F, ROUTE_18_POKECENTER_2F, 0 + +SECTION "SugarRouteGate", ROMX[$5507], BANK[$27] + map_attributes SugarRouteGate, SUGAR_ROUTE_GATE, 0 + +SECTION "SugarHouse", ROMX[$5562], BANK[$27] + map_attributes SugarHouse, SUGAR_HOUSE, 0 + +SECTION "SugarHouse2", ROMX[$55E2], BANK[$27] + map_attributes SugarHouse2, SUGAR_HOUSE_2, 0 + +SECTION "SugarMart", ROMX[$5638], BANK[$27] + map_attributes SugarMart, SUGAR_MART, 0 + +SECTION "SugarPokecenter1F", ROMX[$56B8], BANK[$27] + map_attributes SugarPokecenter1F, SUGAR_POKECENTER_1F, 0 + +SECTION "SugarPokecenter2F", ROMX[$574C], BANK[$27] + map_attributes SugarPokecenter2F, SUGAR_POKECENTER_2F, 0 + +SECTION "BullForestRoute1House", ROMX[$57C5], BANK[$27] + map_attributes BullForestRoute1House, BULL_FOREST_ROUTE_1_HOUSE, 0 + +SECTION "BullForestRouteGateStand", ROMX[$581F], BANK[$27] + map_attributes BullForestRouteGateStand, BULL_FOREST_ROUTE_GATE_STAND, 0 + +SECTION "BullMart", ROMX[$587A], BANK[$27] + map_attributes BullMart, BULL_MART, 0 + +SECTION "BullHouse1", ROMX[$58FA], BANK[$27] + map_attributes BullHouse1, BULL_HOUSE_1, 0 + +SECTION "BullHouse2", ROMX[$5950], BANK[$27] + map_attributes BullHouse2, BULL_HOUSE_2, 0 + +SECTION "BullHouse3", ROMX[$59AA], BANK[$27] + map_attributes BullHouse3, BULL_HOUSE_3, 0 + +SECTION "BullPokecenter1F", ROMX[$5A04], BANK[$27] + map_attributes BullPokecenter1F, BULL_POKECENTER_1F, 0 + +SECTION "BullPokecenter2F", ROMX[$5A98], BANK[$27] + map_attributes BullPokecenter2F, BULL_POKECENTER_2F, 0 + +SECTION "BullLeague1F", ROMX[$5B11], BANK[$27] + map_attributes BullLeague1F, BULL_LEAGUE_1F, 0 + +SECTION "BullLeague2F", ROMX[$5BB2], BANK[$27] + map_attributes BullLeague2F, BULL_LEAGUE_2F, 0 + +SECTION "BullHouse4", ROMX[$5C52], BANK[$27] + map_attributes BullHouse4, BULL_HOUSE_4, 0 + +SECTION "StandRouteGateKanto", ROMX[$5C9F], BANK[$27] + map_attributes StandRouteGateKanto, STAND_ROUTE_GATE_KANTO, 0 + +SECTION "StandLab", ROMX[$5CFA], BANK[$27] + map_attributes StandLab, STAND_LAB, 0 + +SECTION "StandPokecenter1F", ROMX[$5D50], BANK[$27] + map_attributes StandPokecenter1F, STAND_POKECENTER_1F, 0 + +SECTION "StandPokecenter2F", ROMX[$5DE4], BANK[$27] + map_attributes StandPokecenter2F, STAND_POKECENTER_2F, 0 + +SECTION "StandOffice", ROMX[$5E5D], BANK[$27] + map_attributes StandOffice, STAND_OFFICE, 0 + +SECTION "StandMart", ROMX[$5EDD], BANK[$27] + map_attributes StandMart, STAND_MART, 0 + +SECTION "StandHouse", ROMX[$5F5D], BANK[$27] + map_attributes StandHouse, STAND_HOUSE, 0 + +SECTION "StandRocketHouse1F", ROMX[$5FB7], BANK[$27] + map_attributes StandRocketHouse1F, STAND_ROCKET_HOUSE_1F, 0 + +SECTION "StandRocketHouse2F", ROMX[$6024], BANK[$27] + map_attributes StandRocketHouse2F, STAND_ROCKET_HOUSE_2F, 0 + +SECTION "StandLeague1F", ROMX[$6083], BANK[$27] + map_attributes StandLeague1F, STAND_LEAGUE_1F, 0 + +SECTION "StandLeague2F", ROMX[$6124], BANK[$27] + map_attributes StandLeague2F, STAND_LEAGUE_2F, 0 + +SECTION "KantoCeruleanHouse", ROMX[$61C4], BANK[$27] + map_attributes KantoCeruleanHouse, KANTO_CERULEAN_HOUSE, 0 + +SECTION "KantoPokecenter1F", ROMX[$621E], BANK[$27] + map_attributes KantoPokecenter1F, KANTO_POKECENTER_1F, 0 + +SECTION "KantoPokecenter2F", ROMX[$62B2], BANK[$27] + map_attributes KantoPokecenter2F, KANTO_POKECENTER_2F, 0 + +SECTION "KantoLeague1F", ROMX[$632B], BANK[$27] + map_attributes KantoLeague1F, KANTO_LEAGUE_1F, 0 + +SECTION "KantoLeague2F", ROMX[$63CC], BANK[$27] + map_attributes KantoLeague2F, KANTO_LEAGUE_2F, 0 + +SECTION "KantoLavenderHouse", ROMX[$646C], BANK[$27] + map_attributes KantoLavenderHouse, KANTO_LAVENDER_HOUSE, 0 + +SECTION "KantoCeladonMart1F", ROMX[$64D3], BANK[$27] + map_attributes KantoCeladonMart1F, KANTO_CELADON_MART_1F, 0 + +SECTION "KantoCeladonMart2F", ROMX[$6547], BANK[$27] + map_attributes KantoCeladonMart2F, KANTO_CELADON_MART_2F, 0 + +SECTION "KantoCeladonMart3F", ROMX[$65C1], BANK[$27] + map_attributes KantoCeladonMart3F, KANTO_CELADON_MART_3F, 0 + +SECTION "KantoCeladonMart4F", ROMX[$663B], BANK[$27] + map_attributes KantoCeladonMart4F, KANTO_CELADON_MART_4F, 0 + +SECTION "KantoCeladonMart5F", ROMX[$66C2], BANK[$27] + map_attributes KantoCeladonMart5F, KANTO_CELADON_MART_5F, 0 + +SECTION "KantoCeladonElevator", ROMX[$6742], BANK[$27] + map_attributes KantoCeladonElevator, KANTO_CELADON_ELEVATOR, 0 + +SECTION "KantoMart", ROMX[$677F], BANK[$27] + map_attributes KantoMart, KANTO_MART, 0 + +SECTION "KantoGamefreakHQ1", ROMX[$67FF], BANK[$27] + map_attributes KantoGamefreakHQ1, KANTO_GAMEFREAK_HQ_1, 0 + +SECTION "KantoGamefreakHQ2", ROMX[$6899], BANK[$27] + map_attributes KantoGamefreakHQ2, KANTO_GAMEFREAK_HQ_2, 0 + +SECTION "KantoGamefreakHQ3", ROMX[$6905], BANK[$27] + map_attributes KantoGamefreakHQ3, KANTO_GAMEFREAK_HQ_3, 0 + +SECTION "KantoGamefreakHQ4", ROMX[$698B], BANK[$27] + map_attributes KantoGamefreakHQ4, KANTO_GAMEFREAK_HQ_4, 0 + +SECTION "KantoGamefreakHQ5", ROMX[$69E3], BANK[$27] + map_attributes KantoGamefreakHQ5, KANTO_GAMEFREAK_HQ_5, 0 + +SECTION "KantoSilphCo", ROMX[$6A2C], BANK[$27] + map_attributes KantoSilphCo, KANTO_SILPH_CO, 0 + +SECTION "KantoViridianHouse", ROMX[$6ADF], BANK[$27] + map_attributes KantoViridianHouse, KANTO_VIRIDIAN_HOUSE, 0 + +SECTION "KantoGameCorner", ROMX[$6B46], BANK[$27] + map_attributes KantoGameCorner, KANTO_GAME_CORNER, 0 + +SECTION "KantoUnusedArea", ROMX[$6C55], BANK[$27] + map_attributes KantoUnusedArea, KANTO_UNUSED_AREA, 0 + +SECTION "KantoGameCornerPrizes", ROMX[$6C90], BANK[$27] + map_attributes KantoGameCornerPrizes, KANTO_GAME_CORNER_PRIZES, 0 + +SECTION "KantoDiner", ROMX[$6D04], BANK[$27] + map_attributes KantoDiner, KANTO_DINER, 0 + +SECTION "KantoSchool", ROMX[$6D51], BANK[$27] + map_attributes KantoSchool, KANTO_SCHOOL, 0 + +SECTION "KantoHospital", ROMX[$6DEB], BANK[$27] + map_attributes KantoHospital, KANTO_HOSPITAL, 0 + +SECTION "KantoPokecenter21F", ROMX[$6E6B], BANK[$27] + map_attributes KantoPokecenter21F, KANTO_POKECENTER_2_1F, 0 + +SECTION "KantoPokecenter22F", ROMX[$6EFF], BANK[$27] + map_attributes KantoPokecenter22F, KANTO_POKECENTER_2_2F, 0 + +SECTION "KantoRedsHouse", ROMX[$6F78], BANK[$27] + map_attributes KantoRedsHouse, KANTO_REDS_HOUSE, 0 + +SECTION "KantoGreensHouse1F", ROMX[$6FDF], BANK[$27] + map_attributes KantoGreensHouse1F, KANTO_GREENS_HOUSE_1F, 0 + +SECTION "KantoGreensHouse2F", ROMX[$703C], BANK[$27] + map_attributes KantoGreensHouse2F, KANTO_GREENS_HOUSE_2F, 0 + +SECTION "KantoEldersHouse", ROMX[$707E], BANK[$27] + map_attributes KantoEldersHouse, KANTO_ELDERS_HOUSE, 0 + +SECTION "KantoOaksLab", ROMX[$70E5], BANK[$27] + map_attributes KantoOaksLab, KANTO_OAKS_LAB, 0 + +SECTION "KantoLeague21F", ROMX[$713B], BANK[$27] + map_attributes KantoLeague21F, KANTO_LEAGUE_2_1F, 0 + +SECTION "KantoLeague22F", ROMX[$71DC], BANK[$27] + map_attributes KantoLeague22F, KANTO_LEAGUE_2_2F, 0 + +SECTION "KantoFishingGuru", ROMX[$727C], BANK[$27] + map_attributes KantoFishingGuru, KANTO_FISHING_GURU, 0 + +SECTION "SouthHouse1", ROMX[$72D6], BANK[$27] + map_attributes SouthHouse1, SOUTH_HOUSE_1, 0 + +SECTION "SouthPokecenter1F", ROMX[$7330], BANK[$27] + map_attributes SouthPokecenter1F, SOUTH_POKECENTER_1F, 0 + +SECTION "SouthPokecenter2F", ROMX[$73C4], BANK[$27] + map_attributes SouthPokecenter2F, SOUTH_POKECENTER_2F, 0 + +SECTION "SouthMart", ROMX[$743D], BANK[$27] + map_attributes SouthMart, SOUTH_MART, 0 + +SECTION "SouthHouse2", ROMX[$74BD], BANK[$27] + map_attributes SouthHouse2, SOUTH_HOUSE_2, 0 + +SECTION "NorthHouse1", ROMX[$7517], BANK[$27] + map_attributes NorthHouse1, NORTH_HOUSE_1, 0 + +SECTION "NorthMart", ROMX[$7571], BANK[$27] + map_attributes NorthMart, NORTH_MART, 0 + +SECTION "NorthHouse2", ROMX[$75F1], BANK[$27] + map_attributes NorthHouse2, NORTH_HOUSE_2, 0 + +SECTION "NorthPokecenter1F", ROMX[$764B], BANK[$27] + map_attributes NorthPokecenter1F, NORTH_POKECENTER_1F, 0 + +SECTION "NorthPokecenter2F", ROMX[$76DF], BANK[$27] + map_attributes NorthPokecenter2F, NORTH_POKECENTER_2F, 0 + +SECTION "PowerPlant1", ROMX[$4000], BANK[$2F] + map_attributes PowerPlant1, POWER_PLANT_1, 0 + +SECTION "PowerPlant2", ROMX[$407D], BANK[$2F] + map_attributes PowerPlant2, POWER_PLANT_2, 0 + +SECTION "PowerPlant3", ROMX[$40FA], BANK[$2F] + map_attributes PowerPlant3, POWER_PLANT_3, 0 + +SECTION "PowerPlant4", ROMX[$422B], BANK[$2F] + map_attributes PowerPlant4, POWER_PLANT_4, 0 + +SECTION "RuinsOfAlphEntrance", ROMX[$435C], BANK[$2F] + map_attributes RuinsOfAlphEntrance, RUINS_OF_ALPH_ENTRANCE, 0 + +SECTION "RuinsOfAlphMain", ROMX[$43D9], BANK[$2F] + map_attributes RuinsOfAlphMain, RUINS_OF_ALPH_MAIN, 0 + +SECTION "CaveMinecarts1", ROMX[$469F], BANK[$2F] + map_attributes CaveMinecarts1, CAVE_MINECARTS_1, 0 + +SECTION "CaveMinecarts2", ROMX[$482A], BANK[$2F] + map_attributes CaveMinecarts2, CAVE_MINECARTS_2, 0 + +SECTION "CaveMinecarts3", ROMX[$49B5], BANK[$2F] + map_attributes CaveMinecarts3, CAVE_MINECARTS_3, 0 + +SECTION "CaveMinecarts4", ROMX[$4B40], BANK[$2F] + map_attributes CaveMinecarts4, CAVE_MINECARTS_4, 0 + +SECTION "CaveMinecarts5", ROMX[$4CCB], BANK[$2F] + map_attributes CaveMinecarts5, CAVE_MINECARTS_5, 0 + +SECTION "CaveMinecarts6", ROMX[$4E56], BANK[$2F] + map_attributes CaveMinecarts6, CAVE_MINECARTS_6, 0 + +SECTION "CaveMinecarts7", ROMX[$4F2D], BANK[$2F] + map_attributes CaveMinecarts7, CAVE_MINECARTS_7, 0 + +SECTION "Office1", ROMX[$5004], BANK[$2F] + map_attributes Office1, OFFICE_1, 0 + +SECTION "Office2", ROMX[$5081], BANK[$2F] + map_attributes Office2, OFFICE_2, 0 + +SECTION "Office3", ROMX[$51B2], BANK[$2F] + map_attributes Office3, OFFICE_3, 0 + +SECTION "SlowpokeWellEntrance", ROMX[$5289], BANK[$2F] + map_attributes SlowpokeWellEntrance, SLOWPOKE_WELL_ENTRANCE, 0 + +SECTION "SlowpokeWellMain", ROMX[$5306], BANK[$2F] + map_attributes SlowpokeWellMain, SLOWPOKE_WELL_MAIN, 0 + +SECTION "ShizukanaOka", ROMX[$53DD], BANK[$2F] + map_attributes ShizukanaOka, SHIZUKANA_OKA, 0 + +SECTION "RouteSilentEastGate", ROMX[$4000], BANK[$34] + map_attributes RouteSilentEastGate, ROUTE_SILENT_EAST_GATE, 0 + +SECTION "PlayerHouse1F", ROMX[$4042], BANK[$34] + map_attributes PlayerHouse1F, PLAYER_HOUSE_1F, 0 + +SECTION "PlayerHouse2F", ROMX[$4132], BANK[$34] + map_attributes PlayerHouse2F, PLAYER_HOUSE_2F, 0 + +SECTION "SilentPokecenter", ROMX[$45FF], BANK[$34] + map_attributes SilentPokecenter, SILENT_POKECENTER, 0 + +SECTION "SilentHillHouse", ROMX[$47D5], BANK[$34] + map_attributes SilentHillHouse, SILENT_HILL_HOUSE, 0 + +SECTION "SilentHillLab", ROMX[$4AAC], BANK[$34] + map_attributes SilentHillLab, SILENT_HILL_LAB, 0 + +SECTION "SilentHillLab2", ROMX[$5BE6], BANK[$34] + map_attributes SilentHillLab2, SILENT_HILL_LAB_2, 0 + +SECTION "Unused13", ROMX[$605D], BANK[$34] + map_attributes Unused13, UNUSED_13, 0 + +SECTION "SilentHill", ROMX[$4014], BANK[$36] + map_attributes SilentHill, SILENT_HILL, NORTH | WEST | EAST + connection north, PrinceRoute, PRINCE_ROUTE, 0, 0, 10 + connection west, Route1P1, ROUTE_1_P1, 0, 0, 9 + connection east, RouteSilentEast, ROUTE_SILENT_EAST, 0, 0, 9 + +SECTION "OldCity", ROMX[$410D], BANK[$36] + map_attributes OldCity, OLD_CITY, SOUTH | WEST + connection south, Route1P2, ROUTE_1_P2, 5, 0, 10 + connection west, Route2, ROUTE_2, 5, 0, 9 + +SECTION "West", ROMX[$4372], BANK[$36] + map_attributes West, WEST, NORTH | EAST + connection north, BaadonRoute1, BAADON_ROUTE_1, 5, 0, 10 + connection east, Route2, ROUTE_2, 5, 0, 9 + +SECTION "Haiteku", ROMX[$45D2], BANK[$36] + map_attributes Haiteku, HAITEKU, WEST + connection west, HaitekuWestRoute, HAITEKU_WEST_ROUTE, 0, 0, 9 + +SECTION "Fonto", ROMX[$47F8], BANK[$36] + map_attributes Fonto, FONTO, NORTH | WEST | EAST + connection north, FontoRoute2, FONTO_ROUTE_2, 0, 0, 10 + connection west, FontoRoute1, FONTO_ROUTE_1, 0, 0, 9 + connection east, FontoRoute3, FONTO_ROUTE_3, 0, 0, 9 + +SECTION "Baadon", ROMX[$48F3], BANK[$36] + map_attributes Baadon, BAADON, NORTH | SOUTH | EAST + connection north, FontoRoute4, FONTO_ROUTE_4, 0, 0, 10 + connection south, BaadonRoute1, BAADON_ROUTE_1, 0, 0, 10 + connection east, BaadonRoute2, BAADON_ROUTE_2, 0, 0, 9 + +SECTION "Newtype", ROMX[$49F9], BANK[$36] + map_attributes Newtype, NEWTYPE, NORTH | WEST | EAST + connection north, SugarRoute, SUGAR_ROUTE, 5, 0, 10 + connection west, Route15, ROUTE_15, 0, 0, 9 + connection east, NewtypeRoute, NEWTYPE_ROUTE, 9, 0, 9 + +SECTION "Sugar", ROMX[$4C3A], BANK[$36] + map_attributes Sugar, SUGAR, SOUTH + connection south, SugarRoute, SUGAR_ROUTE, 0, 0, 10 + +SECTION "BullForest", ROMX[$4D05], BANK[$36] + map_attributes BullForest, BULL_FOREST, NORTH | SOUTH | WEST + connection north, BullForestRoute3, BULL_FOREST_ROUTE_3, 5, 0, 10 + connection south, BullForestRoute2, BULL_FOREST_ROUTE_2, 5, 0, 10 + connection west, BullForestRoute1, BULL_FOREST_ROUTE_1, 9, 0, 9 + +SECTION "Stand", ROMX[$4F28], BANK[$36] + map_attributes Stand, STAND, NORTH | SOUTH + connection north, BullForestRoute2, BULL_FOREST_ROUTE_2, 10, 0, 10 + connection south, StandRoute, STAND_ROUTE, 10, 0, 10 + +SECTION "Kanto", ROMX[$519D], BANK[$36] + map_attributes Kanto, KANTO, WEST | EAST + connection west, RouteSilentEast, ROUTE_SILENT_EAST, 9, 0, 9 + connection east, KantoEastRoute, KANTO_EAST_ROUTE, 9, 0, 9 + +SECTION "Prince", ROMX[$55F3], BANK[$36] + map_attributes Prince, PRINCE, NORTH | SOUTH + connection north, MtFujiRoute, MT_FUJI_ROUTE, 0, 0, 10 + connection south, PrinceRoute, PRINCE_ROUTE, 0, 0, 10 + +SECTION "MtFuji", ROMX[$5677], BANK[$36] + map_attributes MtFuji, MT_FUJI, SOUTH + connection south, MtFujiRoute, MT_FUJI_ROUTE, 0, 0, 10 + +SECTION "South", ROMX[$56EF], BANK[$36] + map_attributes South, SOUTH, NORTH | SOUTH | EAST + connection north, FontoRoute5, FONTO_ROUTE_5, 10, 0, 10 + connection south, HaitekuWestRouteOcean, HAITEKU_WEST_ROUTE_OCEAN, 10, 0, 10 + connection east, FontoRoute1, FONTO_ROUTE_1, 0, 0, 9 + +SECTION "North", ROMX[$5914], BANK[$36] + map_attributes North, NORTH, SOUTH + connection south, BullForestRoute3, BULL_FOREST_ROUTE_3, 0, 0, 10 + +SECTION "Route1P1", ROMX[$59DF], BANK[$36] + map_attributes Route1P1, ROUTE_1_P1, WEST | EAST + connection west, Route1P2, ROUTE_1_P2, -3, 6, 12 + connection east, SilentHill, SILENT_HILL, 0, 0, 9 + +SECTION "Route1P2", ROMX[$5ABE], BANK[$36] + map_attributes Route1P2, ROUTE_1_P2, NORTH | EAST + connection north, OldCity, OLD_CITY, -3, 2, 16 + connection east, Route1P1, ROUTE_1_P1, 9, 0, 9 + +SECTION "Route2", ROMX[$5BD4], BANK[$36] + map_attributes Route2, ROUTE_2, WEST | EAST + connection west, West, WEST, -3, 2, 15 + connection east, OldCity, OLD_CITY, -3, 2, 15 + +SECTION "HaitekuWestRoute", ROMX[$5CC6], BANK[$36] + map_attributes HaitekuWestRoute, HAITEKU_WEST_ROUTE, WEST | EAST + connection west, HaitekuWestRouteOcean, HAITEKU_WEST_ROUTE_OCEAN, -3, 15, 12 + connection east, Haiteku, HAITEKU, 0, 0, 12 + +SECTION "HaitekuWestRouteOcean", ROMX[$5DD1], BANK[$36] + map_attributes HaitekuWestRouteOcean, HAITEKU_WEST_ROUTE_OCEAN, NORTH | EAST + connection north, South, SOUTH, -3, 7, 13 + connection east, HaitekuWestRoute, HAITEKU_WEST_ROUTE, 18, 0, 9 + +SECTION "FontoRoute1", ROMX[$5F17], BANK[$36] + map_attributes FontoRoute1, FONTO_ROUTE_1, WEST | EAST + connection west, South, SOUTH, 0, 0, 12 + connection east, Fonto, FONTO, 0, 0, 9 + +SECTION "FontoRoute6", ROMX[$6083], BANK[$36] + map_attributes FontoRoute6, FONTO_ROUTE_6, WEST | EAST + connection west, FontoRoute5, FONTO_ROUTE_5, 0, 0, 12 + connection east, FontoRoute2, FONTO_ROUTE_2, 0, 0, 12 + +SECTION "FontoRoute2", ROMX[$61E8], BANK[$36] + map_attributes FontoRoute2, FONTO_ROUTE_2, SOUTH | WEST + connection south, Fonto, FONTO, 0, 0, 10 + connection west, FontoRoute6, FONTO_ROUTE_6, 0, 0, 9 + +SECTION "FontoRoute4", ROMX[$62C6], BANK[$36] + map_attributes FontoRoute4, FONTO_ROUTE_4, SOUTH | WEST + connection south, Baadon, BAADON, 0, 0, 10 + connection west, FontoRoute3, FONTO_ROUTE_3, 0, 0, 9 + +SECTION "FontoRoute3", ROMX[$63B2], BANK[$36] + map_attributes FontoRoute3, FONTO_ROUTE_3, WEST | EAST + connection west, Fonto, FONTO, 0, 0, 9 + connection east, FontoRoute4, FONTO_ROUTE_4, 0, 0, 12 + +SECTION "BaadonRoute1", ROMX[$64BD], BANK[$36] + map_attributes BaadonRoute1, BAADON_ROUTE_1, NORTH | SOUTH + connection north, Baadon, BAADON, 0, 0, 10 + connection south, West, WEST, -3, 2, 16 + +SECTION "BaadonRoute2", ROMX[$6603], BANK[$36] + map_attributes BaadonRoute2, BAADON_ROUTE_2, WEST | EAST + connection west, Baadon, BAADON, 0, 0, 9 + connection east, BaadonRoute3, BAADON_ROUTE_3, 0, 0, 12 + +SECTION "BaadonRoute3", ROMX[$67EF], BANK[$36] + map_attributes BaadonRoute3, BAADON_ROUTE_3, SOUTH | WEST + connection south, Route15, ROUTE_15, 0, 0, 13 + connection west, BaadonRoute2, BAADON_ROUTE_2, 0, 0, 9 + +SECTION "Route15", ROMX[$68DB], BANK[$36] + map_attributes Route15, ROUTE_15, NORTH | EAST + connection north, BaadonRoute3, BAADON_ROUTE_3, 0, 0, 10 + connection east, Newtype, NEWTYPE, 0, 0, 12 + +SECTION "NewtypeRoute", ROMX[$69BD], BANK[$36] + map_attributes NewtypeRoute, NEWTYPE_ROUTE, WEST | EAST + connection west, Newtype, NEWTYPE, -3, 6, 12 + connection east, Route18, ROUTE_18, -3, 33, 12 + +SECTION "Route18", ROMX[$6A6E], BANK[$36] + map_attributes Route18, ROUTE_18, NORTH | WEST + connection north, BullForestRoute1, BULL_FOREST_ROUTE_1, 0, 0, 13 + connection west, NewtypeRoute, NEWTYPE_ROUTE, 36, 0, 9 + +SECTION "BullForestRoute1", ROMX[$6C6F], BANK[$36] + map_attributes BullForestRoute1, BULL_FOREST_ROUTE_1, SOUTH | EAST + connection south, Route18, ROUTE_18, 0, 0, 10 + connection east, BullForest, BULL_FOREST, -3, 6, 12 + +SECTION "SugarRoute", ROMX[$6D8F], BANK[$36] + map_attributes SugarRoute, SUGAR_ROUTE, NORTH | SOUTH + connection north, Sugar, SUGAR, 0, 0, 10 + connection south, Newtype, NEWTYPE, -3, 2, 16 + +SECTION "BullForestRoute2", ROMX[$6ED5], BANK[$36] + map_attributes BullForestRoute2, BULL_FOREST_ROUTE_2, NORTH | SOUTH + connection north, BullForest, BULL_FOREST, -3, 2, 16 + connection south, Stand, STAND, -3, 7, 13 + +SECTION "StandRoute", ROMX[$701B], BANK[$36] + map_attributes StandRoute, STAND_ROUTE, NORTH | SOUTH + connection north, Stand, STAND, -3, 7, 13 + connection south, KantoEastRoute, KANTO_EAST_ROUTE, -3, 7, 13 + +SECTION "KantoEastRoute", ROMX[$7161], BANK[$36] + map_attributes KantoEastRoute, KANTO_EAST_ROUTE, NORTH | WEST + connection north, StandRoute, STAND_ROUTE, 10, 0, 10 + connection west, Kanto, KANTO, -3, 6, 15 + +SECTION "RouteSilentEast", ROMX[$724D], BANK[$36] + map_attributes RouteSilentEast, ROUTE_SILENT_EAST, WEST | EAST + connection west, SilentHill, SILENT_HILL, 0, 0, 9 + connection east, Kanto, KANTO, -3, 6, 15 + +SECTION "PrinceRoute", ROMX[$738C], BANK[$36] + map_attributes PrinceRoute, PRINCE_ROUTE, NORTH | SOUTH + connection north, Prince, PRINCE, 0, 0, 10 + connection south, SilentHill, SILENT_HILL, 0, 0, 10 + +SECTION "MtFujiRoute", ROMX[$73E8], BANK[$36] + map_attributes MtFujiRoute, MT_FUJI_ROUTE, NORTH | SOUTH + connection north, MtFuji, MT_FUJI, 0, 0, 10 + connection south, Prince, PRINCE, 0, 0, 10 + +SECTION "FontoRoute5", ROMX[$7444], BANK[$36] + map_attributes FontoRoute5, FONTO_ROUTE_5, SOUTH | EAST + connection south, South, SOUTH, -3, 7, 13 + connection east, FontoRoute6, FONTO_ROUTE_6, 0, 0, 9 + +SECTION "BullForestRoute3", ROMX[$7530], BANK[$36] + map_attributes BullForestRoute3, BULL_FOREST_ROUTE_3, NORTH | SOUTH + connection north, North, NORTH, 0, 0, 10 + connection south, BullForest, BULL_FOREST, -3, 2, 16 diff --git a/data/maps/maps.asm b/data/maps/maps.asm index 28ba8f4..1332a0e 100644 --- a/data/maps/maps.asm +++ b/data/maps/maps.asm @@ -35,244 +35,244 @@ MapGroupPointers: dw MapGroup_Empty MapGroup_SilentHill: - map Route1P1, TILESET_SILENT_HILL, ROUTE, LANDMARK_MT_FUJI - map Route1P2, TILESET_SILENT_HILL, ROUTE, LANDMARK_SOUTH - map RouteSilentEast, TILESET_SILENT_HILL, ROUTE, LANDMARK_BLUE_FOREST - map SilentHill, TILESET_SILENT_HILL, TOWN, LANDMARK_STAND - map Route1Gate1F, TILESET_ROUTE_GATE, GATE, LANDMARK_SOUTH - map Route1Gate2F, TILESET_ROUTE_GATE, GATE, LANDMARK_SOUTH - map RouteSilentEastGate, TILESET_ROUTE_GATE, GATE, LANDMARK_BLUE_FOREST - map PlayerHouse1F, TILESET_HOUSE, INDOOR, LANDMARK_STAND - map PlayerHouse2F, TILESET_HOUSE, INDOOR, LANDMARK_STAND - map SilentPokecenter, TILESET_POKECENTER, INDOOR, LANDMARK_STAND - map SilentHillHouse, TILESET_HOUSE, INDOOR, LANDMARK_STAND - map SilentHillLab, TILESET_LAB, INDOOR, LANDMARK_STAND - map SilentHillLab2, TILESET_LAB, INDOOR, LANDMARK_STAND - map Unused13, TILESET_LAB, INDOOR, LANDMARK_STAND + map Route1P1, TILESET_SILENT_HILL, ROUTE, LANDMARK_ROUTE_1_P1 + map Route1P2, TILESET_SILENT_HILL, ROUTE, LANDMARK_ROUTE_1_P2 + map RouteSilentEast, TILESET_SILENT_HILL, ROUTE, LANDMARK_ROUTE_SILENT_EAST + map SilentHill, TILESET_SILENT_HILL, TOWN, LANDMARK_SILENT_HILL + map Route1Gate1F, TILESET_ROUTE_GATE, GATE, LANDMARK_ROUTE_1_P2 + map Route1Gate2F, TILESET_ROUTE_GATE, GATE, LANDMARK_ROUTE_1_P2 + map RouteSilentEastGate, TILESET_ROUTE_GATE, GATE, LANDMARK_ROUTE_SILENT_EAST + map PlayerHouse1F, TILESET_HOUSE, INDOOR, LANDMARK_SILENT_HILL + map PlayerHouse2F, TILESET_HOUSE, INDOOR, LANDMARK_SILENT_HILL + map SilentPokecenter, TILESET_POKECENTER, INDOOR, LANDMARK_SILENT_HILL + map SilentHillHouse, TILESET_HOUSE, INDOOR, LANDMARK_SILENT_HILL + map SilentHillLab, TILESET_LAB, INDOOR, LANDMARK_SILENT_HILL + map SilentHillLab2, TILESET_LAB, INDOOR, LANDMARK_SILENT_HILL + map Unused13, TILESET_LAB, INDOOR, LANDMARK_SILENT_HILL map ShizukanaOka, TILESET_FOREST, CAVE, LANDMARK_NONE MapGroup_OldCity: - map Route2, TILESET_OLD_CITY, ROUTE, LANDMARK_ROUTE_15 - map OldCity, TILESET_OLD_CITY, TOWN, LANDMARK_NORTH - map Route2Gate1F, TILESET_ROUTE_GATE, GATE, LANDMARK_ROUTE_15 - map Route2Gate2F, TILESET_ROUTE_GATE, GATE, LANDMARK_ROUTE_15 - map Route2House, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_15 - map OldCityMuseum, TILESET_TOWER, INDOOR, LANDMARK_NORTH - map OldCityGym, TILESET_GYM, INDOOR, LANDMARK_NORTH - map OldCityTower1F, TILESET_TOWER, INDOOR, LANDMARK_NORTH - map OldCityTower2F, TILESET_TOWER, INDOOR, LANDMARK_NORTH - map OldCityTower3F, TILESET_TOWER, INDOOR, LANDMARK_NORTH - map OldCityTower4F, TILESET_TOWER, INDOOR, LANDMARK_NORTH - map OldCityTower5F, TILESET_TOWER, INDOOR, LANDMARK_NORTH - map OldCityBillsHouse, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_NORTH - map OldCityMart, TILESET_MART, INDOOR, LANDMARK_NORTH - map OldCityHouse, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_NORTH - map OldCityPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_NORTH - map OldCityPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_NORTH - map OldCityPokecenterTrade, TILESET_ROUTE_GATE, GATE, LANDMARK_NORTH - map OldCityPokecenterBattle, TILESET_ROUTE_GATE, GATE, LANDMARK_NORTH - map OldCityPokecenterTimeMachine, TILESET_POKECENTER, INDOOR, LANDMARK_NORTH - map OldCityKurtsHouse, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_NORTH - map OldCitySchool, TILESET_TOWER, INDOOR, LANDMARK_NORTH + map Route2, TILESET_OLD_CITY, ROUTE, LANDMARK_ROUTE_2 + map OldCity, TILESET_OLD_CITY, TOWN, LANDMARK_OLD_CITY + map Route2Gate1F, TILESET_ROUTE_GATE, GATE, LANDMARK_ROUTE_2 + map Route2Gate2F, TILESET_ROUTE_GATE, GATE, LANDMARK_ROUTE_2 + map Route2House, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_2 + map OldCityMuseum, TILESET_TOWER, INDOOR, LANDMARK_OLD_CITY + map OldCityGym, TILESET_GYM, INDOOR, LANDMARK_OLD_CITY + map OldCityTower1F, TILESET_TOWER, INDOOR, LANDMARK_OLD_CITY + map OldCityTower2F, TILESET_TOWER, INDOOR, LANDMARK_OLD_CITY + map OldCityTower3F, TILESET_TOWER, INDOOR, LANDMARK_OLD_CITY + map OldCityTower4F, TILESET_TOWER, INDOOR, LANDMARK_OLD_CITY + map OldCityTower5F, TILESET_TOWER, INDOOR, LANDMARK_OLD_CITY + map OldCityBillsHouse, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_OLD_CITY + map OldCityMart, TILESET_MART, INDOOR, LANDMARK_OLD_CITY + map OldCityHouse, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_OLD_CITY + map OldCityPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_OLD_CITY + map OldCityPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_OLD_CITY + map OldCityPokecenterTrade, TILESET_ROUTE_GATE, GATE, LANDMARK_OLD_CITY + map OldCityPokecenterBattle, TILESET_ROUTE_GATE, GATE, LANDMARK_OLD_CITY + map OldCityPokecenterTimeMachine, TILESET_POKECENTER, INDOOR, LANDMARK_OLD_CITY + map OldCityKurtsHouse, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_OLD_CITY + map OldCitySchool, TILESET_TOWER, INDOOR, LANDMARK_OLD_CITY MapGroup_West: - map West, TILESET_WEST, TOWN, LANDMARK_ROUTE_18 - map WestMart1F, TILESET_BIG_MART, INDOOR, LANDMARK_ROUTE_18 - map WestMart2F, TILESET_BIG_MART, INDOOR, LANDMARK_ROUTE_18 - map WestMart3F, TILESET_BIG_MART, INDOOR, LANDMARK_ROUTE_18 - map WestMart4F, TILESET_BIG_MART, INDOOR, LANDMARK_ROUTE_18 - map WestMart5F, TILESET_BIG_MART, INDOOR, LANDMARK_ROUTE_18 - map WestMart6F, TILESET_BIG_MART, INDOOR, LANDMARK_ROUTE_18 - map WestMartElevator, TILESET_BIG_MART, INDOOR, LANDMARK_ROUTE_18 - map WestRadioTower1F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_ROUTE_18 - map WestRadioTower2F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_ROUTE_18 - map WestRadioTower3F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_ROUTE_18 - map WestRadioTower4F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_ROUTE_18 - map WestRadioTower5F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_ROUTE_18 - map WestRocketRaidedHouse, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_18 - map WestPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_ROUTE_18 - map WestPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_ROUTE_18 - map WestGym, TILESET_GYM, INDOOR, LANDMARK_ROUTE_18 - map WestHouse1, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_18 - map WestHouse2, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_18 + map West, TILESET_WEST, TOWN, LANDMARK_WEST + map WestMart1F, TILESET_BIG_MART, INDOOR, LANDMARK_WEST + map WestMart2F, TILESET_BIG_MART, INDOOR, LANDMARK_WEST + map WestMart3F, TILESET_BIG_MART, INDOOR, LANDMARK_WEST + map WestMart4F, TILESET_BIG_MART, INDOOR, LANDMARK_WEST + map WestMart5F, TILESET_BIG_MART, INDOOR, LANDMARK_WEST + map WestMart6F, TILESET_BIG_MART, INDOOR, LANDMARK_WEST + map WestMartElevator, TILESET_BIG_MART, INDOOR, LANDMARK_WEST + map WestRadioTower1F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_WEST + map WestRadioTower2F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_WEST + map WestRadioTower3F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_WEST + map WestRadioTower4F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_WEST + map WestRadioTower5F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_WEST + map WestRocketRaidedHouse, TILESET_HOUSE, INDOOR, LANDMARK_WEST + map WestPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_WEST + map WestPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_WEST + map WestGym, TILESET_GYM, INDOOR, LANDMARK_WEST + map WestHouse1, TILESET_HOUSE, INDOOR, LANDMARK_WEST + map WestHouse2, TILESET_HOUSE, INDOOR, LANDMARK_WEST MapGroup_Haiteku: - map HaitekuWestRoute, TILESET_HAITEKU, ROUTE, LANDMARK_POKEMON_LEAGUE_3 - map HaitekuWestRouteOcean, TILESET_HAITEKU, ROUTE, LANDMARK_POKEMON_LEAGUE_2 - map Haiteku, TILESET_HAITEKU, TOWN, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuWestRouteGate, TILESET_ROUTE_GATE, GATE, LANDMARK_POKEMON_LEAGUE_2 - map HaitekuPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuLeague1F, TILESET_TOWER, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuLeague2F, TILESET_GYM, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuMart, TILESET_MART, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuHouse1, TILESET_HOUSE, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuHouse2, TILESET_HOUSE, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuImposterOakHouse, TILESET_HOUSE, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuAquarium1F, TILESET_AQUARIUM, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuAquarium2F, TILESET_AQUARIUM, INDOOR, LANDMARK_POKEMON_LEAGUE_4 + map HaitekuWestRoute, TILESET_HAITEKU, ROUTE, LANDMARK_HAITEKU_WEST_ROUTE + map HaitekuWestRouteOcean, TILESET_HAITEKU, ROUTE, LANDMARK_HAITEKU_WEST_ROUTE_OCEAN + map Haiteku, TILESET_HAITEKU, TOWN, LANDMARK_HAITEKU + map HaitekuWestRouteGate, TILESET_ROUTE_GATE, GATE, LANDMARK_HAITEKU_WEST_ROUTE_OCEAN + map HaitekuPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_HAITEKU + map HaitekuPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_HAITEKU + map HaitekuLeague1F, TILESET_TOWER, INDOOR, LANDMARK_HAITEKU + map HaitekuLeague2F, TILESET_GYM, INDOOR, LANDMARK_HAITEKU + map HaitekuMart, TILESET_MART, INDOOR, LANDMARK_HAITEKU + map HaitekuHouse1, TILESET_HOUSE, INDOOR, LANDMARK_HAITEKU + map HaitekuHouse2, TILESET_HOUSE, INDOOR, LANDMARK_HAITEKU + map HaitekuImposterOakHouse, TILESET_HOUSE, INDOOR, LANDMARK_HAITEKU + map HaitekuAquarium1F, TILESET_AQUARIUM, INDOOR, LANDMARK_HAITEKU + map HaitekuAquarium2F, TILESET_AQUARIUM, INDOOR, LANDMARK_HAITEKU MapGroup_Fonto: - map FontoRoute1, TILESET_FONTO, ROUTE, LANDMARK_POKEMON_LEAGUE_1_2 - map FontoRoute2, TILESET_FONTO, ROUTE, LANDMARK_HIDEOUT_3 - map FontoRoute3, TILESET_FONTO, ROUTE, LANDMARK_HIDEOUT_1 - map FontoRoute4, TILESET_FONTO, ROUTE, LANDMARK_POKEMON_LEAGUE_6 - map FontoRoute5, TILESET_FONTO, ROUTE, LANDMARK_SLOWPOKE_WELL_2 - map FontoRoute6, TILESET_FONTO, ROUTE, LANDMARK_SLOWPOKE_WELL_1 - map Fonto, TILESET_FONTO, TOWN, LANDMARK_HIDEOUT_2 - map FontoRouteGate1, TILESET_ROUTE_GATE, GATE, LANDMARK_POKEMON_LEAGUE_1_2 - map FontoRouteGate2, TILESET_ROUTE_GATE, GATE, LANDMARK_POKEMON_LEAGUE_6 - map FontoRouteGate3, TILESET_ROUTE_GATE, GATE, LANDMARK_SLOWPOKE_WELL_2 - map FontoRocketHouse, TILESET_ROCKET_HOUSE, INDOOR, LANDMARK_HIDEOUT_2 - map FontoMart, TILESET_MART, INDOOR, LANDMARK_HIDEOUT_2 - map FontoHouse, TILESET_HOUSE, INDOOR, LANDMARK_HIDEOUT_2 - map FontoPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_HIDEOUT_2 - map FontoPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_HIDEOUT_2 - map FontoLab, TILESET_LAB, INDOOR, LANDMARK_HIDEOUT_2 + map FontoRoute1, TILESET_FONTO, ROUTE, LANDMARK_FONTO_ROUTE_1 + map FontoRoute2, TILESET_FONTO, ROUTE, LANDMARK_FONTO_ROUTE_2 + map FontoRoute3, TILESET_FONTO, ROUTE, LANDMARK_FONTO_ROUTE_3 + map FontoRoute4, TILESET_FONTO, ROUTE, LANDMARK_FONTO_ROUTE_4 + map FontoRoute5, TILESET_FONTO, ROUTE, LANDMARK_FONTO_ROUTE_5 + map FontoRoute6, TILESET_FONTO, ROUTE, LANDMARK_FONTO_ROUTE_6 + map Fonto, TILESET_FONTO, TOWN, LANDMARK_FONTO + map FontoRouteGate1, TILESET_ROUTE_GATE, GATE, LANDMARK_FONTO_ROUTE_1 + map FontoRouteGate2, TILESET_ROUTE_GATE, GATE, LANDMARK_FONTO_ROUTE_4 + map FontoRouteGate3, TILESET_ROUTE_GATE, GATE, LANDMARK_FONTO_ROUTE_5 + map FontoRocketHouse, TILESET_ROCKET_HOUSE, INDOOR, LANDMARK_FONTO + map FontoMart, TILESET_MART, INDOOR, LANDMARK_FONTO + map FontoHouse, TILESET_HOUSE, INDOOR, LANDMARK_FONTO + map FontoPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_FONTO + map FontoPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_FONTO + map FontoLab, TILESET_LAB, INDOOR, LANDMARK_FONTO MapGroup_Baadon: - map BaadonRoute1, TILESET_BAADON, ROUTE, LANDMARK_POWER_PLANT_1 - map BaadonRoute2, TILESET_BAADON, ROUTE, LANDMARK_POWER_PLANT_3 - map BaadonRoute3, TILESET_BAADON, ROUTE, LANDMARK_POWER_PLANT_4 - map Baadon, TILESET_BAADON, TOWN, LANDMARK_POWER_PLANT_2 - map BaadonRouteGateWest, TILESET_ROUTE_GATE, GATE, LANDMARK_POWER_PLANT_1 - map BaadonRouteGateNewtype, TILESET_ROUTE_GATE, GATE, LANDMARK_POWER_PLANT_4 - map BaadonMart, TILESET_MART, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonHouse1, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonWallpaperHouse, TILESET_AQUARIUM, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonHouse2, TILESET_HOUSE, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonLeague1F, TILESET_TOWER, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonLeague2F, TILESET_GYM, INDOOR, LANDMARK_POWER_PLANT_2 + map BaadonRoute1, TILESET_BAADON, ROUTE, LANDMARK_BAADON_ROUTE_1 + map BaadonRoute2, TILESET_BAADON, ROUTE, LANDMARK_BAADON_ROUTE_2 + map BaadonRoute3, TILESET_BAADON, ROUTE, LANDMARK_BAADON_ROUTE_3 + map Baadon, TILESET_BAADON, TOWN, LANDMARK_BAADON + map BaadonRouteGateWest, TILESET_ROUTE_GATE, GATE, LANDMARK_BAADON_ROUTE_1 + map BaadonRouteGateNewtype, TILESET_ROUTE_GATE, GATE, LANDMARK_BAADON_ROUTE_3 + map BaadonMart, TILESET_MART, INDOOR, LANDMARK_BAADON + map BaadonPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_BAADON + map BaadonPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_BAADON + map BaadonHouse1, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_BAADON + map BaadonWallpaperHouse, TILESET_AQUARIUM, INDOOR, LANDMARK_BAADON + map BaadonHouse2, TILESET_HOUSE, INDOOR, LANDMARK_BAADON + map BaadonLeague1F, TILESET_TOWER, INDOOR, LANDMARK_BAADON + map BaadonLeague2F, TILESET_GYM, INDOOR, LANDMARK_BAADON MapGroup_Newtype: - map Route15, TILESET_SILENT_HILL, ROUTE, LANDMARK_RUINS_1 - map NewtypeRoute, TILESET_SILENT_HILL, ROUTE, LANDMARK_MINES_3 - map Route18, TILESET_SILENT_HILL, ROUTE, LANDMARK_MINES_4 - map Newtype, TILESET_SILENT_HILL, TOWN, LANDMARK_RUINS_2 - map Route15Pokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_RUINS_1 - map Route15Pokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_RUINS_1 - map NewtypeRouteGate, TILESET_ROUTE_GATE, GATE, LANDMARK_MINES_4 - map Route18Pokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_MINES_4 - map Route18Pokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_MINES_4 - map NewtypePokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_RUINS_2 - map NewtypePokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_RUINS_2 - map NewtypeLeague1F, TILESET_TOWER, INDOOR, LANDMARK_RUINS_2 - map NewtypeLeague2F, TILESET_GYM, INDOOR, LANDMARK_RUINS_2 - map NewtypeSailorHouse, TILESET_HOUSE, INDOOR, LANDMARK_RUINS_2 - map NewtypeMart, TILESET_MART, INDOOR, LANDMARK_RUINS_2 - map NewtypeDojo, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_RUINS_2 - map NewtypeHouse1, TILESET_HOUSE, INDOOR, LANDMARK_RUINS_2 - map NewtypeDiner, TILESET_AQUARIUM, INDOOR, LANDMARK_RUINS_2 - map NewtypeHouse2, TILESET_HOUSE, INDOOR, LANDMARK_RUINS_2 - map NewtypeHouse3, TILESET_HOUSE, INDOOR, LANDMARK_RUINS_2 + map Route15, TILESET_SILENT_HILL, ROUTE, LANDMARK_ROUTE_15 + map NewtypeRoute, TILESET_SILENT_HILL, ROUTE, LANDMARK_NEWTYPE_ROUTE + map Route18, TILESET_SILENT_HILL, ROUTE, LANDMARK_ROUTE_18 + map Newtype, TILESET_SILENT_HILL, TOWN, LANDMARK_NEWTYPE + map Route15Pokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_ROUTE_15 + map Route15Pokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_ROUTE_15 + map NewtypeRouteGate, TILESET_ROUTE_GATE, GATE, LANDMARK_ROUTE_18 + map Route18Pokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_ROUTE_18 + map Route18Pokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_ROUTE_18 + map NewtypePokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_NEWTYPE + map NewtypePokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_NEWTYPE + map NewtypeLeague1F, TILESET_TOWER, INDOOR, LANDMARK_NEWTYPE + map NewtypeLeague2F, TILESET_GYM, INDOOR, LANDMARK_NEWTYPE + map NewtypeSailorHouse, TILESET_HOUSE, INDOOR, LANDMARK_NEWTYPE + map NewtypeMart, TILESET_MART, INDOOR, LANDMARK_NEWTYPE + map NewtypeDojo, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_NEWTYPE + map NewtypeHouse1, TILESET_HOUSE, INDOOR, LANDMARK_NEWTYPE + map NewtypeDiner, TILESET_AQUARIUM, INDOOR, LANDMARK_NEWTYPE + map NewtypeHouse2, TILESET_HOUSE, INDOOR, LANDMARK_NEWTYPE + map NewtypeHouse3, TILESET_HOUSE, INDOOR, LANDMARK_NEWTYPE MapGroup_Sugar: - map SugarRoute, TILESET_HAITEKU, ROUTE, LANDMARK_MINES_1 - map Sugar, TILESET_HAITEKU, TOWN, LANDMARK_MINES_2 - map SugarRouteGate, TILESET_ROUTE_GATE, GATE, LANDMARK_MINES_1 - map SugarHouse, TILESET_GYM, INDOOR, LANDMARK_MINES_2 - map SugarHouse2, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_MINES_2 - map SugarMart, TILESET_MART, INDOOR, LANDMARK_MINES_2 - map SugarPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_MINES_2 - map SugarPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_MINES_2 + map SugarRoute, TILESET_HAITEKU, ROUTE, LANDMARK_SUGAR_ROUTE + map Sugar, TILESET_HAITEKU, TOWN, LANDMARK_SUGAR + map SugarRouteGate, TILESET_ROUTE_GATE, GATE, LANDMARK_SUGAR_ROUTE + map SugarHouse, TILESET_GYM, INDOOR, LANDMARK_SUGAR + map SugarHouse2, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_SUGAR + map SugarMart, TILESET_MART, INDOOR, LANDMARK_SUGAR + map SugarPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_SUGAR + map SugarPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_SUGAR MapGroup_Bull: - map BullForestRoute1, TILESET_BULL_FOREST, ROUTE, LANDMARK_MINES_5 - map BullForestRoute2, TILESET_BULL_FOREST, ROUTE, LANDMARK_HIGH_TECH - map BullForestRoute3, TILESET_BULL_FOREST, ROUTE, LANDMARK_OLD - map BullForest, TILESET_BULL_FOREST, TOWN, LANDMARK_WEST - map BullForestRoute1House, TILESET_HOUSE, INDOOR, LANDMARK_MINES_5 - map BullForestRouteGateStand, TILESET_ROUTE_GATE, GATE, LANDMARK_HIGH_TECH - map BullMart, TILESET_MART, INDOOR, LANDMARK_WEST - map BullHouse1, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_WEST - map BullHouse2, TILESET_HOUSE, INDOOR, LANDMARK_WEST - map BullHouse3, TILESET_HOUSE, INDOOR, LANDMARK_WEST - map BullPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_WEST - map BullPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_WEST - map BullLeague1F, TILESET_TOWER, INDOOR, LANDMARK_WEST - map BullLeague2F, TILESET_GYM, INDOOR, LANDMARK_WEST - map BullHouse4, TILESET_HOUSE, INDOOR, LANDMARK_WEST + map BullForestRoute1, TILESET_BULL_FOREST, ROUTE, LANDMARK_BULL_FOREST_ROUTE_1 + map BullForestRoute2, TILESET_BULL_FOREST, ROUTE, LANDMARK_BULL_FOREST_ROUTE_2 + map BullForestRoute3, TILESET_BULL_FOREST, ROUTE, LANDMARK_BULL_FOREST_ROUTE_3 + map BullForest, TILESET_BULL_FOREST, TOWN, LANDMARK_BULL_FOREST + map BullForestRoute1House, TILESET_HOUSE, INDOOR, LANDMARK_BULL_FOREST_ROUTE_1 + map BullForestRouteGateStand, TILESET_ROUTE_GATE, GATE, LANDMARK_BULL_FOREST_ROUTE_2 + map BullMart, TILESET_MART, INDOOR, LANDMARK_BULL_FOREST + map BullHouse1, TILESET_JAPANESE_HOUSE, INDOOR, LANDMARK_BULL_FOREST + map BullHouse2, TILESET_HOUSE, INDOOR, LANDMARK_BULL_FOREST + map BullHouse3, TILESET_HOUSE, INDOOR, LANDMARK_BULL_FOREST + map BullPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_BULL_FOREST + map BullPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_BULL_FOREST + map BullLeague1F, TILESET_TOWER, INDOOR, LANDMARK_BULL_FOREST + map BullLeague2F, TILESET_GYM, INDOOR, LANDMARK_BULL_FOREST + map BullHouse4, TILESET_HOUSE, INDOOR, LANDMARK_BULL_FOREST MapGroup_Stand: - map StandRoute, TILESET_SILENT_HILL, ROUTE, LANDMARK_BIRDON - map Stand, TILESET_SILENT_HILL, TOWN, LANDMARK_FOUNT - map StandRouteGateKanto, TILESET_ROUTE_GATE, GATE, LANDMARK_BIRDON - map StandLab, TILESET_POKECENTER, INDOOR, LANDMARK_FOUNT - map StandPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_FOUNT - map StandPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_FOUNT - map StandOffice, TILESET_RADIO_TOWER, INDOOR, LANDMARK_FOUNT - map StandMart, TILESET_MART, INDOOR, LANDMARK_FOUNT - map StandHouse, TILESET_HOUSE, INDOOR, LANDMARK_FOUNT - map StandRocketHouse1F, TILESET_ROCKET_HOUSE, INDOOR, LANDMARK_FOUNT - map StandRocketHouse2F, TILESET_ROCKET_HOUSE, INDOOR, LANDMARK_FOUNT - map StandLeague1F, TILESET_TOWER, INDOOR, LANDMARK_FOUNT - map StandLeague2F, TILESET_GYM, INDOOR, LANDMARK_FOUNT + map StandRoute, TILESET_SILENT_HILL, ROUTE, LANDMARK_STAND_ROUTE + map Stand, TILESET_SILENT_HILL, TOWN, LANDMARK_STAND + map StandRouteGateKanto, TILESET_ROUTE_GATE, GATE, LANDMARK_STAND_ROUTE + map StandLab, TILESET_POKECENTER, INDOOR, LANDMARK_STAND + map StandPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_STAND + map StandPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_STAND + map StandOffice, TILESET_RADIO_TOWER, INDOOR, LANDMARK_STAND + map StandMart, TILESET_MART, INDOOR, LANDMARK_STAND + map StandHouse, TILESET_HOUSE, INDOOR, LANDMARK_STAND + map StandRocketHouse1F, TILESET_ROCKET_HOUSE, INDOOR, LANDMARK_STAND + map StandRocketHouse2F, TILESET_ROCKET_HOUSE, INDOOR, LANDMARK_STAND + map StandLeague1F, TILESET_TOWER, INDOOR, LANDMARK_STAND + map StandLeague2F, TILESET_GYM, INDOOR, LANDMARK_STAND MapGroup_Kanto: - map KantoEastRoute, TILESET_KANTO, ROUTE, LANDMARK_NEW_TYPE - map Kanto, TILESET_KANTO, TOWN, LANDMARK_SUGAR - map KantoCeruleanHouse, TILESET_ROUTE_GATE, GATE, LANDMARK_SUGAR - map KantoPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_SUGAR - map KantoPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_SUGAR - map KantoLeague1F, TILESET_TOWER, INDOOR, LANDMARK_SUGAR - map KantoLeague2F, TILESET_GYM, INDOOR, LANDMARK_SUGAR - map KantoLavenderHouse, TILESET_HOUSE, INDOOR, LANDMARK_SUGAR - map KantoCeladonMart1F, TILESET_BIG_MART, INDOOR, LANDMARK_SUGAR - map KantoCeladonMart2F, TILESET_BIG_MART, INDOOR, LANDMARK_SUGAR - map KantoCeladonMart3F, TILESET_BIG_MART, INDOOR, LANDMARK_SUGAR - map KantoCeladonMart4F, TILESET_BIG_MART, INDOOR, LANDMARK_SUGAR - map KantoCeladonMart5F, TILESET_BIG_MART, INDOOR, LANDMARK_SUGAR - map KantoCeladonElevator, TILESET_BIG_MART, INDOOR, LANDMARK_SUGAR - map KantoMart, TILESET_MART, INDOOR, LANDMARK_SUGAR - map KantoGamefreakHQ1, TILESET_LAB, INDOOR, LANDMARK_SUGAR - map KantoGamefreakHQ2, TILESET_LAB, INDOOR, LANDMARK_SUGAR - map KantoGamefreakHQ3, TILESET_LAB, INDOOR, LANDMARK_SUGAR - map KantoGamefreakHQ4, TILESET_MART, INDOOR, LANDMARK_SUGAR - map KantoGamefreakHQ5, TILESET_LAB, INDOOR, LANDMARK_SUGAR - map KantoSilphCo, TILESET_ROCKET_HOUSE, INDOOR, LANDMARK_SUGAR - map KantoViridianHouse, TILESET_HOUSE, INDOOR, LANDMARK_SUGAR - map KantoGameCorner, TILESET_AQUARIUM, INDOOR, LANDMARK_SUGAR - map KantoUnusedArea, TILESET_ROUTE_GATE, INDOOR, LANDMARK_SUGAR - map KantoGameCornerPrizes, TILESET_AQUARIUM, INDOOR, LANDMARK_SUGAR - map KantoDiner, TILESET_AQUARIUM, INDOOR, LANDMARK_SUGAR - map KantoSchool, TILESET_TOWER, INDOOR, LANDMARK_SUGAR - map KantoHospital, TILESET_BIG_MART, INDOOR, LANDMARK_SUGAR - map KantoPokecenter21F, TILESET_POKECENTER, INDOOR, LANDMARK_SUGAR - map KantoPokecenter22F, TILESET_POKECENTER, INDOOR, LANDMARK_SUGAR - map KantoRedsHouse, TILESET_HOUSE, INDOOR, LANDMARK_SUGAR - map KantoGreensHouse1F, TILESET_HOUSE, INDOOR, LANDMARK_SUGAR - map KantoGreensHouse2F, TILESET_HOUSE, INDOOR, LANDMARK_SUGAR - map KantoEldersHouse, TILESET_HOUSE, INDOOR, LANDMARK_SUGAR - map KantoOaksLab, TILESET_LAB, INDOOR, LANDMARK_SUGAR - map KantoLeague21F, TILESET_TOWER, INDOOR, LANDMARK_SUGAR - map KantoLeague22F, TILESET_GYM, INDOOR, LANDMARK_SUGAR - map KantoFishingGuru, TILESET_HOUSE, INDOOR, LANDMARK_SUGAR + map KantoEastRoute, TILESET_KANTO, ROUTE, LANDMARK_KANTO_EAST_ROUTE + map Kanto, TILESET_KANTO, TOWN, LANDMARK_KANTO + map KantoCeruleanHouse, TILESET_ROUTE_GATE, GATE, LANDMARK_KANTO + map KantoPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_KANTO + map KantoPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_KANTO + map KantoLeague1F, TILESET_TOWER, INDOOR, LANDMARK_KANTO + map KantoLeague2F, TILESET_GYM, INDOOR, LANDMARK_KANTO + map KantoLavenderHouse, TILESET_HOUSE, INDOOR, LANDMARK_KANTO + map KantoCeladonMart1F, TILESET_BIG_MART, INDOOR, LANDMARK_KANTO + map KantoCeladonMart2F, TILESET_BIG_MART, INDOOR, LANDMARK_KANTO + map KantoCeladonMart3F, TILESET_BIG_MART, INDOOR, LANDMARK_KANTO + map KantoCeladonMart4F, TILESET_BIG_MART, INDOOR, LANDMARK_KANTO + map KantoCeladonMart5F, TILESET_BIG_MART, INDOOR, LANDMARK_KANTO + map KantoCeladonElevator, TILESET_BIG_MART, INDOOR, LANDMARK_KANTO + map KantoMart, TILESET_MART, INDOOR, LANDMARK_KANTO + map KantoGamefreakHQ1, TILESET_LAB, INDOOR, LANDMARK_KANTO + map KantoGamefreakHQ2, TILESET_LAB, INDOOR, LANDMARK_KANTO + map KantoGamefreakHQ3, TILESET_LAB, INDOOR, LANDMARK_KANTO + map KantoGamefreakHQ4, TILESET_MART, INDOOR, LANDMARK_KANTO + map KantoGamefreakHQ5, TILESET_LAB, INDOOR, LANDMARK_KANTO + map KantoSilphCo, TILESET_ROCKET_HOUSE, INDOOR, LANDMARK_KANTO + map KantoViridianHouse, TILESET_HOUSE, INDOOR, LANDMARK_KANTO + map KantoGameCorner, TILESET_AQUARIUM, INDOOR, LANDMARK_KANTO + map KantoUnusedArea, TILESET_ROUTE_GATE, INDOOR, LANDMARK_KANTO + map KantoGameCornerPrizes, TILESET_AQUARIUM, INDOOR, LANDMARK_KANTO + map KantoDiner, TILESET_AQUARIUM, INDOOR, LANDMARK_KANTO + map KantoSchool, TILESET_TOWER, INDOOR, LANDMARK_KANTO + map KantoHospital, TILESET_BIG_MART, INDOOR, LANDMARK_KANTO + map KantoPokecenter21F, TILESET_POKECENTER, INDOOR, LANDMARK_KANTO + map KantoPokecenter22F, TILESET_POKECENTER, INDOOR, LANDMARK_KANTO + map KantoRedsHouse, TILESET_HOUSE, INDOOR, LANDMARK_KANTO + map KantoGreensHouse1F, TILESET_HOUSE, INDOOR, LANDMARK_KANTO + map KantoGreensHouse2F, TILESET_HOUSE, INDOOR, LANDMARK_KANTO + map KantoEldersHouse, TILESET_HOUSE, INDOOR, LANDMARK_KANTO + map KantoOaksLab, TILESET_LAB, INDOOR, LANDMARK_KANTO + map KantoLeague21F, TILESET_TOWER, INDOOR, LANDMARK_KANTO + map KantoLeague22F, TILESET_GYM, INDOOR, LANDMARK_KANTO + map KantoFishingGuru, TILESET_HOUSE, INDOOR, LANDMARK_KANTO MapGroup_Prince: - map PrinceRoute, TILESET_SILENT_HILL, ROUTE, LANDMARK_KANTO - map Prince, TILESET_SILENT_HILL, TOWN, LANDMARK_KANTO + map PrinceRoute, TILESET_SILENT_HILL, ROUTE, LANDMARK_PRINCE + map Prince, TILESET_SILENT_HILL, TOWN, LANDMARK_PRINCE MapGroup_MtFuji: - map MtFujiRoute, TILESET_SILENT_HILL, ROUTE, LANDMARK_PRINCE - map MtFuji, TILESET_SILENT_HILL, TOWN, LANDMARK_PRINCE + map MtFujiRoute, TILESET_SILENT_HILL, ROUTE, LANDMARK_MT_FUJI + map MtFuji, TILESET_SILENT_HILL, TOWN, LANDMARK_MT_FUJI MapGroup_South: - map South, TILESET_SOUTH, TOWN, LANDMARK_POKEMON_LEAGUE_1 - map SouthHouse1, TILESET_HOUSE, INDOOR, LANDMARK_POKEMON_LEAGUE_1 - map SouthPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_POKEMON_LEAGUE_1 - map SouthPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_POKEMON_LEAGUE_1 - map SouthMart, TILESET_MART, INDOOR, LANDMARK_POKEMON_LEAGUE_1 - map SouthHouse2, TILESET_HOUSE, INDOOR, LANDMARK_POKEMON_LEAGUE_1 + map South, TILESET_SOUTH, TOWN, LANDMARK_SOUTH + map SouthHouse1, TILESET_HOUSE, INDOOR, LANDMARK_SOUTH + map SouthPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_SOUTH + map SouthPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_SOUTH + map SouthMart, TILESET_MART, INDOOR, LANDMARK_SOUTH + map SouthHouse2, TILESET_HOUSE, INDOOR, LANDMARK_SOUTH MapGroup_North: - map North, TILESET_BULL_FOREST, TOWN, LANDMARK_SILENT - map NorthHouse1, TILESET_HOUSE, INDOOR, LANDMARK_SILENT - map NorthMart, TILESET_MART, INDOOR, LANDMARK_SILENT - map NorthHouse2, TILESET_HOUSE, INDOOR, LANDMARK_SILENT - map NorthPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_SILENT - map NorthPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_SILENT + map North, TILESET_BULL_FOREST, TOWN, LANDMARK_NORTH + map NorthHouse1, TILESET_HOUSE, INDOOR, LANDMARK_NORTH + map NorthMart, TILESET_MART, INDOOR, LANDMARK_NORTH + map NorthHouse2, TILESET_HOUSE, INDOOR, LANDMARK_NORTH + map NorthPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_NORTH + map NorthPokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_NORTH MapGroup_Misc: map PowerPlant1, TILESET_POWER_PLANT, INDOOR, LANDMARK_NONE diff --git a/data/predef_pointers.inc b/data/predef_pointers.inc index 3ee6205..f10af54 100644 --- a/data/predef_pointers.inc +++ b/data/predef_pointers.inc @@ -12,10 +12,10 @@ PredefPointers:: ; 1:62d3 ; WE NEED LABELS! ; Thank youu~ add_predef Function6445 ; 0 - add_predef Function5d27 + add_predef IntroDisplayPicCenteredOrUpperRight add_predef Function6713 add_predef Function66b1 - add_predef Function4031 + add_predef DebugMenu add_predef GetItemAmount add_predef HealParty add_predef AddBCD diff --git a/data/trainers/parties.asm b/data/trainers/parties.asm index 8c702d1..013cf58 100644 --- a/data/trainers/parties.asm +++ b/data/trainers/parties.asm @@ -9,7 +9,7 @@ INCLUDE "constants.asm" ; * for TRAINERTYPE_ITEM_MOVES: db level, species, item, 4 moves ; - db -1 ; end -SECTION "Trainer Parties", ROMX[$5110], BANK[$E] +SECTION "Trainer Parties", ROMX[$5110], BANK[$0E] INCLUDE "data/trainers/party_pointers.inc" @@ -622,7 +622,7 @@ KimonoGirlGroup:: else -SECTION "Trainer Parties 1 TEMPORARY", ROMX[$51BF],BANK[$E] +SECTION "Trainer Parties 1 TEMPORARY", ROMX[$51BF], BANK[$0E] AkaneGroup:: BugCatcherBoyGroup:: ; BUG_CATCHER_BOY_KENJI @@ -635,47 +635,47 @@ BugCatcherBoyGroup:: db 7, DEX_KONGPANG, ITEM_NONE, MOVE_STUN_SPORE, MOVE_LEECH_LIFE, MOVE_NONE, MOVE_NONE db -1 ; end -SECTION "Trainer Parties 2 TEMPORARY", ROMX[$52B4],BANK[$E] +SECTION "Trainer Parties 2 TEMPORARY", ROMX[$52B4], BANK[$0E] MikanGroup:: -SECTION "Trainer Parties 3 TEMPORARY", ROMX[$53BC],BANK[$E] +SECTION "Trainer Parties 3 TEMPORARY", ROMX[$53BC], BANK[$0E] OkidoGroup:: -SECTION "Trainer Parties 4 TEMPORARY", ROMX[$54BA],BANK[$E] +SECTION "Trainer Parties 4 TEMPORARY", ROMX[$54BA], BANK[$0E] WataruGroup:: -SECTION "Trainer Parties 5 TEMPORARY", ROMX[$54E0],BANK[$E] +SECTION "Trainer Parties 5 TEMPORARY", ROMX[$54E0], BANK[$0E] GerugeMemberMGroup:: -SECTION "Trainer Parties 6 TEMPORARY", ROMX[$54FE],BANK[$E] +SECTION "Trainer Parties 6 TEMPORARY", ROMX[$54FE], BANK[$0E] Trio1Group:: BeautyGroup:: -SECTION "Trainer Parties 7 TEMPORARY", ROMX[$55EB],BANK[$E] +SECTION "Trainer Parties 7 TEMPORARY", ROMX[$55EB], BANK[$0E] FledglingGroup:: -SECTION "Trainer Parties 8 TEMPORARY", ROMX[$56CE],BANK[$E] +SECTION "Trainer Parties 8 TEMPORARY", ROMX[$56CE], BANK[$0E] PokeManiacGroup:: -SECTION "Trainer Parties 9 TEMPORARY", ROMX[$57BC],BANK[$E] +SECTION "Trainer Parties 9 TEMPORARY", ROMX[$57BC], BANK[$0E] GentlemanGroup:: -SECTION "Trainer Parties 10 TEMPORARY", ROMX[$57E0],BANK[$E] +SECTION "Trainer Parties 10 TEMPORARY", ROMX[$57E0], BANK[$0E] TeacherMGroup:: -SECTION "Trainer Parties 11 TEMPORARY", ROMX[$57EC],BANK[$E] +SECTION "Trainer Parties 11 TEMPORARY", ROMX[$57EC], BANK[$0E] TeacherFGroup:: -SECTION "Trainer Parties 12 TEMPORARY", ROMX[$57F2],BANK[$E] +SECTION "Trainer Parties 12 TEMPORARY", ROMX[$57F2], BANK[$0E] ManchildGroup:: -SECTION "Trainer Parties 13 TEMPORARY", ROMX[$58C3],BANK[$E] +SECTION "Trainer Parties 13 TEMPORARY", ROMX[$58C3], BANK[$0E] RockerGroup:: -SECTION "Trainer Parties 14 TEMPORARY", ROMX[$58F2],BANK[$E] +SECTION "Trainer Parties 14 TEMPORARY", ROMX[$58F2], BANK[$0E] HikerGroup:: -SECTION "Trainer Parties 15 TEMPORARY", ROMX[$5995],BANK[$E] +SECTION "Trainer Parties 15 TEMPORARY", ROMX[$5995], BANK[$0E] KimonoGirlGroup:: ; KIMONO_GIRL_KOUME db "こうめ@", TRAINERTYPE_ITEM_MOVES @@ -687,112 +687,112 @@ KimonoGirlGroup:: db 10, DEX_PURIN, ITEM_NONE, MOVE_CHARM, MOVE_POUND, MOVE_ENCORE, MOVE_NONE db -1 ; end -SECTION "Trainer Parties 16 TEMPORARY", ROMX[$518A],BANK[$E] +SECTION "Trainer Parties 16 TEMPORARY", ROMX[$518A], BANK[$0E] HayatoGroup:: -SECTION "Trainer Parties 17 TEMPORARY", ROMX[$5216],BANK[$E] +SECTION "Trainer Parties 17 TEMPORARY", ROMX[$5216], BANK[$0E] TsukishiGroup:: LassGroup:: -SECTION "Trainer Parties 18 TEMPORARY", ROMX[$526F],BANK[$E] +SECTION "Trainer Parties 18 TEMPORARY", ROMX[$526F], BANK[$0E] EnokiGroup:: -SECTION "Trainer Parties 19 TEMPORARY", ROMX[$528F],BANK[$E] +SECTION "Trainer Parties 19 TEMPORARY", ROMX[$528F], BANK[$0E] OkeraGroup:: -SECTION "Trainer Parties 20 TEMPORARY", ROMX[$533D],BANK[$E] +SECTION "Trainer Parties 20 TEMPORARY", ROMX[$533D], BANK[$0E] GamaGroup:: -SECTION "Trainer Parties 21 TEMPORARY", ROMX[$5542],BANK[$E] +SECTION "Trainer Parties 21 TEMPORARY", ROMX[$5542], BANK[$0E] Trio2Group:: -SECTION "Trainer Parties 22 TEMPORARY", ROMX[$5554],BANK[$E] +SECTION "Trainer Parties 22 TEMPORARY", ROMX[$5554], BANK[$0E] Trio3Group:: -SECTION "Trainer Parties 23 TEMPORARY", ROMX[$5673],BANK[$E] +SECTION "Trainer Parties 23 TEMPORARY", ROMX[$5673], BANK[$0E] ProfessionalMGroup:: ProfessionalFGroup:: -SECTION "Trainer Parties 24 TEMPORARY", ROMX[$5812],BANK[$E] +SECTION "Trainer Parties 24 TEMPORARY", ROMX[$5812], BANK[$0E] SwimmerMGroup:: -SECTION "Trainer Parties 25 TEMPORARY", ROMX[$5821],BANK[$E] +SECTION "Trainer Parties 25 TEMPORARY", ROMX[$5821], BANK[$0E] SuperNerdGroup:: -SECTION "Trainer Parties 26 TEMPORARY", ROMX[$5833],BANK[$E] +SECTION "Trainer Parties 26 TEMPORARY", ROMX[$5833], BANK[$0E] EngineerGroup:: -SECTION "Trainer Parties 27 TEMPORARY", ROMX[$5965],BANK[$E] +SECTION "Trainer Parties 27 TEMPORARY", ROMX[$5965], BANK[$0E] JugglerGroup:: -SECTION "Trainer Parties 28 TEMPORARY", ROMX[$5971],BANK[$E] +SECTION "Trainer Parties 28 TEMPORARY", ROMX[$5971], BANK[$0E] TwinsGroup:: -SECTION "Trainer Parties 29 TEMPORARY", ROMX[$5976],BANK[$E] +SECTION "Trainer Parties 29 TEMPORARY", ROMX[$5976], BANK[$0E] SchoolboyGroup:: ; SCHOOLBOY_TETSUYA db "てつや@", TRAINERTYPE_ITEM db 8, DEX_YADOKING, ITEM_NONE db -1 ; end -SECTION "Trainer Parties 30 TEMPORARY", ROMX[$597F],BANK[$E] +SECTION "Trainer Parties 30 TEMPORARY", ROMX[$597F], BANK[$0E] FirebreatherGroup:: ; FIREBREATHER_AKITO db "あきと@", TRAINERTYPE_ITEM db 8, DEX_BOOBY, ITEM_NONE db -1 ; end -SECTION "Trainer Parties 31 TEMPORARY", ROMX[$5320],BANK[$E] +SECTION "Trainer Parties 31 TEMPORARY", ROMX[$5320], BANK[$0E] BlueGroup:: -SECTION "Trainer Parties 32 TEMPORARY", ROMX[$5375],BANK[$E] +SECTION "Trainer Parties 32 TEMPORARY", ROMX[$5375], BANK[$0E] RivalGroup:: -SECTION "Trainer Parties 33 TEMPORARY", ROMX[$5404],BANK[$E] +SECTION "Trainer Parties 33 TEMPORARY", ROMX[$5404], BANK[$0E] SakakiGroup:: -SECTION "Trainer Parties 34 TEMPORARY", ROMX[$5427],BANK[$E] +SECTION "Trainer Parties 34 TEMPORARY", ROMX[$5427], BANK[$0E] ProtagonistGroup:: -SECTION "Trainer Parties 35 TEMPORARY", ROMX[$5433],BANK[$E] +SECTION "Trainer Parties 35 TEMPORARY", ROMX[$5433], BANK[$0E] SibaGroup:: KasumiGroup:: FisherGroup:: -SECTION "Trainer Parties 36 TEMPORARY", ROMX[$5476],BANK[$E] +SECTION "Trainer Parties 36 TEMPORARY", ROMX[$5476], BANK[$0E] KannaGroup:: -SECTION "Trainer Parties 37 TEMPORARY", ROMX[$555D],BANK[$E] +SECTION "Trainer Parties 37 TEMPORARY", ROMX[$555D], BANK[$0E] RocketFGroup:: -SECTION "Trainer Parties 38 TEMPORARY", ROMX[$557E],BANK[$E] +SECTION "Trainer Parties 38 TEMPORARY", ROMX[$557E], BANK[$0E] YoungsterGroup:: -SECTION "Trainer Parties 39 TEMPORARY", ROMX[$564F],BANK[$E] +SECTION "Trainer Parties 39 TEMPORARY", ROMX[$564F], BANK[$0E] ProdigyGroup:: -SECTION "Trainer Parties 40 TEMPORARY", ROMX[$578C],BANK[$E] +SECTION "Trainer Parties 40 TEMPORARY", ROMX[$578C], BANK[$0E] RocketMGroup:: -SECTION "Trainer Parties 41 TEMPORARY", ROMX[$5808],BANK[$E] +SECTION "Trainer Parties 41 TEMPORARY", ROMX[$5808], BANK[$0E] SwimmerFGroup:: -SECTION "Trainer Parties 42 TEMPORARY", ROMX[$5817],BANK[$E] +SECTION "Trainer Parties 42 TEMPORARY", ROMX[$5817], BANK[$0E] SailorGroup:: -SECTION "Trainer Parties 43 TEMPORARY", ROMX[$58FE],BANK[$E] +SECTION "Trainer Parties 43 TEMPORARY", ROMX[$58FE], BANK[$0E] BikerGroup:: -SECTION "Trainer Parties 44 TEMPORARY", ROMX[$594D],BANK[$E] +SECTION "Trainer Parties 44 TEMPORARY", ROMX[$594D], BANK[$0E] RockClimberGroup:: -SECTION "Trainer Parties 45 TEMPORARY", ROMX[$5959],BANK[$E] +SECTION "Trainer Parties 45 TEMPORARY", ROMX[$5959], BANK[$0E] BurglarGroup:: -SECTION "Trainer Parties 46 TEMPORARY", ROMX[$5969],BANK[$E] +SECTION "Trainer Parties 46 TEMPORARY", ROMX[$5969], BANK[$0E] BlackbeltGroup:: -SECTION "Trainer Parties 47 TEMPORARY", ROMX[$596D],BANK[$E] +SECTION "Trainer Parties 47 TEMPORARY", ROMX[$596D], BANK[$0E] PsychicGroup:: KungFuMasterGroup:: FortuneTellerGroup:: @@ -802,7 +802,7 @@ MediumGroup:: SoldierGroup:: GerugeMemberFGroup:: -SECTION "Trainer Parties 48 TEMPORARY", ROMX[$5988],BANK[$E] +SECTION "Trainer Parties 48 TEMPORARY", ROMX[$5988], BANK[$0E] SportsmanGroup:: ; SPORTSMAN_SHIGEKI db "てつじ@", TRAINERTYPE_ITEM_MOVES diff --git a/engine/Intro.asm b/engine/Intro.asm new file mode 100644 index 0000000..aa10842 --- /dev/null +++ b/engine/Intro.asm @@ -0,0 +1,800 @@ +include "constants.asm" + +SECTION "Oak Intro and Game Setup", ROMX[$558D], BANK[$01] + +DemoStart:: ; 558D + ld de, OakPic + lb bc, BANK(OakPic), $00 + call IntroDisplayPicCenteredOrUpperRight + call FadeInIntroPic + ld hl, OakSpeechDemo + call PrintText + call RotateThreePalettesRight + call ClearTileMap + ld de, ProtagonistPic + lb bc, BANK(ProtagonistPic), $00 + call IntroDisplayPicCenteredOrUpperRight + call MovePicLeft + ld a, %11010000 + ldh [rOBP0], a + call DemoSetUpPlayer + jp IntroCleanup + +GameStart:: ; 55BB + ld de, OakPic + lb bc, BANK(OakPic), $00 + call IntroDisplayPicCenteredOrUpperRight + call FadeInIntroPic + ld hl, OakSpeech1 + call PrintText + call RotateThreePalettesRight + call ClearTileMap + ld a, DEX_YADOKING + ld [wCurSpecies], a + ld [wMonDexIndex], a + call GetMonHeader + hlcoord 6, 4 + hlcoord 6, 4 + call PrepMonFrontpic + call MovePicLeft + ld hl, OakSpeech2 + call PrintText + ld a, DEX_YADOKING + call PlayCry + ld hl, OakSpeech3 + call PrintText + call RotateThreePalettesRight + call ClearTileMap + ld de, ProtagonistPic + lb bc, BANK(ProtagonistPic), $00 + call IntroDisplayPicCenteredOrUpperRight + call MovePicLeft + ld hl, OakSpeech4 + call PrintText + call ChoosePlayerName + call RotateThreePalettesRight + call ClearTileMap + ld de, RivalPic + lb bc, BANK(RivalPic), $00 + call IntroDisplayPicCenteredOrUpperRight + call FadeInIntroPic + ld hl, OakSpeech5 + call PrintText + call ChooseRivalName + call RotateThreePalettesRight + call ClearTileMap + ld de, OakPic + lb bc, BANK(OakPic), $00 + call IntroDisplayPicCenteredOrUpperRight + call FadeInIntroPic + ld hl, OakSpeech6 + call PrintText + callba SetClockDialog + call Function04ac + call RotateThreePalettesRight + call ClearTileMap + ld de, ProtagonistPic + lb bc, BANK(ProtagonistPic), $00 + call IntroDisplayPicCenteredOrUpperRight + call RotateThreePalettesLeft + ld hl, OakSpeech7 + call PrintText + ldh a, [hROMBank] + push af + ld a, $20 + ld [wMusicFade], a + ld de, MUSIC_NONE + ld a, e + ld [wMusicFadeIDLow], a + ld a, d + ld [wMusicFadeIDHigh], a + ld de, $000B ; should be a constant - shrink noise? + call PlaySFX + pop af + call Bankswitch + ld c, $04 + call DelayFrames + +IntroCleanup:: ; 568E + ld de, ShrinkPic1 + lb bc, BANK(ShrinkPic1), $00 + call IntroDisplayPicCenteredOrUpperRight + ld c, $04 + call DelayFrames + ld de, ShrinkPic2 + lb bc, BANK(ShrinkPic2), $00 + call IntroDisplayPicCenteredOrUpperRight + ld c, $14 + call DelayFrames + hlcoord 6, 5 + ld b, $07 + ld c, $07 + call ClearBox + ld c, $14 + call DelayFrames + call LoadStartingSprites + call LoadFontExtra + ld c, $32 + call DelayFrames + call RotateThreePalettesRight + call ClearTileMap + call Function0502 + ld a, $00 + ld [wd638], a + ld [wd637], a + +OverworldStart:: + call SetUpGameEntry + ld hl, wDebugFlags + bit CONTINUED_F, [hl] + call z, Function15b5 + ld hl, wd4a9 + set 0, [hl] + jp Function2a85 + +SetUpGameEntry:: ; 56E8 + ld a, $04 + ld [wd65e], a + ld a, $F2 + ldh [hMapEntryMethod], a + ld hl, wDebugFlags + bit CONTINUED_F, [hl] ; if we loaded a game + ret nz + ld a, $F1 + ldh [hMapEntryMethod], a + ld a, $00 + ld [wDefaultSpawnPoint], a + ld hl, GameStartPlacement + ld de, wMapGroup + ld bc, wd65e - wMapGroup + call CopyBytes + ret + +GameStartPlacement:: ; 570D + db $01 ; map group + db MAP_PLAYER_HOUSE_2F ; map + dwcoord 15, 45 ; screen anchor + db $04 ; metatile x + db $04 ; metatile y + db $00 ; in-metatile x + db $01 ; in-metatile y + +DebugSetUpPlayer:: ; 5715 + call SetPlayerNamesDebug + ld a, $0F + ld [wd15d], a + ld a, $42 + ld [wd15e], a + ld a, $3F + ld [wd15f], a + ld a, $FF + ld [wd163], a + ld [wd164], a + call GiveRandomJohto + ld a, $03 + call AddRandomPokemonToBox + call FillTMs + ld de, DebugBagItems + call FillBagWithList + ld hl, wPokedexOwned + call DebugFillPokedex + ld hl, wPokedexSeen + call DebugFillPokedex + ld hl, wAnnonDex + ld [hl], $01 + call Function40fd + ret + +DebugFillPokedex:: ; 5755 + ld b, $1F + ld a, $FF +.loop + ld [hl+], a + dec b + jr nz, .loop + ld [hl], $07 + ret + +FillBagWithList:: ; 5760 + ld hl, wNumBagItems +.loop + ld a, [de] + cp $FF + jr z, .yump + ld [wCurItem], a + inc de + ld a, [de] + inc de + ld [wItemQuantity], a + call ReceiveItem + jr .loop +.yump + ret + +DebugBagItems:: ; 5777 + db ITEM_IMPORTANT_BAG, $01 + db ITEM_BAG, $01 + db ITEM_TM_HOLDER, $01 + db ITEM_BALL_HOLDER, $01 + db ITEM_BICYCLE, $01 + db ITEM_MAIL, $06 + db ITEM_ULTRA_BALL, $1E + db ITEM_POKE_BALL, $63 + db ITEM_POTION, $1E + db ITEM_RARE_CANDY, $14 + db ITEM_MOON_STONE, $63 + db ITEM_FULL_HEAL, $63 + db ITEM_PROTEIN, $63 + db ITEM_QUICK_NEEDLE, $63 + db ITEM_SNAKESKIN, $63 + db ITEM_KINGS_ROCK, $63 + db ITEM_FLEE_FEATHER, $63 + db ITEM_FOCUS_ORB, $63 + db ITEM_SHARP_SCYTHE, $63 + db ITEM_DETECT_ORB, $63 + db $FF + +GiveRandomPokemon:: ; 57A0 + and a + ret z +.loop + push af + call RandomUnder246 + ld b, $0A + call GivePokemon + pop af + dec a + jr nz, .loop + ret + +GiveRandomJohto:: ; 57B0 +.loop + call Random + and $03 + jr z, .loop + dec a + ld b, a + add a, a + add a, b + add a, $98 ; maybe should be a constant - 152, aka the number of kanto pokes + ld b, $08 + call GivePokemon + ld a, $8D + ld [wPartyMon1 + 1], a + ret + +GiveKantoStarters:: ; 57C8 + ld a, $03 + ld b, $20 + call GivePokemon + ld a, $06 + ld b, $24 + call GivePokemon + ld a, $09 + ld b, $24 + call GivePokemon + ret + +GivePokemon:: ; 57DE + ld [wMonDexIndex], a + ld a, b + ld [wCurPartyLevel], a + ld a, $10 + call Predef + ret + +AddRandomPokemonToBox: ; 57EB + and a + ret z +.loop + push af + xor a + ld [wca44], a + call RandomUnder246 + ld [wcdd7], a + ld a, $05 + ld [wCurPartyLevel], a + callab AddPokemonToBox + ld a, [wcdd7] + ld [wMonDexIndex], a + callab Functiondd5c + pop af + dec a + jr nz, .loop + ret + +RandomUnder246:: ; 5818 +.loop + call Random + and a + jr z, .loop + cp $F6 + jr nc, .loop + ret + +FillTMs:: ; 5823 + ld b, $39 + ld a, $01 + ld hl, wTMsHMs +.loop + ld [hl+], a + dec b + jr nz, .loop + ret + +DebugGiveKeyItems:: ; 582F + ld hl, DebugKeyItemsList + ld de, wKeyItems + ld c, $FF +.loop + inc c + ld a, [hl+] + ld [de], a + inc de + cp $FF + jr nz, .loop + ld a, c + ld [wNumKeyItems], a + ret + +DebugKeyItemsList:: ; 5844 + db ITEM_TM_HOLDER + db ITEM_BALL_HOLDER + db ITEM_BAG + db ITEM_BICYCLE + db $FF + +DemoSetUpPlayer:: ; 5849 + ld hl, wPlayerName + ld de, DemoPlayerName + call CopyString + ld hl, wRivalName + ld de, DemoRivalName + call CopyString + call Function40fd + ld de, DemoItemList + call FillBagWithList + call GiveRandomJohto + ret + +DemoItemList:: ; 5868 + db ITEM_POKE_BALL, $05 + db ITEM_POTION, $0A + db ITEM_FULL_HEAL, $0A + db ITEM_STIMULUS_ORB, $01 + db ITEM_FOCUS_ORB, $01 + db $FF + +DemoPlayerName:: ; 5873 + db "サトシ@" + +DemoRivalName:: ; 5877 + db "シゲル@" + +OakSpeechDemo:: ; 587B + text "ようこそ" + line "ポケット モンスターの せかいへ!" + cont "ごぞんじ わしが オーキドじゃ!" + + para "きょう きみに きてもらったのは" + line "ほかでもない" + cont "あたらしい ずかんづくりを" + cont "てつだって ほしいのじゃ!" + + para "もちろん" + line "きみの パートナーとなる ポケモンと" + cont "りュックは ようい しておる" + + para "りュックの なかには" + line "キズぐすりと" + cont "モンスターボールが" + cont "はいっておるから あんしんじゃ!" + + para "すでに きみの ライバルは" + line "しゅっぱつ しとる" + + para "まけないよう がんばって くれい!" + prompt + +OakSpeech1:: ; 5956 + text "いやあ またせた!" + + para "ポケット モンスターの せかいへ" + line "ようこそ!" + + para "わたしの なまえは オーキド" + + para "みんなからは # はかせと" + line "したわれて おるよ" + prompt + +OakSpeech2:: ; 599F + text "きみも もちろん" + line "しっているとは おもうが" + + para "この せかいには" + line "ポケット モンスターと よばれる" + cont "いきもの たちが" + cont "いたるところに すんでいる!" + prompt + +OakSpeech3:: ; 59E8 + text "その # という いきものを" + line "ひとは ぺットに したり" + cont "しょうぶに つかったり" + cont "そして・・・" + + para "わたしは この #の" + line "けんきゅうを してる というわけだ" + prompt + +OakSpeech4:: ; 5A35 + text "では はじめに きみの なまえを" + line "おしえて もらおう!" + prompt + +OakSpeech5:: ; 5A52 + text "そして この しょうねんは" + line "きみの おさななじみであり" + cont"ライバルである" + + para "・・・えーと?" + line "なまえは なんて いったかな?" + prompt + +OakSpeech6:: ; 5A8F + text "さて きみの きねんすべき" + line "たびだちのひを" + cont "きろくしておこう!" + + para "じかんも なるべく せいかくにな!" + prompt + +OakSpeech7:: ; 5AC2 + text "<PLAYER>!" + + para "いよいよ これから" + line "きみの ものがたりの はじまりだ!" + + para "ゆめと ぼうけんと!" + line "ポケット モンスターの せかいへ!" + + para "レッツ ゴー!" + done + +SetPlayerNamesDebug:: ; 5B07 + ld hl, DebugPlayerName + ld de, wPlayerName + call CopyNameDebug + ld hl, DebugRivalName + ld de, wRivalName + +CopyNameDebug: + ld bc, PLAYER_NAME_LENGTH + call CopyBytes + ret + +DebugPlayerName: ; 5B1D + db "コージ@" + +DebugRivalName: ; 5B21 + db "レッド@" + +ChoosePlayerName:: ; 5B25 + call PanPortraitRight + ld hl, PlayerNameMenuHeader + call NamingWindow + ld a, [wMenuCursorY] + dec a + jr z, .loop + ld de, wPlayerName + call SaveCustomName + jr .farjump + +.loop + ld b, $01 + ld de, wPlayerName + callba Function113f4 + ld a, [wPlayerName] + cp "@" + jr z, .loop + + call RotateThreePalettesRight + call ClearTileMap + call LoadFontExtra + call WaitBGMap + ld de, $4D10 + ld bc, $1200 + call IntroDisplayPicCenteredOrUpperRight + call RotateThreePalettesLeft +.farjump + ld hl, ChoosePlayerNameEndText + call PrintText + ret + +ChoosePlayerNameEndText: ; 5B6F + text "ふむ・・・" + line "<PLAYER> と いうんだな!" + prompt + +PlayerNameMenuHeader: ; 5B81 + db MENU_BACKUP_TILES ; flags + menu_coords 00, 00, 10, 11 + dw PlayerNameMenuData + db 01 ; initial selection + +PlayerNameMenuData; 5B89 + db STATICMENU_CURSOR | STATICMENU_PLACE_TITLE | STATICMENU_DISABLE_B + db 04 ; items + db "じぶんできめる@" + db "ゴールド@" + db "サトシ@" + db "ジャック@" + db 3 ; x offset for the title string + db "なまえこうほ@" + +ChooseRivalName:: ; 5BA9 + call PanPortraitRight + ld hl, RivalNameMenuHeader + call NamingWindow + ld a, [wMenuCursorY] + dec a + jr z, .loop + ld de, wRivalName + call SaveCustomName + jr .farjump + +.loop + ld b, $02 + ld de, wRivalName + callba Function113f4 ; manual text entry box? + ld a, [wRivalName] + cp "@" + jr z, .loop + + call RotateThreePalettesRight + call ClearTileMap + call LoadFontExtra + call WaitBGMap + ld de, $4BD4 + ld bc, $1200 + call IntroDisplayPicCenteredOrUpperRight + call RotateThreePalettesLeft +.farjump + ld hl, ChooseRivalNameEndText + call PrintText + ret + +ChooseRivalNameEndText: ; 5BF3 + text "そうか そうだったな" + line "<RIVAL> という なまえだ" + prompt + +RivalNameMenuHeader: ; 5C0A + db MENU_BACKUP_TILES ; flags + menu_coords 00, 00, 10, 11 + dw RivalNameMenuData + db 01 ; initial selection + +RivalNameMenuData: ; 5C12 + db STATICMENU_CURSOR | STATICMENU_PLACE_TITLE | STATICMENU_DISABLE_B + db 04 ; items + db "じぶんできめる@" + db "シルバー@" + db "シゲル@" + db "ジョン@" + db 3 + db "なまえこうほ@" + +MomNamePrompt:: ; 5C31 + ld hl, MomNameMenuHeader + call NamingWindow + ld a, [wMenuCursorY] + dec a + jr z, .loop + ld de, wMomsName + call SaveCustomName + jr .escape + +.loop + ld b, $03 + ld de, wMomsName + callba Function113f4 + ld a, [wMomsName] + cp "@" + jr z, .loop + + call ClearPalettes + call ClearTileMap + callab Function140d9 + call LoadFontExtra + call GetMemSGBLayout + call WaitBGMap +.escape + ret + +MomNameMenuHeader: ; 5C71 + db MENU_BACKUP_TILES ; flags + menu_coords 00, 00, 10, 11 + dw .MomNameMenuData + db 01 ; initial selection + +.MomNameMenuData: ; 5C79 + db STATICMENU_CURSOR | STATICMENU_PLACE_TITLE | STATICMENU_DISABLE_B + db 04 ; items + db "じぶんで きめる@" + db "おかあさん@" + db "ママ@" + db "かあちゃん@" + db 3 + db "なまえこうほ@" + +NamingWindow:: ; 5C9B + ; loads the menu header put into hl + call LoadMenuHeader + call VerticalMenu + ld a, [wMenuCursorY] + dec a + call CopyNameFromMenu + call CloseWindow + ret + +SaveCustomName:: ; 5CAC + ld hl, wStringBuffer2 + ld bc, PLAYER_NAME_LENGTH + call CopyBytes + ret + +PanPortraitRight:: ; 5CB6 + hlcoord 5, 4 + ld d, $06 + ld e, $7E + ld b, d + ld c, e + ld d, $00 + add hl, de +.loop + xor a + ldh [hBGMapMode], a + push hl + push bc +.innerLoop + ;pans all the tiles onscreen to the right one + ld a, [hl+] + ld [hl-], a + dec hl + dec c + jr nz, .innerLoop + + call WaitBGMap + pop bc + pop hl + inc hl + dec b ; passed c - how many tiles right to pan? + jr nz, .loop + ret + +PanPortraitLeft:: ; 5CD7 + hlcoord 12, 4 + ld b, $06 + ld c, $7E +.loop + xor a + ldh [hBGMapMode], a + push hl + push bc +.innerloop + ld a, [hl-] + ld [hl+], a + inc hl + dec c + jr nz, .innerloop + + call WaitBGMap + pop bc + pop hl + inc hl + dec b + jr nz, .loop + ret + +MenuCallSettings:: ; 5CF3 + call SettingsScreen + ret + +FadeInIntroPic: ; 5CF7 + ld hl, IntroFadePalettes + ld b, 6 +.next + ld a, [hl+] + ldh [rBGP], a + ld c, 10 + call DelayFrames + dec b + jr nz, .next + ret + +IntroFadePalettes: + db %01010100 + db %10101000 + db %11111100 + db %11111000 + db %11110100 + db %11100100 + +MovePicLeft: ; 5D0E + ld a, 119 + ldh [hWX], a + call DelayFrame + + ld a, %11100100 + ldh [rBGP], a +.next + call DelayFrame + ldh a, [hWX] + sub 8 + cp $FF + ret z + ldh [hWX], a + jr .next + +IntroDisplayPicCenteredOrUpperRight:: ; 5D27 +; b = bank +; de = address of compressed pic +; c: 0 = centred, non-zero = upper-right + ld a, c + and a + hlcoord 13, 4 + jr nz, .skip + hlcoord 6, 4 +.skip + push hl + ld a, b + call UncompressSpriteFromDE + ld a, $00 + call OpenSRAM + ld hl, sSpriteBuffer1 + ld de, sSpriteBuffer0 + ld bc, DOUBLESPRITEBUFFERSIZE + call CopyBytes + call CloseSRAM + ld de, VRAM_Begin + $1000 + call InterlaceMergeSpriteBuffers + pop hl + xor a + ldh [hGraphicStartTile], a + ld bc, $0707 + predef PlaceGraphic + ret + +LoadStartingSprites: ; 5D5D + ld de, GoldSpriteGFX + lb bc, BANK(GoldSpriteGFX), $0C + ld hl, VRAM_Begin + call Request2bpp + ld hl, wVirtualOAM + ld de, GameStartSprites + ld c, $04 +.loop + ld a, [de] + inc de + ld [hl+], a + ld a, [de] + inc de + ld [hl+], a + ld a, [de] + inc de + ld [hl+], a + xor a + ld [hl+], a + dec c + jr nz, .loop + ret + +GameStartSprites: ; 5D80 + db $50, $48, $00 + db $50, $50, $01 + db $58, $48, $02 + db $58, $50, $03 + +; 5D8C
\ No newline at end of file diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm index 4f688fe..bee72f9 100755 --- a/engine/events/field_moves.asm +++ b/engine/events/field_moves.asm @@ -1,3 +1,4 @@ +<<<<<<< HEAD INCLUDE "constants.asm" ; TODO - need to constantize tile ids, movements @@ -539,3 +540,546 @@ Text_ReturnToLastMonCenter: ; 03:5395 text "さいごに たちよった" line "#センターにもどります" done +======= +INCLUDE "constants.asm" + +; TODO - need to constantize tile ids, movements + +SECTION "Field Moves", ROMX[$4fab], BANK[$03] + +CutFunction: ; 03:4fab + call .ResetScriptID +.next + call .ExecScript + jr nc, .next + ld [wFieldMoveSucceeded], a + ret +.ResetScriptID + xor a + ld [wFieldMoveScriptID], a + ret +.ExecScript + ld a, [wFieldMoveScriptID] + ld hl, .CutScriptTable + jp CallJumptable + +.CutScriptTable ; 03:4fc5 + init_script_table + add_script TryCut + add_script CheckCuttableBlock + add_script CheckCuttableTile + add_script DoCut + add_script DoCut2 + add_script FailCut + +TryCut: ; 03:4fd1 + call GetMapEnvironment + cp ROUTE + jr z, .success + cp TOWN + jr z, .success + set_script FailCut + xor a + ret +.success + set_script CheckCuttableBlock + xor a + ret + +CheckCuttableBlock: ; 03:4fea + call GetFacingTileCoord + cp $80 + jr nz, .fail + call GetBlockLocation + ld a, l + ld [wMapBlocksAddress], a + ld a, h + ld [wMapBlocksAddress + 1], a + ld a, [hl] + call GetCutReplacementBlock + jr nc, .fail + dec hl + ld a, [hl] + ld [wReplacementBlock], a + set_script DoCut2 + xor a + ret +.fail + set_script CheckCuttableTile + xor a + ret + +GetCutReplacementBlock: ; 03:5015 + ld c, a + ld hl, CutReplacementBlocks +.loop + ld a, [hli] + cp -1 + ret z + inc hl + cp c + jr nz, .loop + scf + ret + +CutReplacementBlocks: ; 03:5023 +; replacement block, facing block + db $30, $25 + db $31, $2A + db $32, $34 + db $33, $35 + db -1 + +CheckCuttableTile: ; 03:502c + call GetFacingTileCoord + call IsCuttableTile + jr nc, .fail + call GetBlockLocation + ld a, [hl] + cp $3b + jr nz, .fail + ld a, l + ld [wMapBlocksAddress], a + ld a, h + ld [wMapBlocksAddress + 1], a + ld a, $04 + ld [wReplacementBlock], a + set_script DoCut + xor a + ret +.fail + set_script FailCut + xor a + ret + +IsCuttableTile: ; 03:5057 + ld hl, CuttableTiles + ld c, a +.loop + ld a, [hli] + cp -1 + ret z + cp c + jr nz, .loop + scf + ret + +CuttableTiles: ; 03:5064 + db $81 + db $82 + db $8A + db $8B + db -1 + +FailCut: ; 03:5069 + ld hl, Text_CantUseCutHere + call MenuTextBoxBackup + scf + ld a, SCRIPT_FAIL + ret + +Text_CantUseCutHere: ; 03:5073 + text "ここでは つかえません" + prompt + +DoCut: +DoCut2: ; 03:5080 + far_queue CutScript + scf + ld a, SCRIPT_SUCCESS + ret + +CutScript: ; 03:508C + call RefreshScreen + ld hl, wPartyMonNicknames + ld a, BOXMON + ld [wMonType], a + ld a, [wWhichPokemon] + call GetNick + call CopyStringToStringBuffer2 + ld hl, Text_CutItDown + call MenuTextBoxBackup + ld de, MUSIC_SURF + call PlaySFX + ld hl, wMapBlocksAddress + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wReplacementBlock] + ld [hl], a + call LoadMapPart + call UpdateSprites + call WaitBGMap + call Function1fea + scf + ret + +Text_CutItDown ; 03:50c4 + text_from_ram wStringBuffer2 + text " は " + line "くさかりを つかった!" + prompt + +SurfFunction: ; 03:50d8 + call .ResetScriptID +.next + call .ExecScript + jr nc, .next + ld [wFieldMoveSucceeded], a + ret +.ResetScriptID + xor a + ld [wFieldMoveScriptID], a + ret +.ExecScript + ld a, [wFieldMoveScriptID] + ld hl, .SurfScriptTable + jp CallJumptable + +.SurfScriptTable: ; 03:50f2 + init_script_table + add_script TrySurf + add_script DoSurf + add_script FailSurf + +TrySurf: ; 03:50f8 + call GetFacingTileCoord + and $f0 + cp $20 + jr z, .success + cp $40 + jr z, .success + set_script FailSurf + xor a + ret +.success + set_script DoSurf + xor a + ret + +DoSurf: ; 03:5113 + queue_ba SurfScript + ld a, -1 + ld [wFieldMoveScriptID], a + scf + ld a, SCRIPT_SUCCESS + ret + +FailSurf: ; 03:5124 + ld hl, Text_CantSurfHere + call MenuTextBoxBackup + ld a, -1 + ld [wFieldMoveScriptID], a + scf + ld a, SCRIPT_FAIL + ret + +Text_CantSurfHere: ; 03:5133 + text "ここでは のることが" + next "できません" + prompt + +SurfScript: ; 03:5145 + call RefreshScreen + ld hl, wPartyMonNicknames + ld a, BOXMON + ld [wMonType], a + ld a, [wWhichPokemon] + call GetNick + call CopyStringToStringBuffer2 + ld hl, Text_UsedSurf + call MenuTextBoxBackup + ld a, PLAYER_SURF + ld [wPlayerState], a + call RedrawPlayerSprite + call PlayMapMusic + call MovePlayerIntoWater + call Function1fea + ret + +Text_UsedSurf: ; 03:5171 + text_from_ram wStringBuffer2 + text " は " + line "@" + text_from_ram wPlayerName + text "を のせた!" + prompt + +MovePlayerIntoWater: ; 03:5185 + call InitMovementBuffer + call .get_movement_direction + call AppendToMovementBuffer + ld a, $32 + call AppendToMovementBuffer + ld a, 0 + ld hl, wMovementBuffer + call LoadMovementDataPointer +.get_movement_direction + ld a, [wPlayerWalking] + srl a + srl a + ld e, a + ld d, $00 + ld hl, SurfMovementDirections + add hl, de + ld a, [hl] + ret + +; Direction to move player, mapped to facing direction +SurfMovementDirections: ; 03:51ab + db 4, 5, 6, 7 + + +FlyFunction: ; 03:51af + call .ResetScriptID +.next + call .ExecScript + jr nc, .next + ld [wFieldMoveSucceeded], a + ret +.ResetScriptID + xor a + ld [wFieldMoveScriptID], a + ret +.ExecScript + ld a, [wFieldMoveScriptID] + ld hl, .FlyScriptTable + jp CallJumptable + +.FlyScriptTable: ; 03:51c9 + init_script_table + add_script TryFly + add_script ShowFlyMap + add_script DoFly + add_script FailFly + +TryFly: ; 03:51d1 + call GetMapEnvironment + cp TOWN + jr z, .success + cp ROUTE + jr z, .success + set_script FailFly + xor a + ret +.success + set_script ShowFlyMap + xor a + ret + +ShowFlyMap: ; 03:51ea + call LoadStandardMenuHeader + call ClearSprites + callab FlyMap + call ClearPalettes + call GetMemSGBLayout + call ExitMenu + ld a, [wFlyDestination] + cp -1 + jr z, .dont_fly + cp NUM_SPAWNS + jr nc, .dont_fly + set_script DoFly + xor a + ret +.dont_fly + call UpdateTimePals + ld a, -1 + ld [wFieldMoveScriptID], a + scf + ld a, SCRIPT_FAIL + ret + +DoFly: ; 03:521f + ld a, [wFlyDestination] + inc a + ld [wDefaultSpawnPoint], a + queue_ba FlyScript + ld a, -1 + ld [wFieldMoveScriptID], a + scf + ld a, SCRIPT_SUCCESS + ret + +FailFly: ; 03:5237 + ld hl, Text_CantUseFlyHere + call MenuTextBoxBackup + ld a, -1 + ld [wFieldMoveScriptID], a + scf + ld a, SCRIPT_FAIL + ret + +Text_CantUseFlyHere: ; 03:5246 + text "ここでは つかえません!" + prompt + +FlyScript: ; 03:5254 + ld a, MAPSETUP_TELEPORT + ldh [hMapEntryMethod], a + jpab Functionfcc24 + + +DigFunction: ; 03:5260 + call .ResetScriptID +.next + ld a, [wFieldMoveScriptID] + bit SCRIPT_FINISHED_F, a + jr nz, .finish + ld hl, .DigScriptTable + call CallJumptable + jr .next + +; Finish by returning only the low nibble +.finish + and $FF - SCRIPT_FINISHED_MASK + ld [wFieldMoveSucceeded], a + ret + +.ResetScriptID + xor a + ld [wFieldMoveScriptID], a + ret + +.DigScriptTable: ; 03:527D + init_script_table + add_script CheckCanDig + add_script DoDig + add_script FailDig + +CheckCanDig: ; 03:5283 + call GetMapEnvironment + cp INDOOR + jr z, .success + cp CAVE + jr z, .success + set_script FailDig + ret +.success + set_script DoDig + ret + +DoDig: ; 03:529a + queue_ab DigScript + ld a, SCRIPT_FINISHED_MASK | SCRIPT_SUCCESS + ld [wFieldMoveScriptID], a + ret + +FailDig: ; 03:52a8 + ld hl, Text_CantUseDigHere + call MenuTextBoxBackup + ld a, SCRIPT_FINISHED_MASK | SCRIPT_FAIL + ld [wFieldMoveScriptID], a + ret + +Text_CantUseDigHere: ; 03:52b4 + text "ここでは つかえません!" + prompt + +DigScript: ; 03:52c2 + ld hl, wDigWarpNumber + ld de, wNextWarp + ld bc, 3 + call CopyBytes + ld a, MAPSETUP_WARP + ldh [hMapEntryMethod], a + jpab Functionfcc24 + +EmptyFunctiond2da: ; 03:52da + ret + +TeleportFunction: ; 03:52db + xor a + ld [wFieldMoveScriptID], a +.next + ld a, [wFieldMoveScriptID] + bit SCRIPT_FINISHED_F, a + jr nz, .finish + ld hl, .TeleportScriptTable + call CallJumptable + jr .next + +; Finish by returning only the low nibble +.finish + and $FF - SCRIPT_FINISHED_MASK + ld [wFieldMoveSucceeded], a + ret + +.TeleportScriptTable + init_script_table + add_script TryTeleport + add_script DoTeleport + add_script FailTeleport + add_script CheckIfSpawnPoint + +TryTeleport: ; 03:52fc + call GetMapEnvironment + cp TOWN + jr z, .success + cp ROUTE + jr z, .success + set_script FailTeleport + ret +.success + set_script CheckIfSpawnPoint + ret + +CheckIfSpawnPoint ; 03:5313 + ld a, [wLastSpawnMapGroup] + ld d, a + ld a, [wLastSpawnMapNumber] + ld e, a + callab IsSpawnPoint + jr c, .not_spawn + ld hl, Text_CantFindDestination + call MenuTextBoxBackup + ld a, SCRIPT_FINISHED_MASK | SCRIPT_FAIL + ld [wFieldMoveScriptID], a + ret +.not_spawn + ld a, c + ld [wDefaultSpawnPoint], a + set_script DoTeleport + ret + +Text_CantFindDestination: ; 03:533B + text "とびさきが みつかりません" + para "" + done + +DoTeleport: ; 03:534b + queue_ba TeleportScript + ld a, SCRIPT_FINISHED_MASK | SCRIPT_SUCCESS + ld [wFieldMoveScriptID], a + ret + +FailTeleport: ; 03:5359 + ld hl, Text_CantUseTeleportHere + call MenuTextBoxBackup + ld a, SCRIPT_FINISHED_MASK | SCRIPT_FAIL + ld [wFieldMoveScriptID], a + scf + ret + +Text_CantUseTeleportHere: ; 03:5366 + text "ここでは つかえません!" + para "" + done + +TeleportScript: ; 03:5375 + call RefreshScreen + ld hl, Text_ReturnToLastMonCenter + call MenuTextBox + ld c, 60 + call DelayFrames + call CloseWindow + call Function1fea + ld a, MAPSETUP_TELEPORT + ldh [hMapEntryMethod], a + jpab Functionfcc24 + +Text_ReturnToLastMonCenter: ; 03:5395 + text "さいごに たちよった" + line "#センターにもどります" + done +>>>>>>> 3fab27f221a8d5400d4b203809ff9b13355d55a3 diff --git a/engine/menu/debug_menu.asm b/engine/menu/debug_menu.asm new file mode 100644 index 0000000..be46a00 --- /dev/null +++ b/engine/menu/debug_menu.asm @@ -0,0 +1,109 @@ +INCLUDE "constants.asm" + +SECTION "Debug Menu", ROMX[$4031], BANK[$01] + +DebugMenu:: ; $4031 + call ClearTileMap + call ClearWindowData + call LoadFont + call LoadFontsBattleExtra + call ClearSprites + call GetMemSGBLayout + xor a + ld [wWhichIndexSet], a + ld hl, DebugMenuHeader + call LoadMenuHeader + call OpenMenu + call CloseWindow + jp c, TitleSequenceStart + ld a, $41 + ld [wce5f], a + ld a, [wMenuSelection] + ld hl, DebugJumpTable + jp CallJumptable + +DebugJumpTable:: ; 4064 + dw DebugMenuOptionFight + dw DebugMenuOptionField + dw Function094c ; sound test + dw DebugMenuOptionSubGames + dw DebugMenuOptionMonsterTest + dw DebugMenuOptionName + +DebugMenuHeader: ; 4070 + db MENU_BACKUP_TILES ; flags + menu_coords 05, 02, SCREEN_WIDTH - 7, SCREEN_HEIGHT - 1 + dw .MenuData + db 01 ; default option + +.MenuData: ; 4078 + db $A0 + db 0 ; items + dw DebugMenuItems + db $8A, $1F + dw .Strings + +.Strings + db "ファイト@" + db "フィールド@" + db "サウンド@" + db "サブゲーム@" + db "モンスター@" + db "なまえ@" + +DebugMenuItems: + db 06 + db 00 + db 01 + db 02 + db 03 + db 04 + db 05 + db -1 + +DebugMenuOptionField:: ; 40A8 + ld hl, wDebugFlags + set DEBUG_FIELD_F, [hl] ; set debug mode + jp StartNewGame + +DebugMenuOptionFight:: ; 40B0 + ld hl, wDebugFlags + set DEBUG_BATTLE_F, [hl] + ld a, $54 + call Predef + ld hl, wDebugFlags + res DEBUG_BATTLE_F, [hl] + ret + +DebugMenuOptionSubGames:: ; 40C0 + callab CallSubGameMenu + jp DebugMenu + +DebugMenuOptionMonsterTest:: ; 40CB + ld hl, wPokedexOwned + ld de, wPokedexSeen + ld b, $1F + ld a, $FF +.loop + ld [hl+], a + ld [de], a + inc de + dec b + jr nz, .loop + ld a, $03 + ld [hl], a + ld [de], a + callab MonsterTest + ld a, $e4 + ldh [rBGP], a + +Function40eb:: + jp DebugMenu + +DebugMenuOptionName:: ; 40EE + callab OpenPokegear + ld a, $e4 + ldh [rBGP], a + jp DebugMenu + +; 40FD
\ No newline at end of file diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm index 27e8f1d..432570a 100644 --- a/engine/menu/main_menu.asm +++ b/engine/menu/main_menu.asm @@ -1,45 +1,45 @@ INCLUDE "constants.asm" -SECTION "Main Menu Definition", ROMX[$53cc], BANK[$01] +SECTION "Main Menu", ROMX[$53CC], BANK[$01] -MainMenu: - ld hl, wd4a9 +MainMenu:: ; 01:53CC + ld hl, wd4a9 res 0, [hl] call ClearTileMap call GetMemSGBLayout call LoadFontExtra call LoadFont call ClearWindowData - call $5388 - ld hl, $ce60 + call Function5388 + ld hl, wce60 bit 0, [hl] - jr nz, .skip1 - xor a ; new game - jr .next1 -.skip1 - ld a, 1 ; continue -.next1 - ld a, [$ffa3] - and $83 - cp $83 - jr nz, .skip2 - ld a, 3 ; play pokemon, set time - jr .next2 -.skip2 - ld a, 2 ; play pokemon -.next2 - ld [$cbf7],a + jr nz, .setMenuContinue + xor a + jr .skip +.setMenuContinue + ld a, M_CONTINUE +.skip + ldh a, [hJoyState] + and D_DOWN | B_BUTTON | A_BUTTON + cp D_DOWN | B_BUTTON | A_BUTTON + jr nz, .setMenuPlay + ld a, M_SET_TIME + jr .triggerMenu +.setMenuPlay + ld a, M_PLAY_GAME +.triggerMenu + ld [wWhichIndexSet], a ld hl, MainMenuHeader call LoadMenuHeader call OpenMenu call CloseWindow - jp c, $5dae + jp c, TitleSequenceStart ld hl, MainMenuJumptable - ld a, [$cbf5] + ld a, [wMenuSelection] jp CallJumptable -MainMenuHeader: - db $40 +MainMenuHeader: ; 01:5418 + db MENU_BACKUP_TILES menu_coords 0, 0, 13, 7 dw .MenuData db 1 ; default option @@ -59,17 +59,11 @@ MainMenuHeader: db "じかんセット@" MainMenuJumptable: ; 01:5457 - dw $547c - dw NewGame - dw $5cf3 - dw NewGame - dw $5473 - -CONTINUE EQU 0 -NEW_GAME EQU 1 -OPTION EQU 2 -PLAY_POKEMON EQU 3 -SET_TIME EQU 4 + dw MainMenuOptionContinue + dw StartNewGame + dw MenuCallSettings + dw StartNewGame + dw MainMenuOptionSetTime MainMenuItems: @@ -99,176 +93,119 @@ PlayPokemonSetTimeMenu: db SET_TIME db -1 -SECTION "Oak Speech", ROMX[$555c], BANK[$01] +MainMenuOptionSetTime:: ; 5473 + callab SetTime + ret + +MainMenuOptionContinue:: ;547C + callab Function14624 + call DisplayContinueGameInfo +.loop + call ClearJoypad + call GetJoypad + ldh a, [hJoyState] + bit A_BUTTON_F, a + jr nz, .escape + bit B_BUTTON_F, a + jp nz, MainMenu + jr .loop +.escape + call Function5397 + call Function53b0 + ld hl, wDebugFlags + res DEBUG_FIELD_F, [hl] + set CONTINUED_F, [hl] + set 3, [hl] + ldh a, [hJoyState] + bit SELECT_F, a + jr z, .skip + set 1, [hl] +.skip + call ClearBGPalettes + call ClearTileMap + ld c, $0A + call DelayFrames + jp OverworldStart + +DisplayContinueGameInfo:: ; 54BF + xor a + ldh [hBGMapMode], a + hlcoord 4, 7 + ld b, $08 + ld c, $0D + call DrawTextBox + hlcoord 5, 9 + ld de, PlayerInfoText + call PlaceString + hlcoord 13, 9 + ld de, wPlayerName + call PlaceString + hlcoord 14, 11 + call PrintNumBadges + hlcoord 13, 13 + call PrintNumOwnedMons + hlcoord 12, 15 + call PrintPlayTime + ld a, $01 + ldh [hBGMapMode], a + ld c, $1E + call DelayFrames + ret -NewGame: - ld de, 0 +PrintNumBadges:: ;54FA + push hl + ld hl, wd163 ; badges? + ld b, $01 + call CountSetBits + pop hl + ld de, wCountSetBitsResult + ld bc, $0102 ; flags and constants for this? 1 byte source, 2 digit display + jp PrintNumber + +PrintNumOwnedMons:: ; 550D + push hl + ld hl, wPokedexOwned + ld b, $20 ; flag_array NUM_POKEMON? + call CountSetBits + pop hl + ld de, wCountSetBitsResult + ld bc, $0103 ; 1 byte, 3 digit + jp PrintNumber + +PrintPlayTime:: ; 5520 + ld de, hRTCHours + ld bc, $0103 ; 1 byte, 3 digit + call PrintNumber + ld [hl], ":" + inc hl + ld de, hRTCMinutes + ld bc, $8102 ; PRINTNUM_LEADINGZEROS, 1 byte, 2 digit + jp PrintNumber + +PlayerInfoText: + db "しゅじんこう" + next "もっているバッジ こ" + next "#ずかん ひき" + next "プレイじかん" + text_end + +StartNewGame:: ; 555C + ld de, MUSIC_NONE call PlayMusic - ld de, 3 + ld de, MUSIC_OAK_INTRO call PlayMusic call LoadFontExtra xor a - ld [$ffde], a - ld a, 1 - ld hl, $52f9 - call FarCall_hl + ldh [hBGMapMode], a + callba Function52f9 call ClearTileMap call ClearWindowData xor a - ld [$ffe8], a - ld a, [wce63] - bit 1, a - jp z, .OakSpeechPlayPokemon - call Function5715 - jp .PlayerShrink - -.OakSpeechPlayPokemon - ld de, OakPic - lb bc, BANK(OakPic), 0 - call $5d27 - call $5cf7 - ld hl, $587b - call PrintText - call RotateThreePalettesRight - call ClearTileMap - ld de, ProtagonistPic - lb bc, BANK(ProtagonistPic), 0 - call $5d27 - call $5d0e - ld a, $d0 - ld [$ff48], a - call $5849 - jp .PlayerShrink - -.OakSpeechNewGame - ld de, OakPic - lb bc, BANK(OakPic), 0 - call $5d27 - call $5cf7 - ld hl, $5956 - call PrintText - call RotateThreePalettesRight - call ClearTileMap - ld a, DEX_YADOKING - ld [$cb5b], a - ld [$cd78], a - call GetMonHeader - ld hl, $c2f6 - ld hl, $c2f6 - call PrepMonFrontpic - call $5d0e - ld hl, $599f - call PrintText - ld a, DEX_YADOKING - call PlayCry - ld hl, $59e8 - call PrintText - call RotateThreePalettesRight - call ClearTileMap - ld de, ProtagonistPic - lb bc, BANK(ProtagonistPic), 0 - call $5d27 - call $5d0e - ld hl, $5a35 - call PrintText - call $5b25 ; naming screen - call RotateThreePalettesRight - call ClearTileMap - ld de, RivalPic - lb bc, BANK(RivalPic), 0 - call $5d27 - call $5cf7 - ld hl, $5a52 - call PrintText - call $5ba9 ; naming screen - call RotateThreePalettesRight - call ClearTileMap - ld de, OakPic - lb bc, BANK(OakPic), 0 - call $5d27 - call $5cf7 - ld hl, $5a8f - call PrintText - ld a, $24 - ld hl, $4000 - call FarCall_hl - call Function04ac - call RotateThreePalettesRight - call ClearTileMap - ld de, ProtagonistPic - lb bc, BANK(ProtagonistPic), 0 - call $5d27 - call RotateThreePalettesLeft - ld hl, $5ac2 - call PrintText - ld a, [$ff98] - push af - ld a, $20 - ld [$c1a5], a - ld de, 0 - ld a, e - ld [$c1a7], a - ld a, d - ld [$c1a8], a - ld de, $b - call PlaySFX - pop af - call Bankswitch - ld c, 4 - call DelayFrames -.PlayerShrink - ld de, $4743 - ld bc, $400 - call $5d27 - ld c, 4 - call DelayFrames - ld de, $479d - ld bc, $400 - call $5d27 - ld c, 20 - call DelayFrames - ld hl, $c30a - ld b, 7 - ld c, 7 - call ClearBox - ld c, 20 - call DelayFrames - call $5d5d - call LoadFontExtra - ld c, 50 - call DelayFrames - call RotateThreePalettesRight - call ClearTileMap - call Function0502 - ld a, 0 - ld [$d638], a - ld [$d637], a - call Function56e8 - ld hl, wce63 - bit 2, [hl] - call z, Function15b5 - ld hl, wd4a9 - set 0, [hl] - jp Function2a85 - -Function56e8: - ld a, 4 - ld [$d65e], a - ld a, $f2 - ld [$ff9a], a - ld hl, $ce63 - bit 2, [hl] - ret nz - ld a, $f1 - ld [$ff9a], a - ld a, 0 - ld [$cc39], a - ld hl, .Data - ld de, $d656 - ld bc, 8 - call CopyBytes - ret -.Data - db $01, $09, $33, $c6, $04, $04, $00, $01 - -Function5715: + ldh [hMapAnims], a + ld a, [wDebugFlags] + bit DEBUG_FIELD_F, a + jp z, DemoStart + call DebugSetUpPlayer + jp IntroCleanup + +; 558D diff --git a/engine/overworld/object_collision.asm b/engine/overworld/object_collision.asm new file mode 100644 index 0000000..8d42a93 --- /dev/null +++ b/engine/overworld/object_collision.asm @@ -0,0 +1,157 @@ +INCLUDE "constants.asm" + +SECTION "GetSpritesNextTile", ROMX[$774a], BANK[$01] + +; Get the tile that the sprite will walk onto next +GetSpritesNextTile: ; 01:774a + ld hl, OBJECT_NEXT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_NEXT_MAP_Y + add hl, bc + ld e, [hl] + push bc + call GetCoordTile + pop bc + ret + +; Sets carry flag if the object (bc) next tile is a collision +_IsObjectCollisionTileSolid: ; 01:775a + call GetSpritesNextTile + ld e, a + ld d, 0 + ld hl, CollisionTypeTable + add hl, de + ld a, BANK(CollisionTypeTable) + call GetFarByte + and ALWAYS_SOLID ; also covers SOMETIMES_SOLID + ret z + scf + ret + + + +SECTION "_CheckObjectCollision", ROMX[$77dd], BANK[$01] + +; returns the carry flag if a sprite is at coords d, e +; will not collide with sprite index stored in hEventCollisionException +_CheckObjectCollision: ; 01:77dd + ld bc, wObjectStructs + xor a +.loop + ldh [hObjectStructIndexBuffer], a + ld hl, OBJECT_SPRITE + add hl, bc + ld a, [hl] + and a + jr z, .next + ld hl, OBJECT_NEXT_MAP_X + add hl, bc + ld a, [hl] + cp d + jr nz, .check_last_position + ld hl, OBJECT_NEXT_MAP_Y + add hl, bc + ld a, [hl] + cp e + jr nz, .check_last_position + ldh a, [hEventCollisionException] + ld l, a + ldh a, [hObjectStructIndexBuffer] + cp l + jr nz, .collision +.check_last_position + ld hl, OBJECT_MAP_X + add hl, bc + ld a, [hl] + cp d + jr nz, .next + ld hl, OBJECT_MAP_Y + add hl, bc + ld a, [hl] + cp e + jr nz, .next + ldh a, [hEventCollisionException] + ld l, a + ldh a, [hObjectStructIndexBuffer] + cp l + jr nz, .collision +.next + ld hl, OBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + ldh a, [hObjectStructIndexBuffer] + inc a + cp NUM_OBJECT_STRUCTS + jr nz, .loop + and a + ret + +.collision + scf + ret + +SECTION "_CheckPlayerObjectCollision", ROMX[$7894], BANK[$01] + +; Sets the carry flag if the player will collide with another sprite's current or next position +_CheckPlayerObjectCollision: ; 01:7894 + ld a, [wPlayerNextMapX] + ld d, a + ld a, [wPlayerNextMapY] + ld e, a + ld bc, wObjectStructs + xor a + +.loop + ldh [hObjectStructIndexBuffer], a + ld hl, OBJECT_SPRITE + add hl, bc + ld a, [hl] + and a + jr z, .next + ld hl, OBJECT_NEXT_MAP_Y + add hl, bc + ld a, [hl] + cp e + jr nz, .check_last_position + ld hl, OBJECT_NEXT_MAP_X + add hl, bc + ld a, [hl] + cp d + jr nz, .check_last_position + +; skip the player sprite + ldh a, [hObjectStructIndexBuffer] + cp PLAYER_OBJECT_INDEX + jr z, .next + jr .collision + +.check_last_position + ld hl, OBJECT_MAP_Y + add hl, bc + ld a, [hl] + cp e + jr nz, .next + ld hl, OBJECT_MAP_X + add hl, bc + ld a, [hl] + cp d + jr nz, .next + jr .collision + +.next + ld hl, OBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + ldh a, [hObjectStructIndexBuffer] + inc a + cp NUM_OBJECT_STRUCTS + jr nz, .loop + xor a + ret + +.collision + scf + ret diff --git a/engine/overworld/player_movement.asm b/engine/overworld/player_movement.asm new file mode 100644 index 0000000..3c8cf7c --- /dev/null +++ b/engine/overworld/player_movement.asm @@ -0,0 +1,1162 @@ +INCLUDE "constants.asm" + +SECTION "Player Movement", ROMX[$4000], BANK[$03] + +OverworldMovementCheck:: ; 03:4000 + jp _OverworldMovementCheck + +UnusedOverworldMovementCheck:: ; 03:4003 + ld a, PLAYER_OBJECT_INDEX + ldh [hEventCollisionException], a + ld a, [wPlayerDirection] + and a + jr z, SetPlayerIdle ; player movement is disabled + ldh a, [hJoyState] + ld d, a + ld hl, wDebugFlags + bit DEBUG_FIELD_F, [hl] + jr z, .skip_debug_move + bit B_BUTTON_F, d + jp nz, CheckMovementDebug +.skip_debug_move + ld a, [wPlayerState] + cp PLAYER_SKATE + jp z, CheckMovementSkateboard + cp PLAYER_SURF + jp z, OldCheckMovementSurf + jp CheckMovementWalkOrBike + +SetPlayerIdle: ; 03:402c + ld a, NO_MOVEMENT + +SetPlayerMovement: ; 03:402e + ld [wPlayerMovement], a + ld a, [wPlayerLastMapX] + ld [wPlayerNextMapX], a + ld a, [wPlayerLastMapY] + ld [wPlayerNextMapY], a + and a + ret + +CheckMovementWalkOrBike: ; 03:403f + call _CheckMovementWalkOrBike + jp SetPlayerMovement + +_CheckMovementWalkOrBike: ; 03:4045 + ld a, d + and D_PAD + jp z, .idle + ld a, d + bit D_DOWN_F, a + jp nz, .check_down + bit D_UP_F, a + jp nz, .check_up + bit D_LEFT_F, a + jp nz, .check_left + bit D_RIGHT_F, a + jr nz, .check_right +.idle + ld a, NO_MOVEMENT + ret + +.check_right + ld a, [wPlayerLastMapX] + inc a + ld [wPlayerNextMapX], a + call CheckPlayerObjectCollision + jr c, .face_right + call IsPlayerCollisionTileSolid + jr nc, .move_right + jr .face_right +.move_right + ld a, [wPlayerState] + cp PLAYER_BIKE + ld a, FAST_STEP_RIGHT + ret z + ld a, STEP_RIGHT + ret +.face_right + ld a, FACE_RIGHT + ret + +.check_left: + ld a, [wPlayerLastMapX] + dec a + ld [wPlayerNextMapX], a + call CheckPlayerObjectCollision + jr c, .face_left + call IsPlayerCollisionTileSolid + jr nc, .move_left + jr .face_left +.move_left + ld a, [wPlayerState] + cp PLAYER_BIKE + ld a, FAST_STEP_LEFT + ret z + ld a, STEP_LEFT + ret +.face_left + ld a, FACE_LEFT + ret + +.check_down + ld a, [wPlayerLastMapY] + inc a + ld [wPlayerNextMapY], a + call CheckPlayerObjectCollision + jr c, .face_down + call IsPlayerCollisionTileSolid + jr nc, .move_down + cp OLD_COLLISION_LEDGE + jr nz, .face_down + ld a, JUMP_DOWN + ret +.move_down + ld a, [wPlayerState] + cp PLAYER_BIKE + ld a, FAST_STEP_DOWN + ret z + ld a, STEP_DOWN + ret +.face_down + ld a, FACE_DOWN + ret + +.check_up + ld a, [wPlayerLastMapY] + dec a + ld [wPlayerNextMapY], a + call CheckPlayerObjectCollision + jr c, .face_up + call IsPlayerCollisionTileSolid + jr nc, .move_up + jr .face_up +.move_up + ld a, [wPlayerState] + cp PLAYER_BIKE + ld a, FAST_STEP_UP + ret z + ld a, STEP_UP + ret +.face_up + ld a, FACE_UP + ret + +CheckMovementDebug:: ; 03:40eb + ld a, d + call _CheckMovementDebug + jp SetPlayerMovement + +_CheckMovementDebug: ; 03:40f2 + bit D_DOWN_F, a + jr nz, .move_down + bit D_UP_F, a + jr nz, .move_up + bit D_LEFT_F, a + jr nz, .move_left + bit D_RIGHT_F, a + jr nz, .move_right + ld a, NO_MOVEMENT + ret + +.move_down + ld a, [wTileDown] + cp -1 + ld a, FAST_STEP_DOWN + ret nz + ld a, JUMP_UP + ret + +.move_up + ld a, [wTileUp] + cp -1 + ld a, FAST_STEP_UP + ret nz + ld a, JUMP_DOWN + ret + +.move_left + ld a, [wTileLeft] + cp -1 + ld a, FAST_STEP_LEFT + ret nz + ld a, JUMP_RIGHT + ret + +.move_right + ld a, [wTileRight] + cp -1 + ld a, FAST_STEP_RIGHT + ret nz + ld a, JUMP_LEFT + ret + +CheckMovementSkateboard:: ; 03:4131 + call _CheckMovementSkateboard + jp SetPlayerMovement + +_CheckMovementSkateboard: ; 03:4137 + ld a, [wSkatingDirection] + cp STANDING + jp z, .not_moving + push de + ld e, a + ld d, $00 + ld hl, .SkateMovementTable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + pop de + jp hl + +.SkateMovementTable ; 03:414d + dw CheckSkateDown + dw CheckSkateUp + dw CheckSkateLeft + dw CheckSkateRight + +.not_moving ; 03:4155 + ld a, d + and D_PAD + jp z, .idle + bit D_DOWN_F, d + jp nz, CheckSkateDown + bit D_UP_F, d + jp nz, CheckSkateUp + bit D_LEFT_F, d + jp nz, CheckSkateLeft + bit D_RIGHT_F, d + jp nz, CheckSkateRight + +.idle + ld a, STANDING + ld [wSkatingDirection], a + ld a, NO_MOVEMENT + ret + +CheckSkateDown: ; 03:4177 + ld a, [wPlayerLastMapY] + inc a + ld [wPlayerNextMapY], a + ld a, DOWN + ld [wSkatingDirection], a + call CheckPlayerObjectCollision + jr c, .collision + call IsPlayerCollisionTileSolid + jr nc, .can_skate + cp OLD_COLLISION_LEDGE + jr z, .jump + cp (OLD_COLLISION_ROCK | COLLISION_FLAG) + jr nz, .collision + +.jump + ld a, FAST_JUMP_DOWN + ret + +.can_skate + call OldIsTileCollisionGrass + jr z, .slow + ld a, FAST_STEP_DOWN + ret + +.slow + ld a, STEP_DOWN + ret + +.collision + ld a, STANDING + ld [wSkatingDirection], a + ld a, FACE_DOWN + ret + +CheckSkateUp: ; 03:41ab + ld a, [wPlayerLastMapY] + dec a + ld [wPlayerNextMapY], a + ld a, UP + ld [wSkatingDirection], a + call CheckPlayerObjectCollision + jr c, .collision + call IsPlayerCollisionTileSolid + jr nc, .can_skate + cp (OLD_COLLISION_ROCK | COLLISION_FLAG) + jr nz, .collision + ld a, FAST_JUMP_UP + ret + +.can_skate + call OldIsTileCollisionGrass + jr z, .slow + ld a, FAST_STEP_UP + ret + +.slow + ld a, STEP_UP + ret + +.collision + ld a, STANDING + ld [wSkatingDirection], a + ld a, FACE_UP + ret + +CheckSkateLeft: ; 03:41db + ld a, [wPlayerLastMapX] + dec a + ld [wPlayerNextMapX], a + ld a, LEFT + ld [wSkatingDirection], a + call CheckPlayerObjectCollision + jr c, .collision + call IsPlayerCollisionTileSolid + jr nc, .can_skate + cp (OLD_COLLISION_ROCK | COLLISION_FLAG) + jr nz, .collision + ld a, FAST_JUMP_LEFT + ret + +.can_skate + call OldIsTileCollisionGrass + jr z, .slow + ld a, FAST_STEP_LEFT + ret + +.slow + ld a, STEP_LEFT + ret + +.collision + ld a, STANDING + ld [wSkatingDirection], a + ld a, FACE_LEFT + ret + +CheckSkateRight: ; 03:420b + ld a, [wPlayerLastMapX] + inc a + ld [wPlayerNextMapX], a + ld a, RIGHT + ld [wSkatingDirection], a + call CheckPlayerObjectCollision + jr c, .collision + call IsPlayerCollisionTileSolid + jr nc, .can_skate + cp (OLD_COLLISION_ROCK | COLLISION_FLAG) + jr nz, .collision + ld a, FAST_JUMP_RIGHT + ret + +.can_skate + call OldIsTileCollisionGrass + jr z, .slow + ld a, FAST_STEP_RIGHT + ret + +.slow + ld a, STEP_RIGHT + ret + +.collision + ld a, STANDING + ld [wSkatingDirection], a + ld a, FACE_RIGHT + ret + +OldIsTileCollisionGrass:: ; 03:423b +; Check whether collision ID in a is +; grass +; Result: +; nz - not grass +; z - grass + cp $82 + ret z + cp $83 + ret z + cp $8a + ret z + cp $8b + ret + +OldCheckMovementSurf:: ; 03:4247 + call _OldCheckMovementSurf + jp SetPlayerMovement + +_OldCheckMovementSurf: ; 03:424d + ld a, d + and D_PAD + bit D_DOWN_F, a + jp nz, .check_down + bit D_UP_F, a + jp nz, .check_up + bit D_LEFT_F, a + jp nz, .check_left + bit D_RIGHT_F, a + jr nz, .check_right + ld a, NO_MOVEMENT + ret + +.check_down + ld a, [wPlayerLastMapY] + inc a + ld [wPlayerNextMapY], a + call CheckPlayerObjectCollision + jr c, .face_down + call IsPlayerCollisionTileSolid + jr nc, .exit_water_down ; FIXME: This assumes cut-trees are solid, which they aren't. + ; You can walk into them from water because of this. + call OldIsTileCollisionWater + jr c, .face_down + ld a, STEP_DOWN + ret +.face_down + ld a, FACE_DOWN + ret +.exit_water_down + call SetPlayerStateWalk + ld a, SLOW_STEP_DOWN + ret + +.check_up + ld a, [wPlayerLastMapY] + dec a + ld [wPlayerNextMapY], a + call CheckPlayerObjectCollision + jr c, .face_up + call IsPlayerCollisionTileSolid + jr nc, .exit_water_up ; FIXME: This assumes cut-trees are solid, which they aren't. + ; You can walk into them from water because of this. + call OldIsTileCollisionWater + jr c, .face_up + ld a, STEP_UP + ret +.face_up + ld a, FACE_UP + ret +.exit_water_up + call SetPlayerStateWalk + ld a, SLOW_STEP_UP + ret + +.check_left + ld a, [wPlayerLastMapX] + dec a + ld [wPlayerNextMapX], a + call CheckPlayerObjectCollision + jr c, .face_left + call IsPlayerCollisionTileSolid + jr nc, .exit_water_left ; FIXME: This assumes cut-trees are solid, which they aren't. + ; You can walk into them from water because of this. + call OldIsTileCollisionWater + jr c, .face_left + ld a, STEP_LEFT + ret +.face_left + ld a, FACE_LEFT + ret +.exit_water_left + call SetPlayerStateWalk + ld a, SLOW_STEP_LEFT + ret + +.check_right + ld a, [wPlayerLastMapX] + inc a + ld [wPlayerNextMapX], a + call CheckPlayerObjectCollision + jr c, .face_right + call IsPlayerCollisionTileSolid + jr nc, .exit_water_right ; FIXME: This assumes cut-trees are solid, which they aren't. + ; You can walk into them from water because of this. + call OldIsTileCollisionWater + jr c, .face_right + ld a, STEP_RIGHT + ret +.face_right + ld a, FACE_RIGHT + ret +.exit_water_right + call SetPlayerStateWalk + ld a, SLOW_STEP_RIGHT + ret + +OldIsTileCollisionWater:: ; 03:42ee +; Check if collision ID in a is water +; Input: +; a - collision ID +; Result: +; c - water +; nc - not water + and COLLISION_TYPE_MASK + cp OLD_COLLISION_TYPE_WATER + ret z + cp OLD_COLLISION_TYPE_WATER2 + ret z + scf + ret + +SetPlayerStateWalk:: ; 03:42f8 + push bc + ld a, PLAYER_NORMAL + ld [wPlayerState], a + call RedrawPlayerSprite + pop bc + ret + +IsPlayerCollisionTileSolid:: ; 03:4303 +; Return whether the collision under player's feet +; is solid/sometimes solid or non-solid. +; Clobbers: a +; Results: +; a - collision ID under player's feet +; nc - non-solid +; c - solid/sometimes solid + push de + ld bc, wPlayerStruct + callab _IsObjectCollisionTileSolid + ld a, e + pop de + ret + +CheckPlayerObjectCollision:: ; 03:4312 +; Check whether player object currentl +; collides with any other object. +; Result: +; nc - no collision +; c - collision + push de + callab _CheckPlayerObjectCollision + pop de + ret nc + jp CheckCompanionObjectCollision + +CheckCompanionObjectCollision:: ; 03:4320 +; Marks the object struct pointed to by hl +; as having collided with player object. +; If object struct (as identified by hObjectStructIndexBuffer) +; is companion, cancel collision on 5th frames. +; Result: +; nc - no collision +; c - collision + ld hl, OBJECT_FLAGS + 1 + add hl, bc + set 1, [hl] ; mark object as having collided with player + ldh a, [hObjectStructIndexBuffer] + cp COMPANION_OBJECT_INDEX + jr z, .is_companion + xor a + ld [wCompanionCollisionFrameCounter], a + scf + ret +.is_companion + ld a, [wCompanionCollisionFrameCounter] + inc a + cp 5 + ld [wCompanionCollisionFrameCounter], a + jr z, .cancel_collision + scf + ret +.cancel_collision + xor a + ld [wCompanionCollisionFrameCounter], a + ret + +_OverworldMovementCheck:: ; 03:4344 + ld a, PLAYER_OBJECT_INDEX + ldh [hEventCollisionException], a + ld a, [wPlayerDirection] + and a + jp z, SetPlayerIdle + ldh a, [hJoyState] + ld d, a + ld hl, wDebugFlags + bit DEBUG_FIELD_F, [hl] + jr z, .skip_debug_move + bit B_BUTTON_F, d + jp nz, CheckMovementDebug + +.skip_debug_move + call GetPlayerMovementByState + jp SetPlayerMovement + +GetPlayerMovementByState: ; 03:4364 + ld a, [wPlayerState] + cp PLAYER_SKATE + jp z, CheckMovementSkateboard ; FIXME: CheckMovementSkateboard already calls SetPlayerMovement + ; The skateboard doesn't work, because it uses the current + ; coordinate as player animation. + cp PLAYER_SURF + jp z, CheckMovementSurf + jp CheckMovementWalk + +CheckMovementWalk:: ; 03:4374 + ld a, [wPlayerStandingTile] + swap a + and LOW((COLLISION_TYPE_MASK >> 4) | (COLLISION_TYPE_MASK << 4)) + ld hl, .WalkingCollisionTable + jp CallJumptable + +.WalkingCollisionTable ; 03:4381 + dw CheckMovementWalkRegular ; regular + dw CheckMovementWalkSolid ; trees, grass, etc. + dw CheckMovementWalkSolid ; water + dw CheckMovementWalkSolid ; water current + dw CheckMovementWalkLand ; slowdown and fixed movement + dw CheckMovementWalkLand2 ; fixed movement + dw CheckMovementWalkRegular ; ??? + dw CheckMovementWalkWarp ; warps + dw CheckMovementWalkMisc ; ??? + dw CheckMovementWalkSpecial ; counters, signposts, book cases + dw CheckMovementWalkJump ; jumps + dw CheckMovementWalkRegular ; unused -- movement prohibit not yet implemented + dw CheckMovementWalkRegular ; unused + dw CheckMovementWalkRegular ; unused + dw CheckMovementWalkRegular ; unused + dw CheckMovementWalkRegular ; unused + +NoWalkMovement: ; 03:43a1 + ld a, NO_MOVEMENT + ret + +CheckMovementWalkSolid:: ; 03:43a4 + jp CheckMovementWalkRegular + +CheckMovementWalkLand:: ; 03:43a7 + ld a, [wPlayerStandingTile] + and COLLISION_SUBTYPE_MASK + jr nz, .force_movement + call CheckMovementWalkRegular + call SlowDownMovementWalk + ret + +.force_movement + ld b, STEP_DOWN + cp (COLLISION_LAND_S & COLLISION_SUBTYPE_MASK) + jr z, .finish + ld b, STEP_UP + cp (COLLISION_LAND_N & COLLISION_SUBTYPE_MASK) + jr z, .finish + ld b, STEP_LEFT + cp (COLLISION_LAND_W & COLLISION_SUBTYPE_MASK) + jr z, .finish + ld b, STEP_RIGHT + cp (COLLISION_LAND_E & COLLISION_SUBTYPE_MASK) + jr z, .finish + ; fall-through --> map other codes to COLLISION_LAND_E +.finish + ld a, b + ret + +SlowDownMovementWalk: ; 03:43cf + ld b, SLOW_STEP_DOWN + cp STEP_DOWN + jr z, .finish + ld b, SLOW_STEP_UP + cp STEP_UP + jr z, .finish + ld b, SLOW_STEP_LEFT + cp STEP_LEFT + jr z, .finish + ld b, SLOW_STEP_RIGHT + cp STEP_RIGHT + jr z, .finish + ret +.finish + ld a, b + ret + +CheckMovementWalkLand2:: ; 03:43ea + ld a, [wPlayerStandingTile] + and COLLISION_SUBTYPE_MASK + ld b, STEP_DOWN + cp (COLLISION_LAND2_S & COLLISION_SUBTYPE_MASK) + jr z, .finish + ld b, STEP_UP + cp (COLLISION_LAND2_N & COLLISION_SUBTYPE_MASK) + jr z, .finish + ld b, STEP_LEFT + cp (COLLISION_LAND2_W & COLLISION_SUBTYPE_MASK) + jr z, .finish + ld b, STEP_RIGHT + cp (COLLISION_LAND2_E & COLLISION_SUBTYPE_MASK) + jr z, .finish + ; fall-through --> map other codes to COLLISION_LAND2_E +.finish + ld a, b + ret + +UnusedCheckMovementWalk60:: ; 03:4409 + jp CheckMovementWalkRegular + +CheckMovementWalkWarp:: ; 03:440c + ld a, [wPlayerStandingTile] + and COLLISION_SUBTYPE_MASK + jr z, .check_dpad + cp 1 + jr z, .move_down + ld a, [wPlayerStandingTile] + cp $7a + jr z, .move_down + jp CheckMovementWalkRegular +.move_down + ld a, STEP_DOWN + ret + +.check_dpad + ldh a, [hJoyState] + bit D_DOWN_F, a + jr nz, .down + bit D_UP_F, a + jr nz, .up + bit D_LEFT_F, a + jr nz, .left + bit D_RIGHT_F, a + jr nz, .right + jp NoWalkMovement + +.down + ld a, [wTileDown] + cp -1 + jp nz, CheckMovementWalkRegular + call z, .moved_out_of_bounds + ld a, FACE_DOWN + ret +.up + ld a, [wTileUp] + cp -1 + jp nz, CheckMovementWalkRegular + call z, .moved_out_of_bounds + ld a, FACE_UP + ret +.left + ld a, [wTileLeft] + cp -1 + jp nz, CheckMovementWalkRegular + call z, .moved_out_of_bounds + ld a, FACE_LEFT + ret +.right + ld a, [wTileRight] + cp -1 + jp nz, CheckMovementWalkRegular + call z, .moved_out_of_bounds + ld a, FACE_RIGHT + ret + +.moved_out_of_bounds + ret + +CheckMovementWalkMisc:: ; 03:4472 + jp CheckMovementWalkRegular + +CheckMovementWalkSpecial:: ; 03:4475 + jp CheckMovementWalkRegular + +CheckMovementWalkRegular:: ; 03:4478 + ldh a, [hJoyState] + bit D_DOWN_F, a + jp nz, CheckWalkDown + bit D_UP_F, a + jp nz, CheckWalkUp + bit D_LEFT_F, a + jp nz, CheckWalkLeft + bit D_RIGHT_F, a + jp nz, CheckWalkRight + jp NoWalkMovement + +CheckMovementWalkJump: ; 03:4491 + ldh a, [hJoyState] + bit D_DOWN_F, a + jr nz, .down + bit D_UP_F, a + jr nz, .up + bit D_LEFT_F, a + jr nz, .left + bit D_RIGHT_F, a + jr nz, .right + jp NoWalkMovement + +.down + ld a, [wPlayerStandingTile] + and COLLISION_SUBTYPE_MASK + cp (COLLISION_JUMP_S & COLLISION_SUBTYPE_MASK) + jr z, .jump_down + cp (COLLISION_JUMP_SE & COLLISION_SUBTYPE_MASK) + jr z, .jump_down + cp (COLLISION_JUMP_SW & COLLISION_SUBTYPE_MASK) + jr z, .jump_down + jp CheckWalkDown +.jump_down + ld a, JUMP_DOWN + ret + +.up + ld a, [wPlayerStandingTile] + and COLLISION_SUBTYPE_MASK + cp (COLLISION_JUMP_N & COLLISION_SUBTYPE_MASK) + jr z, .jump_up + cp (COLLISION_JUMP_NE & COLLISION_SUBTYPE_MASK) + jr z, .jump_up + cp (COLLISION_JUMP_NW & COLLISION_SUBTYPE_MASK) + jr z, .jump_up + jp CheckWalkUp +.jump_up + ld a, JUMP_UP + ret + +.left + ld a, [wPlayerStandingTile] + and COLLISION_SUBTYPE_MASK + cp (COLLISION_JUMP_W & COLLISION_SUBTYPE_MASK) + jr z, .jump_left + cp (COLLISION_JUMP_SW & COLLISION_SUBTYPE_MASK) + jr z, .jump_left + cp (COLLISION_JUMP_NW & COLLISION_SUBTYPE_MASK) + jr z, .jump_left + jp CheckWalkLeft +.jump_left + ld a, JUMP_LEFT + ret + +.right + ld a, [wPlayerStandingTile] + and COLLISION_SUBTYPE_MASK + cp (COLLISION_JUMP_E & COLLISION_SUBTYPE_MASK) + jr z, .jump_right + cp (COLLISION_JUMP_SE & COLLISION_SUBTYPE_MASK) + jr z, .jump_right + cp (COLLISION_JUMP_NE & COLLISION_SUBTYPE_MASK) + jr z, .jump_right + jp CheckWalkRight +.jump_right + ld a, JUMP_RIGHT + ret + +CheckWalkDown:: ; 03:4502 + ld d, 0 + ld e, 1 + call CheckObjectCollision + jr c, .face_down + ld a, [wTileDown] + call CheckCollisionSolid + jr c, .face_down + ld a, STEP_DOWN + ret +.face_down + ld a, FACE_DOWN + ret + +CheckWalkUp:: ; 03:4519 + ld d, 0 + ld e, -1 + call CheckObjectCollision + jr c, .face_up + ld a, [wTileUp] + call CheckCollisionSolid + jr c, .face_up + ld a, STEP_UP + ret +.face_up + ld a, FACE_UP + ret + +CheckWalkLeft:: ; 03:4530 + ld d, -1 + ld e, 0 + call CheckObjectCollision + jr c, .face_left + ld a, [wTileLeft] + call CheckCollisionSolid + jr c, .face_left + ld a, STEP_LEFT + ret +.face_left + ld a, FACE_LEFT + ret + +CheckWalkRight:: ; 03:4547 + ld d, 1 + ld e, 0 + call CheckObjectCollision + jr c, .face_right + ld a, [wTileRight] + call CheckCollisionSolid + jr c, .face_right + ld a, STEP_RIGHT + ret +.face_right + ld a, FACE_RIGHT + ret + +CheckMovementSurf:: ; 03:455e + ld a, [wPlayerStandingTile] + swap a + and LOW((COLLISION_TYPE_MASK >> 4) | (COLLISION_TYPE_MASK << 4)) + ld hl, .SurfCollisionTable + jp CallJumptable + +.SurfCollisionTable ; 03:456b + dw CheckMovementSurfRegular + dw CheckMovementSurfRegular + dw CheckMovementSurfWater + dw CheckMovementSurfWater2 + dw CheckMovementSurfRegular + dw CheckMovementSurfRegular + dw CheckMovementSurfRegular + dw CheckMovementSurfRegular + dw CheckMovementSurfRegular + dw CheckMovementSurfRegular + dw CheckMovementSurfRegular + dw CheckMovementSurfRegular + dw CheckMovementSurfRegular + dw CheckMovementSurfRegular + dw CheckMovementSurfRegular + dw CheckMovementSurfRegular + +CheckMovementSurfRegular:: ; 03:458b + ldh a, [hJoyState] + bit D_DOWN_F, a + jp nz, CheckSurfDown + bit D_UP_F, a + jp nz, CheckSurfUp + bit D_LEFT_F, a + jp nz, CheckSurfLeft + bit D_RIGHT_F, a + jp nz, CheckSurfRight + jp NoWalkMovement + +CheckMovementSurfWater:: ; 03:45a4 + ld a, [wPlayerStandingTile] + and COLLISION_SUBTYPE_MASK + cp (COLLISION_WATERFALL & COLLISION_SUBTYPE_MASK) + jr nz, CheckMovementSurfRegular +; waterfall + ld a, FAST_STEP_DOWN + ret + +CheckMovementSurfWater2:: ; 03:45b0 + ld a, [wPlayerStandingTile] + and COLLISION_WATER_SUBTYPE_MASK + ld d, STEP_RIGHT + jr z, .finish ; COLLISION_WATER2_E + ld d, STEP_LEFT + cp (COLLISION_WATER2_W & COLLISION_WATER_SUBTYPE_MASK) + jr z, .finish + ld d, STEP_UP + cp (COLLISION_WATER2_N & COLLISION_WATER_SUBTYPE_MASK) + jr z, .finish + ld d, STEP_DOWN + cp (COLLISION_WATER2_S & COLLISION_WATER_SUBTYPE_MASK) + jr z, .finish + ; fall-through --> no aliasing due to mask +.finish + ld a, d + ret + +CheckSurfDown: ; 03:45cd + ld d, 0 + ld e, 1 + call CheckObjectCollision + jr c, .face_down + ld a, [wTileDown] + call CheckCollisionSometimesSolid + jr c, .face_down ; FIXME: This assumes cut-trees are solid, which they aren't. + ; You can walk into them from water because of this. + call nz, SurfDismount + ld a, STEP_DOWN + ret +.face_down + ld a, FACE_DOWN + ret + +CheckSurfUp: ; 03:45e7 + ld d, 0 + ld e, -1 + call CheckObjectCollision + jr c, .face_up + ld a, [wTileUp] + call CheckCollisionSometimesSolid + jr c, .face_up ; FIXME: This assumes cut-trees are solid, which they aren't. + ; You can walk into them from water because of this. + call nz, SurfDismount + ld a, STEP_UP + ret +.face_up + ld a, FACE_UP + ret + +CheckSurfLeft: ; 03:4601 + ld d, -1 + ld e, 0 + call CheckObjectCollision + jr c, .face_left + ld a, [wTileLeft] + call CheckCollisionSometimesSolid + jr c, .face_left ; FIXME: This assumes cut-trees are solid, which they aren't. + ; You can walk into them from water because of this. + call nz, SurfDismount + ld a, STEP_LEFT + ret +.face_left + ld a, FACE_LEFT + ret + +CheckSurfRight: ; 03:461b + ld d, 1 + ld e, 0 + call CheckObjectCollision + jr c, .face_right + ld a, [wTileRight] + call CheckCollisionSometimesSolid + jr c, .face_right ; FIXME: This assumes cut-trees are solid, which they aren't. + ; You can walk into them from water because of this. + call nz, SurfDismount + ld a, STEP_RIGHT + ret +.face_right + ld a, FACE_RIGHT + ret + +SurfDismount: ; 03:4635 + jp SetPlayerStateWalk + +CheckObjectCollision:: ; 03:4638 +; Check if coordinates relative +; to player collide with another object +; Clobbers: +; a, hl +; Input: +; de - Relative coords x, y +; Output: +; nc - no collision +; c - collision +; hObjectStructIndexBuffer - Event ID of colliding event + ld a, PLAYER_OBJECT_INDEX + ldh [hEventCollisionException], a + ld a, [wPlayerNextMapX] + add d + ld d, a + ld a, [wPlayerNextMapY] + add e + ld e, a + callab _CheckObjectCollision + ret nc + jp CheckCompanionObjectCollision + +CheckCollisionSolid:: +; Checks whether collision ID in a +; is solid or not. +; Clobbers: +; hl +; Input: +; a - collision ID +; Result: +; a - collision type +; c - solid +; nc - not solid + call GetCollisionType + and a + ret z + scf + ret + +GetCollisionType:: +; Get collision type for collision ID in a +; Clobbers: hl +; Input: +; a - collision ID +; Result: +; a - collision type +; 00 - not solid +; 01 - sometimes solid (cut tree, water etc.) +; 0F - always solid + push de + ld hl, CollisionTypeTable + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + pop de + ret + +SECTION "Rest of Player Movement", ROMX[$4764], BANK[$03] + +_UnusedReturnFalse:: ; 03:4764 + xor a + ret + +_UnusedReturnTrue:: ; 03:4766 + xor a + scf + ret + +CheckCollisionSometimesSolid:: ; 03:4769 +; Checks whether collision ID in a +; is sometimes, always or never solid. +; Clobbers: +; hl +; Input: +; a - collision ID +; Result: +; c - always solid +; nc - sometimes not solid, check a +; a - result +; 00 - sometimes solid +; 01 - never solid + call GetCollisionType + cp SOMETIMES_SOLID + jr z, .sometimes_solid + and a + jr z, .never_solid + jr .always_solid +.sometimes_solid + xor a + ret +.never_solid + ld a, 1 + and a + ret +.always_solid + scf + ret + + +SECTION "_RedrawPlayerSprite", ROMX[$4000], BANK[$05] + +_RedrawPlayerSprite: ; 05:4000 + call GetPlayerSprite + ld hl, vChars0 + call LoadOverworldSprite + ret + +GetPlayerSprite: ; 05:400a + ld a, [wPlayerState] + ld hl, PlayerSpriteTable + ld c, a +.loop + ld a, [hli] + cp c + jr z, .match + inc hl + cp -1 + jr nz, .loop + xor a + ld [wPlayerState], a + ld a, SPRITE_GOLD + jr .skip +.match + ld a, [hl] +.skip + ld [wUsedSprites], a + ld [wPlayerSprite], a + ld [wPlayerObjectSprite], a + ret + +PlayerSpriteTable: ; 03:402d +; state, sprite + db PLAYER_NORMAL, SPRITE_GOLD + db PLAYER_BIKE, SPRITE_GOLD_BIKE + db PLAYER_SKATE, SPRITE_GOLD_SKATEBOARD + db PLAYER_SURF, SPRITE_LAPLACE + db -1 diff --git a/engine/palettes.asm b/engine/palettes.asm index d1f93c0..67ed9fe 100644 --- a/engine/palettes.asm +++ b/engine/palettes.asm @@ -1,6 +1,6 @@ INCLUDE "constants.asm" -SECTION "Overworld fade", ROMX[$433e],BANK[$23] +SECTION "Overworld fade", ROMX[$433e], BANK[$23] OverworldFadeIn:: ; 23:433e ld c, 0 @@ -18,7 +18,7 @@ OverworldFadeOut:: ; 23:4349 ; TODO: merge this -SECTION "Palette fading, part 2?", ROMX[$43d1],BANK[$23] +SECTION "Palette fading, part 2?", ROMX[$43d1], BANK[$23] ApplyPalettesAtHL:: ; 23:43d1 push hl diff --git a/data/sprites/sprites.asm b/engine/sprites/sprites.asm index b901b7a..a1dc401 100644 --- a/data/sprites/sprites.asm +++ b/engine/sprites/sprites.asm @@ -1,5 +1,58 @@ INCLUDE "constants.asm" +SECTION "LoadOverworldSprite", ROMX[$4150], BANK[$05] + +LoadOverworldSprite: ; 05:4150 + push af + call GetOverworldSpriteData + push bc + push hl + push de + ld a, [wcdaf] + bit 7, a + jr nz, .dont_copy + call Get2bpp +.dont_copy + pop de + ld hl, SPRITE_TILE_SIZE * 3 + add hl, de + ld d, h + ld e, l + pop hl + ld bc, vChars1 - vChars0 + add hl, bc + pop bc + pop af + call IsAnimatedSprite + ret c + ld a, [wcdaf] + bit 6, a + ret nz + call Get2bpp + ret + +; get the data for overworld sprite in a +; returns: gfx ptr in hl, length in c, bank in b +GetOverworldSpriteData: ; 05:417d + push hl + dec a + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld bc, OverworldSprites + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + inc hl + ld c, [hl] + swap c + inc hl + ld b, [hl] + pop hl + ret + SECTION "OverworldSprites", ROMX[$423B], BANK[$05] overworld_sprite: MACRO diff --git a/engine/title.asm b/engine/title.asm index 7f9d707..d7ae3a7 100644 --- a/engine/title.asm +++ b/engine/title.asm @@ -630,9 +630,9 @@ SetTitleGfxNext:: ret if DEBUG -SECTION "Title screen TEMPORARY", ROMX[$62A5],BANK[1] ; TODO: merge this with the main section above +SECTION "Title screen TEMPORARY", ROMX[$62A5], BANK[$01] ; TODO: merge this with the main section above else -SECTION "Title screen TEMPORARY", ROMX[$62A2],BANK[1] ; TODO: merge this with the main section above +SECTION "Title screen TEMPORARY", ROMX[$62A2], BANK[$01] ; TODO: merge this with the main section above endc diff --git a/home/audio.asm b/home/audio.asm index 03a0990..609c8dc 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -140,3 +140,130 @@ PlaySFX:: ; 3d63 ret WaitPlaySFX:: ; 3d7f + call WaitSFX + call PlaySFX + ret + +WaitSFX:: ; 3d86 + push hl +.loop + ld hl, wChannel5Flags1 + bit 0, [hl] + jr nz, .loop + ld hl, wChannel6Flags1 + bit 0, [hl] + jr nz, .loop + ld hl, wChannel7Flags1 + bit 0, [hl] + jr nz, .loop + ld hl, wChannel8Flags1 + bit 0, [hl] + jr nz, .loop + pop hl + ret + +MaxVolume:: ; 3DA5 + ld a, $77 + ld [wVolume], a + ret + +LowVolume:: ; 3DAB + ld a, $33 + ld [wVolume], a + ret + +VolumeOff:: ; 3DB1 + xor a + ld [wVolume], a + ret + +UpdateSoundNTimes:: ; 3DB6 +.loop + and a + ret z + dec a + call UpdateSound + jr .loop + +FadeToMapMusic:: ; 3DBE + push hl + push de + push bc + push af + call GetMapMusic + ld a, [wMapMusic] + cp e + jr z, .jump + ld a, $08 + ld [wMusicFade], a + ld a, e + ld [wMusicFadeID], a + ld a, d + ld [wMusicFadeID+1], a + ld a, e + ld [wMapMusic], a +.jump + pop af + pop bc + pop de + pop hl + ret + +PlayMapMusic:: ; 3DE1 + push hl + push de + push bc + push af + call GetMapMusic + ld a, [wMapMusic] + cp e + jr z, .jump + push de + ld de, $0000 + call PlayMusic + call DelayFrame + pop de + ld a, e + ld [wMapMusic], a + call PlayMusic +.jump + pop af + pop bc + pop de + pop hl + ret + +SpecialMapMusic:: ; 3E05 + ld a, [wPlayerState] + and a + jr z, .normal + cp $02 + jr z, .state2 + ld de, $0009 + scf + ret + +.state2 ; 3E14 + ld de, $0000 + scf + ret + +.normal ; 3E19 + and a + ret + +GetMapMusic:: ; 3E1B + call SpecialMapMusic + ret c + ld a, [wMapPermissions] + cp $01 + jr z, .jump + cp $03 + jr z, .jump + ld de, $0002 + ret +.jump ; 3E2E + ld de, $0007 + ret + +; 3E32, this is likely not a function.
\ No newline at end of file diff --git a/home/copy2.asm b/home/copy2.asm index 9baad62..e74ef8b 100644 --- a/home/copy2.asm +++ b/home/copy2.asm @@ -2,8 +2,8 @@ INCLUDE "constants.asm" SECTION "Video Copy functions", ROM0[$0D02] -Function0d02:: - jpab Function14000 +RedrawPlayerSprite:: + jpab _RedrawPlayerSprite LoadFont:: ; 00:0d0a jpab LoadFontGraphics diff --git a/home/map.asm b/home/map.asm index 8105781..7b9bd71 100644 --- a/home/map.asm +++ b/home/map.asm @@ -448,8 +448,8 @@ FadeIn:: ; 23e5 ; This is not OverworldFadeIn, but I don't know what it is ret Function2407:: ; 00:2407 - ld a, $2a - ld [wcb77], a + ld a, NO_MOVEMENT + ld [wPlayerMovement], a xor a ld [wPlayerAction], a ld a, [wPlayerFacing] @@ -470,7 +470,7 @@ Function2407:: ; 00:2407 ld [wPlayerFacing], a ld a, $0 ld d, $0 - call Function19c0 + call SetObjectFacing ret MapSetup_Connection:: ; 2439 @@ -505,7 +505,7 @@ CheckMovingOffEdgeOfMap:: ; 245e ret .down - ld a, [wPlayerStandingMapY] + ld a, [wPlayerNextMapY] sub 4 ld b, a ld a, [wMapHeight] @@ -516,7 +516,7 @@ CheckMovingOffEdgeOfMap:: ; 245e ret .up - ld a, [wPlayerStandingMapY] + ld a, [wPlayerNextMapY] sub 4 cp -1 jr z, .ok @@ -524,7 +524,7 @@ CheckMovingOffEdgeOfMap:: ; 245e ret .left - ld a, [wPlayerStandingMapX] + ld a, [wPlayerNextMapX] sub 4 cp -1 jr z, .ok @@ -532,7 +532,7 @@ CheckMovingOffEdgeOfMap:: ; 245e ret .right - ld a, [wPlayerStandingMapX] + ld a, [wPlayerNextMapX] sub 4 ld b, a ld a, [wMapWidth] @@ -701,10 +701,10 @@ WarpCheck:: ; 259f ret GetDestinationWarpPointer: ; 25b9 - ld a, [wPlayerStandingMapY] + ld a, [wPlayerNextMapY] sub 4 ld d, a - ld a, [wPlayerStandingMapX] + ld a, [wPlayerNextMapX] sub 4 ld e, a ld a, [wCurrMapWarpCount] @@ -1028,15 +1028,15 @@ Function275e:: ; 275e ; TODO: is this used? ld [wOverworldMapAnchor + 1], a ld a, [wYCoord] and 1 - ld [wMetatileStandingY], a + ld [wMetatileNextY], a ld a, [wXCoord] and 1 - ld [wMetatileStandingX], a + ld [wMetatileNextX], a ret GetCoordOfUpperLeftCorner:: ; 277a - ld hl, wOverworldMap + ld hl, wOverworldMapBlocks ld a, [wXCoord] bit 0, a jr nz, .increment_then_halve1 @@ -1075,10 +1075,10 @@ GetCoordOfUpperLeftCorner:: ; 277a ld [wOverworldMapAnchor + 1], a ld a, [wYCoord] and 1 - ld [wMetatileStandingY], a + ld [wMetatileNextY], a ld a, [wXCoord] and 1 - ld [wMetatileStandingX], a + ld [wMetatileNextX], a ret Function27C7:: ; 27c7 ; TODO @@ -1175,13 +1175,13 @@ LoadMetatiles:: ; 2822 ApplyFlashlight:: ; 285a ld hl, wTileMapBackup - ld a, [wMetatileStandingY] + ld a, [wMetatileNextY] and a jr z, .top_row ld bc, $30 ; TODO: constantify this add hl, bc .top_row - ld a, [wMetatileStandingX] + ld a, [wMetatileNextX] and a jr z, .left_col inc hl @@ -1324,12 +1324,12 @@ ENDR ChangeMap:: ; 294d - ld hl, wOverworldMap - ld bc, wOverworldMapEnd - wOverworldMap + ld hl, wOverworldMapBlocks + ld bc, wOverworldMapBlocksEnd - wOverworldMapBlocks ld a, 0 call ByteFill - ld hl, wOverworldMap + ld hl, wOverworldMapBlocks ld a, [wMapWidth] ldh [hConnectedMapWidth], a add a, 6 @@ -1593,7 +1593,7 @@ Function2a8d:: ; 00:2a8d dbbw $05, $33, Function14777 Function2ae5:: -.asm_2ae5: ; 00:2ae5 +.loop: ; 00:2ae5 ld hl, wJoypadFlags set 4, [hl] set 6, [hl] @@ -1608,33 +1608,31 @@ Function2ae5:: bit 7, [hl] res 7, [hl] ret nz - call Function38e3 + call TestWildBattleStart ret nz call OverworldStartButtonCheck ret nz - ld hl, PlaceWaitingText - ld a, $3 - call FarCall_hl + callab OverworldMovementCheck ldh a, [hMapEntryMethod] and a ret nz call Function2c4a - jr nc, .asm_2ae5 + jr nc, .loop callba Function824c ld a, [wc5ed] bit 6, a - jr nz, .asm_2ae5 + jr nz, .loop call CheckMovingOffEdgeOfMap ret c call WarpCheck ret c - jr .asm_2ae5 + jr .loop Function2b39:: ld hl, wJoypadFlags res 4, [hl] res 6, [hl] - ld hl, wce63 + ld hl, wDebugFlags res 6, [hl] res 7, [hl] ld hl, wVramState @@ -1679,7 +1677,7 @@ Function2b87:: call GetJoypad call OverworldStartButtonCheck ret nz - callab Functionc000 + callab OverworldMovementCheck call Function2ba8 jr nc, .asm_2b87 callba Function824c @@ -1714,8 +1712,8 @@ Function2ba8:: ; 00:2ba8 scf ret -Function2be5:: ; 00:2be5 - ld a, [wce63] +Function2be5:: ; 00:2be5 ; TODO + ld a, [wDebugFlags] bit 7, a ret nz ld a, [wMapGroup] diff --git a/home/map_objects.asm b/home/map_objects.asm index 70cba50..c473e13 100644 --- a/home/map_objects.asm +++ b/home/map_objects.asm @@ -315,6 +315,7 @@ UpdateSprites:: ; 00:17a8 ret GetObjectStruct:: ; 00:17bf +; Puts the start of the a'th object struct into bc ld bc, $28 ld hl, wObjectStructs call AddNTimes @@ -334,26 +335,34 @@ Function17cb:: call Bankswitch ret -Function17de:: +; sets carry flag if the sprite data includes "in-motion" sprites +IsAnimatedSprite:: ; 00:17de push hl push bc ld c, a - ld b, $ff - ld hl, .Data -.asm_17e6: ; 00:17e6 + ld b, -1 + ld hl, .NonAnimatedSprites +.loop ld a, [hli] cp b - jr z, .asm_17ee + jr z, .done cp c - jr nz, .asm_17e6 + jr nz, .loop scf -.asm_17ee: ; 00:17ee +.done pop bc pop hl ret -.Data: ; 00:17f1 - db $51, $55, $56, $57, $58, $5a, $5b, $ff +.NonAnimatedSprites: ; 00:17f1 + db SPRITE_KABIGON + db SPRITE_POKE_BALL + db SPRITE_POKEDEX + db SPRITE_PAPER + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_EGG + db SPRITE_BOULDER + db -1 Function17f9:: call GetMapObject @@ -661,7 +670,8 @@ Function19b5:: res 7, [hl] ret -Function19c0:: +SetObjectFacing:: ; 19C0 + ; a is NPC number, d is direction push de call CheckObjectVisibility pop de diff --git a/home/misc_32c8.asm b/home/misc_32c8.asm index 8b423bb..00e41ce 100644 --- a/home/misc_32c8.asm +++ b/home/misc_32c8.asm @@ -78,7 +78,7 @@ WaitPressedAny:: ; 369a CountSetBits:: ; 36b1 ; Count the number of bits set in b bytes at hl. -; Return to a, c, and wce37. +; Return to a, c, and wCountSetBitsResult. ld c, $0 .asm_36b3: ; 00:36b3 ld a, [hli] @@ -94,5 +94,5 @@ CountSetBits:: ; 36b1 dec b jr nz, .asm_36b3 ld a, c - ld [wce37], a + ld [wCountSetBitsResult], a ret diff --git a/home/oam_dma.asm b/home/oam_dma.asm index 42ecaaf..42c68e7 100644 --- a/home/oam_dma.asm +++ b/home/oam_dma.asm @@ -1,6 +1,6 @@ INCLUDE "constants.asm" -SECTION "OAM DMA", ROMX[$4153],BANK[1] +SECTION "OAM DMA", ROMX[$4153], BANK[$01] WriteOAMDMACodeToHRAM:: ; 4153 ld c, LOW(hOAMDMA) diff --git a/home/overworld.asm b/home/overworld.asm index 2b37b7c..51ba0f5 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -14,8 +14,8 @@ if DEBUG and (START | B_BUTTON) cp (START | B_BUTTON) jr nz, .regularMenu - ld a, [wce63] - bit 1, a + ld a, [wDebugFlags] + bit DEBUG_FIELD_F, a ret z ; debug disabled callba InGameDebugMenu jr CheckStartmenuSelectHook diff --git a/home/talk_to_npc.asm b/home/talk_to_npc.asm index 9ef5dd3..69bee3e 100644 --- a/home/talk_to_npc.asm +++ b/home/talk_to_npc.asm @@ -6,9 +6,9 @@ else SECTION "Unknown 3025", ROM0 [$2fe9] endc -Function3025:: +MapDefaultText:: ld hl, .Text - call Function3111 + call OpenTextbox ret .Text: ; 00:302c @@ -22,8 +22,8 @@ Function3036:: ; 3036 .Text: ; 00:303a db "@" -CallMapTextSubroutine:: - ld a, [wcdb0] +CallMapTextSubroutine:: ; 00:303b + ld a, [wTalkingTargetType] bit 0, a jr z, asm_3062 call Function3055 @@ -43,16 +43,16 @@ CallMapTextSubroutine:: Function3055:: ; 00:3055 ldh a, [hFFEA] ld b, a -.asm_3058: ; 00:3058 +.Loop: ; 00:3058 ld a, [hli] cp $ff ret z cp b - jp z, Function3240 - jr .asm_3058 + jp z, SetFFInAccumulator + jr .Loop asm_3062: ; 00:3062 - ld a, [wcdb0] + ld a, [wTalkingTargetType] bit 1, a ret z ld h, d @@ -71,28 +71,29 @@ asm_3062: ; 00:3062 jp hl Function307a:: ; 00:307a - ld hl, wcdb0 + ld hl, wTalkingTargetType res 0, [hl] res 1, [hl] - call Function3240 + call SetFFInAccumulator ret -Function3085:: ; 00:3085 +PrintTextboxDebugNumbers:: ; 00:3085 push hl push de push bc - ld de, $99 - ld a, [wcdb0] + ld de, $0099 ; default address to print from (not a sign or NPC) + ld a, [wTalkingTargetType] bit 0, a - jr z, .asm_3097 + jr z, .CheckSign ld de, hFFEA - jr .asm_309e + jr .PrintNum -.asm_3097: ; 00:3097 +.CheckSign: ; 00:3097 bit 1, a - jr z, .asm_309e + jr z, .PrintNum ld de, hFFEE -.asm_309e: ; 00:309e + +.PrintNum: ; 00:309e hlcoord 4, 12 lb bc, PRINTNUM_LEADINGZEROS | 1, 2 call PrintNumber @@ -105,17 +106,17 @@ Function3085:: ; 00:3085 pop hl ret -QueueMapTextSubroutine:: +QueueMapTextSubroutine:: ; 00:30b7 ldh a, [hJoyState] bit A_BUTTON_F, a - jp z, Function323e + jp z, ClearAccumulator ; if we didn't press a call GetFacingPersonText - jp nc, Function30e8 + jp nc, Function30e8 ; if not talking to a person ld d, $0 ld e, a - ld a, [wce63] - bit 1, a - call nz, Function3085 + ld a, [wDebugFlags] + bit DEBUG_FIELD_F, a + call nz, PrintTextboxDebugNumbers ; if debug, print these ld hl, wMapTextPtr ld a, [hli] ld h, [hl] @@ -128,14 +129,14 @@ QueueMapTextSubroutine:: inc de ld a, [hl] ld [de], a - ld hl, wcdb0 - set 0, [hl] - call Function3240 + ld hl, wTalkingTargetType + set 0, [hl] ; we're talking to an NPC + call SetFFInAccumulator ret Function30e8:: ; 00:30e8 call GetFacingSignpost - jp nc, Function323e + jp nc, ClearAccumulator ; if not facing person or sign ld a, e ldh [hFFEB], a ld a, d @@ -144,14 +145,217 @@ Function30e8:: ; 00:30e8 ldh [hFFED], a ld a, [hl] ldh [hFFEE], a - ld hl, wcdb0 - set 1, [hl] - call Function3240 + ld hl, wTalkingTargetType + set 1, [hl] ; we're talking to a sign + call SetFFInAccumulator ret GetFacingPersonText:: ; 00:3103 callba Function776e ret nc - call Function319b + call TurnNPCTalkingTo scf ret + +OpenTextbox:: ; 00:3111 + ; Opens a textbox and waits for input + push hl + call PrepareTextbox + ld a, [wDebugFlags] + bit DEBUG_FIELD_F, a + call nz, PrintTextboxDebugNumbers + pop hl + call TextboxIdle + ret + +OpenTextboxNoInput:: ; 00:3122 + push hl + call PrepareTextbox + pop hl + +TextboxIdle:: ; 00:3127 + ; Prints text, then waits for A or B to be pressed, unless bit 5 of JoypadFlags is set. + call PrintTextBoxText +.Loop + ld a, [wJoypadFlags] + bit 5, a + res 5, a + ld [wJoypadFlags], a + jr nz, .Escape + call GetJoypad + ldh a, [hJoyDown] + and A_BUTTON | B_BUTTON + jr nz, .Escape + call UpdateTime + call UpdateTimeOfDayPalettes + call DelayFrame + jr .Loop +.Escape + call TextboxCleanup + ret + +PrepareTextbox:: ; 00:314E + call ClearWindowData + ldh a, [hROMBank] + push af + ld a, 01 + call Bankswitch + call ReanchorBGMap_NoOAMUpdate + hlcoord 0, 12 ;in the tilemap in WRAM + ld b, 04 + ld c, $12 + call DrawTextBox + call WaitBGMap + call LoadFonts_NoOAMUpdate + pop af + call Bankswitch + ret + +TextboxCleanup: ; 00:3171 + callab ReanchorBGMap_NoOAMUpdate + call UpdateSprites + xor a + ldh [hBGMapMode], a + ld a, $90 + ldh [hWY], a + call Function318f + ld hl, wToolgearFlags + res 7, [hl] + call InitToolgearBuffer + ret + +Function318f: ; 00:318f + callab Function140ea + call RedrawPlayerSprite + ret + +TurnNPCTalkingTo:: ; 00:319b + ; If an NPC is allowed to turn when talked to, turn it. + ldh a, [hObjectStructIndexBuffer] + call GetObjectStruct + ld hl, OBJECT_SPRITE + add hl, bc + ld a, [hl] + call IsAnimatedSprite + jr c, .Jump + ld a, [wPlayerWalking] + xor 04 + ld hl, OBJECT_DIRECTION_WALKING + add hl, bc + ld [hl], a + push bc + call UpdateSprites + pop bc +.Jump + ld hl, OBJECT_MAP_OBJECT_INDEX + add hl, bc + ld a, [hl] + sub 02 + ldh [hFFEA], a + ret + +Function31C3:: ; 00:31C3 + ret + +CheckInlineTrainer:: ; 00:31C4 + ; Passed de is the pointer to a map_object struct. If it's an inline trainer, write to relevant wram region. + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, de + ld a, [hl] + call GetObjectStruct + call GetInlineMapObject + jr nc, .Escape + ld hl, MAPOBJECT_POINTER_HI + add hl, de + ld a, [hl] + cp b + jr c, .Escape + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, de + ld a, [hl] + add a, a + ld hl, wCurrMapInlineTrainers + add a, l + ld l, a + jr nc, .NoCarry + inc h +.NoCarry + ld [hl], b + inc hl + ld [hl], c +.Escape + ret + +GetInlineMapObject:: ; 00:31EB + ;bc is start of object struct. if c flag set, returns distance in B and direction in C + ld hl, OBJECT_NEXT_MAP_X + add hl, bc + ld a, [wPlayerNextMapX] + cp [hl] + jr z, .EqualX + ld hl, OBJECT_NEXT_MAP_Y + add hl, bc + ld a, [wPlayerNextMapY] + cp [hl] + jr z, .EqualY + and a + ret +.EqualX + ld hl, OBJECT_NEXT_MAP_Y + add hl, bc + ld a, [wPlayerNextMapY] + sub [hl] + jr z, .Reset + jr nc, .SetDown + cpl + inc a + ld b, a + ld c, UP + scf + ret +.SetDown ; 3214 + ld b, a + ld c, DOWN + scf + ret +.EqualY ; 3219 + ld hl, OBJECT_NEXT_MAP_X + add hl, bc + ld a, [wPlayerNextMapX] + sub [hl] + jr z, .Reset ; (this condition is impossible to meet) + jr nc, .SetRight + cpl + inc a + ld b, a + ld c, LEFT + scf + ret +.SetRight ; 322C + ld b, a + ld c, RIGHT + scf + ret +.Reset ; 3231 + and a + ret + +CheckBPressedDebug: ; 3233 + ; If in debug mode, returns a check on the B button. + ld a, [wDebugFlags] + bit DEBUG_FIELD_F, a + ret z + ldh a, [hJoyState] + bit B_BUTTON_F, a + ret + +ClearAccumulator:: ; 323E + xor a + ret + +SetFFInAccumulator:: ; 3240 + xor a + dec a + ret + +; 3243 diff --git a/home/text.asm b/home/text.asm index b3cd75c..48662e9 100644 --- a/home/text.asm +++ b/home/text.asm @@ -156,7 +156,7 @@ ENDM dict "<TM>", TMChar dict "<TRAINER>", TrainerChar dict "<CONT>", ContText - dict "<……>", SixDotsChar + dict "<⋯⋯>", SixDotsChar dict "<DONE>", DoneText dict "<PROMPT>", PromptText dict "<GA>", GaCharacter @@ -232,7 +232,7 @@ NullChar:: ; 00:0f66 ret .Text: - deciram hTextErrno, 1, 2 + deciram hEventID, 1, 2 text "エラー" done @@ -244,7 +244,7 @@ ENDM PrintMomsName:: print_name wMomsName PrintPlayerName:: print_name wPlayerName -PrintRivalName:: print_name wRivalsName +PrintRivalName:: print_name wRivalName TrainerChar:: print_name TrainerCharText TMChar:: print_name TMCharText @@ -287,7 +287,7 @@ TrainerCharText:: db "トレーナー@" PCCharText:: db "パソコン@" RocketCharText:: db "ロケットだん@" POKeCharText:: db "ポケモン@" -SixDotsCharText:: db "……@" +SixDotsCharText:: db "⋯⋯@" EnemyText:: db "てきの @" GaCharacterTExt:: db "が @" @@ -680,7 +680,7 @@ Text_TX_DOTS: ; 11e1 (0:11e1) ld h, b ld l, c .loop - ld a, "…" + ld a, "⋯" ld [hli], a push de call GetJoypad diff --git a/home/tileset.asm b/home/tileset.asm index aabf249..4512728 100644 --- a/home/tileset.asm +++ b/home/tileset.asm @@ -50,7 +50,7 @@ RefreshPlayerCoords:: ; 2d74 ld a, [wXCoord] add a, 4 ld d, a - ld hl, wPlayerStandingMapX + ld hl, wPlayerNextMapX sub [hl] ld [hl], d ld hl, wPlayerObjectXCoord @@ -61,7 +61,7 @@ RefreshPlayerCoords:: ; 2d74 ld a, [wYCoord] add a, 4 ld e, a - ld hl, wPlayerStandingMapY + ld hl, wPlayerNextMapY sub [hl] ld [hl], e ld hl, wPlayerObjectYCoord @@ -211,18 +211,18 @@ SaveScreen:: ; 2df1 RefreshTiles:: ; 2e52 call .left_right call .up_down - ld a, [wPlayerStandingMapX] + ld a, [wPlayerNextMapX] ld d, a - ld a, [wPlayerStandingMapY] + ld a, [wPlayerNextMapY] ld e, a call GetCoordTile ld [wPlayerStandingTile], a ret .up_down ; 2e67 - ld a, [wPlayerStandingMapX] + ld a, [wPlayerNextMapX] ld d, a - ld a, [wPlayerStandingMapY] + ld a, [wPlayerNextMapY] ld e, a push de inc e @@ -235,9 +235,9 @@ RefreshTiles:: ; 2e52 ret .left_right ; 2e80 - ld a, [wPlayerStandingMapX] + ld a, [wPlayerNextMapX] ld d, a - ld a, [wPlayerStandingMapY] + ld a, [wPlayerNextMapY] ld e, a push de dec d @@ -270,10 +270,10 @@ GetFacingTileCoord:: ; 2e99 ld h, [hl] ld l, a - ld a, [wPlayerStandingMapX] + ld a, [wPlayerNextMapX] add a, d ld d, a - ld a, [wPlayerStandingMapY] + ld a, [wPlayerNextMapY] add a, e ld e, a ld a, [hl] @@ -331,7 +331,7 @@ GetBlockLocation:: ; 2ef8 add a, 6 ld c, a ld b, 0 - ld hl, wOverworldMap + 1 + ld hl, wOverworldMapBlocks + 1 add hl, bc ld a, e srl a diff --git a/home/time.asm b/home/time.asm index 3eba96c..d82235d 100644 --- a/home/time.asm +++ b/home/time.asm @@ -32,8 +32,8 @@ UpdateTime:: ; 436 (0:0436) and $1f ldh [hRTCHours], a call CloseSRAM - ld a, [wce63] - bit 1, a + ld a, [wDebugFlags] + bit DEBUG_FIELD_F, a jr z, .asm_0478 ld a, [wd153] bit 7, a diff --git a/home/unknown.asm b/home/unknown.asm index 6568b5d..3962377 100644 --- a/home/unknown.asm +++ b/home/unknown.asm @@ -53,10 +53,8 @@ Function094c:: push af ld a, BANK(Functionfe255) call Bankswitch - call Functionfe255 pop af call Bankswitch - - jp Function4031 + jp DebugMenu diff --git a/home/unknown_388f.asm b/home/unknown_388f.asm index 453c2f8..1182506 100644 --- a/home/unknown_388f.asm +++ b/home/unknown_388f.asm @@ -49,19 +49,19 @@ Function38d8:: ld [wd637], a ret -Function38e3:: +TestWildBattleStart:: ldh a, [hJoyState] - and $f0 - ret z - call Function3233 - jp nz, Function323e + and D_PAD + ret z ; if no directions are down, don't try and trigger a wild encounter + call CheckBPressedDebug + jp nz, ClearAccumulator ; if b button is down, clear acc callab Function3ee3e ld a, [wBattleMode] and a - ret z + ret z ; if no battle, return ld a, $3 call WriteIntod637 - call Function3240 + call SetFFInAccumulator ret Function3904:: @@ -92,7 +92,7 @@ Function3920:: ld hl, wJoypadFlags res 4, [hl] ld hl, .text - call Function3111 + call OpenTextbox call RotateFourPalettesLeft jp Init diff --git a/home/util.asm b/home/util.asm index 880513b..ccc990a 100644 --- a/home/util.asm +++ b/home/util.asm @@ -65,12 +65,13 @@ SkipNames:: ; 341f ret AddNTimes:: ; 3429 (0:3429) +; Adds bc to hl, a times and a ret z -.asm_342b +.loop add hl, bc dec a - jr nz, .asm_342b + jr nz, .loop ret ; 0x3430 diff --git a/home/window.asm b/home/window.asm index c2dc212..9e86453 100644 --- a/home/window.asm +++ b/home/window.asm @@ -17,7 +17,7 @@ RefreshScreen:: ret Function1fea:: - call Function3171 + call TextboxCleanup call ClearWindowData call InitToolgearBuffer ret @@ -66,8 +66,8 @@ UNION hTextBoxCursorBlinkInterval:: ds 2 ; ffaf NEXTU - ds 1 ; TODO -hTextErrno:: db ; ffb0 +hEventCollisionException:: db ; ffaf +hEventID:: db ;; ffb0 NEXTU @@ -79,17 +79,13 @@ hSpriteHeight:: ; ffb0 NEXTU -hConnectionStripLength:: ; ffaf - db -hConnectedMapWidth:: ; ffb0 - db +hConnectionStripLength:: db ; ffaf +hConnectedMapWidth:: db ; ffb0 NEXTU -hMapObjectIndexBuffer:: ; ffaf - db -hObjectStructIndexBuffer:: ; ffb0 - db +hMapObjectIndexBuffer:: db ; ffaf +hObjectStructIndexBuffer:: db ; ffb0 ENDU diff --git a/macros/wram.asm b/macros/wram.asm index da67ba5..4433267 100644 --- a/macros/wram.asm +++ b/macros/wram.asm @@ -275,8 +275,8 @@ object_struct: MACRO \1Facing:: ds 1 \1StandingTile:: ds 1 ; collision \1LastTile:: ds 1 ; collision -\1StandingMapX:: ds 1 -\1StandingMapY:: ds 1 +\1NextMapX:: ds 1 +\1NextMapY:: ds 1 \1LastMapX:: ds 1 \1LastMapY:: ds 1 \1ObjectInitX:: ds 1 diff --git a/maps/Map13.asm b/maps/Map13.asm new file mode 100644 index 0000000..b69dc4b --- /dev/null +++ b/maps/Map13.asm @@ -0,0 +1,26 @@ +include "constants.asm" + +SECTION "Map 13 Script", ROMX[$6078], BANK[$34] + +Map13ScriptLoader:: ; 6078 + ld hl, Map13ScriptPointers + call RunMapScript + call WriteBackMapScriptNumber + ret + +Map13ScriptPointers: ; 6082 + dw Map13Script + dw Map13NPCIDs + +Map13NPCIDs: ; 6086 + db $FF + +Map13TextPointers: ; 6087 + dw MapDefaultText + dw MapDefaultText + +Map13Script: ; 608B + ld hl, Map13NPCIDs + ld de, Map13TextPointers + call CallMapTextSubroutine + ret
\ No newline at end of file diff --git a/maps/PlayersHouse1F.asm b/maps/PlayersHouse1F.asm new file mode 100644 index 0000000..5157d63 --- /dev/null +++ b/maps/PlayersHouse1F.asm @@ -0,0 +1,60 @@ +include "constants.asm" + +SECTION "Player's House 1F", ROMX[$409C], BANK[$34] + +PlayersHouse1FScriptLoader:: ; 409C + ld hl, PlayersHouse1FScriptPointers + call RunMapScript + call WriteBackMapScriptNumber + ret + +PlayersHouse1FScriptPointers: ; 40A6 + dw PlayersHouse1FScript1 + dw PlayersHouse1FNPCIDs1 + dw PlayersHouse1FScript2 + dw PlayersHouse1FNPCIDs2 + +PlayersHouse1FNPCIDs1: ; 40AE + db $FF + +PlayersHouse1FNPCIDs2: ; 40AF + db 0 + db $FF + +PlayersHouse1FScript1: ; 40B1 + ld hl, PlayersHouse1FNPCIDs1 + ld de, PlayersHouse1FTextPointers + call CallMapTextSubroutine + ret + +PlayersHouse1FScript2: ; 40BB + ld hl, PlayersHouse1FNPCIDs2 + ld de, PlayersHouse1FTextPointers + call CallMapTextSubroutine + ret + +PlayersHouse1FTextPointers: ; 40C5 + dw Function38ab + dw Function38b4 + dw Function38a2 + dw Function38bd + dw Function3899 + dw PlayersHouse1FNPCText1 + +PlayersHouse1FNPCText1: ; 40D1 + ld hl, PlayersHouse1FTextString1 + call OpenTextbox + ret + +PlayersHouse1FTextString1: ; 40D8 + text "おかあさん『えっ あなた" + line "オーキドはかせに" + cont "ポケモンずかんを つくってくれって" + cont "たのまれたの?" + + para "すごいじゃない!" + line "わたしも ポケモン きらいって" + cont "わけじゃないし がんばるのよ!" + done + +; 4132
\ No newline at end of file diff --git a/maps/PlayersHouse2F.asm b/maps/PlayersHouse2F.asm new file mode 100644 index 0000000..e96a07b --- /dev/null +++ b/maps/PlayersHouse2F.asm @@ -0,0 +1,263 @@ +include "constants.asm" + +SECTION "Player's House 2F", ROMX[$418B], BANK[$34] + +PlayersHouse2FScriptLoader:: ; 418B + ld hl, PlayersHouse2FScriptPointers + call RunMapScript + call WriteBackMapScriptNumber + ret + +PlayersHouse2FScriptPointers: ; 4195 + dw PlayersHouse2FScript1 + dw PlayersHouse2FNPCIDs1 + dw PlayersHouse2FScript2 + dw PlayersHouse2FNPCIDs2 + dw PlayersHouse2FScript3 + dw PlayersHouse2FDollText + +PlayersHouse2FNPCIDs1: ; 41A1 + db 0 + db 1 + db $FF + +PlayersHouse2FNPCIDs2: ; 41A4 + db 1 + db $FF + +PlayersHouse2FTextPointers: ; 41A6 + dw Function3899 + dw PlayersHouse2FRadioText + dw PlayersHouse2FComputerText + dw Function3899 + dw PlayersHouse2FN64Text + +PlayersHouse2FScript1: ; 41B0 + call PlayersHouse2PositionCheck + ret z + ld hl, PlayersHouse2FNPCIDs1 + ld de, PlayersHouse2FTextPointers + call CallMapTextSubroutine + ret nz + ret + +PlayersHouse2PositionCheck: ; 41BF + ld hl, wd41a + bit 0, [hl] + ret nz + ld a, [wYCoord] + cp 1 + ret nz + ld a, [wXCoord] + cp 9 + ret nz + ld hl, wJoypadFlags + set 6, [hl] + ld a, LEFT + ld d, 0 + call SetObjectFacing + ld hl, PlayersHouse2FTextString2 + call OpenTextbox + call PlayersHouse2FMovePlayer + call ClearAccumulator + ret + +PlayersHouse2FMovePlayer: ; 41EA + ld a, 0 + ld hl, Movement + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 1 + call WriteIntod637 + ret + +Movement: ; 41FD + db $08 + db $04 + db $32 + +PlayersHouse2FScript2: ; 4200 + ld hl, PlayersHouse2FNPCIDs2 + ld de, PlayersHouse2FTextPointers + call CallMapTextSubroutine + ret + +PlayersHouse2FScript3: ; 420A + ld hl, wd41a + bit 3, [hl] + jr nz, .jump + ld hl, PlayersHouse2FTextString1 + call OpenTextbox + ld hl, wd41a + set 3, [hl] + ld c, 3 + call DelayFrames +.jump + ld hl, PlayersHouse2FTextString2 + call OpenTextbox + ret + +PlayersHouse2FDollText: ; 4228 + ld hl, PlayersHouse2FTextString3 + call OpenTextbox + ret + +PlayersHouse2FRadioText: ; 422F + ld hl, PlayersHouse2FTextString9 + call OpenTextbox + ret + +PlayersHouse2FComputerText: ; 4236 + ld hl, wd41a + bit 0, [hl] + jr nz, .jump + ld hl, PlayersHouse2FTextString5 + call OpenTextbox + ret + +.jump +; 4244 + call RefreshScreen + callab Function1477D + call Function1fea + ret + +PlayersHouse2FCheckEmail: ; 4253 + call YesNoBox + jr c, .jump2 + ld hl, wd41a + set 0, [hl] + ld hl, PlayersHouse2FTextString6 + call PrintText + ret + +.jump2 +; 4264 + ld hl, PlayersHouse2FTextString7 + call PrintText + ret + +PlayersHouse2FN64Text: ; 426B + ld hl, PlayersHouse2FTextString4 + call OpenTextbox + ret + +PlayersHouse2FTextString1: ; 4272 + text "ケン『おっ おまえの うでで" + line "ひかりかがやく そのとけいは⋯⋯" + cont "<PLAYER>も ついに" + cont "トレーナーギアを かったのか!" + + para "すごいじゃないか!" + line "でも かったばかりじゃ じかんしか" + cont "わからないだろ?" + cont "あとで マップが" + cont "みられるように してやるよ!" + cont "おまえ どうせ" + cont "あそびに いくんだろう?" + + para "ざんねんながら おふくろは" + line "かいものに いってるから" + cont "おこづかいを もらおうなんて" + cont "きょうは むり だぜ!" + done + +PlayersHouse2FTextString2: ; 4332 + text "そうだ おまえの パソコンに" + line "メールが とどいていたな" + cont "でかけるんなら" + cont "メールぐらい よんでおけよ" + done + +PlayersHouse2FTextString3: ; 4365 + text "クりスマスに カントーの" + line "しんせきに プレゼント" + cont "してもらった にんぎょうだ" + done + +PlayersHouse2FTextString4: ; 438D + text "ニンテンドウ64を してる!" + cont "⋯⋯ ⋯⋯ さてと!" + cont "そろそろ そとに あそびに" + cont "でかけるか!" + done + +PlayersHouse2FTextString5: ; 43BD + text "<PLAYER>は" + line "パソコンの スイッチを いれた!" + + para "おや? <PLAYER>あてに" + line "メールが とどいている ようだ" + cont "よんでみる?@" + + db $08 + +; 43F3 + call PlayersHouse2FCheckEmail + call Function3036 + ret + +PlayersHouse2FTextString6: ; 43FA + text "とつぜん メールを さしあげる" + line "しつれいを おゆるしあれ" + + para "じつは きみに どうしても" + line "わたしたい ものが あるのじゃが" + cont "うけとって もらえんかのう" + cont "ポケモンけんきゅうしゃ オーキド" + done + +PlayersHouse2FTextString7: ; 4456 + text "あとで" + line "よもっと<⋯⋯>" + done + +PlayersHouse2FTextString8: ; 4461 (unused?) + text "しんはつばい トレーナーギア!" + line "ポケモントレーナーの ための" + cont "さいせんたんの とけい です" + + para "じかんが わかるのは あたりまえ" + line "カセットを ついかすれば" + cont "ばしょも わかる! " + cont "でんわが かけられる!" + + para "とどめは" + line "ラジオを きくことができる!" + + para "もうしこみさきは⋯⋯" + line "⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯" + cont "シルフの ホームぺージだ" + done + +PlayersHouse2FTextString9: ; 44FE + text "<PLAYER>は" + line "ラジオのスイッチを おした!" + + para "ジェイ オー ピー エム" + line "こちらは" + cont "# ほうそうきょく です" + + para "#ニュースを おおくりします" + line "<⋯⋯> #の せかいてきな" + cont "けんきゅうしゃ オーキドはかせが" + cont "カントー から" + cont "すがたを けしました" + cont "あらたな けんきゅうの ばしょを" + cont "もとめて いどうした との" + cont "みかたも ありますが" + cont "なんらかの じけんに まきこまれた" + cont "かのうせいも あり" + cont "かんけいしゃは とても" + cont "しんぱい しています" + + para "<⋯⋯><⋯⋯>いじょう" + line "#ニュースでした" + + para "<⋯⋯><⋯⋯><⋯⋯><⋯⋯><⋯⋯><⋯⋯>" + line "それでは ひきつづき" + cont "おんがくを おたのしみ ください" + done + +; 45FF
\ No newline at end of file diff --git a/maps/Route1Gate1F.asm b/maps/Route1Gate1F.asm new file mode 100644 index 0000000..4772da7 --- /dev/null +++ b/maps/Route1Gate1F.asm @@ -0,0 +1,55 @@ +include "constants.asm" + +SECTION "Route 1 Gate 1F", ROMX[$4061], BANK[$26] + +Route1Gate1FScriptLoader: ;4061 + ld hl, Route1Gate1FScriptPointers + call RunMapScript + call WriteBackMapScriptNumber + ret + +Route1Gate1FScriptPointers: + dw Route1Gate1FScript ;>> routine + dw Route1Gate1FNPCIDs ;>> data + +Route1Gate1FNPCIDs: ; 406F + db $00 + db $01 + db $FF + +Route1Gate1FTextPointers: + dw MapDefaultText ;no signs + dw Route1Gate1FText1 + dw Route1Gate1FText2 + +Route1Gate1FScript: ; 4078 + ld hl, Route1Gate1FNPCIDs + ld de, Route1Gate1FTextPointers + call CallMapTextSubroutine + ret + +Route1Gate1FText1: ; 4082 + ld hl, Route1Gate1FText1String + call OpenTextbox + ret + +Route1Gate1FText2: ; 4089 + ld hl, Route1Gate1FText2String + call OpenTextbox + ret + +Route1Gate1FText1String: ; 4090 + text "このゲートを ぬけると" + line "すぐに オールドシティ です" + done + +Route1Gate1FText2String: ; 40AC + text "オールドシティには" + line "あの ゆうめいな" + cont "ごじゅうのとう が あるの" + + para "いってみたこと ある?" + done + +;ends at 40D9 + diff --git a/maps/Route1Gate2F.asm b/maps/Route1Gate2F.asm new file mode 100644 index 0000000..0ab81a8 --- /dev/null +++ b/maps/Route1Gate2F.asm @@ -0,0 +1,86 @@ +include "constants.asm" + +SECTION "Route 1 Gate 2F", ROMX[$411F], BANK[$26] + +Route1Gate2FScriptLoader:: ; 411F + ld hl, Route1Gate2FScriptPointers + call RunMapScript + call WriteBackMapScriptNumber + ret + +Route1Gate2FScriptPointers: ; 4129 + dw Route1Gate2FScript + dw Route1Gate2FNPCIDs + +Route1Gate2FNPCIDs: ; 412D + db 0 + db 1 + db $FF + +Route1Gate2FTextPointers: ; 4130 + dw Route1Gate2FTextSign1 + dw Route1Gate2FTextSign2 + dw Route1Gate2FTextNPC1 + dw Route1Gate2FTextNPC2 + +Route1Gate2FScript:: ; 4138 + ld hl, Route1Gate2FNPCIDs + ld de, Route1Gate2FTextPointers + call CallMapTextSubroutine + ret + +Route1Gate2FTextNPC1: ; 4142 + ld hl, Route1Gate2FTextString1 + call OpenTextbox + ret + +Route1Gate2FTextNPC2: ; 4149 + ld hl, Route1Gate2FTextString2 + call OpenTextbox + ret + +Route1Gate2FTextSign1: ; 4150 + ld hl, Route1Gate2FTextString3 + call OpenTextbox + ret + +Route1Gate2FTextSign2: ; 4157 + ld hl, Route1Gate2FTextString4 + call OpenTextbox + ret + +Route1Gate2FTextString1: ; 415E + text "ガンテツさんって しってる?" + + para "ガンテツさんに" + line "きに いられるように なれば" + cont "トレーナーとして たいしたもの よ" + done + +Route1Gate2FTextString2: ; 4197 + text "あなた かんこうで きたの?" + line "なら ざんねんね" + + para "オールドシティの" + line "ごじゅうのとう は" + cont "だれでも はいれる って" + cont "ものじゃないわ" + done + +Route1Gate2FTextString3: ; 41D8 + text "<PLAYER>は" + line "ぼうえんきょうを のぞいた!" + + para "むむむ!" + line "たかーい とう が みえる!" + done + +Route1Gate2FTextString4: ; 41FF + text "<PLAYER>は" + line "ぼうえんきょうを のぞいた!" + + para "むむ?" + line "ながーい かわ が みえる" + done + +; 4224
\ No newline at end of file diff --git a/maps/Route1P1.asm b/maps/Route1P1.asm new file mode 100644 index 0000000..d67ffd9 --- /dev/null +++ b/maps/Route1P1.asm @@ -0,0 +1,75 @@ +include "constants.asm" + +SECTION "Route 1 East", ROMX[$7B98], BANK[$36] + +Route1P1ScriptLoader:: ; 7B98 + ld hl, Route1P1ScriptPointers + call RunMapScript + call WriteBackMapScriptNumber + ret + +Route1P1ScriptPointers: ; 7BA2 + dw Route1P1Script + dw Route1P1NPCIDs + +Route1P1NPCIDs: ; 7BA6 + db 0 + db 1 + db $FF + +Route1P1TextPointers: ;7BA9 + dw Route1P1TextSign1 + dw Route1P1TextSign2 + dw Route1P1TextNPC1 + dw Route1P1TextNPC2 + +Route1P1Script:: ; 7BB1 + ld hl, Route1P1NPCIDs + ld de, Route1P1TextPointers + call CallMapTextSubroutine + ret + +Route1P1TextNPC1: ; 7BBB + ld hl, Route1P1TextString1 + call OpenTextbox + ret + +Route1P1TextNPC2: ; 7BC2 + ld hl, Route1P1TextString2 + call OpenTextbox + ret + +Route1P1TextSign1: ; 7BC9 + ld hl, Route1P1TextString3 + call OpenTextbox + ret + +Route1P1TextSign2: ; 7BD0 + ld hl, Route1P1TextString4 + call OpenTextbox + ret + +Route1P1TextString1: ; 7BD7 + text "しょうねん!" + + para "モンスターボールは" + line "やせいの ポケモンを よわらせてから" + cont "つかうのが きほんだ!" + done + +Route1P1TextString2: ; 7C08 + text "ぼく ゆうがた じゅくの かえりに" + line "かわった ポケモンを みたよ" + done + +Route1P1TextString3: ; 7C2A + text "このさき しずかな おか" + line "やせいの ポケモンに ちゅうい" + done + +Route1P1TextString4:; 7C48 + text "ここは 1ばん どうろ" + line "サイレントヒル ⋯⋯ オールドシティ" + done + +; 7C68
\ No newline at end of file diff --git a/maps/Route1P2.asm b/maps/Route1P2.asm new file mode 100644 index 0000000..9fa72ec --- /dev/null +++ b/maps/Route1P2.asm @@ -0,0 +1,117 @@ +include "constants.asm" + +SECTION "Route 1 West", ROMX[$7C68], BANK[$36] + +Route1P2ScriptLoader:: ; 7C67 + ld hl, Route1P2ScriptPointers + call RunMapScript + call WriteBackMapScriptNumber + ret + +Route1P2ScriptPointers: + dw Route1P2Script + dw Route1P2NPCIDs + +Route1P2NPCIDs: ; 7C76 + db $00 + db $01 + db $FF + +Route1P2TextPointers: + dw Route1P2TextSign1 + dw Route1P2Text1 + dw Route1P2Text2 + +Route1P2Script:: ; 7C7F + ld a, [wYCoord] + cp $06 + jr nz, .skipCheck + ld a, [wXCoord] + cp $09 + jr nz, .skipCheck + ld a, 0 ; player + ld d, LEFT + call SetObjectFacing + ld a, 2 + ld d, RIGHT + call SetObjectFacing + jr .endDemo +.skipCheck + ld hl, Route1P2NPCIDs ;data + ld de, Route1P2TextPointers ;start of textld pointers? + call CallMapTextSubroutine + ret + +.endDemo +Route1P2Text1: ; 7CA7 + ld hl, Route1P2TextString4 + call OpenTextbox + call RotateFourPalettesLeft + jp Init + +Route1P2Text2: ; 7CB3 + ld hl, $D3A2 ; trainer flags? + bit 1, [hl] + jr nz, .Text2Jump ; already fought + ld hl, Route1P2TextString1 + call OpenTextbox + ld hl, $D3A2 + set 1, [hl] + ld a, $3C + ld [wce02], a + ld a, $02 + ld [wce05], a + ld hl, wc5ed + set 7, [hl] + ld a, $08 + ld [wd637], a + ret + +.Text2Jump +Route1P2Text3: ; 7CDA + ld hl, Route1P2TextString3 + call OpenTextbox + ret + +Route1P2TextSign1: ; 7CE1 + ld hl, Route1P2TextString5 + call OpenTextbox + ret + +Route1P2TextString1: ; 7CE8 + text "まあ かわいらしい トレーナーやこと" + line "うちと ポケモン しはります?" + done + +Route1P2TextString2: ; 7D0C (unused?) + text "いやあ かんにんやわあ" + done + +Route1P2TextString3: ; 7D19 + text "かわいい かおして つよおすなあ" + line "その ちょうしで おきばりやす" + done + +Route1P2TextString4: ; 7D3B + text "シゲル『おっ サトシじゃないか!" + + para "なんとか ここまで これた" + line "って かんじだな" + + para "じつりょくが ないのに" + line "むり するなよな" + + para "もっと ポケモン あつめるとか" + line "いろんな ポケモン そだてるとか" + cont "やること あるだろ?" + + para "ここで ひきかえしたほうが いいぜ!" + line "じゃあな" + done + +Route1P2TextString5: ; 7DBD + text "ここは 1ばん どうろ" + line "サイレントヒル ⋯⋯ オールドシティ" + done + +;7DDD
\ No newline at end of file diff --git a/maps/SilentHills.asm b/maps/SilentHills.asm new file mode 100644 index 0000000..ed7639c --- /dev/null +++ b/maps/SilentHills.asm @@ -0,0 +1,420 @@ +include "constants.asm" + +SECTION "Silent Hills Script", ROMX[$7669], BANK[$36] + +SilentHillsScriptLoader:: ; 7669 + ld hl, SilentHillsScriptPointers1 + call RunMapScript + call WriteBackMapScriptNumber + ret + +SilentHillsNPCIDs1: ; 7673 + db 0 + db 2 + db 3 + db $FF + +SilentHillsNPCIDs2: ; 7677 + db 2 + db 3 + db $FF + +SilentHillsNPCIDs3: ; 767A + db 1 + db 2 + db 3 + db $FF + +SilentHillsScriptPointers1: ; 767E + dw SilentHillsScript1 + dw SilentHillsNPCIDs1 + +SilentHillsScriptPointers2: ; 7682 + dw SilentHillsScript2 + dw SilentHillsNPCIDs1 + +SilentHillsScriptPointers3: ; 7686 + dw SilentHillsScript3 + dw SilentHillsNPCIDs1 + +SilentHillsScriptPointers4: ; 768A + dw SilentHillsScript4 + dw SilentHillsNPCIDs2 + +SilentHillsScriptPointers5: ; 768E + dw SilentHillsScript5 + dw SilentHillsNPCIDs3 + +SilentHillsScriptPointers6: ; 7692 + dw SilentHillsScript6 + dw SilentHillsNPCIDs2 + +SilentHillsScriptPointers7: ; 7696 + dw SilentHillsScript7 + dw SilentHillsNPCIDs2 + +SilentHillsScript1: ; 769A + ld a, [wYCoord] + cp 5 + ret nz + ld a, [wXCoord] + cp 5 + ret nz + ld hl, wJoypadFlags + set 4, [hl] + ld a, 02 + call Function17f9 + ld a, 02 + ld hl, SilentHillsMovement1 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 1 + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + ret + +SilentHillsMovement1: ; 76C8 + db $0D + db $0D + db $0D + db $09 + db $05 + db $02 + db $32 + +SilentHillsScript2: ; 76CF + ld a, 0 + ld d, RIGHT + call SetObjectFacing + ld hl, SilentHillsTextRival1 + call OpenTextbox + ld hl, SilentHillsTextRival2 + call OpenTextbox + ld hl, wJoypadFlags + set 4, [hl] + ld a, 2 + ld hl, SilentHillsMovement2 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 1 + call WriteIntod637 + ld a, 2 + ld [wMapScriptNumber], a + ret + +SilentHillsMovement2: ; 76FF + db $00, $04, $08, $0C, $0C, $0C, $33 + +SilentHillsScript3: ;7706 + call Function1848 + ld a, 3 + ld [wMapScriptNumber], a + call InitUnknownBuffercc9e + ret + +SilentHillsScript4: ; 7712 + ld a, [wXCoord] + cp 0 + jr nz, .bigjump + ld a, [wYCoord] + cp 8 + jr z, .jump + cp 09 + jr nz, .bigjump +.jump + call Function776a + ld hl, SilentHillsTextNorthExit + call OpenTextbox + ld hl, wJoypadFlags + set 4, [hl] + ld a, 3 + call Function15ed + ld a, 3 + call Function17f9 + ld a, [wYCoord] + cp 9 + jr z, .jump2 + ld hl, SilentHillsMovement3 + jr .skip +.jump2 + ld hl, SilentHillsMovement4 +.skip + ld a, 03 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 1 + call WriteIntod637 + ld a, 4 + ld [wMapScriptNumber], a + ret + +.bigjump + ld hl, SilentHillsNPCIDs2 + ld de, SilentHillsTextPointers + call CallMapTextSubroutine + ret + +Function776a: ; 776A + ld hl, wd41a + set 7, [hl] + ld a, 1 + ld hl, wd29d + ld [hl], a + ret + +SilentHillsMovement3: ; 7776 + db $0A, $0A, $0A, $09, $0A, $06, $02, $32 + +SilentHillsMovement4: ; 777E + db $0A, $0A, $0A, $0A, $06, $02, $32 + +SilentHillsScript5: ; 7785 + ld a, 0 + ld d, RIGHT + call SetObjectFacing + ld hl, SilentHillsTextPokemonInGrassString + call OpenTextbox + ld hl, wJoypadFlags + set 4, [hl] + ld a, 3 + call Function17f9 + ld a, 0 + call Function186a + ld b, 3 + ld c, 0 + call StartFollow + ld a, [wYCoord] + cp 9 + jr z, .jump + ld hl, SilentHillsMovement5 + jr .skip +.jump + ld hl, SilentHillsMovement6 +.skip + ld a, 3 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 1 + call WriteIntod637 + ld a, 5 + ld [wMapScriptNumber], a + ret + +SilentHillsMovement5: ; 77CC + db $0B, $0B, $0B, $0B, $0B, $0B, $08, $08, $08, $08, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $05, $33 + +SilentHillsMovement6: ; 77E0 + db $0B, $0B, $0B, $0B, $0B, $0B, $08, $08, $08, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $05, $33 + +SilentHillsScript6: ; 77F3 + ld hl, SilentHillsNPCIDs2 + ld de, SilentHillsTextPointers + call CallMapTextSubroutine + ld hl, wd41b + bit 2, [hl] + ret z + ld a, $12 + ld [wd29d], a + ld a, 6 + ld [wMapScriptNumber], a + ret + +SilentHillsScript7: ; 780D + call CheckLabDoor + ret z + ld hl, SilentHillsNPCIDs2 + ld de, SilentHillsTextPointers + call CallMapTextSubroutine + ret + +CheckLabDoor: ; 781B + ld a, [wYCoord] + cp $C + ret nz + ld a, [wXCoord] + cp $E + jr z, .jump + ld a, [wXCoord] + cp $F + ret nz +.jump + ldh a, [hJoyState] + bit 6, a + ret z + ld a, 0 + ld d, UP + call SetObjectFacing + ld hl, wJoypadFlags + set 6, [hl] + ld hl, SilentHillsTextString1 + call OpenTextbox + call LabClosed + call ClearAccumulator + ret + +LabClosed: ; 784C + ld a, 0 + ld hl, SilentHillsMovement7 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 1 + call WriteIntod637 + ret + +SilentHillsTextString1: ; 785F + text "あれ? カギが かかっている" + done + +SilentHillsMovement7: ; 786F + db $04, $32 + +SilentHillsTextPointers: ; 7871 + dw SilentHillsPlayerHouseText + dw Function38c6 + dw SilentHillsSignText1 + dw SilentHillsLabText + dw SilentHillsRivalHouseText + +SilentHillsLabText: ; 787B + ld hl, SilentHillsTextString2 + call OpenTextbox + ret + +SilentHillsTextString2: ; 7882 + text "にゅうきょしゃ ぼしゅうちゅう!" + done + +SilentHillsSignText1: ; 7894 + ld hl, SilentHillsTextString3 + call OpenTextbox + ret + +SilentHillsTextString3: ; 789B + text "ここは サイレント ヒル" + line "しずかな おか" + done + +SilentHillsPlayerHouseText: ; 78B1 + ld hl, SilentHillsTextString4 + call OpenTextbox + ret + +SilentHillsTextString4: ; 78B8 + text "ここは <PLAYER> のいえ" + done + +SilentHillsRivalHouseText: ; 78C3 + ld hl, SilentHillsTextString5 + call OpenTextbox + ret + +SilentHillsTextString5: ; 78CA + text "ここは <RIVAL> のいえ" + done + +; 78D5 + dw SilentHillsTextRival1 ; west + dw SilentHillsTextNorthExit ; north + dw SilentHillsTextBackpack ; npc1 + dw SilentHillsTextPokemonHate ; npc2 + +SilentHillsTextRival1: ; 78DD + text "<RIVAL>『よう ちょっと おまえに" + cont "じまん したいことが" + cont "あってきたんだよ" + + para "おれ あの ゆうめいなオーキドから" + line "メール もらっちゃった!" + cont "え? おまえにも きたの?" + cont "ちぇっ! つまんねーの!" + + para "⋯⋯ふん!" + line "じゃあさ じゃあさー おまえさー" + cont "じぶんの ははおや のこと" + cont "いつも なんて よんでる?@" + + db $08 + +LoadMomNamePromptUnused: ; 796F + call LoadStandardMenuHeader + callab MomNamePrompt + call CloseWindow + call GetMemSGBLayout + call UpdateSprites + call UpdateTimePals + jp Function3036 + +MomNameMenuHeaderUnused: ; 7989 + db MENU_BACKUP_TILES ; flags + menu_coords 00, 00, 10, 11 + dw .MomNameMenuDataUnused + db 01 ; initial selection + +.MomNameMenuDataUnused: ; 7991 + db STATICMENU_CURSOR + db 04 ; items + db "じぶんで きめる@" + db "おかあさん @" + db "ママ@" + db "かあちゃん@" + +SilentHillsTextRival2: ; 79AC - BYTE OFF + text "<RIVAL>『えー かっこわりい!" + line "そんな こどもっぽい" + cont "よびかた してるなんて" + cont "おわらいだぜ!" + cont"あー ちょっとだけ すっきりした!" + + para "そんじゃあ" + line "おれは ひとあし おさきに" + cont "オーキドのところへ" + cont "いくことに するぜ!" + done + +SilentHillsTextNorthExit: ; 7A14 + text "ちょいまち!" + line "まってよ! まてっ てば!" + done + +SilentHillsTextPokemonInGrassString: ; 7A2A + text "きみは まったく" + line "なんにも しらないんだね!" + cont "くさむらでは" + cont "やせいの ポケモンが とびだす!" + + para "じぶんも ポケモンを" + line "もって いれば" + cont "たたかえるんだ⋯⋯" + + para "あっ! ひょっとして きみは" + line "⋯⋯ちょっと" + cont "ぼくに ついて きて!" + done + +SilentHillsTextBackpack: ; 7A99 + ld hl, SilentHillsTextBackpackString + call OpenTextbox + ret + +SilentHillsTextBackpackString: ; 7AA0 + text "あなたの りュック かっこいいわよ" + line "どこで てに いれたの?" + done + +SilentHillsTextPokemonHate: ; 7AC0 + ld hl, SilentHillsTextPokemonHateString + call OpenTextbox + ret + +SilentHillsTextPokemonHateString: ; 7AC7 + text "よのなかに ポケモンが きらいな" + line "ひとは いるのかな?" + done + +; 7AE4
\ No newline at end of file diff --git a/maps/SilentHouse.asm b/maps/SilentHouse.asm new file mode 100644 index 0000000..70a6649 --- /dev/null +++ b/maps/SilentHouse.asm @@ -0,0 +1,171 @@ +include "constants.asm" + +SECTION "Silent Hills House", ROMX[$4839], BANK[$34] + +SilentHouseScriptLoader:: ; 4839 + ld hl, SilentHouseScriptPointers + call RunMapScript + call WriteBackMapScriptNumber + ret + +SilentHouseScriptPointers: ; 4843 + dw SilentHouseScript1 + dw SilentHouseNPCIDs1 + dw SilentHouseScript2 + dw SilentHouseNPCIDs2 + dw SilentHouseScript3 + dw SilentHouseNPCIDs1 + +SilentHouseScript1: ; 484F + ld hl, SilentHouseNPCIDs1 + ld de, SilentHouseTextPointers1 + call CallMapTextSubroutine + ret + +SilentHouseScript2: ; 4859 + ld hl, SilentHouseNPCIDs2 + ld de, SilentHouseTextPointers1 + call CallMapTextSubroutine + ret + +SilentHouseScript3: ; 4863 + ld hl, SilentHouseNPCIDs1 + ld de, SilentHouseTextPointers1 + call CallMapTextSubroutine + ret + +SilentHouseNPCIDs1: + db 0 + db $FF + +SilentHouseNPCIDs2: + db 0 + db 1 + db $FF + +SilentHouseTextPointers1:: ; 4872 + dw SilentHouseNPCText1 + dw Function38bd + dw Function3899 + dw Function38b4 + dw Function38ab + dw Function38cf + +SilentHouseNPCText1: ; 487E + ld hl, wd41a + bit 6, [hl] + jr nz, .jump + ld hl, SilentHouseTextString1 + call OpenTextbox + ret + +.jump +; 488C + call RefreshScreen + callab Function1477D + call Function1fea + ret + +SilentHouseTextString1: ; 489B + text "おや? <RIVAL>あてに メールが" + line "とどいている ようだ" + cont "よんでみる?@" + db $08 + +SilentHouseNPCText2: ; 48BD (unused due to typo in the text pointers?) + call YesNoBox + jr c, .jump + ld hl, wd41a + set 6, [hl] + ld hl, SilentHouseTextString2 + call PrintText + call Function3036 + ret +.jump + ld hl, SilentHouseTextString3 + call PrintText + call Function3036 + ret + +SilentHouseTextString2: ; 48DB + text "とつぜん メールを さしあげる" + line "しつれいを おゆるしあれ" + + para "じつは きみに どうしても" + line "わたしたい ものが あるのじゃが" + cont "うけとって もらえんかのう" + cont "ポケモンけんきゅうしゃ オーキド" + done + +SilentHouseTextString3: ; 4937 + text "ひとのメールは" + line "みちゃ いけないよな<⋯⋯>" + done + +SilentHouseTextPointers2:: ; 494C + dw SilentHouseNPCText3 + dw SilentHouseNPCText4 + +SilentHouseNPCText3: ; 4950 + ld hl, SilentHouseTextString4 + call OpenTextbox + ret + +SilentHouseTextString4: ; 4957 + text "このまえ かわったいろの" + line "ポッポを みかけたわ" + done + +SilentHouseNPCText4: ; 4970 + ld hl, wd41e + bit 2, [hl] + jr nz, .jump + ld hl, wd41e + set 2, [hl] + ld hl, SilentHouseTextString5 + call OpenTextbox + call WaitBGMap + ld hl, SilentHouseTextString6 + jr .skip +.jump + ld hl, SilentHouseTextString7 +.skip + call OpenTextbox + ret + +SilentHouseTextString5: ; 4991 + text "ケン『ななな" + line "なんだ <PLAYER> じゃないか!" + + para "おれは ちょっと あのー" + line"がっこうの しゅくだいを" + cont "おしえに きてるんだ!" + + para "えっ マップ?" + line "そうか そんな やくそくも してたな" + cont "わかった" + cont "トレーナーギアを かしてみな" + + para "スロットに マップの カセットを " + line "さしこんでっと⋯⋯" + cont "よし これで マップが みれるぞ!" + done + +SilentHouseTextString6: ; 4A29 + text "もし オールドにいくなら" + line "マサキって やつに あうといい" + + para "おれの ともだちで" + line "すごい ポケモン マニアだ!" + cont "きっと おまえの" + cont "てだすけを してくれるぜ" + done + +SilentHouseTextString7: ; 4A76 + text "ケン『<PLAYER>" + line "オーキドはかせに みこまれて" + cont "ポケモンずかんを つくるんだって?" + cont "すごいじゃないか がんばれよ" + done + +; 4AAC
\ No newline at end of file diff --git a/maps/SilentLabP1.asm b/maps/SilentLabP1.asm new file mode 100644 index 0000000..eb4cd57 --- /dev/null +++ b/maps/SilentLabP1.asm @@ -0,0 +1,1108 @@ +include "constants.asm" + +SECTION "Silent Lab P1", ROMX[$4BBC], BANK[$34] + +SilentLabP1ScriptLoader:: ; 4BBC + ld hl, SilentLabP1ScriptPointers + call RunMapScript + call WriteBackMapScriptNumber + ret + +SilentLabP1ScriptPointers: ; 4BC6 + dw SilentLabP1Script1 + dw SilentLabP1NPCIDs1 + + dw SilentLabP1Script2 + dw SilentLabP1NPCIDs2 + + dw SilentLabP1Script3 + dw SilentLabP1NPCIDs2 + + dw SilentLabP1Script4 + dw SilentLabP1NPCIDs2 + + dw SilentLabP1Conversation1 + dw SilentLabP1NPCIDs2 + + dw SilentLabP1Script6 + dw SilentLabP1NPCIDs3 + + dw SilentLabP1Script7 + dw SilentLabP1NPCIDs4 + + dw SilentLabP1Script8 + dw SilentLabP1NPCIDs5 + + dw SilentLabP1Script9 + dw SilentLabP1NPCIDs5 + + dw SilentLabP1Script10 + dw SilentLabP1NPCIDs5 + + dw SilentLabP1Script11 + dw SilentLabP1NPCIDs5 + + dw SilentLabP1Script12 + dw SilentLabP1NPCIDs6 + + dw SilentLabP1Script13 + dw SilentLabP1NPCIDs6 + + dw SilentLabP1Script14 + dw SilentLabP1NPCIDs6 + + dw SilentLabP1Script15 + dw SilentLabP1NPCIDs7 + + dw SilentLabP1Script16 + dw SilentLabP1NPCIDs7 + + dw SilentLabP1Script17 + dw SilentLabP1NPCIDs7 + + dw SilentLabP1Script18 + dw SilentLabP1NPCIDs7 + + dw SilentLabP1Script19 + dw SilentLabP1NPCIDs9 + +SilentLabP1NPCIDs1: ; 4C12 + db $02 + db $09 + db $0A + db $FF +SilentLabP1NPCIDs2: ; 4C16 + db $00 + db $02 + db $04 + db $09 + db $0A + db $FF +SilentLabP1NPCIDs3: ; 4C1C + db $02 + db $04 + db $09 + db $0A + db $FF +SilentLabP1NPCIDs4: ; 4C21 + db $04 + db $09 + db $0A + db $FF +SilentLabP1NPCIDs5: ; 4C25 + db $01 + db $03 + db $05 + db $06 + db $07 + db $08 + db $09 + db $0A + db $FF +SilentLabP1NPCIDs6: ; 4C2E + db $01 + db $03 + db $05 + db $06 + db $07 + db $08 + db $FF +SilentLabP1NPCIDs7: ; 4C35 + db $00 + db $05 + db $06 + db $07 + db $08 + db $FF +SilentLabP1NPCIDs8: ; 4C3B (unused?) + db $00 + db $03 + db $05 + db $06 + db $07 + db $08 + db $09 + db $0A + db $FF +SilentLabP1NPCIDs9: ; 4C44 + db $00 + db $07 + db $08 + db $FF + +SilentLabP1TextPointers1:: ; 4C48 + dw SilentLabP1Text4 + dw SilentLabP1Text7 + dw SilentLabP1Text10 + dw SilentLabP1Text11 + dw SilentLabP1TextString20 + dw SilentLabP1Text12 + dw SilentLabP1Text13 + dw SilentLabP1Text14 + dw SilentLabP1Text15 + dw SilentLabP1Text16 + dw SilentLabP1Text16 + +SilentLabP1Script1: ; 4C5E + call SilentLabP1MoveDown + ret z + ld hl, SilentLabP1NPCIDs1 + ld de, SilentLabP1TextPointers2 + call CallMapTextSubroutine + ret + +SilentLabP1MoveDown: ; 4C6C + ld a, [wXCoord] + cp 4 + ret nz + ld a, [wYCoord] + cp 1 + ret nz + ldh a, [hJoyState] + bit 6, a + jp z, SetFFInAccumulator + call SilentLabP1Text3 + ld hl, wJoypadFlags + set 4, [hl] + ld a, 0 + call Function17f9 + ld a, 0 + ld hl, SilentLabP1Movement1 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 1 + call WriteIntod637 + call ClearAccumulator + ret + +SilentLabP1Movement1: ; 4CA2 + db $06, $32 + +SilentLabP1Script2: ; 4CA4 + ld a, 2 + ld [wMapScriptNumber], a + ret + +SilentLabP1Script3: ; 4CAA + ld a, 6 + call Function17f9 + ld a, 0 + call Function186a + ld b, 6 + ld c, 0 + call StartFollow + ld hl, SilentLabP1Movement2 + ld a, 6 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 3 + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + ret + +SilentLabP1Movement2: ; 4CD3 + db 09, 09, 09, 09, 09, 09, 09, 09, 09, 05, 07, 01, $32 + +SilentLabP1Script4: ; 4CE0 + call Function1828 + ld a, 4 + ld [wMapScriptNumber], a + ret + +SilentLabP1Conversation1: ; 4CE9 + ld a, 4 + ld d, RIGHT + call SetObjectFacing + ld hl, SilentLabP1TextString20 + call OpenTextbox + ld hl, SilentLabP1TextString4 + call OpenTextbox + ld a, 4 + ld d, UP + call SetObjectFacing + ld hl, SilentLabP1TextString28 + call OpenTextbox + ld hl, SilentLabP1TextString5 + call OpenTextbox + ld a, 4 + ld d, RIGHT + call SetObjectFacing + ld hl, SilentLabP1TextString29 + call OpenTextbox + ld hl, SilentLabP1TextString7 + call OpenTextbox + call SilentLabP1Script5 + ret + +SilentLabP1Script5: ; 4D26 + ld hl, wJoypadFlags + set 4, [hl] + ld a, 2 + call Function17f9 + ld a, 2 + ld hl, SilentLabP1Movement3 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 5 + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + ret + +SilentLabP1Movement3: ; 4D48 + db 9, 5, $33 + +SilentLabP1Script6: ; 4D4B + ld hl, wJoypadFlags + set 4, [hl] + ld a, 4 + call Function17f9 + ld a, 4 + ld hl, SilentLabP1Movement4 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 6 + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + ret + +SilentLabP1Movement4: ; 4D6D + db $0D, $0D, $0F, $0D, $0D, $33 + +SilentLabP1Script7: ; 4D73 + ld hl, wJoypadFlags + set 4, [hl] + ld a, 0 + call Function17f9 + ld a, 0 + ld hl, SilentLabP1Movement5 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 7 + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + ret + +SilentLabP1Movement5: ; 4D95 + db 09, 09, 09, 05, $32 + +SilentLabP1Script8: ; 4D9A + ld a, 3 + call Function1989 + ld a, 5 + call Function1989 + ld hl, wJoypadFlags + set 4, [hl] + ld a, 0 + call Function17f9 + ld a, 0 + ld hl, SilentLabP1Movement6 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 8 + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + ret + +SilentLabP1Movement6: ; 4DC6 + db 8, 8, 8, $0A, 6, $32 + +SilentLabP1Script9: ; 4DCC + ld hl, wJoypadFlags + set 4, [hl] + ld a, 5 + call Function17f9 + ld a, 5 + call Function197e + ld a, 5 + ld hl, SilentLabP1Movement7 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 9 + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + ret + +SilentLabP1Movement7: ; 4DF3 + db $08, $08, $08, $08, $0A, $06, $32 + +SilentLabP1Script10: ; 4DFA + ld a, 5 + ld d, RIGHT + call SetObjectFacing + ld hl, SilentLabP1TextString21 + call OpenTextbox + ld hl, wJoypadFlags + set 4, [hl] + ld a, 0 + ld d, RIGHT + call SetObjectFacing + ld a, 5 + ld d, RIGHT + call SetObjectFacing + ld a, 3 + call Function17f9 + ld a, 3 + call Function197e + ld a, 3 + ld hl, SilentLabP1Movement8 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, $0A + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + ret + +SilentLabP1Movement8: ; 4E3C + db $08, $04, $32 + +SilentLabP1Script11: ; 4E3F + ld hl, SilentLabP1TextString8 + call OpenTextbox + ld hl, SilentLabP1TextString9 + call OpenTextbox + ld a, $0B + call Function1617 + ld a, $0C + call Function1617 + ld hl, SilentLabP1TextString10 + call OpenTextbox + ld hl, SilentLabP1TextString15 + call OpenTextbox + ld hl, wd41c + set 4, [hl] + call Function20f8 + ld a, $0B + ld [wMapScriptNumber], a + call InitUnknownBuffercc9e + ret + +SilentLabP1Script12: ; 4E72 + call SilentLabP1MoveDown + ret z + call SilentLabP1RivalMovePokemon + ret z + ld hl, SilentLabP1NPCIDs6 + ld de, SilentLabP1TextPointers2 + call CallMapTextSubroutine + ret + +SilentLabP1RivalMovePokemon: ; 4E84 + ld a, [wYCoord] + cp 8 + ret nz + ld hl, SilentLabP1Movement9 + ld a, [wXCoord] + cp 3 + jr z, .jump + cp 4 + ret nz + ld hl, SilentLabP1Movement10 +.jump + push hl + ld hl, wJoypadFlags + set 4, [hl] + ld a, 5 + call Function17f9 + pop hl + ld a, 5 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, $0C + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + call ClearAccumulator + ret + +SilentLabP1Movement9: ; 4EDE + db $08, $0B, $0B, $08, $08, $04, $32 + +SilentLabP1Movement10: ; 4EC5 + db $08, $0B, $08, $08, $04, $32 + +SilentLabP1Script13: ; 4ECB + ld hl, SilentLabP1TextString17 + call OpenTextbox + call GetLabPokemon + ld hl, wc5ed + set 7, [hl] + ld a, 8 + ld [wd637], a + ld a, $0D + ld [wMapScriptNumber], a + call InitUnknownBuffercc9e + ret + +GetLabPokemon: ; 4EE7 + ld hl, LabPokemon + ld a, [wd266] + ld b, a +.loop + ld a, [hl+] + cp b + jr nz, .jump + ld a, [hl] + ld [wce05], a + ld a, 9 + ld [wce02], a + ret +.jump + inc hl + jr .loop + +LabPokemon: ; 4EFF + db DEX_KURUSU + db 1 + db DEX_HAPPA + db 2 + db DEX_HONOGUMA + db 3 + +SilentLabP1Script14: ; 4F05 + ld hl, SilentLabP1TextString19 + ld a, [wcd5d] + and a + jr nz, .skip + ld hl, SilentLabP1TextString18 +.skip + call OpenTextbox + ld hl, wJoypadFlags + set 4, [hl] + ld a, 5 + call Function17f9 + ld a, 5 + ld hl, SilentLabP1Movement11 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, $0E + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + ret + +SilentLabP1Movement11: ; 4F36 + db $04, $08, $08, $08, $33 + +SilentLabP1Script15: ; 4F3B + call Function20f8 + ld a, $0F + ld [wMapScriptNumber], a + call InitUnknownBuffercc9e + ret + +SilentLabP1Script16: ; 4F47 + call SilentLabP1MoveDown + ret z + call SilentLabP1MoveRivalLeave + ret z + ld hl, SilentLabP1NPCIDs7 + ld de, SilentLabP1TextPointers2 + call CallMapTextSubroutine + ret + +SilentLabP1MoveRivalLeave: ; 4F59 + ld a, [wYCoord] + cp $0B + ret nz + ld hl, Movememt12+1 + ld a, [wXCoord] + cp 3 + jr z, .jump + cp 4 + ret nz + ld hl, Movememt12 +.jump + push hl + ld hl, wJoypadFlags + set 4, [hl] + ld a, 8 + call Function17f9 + pop hl + ld a, 8 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, $10 + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + call ClearAccumulator + ret + +Movememt12:; 4F93 + db $07, $07, $07, $05, $32 + +SilentLabP1Script17: ; 4F98 + ld hl, SilentLabP1TextString23 + call OpenTextbox + ld hl, wd41d + set 2, [hl] + ld hl, wNumBagItems + ld a, 5 + ld [wCurItem], a + ld a, 6 + ld [wItemQuantity], a + call ReceiveItem + call Function20f8 + ld a, $11 + ld [wMapScriptNumber], a + ret + +SilentLabP1Script18: ; 4FBC + call SilentLabP1MoveDown + ret z + ld hl, SilentLabP1NPCIDs7 + ld de, SilentLabP1TextPointers2 + call CallMapTextSubroutine + ret + +SilentLabP1Script19: ; 4FCA + call SilentLabP1MoveDown + ret z + ld hl, SilentLabP1NPCIDs9 + ld de, SilentLabP1TextPointers2 + call CallMapTextSubroutine + ret + +SilentLabP1TextPointers2: ; 4FD8 + dw SilentLabP1Text1 + dw SilentLabP1Text2 + dw Function3899 + dw Function3899 + dw Function3899 + dw Function3899 + dw Function3899 + dw Function3899 + dw Function3899 + dw Function3899 + dw Function3899 + dw Function3899 + dw Function3899 + dw Function3899 + dw SilentLabP1Text3 + +SilentLabP1Text1: ; 4FF6 + ld hl, SilentLabP1TextString1 + call OpenTextbox + ret + +SilentLabP1TextString1: ; 4FFD + text "パソコンを みると" + line "なんと メールが きていた!" + + para "<⋯⋯> <⋯⋯> <⋯⋯>" + line "オーキドはかせ!" + cont "あなたが ゆくえふめいに" + cont "なっていると せけんは" + cont "おおさわぎ です!" + + para "それは そうと" + line "はかせ から みつけるように" + cont "たのまれた れいの#" + cont "みつけるどころか" + cont "まだ てがかりも" + cont "つかむことが できません" + + para "やはり あいつは" + line "かくうの #なのでは" + cont "ないでしょうか<⋯⋯>" + cont "<⋯⋯> <⋯⋯> <⋯⋯>じょしゅより" + done + +SilentLabP1Text2: ; 50B3 + ld hl, wd39d + bit 0, [hl] + set 0, [hl] + jr z, .jump + res 0, [hl] + ld hl, SilentLabP1TextString2A + jr .skip +.jump + ld hl, SilentLabP1TextString2B +.skip + call OpenTextbox + ret + +SilentLabP1TextString2A: ; 50CA + text "スタート ボタンを プシュ!" + line "おすと メニューが ひらくなり" + done + +SilentLabP1TextString2B: ; 50EA + text "セーブするには # レポート" + line "こまめに かくと いいなり" + done + +SilentLabP1Text3: ; 5108 + ld hl, SilentLabP1TextString3 + call OpenTextbox + ret + +SilentLabP1TextString3: ; 510F + text "カギが かかっている" + done + +SilentLabP1Text4: ; 511B + ld a, [wMapScriptNumber] + cp $0E + jp nc, SilentLabP1Text7 + ld hl, SilentLabP1TextString4 + call OpenTextbox + ret + +SilentLabP1TextString4: ; 512A + text "オーキド『ごくろうさん!" + done + +SilentLabP1TextString5: ; 5138 + text "オーキド『そうとも!" + line "わしが オーキドじゃ!" + cont "じじいで わるかったな!" + + para "おまえたち ふたりは" + line "この オーキドが よんだのじゃ!" + + para "すこし わしの はなしを" + line "きいては くれんか?@" + db $08 + +SilentLabP1Text6: ; 5192 + call YesNoBox + jr c, .jump +.loop + ld hl, SilentLabP1TextString6A + call PrintText + call Function3036 + ret + +.jump + ld hl, SilentLabP1TextString6B + call PrintText + call YesNoBox + jr c, .jump + jr .loop + +SilentLabP1TextString6A: ; 51AE + text "オーキド『いまから 1ねんまえ" + line "わしは カントーで" + cont "きみたちの ような しょうねんに" + cont "#の けんきゅうの ため" + cont "#と ずかんを わたした" + + para "そして かれらは" + line "じつに よくやってくれた!" + + para "150しゅるいの" + line "#を みつけることに" + cont "せいこう したのじゃ!" + cont "が <⋯⋯> <⋯⋯> <⋯⋯>" + cont "しかし <⋯⋯> <⋯⋯>" + + para "せかいは ひろいものじゃ" + line "そのご ぜんこく かくちで" + cont "あたらしい #が ぞくぞくと" + cont "みつかっておる!" + + para "そこで わしは カントーから" + line "ここ サイレントヒルに" + cont "けんきゅうの ばしょを うつした" + + para "ばしょが かわれば" + line "あたらしい #にも" + cont "であうことが できるからな" + cont "<⋯⋯> <⋯⋯> <⋯⋯> <⋯⋯>" + + para "これからも どんどんと" + line "けんきゅうを すすめるが" + cont "わしも ごらんのとおりの おいぼれ" + cont "まごや じょしゅたちも おるが" + cont "それでも やはり かずが たらん!" + + para "<PLAYER>! <RIVAL>!" + line "#けんきゅうの ために" + cont "ちからを かして くれんか!" + done + +SilentLabP1TextString6B: ; 5332 + text "オーキド『そうか<⋯⋯>" + line "わしに ひとを みるめが" + cont "なかったと いうことじゃな<⋯⋯>" + + para "いや!" + line "わしの ひとを みるめは" + cont "まちがっては おらんはず!" + + para "な?" + cont "わしの はなしを きいてくれるな?" + done + +SilentLabP1TextString7: ; 538D + text "オーキド『ふたりとも!" + line "ちょっと わしに ついてこい!" + done + +SilentLabP1Text7: ; 53AA + ld a, [wMapScriptNumber] + cp $12 + jr z, .jump + ld hl, SilentLabP1TextString11A + call OpenTextbox + ret + +.jump + ld hl, SilentLabP1TextString11B + call OpenTextbox + ret + +SilentLabP1TextString8: ; 53BF + text "オーキド『<PLAYER>!<RIVAL>!" + line "このずかんを" + cont "おまえたちに あずける!" + done + +SilentLabP1TextString9: ; 53DE + text "<PLAYER>は オーキドから" + line "#ずかんを もらった!" + done + +SilentLabP1TextString10: ; 53F5 + text "オーキド『この せかいの すべての" + line "#を きろくした" + cont "かんぺきな ずかんを つくること!" + cont "それが わしの ゆめ だった!" + + para "しかし しんしゅの #は" + cont "ぞくぞくと みつかっている!" + + para "わしに のこされた" + line "じかんは すくない!" + + para "そこで おまえ たちには" + line "わしの かわりに" + cont "ゆめを はたして ほしいのじゃ!" + + para "さあ ふたりとも" + line "さっそく しゅっぱつ してくれい!" + cont "これは #の れきしに のこる" + cont "いだいな しごとじゃー!" + done + +SilentLabP1TextString11A: ; 54C3 + text "オーキド『せかい じゅうの" + line "#たちが" + cont "<PLAYER>を まって おるぞー" + done + +SilentLabP1TextString11B: ; 54E3 + text "オーキド『おう! <PLAYER>" + line "どうだ?" + cont "わしの あげた #は<⋯⋯>?" + + para "ほう!" + cont "だいぶ なついた みたいだな" + + para "おまえには #トレーナーの" + line "さいのうが あるかもしれん" + cont "これからも ときどきは" + cont "わしのところへ かおを だせ!" + + para "#ずかんの ぺージが" + line "きに なるからな" + done + +SilentLabP1Text8: ; 5560 + ld hl, SilentLabP1TextString12 + call OpenTextbox + ret + +SilentLabP1TextString12: ; 5567 + text "オーキド『よく きたな!" + line "#ずかんの" + cont "ちょうしは どうかな?" + + para "どれ<⋯⋯> ちょっと" + cont "みて あげようか!" + done + +SilentLabP1Text9: ; 559A + ld hl, SilentLabP1TextString13 + call OpenTextbox + ret + +SilentLabP1TextString13: ; 55A1 + text "オーキド『<⋯⋯> おっほんッ!" + line "よくやったな <PLAYER>!" + + para "ちょっと" + line "わしに ついて きなさい!" + + para "<RIVAL>は すまんが" + line "そこで まっていなさい!" + + para "<RIVAL>『えー!" + line "なんだよ ケチー!" + + para "オーキド『<RIVAL>は" + line "でんせつの #が" + cont "ほしかった だけじゃないのか?" + cont "<RIVAL>『ギクッ!" + done + +SilentLabP1Text10: ; 561A + ld hl, SilentLabP1TextString14 + call OpenTextbox + ret + +SilentLabP1TextString14: ; 5621 + text "<RIVAL>『なんだ" + line "<PLAYER>じゃないか!" + cont "おれも ここが" + cont "あやしいと おもって きたんだけど" + cont "だれも いないみたいだな<⋯⋯>" + done + +SilentLabP1Text11: ; 5658 + ld hl, SilentLabP1TextString16 + call OpenTextbox + ret + +SilentLabP1TextString15: ; 565F + text "<RIVAL>『よっしゃあ!" + line "じいさん! おれにまかせな!" + done + +SilentLabP1TextString16: ; 5678 + text "<RIVAL>『おれが えらんだ" + line "#のほうが つよそうだぜ!" + cont "こっちに したかったんじゃないの?" + done + +SilentLabP1TextString17: ; 56A4 + text "<RIVAL>『<PLAYER>!" + line "せっかく じいさんに" + cont "# もらったんだから" + cont "<⋯⋯> ちょっと" + cont "たたかわせて みようぜ!" + done + +SilentLabP1TextString18: ; 56D4 + text "<RIVAL>『くっそー!" + line "こんどは ぜったい まけないぞ!" + done + +SilentLabP1TextString19: ; 56EE + text "<RIVAL>『よーし!" + line "ほかの #と たたかわせて" + cont "もっと もっと つよくしよう!" + + para "そんじゃ ばいばい!" + done + +SilentLabP1TextString20: ; 571F + text "じいちゃん!" + line "つれてきたよー!" + done + +SilentLabP1TextString21: ; 5730 + text "ぼくは かつて" + line "#トレーナーの ちょうてんを" + cont "めざしたことが あるんだ" + cont "そのとき いいきに なっていた" + cont "ぼくの てんぐのはなを" + cont "へしおった やつに" + cont "きみは どことなく にている" + + para "あいつの おかげで ぼくは" + line "こころを いれかえて" + cont "じいさんの けんきゅうを" + cont "てつだうように なったのさ" + cont "<⋯⋯> <⋯⋯> <⋯⋯> <⋯⋯> <⋯⋯>" + + para "さあ!" + line "これが #ずかんだ!" + + para "みつけた #の データが" + line "じどうてきに かきこまれて" + cont "ぺージが ふえて いく という" + cont "とても ハイテクな ずかん だよ!" + done + +SilentLabP1Text12: ; 5814 + ld hl, SilentLabP1TextString22 + call OpenTextbox + ret + +SilentLabP1TextString22: ; 581B + text "ぼくも むかし やったけど" + line "なかなか たいへんだよ<⋯⋯>" + cont "がんばってね!" + done + +SilentLabP1Text13: ; 583F + ld hl, SilentLabP1TextString24 + call OpenTextbox + ret + +SilentLabP1TextString23: ; 5846 + text "ナナミ『さっき あなたを " + line "つれてきた わかい おとこのこ<⋯⋯>" + cont "あれは わたしの おとうとなの" + cont "<⋯⋯>ということは つまり" + + para "そう!" + line "わたしも オーキドの まご なの!" + + para "おじいちゃんは りっぱな" + cont "#けんきゅうしゃよ" + cont "わたしは おてつだい できることが" + cont "とっても うれしいの!" + cont "あっ こんなこと しられたら" + cont "おじいちゃん ちょうしに のるから" + cont "ないしょに しておいてね!" + + para "<⋯⋯>おじいちゃん すっかり" + line "わすれている みたいだから" + + para "わたしが かわりに これを あげる!" + line "さいしんがた #りュックよ" + + para "<PLAYER>は" + line "#りュックを もらった!" + + para "ナナミ『この りュックには" + line "モンスターボールを" + cont "まとめて いれられる" + cont "ボールホルダと" + cont "わざマシンを まとめて いれられる" + cont "わざマシンホルダが ついているの" + + para "モンスターボール 6こと " + line "わざマシンひとつは オマケしておくわ" + cont "ホルダに なんにも はいってないと" + cont "さびしいもんね!" + + para "ねえ <PLAYER>くン" + line "あなたの おかあさんが" + cont "しんぱいすると いけないから" + cont "このまちを でるまえに" + cont "かおを みせに いってあげてね" + + para "<⋯⋯>あなたの かつやく" + line "いのっているわ" + done + +SilentLabP1TextString24: ; 5A23 + text "<⋯⋯>あなたの かつやく" + line "いのってるわ" + done + +SilentLabP1Text14: ; 5A36 + ld hl, SilentLabP1TextString25 + call OpenTextbox + ret + +SilentLabP1TextString25: ; 5A3D + text "わたしは" + line "はかせの じょしゅ です" + + para "わたしは もちろん" + line "はかせを ソンケー しております" + + para "あなた とは また どこかで" + line "おあい することに" + cont "なるような きがします" + done + +SilentLabP1Text15: ; 5A90 + ld hl, SilentLabP1TextString26 + call OpenTextbox + ret + +SilentLabP1TextString26: ; 5A97 + text "わたしは" + line "はかせの じょしゅ です" + + para "わたしは もちろん" + line "はかせを ソンケー しております" + + para "あなた とは また どこかで" + line "おあい することに" + cont "なるような きがします" + done + +SilentLabP1Text16: ; 5AEA + ld hl, SilentLabP1TextString27 + call OpenTextbox + ret + +SilentLabP1TextString27: ; 5AF1 + text "なんだろう?" + line "でんし てちょう かな?" + done + +SilentLabP1Text17: ; 5B05 + ld hl, SilentLabP1TextString28 + call OpenTextbox + ret + +SilentLabP1TextString28: ; 5B0D + text "<RIVAL>『あのメールを くれた" + line "オーキドって こんな じじい<⋯⋯>" + + para "あっ ゴメン" + line "こんな じいさん なのか?" + cont "ほんもの はじめて みたよ!" + done + +SilentLabP1TextString29: ; 5B4F + text "<RIVAL>『<PLAYER>!" + line "なんだか" + cont "おもしろく なってきたな!" + done + +SilentLabP1Text18: ; 5B68 + ld hl, SilentLabP1TextString30 + call OpenTextbox + ret + +SilentLabP1TextString30: ; 5B6F + text "わたしは" + line "はかせの じょしゅ です" + + para "あなた とは また どこかで" + line "おあい することに" + cont "なるような きがします" + done + +SilentLabP1Text19: ; 5BA7 + ld hl, SilentLabP1TextString31 + call OpenTextbox + ret + +SilentLabP1TextString31: ; 5BAE + text "わたしは" + line "はかせの じょしゅ です" + + para "あなた とは また どこかで" + line "おあい することに" + cont "なるような きがします" + done + +; 5BE6
\ No newline at end of file diff --git a/maps/SilentLabP2.asm b/maps/SilentLabP2.asm new file mode 100644 index 0000000..54aab8f --- /dev/null +++ b/maps/SilentLabP2.asm @@ -0,0 +1,360 @@ +include "constants.asm" + +SECTION "Silent Lab P2 Script", ROMX[$5C69], BANK[$34] + +SilentLabP2ScriptLoader:: ; 5C69 + ld hl, SilentLabP2ScriptPointers + call RunMapScript + call WriteBackMapScriptNumber + ret + +SilentLabP2ScriptPointers: ; 5C73 + dw SilentLabP2Script1 + dw SilentLabP2NPCIDs1 + dw SilentLabP2Script2 + dw SilentLabP2NPCIDs1 + dw SilentLabP2Script3 + dw SilentLabP2NPCIDs1 + dw SilentLabP2RivalChoosePokemon + dw SilentLabP2NPCIDs1 + dw SilentLabP2Script5 + dw SilentLabP2NPCIDs1 + dw SilentLabP2Script6 + dw SilentLabP2NPCIDs1 + dw SilentLabP2Script7 + dw SilentLabP2NPCIDs1 + +SilentLabP2NPCIDs1: ; 5C8F + db 00, 01, 02, 03, 04, $FF +SilentLabP2NPCIDs2: ; 5C95 + db 00, 01, 04, $FF +SilentLabP2NPCIDs3: ; 5C99 + db 00, 01, 02, $FF +SilentLabP2NPCIDs4: ; 5C9D + db 00, 01, 03, $FF + +SilentLabP2TextPointers1: ; 5CA1 + dw SilentLabP2Text1 + dw SilentLabP2Func3 + dw SilentLabP2Func4 + dw SilentLabP2Func4 + dw SilentLabP2Func4 + +SilentLabP2Script1: ; 5CAB + ld hl, wJoypadFlags + set 4, [hl] + ld a, 0 + call Function17f9 + ld a, 0 + ld hl, SilentLabP2Movement1 + call LoadMovementDataPointer + ld hl, wd41b + set 1, [hl] + ld hl, wc5ed + set 7, [hl] + ld a, 1 + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + ret + +SilentLabP2Movement1: ; 5CD2 + db 09, 09, 05, $32 + +SilentLabP2Script2: ; 5CD6 + ld hl, wc5ed + set 6, [hl] + call Function20f8 + ld a, 3 + ld d, UP + call SetObjectFacing + ld hl, SilentLabP2TextString1 + call OpenTextbox + ld hl, SilentLabP2TextString10 + call OpenTextbox + ld hl, SilentLabP2TextString2 + call OpenTextbox + ld a, 2 + ld [wMapScriptNumber], a + ret + +SilentLabP2Script3: ; 5CFD + ld hl, SilentLabP2NPCIDs1 + ld de, SilentLabP2TextPointers2 + call CallMapTextSubroutine + ret + +SilentLabP2RivalChoosePokemon: ; 5D07 + ld hl, wJoypadFlags + set 4, [hl] + ld a, 3 + call Function17f9 + ld hl, SilentLabP2MovementPointers + ld a, [wChosenStarter] + ld d, 0 + ld e, a + add hl, de + add hl, de + ld a, [hl+] + ld h, [hl] + ld l, a + ld a, 3 + call LoadMovementDataPointer + ld hl, wc5ed + set 7, [hl] + ld a, 4 + ld [wMapScriptNumber], a + ld a, 1 + call WriteIntod637 + ret + +SilentLabP2MovementPointers: ; 5D34 + dw SilentLabP2Movement2+1 + dw SilentLabP2Movement2 + dw SilentLabP2Movement2+2 + +SilentLabP2Movement2: ; 5D3A + db $0B, $0B, $0B, $0B, $05, $32 + +SilentLabP2Script5: ; 5D40 + ld hl, SilentLabP2TextString12 + call OpenTextbox + ld a, [wd266] + ld [wNamedObjectIndexBuffer], a + call GetPokemonName + ld hl, SilentLabP2TextString13 + call OpenTextbox + ld a, 5 + ld [wMapScriptNumber], a + ret + +SilentLabP2Script6: ; 5D5B + call Function20f8 + ld hl, wc5ed + res 6, [hl] + ld a, 6 + ld[wMapScriptNumber], a + ret + +SilentLabP2Script7: ; 5D69 + ld hl, SilentLabP2NPCIDs1 + ld de, SilentLabP2TextPointers2 + call CallMapTextSubroutine + ret + +SilentLabP2Text1: ; 5D73 + ld hl, wd41b + bit 2, [hl] + ld hl, SilentLabP2TextString3 + jr z, .skip + ld hl, SilentLabP2TextString9 +.skip + call OpenTextbox + ret + +SilentLabP2TextString1: ; 5D84 + text "オーキド『ほれ そこに 3びき" + cont "ポケモンが いる じゃろう!" + cont "ほっほ!" + + para "こいつらを きみたちに" + cont "いっぴき づつ やろう!" + cont "⋯⋯ さあ えらべ!" + done + +SilentLabP2TextString2: ; 5DCD + text "オーキド『まあ" + line "あわてるな <RIVAL>!" + cont "おまえも すきなものを とれ!" + done + +SilentLabP2TextString3: ; 5DEF + text "オーキド『さあ <PLAYER>" + line "どの ポケモンに するかね?" + done + +SilentLabP2TextString4: ; 5E1C + text "オーキド『ほう! ほのおのポケモン" + line "@" + ld bc, wStringBuffer1 + text "に するんじゃな?@" + db 08 + call ConfirmPokemonSelection + call Function3036 + ret + +SilentLabP2TextString5: ; 5E32 + text "オーキド『ふむ みずのポケモン" + line "@" + ld bc, wStringBuffer1 + text "に きめるのじゃな?@" + db 08 + call ConfirmPokemonSelection + call Function3036 + ret + +SilentLabP2TextString6: ; 5E6E + text "オーキド『おお! くさのポケモン" + line "@" + ld bc, wStringBuffer1 + text "が いいんじゃな?@" + db 08 + call ConfirmPokemonSelection + call Function3036 + ret + +ConfirmPokemonSelection: ; 5E85 + call YesNoBox + jr c, .bigJump + ld hl, wd41b + set 2, [hl] + ld a, 1 + ld [wd29b], a + ld a, 1 + ld [wd29a], a + ld a, 1 + ld [wd2a0], a + ld hl, SilentLabP2TextString8 + call PrintText + ld hl, wJoypadFlags + set 5, [hl] + ld a, [wd265] + ld [wMonDexIndex], a + ld a, 5 + ld [wCurPartyLevel], a + callab Function60a0 + xor a + ld [wPartyMon1 + 1], a + ld a, 3 + ld [wMapScriptNumber], a + ret +.bigJump ; 5EC6 + ld hl, SilentLabP2TextString7 + call PrintText + ret + +SilentLabP2TextString7: ; 5ECD + text "では" + line "どれに するのじゃ?" + done + +SilentLabP2TextString8: ; 5EDC + text "オーキド『この ポケモンは" + line "ほんとに げんきが いいぞ!" + + para "<PLAYER>は オーキドはかせから" + line "@" + ld bc, wStringBuffer1 + text "を もらった!<PROMPT>" + +SilentLabP2TextString9: ; 5F14 + text "オーキド『そうじゃ!" + line "やせいの ポケモンが でて きても" + cont "そいつを たたかわせて いけば" + cont "となりまちへ いける!" + done + +SilentLabP2Func3: ; 5F4E + ld hl, wd41b + bit 2, [hl] + ld hl, SilentLabP2TextString11 + jr z, .skip + ld hl, SilentLabP2TextString14 +.skip + call OpenTextbox + ret + +SilentLabP2TextString10: ; 5F5F + text "<RIVAL>『あッ! おれにも!" + line "じいさん おれにもくれよう!" + done + +SilentLabP2TextString11: ; 5F7B + text "<RIVAL>『いいぜ <PLAYER>!" + line "さきに えらんで!" + cont "おれは こころが ひろいからな" + done + +SilentLabP2TextString12: ; 5F9F + text "<RIVAL>『じゃ おれは これ!" + done + +SilentLabP2TextString13: ; 5FAD + text "<RIVAL>は オーキドから" + line "@" + ld bc, wStringBuffer1 + text "を もらった!" + done + +SilentLabP2TextString14: ; 5FC5 + text "<RIVAL>『<PLAYER>の#" + line "いいなあ!" + cont "でも おれのポケモンも" + cont "ちょっと いいだろ?" + done + +SilentLabP2Func4: ; 5FE9 + ld hl, wd41b + bit 2, [hl] + jr nz, .bigjump + ldh a, [hFFEA] + sub 2 + ld [wChosenStarter], a + ld d, 0 + ld e, a + ld hl, SilentLabP2StarterData + add hl, de + add hl, de + add hl, de + add hl, de + ld a, [hl+] + ld [wd265], a + push hl + ld [wNamedObjectIndexBuffer], a + callba Function6734 + ld a, [wd265] + ld [wNamedObjectIndexBuffer], a + call GetPokemonName + pop hl + push hl + ld a, [hl+] + ld h, [hl] + ld l, a + call OpenTextbox + pop hl + inc hl + inc hl + ld a, [hl] + ld [wd266], a + ret +.bigjump + ld hl, SilentLabP2TextString15 + call OpenTextbox + ret + +SilentLabP2StarterData: ; 6031 + db DEX_HONOGUMA + dw $5E09 + db DEX_KURUSU + + db DEX_KURUSU + dw $5E33 + db DEX_HAPPA + + db DEX_HAPPA + dw $5E5C + db DEX_HONOGUMA + +SilentLabP2TextString15: ; 603D + text "オーキド『これ!" + line "よくばっちゃ いかん!" + done + +SilentLabP2TextPointers2: ; 6053 + dw Function3899 + dw Function3899 + dw Function3899 + dw Function3899 + dw MapDefaultText + +; 605D
\ No newline at end of file diff --git a/maps/SilentPokecenter.asm b/maps/SilentPokecenter.asm new file mode 100644 index 0000000..dc1a35a --- /dev/null +++ b/maps/SilentPokecenter.asm @@ -0,0 +1,113 @@ +include "constants.asm" + +SECTION "Silent Hills Pokecenter", ROMX[$4682], BANK[$34] + +SilentPokecenterScriptLoader:: ; 4682 + ld hl, SilentPokecenterScriptPointers + call RunMapScript + call WriteBackMapScriptNumber + ret + +SilentPokecenterScriptPointers: ; 468C + dw SilentPokecenterScript + dw SilentPokecenterNPCIDs + +SilentPokecenterScript: ; 4690 + ld hl, SilentPokecenterNPCIDs + ld de, SilentPokecenterPCPointer + call CallMapTextSubroutine + ret + +; 469A + dw SilentPokecenterNPCIDs + +SilentPokecenterNPCIDs: ; 469C + db 0 + db 1 + db 2 + db 3 + db 4 + db $FF + +SilentPokecenterPCPointer: ; 46A2 + dw SilentPokecenterPCText + +SilentPokecenterPCText: ; 46A4 + ld hl, SilentPokecenterTextString1 + call OpenTextbox + ret + +SilentPokecenterTextString1: ; 46AB + text "げんざい ちょうせいちゅうです" + done + +SilentPokecenterTextPointers:: ; 46BC + dw SilentPokecenterNPCText1 + dw SilentPokecenterNPCText2 + dw SilentPokecenterNPCText3 + dw SilentPokecenterNPCText4 + dw SilentPokecenterNPCText5 + +SilentPokecenterNPCText1: ; 46C6 + ld hl, SilentPokecenterTextString2 + call OpenTextbox + ret + +SilentPokecenterTextString2: ; 46CD + text "もうしわけありませんが" + line "ただいま しゅうりちゅう でして" + + para "かいふくは できません" + + para "まちから でるときは" + line "じゅうぶんに おきをつけ ください" + done + +SilentPokecenterNPCText2: ; 4714 + ld hl, SilentPokecenterTextString3 + call OpenTextbox + ret + +SilentPokecenterTextString3: ; 471B + text "あそこに ある パソコンは" + line "トレーナー だったら" + cont "いつでも むりょうで" + cont "つかうことが できるよ" + cont "きが きいてるよな!" + done + +SilentPokecenterNPCText3: ; 4757 + ld hl, SilentPokecenterTextString4 + call OpenTextbox + ret + +SilentPokecenterTextString4: ; 475E + text "いま じゅんびちゅうの" + line "きかいは すごいらしいよ" + + para "なんでも ときを こえて" + line "ポケモンが こうかん できるって!" + + para "ほんとかな?" + done + +SilentPokecenterNPCText4: ; 479E + ld hl, SilentPokecenterTextString5 + call OpenTextbox + ret + +SilentPokecenterTextString5: ; 47A5 + text "こいつ へルガー" + line "いままでにない タイプの ポケモンさ" + done + +SilentPokecenterNPCText5: ; 47C2 + ld hl, SilentPokecenterTextString6 + call OpenTextbox + ret + +SilentPokecenterTextString6: ; 47C9 + text "へルガー『ぐるるうー" + done + +; 47D5
\ No newline at end of file @@ -1,35 +1,16 @@ ; ROM0 -00:3111 Function3111 -00:3171 Function3171 -00:319B Function319b -00:3233 Function3233 -00:323E Function323e -00:3240 Function3240 00:3C43 GetPartyParamLocation 00:3CA8 InitSpriteAnimStruct -00:3D86 WaitSFX -00:3D87 WaitSFX.wait -00:3DA5 MaxVolume -00:3DAB LowVolume -00:3DB1 VolumeOff -00:3DB6 UpdateSoundNTimes -00:3DBE FadeToMapMusic -00:3DDC FadeToMapMusic.dontfade -00:3E05 SpecialMapMusic -00:3E14 SpecialMapMusic.state2 -00:3E19 SpecialMapMusic.normal -00:3E1B GetMapMusic -00:3E2E GetMapMusic.unk_3E2E -00:3E32 Unk_3E32 -01:4031 Function4031 -01:4031 DebugMenu -01:40EB Function40eb +01:40FD Function40fd 01:5007 Function5007 01:50B9 Function50b9 01:5190 _UpdateSprites 01:5190 Function5190 -01:5D27 Function5d27 +01:52F9 Function52f9 +01:5388 Function5388 +01:5397 Function5397 +01:53B0 Function53b0 01:63D8 ReanchorBGMap_NoOAMUpdate 01:6437 LoadFonts_NoOAMUpdate 01:6445 Function6445 @@ -37,6 +18,7 @@ 01:6713 Function6713 01:67d5 CorrectNickErrors 01:776E Function776e +01:78E5 SettingsScreen 02:4000 Function8000 02:4098 _InitializeVisibleSprites @@ -51,6 +33,7 @@ 02:4786 Function8786 02:4856 DecompTownMapTilemap 02:48DA DecompTownMapTilemap.tilemap +02:4AAB OpenPokegear 02:4C7C DrawMap 02:4DC2 TownMapGfx 02:4F32 PokegearRadioGfx @@ -58,7 +41,6 @@ 02:528B Function928b 02:5695 CheckSGB -03:4000 Functionc000 03:47D5 SpawnPoints 03:488D Tilesets 03:54E6 Functiond4e6 @@ -73,28 +55,33 @@ 03:5E79 Functionde79 03:5F7D Functiondf7d 03:5F91 Functiondf91 +03:60A0 Function60a0 +03:6734 Function6734 +04:4743 ShrinkPic1 +04:479D ShrinkPic2 04:528F Function1128f 04:52C1 Function112c1 04:530A Function1130a +04:53F4 Function113f4 04:5677 DoPlayerMovement 04:5DBE DisplayStartMenu 04:640B Function1240b 04:6C58 CheckRegisteredItem -05:4000 Function14000 -05:400A GetPlayerSprite 05:4036 RefreshSprites 05:404C CheckInteriorMap 05:405B AddIndoorSprites 05:40AA AddOutdoorSprites 05:40D9 Function140d9 +05:40EA Function140ea 05:40FB LoadUsedSpritesGfx ; TODO: maybe there's a better name 05:43B6 InitAllSRAMBanks 05:43E0 Function143e0 05:457A Function1457a 05:45B8 Function145b8 05:45DE Function145de +05:4624 Function14624 05:46DC Function146dc ; Structure: ; byte Map group ($ff = end) @@ -104,6 +91,7 @@ ; word Unknown (2 bytes) 05:470E UnknownMapBufferPointers 05:4777 Function14777 +05:477D Function1477D 05:4CAC Function14cac 05:4DAC Function14dac 05:4DC4 Function14dc4 @@ -134,6 +122,7 @@ 0F:508C Function3d08c 0F:55CE Function3d5ce 0F:567C Function3d67c +0F:6043 AddPokemonToBox 0F:61A4 Function3e1a4 0F:6874 Function3e874 0F:691E Function3e91e @@ -191,189 +180,6 @@ 24:4000 SetClockDialog 24:4239 SlotMachineGame -25:4000 Route2Gate1F_MapAttributes -25:407C Route2Gate2F_MapAttributes -25:40DC Route2House_MapAttributes -25:414A OldCityMuseum_MapAttributes -25:41CD OldCityGym_MapAttributes -25:4289 OldCityTower1F_MapAttributes -25:4319 OldCityTower2F_MapAttributes -25:439E OldCityTower3F_MapAttributes -25:4423 OldCityTower4F_MapAttributes -25:44A8 OldCityTower5F_MapAttributes -25:44FC OldCityBillsHouse_MapAttributes -25:456A OldCityMart_MapAttributes -25:45EE OldCityHouse_MapAttributes -25:466E OldCityPokecenter1F_MapAttributes -25:46FE OldCityPokecenter2F_MapAttributes -25:4826 OldCityPokecenterTrade_MapAttributes -25:48AC OldCityPokecenterBattle_MapAttributes -25:492F OldCityPokecenterTimeMachine_MapAttributes -25:49AC OldCityKurtsHouse_MapAttributes -25:4A26 OldCitySchool_MapAttributes - -26:4000 Route1Gate1F_MapAttributes -26:40DA Route1Gate2F_MapAttributes -26:4224 WestMart1F_MapAttributes -26:42A0 WestMart2F_MapAttributes -26:4374 WestMart3F_MapAttributes -26:4433 WestMart4F_MapAttributes -26:44F2 WestMart5F_MapAttributes -26:4581 WestMart6F_MapAttributes -26:460E WestMartElevator_MapAttributes -26:464B WestRadioTower1F_MapAttributes -26:46CA WestRadioTower2F_MapAttributes -26:4772 WestRadioTower3F_MapAttributes -26:4827 WestRadioTower4F_MapAttributes -26:48E9 WestRadioTower5F_MapAttributes -26:499F WestRocketRaidedHouse_MapAttributes -26:4A49 WestPokecenter1F_MapAttributes -26:4AE1 WestPokecenter2F_MapAttributes -26:4B5E WestGym_MapAttributes -26:4C1A WestHouse1_MapAttributes -26:4C9E WestHouse2_MapAttributes - -27:4000 HaitekuWestRouteGate_MapAttributes -27:405B HaitekuPokecenter1F_MapAttributes -27:40EF HaitekuPokecenter2F_MapAttributes -27:4168 HaitekuLeague1F_MapAttributes -27:4209 HaitekuLeague2F_MapAttributes -27:42A9 HaitekuMart_MapAttributes -27:4329 HaitekuHouse1_MapAttributes -27:4383 HaitekuHouse2_MapAttributes -27:43DD HaitekuImposterOakHouse_MapAttributes -27:4444 HaitekuAquarium1F_MapAttributes -27:44CB HaitekuAquarium2F_MapAttributes -27:4537 FontoRouteGate1_MapAttributes -27:4592 FontoRouteGate2_MapAttributes -27:45ED FontoRouteGate3_MapAttributes -27:4648 FontoRocketHouse_MapAttributes -27:46D5 FontoMart_MapAttributes -27:4755 FontoHouse_MapAttributes -27:47AF FontoPokecenter1F_MapAttributes -27:4843 FontoPokecenter2F_MapAttributes -27:48BC FontoLab_MapAttributes -27:4923 BaadonMart_MapAttributes -27:49A3 BaadonPokecenter1F_MapAttributes -27:4A2A BaadonPokecenter2F_MapAttributes -27:4AA3 BaadonHouse1_MapAttributes -27:4AF9 BaadonWallpaperHouse_MapAttributes -27:4B42 BaadonHouse2_MapAttributes -27:4B9C BaadonLeague1F_MapAttributes -27:4C3D BaadonLeague2F_MapAttributes -27:4CDD BaadonRouteGateWest_MapAttributes -27:4D38 BaadonRouteGateNewtype_MapAttributes -27:4D93 NewtypePokecenter1F_MapAttributes -27:4E27 NewtypePokecenter2F_MapAttributes -27:4EA0 NewtypeLeague1F_MapAttributes -27:4F41 NewtypeLeague2F_MapAttributes -27:4FE1 NewtypeSailorHouse_MapAttributes -27:503B NewtypeMart_MapAttributes -27:50BB NewtypeDojo_MapAttributes -27:5155 NewtypeHouse1_MapAttributes -27:51AF NewtypeDiner_MapAttributes -27:522C NewtypeHouse2_MapAttributes -27:5286 NewtypeHouse3_MapAttributes -27:52E0 Route15Pokecenter1F_MapAttributes -27:5374 Route15Pokecenter2F_MapAttributes -27:53C6 NewtypeRouteGate_MapAttributes -27:5421 Route18Pokecenter1F_MapAttributes -27:54B5 Route18Pokecenter2F_MapAttributes -27:5507 SugarRouteGate_MapAttributes -27:5562 SugarHouse_MapAttributes -27:55E2 SugarHouse2_MapAttributes -27:5638 SugarMart_MapAttributes -27:56B8 SugarPokecenter1F_MapAttributes -27:574C SugarPokecenter2F_MapAttributes -27:57C5 BullForestRoute1House_MapAttributes -27:581F BullForestRouteGateStand_MapAttributes -27:587A BullMart_MapAttributes -27:58FA BullHouse1_MapAttributes -27:5950 BullHouse2_MapAttributes -27:59AA BullHouse3_MapAttributes -27:5A04 BullPokecenter1F_MapAttributes -27:5A98 BullPokecenter2F_MapAttributes -27:5B11 BullLeague1F_MapAttributes -27:5BB2 BullLeague2F_MapAttributes -27:5C52 BullHouse4_MapAttributes -27:5C9F StandRouteGateKanto_MapAttributes -27:5CFA StandLab_MapAttributes -27:5D50 StandPokecenter1F_MapAttributes -27:5DE4 StandPokecenter2F_MapAttributes -27:5E5D StandOffice_MapAttributes -27:5EDD StandMart_MapAttributes -27:5F5D StandHouse_MapAttributes -27:5FB7 StandRocketHouse1F_MapAttributes -27:6024 StandRocketHouse2F_MapAttributes -27:6083 StandLeague1F_MapAttributes -27:6124 StandLeague2F_MapAttributes -27:61C4 KantoCeruleanHouse_MapAttributes -27:621E KantoPokecenter1F_MapAttributes -27:62B2 KantoPokecenter2F_MapAttributes -27:632B KantoLeague1F_MapAttributes -27:63CC KantoLeague2F_MapAttributes -27:646C KantoLavenderHouse_MapAttributes -27:64D3 KantoCeladonMart1F_MapAttributes -27:6547 KantoCeladonMart2F_MapAttributes -27:65C1 KantoCeladonMart3F_MapAttributes -27:663B KantoCeladonMart4F_MapAttributes -27:66C2 KantoCeladonMart5F_MapAttributes -27:6742 KantoCeladonElevator_MapAttributes -27:677F KantoMart_MapAttributes -27:67FF KantoGamefreakHQ1_MapAttributes -27:6899 KantoGamefreakHQ2_MapAttributes -27:6905 KantoGamefreakHQ3_MapAttributes -27:698B KantoGamefreakHQ4_MapAttributes -27:69E3 KantoGamefreakHQ5_MapAttributes -27:6A2C KantoSilphCo_MapAttributes -27:6ADF KantoViridianHouse_MapAttributes -27:6B46 KantoGameCorner_MapAttributes -27:6C55 KantoUnusedArea_MapAttributes -27:6C90 KantoGameCornerPrizes_MapAttributes -27:6D04 KantoDiner_MapAttributes -27:6D51 KantoSchool_MapAttributes -27:6DEB KantoHospital_MapAttributes -27:6E6B KantoPokecenter21F_MapAttributes -27:6EFF KantoPokecenter22F_MapAttributes -27:6F78 KantoRedsHouse_MapAttributes -27:6FDF KantoGreensHouse1F_MapAttributes -27:703C KantoGreensHouse2F_MapAttributes -27:707E KantoEldersHouse_MapAttributes -27:70E5 KantoOaksLab_MapAttributes -27:713B KantoLeague21F_MapAttributes -27:71DC KantoLeague22F_MapAttributes -27:727C KantoFishingGuru_MapAttributes -27:72D6 SouthHouse1_MapAttributes -27:7330 SouthPokecenter1F_MapAttributes -27:73C4 SouthPokecenter2F_MapAttributes -27:743D SouthMart_MapAttributes -27:74BD SouthHouse2_MapAttributes -27:7517 NorthHouse1_MapAttributes -27:7571 NorthMart_MapAttributes -27:75F1 NorthHouse2_MapAttributes -27:764B NorthPokecenter1F_MapAttributes -27:76DF NorthPokecenter2F_MapAttributes - -2F:4000 PowerPlant1_MapAttributes -2F:407D PowerPlant2_MapAttributes -2F:40FA PowerPlant3_MapAttributes -2F:422B PowerPlant4_MapAttributes -2F:435C RuinsOfAlphEntrance_MapAttributes -2F:43D9 RuinsOfAlphMain_MapAttributes -2F:469F CaveMinecarts1_MapAttributes -2F:482A CaveMinecarts2_MapAttributes -2F:49B5 CaveMinecarts3_MapAttributes -2F:4B40 CaveMinecarts4_MapAttributes -2F:4CCB CaveMinecarts5_MapAttributes -2F:4E56 CaveMinecarts6_MapAttributes -2F:4F2D CaveMinecarts7_MapAttributes -2F:5004 Office1_MapAttributes -2F:5081 Office2_MapAttributes -2F:51B2 Office3_MapAttributes -2F:5289 SlowpokeWellEntrance_MapAttributes -2F:5306 SlowpokeWellMain_MapAttributes -2F:53DD ShizukanaOka_MapAttributes - 32:76FF Functioncb6ff 32:7710 Functioncb710 32:7733 Functioncb733 @@ -385,56 +191,8 @@ 33:625D BattleAnim_Sine_e 33:6263 BattleAnim_Cosine_e -34:4000 RouteSilentEastGate_MapAttributes -34:4042 PlayerHouse1F_MapAttributes -34:4132 PlayerHouse2F_MapAttributes -34:45FF SilentPokecenter_MapAttributes -34:47D5 SilentHillHouse_MapAttributes -34:4AAC SilentHillLab_MapAttributes -34:5BE6 SilentHillLab2_MapAttributes -34:605D Unused13_MapAttributes +36:7AE4 SetTime -36:4014 SilentHill_MapAttributes -36:410D OldCity_MapAttributes -36:4372 West_MapAttributes -36:45D2 Haiteku_MapAttributes -36:47F8 Fonto_MapAttributes -36:48F3 Baadon_MapAttributes -36:49F9 Newtype_MapAttributes -36:4C3A Sugar_MapAttributes -36:4D05 BullForest_MapAttributes -36:4F28 Stand_MapAttributes -36:519D Kanto_MapAttributes -36:55F3 Prince_MapAttributes -36:5677 MtFuji_MapAttributes -36:56EF South_MapAttributes -36:5914 North_MapAttributes -36:59DF Route1P1_MapAttributes -36:5ABE Route1P2_MapAttributes -36:5BD4 Route2_MapAttributes -36:5CC6 HaitekuWestRoute_MapAttributes -36:5DD1 HaitekuWestRouteOcean_MapAttributes -36:5F17 FontoRoute1_MapAttributes -36:6083 FontoRoute6_MapAttributes -36:61E8 FontoRoute2_MapAttributes -36:62C6 FontoRoute4_MapAttributes -36:63B2 FontoRoute3_MapAttributes -36:64BD BaadonRoute1_MapAttributes -36:6603 BaadonRoute2_MapAttributes -36:67EF BaadonRoute3_MapAttributes -36:68DB Route15_MapAttributes -36:69BD NewtypeRoute_MapAttributes -36:6A6E Route18_MapAttributes -36:6C6F BullForestRoute1_MapAttributes -36:6D8F SugarRoute_MapAttributes -36:6ED5 BullForestRoute2_MapAttributes -36:701B StandRoute_MapAttributes -36:7161 KantoEastRoute_MapAttributes -36:724D RouteSilentEast_MapAttributes -36:738C PrinceRoute_MapAttributes -36:73E8 MtFujiRoute_MapAttributes -36:7444 FontoRoute5_MapAttributes -36:7530 BullForestRoute3_MapAttributes 38:4000 PikachuMiniGame 39:4000 GameFreakIntro 39:432F OpeningCutscene @@ -458,12 +216,926 @@ 3F:654E PicTest 3F:6750 PicTestMenu 3F:6755 PicTestMenu.loop +3F:67A1 CallSubGameMenu 00:CB6F wPlayerStepDirection 01:D19E wItems -01:D258 wRivalName ; The starting house's map script number is stored at d29a. Others are probably nearby. 01:D35F wOptions 01:D513 wWarpNumber 01:DA3B wOTPartyMonOT + +; Maps +25:404D Route2Gate1F_Blocks +25:4062 Route2Gate1F_Unk +25:4061 Route2Gate1F_MapScripts +25:400B Route2Gate1F_MapEvents +25:40B5 Route2Gate2F_Blocks +25:40C2 Route2Gate2F_Unk +25:40C1 Route2Gate2F_MapScripts +25:4087 Route2Gate2F_MapEvents +25:411F Route2House_Blocks +25:4130 Route2House_Unk +25:412F Route2House_MapScripts +25:40E7 Route2House_MapEvents +25:4192 OldCityMuseum_Blocks +25:41B3 OldCityMuseum_Unk +25:41B2 OldCityMuseum_MapScripts +25:4155 OldCityMuseum_MapEvents +25:4241 OldCityGym_Blocks +25:426F OldCityGym_Unk +25:426E OldCityGym_MapScripts +25:41D8 OldCityGym_MapEvents +25:42EE OldCityTower1F_Blocks +25:42FF OldCityTower1F_Unk +25:42FE OldCityTower1F_MapScripts +25:4294 OldCityTower1F_MapEvents +25:4373 OldCityTower2F_Blocks +25:4384 OldCityTower2F_Unk +25:4383 OldCityTower2F_MapScripts +25:4324 OldCityTower2F_MapEvents +25:43F8 OldCityTower3F_Blocks +25:4409 OldCityTower3F_Unk +25:4408 OldCityTower3F_MapScripts +25:43A9 OldCityTower3F_MapEvents +25:447D OldCityTower4F_Blocks +25:448E OldCityTower4F_Unk +25:448D OldCityTower4F_MapScripts +25:442E OldCityTower4F_MapEvents +25:44D8 OldCityTower5F_Blocks +25:44E2 OldCityTower5F_Unk +25:44E1 OldCityTower5F_MapScripts +25:44B3 OldCityTower5F_MapEvents +25:453F OldCityBillsHouse_Blocks +25:4550 OldCityBillsHouse_Unk +25:454F OldCityBillsHouse_MapScripts +25:4507 OldCityBillsHouse_MapEvents +25:45B3 OldCityMart_Blocks +25:45D4 OldCityMart_Unk +25:45D3 OldCityMart_MapScripts +25:4575 OldCityMart_MapEvents +25:4643 OldCityHouse_Blocks +25:4654 OldCityHouse_Unk +25:4653 OldCityHouse_MapScripts +25:45F9 OldCityHouse_MapEvents +25:46CB OldCityPokecenter1F_Blocks +25:46EC OldCityPokecenter1F_Unk +25:46EB OldCityPokecenter1F_MapScripts +25:4679 OldCityPokecenter1F_MapEvents +25:4762 OldCityPokecenter2F_Blocks +25:47A4 OldCityPokecenter2F_Unk +25:4782 OldCityPokecenter2F_MapScripts +25:4709 OldCityPokecenter2F_MapEvents +25:4851 OldCityPokecenterTrade_Blocks +25:4882 OldCityPokecenterTrade_Unk +25:4866 OldCityPokecenterTrade_MapScripts +25:4831 OldCityPokecenterTrade_MapEvents +25:48D7 OldCityPokecenterBattle_Blocks +25:4907 OldCityPokecenterBattle_Unk +25:48EB OldCityPokecenterBattle_MapScripts +25:48B7 OldCityPokecenterBattle_MapEvents +25:495E OldCityPokecenterTimeMachine_Blocks +25:499D OldCityPokecenterTimeMachine_Unk +25:497E OldCityPokecenterTimeMachine_MapScripts +25:493A OldCityPokecenterTimeMachine_MapEvents +25:49EB OldCityKurtsHouse_Blocks +25:4A0C OldCityKurtsHouse_Unk +25:4A0B OldCityKurtsHouse_MapScripts +25:49B7 OldCityKurtsHouse_MapEvents +25:4AA2 OldCitySchool_Blocks +25:4AC3 OldCitySchool_Unk +25:4AC2 OldCitySchool_MapScripts +25:4A31 OldCitySchool_MapEvents +26:404D Route1Gate1F_Blocks +26:4074 Route1Gate1F_Unk +26:4061 Route1Gate1F_MapScripts +26:400B Route1Gate1F_MapEvents +26:4113 Route1Gate2F_Blocks +26:4134 Route1Gate2F_Unk +26:411F Route1Gate2F_MapScripts +26:40E5 Route1Gate2F_MapEvents +26:4265 WestMart1F_Blocks +26:4286 WestMart1F_Unk +26:4285 WestMart1F_MapScripts +26:422F WestMart1F_MapEvents +26:4339 WestMart2F_Blocks +26:435A WestMart2F_Unk +26:4359 WestMart2F_MapScripts +26:42AB WestMart2F_MapEvents +26:43F8 WestMart3F_Blocks +26:4419 WestMart3F_Unk +26:4418 WestMart3F_MapScripts +26:437F WestMart3F_MapEvents +26:44B7 WestMart4F_Blocks +26:44D8 WestMart4F_Unk +26:44D7 WestMart4F_MapScripts +26:443E WestMart4F_MapEvents +26:4546 WestMart5F_Blocks +26:4567 WestMart5F_Unk +26:4566 WestMart5F_MapScripts +26:44FD WestMart5F_MapEvents +26:45D3 WestMart6F_Blocks +26:45F4 WestMart6F_Unk +26:45F3 WestMart6F_MapScripts +26:458C WestMart6F_MapEvents +26:462C WestMartElevator_Blocks +26:4631 WestMartElevator_Unk +26:4630 WestMartElevator_MapScripts +26:4619 WestMartElevator_MapEvents +26:469F WestRadioTower1F_Blocks +26:46B0 WestRadioTower1F_Unk +26:46AF WestRadioTower1F_MapScripts +26:4656 WestRadioTower1F_MapEvents +26:4747 WestRadioTower2F_Blocks +26:4758 WestRadioTower2F_Unk +26:4757 WestRadioTower2F_MapScripts +26:46D5 WestRadioTower2F_MapEvents +26:47FC WestRadioTower3F_Blocks +26:480D WestRadioTower3F_Unk +26:480C WestRadioTower3F_MapScripts +26:477D WestRadioTower3F_MapEvents +26:48BE WestRadioTower4F_Blocks +26:48CF WestRadioTower4F_Unk +26:48CE WestRadioTower4F_MapScripts +26:4832 WestRadioTower4F_MapEvents +26:4974 WestRadioTower5F_Blocks +26:4985 WestRadioTower5F_Unk +26:4984 WestRadioTower5F_MapScripts +26:48F4 WestRadioTower5F_MapEvents +26:4A1A WestRocketRaidedHouse_Blocks +26:4A2F WestRocketRaidedHouse_Unk +26:4A2E WestRocketRaidedHouse_MapScripts +26:49AA WestRocketRaidedHouse_MapEvents +26:4AA6 WestPokecenter1F_Blocks +26:4AC7 WestPokecenter1F_Unk +26:4AC6 WestPokecenter1F_MapScripts +26:4A54 WestPokecenter1F_MapEvents +26:4B23 WestPokecenter2F_Blocks +26:4B44 WestPokecenter2F_Unk +26:4B43 WestPokecenter2F_MapScripts +26:4AEC WestPokecenter2F_MapEvents +26:4BD2 WestGym_Blocks +26:4C00 WestGym_Unk +26:4BFF WestGym_MapScripts +26:4B69 WestGym_MapEvents +26:4C6F WestHouse1_Blocks +26:4C84 WestHouse1_Unk +26:4C83 WestHouse1_MapScripts +26:4C25 WestHouse1_MapEvents +26:4CF3 WestHouse2_Blocks +26:4D08 WestHouse2_Unk +26:4D07 WestHouse2_MapScripts +26:4CA9 WestHouse2_MapEvents +27:402C HaitekuWestRouteGate_Blocks +27:4041 HaitekuWestRouteGate_Unk +27:4040 HaitekuWestRouteGate_MapScripts +27:400B HaitekuWestRouteGate_MapEvents +27:40B4 HaitekuPokecenter1F_Blocks +27:40D5 HaitekuPokecenter1F_Unk +27:40D4 HaitekuPokecenter1F_MapScripts +27:4066 HaitekuPokecenter1F_MapEvents +27:412D HaitekuPokecenter2F_Blocks +27:414E HaitekuPokecenter2F_Unk +27:414D HaitekuPokecenter2F_MapScripts +27:40FA HaitekuPokecenter2F_MapEvents +27:41CE HaitekuLeague1F_Blocks +27:41EF HaitekuLeague1F_Unk +27:41EE HaitekuLeague1F_MapScripts +27:4173 HaitekuLeague1F_MapEvents +27:4261 HaitekuLeague2F_Blocks +27:428F HaitekuLeague2F_Unk +27:428E HaitekuLeague2F_MapScripts +27:4214 HaitekuLeague2F_MapEvents +27:42EE HaitekuMart_Blocks +27:430F HaitekuMart_Unk +27:430E HaitekuMart_MapScripts +27:42B4 HaitekuMart_MapEvents +27:4354 HaitekuHouse1_Blocks +27:4369 HaitekuHouse1_Unk +27:4368 HaitekuHouse1_MapScripts +27:4334 HaitekuHouse1_MapEvents +27:43AE HaitekuHouse2_Blocks +27:43C3 HaitekuHouse2_Unk +27:43C2 HaitekuHouse2_MapScripts +27:438E HaitekuHouse2_MapEvents +27:4415 HaitekuImposterOakHouse_Blocks +27:442A HaitekuImposterOakHouse_Unk +27:4429 HaitekuImposterOakHouse_MapScripts +27:43E8 HaitekuImposterOakHouse_MapEvents +27:4490 HaitekuAquarium1F_Blocks +27:44B1 HaitekuAquarium1F_Unk +27:44B0 HaitekuAquarium1F_MapScripts +27:444F HaitekuAquarium1F_MapEvents +27:44FC HaitekuAquarium2F_Blocks +27:451D HaitekuAquarium2F_Unk +27:451C HaitekuAquarium2F_MapScripts +27:44D6 HaitekuAquarium2F_MapEvents +27:4563 FontoRouteGate1_Blocks +27:4578 FontoRouteGate1_Unk +27:4577 FontoRouteGate1_MapScripts +27:4542 FontoRouteGate1_MapEvents +27:45BE FontoRouteGate2_Blocks +27:45D3 FontoRouteGate2_Unk +27:45D2 FontoRouteGate2_MapScripts +27:459D FontoRouteGate2_MapEvents +27:4619 FontoRouteGate3_Blocks +27:462E FontoRouteGate3_Unk +27:462D FontoRouteGate3_MapScripts +27:45F8 FontoRouteGate3_MapEvents +27:469A FontoRocketHouse_Blocks +27:46BB FontoRocketHouse_Unk +27:46BA FontoRocketHouse_MapScripts +27:4653 FontoRocketHouse_MapEvents +27:471A FontoMart_Blocks +27:473B FontoMart_Unk +27:473A FontoMart_MapScripts +27:46E0 FontoMart_MapEvents +27:4780 FontoHouse_Blocks +27:4795 FontoHouse_Unk +27:4794 FontoHouse_MapScripts +27:4760 FontoHouse_MapEvents +27:4808 FontoPokecenter1F_Blocks +27:4829 FontoPokecenter1F_Unk +27:4828 FontoPokecenter1F_MapScripts +27:47BA FontoPokecenter1F_MapEvents +27:4881 FontoPokecenter2F_Blocks +27:48A2 FontoPokecenter2F_Unk +27:48A1 FontoPokecenter2F_MapScripts +27:484E FontoPokecenter2F_MapEvents +27:48F4 FontoLab_Blocks +27:4909 FontoLab_Unk +27:4908 FontoLab_MapScripts +27:48C7 FontoLab_MapEvents +27:4968 BaadonMart_Blocks +27:4989 BaadonMart_Unk +27:4988 BaadonMart_MapScripts +27:492E BaadonMart_MapEvents +27:49EF BaadonPokecenter1F_Blocks +27:4A10 BaadonPokecenter1F_Unk +27:4A0F BaadonPokecenter1F_MapScripts +27:49AE BaadonPokecenter1F_MapEvents +27:4A68 BaadonPokecenter2F_Blocks +27:4A89 BaadonPokecenter2F_Unk +27:4A88 BaadonPokecenter2F_MapScripts +27:4A35 BaadonPokecenter2F_MapEvents +27:4ACE BaadonHouse1_Blocks +27:4ADF BaadonHouse1_Unk +27:4ADE BaadonHouse1_MapScripts +27:4AAE BaadonHouse1_MapEvents +27:4B17 BaadonWallpaperHouse_Blocks +27:4B28 BaadonWallpaperHouse_Unk +27:4B27 BaadonWallpaperHouse_MapScripts +27:4B04 BaadonWallpaperHouse_MapEvents +27:4B6D BaadonHouse2_Blocks +27:4B82 BaadonHouse2_Unk +27:4B81 BaadonHouse2_MapScripts +27:4B4D BaadonHouse2_MapEvents +27:4C02 BaadonLeague1F_Blocks +27:4C23 BaadonLeague1F_Unk +27:4C22 BaadonLeague1F_MapScripts +27:4BA7 BaadonLeague1F_MapEvents +27:4C95 BaadonLeague2F_Blocks +27:4CC3 BaadonLeague2F_Unk +27:4CC2 BaadonLeague2F_MapScripts +27:4C48 BaadonLeague2F_MapEvents +27:4D09 BaadonRouteGateWest_Blocks +27:4D1E BaadonRouteGateWest_Unk +27:4D1D BaadonRouteGateWest_MapScripts +27:4CE8 BaadonRouteGateWest_MapEvents +27:4D64 BaadonRouteGateNewtype_Blocks +27:4D79 BaadonRouteGateNewtype_Unk +27:4D78 BaadonRouteGateNewtype_MapScripts +27:4D43 BaadonRouteGateNewtype_MapEvents +27:4DEC NewtypePokecenter1F_Blocks +27:4E0D NewtypePokecenter1F_Unk +27:4E0C NewtypePokecenter1F_MapScripts +27:4D9E NewtypePokecenter1F_MapEvents +27:4E65 NewtypePokecenter2F_Blocks +27:4E86 NewtypePokecenter2F_Unk +27:4E85 NewtypePokecenter2F_MapScripts +27:4E32 NewtypePokecenter2F_MapEvents +27:4F06 NewtypeLeague1F_Blocks +27:4F27 NewtypeLeague1F_Unk +27:4F26 NewtypeLeague1F_MapScripts +27:4EAB NewtypeLeague1F_MapEvents +27:4F99 NewtypeLeague2F_Blocks +27:4FC7 NewtypeLeague2F_Unk +27:4FC6 NewtypeLeague2F_MapScripts +27:4F4C NewtypeLeague2F_MapEvents +27:500C NewtypeSailorHouse_Blocks +27:5021 NewtypeSailorHouse_Unk +27:5020 NewtypeSailorHouse_MapScripts +27:4FEC NewtypeSailorHouse_MapEvents +27:5080 NewtypeMart_Blocks +27:50A1 NewtypeMart_Unk +27:50A0 NewtypeMart_MapScripts +27:5046 NewtypeMart_MapEvents +27:511A NewtypeDojo_Blocks +27:513B NewtypeDojo_Unk +27:513A NewtypeDojo_MapScripts +27:50C6 NewtypeDojo_MapEvents +27:5180 NewtypeHouse1_Blocks +27:5195 NewtypeHouse1_Unk +27:5194 NewtypeHouse1_MapScripts +27:5160 NewtypeHouse1_MapEvents +27:5201 NewtypeDiner_Blocks +27:5212 NewtypeDiner_Unk +27:5211 NewtypeDiner_MapScripts +27:51BA NewtypeDiner_MapEvents +27:5257 NewtypeHouse2_Blocks +27:526C NewtypeHouse2_Unk +27:526B NewtypeHouse2_MapScripts +27:5237 NewtypeHouse2_MapEvents +27:52B1 NewtypeHouse3_Blocks +27:52C6 NewtypeHouse3_Unk +27:52C5 NewtypeHouse3_MapScripts +27:5291 NewtypeHouse3_MapEvents +27:5339 Route15Pokecenter1F_Blocks +27:535A Route15Pokecenter1F_Unk +27:5359 Route15Pokecenter1F_MapScripts +27:52EB Route15Pokecenter1F_MapEvents +27:538B Route15Pokecenter2F_Blocks +27:53AC Route15Pokecenter2F_Unk +27:53AB Route15Pokecenter2F_MapScripts +27:537F Route15Pokecenter2F_MapEvents +27:53F2 NewtypeRouteGate_Blocks +27:5407 NewtypeRouteGate_Unk +27:5406 NewtypeRouteGate_MapScripts +27:53D1 NewtypeRouteGate_MapEvents +27:547A Route18Pokecenter1F_Blocks +27:549B Route18Pokecenter1F_Unk +27:549A Route18Pokecenter1F_MapScripts +27:542C Route18Pokecenter1F_MapEvents +27:54CC Route18Pokecenter2F_Blocks +27:54ED Route18Pokecenter2F_Unk +27:54EC Route18Pokecenter2F_MapScripts +27:54C0 Route18Pokecenter2F_MapEvents +27:5533 SugarRouteGate_Blocks +27:5548 SugarRouteGate_Unk +27:5547 SugarRouteGate_MapScripts +27:5512 SugarRouteGate_MapEvents +27:55A7 SugarHouse_Blocks +27:55C8 SugarHouse_Unk +27:55C7 SugarHouse_MapScripts +27:556D SugarHouse_MapEvents +27:560D SugarHouse2_Blocks +27:561E SugarHouse2_Unk +27:561D SugarHouse2_MapScripts +27:55ED SugarHouse2_MapEvents +27:567D SugarMart_Blocks +27:569E SugarMart_Unk +27:569D SugarMart_MapScripts +27:5643 SugarMart_MapEvents +27:5711 SugarPokecenter1F_Blocks +27:5732 SugarPokecenter1F_Unk +27:5731 SugarPokecenter1F_MapScripts +27:56C3 SugarPokecenter1F_MapEvents +27:578A SugarPokecenter2F_Blocks +27:57AB SugarPokecenter2F_Unk +27:57AA SugarPokecenter2F_MapScripts +27:5757 SugarPokecenter2F_MapEvents +27:57F0 BullForestRoute1House_Blocks +27:5805 BullForestRoute1House_Unk +27:5804 BullForestRoute1House_MapScripts +27:57D0 BullForestRoute1House_MapEvents +27:584B BullForestRouteGateStand_Blocks +27:5860 BullForestRouteGateStand_Unk +27:585F BullForestRouteGateStand_MapScripts +27:582A BullForestRouteGateStand_MapEvents +27:58BF BullMart_Blocks +27:58E0 BullMart_Unk +27:58DF BullMart_MapScripts +27:5885 BullMart_MapEvents +27:5925 BullHouse1_Blocks +27:5936 BullHouse1_Unk +27:5935 BullHouse1_MapScripts +27:5905 BullHouse1_MapEvents +27:597B BullHouse2_Blocks +27:5990 BullHouse2_Unk +27:598F BullHouse2_MapScripts +27:595B BullHouse2_MapEvents +27:59D5 BullHouse3_Blocks +27:59EA BullHouse3_Unk +27:59E9 BullHouse3_MapScripts +27:59B5 BullHouse3_MapEvents +27:5A5D BullPokecenter1F_Blocks +27:5A7E BullPokecenter1F_Unk +27:5A7D BullPokecenter1F_MapScripts +27:5A0F BullPokecenter1F_MapEvents +27:5AD6 BullPokecenter2F_Blocks +27:5AF7 BullPokecenter2F_Unk +27:5AF6 BullPokecenter2F_MapScripts +27:5AA3 BullPokecenter2F_MapEvents +27:5B77 BullLeague1F_Blocks +27:5B98 BullLeague1F_Unk +27:5B97 BullLeague1F_MapScripts +27:5B1C BullLeague1F_MapEvents +27:5C0A BullLeague2F_Blocks +27:5C38 BullLeague2F_Unk +27:5C37 BullLeague2F_MapScripts +27:5BBD BullLeague2F_MapEvents +27:5C70 BullHouse4_Blocks +27:5C85 BullHouse4_Unk +27:5C84 BullHouse4_MapScripts +27:5C5D BullHouse4_MapEvents +27:5CCB StandRouteGateKanto_Blocks +27:5CE0 StandRouteGateKanto_Unk +27:5CDF StandRouteGateKanto_MapScripts +27:5CAA StandRouteGateKanto_MapEvents +27:5D25 StandLab_Blocks +27:5D36 StandLab_Unk +27:5D35 StandLab_MapScripts +27:5D05 StandLab_MapEvents +27:5DA9 StandPokecenter1F_Blocks +27:5DCA StandPokecenter1F_Unk +27:5DC9 StandPokecenter1F_MapScripts +27:5D5B StandPokecenter1F_MapEvents +27:5E22 StandPokecenter2F_Blocks +27:5E43 StandPokecenter2F_Unk +27:5E42 StandPokecenter2F_MapScripts +27:5DEF StandPokecenter2F_MapEvents +27:5EA2 StandOffice_Blocks +27:5EC3 StandOffice_Unk +27:5EC2 StandOffice_MapScripts +27:5E68 StandOffice_MapEvents +27:5F22 StandMart_Blocks +27:5F43 StandMart_Unk +27:5F42 StandMart_MapScripts +27:5EE8 StandMart_MapEvents +27:5F88 StandHouse_Blocks +27:5F9D StandHouse_Unk +27:5F9C StandHouse_MapScripts +27:5F68 StandHouse_MapEvents +27:5FE9 StandRocketHouse1F_Blocks +27:600A StandRocketHouse1F_Unk +27:6009 StandRocketHouse1F_MapScripts +27:5FC2 StandRocketHouse1F_MapEvents +27:6048 StandRocketHouse2F_Blocks +27:6069 StandRocketHouse2F_Unk +27:6068 StandRocketHouse2F_MapScripts +27:602F StandRocketHouse2F_MapEvents +27:60E9 StandLeague1F_Blocks +27:610A StandLeague1F_Unk +27:6109 StandLeague1F_MapScripts +27:608E StandLeague1F_MapEvents +27:617C StandLeague2F_Blocks +27:61AA StandLeague2F_Unk +27:61A9 StandLeague2F_MapScripts +27:612F StandLeague2F_MapEvents +27:61EF KantoCeruleanHouse_Blocks +27:6204 KantoCeruleanHouse_Unk +27:6203 KantoCeruleanHouse_MapScripts +27:61CF KantoCeruleanHouse_MapEvents +27:6277 KantoPokecenter1F_Blocks +27:6298 KantoPokecenter1F_Unk +27:6297 KantoPokecenter1F_MapScripts +27:6229 KantoPokecenter1F_MapEvents +27:62F0 KantoPokecenter2F_Blocks +27:6311 KantoPokecenter2F_Unk +27:6310 KantoPokecenter2F_MapScripts +27:62BD KantoPokecenter2F_MapEvents +27:6391 KantoLeague1F_Blocks +27:63B2 KantoLeague1F_Unk +27:63B1 KantoLeague1F_MapScripts +27:6336 KantoLeague1F_MapEvents +27:6424 KantoLeague2F_Blocks +27:6452 KantoLeague2F_Unk +27:6451 KantoLeague2F_MapScripts +27:63D7 KantoLeague2F_MapEvents +27:64A4 KantoLavenderHouse_Blocks +27:64B9 KantoLavenderHouse_Unk +27:64B8 KantoLavenderHouse_MapScripts +27:6477 KantoLavenderHouse_MapEvents +27:650C KantoCeladonMart1F_Blocks +27:652D KantoCeladonMart1F_Unk +27:652C KantoCeladonMart1F_MapScripts +27:64DE KantoCeladonMart1F_MapEvents +27:6586 KantoCeladonMart2F_Blocks +27:65A7 KantoCeladonMart2F_Unk +27:65A6 KantoCeladonMart2F_MapScripts +27:6552 KantoCeladonMart2F_MapEvents +27:6600 KantoCeladonMart3F_Blocks +27:6621 KantoCeladonMart3F_Unk +27:6620 KantoCeladonMart3F_MapScripts +27:65CC KantoCeladonMart3F_MapEvents +27:6687 KantoCeladonMart4F_Blocks +27:66A8 KantoCeladonMart4F_Unk +27:66A7 KantoCeladonMart4F_MapScripts +27:6646 KantoCeladonMart4F_MapEvents +27:6707 KantoCeladonMart5F_Blocks +27:6728 KantoCeladonMart5F_Unk +27:6727 KantoCeladonMart5F_MapScripts +27:66CD KantoCeladonMart5F_MapEvents +27:6760 KantoCeladonElevator_Blocks +27:6765 KantoCeladonElevator_Unk +27:6764 KantoCeladonElevator_MapScripts +27:674D KantoCeladonElevator_MapEvents +27:67C4 KantoMart_Blocks +27:67E5 KantoMart_Unk +27:67E4 KantoMart_MapScripts +27:678A KantoMart_MapEvents +27:6866 KantoGamefreakHQ1_Blocks +27:687F KantoGamefreakHQ1_Unk +27:687E KantoGamefreakHQ1_MapScripts +27:680A KantoGamefreakHQ1_MapEvents +27:68D2 KantoGamefreakHQ2_Blocks +27:68EB KantoGamefreakHQ2_Unk +27:68EA KantoGamefreakHQ2_MapScripts +27:68A4 KantoGamefreakHQ2_MapEvents +27:6958 KantoGamefreakHQ3_Blocks +27:6971 KantoGamefreakHQ3_Unk +27:6970 KantoGamefreakHQ3_MapScripts +27:6910 KantoGamefreakHQ3_MapEvents +27:69B0 KantoGamefreakHQ4_Blocks +27:69C9 KantoGamefreakHQ4_Unk +27:69C8 KantoGamefreakHQ4_MapScripts +27:6996 KantoGamefreakHQ4_MapEvents +27:6A01 KantoGamefreakHQ5_Blocks +27:6A12 KantoGamefreakHQ5_Unk +27:6A11 KantoGamefreakHQ5_MapScripts +27:69EE KantoGamefreakHQ5_MapEvents +27:6A64 KantoSilphCo_Blocks +27:6AC5 KantoSilphCo_Unk +27:6AC4 KantoSilphCo_MapScripts +27:6A37 KantoSilphCo_MapEvents +27:6B17 KantoViridianHouse_Blocks +27:6B2C KantoViridianHouse_Unk +27:6B2B KantoViridianHouse_MapScripts +27:6AEA KantoViridianHouse_MapEvents +27:6BF4 KantoGameCorner_Blocks +27:6C3B KantoGameCorner_Unk +27:6C3A KantoGameCorner_MapScripts +27:6B51 KantoGameCorner_MapEvents +27:6C65 KantoUnusedArea_Blocks +27:6C76 KantoUnusedArea_Unk +27:6C75 KantoUnusedArea_MapScripts +27:6C60 KantoUnusedArea_MapEvents +27:6CD5 KantoGameCornerPrizes_Blocks +27:6CEA KantoGameCornerPrizes_Unk +27:6CE9 KantoGameCornerPrizes_MapScripts +27:6C9B KantoGameCornerPrizes_MapEvents +27:6D22 KantoDiner_Blocks +27:6D37 KantoDiner_Unk +27:6D36 KantoDiner_MapScripts +27:6D0F KantoDiner_MapEvents +27:6DB0 KantoSchool_Blocks +27:6DD1 KantoSchool_Unk +27:6DD0 KantoSchool_MapScripts +27:6D5C KantoSchool_MapEvents +27:6E30 KantoHospital_Blocks +27:6E51 KantoHospital_Unk +27:6E50 KantoHospital_MapScripts +27:6DF6 KantoHospital_MapEvents +27:6EC4 KantoPokecenter21F_Blocks +27:6EE5 KantoPokecenter21F_Unk +27:6EE4 KantoPokecenter21F_MapScripts +27:6E76 KantoPokecenter21F_MapEvents +27:6F3D KantoPokecenter22F_Blocks +27:6F5E KantoPokecenter22F_Unk +27:6F5D KantoPokecenter22F_MapScripts +27:6F0A KantoPokecenter22F_MapEvents +27:6FB0 KantoRedsHouse_Blocks +27:6FC5 KantoRedsHouse_Unk +27:6FC4 KantoRedsHouse_MapScripts +27:6F83 KantoRedsHouse_MapEvents +27:7011 KantoGreensHouse1F_Blocks +27:7022 KantoGreensHouse1F_Unk +27:7021 KantoGreensHouse1F_MapScripts +27:6FEA KantoGreensHouse1F_MapEvents +27:7053 KantoGreensHouse2F_Blocks +27:7064 KantoGreensHouse2F_Unk +27:7063 KantoGreensHouse2F_MapScripts +27:7047 KantoGreensHouse2F_MapEvents +27:70B6 KantoEldersHouse_Blocks +27:70CB KantoEldersHouse_Unk +27:70CA KantoEldersHouse_MapScripts +27:7089 KantoEldersHouse_MapEvents +27:7110 KantoOaksLab_Blocks +27:7121 KantoOaksLab_Unk +27:7120 KantoOaksLab_MapScripts +27:70F0 KantoOaksLab_MapEvents +27:71A1 KantoLeague21F_Blocks +27:71C2 KantoLeague21F_Unk +27:71C1 KantoLeague21F_MapScripts +27:7146 KantoLeague21F_MapEvents +27:7234 KantoLeague22F_Blocks +27:7262 KantoLeague22F_Unk +27:7261 KantoLeague22F_MapScripts +27:71E7 KantoLeague22F_MapEvents +27:72A7 KantoFishingGuru_Blocks +27:72BC KantoFishingGuru_Unk +27:72BB KantoFishingGuru_MapScripts +27:7287 KantoFishingGuru_MapEvents +27:7301 SouthHouse1_Blocks +27:7316 SouthHouse1_Unk +27:7315 SouthHouse1_MapScripts +27:72E1 SouthHouse1_MapEvents +27:7389 SouthPokecenter1F_Blocks +27:73AA SouthPokecenter1F_Unk +27:73A9 SouthPokecenter1F_MapScripts +27:733B SouthPokecenter1F_MapEvents +27:7402 SouthPokecenter2F_Blocks +27:7423 SouthPokecenter2F_Unk +27:7422 SouthPokecenter2F_MapScripts +27:73CF SouthPokecenter2F_MapEvents +27:7482 SouthMart_Blocks +27:74A3 SouthMart_Unk +27:74A2 SouthMart_MapScripts +27:7448 SouthMart_MapEvents +27:74E8 SouthHouse2_Blocks +27:74FD SouthHouse2_Unk +27:74FC SouthHouse2_MapScripts +27:74C8 SouthHouse2_MapEvents +27:7542 NorthHouse1_Blocks +27:7557 NorthHouse1_Unk +27:7556 NorthHouse1_MapScripts +27:7522 NorthHouse1_MapEvents +27:75B6 NorthMart_Blocks +27:75D7 NorthMart_Unk +27:75D6 NorthMart_MapScripts +27:757C NorthMart_MapEvents +27:761C NorthHouse2_Blocks +27:7631 NorthHouse2_Unk +27:7630 NorthHouse2_MapScripts +27:75FC NorthHouse2_MapEvents +27:76A4 NorthPokecenter1F_Blocks +27:76C5 NorthPokecenter1F_Unk +27:76C4 NorthPokecenter1F_MapScripts +27:7656 NorthPokecenter1F_MapEvents +27:771D NorthPokecenter2F_Blocks +27:773E NorthPokecenter2F_Unk +27:773D NorthPokecenter2F_MapScripts +27:76EA NorthPokecenter2F_MapEvents +2F:4010 PowerPlant1_Blocks +2F:406B PowerPlant1_Unk +2F:406A PowerPlant1_MapScripts +2F:400B PowerPlant1_MapEvents +2F:408D PowerPlant2_Blocks +2F:40E8 PowerPlant2_Unk +2F:40E7 PowerPlant2_MapScripts +2F:4088 PowerPlant2_MapEvents +2F:410A PowerPlant3_Blocks +2F:4219 PowerPlant3_Unk +2F:4218 PowerPlant3_MapScripts +2F:4105 PowerPlant3_MapEvents +2F:423B PowerPlant4_Blocks +2F:434A PowerPlant4_Unk +2F:4349 PowerPlant4_MapScripts +2F:4236 PowerPlant4_MapEvents +2F:436C RuinsOfAlphEntrance_Blocks +2F:43C7 RuinsOfAlphEntrance_Unk +2F:43C6 RuinsOfAlphEntrance_MapScripts +2F:4367 RuinsOfAlphEntrance_MapEvents +2F:43E9 RuinsOfAlphMain_Blocks +2F:468D RuinsOfAlphMain_Unk +2F:468C RuinsOfAlphMain_MapScripts +2F:43E4 RuinsOfAlphMain_MapEvents +2F:46AF CaveMinecarts1_Blocks +2F:4818 CaveMinecarts1_Unk +2F:4817 CaveMinecarts1_MapScripts +2F:46AA CaveMinecarts1_MapEvents +2F:483A CaveMinecarts2_Blocks +2F:49A3 CaveMinecarts2_Unk +2F:49A2 CaveMinecarts2_MapScripts +2F:4835 CaveMinecarts2_MapEvents +2F:49C5 CaveMinecarts3_Blocks +2F:4B2E CaveMinecarts3_Unk +2F:4B2D CaveMinecarts3_MapScripts +2F:49C0 CaveMinecarts3_MapEvents +2F:4B50 CaveMinecarts4_Blocks +2F:4CB9 CaveMinecarts4_Unk +2F:4CB8 CaveMinecarts4_MapScripts +2F:4B4B CaveMinecarts4_MapEvents +2F:4CDB CaveMinecarts5_Blocks +2F:4E44 CaveMinecarts5_Unk +2F:4E43 CaveMinecarts5_MapScripts +2F:4CD6 CaveMinecarts5_MapEvents +2F:4E66 CaveMinecarts6_Blocks +2F:4F1B CaveMinecarts6_Unk +2F:4F1A CaveMinecarts6_MapScripts +2F:4E61 CaveMinecarts6_MapEvents +2F:4F3D CaveMinecarts7_Blocks +2F:4FF2 CaveMinecarts7_Unk +2F:4FF1 CaveMinecarts7_MapScripts +2F:4F38 CaveMinecarts7_MapEvents +2F:5014 Office1_Blocks +2F:506F Office1_Unk +2F:506E Office1_MapScripts +2F:500F Office1_MapEvents +2F:5091 Office2_Blocks +2F:51A0 Office2_Unk +2F:519F Office2_MapScripts +2F:508C Office2_MapEvents +2F:51C2 Office3_Blocks +2F:5277 Office3_Unk +2F:5276 Office3_MapScripts +2F:51BD Office3_MapEvents +2F:5299 SlowpokeWellEntrance_Blocks +2F:52F4 SlowpokeWellEntrance_Unk +2F:52F3 SlowpokeWellEntrance_MapScripts +2F:5294 SlowpokeWellEntrance_MapEvents +2F:5316 SlowpokeWellMain_Blocks +2F:53CB SlowpokeWellMain_Unk +2F:53CA SlowpokeWellMain_MapScripts +2F:5311 SlowpokeWellMain_MapEvents +2F:5489 ShizukanaOka_Blocks +2F:5664 ShizukanaOka_Unk +2F:564B ShizukanaOka_MapScripts +2F:53E8 ShizukanaOka_MapEvents +34:402C RouteSilentEastGate_Blocks +34:4041 RouteSilentEastGate_Unk +34:4040 RouteSilentEastGate_MapScripts +34:400B RouteSilentEastGate_MapEvents +34:4088 PlayerHouse1F_Blocks +34:40CF PlayerHouse1F_Unk +34:409C PlayerHouse1F_MapScripts +34:404D PlayerHouse1F_MapEvents +34:4177 PlayerHouse2F_Blocks +34:419D PlayerHouse2F_Unk +34:418B PlayerHouse2F_MapScripts +34:413D PlayerHouse2F_MapEvents +34:4662 SilentPokecenter_Blocks +34:46BC SilentPokecenter_Unk +34:4682 SilentPokecenter_MapScripts +34:460A SilentPokecenter_MapEvents +34:4825 SilentHillHouse_Blocks +34:494C SilentHillHouse_Unk +34:4839 SilentHillHouse_MapScripts +34:47E0 SilentHillHouse_MapEvents +34:4B9C SilentHillLab_Blocks +34:4C48 SilentHillLab_Unk +34:4BBC SilentHillLab_MapScripts +34:4AB7 SilentHillLab_MapEvents +34:5C59 SilentHillLab2_Blocks +34:5CA1 SilentHillLab2_Unk +34:5C69 SilentHillLab2_MapScripts +34:5BF1 SilentHillLab2_MapEvents +34:6068 Unused13_Blocks +34:6089 Unused13_Unk +34:6078 Unused13_MapScripts +34:6068 Unused13_MapEvents +36:40B3 SilentHill_Blocks +36:78D5 SilentHill_Unk +36:7669 SilentHill_MapScripts +36:4043 SilentHill_MapEvents +36:4208 OldCity_Blocks +36:4000 OldCity_Unk +36:4370 OldCity_MapScripts +36:4130 OldCity_MapEvents +36:4468 West_Blocks +36:4000 West_Unk +36:45D0 West_MapScripts +36:4395 West_MapEvents +36:468E Haiteku_Blocks +36:4000 Haiteku_Unk +36:47F6 Haiteku_MapScripts +36:45E9 Haiteku_MapEvents +36:4897 Fonto_Blocks +36:4000 Fonto_Unk +36:48F1 Fonto_MapScripts +36:4827 Fonto_MapEvents +36:499D Baadon_Blocks +36:4000 Baadon_Unk +36:49F7 Baadon_MapScripts +36:4922 Baadon_MapEvents +36:4AD0 Newtype_Blocks +36:4000 Newtype_Unk +36:4C38 Newtype_MapScripts +36:4A28 Newtype_MapEvents +36:4CA9 Sugar_Blocks +36:4000 Sugar_Unk +36:4D03 Sugar_MapScripts +36:4C51 Sugar_MapEvents +36:4DBE BullForest_Blocks +36:4000 BullForest_Unk +36:4F26 BullForest_MapScripts +36:4D34 BullForest_MapEvents +36:5033 Stand_Blocks +36:4000 Stand_Unk +36:519B Stand_MapScripts +36:4F4B Stand_MapEvents +36:52C7 Kanto_Blocks +36:4000 Kanto_Unk +36:55F1 Kanto_MapScripts +36:51C0 Kanto_MapEvents +36:561B Prince_Blocks +36:4000 Prince_Unk +36:5675 Prince_MapScripts +36:5616 Prince_MapEvents +36:5693 MtFuji_Blocks +36:4000 MtFuji_Unk +36:56ED MtFuji_MapScripts +36:568E MtFuji_MapEvents +36:57AA South_Blocks +36:4000 South_Unk +36:5912 South_MapScripts +36:571E South_MapEvents +36:5983 North_Blocks +36:4000 North_Unk +36:59DD North_MapScripts +36:592B North_MapEvents +36:5A37 Route1P1_Blocks +36:7BAD Route1P1_Unk +36:7B98 Route1P1_MapScripts +36:5A02 Route1P1_MapEvents +36:5B20 Route1P2_Blocks +36:7C7B Route1P2_Unk +36:7C68 Route1P2_MapScripts +36:5AE1 Route1P2_MapEvents +36:5C3D Route2_Blocks +36:4000 Route2_Unk +36:5CC4 Route2_MapScripts +36:5BF7 Route2_MapEvents +36:5CEE HaitekuWestRoute_Blocks +36:4000 HaitekuWestRoute_Unk +36:5DCF HaitekuWestRoute_MapScripts +36:5CE9 HaitekuWestRoute_MapEvents +36:5E07 HaitekuWestRouteOcean_Blocks +36:4000 HaitekuWestRouteOcean_Unk +36:5F15 HaitekuWestRouteOcean_MapScripts +36:5DF4 HaitekuWestRouteOcean_MapEvents +36:5F46 FontoRoute1_Blocks +36:4000 FontoRoute1_Unk +36:6081 FontoRoute1_MapScripts +36:5F3A FontoRoute1_MapEvents +36:60AB FontoRoute6_Blocks +36:4000 FontoRoute6_Unk +36:61E6 FontoRoute6_MapScripts +36:60A6 FontoRoute6_MapEvents +36:6210 FontoRoute2_Blocks +36:4000 FontoRoute2_Unk +36:62C4 FontoRoute2_MapScripts +36:620B FontoRoute2_MapEvents +36:62FC FontoRoute4_Blocks +36:4000 FontoRoute4_Unk +36:63B0 FontoRoute4_MapScripts +36:62E9 FontoRoute4_MapEvents +36:63DA FontoRoute3_Blocks +36:4000 FontoRoute3_Unk +36:64BB FontoRoute3_MapScripts +36:63D5 FontoRoute3_MapEvents +36:64F3 BaadonRoute1_Blocks +36:4000 BaadonRoute1_Unk +36:6601 BaadonRoute1_MapScripts +36:64E0 BaadonRoute1_MapEvents +36:662B BaadonRoute2_Blocks +36:4000 BaadonRoute2_Unk +36:67ED BaadonRoute2_MapScripts +36:6626 BaadonRoute2_MapEvents +36:6825 BaadonRoute3_Blocks +36:4000 BaadonRoute3_Unk +36:68D9 BaadonRoute3_MapScripts +36:6812 BaadonRoute3_MapEvents +36:6934 Route15_Blocks +36:4000 Route15_Unk +36:69BB Route15_MapScripts +36:68FE Route15_MapEvents +36:69E5 NewtypeRoute_Blocks +36:4000 NewtypeRoute_Unk +36:6A6C NewtypeRoute_MapScripts +36:69E0 NewtypeRoute_MapEvents +36:6AAB Route18_Blocks +36:4000 Route18_Unk +36:6C6D Route18_MapScripts +36:6A91 Route18_MapEvents +36:6CAC BullForestRoute1_Blocks +36:4000 BullForestRoute1_Unk +36:6D8D BullForestRoute1_MapScripts +36:6C92 BullForestRoute1_MapEvents +36:6DC5 SugarRoute_Blocks +36:4000 SugarRoute_Unk +36:6ED3 SugarRoute_MapScripts +36:6DB2 SugarRoute_MapEvents +36:6F0B BullForestRoute2_Blocks +36:4000 BullForestRoute2_Unk +36:7019 BullForestRoute2_MapScripts +36:6EF8 BullForestRoute2_MapEvents +36:7051 StandRoute_Blocks +36:4000 StandRoute_Unk +36:715F StandRoute_MapScripts +36:703E StandRoute_MapEvents +36:7197 KantoEastRoute_Blocks +36:4000 KantoEastRoute_Unk +36:724B KantoEastRoute_MapScripts +36:7184 KantoEastRoute_MapEvents +36:727C RouteSilentEast_Blocks +36:4000 RouteSilentEast_Unk +36:738A RouteSilentEast_MapScripts +36:7270 RouteSilentEast_MapEvents +36:73B4 PrinceRoute_Blocks +36:4000 PrinceRoute_Unk +36:73E6 PrinceRoute_MapScripts +36:73AF PrinceRoute_MapEvents +36:7410 MtFujiRoute_Blocks +36:4000 MtFujiRoute_Unk +36:7442 MtFujiRoute_MapScripts +36:740B MtFujiRoute_MapEvents +36:747A FontoRoute5_Blocks +36:4000 FontoRoute5_Unk +36:752E FontoRoute5_MapScripts +36:7467 FontoRoute5_MapEvents +36:7558 BullForestRoute3_Blocks +36:4000 BullForestRoute3_Unk +36:7666 BullForestRoute3_MapScripts +36:7553 BullForestRoute3_MapEvents @@ -1,15 +1,15 @@ INCLUDE "constants.asm" -SECTION "Sprite Buffers", SRAM, BANK[0] +SECTION "Sprite Buffers", SRAM, BANK[$00] sSpriteBuffer0:: ds SPRITEBUFFERSIZE ; a000 sSpriteBuffer1:: ds SPRITEBUFFERSIZE ; a188 sSpriteBuffer2:: ds SPRITEBUFFERSIZE ; a310 -SECTION "Unknown, bank 0", SRAM[$A600],BANK[0] +SECTION "Unknown, bank 0", SRAM[$A600], BANK[$00] s0_a600:: ; TODO: properly label this ds 7 ; TODO: figure out exact size -SECTION "Window Stack Top", SRAM[$BFFE], BANK[0] +SECTION "Window Stack Top", SRAM[$BFFE], BANK[$00] sWindowStackTop:: dw diff --git a/tools/tests/charmap.asm b/tools/tests/charmap.asm index 228bb6b..70e228c 100644 --- a/tools/tests/charmap.asm +++ b/tools/tests/charmap.asm @@ -101,7 +101,7 @@ charmap "<RIVAL>", $53 ; wRivalName charmap "#", $54 ; "POKé" charmap "<CONT>", $55 - charmap "<……>", $56 ; "……" + charmap "<⋯⋯>", $56 ; "⋯⋯" charmap "<DONE>", $57 charmap "<PROMPT>", $58 charmap "<TARGET>", $59 @@ -137,7 +137,7 @@ charmap "『", $72 charmap "』", $73 charmap "・", $74 - charmap "…", $75 + charmap "⋯", $75 charmap "ぁ", $76 charmap "ぇ", $77 @@ -1,6 +1,6 @@ INCLUDE "constants.asm" -SECTION "VRAM", VRAM[$8000],BANK[0] ; Get around a RGBLINK bug. Remove this when it doesn't yield an error about fixing the section +SECTION "VRAM", VRAM[$8000], BANK[$00] ; Get around a RGBLINK bug. Remove this when it doesn't yield an error about fixing the section UNION @@ -54,7 +54,9 @@ wMusicFade:: ; c1a5 ; $00 = none (default) db wMusicFadeCount:: db ; c1a6 -wMusicFadeID:: dw ; c1a7 +wMusicFadeID:: +wMusicFadeIDLow:: db ; c1a7 +wMusicFadeIDHigh:: db ; c1a8 ds 2 ; TODO @@ -108,15 +110,14 @@ wMapScriptNumber:: db ; c5e8 wMapScriptNumberLocation:: dw ; c5e9 wUnknownMapPointer:: dw ; c5eb ; TODO wc5ed:: db ; c5ed - ds 18 ; TODO + ds 18 wMapBufferEnd:: ; c600 UNION -wOverworldMap:: ; c600 - ds $514 ; TODO: constantify this -wOverworldMapEnd:: ; cb14 +wOverworldMapBlocks:: ds 1300 ; c600 +wOverworldMapBlocksEnd:: ; cb14 NEXTU @@ -184,8 +185,12 @@ wEnemyMonNickname:: ds 6 ; c9fc wPlayerSubStatus3:: db ; ca3d ds $4 wEnemySubStatus3:: db ; ca42 -; ca43 - ds $14 + +wca43:: db ; ca43 + +wca44:: db ; ca44 + + ds $12 wTrainerClass:: ; ca57 db ; ca58 @@ -252,7 +257,7 @@ wVBCopyFarSize:: ds 1 ; cb71 wVBCopyFarSrc:: ds 2 ; cb72 wVBCopyFarDst:: ds 2 ; cb74 wVBCopyFarSrcBank:: ds 1 ; cb76 -wcb77:: db ; cb77 +wPlayerMovement:: db ; cb77 wMovementObject:: db ; cb78 ptrba wMovementData ; cb79 @@ -343,7 +348,10 @@ wMovementBufferObject:: db ; cc3b wMovementBuffer:: ; cc3f ds 55 -SECTION "CC9C", WRAM0[$CC9C] +SECTION "CC9A", WRAM0[$CC9A] + +wSkatingDirection:: db ; cc9a +wCompanionCollisionFrameCounter:: db ; cc9b wUnknownWordcc9c:: ; cc9c dw @@ -438,6 +446,8 @@ wVramState:: db ; cd59 ds 3 ; TODO wcd5d:: db ; cd5d + db +wChosenStarter:: db ; cd5f SECTION "CD72", WRAM0[$CD72] wcd72:: dw ; cd72 @@ -459,14 +469,16 @@ wItemQuantity:: db ; cd7d wItemQuantityBuffer:: db ; cd7e SECTION "CD9E", WRAM0 [$CD9E] +wcd9e:: db ; cd9e -wcd9e:: - db +SECTION "CDAF", WRAM0 [$CDAF] +wcdaf:: db ; cdaf SECTION "CDB0", WRAM0 [$CDB0] -wcdb0:: ; bit 0 = has engaged NPC in dialogue (?) - db - +wTalkingTargetType:: db ; cdb0 +;bit 0 = has engaged NPC in dialogue +;bit 1 = has engaged sign in dialogue + SECTION "CDBA", WRAM0[$CDBA] wItemAttributeParamBuffer:: db ; cdba @@ -505,13 +517,18 @@ wcdca:: db ; cdca wHPBarHPDifference:: dw ; cdcb wLinkBattleRNs:: ds 10 ; cdcd + +wcdd7:: db ; cdd7 ; cddd SECTION "CE00", WRAM0[$CE00] -wBattleMode:: ; ce00 +wBattleMode:: db ; ce00 db +wce02:: db ; ce02 + ds 2 +wce05:: db ; ce05 SECTION "CE07", WRAM0[$CE07] @@ -585,6 +602,7 @@ wce2e:: ; ce2e SECTION "CE37", WRAM0[$CE37] wNamedObjectIndexBuffer:: +wCountSetBitsResult:: wce37:: ; ce37 db @@ -606,25 +624,25 @@ wTimeOfDay:: db ; ce3d SECTION "CE5F", WRAM0[$CE5F] -wce5f:: ; ce5f ; TODO +wce5f:: ; ce5f ; debug menu writes $41 to it db -SECTION "CE61", WRAM0[$CE61] +wce60:: ; ce60 + db ; main menu checks this, maybe states if there's a save present? wActiveFrame:: db ; ce61 wTextBoxFlags:: db ; ce62 -wce63:: db ; ce63 -; 76543210 -; \-- global debug enable +wDebugFlags:: db ; ce63 +; Bit 0: Debug battle indicator +; Bit 1: Debug field indicator +; Bit 2-3: Game is continued (set when selecting continue on the main menu) ds 3 -wPlayerName:: db ; ce67 +wPlayerName:: ds 6 ; ce67 - -SECTION "Mom's Name", WRAM0[$CE6D] wMomsName:: ds 6 ; ce6d SECTION "CE7F", WRAM0[$CE76] @@ -712,7 +730,19 @@ wTimeOfDayPalset:: db ; d158 wCurTimeOfDay:: db ; d159 -SECTION "D165", WRAM0[$D165] +SECTION "D15D", WRAM0[$D15D] + +wd15d:: db ; d15d + +wd15e:: db ; d15e + +wd15f:: db ; d15f + +SECTION "D163", WRAM0[$D163] + +wd163:: db ; d163 + +wd164:: db ; d164 wTMsHMs:: db ; d165 @@ -731,12 +761,38 @@ wNumBallItems:: db ; d1de wBallQuantities:: db ; d1df SECTION "Rival's Name", WRAM0[$D258] -wRivalsName:: ds 6 ; d258 +wRivalName:: ds 6 ; d258 + ds 6 -SECTION "PlayerState", WRAM0[$D264] wPlayerState:: db ; d264 +; 00 - walking +; 01 - bicycle +; 02 - skateboard +; 04 - surfing + +wd265:: db ; d265 +wd266:: db ; d266 + +SECTION "D29A", WRAM0[$D29A] +wd29a:: db ; d29a +wd29b:: db ; d29b + db ; d29c +wd29d:: db ; d29d + db + db +wd2a0:: db ; d2a0 + +SECTION "D39D", WRAM0[$D39D] +wd39d:: db -SECTION "D4AB", WRAM0[$D4A9] +SECTION "Game Event Flags", WRAM0[$D41A] +wd41a:: db +wd41b:: db +wd41c:: db +wd41d:: db +wd41e:: db + +SECTION "D4A9", WRAM0[$D4A9] wd4a9:: db ; d4a9 ds 1 ; TODO @@ -744,7 +800,7 @@ wJoypadFlags:: db ; d4ab ; 76543210 ; ||||\__/ ; |||| \-- unkn -; |||\----- unkn +; |||\----- set for rival intro textbox ; ||\------ don't wait for keypress to close text box ; |\------- joypad sync mtx ; \-------- joypad disabled @@ -775,10 +831,15 @@ ENDR wCurrMapObjectCount:: ; d5f6 db + +wCurrMapInlineTrainers:: ; d5f7 +REPT 32 ; TODO: confirm this + ds 2 ; inline trainers. each pair of bytes is direction, distance +ENDR SECTION "D637", WRAM0[$D637] -wd637:: db ; d637 -wd638:: db ; d638 +wd637:: db ; d637 ;OW battle state? $3 wild battle, $8 is trainer battle $4 is left battle, $B is load overworld? $0 is in overworld +wd638:: db ; d638 ;wd637's last written-to value SECTION "Used sprites", WRAM0[$D643] @@ -802,11 +863,11 @@ wOverworldMapAnchor:: ; d658 wYCoord:: db ; d65a wXCoord:: db ; d65b -wMetatileStandingY:: db ; d65c -wMetatileStandingX:: db ; d65d +wMetatileNextY:: db ; d65c +wMetatileNextX:: db ; d65d -; d65f - ds 1 ; TODO +wd65e:: ; d65e + db wMapPartial:: ; d65f wMapAttributesBank:: ; d65f @@ -887,7 +948,7 @@ wAnnonDex:: ds 26 ; d85a wAnnonID:: ds 1 ; d874 - + SECTION "Wild mon buffer", WRAM0[$D91B] wWildMons:: ; d91b |