diff options
| -rw-r--r-- | audio/engine.asm | 26 | ||||
| -rw-r--r-- | constants.asm | 1 | ||||
| -rw-r--r-- | constants/menu_constants.asm | 97 | ||||
| -rw-r--r-- | constants/misc_constants.asm | 6 | ||||
| -rw-r--r-- | constants/tileset_constants.asm | 56 | ||||
| -rw-r--r-- | data/maps/maps.asm | 456 | ||||
| -rw-r--r-- | data/predef_pointers.inc | 166 | ||||
| -rw-r--r-- | engine/battle_anims/bg_effects.asm | 144 | ||||
| -rw-r--r-- | home/copy2.asm | 17 | ||||
| -rw-r--r-- | home/fade.asm | 95 | ||||
| -rw-r--r-- | home/init.asm | 14 | ||||
| -rw-r--r-- | home/joypad.asm | 10 | ||||
| -rw-r--r-- | home/menu.asm | 456 | ||||
| -rw-r--r-- | home/print_text.asm | 51 | ||||
| -rw-r--r-- | home/rtc.asm | 20 | ||||
| -rw-r--r-- | home/serial.asm | 299 | ||||
| -rw-r--r-- | home/text.asm | 366 | ||||
| -rw-r--r-- | home/time.asm | 138 | ||||
| -rw-r--r-- | home/unknown.asm | 15 | ||||
| -rw-r--r-- | home/vcopy.asm | 2 | ||||
| -rw-r--r-- | home/window.asm | 23 | ||||
| -rw-r--r-- | hram.asm | 12 | ||||
| -rw-r--r-- | macros/farcall.asm | 12 | ||||
| -rw-r--r-- | shim.sym | 432 | ||||
| -rw-r--r-- | sram.asm | 3 | ||||
| -rw-r--r-- | wram.asm | 66 |
26 files changed, 2289 insertions, 694 deletions
diff --git a/audio/engine.asm b/audio/engine.asm index 0d1d065..8d66a08 100644 --- a/audio/engine.asm +++ b/audio/engine.asm @@ -74,7 +74,7 @@ _UpdateSound:: ; 3a:4037 cp NUM_CHANNELS jr nz, .loop - call Function_e82f0 + call Functione82f0 ret UpdateChannel: ; 3a:4061 @@ -94,10 +94,10 @@ UpdateChannel: ; 3a:4061 .noteover call DisablePitchWheel - call Function_e884f + call Functione884f .continue_sound_update - call Function_e80b6 + call Functione80b6 ret DisablePitchWheel: ; 3a:4061 @@ -106,7 +106,7 @@ DisablePitchWheel: ; 3a:4061 res SOUND_PITCH_WHEEL, [hl] ret -Unreferenced_Function_e8081: ; 3a:4081 +Unreferenced_Functione8081: ; 3a:4081 ld a, [wMapMusic] bit 0, a jr nz, .disable_music @@ -153,7 +153,7 @@ GetChannelRegisters: ; 3a:40a4 .registers db LOW(rNR10), LOW(rNR20), LOW(rNR30), LOW(rNR40) -Function_e80b6: ; 3a:40b6 +Functione80b6: ; 3a:40b6 ld hl, CHANNEL_DUTY_CYCLE add hl, bc ld a, [hl] @@ -172,13 +172,13 @@ Function_e80b6: ; 3a:40b6 ld [wCurTrackFrequency + 1], a ld a, $3f ld [wc195], a - call Function_e85d8 - call Function_e87f9 - call Function_e8839 + call Functione85d8 + call Functione87f9 + call Functione8839 call IsChannelSFXOn jr nc, .end - call Function_e80fa + call Functione80fa ld hl, CHANNEL_TRACKS add hl, bc ld a, [wSoundOutput] @@ -192,7 +192,7 @@ Function_e80b6: ; 3a:40b6 ld [hl], a ret -Function_e80fa: ; 3a:40fa +Functione80fa: ; 3a:40fa ld hl, .jumptable ld a, [wCurChannel] maskbits NUM_CHANNELS @@ -249,12 +249,12 @@ IsAnySFXOn: ; 3a:42d0 scf ret -SECTION "Function_e82f0", ROMX[$42f0], BANK[$3a] -Function_e82f0: ; 3a:42f0 +SECTION "Functione82f0", ROMX[$42f0], BANK[$3a] +Functione82f0: ; 3a:42f0 call IncrementTempo call PlayDanger call FadeMusic - call Function_e841d + call Functione841d ld a, [wVolume] ld [rNR50], a ld a, [wSoundOutput] diff --git a/constants.asm b/constants.asm index fcd408f..cac62a5 100644 --- a/constants.asm +++ b/constants.asm @@ -30,3 +30,4 @@ INCLUDE "constants/serial_constants.asm" INCLUDE "constants/misc_constants.asm" INCLUDE "constants/battle_anim_constants.asm" +INCLUDE "constants/menu_constants.asm" diff --git a/constants/menu_constants.asm b/constants/menu_constants.asm new file mode 100644 index 0000000..46c6547 --- /dev/null +++ b/constants/menu_constants.asm @@ -0,0 +1,97 @@ +; MenuHeader flags + const_def + shift_const MENU_RESTORE_TILES ; Will be set if MENU_BACKUP_TILES(_2) is set. + shift_const MENU_UNUSED_1 + shift_const MENU_UNUSED_2 + shift_const MENU_NO_CLICK_SFX + shift_const MENU_SPRITE_ANIMS + shift_const MENU_UNUSED_3 + shift_const MENU_BACKUP_TILES + shift_const MENU_BACKUP_TILES_2 + +; VerticalMenu/DoNthMenu/SetUpMenu/_2DMenu MenuData flags +; Per flag the comment specifies which menus actually implement it + const_def + shift_const STATICMENU_DISABLE_B ; VerticalMenu/_2DMenu + shift_const STATICMENU_ENABLE_SELECT ; VerticalMenu/_2DMenu + shift_const STATICMENU_ENABLE_LEFT_RIGHT ; DoNthMenu/SetUpMenu + shift_const STATICMENU_ENABLE_START ; DoNthMenu/SetUpMenu + shift_const STATICMENU_PLACE_TITLE ; VerticalMenu + shift_const STATICMENU_WRAP ; All + shift_const STATICMENU_NO_TOP_SPACING ; VerticalMenu/_2DMenu + shift_const STATICMENU_CURSOR ; VerticalMenu/_2DMenu + +; ScrollingMenu MenuData flags + const_def + shift_const SCROLLINGMENU_CALL_FUNCTION1_CANCEL + shift_const SCROLLINGMENU_CALL_FUNCTION3_NO_SWITCH + shift_const SCROLLINGMENU_ENABLE_LEFT + shift_const SCROLLINGMENU_ENABLE_RIGHT + shift_const SCROLLINGMENU_DISPLAY_ARROWS + shift_const SCROLLINGMENU_ENABLE_FUNCTION3 + shift_const SCROLLINGMENU_ENABLE_START + shift_const SCROLLINGMENU_ENABLE_SELECT + + +; MonMenuOptions indexes (see data/mon_menu.asm) +; used by PokemonActionSubmenu (see engine/menus/start_menu.asm) + const_def 1 + ; moves + const MONMENUITEM_CUT ; 1 + const MONMENUITEM_FLY ; 2 + const MONMENUITEM_SURF ; 3 + const MONMENUITEM_STRENGTH ; 4 + const MONMENUITEM_WATERFALL ; 5 + const MONMENUITEM_FLASH ; 6 + const MONMENUITEM_WHIRLPOOL ; 7 + const MONMENUITEM_DIG ; 8 + const MONMENUITEM_TELEPORT ; 9 + const MONMENUITEM_SOFTBOILED ; 10 + const MONMENUITEM_HEADBUTT ; 11 + const MONMENUITEM_ROCKSMASH ; 12 + const MONMENUITEM_MILKDRINK ; 13 + const MONMENUITEM_SWEETSCENT ; 14 + ; options + const MONMENUITEM_STATS ; 15 + const MONMENUITEM_SWITCH ; 16 + const MONMENUITEM_ITEM ; 17 + const MONMENUITEM_CANCEL ; 18 + const MONMENUITEM_MOVE ; 19 + const MONMENUITEM_MAIL ; 20 + const MONMENUITEM_ERROR ; 21 + +; MonMenuOptions categories +MONMENU_FIELD_MOVE EQU 0 +MONMENU_MENUOPTION EQU 1 + +NUM_MONMENU_ITEMS EQU 8 + +; start/select menu return values +HMENURETURN_SCRIPT EQU %10000000 +HMENURETURN_ASM EQU %11111111 + + +; PartyMenuQualityPointers indexes (see data/party_menu_qualities.asm) + const_def + const PARTYMENUACTION_CHOOSE_POKEMON + const PARTYMENUACTION_HEALING_ITEM + const PARTYMENUACTION_SWITCH + const PARTYMENUACTION_TEACH_TMHM + const PARTYMENUACTION_MOVE + const PARTYMENUACTION_EVO_STONE + const PARTYMENUACTION_GIVE_MON + const PARTYMENUACTION_GIVE_MON_FEMALE ; unused + const PARTYMENUACTION_GIVE_ITEM + const PARTYMENUACTION_MOBILE ; mobile +; PrintPartyMenuActionText arguments (see engine/pokemon/party_menu.asm) + const_def $f0 + const PARTYMENUTEXT_HEAL_PSN + const PARTYMENUTEXT_HEAL_BRN + const PARTYMENUTEXT_HEAL_FRZ + const PARTYMENUTEXT_HEAL_SLP + const PARTYMENUTEXT_HEAL_PAR + const PARTYMENUTEXT_HEAL_HP + const PARTYMENUTEXT_HEAL_ALL + const PARTYMENUTEXT_REVIVE + const PARTYMENUTEXT_LEVEL_UP + const PARTYMENUTEXT_HEAL_CONFUSION diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 19deb8e..39f2769 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -21,4 +21,8 @@ D_UP EQU 1 << D_UP_F D_DOWN EQU 1 << D_DOWN_F BUTTONS EQU A_BUTTON | B_BUTTON | SELECT | START -D_PAD EQU D_RIGHT | D_LEFT | D_UP | D_DOWN
\ No newline at end of file +D_PAD EQU D_RIGHT | D_LEFT | D_UP | D_DOWN + +; Boolean values +FALSE EQU 0 +TRUE EQU 1 diff --git a/constants/tileset_constants.asm b/constants/tileset_constants.asm index aac5db4..3641989 100644 --- a/constants/tileset_constants.asm +++ b/constants/tileset_constants.asm @@ -1,31 +1,31 @@ ; Tilesets indexes ; TODO: Temporary placeholders const_def - const TILESET_00 - const TILESET_01 - const TILESET_02 - const TILESET_03 - const TILESET_04 - const TILESET_05 - const TILESET_06 - const TILESET_07 - const TILESET_08 - const TILESET_09 - const TILESET_0A - const TILESET_0B - const TILESET_0C - const TILESET_0D - const TILESET_0E - const TILESET_0F - const TILESET_10 - const TILESET_11 - const TILESET_12 - const TILESET_13 - const TILESET_14 - const TILESET_15 - const TILESET_16 - const TILESET_17 - const TILESET_18 - const TILESET_19 - const TILESET_1A - const TILESET_1B + const TILESET_SILENT_HILL + const TILESET_OLD_CITY + const TILESET_WEST + const TILESET_HAITEKU + const TILESET_BAADON + const TILESET_FONTO + const TILESET_BULL_FOREST + const TILESET_KANTO + const TILESET_SOUTH + const TILESET_HOUSE + const TILESET_LAB + const TILESET_JAPANESE_HOUSE + const TILESET_POKECENTER + const TILESET_MART + const TILESET_AQUARIUM + const TILESET_TOWER + const TILESET_BIG_MART + const TILESET_ROUTE_GATE + const TILESET_RADIO_TOWER + const TILESET_ROCKET_HOUSE + const TILESET_GYM + const TILESET_OFFICE + const TILESET_RUINS_OF_ALPH + const TILESET_CAVE + const TILESET_POWER_PLANT + const TILESET_SS_ANNE + const TILESET_SS_ANNE_DOCK + const TILESET_FOREST diff --git a/data/maps/maps.asm b/data/maps/maps.asm index 83f619d..28ba8f4 100644 --- a/data/maps/maps.asm +++ b/data/maps/maps.asm @@ -35,263 +35,263 @@ MapGroupPointers: dw MapGroup_Empty MapGroup_SilentHill: - map Route1P1, TILESET_00, ROUTE, LANDMARK_MT_FUJI - map Route1P2, TILESET_00, ROUTE, LANDMARK_SOUTH - map RouteSilentEast, TILESET_00, ROUTE, LANDMARK_BLUE_FOREST - map SilentHill, TILESET_00, TOWN, LANDMARK_STAND - map Route1Gate1F, TILESET_11, GATE, LANDMARK_SOUTH - map Route1Gate2F, TILESET_11, GATE, LANDMARK_SOUTH - map RouteSilentEastGate, TILESET_11, GATE, LANDMARK_BLUE_FOREST - map PlayerHouse1F, TILESET_09, INDOOR, LANDMARK_STAND - map PlayerHouse2F, TILESET_09, INDOOR, LANDMARK_STAND - map SilentPokecenter, TILESET_0C, INDOOR, LANDMARK_STAND - map SilentHillHouse, TILESET_09, INDOOR, LANDMARK_STAND - map SilentHillLab, TILESET_0A, INDOOR, LANDMARK_STAND - map SilentHillLab2, TILESET_0A, INDOOR, LANDMARK_STAND - map Unused13, TILESET_0A, INDOOR, LANDMARK_STAND - map ShizukanaOka, TILESET_1B, CAVE, LANDMARK_NONE + 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 ShizukanaOka, TILESET_FOREST, CAVE, LANDMARK_NONE MapGroup_OldCity: - map Route2, TILESET_01, ROUTE, LANDMARK_ROUTE_15 - map OldCity, TILESET_01, TOWN, LANDMARK_NORTH - map Route2Gate1F, TILESET_11, GATE, LANDMARK_ROUTE_15 - map Route2Gate2F, TILESET_11, GATE, LANDMARK_ROUTE_15 - map Route2House, TILESET_09, INDOOR, LANDMARK_ROUTE_15 - map OldCityMuseum, TILESET_0F, INDOOR, LANDMARK_NORTH - map OldCityGym, TILESET_14, INDOOR, LANDMARK_NORTH - map OldCityTower1F, TILESET_0F, INDOOR, LANDMARK_NORTH - map OldCityTower2F, TILESET_0F, INDOOR, LANDMARK_NORTH - map OldCityTower3F, TILESET_0F, INDOOR, LANDMARK_NORTH - map OldCityTower4F, TILESET_0F, INDOOR, LANDMARK_NORTH - map OldCityTower5F, TILESET_0F, INDOOR, LANDMARK_NORTH - map OldCityBillsHouse, TILESET_0B, INDOOR, LANDMARK_NORTH - map OldCityMart, TILESET_0D, INDOOR, LANDMARK_NORTH - map OldCityHouse, TILESET_0B, INDOOR, LANDMARK_NORTH - map OldCityPokecenter1F, TILESET_0C, INDOOR, LANDMARK_NORTH - map OldCityPokecenter2F, TILESET_0C, INDOOR, LANDMARK_NORTH - map OldCityPokecenterTrade, TILESET_11, GATE, LANDMARK_NORTH - map OldCityPokecenterBattle, TILESET_11, GATE, LANDMARK_NORTH - map OldCityPokecenterTimeMachine, TILESET_0C, INDOOR, LANDMARK_NORTH - map OldCityKurtsHouse, TILESET_0B, INDOOR, LANDMARK_NORTH - map OldCitySchool, TILESET_0F, INDOOR, LANDMARK_NORTH + 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 MapGroup_West: - map West, TILESET_02, TOWN, LANDMARK_ROUTE_18 - map WestMart1F, TILESET_10, INDOOR, LANDMARK_ROUTE_18 - map WestMart2F, TILESET_10, INDOOR, LANDMARK_ROUTE_18 - map WestMart3F, TILESET_10, INDOOR, LANDMARK_ROUTE_18 - map WestMart4F, TILESET_10, INDOOR, LANDMARK_ROUTE_18 - map WestMart5F, TILESET_10, INDOOR, LANDMARK_ROUTE_18 - map WestMart6F, TILESET_10, INDOOR, LANDMARK_ROUTE_18 - map WestMartElevator, TILESET_10, INDOOR, LANDMARK_ROUTE_18 - map WestRadioTower1F, TILESET_12, INDOOR, LANDMARK_ROUTE_18 - map WestRadioTower2F, TILESET_12, INDOOR, LANDMARK_ROUTE_18 - map WestRadioTower3F, TILESET_12, INDOOR, LANDMARK_ROUTE_18 - map WestRadioTower4F, TILESET_12, INDOOR, LANDMARK_ROUTE_18 - map WestRadioTower5F, TILESET_12, INDOOR, LANDMARK_ROUTE_18 - map WestRocketRaidedHouse, TILESET_09, INDOOR, LANDMARK_ROUTE_18 - map WestPokecenter1F, TILESET_0C, INDOOR, LANDMARK_ROUTE_18 - map WestPokecenter2F, TILESET_0C, INDOOR, LANDMARK_ROUTE_18 - map WestGym, TILESET_14, INDOOR, LANDMARK_ROUTE_18 - map WestHouse1, TILESET_09, INDOOR, LANDMARK_ROUTE_18 - map WestHouse2, TILESET_09, INDOOR, LANDMARK_ROUTE_18 + 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 MapGroup_Haiteku: - map HaitekuWestRoute, TILESET_03, ROUTE, LANDMARK_POKEMON_LEAGUE_3 - map HaitekuWestRouteOcean, TILESET_03, ROUTE, LANDMARK_POKEMON_LEAGUE_2 - map Haiteku, TILESET_03, TOWN, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuWestRouteGate, TILESET_11, GATE, LANDMARK_POKEMON_LEAGUE_2 - map HaitekuPokecenter1F, TILESET_0C, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuPokecenter2F, TILESET_0C, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuLeague1F, TILESET_0F, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuLeague2F, TILESET_14, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuMart, TILESET_0D, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuHouse1, TILESET_09, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuHouse2, TILESET_09, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuImposterOakHouse, TILESET_09, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuAquarium1F, TILESET_0E, INDOOR, LANDMARK_POKEMON_LEAGUE_4 - map HaitekuAquarium2F, TILESET_0E, INDOOR, LANDMARK_POKEMON_LEAGUE_4 + 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 MapGroup_Fonto: - map FontoRoute1, TILESET_05, ROUTE, LANDMARK_POKEMON_LEAGUE_1_2 - map FontoRoute2, TILESET_05, ROUTE, LANDMARK_HIDEOUT_3 - map FontoRoute3, TILESET_05, ROUTE, LANDMARK_HIDEOUT_1 - map FontoRoute4, TILESET_05, ROUTE, LANDMARK_POKEMON_LEAGUE_6 - map FontoRoute5, TILESET_05, ROUTE, LANDMARK_SLOWPOKE_WELL_2 - map FontoRoute6, TILESET_05, ROUTE, LANDMARK_SLOWPOKE_WELL_1 - map Fonto, TILESET_05, TOWN, LANDMARK_HIDEOUT_2 - map FontoRouteGate1, TILESET_11, GATE, LANDMARK_POKEMON_LEAGUE_1_2 - map FontoRouteGate2, TILESET_11, GATE, LANDMARK_POKEMON_LEAGUE_6 - map FontoRouteGate3, TILESET_11, GATE, LANDMARK_SLOWPOKE_WELL_2 - map FontoRocketHouse, TILESET_13, INDOOR, LANDMARK_HIDEOUT_2 - map FontoMart, TILESET_0D, INDOOR, LANDMARK_HIDEOUT_2 - map FontoHouse, TILESET_09, INDOOR, LANDMARK_HIDEOUT_2 - map FontoPokecenter1F, TILESET_0C, INDOOR, LANDMARK_HIDEOUT_2 - map FontoPokecenter2F, TILESET_0C, INDOOR, LANDMARK_HIDEOUT_2 - map FontoLab, TILESET_0A, INDOOR, LANDMARK_HIDEOUT_2 + 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 MapGroup_Baadon: - map BaadonRoute1, TILESET_04, ROUTE, LANDMARK_POWER_PLANT_1 - map BaadonRoute2, TILESET_04, ROUTE, LANDMARK_POWER_PLANT_3 - map BaadonRoute3, TILESET_04, ROUTE, LANDMARK_POWER_PLANT_4 - map Baadon, TILESET_04, TOWN, LANDMARK_POWER_PLANT_2 - map BaadonRouteGateWest, TILESET_11, GATE, LANDMARK_POWER_PLANT_1 - map BaadonRouteGateNewtype, TILESET_11, GATE, LANDMARK_POWER_PLANT_4 - map BaadonMart, TILESET_0D, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonPokecenter1F, TILESET_0C, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonPokecenter2F, TILESET_0C, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonHouse1, TILESET_0B, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonWallpaperHouse, TILESET_0E, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonHouse2, TILESET_09, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonLeague1F, TILESET_0F, INDOOR, LANDMARK_POWER_PLANT_2 - map BaadonLeague2F, TILESET_14, INDOOR, LANDMARK_POWER_PLANT_2 + 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 MapGroup_Newtype: - map Route15, TILESET_00, ROUTE, LANDMARK_RUINS_1 - map NewtypeRoute, TILESET_00, ROUTE, LANDMARK_MINES_3 - map Route18, TILESET_00, ROUTE, LANDMARK_MINES_4 - map Newtype, TILESET_00, TOWN, LANDMARK_RUINS_2 - map Route15Pokecenter1F, TILESET_0C, INDOOR, LANDMARK_RUINS_1 - map Route15Pokecenter2F, TILESET_0C, INDOOR, LANDMARK_RUINS_1 - map NewtypeRouteGate, TILESET_11, GATE, LANDMARK_MINES_4 - map Route18Pokecenter1F, TILESET_0C, INDOOR, LANDMARK_MINES_4 - map Route18Pokecenter2F, TILESET_0C, INDOOR, LANDMARK_MINES_4 - map NewtypePokecenter1F, TILESET_0C, INDOOR, LANDMARK_RUINS_2 - map NewtypePokecenter2F, TILESET_0C, INDOOR, LANDMARK_RUINS_2 - map NewtypeLeague1F, TILESET_0F, INDOOR, LANDMARK_RUINS_2 - map NewtypeLeague2F, TILESET_14, INDOOR, LANDMARK_RUINS_2 - map NewtypeSailorHouse, TILESET_09, INDOOR, LANDMARK_RUINS_2 - map NewtypeMart, TILESET_0D, INDOOR, LANDMARK_RUINS_2 - map NewtypeDojo, TILESET_0B, INDOOR, LANDMARK_RUINS_2 - map NewtypeHouse1, TILESET_09, INDOOR, LANDMARK_RUINS_2 - map NewtypeDiner, TILESET_0E, INDOOR, LANDMARK_RUINS_2 - map NewtypeHouse2, TILESET_09, INDOOR, LANDMARK_RUINS_2 - map NewtypeHouse3, TILESET_09, INDOOR, LANDMARK_RUINS_2 + 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 MapGroup_Sugar: - map SugarRoute, TILESET_03, ROUTE, LANDMARK_MINES_1 - map Sugar, TILESET_03, TOWN, LANDMARK_MINES_2 - map SugarRouteGate, TILESET_11, GATE, LANDMARK_MINES_1 - map SugarHouse, TILESET_14, INDOOR, LANDMARK_MINES_2 - map SugarHouse2, TILESET_0B, INDOOR, LANDMARK_MINES_2 - map SugarMart, TILESET_0D, INDOOR, LANDMARK_MINES_2 - map SugarPokecenter1F, TILESET_0C, INDOOR, LANDMARK_MINES_2 - map SugarPokecenter2F, TILESET_0C, INDOOR, LANDMARK_MINES_2 + 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 MapGroup_Bull: - map BullForestRoute1, TILESET_06, ROUTE, LANDMARK_MINES_5 - map BullForestRoute2, TILESET_06, ROUTE, LANDMARK_HIGH_TECH - map BullForestRoute3, TILESET_06, ROUTE, LANDMARK_OLD - map BullForest, TILESET_06, TOWN, LANDMARK_WEST - map BullForestRoute1House, TILESET_09, INDOOR, LANDMARK_MINES_5 - map BullForestRouteGateStand, TILESET_11, GATE, LANDMARK_HIGH_TECH - map BullMart, TILESET_0D, INDOOR, LANDMARK_WEST - map BullHouse1, TILESET_0B, INDOOR, LANDMARK_WEST - map BullHouse2, TILESET_09, INDOOR, LANDMARK_WEST - map BullHouse3, TILESET_09, INDOOR, LANDMARK_WEST - map BullPokecenter1F, TILESET_0C, INDOOR, LANDMARK_WEST - map BullPokecenter2F, TILESET_0C, INDOOR, LANDMARK_WEST - map BullLeague1F, TILESET_0F, INDOOR, LANDMARK_WEST - map BullLeague2F, TILESET_14, INDOOR, LANDMARK_WEST - map BullHouse4, TILESET_09, INDOOR, LANDMARK_WEST + 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 MapGroup_Stand: - map StandRoute, TILESET_00, ROUTE, LANDMARK_BIRDON - map Stand, TILESET_00, TOWN, LANDMARK_FOUNT - map StandRouteGateKanto, TILESET_11, GATE, LANDMARK_BIRDON - map StandLab, TILESET_0C, INDOOR, LANDMARK_FOUNT - map StandPokecenter1F, TILESET_0C, INDOOR, LANDMARK_FOUNT - map StandPokecenter2F, TILESET_0C, INDOOR, LANDMARK_FOUNT - map StandOffice, TILESET_12, INDOOR, LANDMARK_FOUNT - map StandMart, TILESET_0D, INDOOR, LANDMARK_FOUNT - map StandHouse, TILESET_09, INDOOR, LANDMARK_FOUNT - map StandRocketHouse1F, TILESET_13, INDOOR, LANDMARK_FOUNT - map StandRocketHouse2F, TILESET_13, INDOOR, LANDMARK_FOUNT - map StandLeague1F, TILESET_0F, INDOOR, LANDMARK_FOUNT - map StandLeague2F, TILESET_14, INDOOR, LANDMARK_FOUNT + 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 MapGroup_Kanto: - map KantoEastRoute, TILESET_07, ROUTE, LANDMARK_NEW_TYPE - map Kanto, TILESET_07, TOWN, LANDMARK_SUGAR - map KantoCeruleanHouse, TILESET_11, GATE, LANDMARK_SUGAR - map KantoPokecenter1F, TILESET_0C, INDOOR, LANDMARK_SUGAR - map KantoPokecenter2F, TILESET_0C, INDOOR, LANDMARK_SUGAR - map KantoLeague1F, TILESET_0F, INDOOR, LANDMARK_SUGAR - map KantoLeague2F, TILESET_14, INDOOR, LANDMARK_SUGAR - map KantoLavenderHouse, TILESET_09, INDOOR, LANDMARK_SUGAR - map KantoCeladonMart1F, TILESET_10, INDOOR, LANDMARK_SUGAR - map KantoCeladonMart2F, TILESET_10, INDOOR, LANDMARK_SUGAR - map KantoCeladonMart3F, TILESET_10, INDOOR, LANDMARK_SUGAR - map KantoCeladonMart4F, TILESET_10, INDOOR, LANDMARK_SUGAR - map KantoCeladonMart5F, TILESET_10, INDOOR, LANDMARK_SUGAR - map KantoCeladonElevator, TILESET_10, INDOOR, LANDMARK_SUGAR - map KantoMart, TILESET_0D, INDOOR, LANDMARK_SUGAR - map KantoGamefreakHQ1, TILESET_0A, INDOOR, LANDMARK_SUGAR - map KantoGamefreakHQ2, TILESET_0A, INDOOR, LANDMARK_SUGAR - map KantoGamefreakHQ3, TILESET_0A, INDOOR, LANDMARK_SUGAR - map KantoGamefreakHQ4, TILESET_0D, INDOOR, LANDMARK_SUGAR - map KantoGamefreakHQ5, TILESET_0A, INDOOR, LANDMARK_SUGAR - map KantoSilphCo, TILESET_13, INDOOR, LANDMARK_SUGAR - map KantoViridianHouse, TILESET_09, INDOOR, LANDMARK_SUGAR - map KantoGameCorner, TILESET_0E, INDOOR, LANDMARK_SUGAR - map KantoUnusedArea, TILESET_11, INDOOR, LANDMARK_SUGAR - map KantoGameCornerPrizes, TILESET_0E, INDOOR, LANDMARK_SUGAR - map KantoDiner, TILESET_0E, INDOOR, LANDMARK_SUGAR - map KantoSchool, TILESET_0F, INDOOR, LANDMARK_SUGAR - map KantoHospital, TILESET_10, INDOOR, LANDMARK_SUGAR - map KantoPokecenter21F, TILESET_0C, INDOOR, LANDMARK_SUGAR - map KantoPokecenter22F, TILESET_0C, INDOOR, LANDMARK_SUGAR - map KantoRedsHouse, TILESET_09, INDOOR, LANDMARK_SUGAR - map KantoGreensHouse1F, TILESET_09, INDOOR, LANDMARK_SUGAR - map KantoGreensHouse2F, TILESET_09, INDOOR, LANDMARK_SUGAR - map KantoEldersHouse, TILESET_09, INDOOR, LANDMARK_SUGAR - map KantoOaksLab, TILESET_0A, INDOOR, LANDMARK_SUGAR - map KantoLeague21F, TILESET_0F, INDOOR, LANDMARK_SUGAR - map KantoLeague22F, TILESET_14, INDOOR, LANDMARK_SUGAR - map KantoFishingGuru, TILESET_09, INDOOR, LANDMARK_SUGAR + 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 MapGroup_Prince: - map PrinceRoute, TILESET_00, ROUTE, LANDMARK_KANTO - map Prince, TILESET_00, TOWN, LANDMARK_KANTO + map PrinceRoute, TILESET_SILENT_HILL, ROUTE, LANDMARK_KANTO + map Prince, TILESET_SILENT_HILL, TOWN, LANDMARK_KANTO MapGroup_MtFuji: - map MtFujiRoute, TILESET_00, ROUTE, LANDMARK_PRINCE - map MtFuji, TILESET_00, TOWN, LANDMARK_PRINCE + map MtFujiRoute, TILESET_SILENT_HILL, ROUTE, LANDMARK_PRINCE + map MtFuji, TILESET_SILENT_HILL, TOWN, LANDMARK_PRINCE MapGroup_South: - map South, TILESET_08, TOWN, LANDMARK_POKEMON_LEAGUE_1 - map SouthHouse1, TILESET_09, INDOOR, LANDMARK_POKEMON_LEAGUE_1 - map SouthPokecenter1F, TILESET_0C, INDOOR, LANDMARK_POKEMON_LEAGUE_1 - map SouthPokecenter2F, TILESET_0C, INDOOR, LANDMARK_POKEMON_LEAGUE_1 - map SouthMart, TILESET_0D, INDOOR, LANDMARK_POKEMON_LEAGUE_1 - map SouthHouse2, TILESET_09, INDOOR, LANDMARK_POKEMON_LEAGUE_1 + 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 MapGroup_North: - map North, TILESET_06, TOWN, LANDMARK_SILENT - map NorthHouse1, TILESET_09, INDOOR, LANDMARK_SILENT - map NorthMart, TILESET_0D, INDOOR, LANDMARK_SILENT - map NorthHouse2, TILESET_09, INDOOR, LANDMARK_SILENT - map NorthPokecenter1F, TILESET_0C, INDOOR, LANDMARK_SILENT - map NorthPokecenter2F, TILESET_0C, INDOOR, LANDMARK_SILENT + 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 MapGroup_Misc: - map PowerPlant1, TILESET_18, INDOOR, LANDMARK_NONE - map PowerPlant2, TILESET_18, INDOOR, LANDMARK_NONE - map PowerPlant3, TILESET_18, INDOOR, LANDMARK_NONE - map PowerPlant4, TILESET_18, INDOOR, LANDMARK_NONE - map RuinsOfAlphEntrance, TILESET_16, CAVE, LANDMARK_NONE - map RuinsOfAlphMain, TILESET_16, CAVE, LANDMARK_NONE - map CaveMinecarts1, TILESET_17, CAVE, LANDMARK_NONE - map CaveMinecarts2, TILESET_17, CAVE, LANDMARK_NONE - map CaveMinecarts3, TILESET_17, CAVE, LANDMARK_NONE - map CaveMinecarts4, TILESET_17, CAVE, LANDMARK_NONE - map CaveMinecarts5, TILESET_17, CAVE, LANDMARK_NONE - map CaveMinecarts6, TILESET_17, CAVE, LANDMARK_NONE - map CaveMinecarts7, TILESET_17, CAVE, LANDMARK_NONE - map Office1, TILESET_15, INDOOR, LANDMARK_NONE - map Office2, TILESET_15, INDOOR, LANDMARK_NONE - map Office3, TILESET_15, INDOOR, LANDMARK_NONE - map SlowpokeWellEntrance, TILESET_17, CAVE, LANDMARK_NONE - map SlowpokeWellMain, TILESET_17, CAVE, LANDMARK_NONE + map PowerPlant1, TILESET_POWER_PLANT, INDOOR, LANDMARK_NONE + map PowerPlant2, TILESET_POWER_PLANT, INDOOR, LANDMARK_NONE + map PowerPlant3, TILESET_POWER_PLANT, INDOOR, LANDMARK_NONE + map PowerPlant4, TILESET_POWER_PLANT, INDOOR, LANDMARK_NONE + map RuinsOfAlphEntrance, TILESET_RUINS_OF_ALPH, CAVE, LANDMARK_NONE + map RuinsOfAlphMain, TILESET_RUINS_OF_ALPH, CAVE, LANDMARK_NONE + map CaveMinecarts1, TILESET_CAVE, CAVE, LANDMARK_NONE + map CaveMinecarts2, TILESET_CAVE, CAVE, LANDMARK_NONE + map CaveMinecarts3, TILESET_CAVE, CAVE, LANDMARK_NONE + map CaveMinecarts4, TILESET_CAVE, CAVE, LANDMARK_NONE + map CaveMinecarts5, TILESET_CAVE, CAVE, LANDMARK_NONE + map CaveMinecarts6, TILESET_CAVE, CAVE, LANDMARK_NONE + map CaveMinecarts7, TILESET_CAVE, CAVE, LANDMARK_NONE + map Office1, TILESET_OFFICE, INDOOR, LANDMARK_NONE + map Office2, TILESET_OFFICE, INDOOR, LANDMARK_NONE + map Office3, TILESET_OFFICE, INDOOR, LANDMARK_NONE + map SlowpokeWellEntrance, TILESET_CAVE, CAVE, LANDMARK_NONE + map SlowpokeWellMain, TILESET_CAVE, CAVE, LANDMARK_NONE MapGroup_Empty: diff --git a/data/predef_pointers.inc b/data/predef_pointers.inc index 691a072..de14d19 100644 --- a/data/predef_pointers.inc +++ b/data/predef_pointers.inc @@ -11,91 +11,91 @@ PredefPointers:: ; 1:62d3 ; Please be a peach and nuke the hell out of these: ; WE NEED LABELS! ; Thank youu~ - add_predef Function_6445 - add_predef Function_5d27 - add_predef Function_6713 - add_predef Function_66b1 - add_predef Function_4031 - add_predef Function_ce10 - add_predef Function_cd6f - add_predef Function_cde3 - add_predef Function_cde3_2 - add_predef Function_cde3_3 - add_predef Function_cdf9 - add_predef Function_ce10_2 - add_predef Function_cd33 + add_predef Function6445 + add_predef Function5d27 + add_predef Function6713 + add_predef Function66b1 + add_predef Function4031 + add_predef Functionce10 + add_predef Functioncd6f + add_predef Functioncde3 + add_predef Functioncde3_2 + add_predef Functioncde3_3 + add_predef Functioncdf9 + add_predef Functionce10_2 + add_predef Functioncd33 GiveItemPredef:: dbw 3, GiveItem - add_predef Function_ce3c - add_predef Function_da28 - add_predef Function_d886 - add_predef Function_da4f - add_predef Function_dac8 - add_predef Function_dcfc - add_predef Function_dc16 - add_predef Function_dd5c - add_predef Function_de79 - add_predef Function_ce7c - add_predef Function_df7d - add_predef Function_df91 - add_predef Function_1128f - add_predef Function_112c1 - add_predef Function_28c98 - add_predef Function_2d663 - add_predef Function_3d5ce - add_predef Function_3f019 - add_predef Function_3f068 - add_predef Function_3f04a - add_predef Function_3d08c - add_predef Function_3d67c - add_predef Function_3e1a4 - add_predef Function_3ef19 - add_predef Function_3e874 - add_predef Function_3e91e - add_predef Function_3e963 - add_predef Function_421f8 - add_predef Function_42252 - add_predef Function_41fa1 - add_predef Function_28da4 - add_predef Function_28d6e - add_predef Function_40ac7 - add_predef Function_40000 - add_predef Function_40b5c - add_predef Function_50000 - add_predef Function_50bfe - add_predef Function_50bcd - add_predef Function_50b92 - add_predef Function_508c4 - add_predef Function_50771 - add_predef Function_50774 - add_predef Function_5081f - add_predef Function_506d4 - add_predef Function_5069e - add_predef Function_502b5 - add_predef Function_50244 - add_predef Function_50248 - add_predef Function_500c6 - add_predef Function_500a0 - add_predef Function_50073 - add_predef Function_50ed9 - add_predef Function_cb6ff - add_predef Function_cb710 - add_predef Function_cb733 - add_predef Function_145b8 - add_predef Function_146dc - add_predef Function_145de + add_predef Functionce3c + add_predef Functionda28 + add_predef Functiond886 + add_predef Functionda4f + add_predef Functiondac8 + add_predef Functiondcfc + add_predef Functiondc16 + add_predef Functiondd5c + add_predef Functionde79 + add_predef Functionce7c + add_predef Functiondf7d + add_predef Functiondf91 + add_predef Function1128f + add_predef Function112c1 + add_predef Function28c98 + add_predef Function2d663 + add_predef Function3d5ce + add_predef Function3f019 + add_predef Function3f068 + add_predef Function3f04a + add_predef Function3d08c + add_predef Function3d67c + add_predef Function3e1a4 + add_predef Function3ef19 + add_predef Function3e874 + add_predef Function3e91e + add_predef Function3e963 + add_predef Function421f8 + add_predef Function42252 + add_predef Function41fa1 + add_predef Function28da4 + add_predef Function28d6e + add_predef Function40ac7 + add_predef Function40000 + add_predef Function40b5c + add_predef Function50000 + add_predef Function50bfe + add_predef Function50bcd + add_predef Function50b92 + add_predef Function508c4 + add_predef Function50771 + add_predef Function50774 + add_predef Function5081f + add_predef Function506d4 + add_predef Function5069e + add_predef Function502b5 + add_predef Function50244 + add_predef Function50248 + add_predef Function500c6 + add_predef Function500a0 + add_predef Function50073 + add_predef Function50ed9 + add_predef Functioncb6ff + add_predef Functioncb710 + add_predef Functioncb733 + add_predef Function145b8 + add_predef Function146dc + add_predef Function145de add_predef ExecuteBGEffects - add_predef Function_1457a - add_predef Function_143e0 + add_predef Function1457a + add_predef Function143e0 add_predef CheckSGB - add_predef Function_928b - add_predef Function_8786 - add_predef Function_8c4be - add_predef Function_8c9c6 - add_predef Function_8c940 - add_predef Function_cc001 - add_predef Function_cc000 - add_predef Function_cc000_2 - add_predef Function_fdb66 - add_predef Function_1240b + add_predef Function928b + add_predef Function8786 + add_predef Function8c4be + add_predef Function8c9c6 + add_predef Function8c940 + add_predef Functioncc001 + add_predef Functioncc000 + add_predef Functioncc000_2 + add_predef Functionfdb66 + add_predef Function1240b dbw $ff, InexplicablyEmptyFunction diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm index 1946c1f..746c979 100644 --- a/engine/battle_anims/bg_effects.asm +++ b/engine/battle_anims/bg_effects.asm @@ -138,17 +138,17 @@ BattleBGEffects: ; c805a (32:405a) ;dw BattleBGEffect_WobbleMon -BattleBGEffect_End: ; c80c6 (32:40c6) +BattleBGEffect_End: ; c80b6 (32:40b6) call EndBattleBGEffect ret -BattleBGEffects_AnonJumptable: ; c80d7 (32:40d7) +BattleBGEffects_AnonJumptable: ; c80ba (32:40ba) ld hl, sp+$0 ld e, [hl] inc hl ld d, [hl] inc de -BatttleBGEffects_GetNamedJumptablePointer: ; c80ca (32:40ca) +BatttleBGEffects_GetNamedJumptablePointer: ; c80c0 (32:40c0) ld hl, BG_EFFECT_STRUCT_JT_INDEX add hl, bc ld l, [hl] @@ -160,13 +160,13 @@ BatttleBGEffects_GetNamedJumptablePointer: ; c80ca (32:40ca) ld l, a ret -BattleBGEffects_IncrementJumptable: ; c80e5 (32:40e5) +BattleBGEffects_IncrementJumptable: ; c80cd (32:40cd) ld hl, BG_EFFECT_STRUCT_JT_INDEX add hl, bc inc [hl] ret -BattleBGEffect_FlashInverted: ; c80eb (32:40eb) +BattleBGEffect_FlashInverted: ; c80d3 (32:40d3) ld de, .inverted call BattleBGEffect_FlashContinue ret @@ -176,7 +176,7 @@ BattleBGEffect_FlashInverted: ; c80eb (32:40eb) db %00011011 ; 0123 ; c80f3 -BattleBGEffect_FlashWhite: ; c80f3 (32:40f3) +BattleBGEffect_FlashWhite: ; c80dc (32:40dc) ld de, .white call BattleBGEffect_FlashContinue ret @@ -186,7 +186,7 @@ BattleBGEffect_FlashWhite: ; c80f3 (32:40f3) db %00000000 ; 0000 ; c80fb -BattleBGEffect_FlashContinue: ; c80fb (32:40fb) +BattleBGEffect_FlashContinue: ; c80e5 (32:40e5) ; current timer, flash duration, number of flashes ld a, $1 ld [wBattleAnimTemp0], a @@ -224,7 +224,7 @@ BattleBGEffect_FlashContinue: ; c80fb (32:40fb) ld [wBGP], a ret -BattleBGEffect_WhiteHues: ; c812d (32:412d) +BattleBGEffect_WhiteHues: ; c8117 (32:4117) ld de, .Pals call BattleBGEffect_GetNthDMGPal jr c, .quit @@ -242,7 +242,7 @@ BattleBGEffect_WhiteHues: ; c812d (32:412d) db -1 ; c8141 -BattleBGEffect_BlackHues: ; c8141 (32:4141) +BattleBGEffect_BlackHues: ; c812b (32:412b) ld de, .Pals call BattleBGEffect_GetNthDMGPal jr c, .quit @@ -260,7 +260,7 @@ BattleBGEffect_BlackHues: ; c8141 (32:4141) db -1 ; c8155 -BattleBGEffect_AlternateHues: ; c8155 (32:4155) +BattleBGEffect_AlternateHues: ; c813f (32:413f) ld de, .Pals call BattleBGEffect_GetNthDMGPal jr c, .quit @@ -284,7 +284,7 @@ BattleBGEffect_AlternateHues: ; c8155 (32:4155) db -2 ; c8171 -BattleBGEffect_06: ; c8171 (32:4171) +BattleBGEffect_06: ; c815b (32:415b) call BattleBGEffects_CheckSGB jr nz, .sgb ld de, .PalsCGB @@ -308,7 +308,7 @@ BattleBGEffect_06: ; c8171 (32:4171) db -2 ; c818b -BattleBGEffect_07: ; c818b (32:418b) +BattleBGEffect_07: ; c8175 (32:4175) call BattleBGEffects_CheckSGB jr nz, .sgb ld de, .PalsCGB @@ -332,7 +332,7 @@ BattleBGEffect_07: ; c818b (32:418b) db -2 ; c81a5 -BattleBGEffect_08: ; c81a5 (32:41a5) +BattleBGEffect_08: ; c818f (32:418f) ld de, .Pals call BattleBGEffect_GetNthDMGPal ld [wBGP], a @@ -345,7 +345,7 @@ BattleBGEffect_08: ; c81a5 (32:41a5) db -2 ; c81b3 -BattleBGEffect_HideMon: ; c81b3 (32:41b3) +BattleBGEffect_HideMon: ; c819d (32:419d) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -381,7 +381,7 @@ BattleBGEffect_HideMon: ; c81b3 (32:41b3) call EndBattleBGEffect ret -BattleBGEffect_ShowMon: ; c81ea (32:41ea) +BattleBGEffect_ShowMon: ; c81d2 (32:41d2) call BGEffect_CheckFlyDigStatus jr z, .not_flying call EndBattleBGEffect @@ -411,7 +411,7 @@ BattleBGEffect_ShowMon: ; c81ea (32:41ea) db -1 ; c8214 -BattleBGEffect_FeetFollow: ; c8214 (32:4214) +BattleBGEffect_FeetFollow: ; c81fc (32:41fc) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -478,7 +478,7 @@ BattleBGEffect_FeetFollow: ; c8214 (32:4214) call EndBattleBGEffect ret -BattleBGEffect_HeadFollow: ; c8281 (32:4281) +BattleBGEffect_HeadFollow: ; c8266 (32:4266) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -549,7 +549,7 @@ _QueueBattleAnimation: ; c82ee (32:42ee) callab QueueBattleAnimation ret -BattleBGEffect_27: ; c82f5 (32:42f5) +BattleBGEffect_27: ; c82d9 (32:42d9) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -638,7 +638,7 @@ BattleBGEffect_27: ; c82f5 (32:42f5) call EndBattleBGEffect ret -BattleBGEffect_EnterMon: ; c837b (32:437b) +BattleBGEffect_EnterMon: ; c8350 (32:4350) call BGEffect_CheckBattleTurn jr nz, .player_turn ld de, .EnemyData @@ -666,7 +666,7 @@ BattleBGEffect_EnterMon: ; c837b (32:437b) db -1 ; c83a8 -BattleBGEffect_ReturnMon: ; c83a8 (32:43a8) +BattleBGEffect_ReturnMon: ; c837d (32:437d) call BGEffect_CheckBattleTurn jr nz, .player_turn ld de, .EnemyData @@ -702,7 +702,7 @@ BattleBGEffect_ReturnMon: ; c83a8 (32:43a8) db -1 ; c83ed -BattleBGEffect_RunPicResizeScript: ; c83ed (32:43ed) +BattleBGEffect_RunPicResizeScript: ; c83c2 (32:43c2) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -905,7 +905,7 @@ ENDM db $06, $1b, $30 ; c8545 -BattleBGEffect_Surf: ; c8545 (32:4545) +BattleBGEffect_Surf: ; c851d (32:451d) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -962,7 +962,7 @@ BattleBGEffect_Surf: ; c8545 (32:4545) ld [bc], a ret -BattleBGEffect_Psychic: ; c8607 (32:4607) +BattleBGEffect_Psychic: ; c8560 (32:4560) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1001,7 +1001,7 @@ BattleBGEffect_Psychic: ; c8607 (32:4607) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_Teleport: ; c863f (32:463f) +BattleBGEffect_Teleport: ; c8599 (32:4599) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1027,7 +1027,7 @@ BattleBGEffect_Teleport: ; c863f (32:463f) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_NightShade: ; c8662 (32:4662) +BattleBGEffect_NightShade: ; c85bd (32:45bd) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1056,7 +1056,7 @@ BattleBGEffect_NightShade: ; c8662 (32:4662) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_DoubleTeam: ; c8689 (32:4689) +BattleBGEffect_DoubleTeam: ; c85e5 (32:45e5) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1146,7 +1146,7 @@ BattleBGEffect_DoubleTeam: ; c8689 (32:4689) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_AcidArmor: ; c8709 (32:4709) +BattleBGEffect_AcidArmor: ; c865e (32:465e) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1188,7 +1188,7 @@ BattleBGEffect_AcidArmor: ; c8709 (32:4709) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_Withdraw: ; c8761 (32:4761) +BattleBGEffect_Withdraw: ; c8695 (32:4695) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1238,7 +1238,7 @@ BattleBGEffect_Withdraw: ; c8761 (32:4761) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_Dig: ; c87a7 (32:47a7) +BattleBGEffect_Dig: ; c86dc (32:46dc) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1306,7 +1306,7 @@ BattleBGEffect_Dig: ; c87a7 (32:47a7) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_Tackle: ; c8805 (32:4805) +BattleBGEffect_Tackle: ; c873b (32:473b) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1383,7 +1383,7 @@ Tackle_BGEffect25_2d_two: ld [hl], a ret -Functionc88a5: ; c88a5 (32:48a5) +Functionc88a5: ; c87aa (32:47aa) push af .asm_c87ab: ld a, [rLY] @@ -1393,7 +1393,7 @@ Functionc88a5: ; c88a5 (32:48a5) call BGEffect_FillLYOverridesBackup ret -BattleBGEffect_2d: ; c88e7 (32:48e7) +BattleBGEffect_2d: ; c87b6 (32:47b6) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1429,7 +1429,7 @@ BGEffect2d_2f_zero: ld [hl], a ret -BattleBGEffect_2f: ; c8919 (32:4919) +BattleBGEffect_2f: ; c87e9 (32:47e9) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1444,7 +1444,7 @@ BattleBGEffect_2f: ; c8919 (32:4919) .two ret -BattleBGEffect_26: ; c892a (32:492a) +BattleBGEffect_26: ; c87fb (32:47fb) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1494,7 +1494,7 @@ BattleBGEffect_26: ; c892a (32:492a) call BGEffect_FillLYOverridesBackup ret -BattleBGEffect_2c: ; c8964 (32:4964) +BattleBGEffect_2c: ; c8842 (32:4842) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1560,7 +1560,7 @@ BattleBGEffect_2c: ; c8964 (32:4964) call BGEffect_FillLYOverridesBackup ret -BattleBGEffect_28: ; c89b5 (32:49b5) +BattleBGEffect_28: ; c88a0 (32:48a0) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1604,7 +1604,7 @@ BattleBGEffect_28: ; c89b5 (32:49b5) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_BounceDown: ; c89ee (32:49ee) +BattleBGEffect_BounceDown: ; c88da (32:48da) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1656,7 +1656,7 @@ BattleBGEffect_BounceDown: ; c89ee (32:49ee) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_2a: ; c8a3a (32:4a3a) +BattleBGEffect_2a: ; c8927 (32:4927) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1766,7 +1766,7 @@ BattleBGEffect_2a: ; c8a3a (32:4a3a) db -1 ; c8acc -BattleBGEffect_2b: ; c8acc (32:4acc) +BattleBGEffect_2b: ; c89ba (32:49ba) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1804,7 +1804,7 @@ BattleBGEffect_2b: ; c8acc (32:4acc) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_1c: ; c8b00 (32:4b00) +BattleBGEffect_1c: ; c89ef (32:49ef) call BattleBGEffects_AnonJumptable jp hl .anon_dw @@ -1894,7 +1894,7 @@ BattleBGEffect_1c: ; c8b00 (32:4b00) db $90, $f8 ; c8be8 -BattleBGEffect_RapidFlash: ; c8be8 (32:4be8) +BattleBGEffect_RapidFlash: ; c8a6e (32:4a6e) ld de, .FlashPals call BGEffect_RapidCyclePals ret @@ -1903,7 +1903,7 @@ BattleBGEffect_RapidFlash: ; c8be8 (32:4be8) db $e4, $6c, $fe ; c8bf2 -BattleBGEffect_16: ; c8bf2 (32:4bf2) +BattleBGEffect_16: ; c8a78 (32:4a78) ld de, .Pals call BGEffect_RapidCyclePals ret @@ -1912,7 +1912,7 @@ BattleBGEffect_16: ; c8bf2 (32:4bf2) db $e4, $90, $40, $ff ; c8bfd -BattleBGEffect_17: ; c8bfd (32:4bfd) +BattleBGEffect_17: ; c8a83 (32:4a83) ld de, .Pals call BGEffect_RapidCyclePals ret @@ -1921,7 +1921,7 @@ BattleBGEffect_17: ; c8bfd (32:4bfd) db $e4, $f8, $fc, $ff ; c8c08 -BattleBGEffect_18: ; c8c08 (32:4c08) +BattleBGEffect_18: ; c8a8e (32:4a8e) ld de, .Pals call BGEffect_RapidCyclePals ret @@ -1930,7 +1930,7 @@ BattleBGEffect_18: ; c8c08 (32:4c08) db $e4, $90, $40, $90, $fe ; c8c14 -BattleBGEffect_19: ; c8c14 (32:4c14) +BattleBGEffect_19: ; c8a9a (32:4a9a) ld de, .Pals call BGEffect_RapidCyclePals ret @@ -1939,7 +1939,7 @@ BattleBGEffect_19: ; c8c14 (32:4c14) db $e4, $f8, $fc, $f8, $fe ; c8c20 -BattleBGEffect_1a: ; c8c20 (32:4c20) +BattleBGEffect_1a: ; c8aa6 (32:4aa6) ld de, .Pals call BGEffect_RapidCyclePals ret @@ -1948,7 +1948,7 @@ BattleBGEffect_1a: ; c8c20 (32:4c20) db $e4, $f8, $fc, $f8, $e4, $90, $40, $90, $fe ; c8c30 -BattleBGEffect_1b: ; c8c30 (32:4c30) +BattleBGEffect_1b: ; c8ab6 (32:4ab6) ld de, .Pals call BGEffect_RapidCyclePals ret @@ -1957,7 +1957,7 @@ BattleBGEffect_1b: ; c8c30 (32:4c30) db $e4, $fc, $e4, $00, $fe ; c8c3c -BattleBGEffect_1d: ; c8c3c (32:4c3c) +BattleBGEffect_1d: ; c8ac2 (32:4ac2) ld de, .Pals call BGEffect_RapidCyclePals ret @@ -1966,7 +1966,7 @@ BattleBGEffect_1d: ; c8c3c (32:4c3c) db $e4, $90, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $40, $90, $e4, $ff ; c8c55 -BattleBGEffect_1e: ; c8c55 (32:4c55) +BattleBGEffect_1e: ; c8adb (32:4adb) ld de, .Pals call BGEffect_RapidCyclePals ret @@ -1975,7 +1975,7 @@ BattleBGEffect_1e: ; c8c55 (32:4c55) db $00, $40, $90, $e4, $ff ; c8c61 -BattleBGEffect_2e: ; c8ce1 (32:4ce1) +BattleBGEffect_2e: ; c8ae7 (32:4ae7) call Functionc8d0b jr c, .xor_a bit 7, a @@ -1989,7 +1989,7 @@ BattleBGEffect_2e: ; c8ce1 (32:4ce1) ld [$c753], a ; wAnimObject01YOffset ret -BattleBGEffect_1f: ; c8cf9 (32:4cf9) +BattleBGEffect_1f: ; c8afa (32:4afa) call Functionc8d0b jr nc, .skip xor a @@ -1997,7 +1997,7 @@ BattleBGEffect_1f: ; c8cf9 (32:4cf9) ldh [hSCX], a ret -BattleBGEffect_20: ; c8d02 (32:4d02) +BattleBGEffect_20: ; c8b03 (32:4b03) call Functionc8d0b jr nc, .skip xor a @@ -2005,7 +2005,7 @@ BattleBGEffect_20: ; c8d02 (32:4d02) ldh [hSCY], a ret -Functionc8d0b: ; c8d0b (32:4d0b) +Functionc8d0b: ; c8b0c (32:4b0c) ld hl, BG_EFFECT_STRUCT_JT_INDEX add hl, bc ld a, [hl] @@ -2043,7 +2043,7 @@ Functionc8d0b: ; c8d0b (32:4d0b) and a ret -BattleBGEffect_GetNthDMGPal: ; c8d57 (32:4d57) +BattleBGEffect_GetNthDMGPal: ; c8b3b (32:4b3b) ld hl, BG_EFFECT_STRUCT_JT_INDEX add hl, bc ld a, [hl] @@ -2066,7 +2066,7 @@ BattleBGEffect_GetNthDMGPal: ; c8d57 (32:4d57) call BattleBGEffect_GetFirstDMGPal ret -BGEffect_RapidCyclePals: ; c8d77 (32:4d77) +BGEffect_RapidCyclePals: ; c8b5b (32:4b5b) push de ld de, .Jumptable_DMG call BatttleBGEffects_GetNamedJumptablePointer @@ -2129,12 +2129,12 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77) call EndBattleBGEffect ret -BattleBGEffect_GetFirstDMGPal: ; c8eac (32:4eac) +BattleBGEffect_GetFirstDMGPal: ; c8bb3 (32:4bb3) ld hl, BG_EFFECT_STRUCT_03 add hl, bc ld a, [hl] inc [hl] -BattleBGEffect_GetNextDMGPal: ; c8eb2 (32:4eb2) +BattleBGEffect_GetNextDMGPal: ; c8bb9 (32:4bb9) ld l, a ld h, $0 add hl, de @@ -2155,9 +2155,9 @@ BattleBGEffect_GetNextDMGPal: ; c8eb2 (32:4eb2) scf ret -BattleBGEffects_ClearLYOverrides: ; c8eca (32:4eca) +BattleBGEffects_ClearLYOverrides: ; c8bd1 (32:4bd1) xor a -BattleBGEffects_SetLYOverrides: ; c8ecb (32:4ecb) +BattleBGEffects_SetLYOverrides: ; c8bd2 (32:4bd2) ld hl, wLYOverrides ld e, $91 .loop @@ -2166,7 +2166,7 @@ BattleBGEffects_SetLYOverrides: ; c8ecb (32:4ecb) jr nz, .loop ret -BattleBGEffect_SetLCDStatCustoms: ; c8ede (32:4ede) +BattleBGEffect_SetLCDStatCustoms: ; c8bdc (32:4bdc) ldh [hLCDCPointer], a call BGEffect_CheckBattleTurn jr nz, .player_turn @@ -2182,7 +2182,7 @@ BattleBGEffect_SetLCDStatCustoms: ; c8ede (32:4ede) ldh [hLYOverrideEnd], a ret -BattleAnim_ResetLCDStatCustom: ; c8f0a (32:4f0a) +BattleAnim_ResetLCDStatCustom: ; c8bf2 (32:4bf2) xor a ldh [hLYOverrideStart], a ldh [hLYOverrideEnd], a @@ -2192,7 +2192,7 @@ BattleAnim_ResetLCDStatCustom: ; c8f0a (32:4f0a) call EndBattleBGEffect ret -BattleBGEffects_ResetVideoHRAM: ; c8f19 (32:4f19) +BattleBGEffects_ResetVideoHRAM: ; c8c01 (32:4c01) xor a ldh [hLCDCPointer], a ldh [hLYOverrideStart], a @@ -2200,7 +2200,7 @@ BattleBGEffects_ResetVideoHRAM: ; c8f19 (32:4f19) call BattleBGEffects_ClearLYOverrides ret -Functionc8f2e: ; c8f2e (32:4f2e) +Functionc8f2e: ; c8c0c (32:4c0c) push bc xor a ld [wBattleAnimTemp0], a @@ -2235,7 +2235,7 @@ Functionc8f2e: ; c8f2e (32:4f2e) pop bc ret -InitSurfWaves: ; c8f69 (32:4f69) +InitSurfWaves: ; c8c47 (32:4c47) push bc xor a ld [wBattleAnimTemp0], a @@ -2263,7 +2263,7 @@ InitSurfWaves: ; c8f69 (32:4f69) pop bc ret -BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef) +BattleBGEffect_WavyScreenFX: ; c8c78 (32:4c78) push bc ldh a, [hLYOverrideStart] ld l, a @@ -2290,7 +2290,7 @@ BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef) pop bc ret -BGEffect_FillLYOverridesBackup: ; c900b (32:500b) +BGEffect_FillLYOverridesBackup: ; c8c94 (32:4c94) push af ld h, HIGH(wLYOverrides) ldh a, [hLYOverrideStart] @@ -2305,7 +2305,7 @@ BGEffect_FillLYOverridesBackup: ; c900b (32:500b) jr nz, .loop ret -BGEffect_DisplaceLYOverridesBackup: ; c901b (32:501b) +BGEffect_DisplaceLYOverridesBackup: ; c8ca4 (32:4ca4) ; e = a; d = [hLYOverrideEnd] - [hLYOverrideStart] - a push af ld e, a @@ -2332,7 +2332,7 @@ BGEffect_DisplaceLYOverridesBackup: ; c901b (32:501b) jr nz, .loop2 ret -BGEffect_CheckBattleTurn: ; c9038 (32:5038) +BGEffect_CheckBattleTurn: ; c8cc2 (32:4cc2) ld hl, BG_EFFECT_STRUCT_BATTLE_TURN add hl, bc ldh a, [hBattleTurn] @@ -2340,7 +2340,7 @@ BGEffect_CheckBattleTurn: ; c9038 (32:5038) xor [hl] ret -BGEffect_CheckFlyDigStatus: ; c9042 (32:5042) +BGEffect_CheckFlyDigStatus: ; c8ccc (32:4ccc) ld hl, BG_EFFECT_STRUCT_BATTLE_TURN add hl, bc ldh a, [hBattleTurn] @@ -2356,18 +2356,18 @@ BGEffect_CheckFlyDigStatus: ; c9042 (32:5042) bit 6, a ret -BattleBGEffects_CheckSGB: ; c9059 (32:5059) +BattleBGEffects_CheckSGB: ; c8ce3 (32:4ce3) ld a, [wcccf] and a ret -BattleBGEffects_Sine: ; c905d (32:505d) +BattleBGEffects_Sine: ; c8ce8 (32:4ce8) ld e, a callab BattleAnim_Sine_e ld a, e ret -BattleBGEffects_Cosine: ; c9066 (32:5066) +BattleBGEffects_Cosine: ; c8cf3 (32:4cf3) ld e, a callab BattleAnim_Cosine_e ld a, e diff --git a/home/copy2.asm b/home/copy2.asm index 5d3afe2..7cc4696 100644 --- a/home/copy2.asm +++ b/home/copy2.asm @@ -1,6 +1,21 @@ INCLUDE "constants.asm" -SECTION "Video Copy functions", ROM0[$0D2A] +SECTION "Video Copy functions", ROM0[$0D02] + +Function0d02:: + jpab Function14000 + +LoadFont:: ; 00:0d0a + jpab LoadFontGraphics + +LoadFontsBattleExtra:: + jpab LoadPokemonMenuGraphics + +LoadFontExtra:: ; 00:0d1a + jpab LoadFontExtraGraphicsWithCursor + +LoadFontExtra2:: + jpab LoadHexadecimalFontOrHUDGraphics FarCopyData: ; d2a (0:d2a) ; Identical to FarCopyBytes except for tail call optimization diff --git a/home/fade.asm b/home/fade.asm new file mode 100644 index 0000000..e39bd83 --- /dev/null +++ b/home/fade.asm @@ -0,0 +1,95 @@ +include "constants.asm" + +if DEBUG +SECTION "DMG Palette Fade Effect", ROM0 [$0343] +else +SECTION "DMG Palette Fade Effect", ROM0 [$0307] +endc + +Function0343:: ; 0343 + ld a, [wTimeOfDayPal] + ld b, a + ld hl, IncGradGBPalTable_11 ; $39f + ld a, l + sub b + ld l, a + jr nc, .okay + dec h +.okay + ld a, [hli] + ld [rBGP], a + ld a, [hli] + ld [rOBP0], a + ld a, [hli] + ld [rOBP1], a + ret + +RotateFourPalettesRight:: + ld hl, IncGradGBPalTable_08 ; $396 + ld b, $4 + jr RotatePalettesRight + +RotateThreePalettesRight:: + ld hl, IncGradGBPalTable_13 ; $3a5 + ld b, $3 +RotatePalettesRight:: ; 0366 +; Rotate palettes to the right and fill with loaded colors from the left +; If we're already at the leftmost color, fill with the leftmost color +.loop + ld a, [hli] + ld [rBGP], a + ld a, [hli] + ld [rOBP0], a + ld a, [hli] + ld [rOBP1], a + ld c, $8 + call DelayFrames + dec b + jr nz, .loop + ret + +RotateFourPalettesLeft:: + ld hl, IncGradGBPalTable_12 - 1 ; $3a1 + ld b, $4 + jr RotatePalettesLeft + +RotateThreePalettesLeft:: + ld hl, IncGradGBPalTable_15 - 1 ; $3aa + ld b, $3 +RotatePalettesLeft:: ; 0384 +; Rotate palettes to the left and fill with loaded colors from the right +; If we're already at the rightmost color, fill with the rightmost color +.loop + ld a, [hld] + ld [rOBP1], a + ld a, [hld] + ld [rOBP0], a + ld a, [hld] + ld [rBGP], a + ld c, $8 + call DelayFrames + dec b + jr nz, .loop + ret + +; IncGradGBPalTable_00:: db %11111111, %11111111, %11111111 +; IncGradGBPalTable_01:: db %11111110, %11111110, %11111110 +; IncGradGBPalTable_02:: db %11111001, %11111001, %11111001 +; IncGradGBPalTable_03:: db %11100100, %11100100, %11100100 + +; IncGradGBPalTable_04:: db %11100100, %11100100, %11100100 +; IncGradGBPalTable_05:: db %10010000, %10010000, %10010000 +; IncGradGBPalTable_06:: db %01000000, %01000000, %01000000 + +; IncGradGBPalTable_07:: db %00000000, %00000000, %00000000 +; bgp obp1 obp2 +IncGradGBPalTable_08:: db %11111111, %11111111, %11111111 +IncGradGBPalTable_09:: db %11111110, %11111110, %11111000 +IncGradGBPalTable_10:: db %11111001, %11100100, %11100100 +IncGradGBPalTable_11:: db %11100100, %11010000, %11100000 + +IncGradGBPalTable_12:: db %11100100, %11010000, %11100000 +IncGradGBPalTable_13:: db %10010000, %10000000, %10010000 +IncGradGBPalTable_14:: db %01000000, %01000000, %01000000 + +IncGradGBPalTable_15:: db %00000000, %00000000, %00000000 diff --git a/home/init.asm b/home/init.asm index d8ae530..5df55b8 100644 --- a/home/init.asm +++ b/home/init.asm @@ -21,8 +21,20 @@ else endc endc +SECTION "Init", ROM0[$51C] -SECTION "Init", ROM0[$52F] +Reset: ; 51c (0:051c) + call DisableAudio + call ClearPalettes + ei + + ld hl, wJoypadFlags + set 7, [hl] + + ld c, 32 + call DelayFrames + + jr Init Init: ; 052f di diff --git a/home/joypad.asm b/home/joypad.asm index 5a4e549..faa7cf0 100644 --- a/home/joypad.asm +++ b/home/joypad.asm @@ -1,6 +1,14 @@ INCLUDE "constants.asm" -SECTION "Joypad functions", ROM0[$07FE] +SECTION "Joypad functions", ROM0[$07F8] + +ClearJoypad:: + xor a +; Pressed this frame (delta) + ldh [hJoyDown], a +; Currently pressed + ldh [hJoyState], a + ret Joypad:: ; 7fe (0:7fe) ; Read the joypad register and translate it to something more diff --git a/home/menu.asm b/home/menu.asm index e8b4eeb..64d3f9a 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -1,51 +1,425 @@ include "constants.asm" -if DEBUG -SECTION "Print Letter Delay", ROM0[$33a3] -else -SECTION "Print Letter Delay", ROM0[$3367] -endc - -PrintLetterDelay:: ; 33a3 (0:33a3) - ld a, [wce5f] - bit 4, a - ret nz - ld a, [wTextBoxFlags] +SECTION "Menu Functions", ROM0 [$1d49] + +LoadMenuHeader:: ; 00:1d49 + call CopyMenuHeader + call PushWindow + ret + +CopyMenuHeader:: ; 00:1d50 + ld de, wMenuDataHeader + ld bc, $10 + jp CopyBytes + +MenuTextBox:: ; 00:1d59 + push hl + ld hl, .Data + call LoadMenuHeader + pop hl + jp PrintText + +; unused + ret + +.Data: ; 00:1d65 + db MENU_BACKUP_TILES ; flags + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw VRAM_Begin + db 0 ; default option + +MenuTextBoxBackup:: + call MenuTextBox + call CloseWindow + ret + +LoadStandardMenuHeader:: + ld hl, .Data + call LoadMenuHeader + ret + +.Data: ; 00:1d7b + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw 0 + db 1 ; default option + +Call_ExitMenu:: + call ExitMenu + ret + +VerticalMenu:: ; 00:1d87 + xor a + ldh [hBGMapMode], a + call MenuBox + call UpdateSprites + call PlaceVerticalMenuItems + call WaitBGMap + call CopyMenuData + ld a, [wMenuData2] + bit 7, a + jr z, .asm_1daa + call InitVerticalMenuCursor + call Function1a7c bit 1, a + jr z, .asm_1dac +.asm_1daa: ; 00:1daa + scf + ret + +.asm_1dac: ; 00:1dac + and a + ret + +GetMenu2:: + call LoadMenuHeader + call VerticalMenu + call CloseWindow + ld a, [wMenuCursorY] + ret + +CopyNameFromMenu:: + push hl + push bc + push af + ld hl, wMenuDataPointer + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + pop af + call GetNthString + ld d, h + ld e, l + call CopyStringToCD31 + pop bc + pop hl + ret + +YesNoBox:: + lb bc, 14, 7 + jr asm_1ddc + +PlaceGenericTwoOptionBox:: + call LoadMenuHeader + jr asm_1df9 + +asm_1ddc: ; 00:1ddc + push bc + ld hl, YesNoMenuHeader + call CopyMenuHeader + pop bc + ld a, b + ld [wMenuBorderLeftCoord], a + add 5 + ld [wMenuBorderRightCoord], a + ld a, c + ld [wMenuBorderTopCoord], a + add 4 + ld [wMenuBorderBottomCoord], a + call PushWindow +asm_1df9: ; 00:1df9 + call VerticalMenu + push af + ld c, 15 + call DelayFrames + call CloseWindow + pop af + jr c, .asm_1e11 + ld a, [wMenuCursorY] + cp $2 + jr z, .asm_1e11 + and a + ret + +.asm_1e11: ; 00:1e11 + ld a, $2 + ld [wMenuCursorY], a + scf + ret + +YesNoMenuHeader:: ; 00:1e18 + db MENU_BACKUP_TILES ; flags + menu_coords 10, 5, 15, 9 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 2 + db "はい@" + db "いいえ@" + +OffsetMenuHeader:: + call _OffsetMenuHeader + call PushWindow + ret + +_OffsetMenuHeader:: ; 00:1e30 + push de + call CopyMenuHeader + pop de + ld a, [wMenuBorderLeftCoord] + ld h, a + ld a, [wMenuBorderRightCoord] + sub h +.asm_1e3d: ; 00:1e3d + ld h, a + ld a, d + ld [wMenuBorderLeftCoord], a + add h + ld [wMenuBorderRightCoord], a + ld a, [wMenuBorderTopCoord] + ld l, a + ld a, [wMenuBorderBottomCoord] + sub l + ld l, a + ld a, e + ld [wMenuBorderTopCoord], a + add l + ld [wMenuBorderBottomCoord], a + ret + +OpenMenu:: ; 00:1e58 + call CopyMenuData + call GetMenuIndexSet + push de + ld a, [wMenuCursorBuffer] + push af + call Function1e8a + pop af + ld [wMenuCursorBuffer], a + call AutomaticGetMenuBottomCoord + call PushWindow + call MenuBox + pop de + call GetMenuIndexSet + push de + call RunMenuItemPrintingFunction + ld a, $1 + ldh [hBGMapMode], a + call UpdateSprites + call GetMenuIndexSet + pop de + call Function1f27 + ret + +Function1e8a:: ; 00:1e8a + xor a + ldh [hBGMapMode], a + xor a + call OpenSRAM + call Function1cae + ld a, l + ld [wWindowStackPointer], a + ld a, h + ld [wWindowStackPointer + 1], a + call Function1c7a + ld d, h + ld e, l + call Function1c60 + call CloseSRAM + ld hl, wWindowStackSize + dec [hl] + ret + +AutomaticGetMenuBottomCoord:: ; 00:1eac + ld a, [wMenuBorderLeftCoord] + ld c, a + ld a, [wMenuBorderRightCoord] + sub c + ld c, a + ld a, [wMenuDataItems] + add a + inc a + ld b, a + ld a, [wMenuBorderTopCoord] + add b + ld [wMenuBorderBottomCoord], a + ret + +GetMenuIndexSet:: ; 00:1ec3 + ld hl, wMenuDataIndicesPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wWhichIndexSet] + and a + jr z, .asm_1ed9 + ld b, a + ld c, -1 +.asm_1ed2: ; 00:1ed2 + ld a, [hli] + cp c + jr nz, .asm_1ed2 + dec b + jr nz, .asm_1ed2 +.asm_1ed9: ; 00:1ed9 + ld d, h + ld e, l + inc hl + ld c, $ff +.asm_1ede: ; 00:1ede + inc c + ld a, [hli] + cp $ff + jr nz, .asm_1ede + ld a, c + ld [wMenuDataItems], a + ret + +Function1ee9:: ; 1ee9 + call MenuBoxCoord2Tile + call Function1c86 + ld a, [wMenuDataItems] + add a + cp b + jr nc, .asm_1ef9 + ld b, a + dec c + ret + +.asm_1ef9: ; 00:1ef9 + ld a, b + srl a + dec a + ld [wMenuDataItems], a + dec c + ret + +RunMenuItemPrintingFunction:: ; 00:1f02 + call MenuBoxCoord2Tile + ld bc, 2 * SCREEN_WIDTH + 2 + add hl, bc +.asm_1f09: ; 00:1f09 + inc de + ld a, [de] + cp -1 ret z + ld [wMenuSelection], a + push de push hl + ld d, h + ld e, l + ld hl, wMenuDataDisplayFunctionPointer + call ._hl_ + pop hl + ld de, 2 * SCREEN_WIDTH + add hl, de + pop de + jr .asm_1f09 + +._hl_: + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +Function1f27:: ; 00:1f27 +; Combines Crystal functions "InitMenuCursorAndButtonPermissions" and "GetStaticMenuJoypad" push de - push bc - ld a, [wTextBoxFlags] + call InitVerticalMenuCursor + ld hl, wMenuJoypadFilter + ld a, [wMenuData2] + bit 3, a + jr z, .asm_1f37 + set 3, [hl] +.asm_1f37: ; 00:1f37 + bit 2, a + jr z, .asm_1f3f + ld a, [hl] + or D_LEFT | D_RIGHT + ld [hl], a +.asm_1f3f: ; 00:1f3f + call Function1a7c + pop de bit 0, a - jr z, .waitOneFrame - ld a, [wce5f] - and $07 - jr .initFrameCnt -.waitOneFrame - ld a, $01 -.initFrameCnt - ld [wVBlankJoyFrameCounter], a -.checkButtons - call GetJoypad - ldh a, [hJoyState] -.checkAButton - bit 0, a ; is the A button pressed? - jr z, .checkBButton - jr .endWait -.checkBButton - bit 1, a ; is the B button pressed? - jr z, .buttonsNotPressed -.endWait - call DelayFrame - jr .done -.buttonsNotPressed ; if neither A nor B is pressed - ld a, [wVBlankJoyFrameCounter] + jr nz, .asm_1f66 + bit 1, a + jr nz, .asm_1f7e + bit 3, a + jr nz, .asm_1f7e + bit 4, a + jr nz, .asm_1f58 + bit 5, a + jr nz, .asm_1f5f + ret + +.asm_1f58: ; 00:1f58 + ld a, D_RIGHT + ld [wMenuJoypad], a + jr .asm_1f6b + +.asm_1f5f: ; 00:1f5f + ld a, D_LEFT + ld [wMenuJoypad], a + jr .asm_1f6b + +.asm_1f66: ; 00:1f66 + ld a, A_BUTTON + ld [wMenuJoypad], a +.asm_1f6b: ; 00:1f6b + ld a, [wMenuCursorY] + ld l, a + ld h, $0 + add hl, de + ld a, [hl] + ld [wMenuSelection], a + ld a, [wMenuCursorY] + ld [wMenuCursorBuffer], a and a - jr nz, .checkButtons -.done - pop bc - pop de + ret + +.asm_1f7e: ; 00:1f7e + ld a, B_BUTTON + ld [wMenuJoypad], a + ld a, -1 + ld [wMenuSelection], a + scf + ret + +PlaceMenuStrings:: + push de + ld hl, wMenuDataPointerTableAddr + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wMenuSelection] + call GetNthString + ld d, h + ld e, l pop hl + call PlaceString + ret + +ClearWindowData:: ; 00:1f9e + ld hl, wWindowStackPointer + call .bytefill + ld hl, wMenuDataHeader + call .bytefill + ld hl, wMenuData2 + call .bytefill + ld hl, wMenuData3 + call .bytefill + + xor a + call OpenSRAM + + xor a + ld hl, sWindowStackTop + 1 + ld [hld], a + ld [hld], a + ld a, l + ld [wWindowStackPointer], a + ld a, h + ld [wWindowStackPointer + 1], a + + call CloseSRAM + ret + +.bytefill: ; 00:1fcc + ld bc, 16 + xor a + call ByteFill ret -; 0x33e3
\ No newline at end of file diff --git a/home/print_text.asm b/home/print_text.asm new file mode 100644 index 0000000..e8b4eeb --- /dev/null +++ b/home/print_text.asm @@ -0,0 +1,51 @@ +include "constants.asm" + +if DEBUG +SECTION "Print Letter Delay", ROM0[$33a3] +else +SECTION "Print Letter Delay", ROM0[$3367] +endc + +PrintLetterDelay:: ; 33a3 (0:33a3) + ld a, [wce5f] + bit 4, a + ret nz + ld a, [wTextBoxFlags] + bit 1, a + ret z + push hl + push de + push bc + ld a, [wTextBoxFlags] + bit 0, a + jr z, .waitOneFrame + ld a, [wce5f] + and $07 + jr .initFrameCnt +.waitOneFrame + ld a, $01 +.initFrameCnt + ld [wVBlankJoyFrameCounter], a +.checkButtons + call GetJoypad + ldh a, [hJoyState] +.checkAButton + bit 0, a ; is the A button pressed? + jr z, .checkBButton + jr .endWait +.checkBButton + bit 1, a ; is the B button pressed? + jr z, .buttonsNotPressed +.endWait + call DelayFrame + jr .done +.buttonsNotPressed ; if neither A nor B is pressed + ld a, [wVBlankJoyFrameCounter] + and a + jr nz, .checkButtons +.done + pop bc + pop de + pop hl + ret +; 0x33e3
\ No newline at end of file diff --git a/home/rtc.asm b/home/rtc.asm new file mode 100644 index 0000000..6179278 --- /dev/null +++ b/home/rtc.asm @@ -0,0 +1,20 @@ +include "constants.asm" + +if DEBUG +SECTION "Time Of Day Palettes", ROM0 [$032B] +else +SECTION "Time Of Day Palettes", ROM0 [$02EF] +endc + +UpdateTimeOfDayPalettes: ; 32b (0:032b) + ld a, [wVramState] + bit 0, a + ret z +TimeOfDayPals:: + callab _TimeOfDayPals ; Func_8c2e3 + ret + +UpdateTimePals:: ; 33a + callab _UpdateTimePals ; Func_8c335 + ret + diff --git a/home/serial.asm b/home/serial.asm index 48d6832..d51e5a6 100644 --- a/home/serial.asm +++ b/home/serial.asm @@ -16,7 +16,7 @@ Serial:: ldh a, [hSerialSend] ld [rSB], a ldh a, [hLinkPlayerNumber] - cp 2 + cp USING_INTERNAL_CLOCK jr z, .done ld a, 1 << rSC_ON ld [rSC], a @@ -26,7 +26,7 @@ Serial:: ld a, [rSB] ldh [hSerialReceive], a ldh [hLinkPlayerNumber], a - cp 2 + cp USING_INTERNAL_CLOCK jr z, .master xor a ld [rSB], a @@ -43,7 +43,7 @@ Serial:: xor a ld [rSB], a .done - ld a, 1 + ld a, TRUE ldh [hSerialReceived], a ld a, SERIAL_NO_DATA_BYTE ldh [hSerialSend], a @@ -52,3 +52,296 @@ Serial:: pop bc pop af reti + +Serial_ExchangeBytes:: ; 64c + ld a, $1 + ldh [hSerialIgnoringInitialData], a +.loop + ld a, [hl] + ldh [hSerialSend], a + call Serial_ExchangeByte + push bc + ld b, a + inc hl + ld a, $30 +.wait + dec a + jr nz, .wait + ldh a, [hSerialIgnoringInitialData] + and a + ld a, b + pop bc + jr z, .load + dec hl + cp SERIAL_PREAMBLE_BYTE + jr nz, .loop + xor a + ldh [hSerialIgnoringInitialData], a + jr .loop + +.load + ld [de], a + inc de + dec bc + ld a, b + or c + jr nz, .loop + ret + +Serial_ExchangeByte:: ; 677 (0:0677) +.loop + xor a + ldh [hSerialReceived], a + ldh a, [hLinkPlayerNumber] + cp USING_INTERNAL_CLOCK + jr nz, .not_player_2 + ld a, (1 << rSC_ON) | 1 + ldh [rSC], a +.not_player_2 +.loop2 + ldh a, [hSerialReceived] + and a + jr nz, .reset_ffca + ldh a, [hLinkPlayerNumber] + cp $1 + jr nz, .not_player_1_or_wLinkTimeoutFrames_zero + call CheckwLinkTimeoutFramesNonzero + jr z, .not_player_1_or_wLinkTimeoutFrames_zero + call .delay_15_cycles + push hl + ld hl, wLinkTimeoutFrames + 1 + inc [hl] + jr nz, .no_rollover_up + dec hl + inc [hl] + +.no_rollover_up + pop hl + call CheckwLinkTimeoutFramesNonzero + jr nz, .loop2 + jp SerialDisconnected + +.not_player_1_or_wLinkTimeoutFrames_zero + ldh a, [rIE] + and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) + cp 1 << SERIAL + jr nz, .loop2 + ld a, [wcb58] + dec a + ld [wcb58], a + jr nz, .loop2 + ld a, [wcb58 + 1] + dec a + ld [wcb58 + 1], a + jr nz, .loop2 + ldh a, [hLinkPlayerNumber] + cp USING_EXTERNAL_CLOCK + jr z, .reset_ffca + + ld a, 255 +.delay_255_cycles + dec a + jr nz, .delay_255_cycles + +.reset_ffca + xor a + ldh [hSerialReceived], a + ldh a, [rIE] + and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) + sub 1 << SERIAL + jr nz, .rIE_not_equal_8 + + ; LOW($5000) + ld [wcb58], a + ld a, HIGH($5000) + ld [wcb58 + 1], a + +.rIE_not_equal_8 + ldh a, [hSerialReceive] + cp SERIAL_NO_DATA_BYTE + ret nz + call CheckwLinkTimeoutFramesNonzero + jr z, .linkTimeoutFrames_zero + push hl + ld hl, wLinkTimeoutFrames + 1 + ld a, [hl] + dec a + ld [hld], a + inc a + jr nz, .no_rollover + dec [hl] + +.no_rollover + pop hl + call CheckwLinkTimeoutFramesNonzero + jr z, SerialDisconnected + +.linkTimeoutFrames_zero + ldh a, [rIE] + and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) + cp 1 << SERIAL + ld a, SERIAL_NO_DATA_BYTE + ret z + ld a, [hl] + ldh [hSerialSend], a + call DelayFrame + jp .loop + +.delay_15_cycles: ; 70e (0:070e) + ld a, 15 +.delay_cycles + dec a + jr nz, .delay_cycles + ret + +CheckwLinkTimeoutFramesNonzero: ; 714 (0:0714) + push hl + ld hl, wLinkTimeoutFrames + ld a, [hli] + or [hl] + pop hl + ret + +SerialDisconnected: ; 71c (0:071c) + dec a + ld [wLinkTimeoutFrames], a + ld [wLinkTimeoutFrames + 1], a + ret + +; This is used to exchange the button press and selected menu item on the link menu. +; The data is sent thrice and read twice to increase reliability. +Serial_ExchangeLinkMenuSelection:: + ld hl, wPlayerLinkAction + ld de, wOtherPlayerLinkMode + ld c, 2 + ld a, TRUE + ldh [hSerialIgnoringInitialData], a +.asm_0730 + call DelayFrame + ld a, [hl] + ldh [hSerialSend], a + call Serial_ExchangeByte + ld b, a + inc hl + ldh a, [hSerialIgnoringInitialData] + and a + ld a, FALSE + ldh [hSerialIgnoringInitialData], a + jr nz, .asm_0730 + ld a, b + ld [de], a + inc de + dec c + jr nz, .asm_0730 + ret + +Serial_PrintWaitingTextAndSyncAndExchangeNybble:: + call BackUpTilesToBuffer + callab PlaceWaitingText + call WaitLinkTransfer + jp ReloadTilesFromBuffer + +WaitLinkTransfer:: ; 75c (0:075c) + ld a, $ff + ld [wOtherPlayerLinkAction], a +.loop + call LinkTransfer + call DelayFrame + call CheckwLinkTimeoutFramesNonzero + jr z, .check + push hl + ld hl, wLinkTimeoutFrames + 1 + dec [hl] + jr nz, .skip + dec hl + dec [hl] + jr nz, .skip + ; We might be disconnected + pop hl + xor a + jp SerialDisconnected + +.skip + pop hl +.check + ld a, [wOtherPlayerLinkAction] + inc a + jr z, .loop + + ld b, 10 +.receive + call DelayFrame + call LinkTransfer + dec b + jr nz, .receive + + ld b, 10 +.acknowledge + call DelayFrame + call LinkDataReceived + dec b + jr nz, .acknowledge + + ld a, [wOtherPlayerLinkAction] + ld [wOtherPlayerLinkMode], a + ret + +LinkTransfer:: ; 7a0 (0:07a0) + push bc + ld b, $60 + ld a, [wLinkMode] + cp $2 + jr c, .asm_07ac + ld b, $70 + +.asm_07ac + call .Receive + ld a, [wPlayerLinkAction] + add b + ldh [hSerialSend], a + ldh a, [hLinkPlayerNumber] + cp USING_INTERNAL_CLOCK + jr nz, .player_1 + ld a, (1 << rSC_ON) | 1 + ldh [rSC], a + +.player_1 + call .Receive + pop bc + ret + +.Receive: ; 7c4 (0:07c4) + ldh a, [hSerialReceive] + ld [wOtherPlayerLinkMode], a + and $f0 + cp b + ret nz + xor a + ldh [hSerialReceive], a + ld a, [wOtherPlayerLinkMode] + and $f + ld [wOtherPlayerLinkAction], a + ret + +LinkDataReceived:: ; 7d9 (0:07d9) +; Let the other system know that the data has been received. + xor a + ldh [hSerialSend], a + ldh a, [hLinkPlayerNumber] + cp USING_INTERNAL_CLOCK + ret nz + ld a, (1 << rSC_ON) | 1 + ldh [rSC], a + ret + +Unreferenced_Function7e6:: + ld a, [wLinkMode] + and a + ret nz + ld a, USING_INTERNAL_CLOCK + ldh [rSB], a + xor a + ldh [hSerialReceive], a + ld a, (1 << rSC_ON) + ldh [rSC], a + ret diff --git a/home/text.asm b/home/text.asm index 83bbd42..b3cd75c 100644 --- a/home/text.asm +++ b/home/text.asm @@ -1,6 +1,370 @@ INCLUDE "constants.asm" -SECTION "Text Commands", ROM0[$107e] +SECTION "Text Printing Functions", ROM0[$0e18] + +ClearBox:: ; 00:0e18 +; Fill a c*b box at hl with blank tiles. + ld a, " " + ; fallthrough + +FillBoxWithByte:: + ld de, SCREEN_WIDTH +.asm_0e1d: ; 00:0e1d + push hl + push bc +.asm_0e1f: ; 00:0e1f + ld [hli], a + dec c + jr nz, .asm_0e1f + pop bc + pop hl + add hl, de + dec b + jr nz, .asm_0e1d + ret + +ClearTileMap:: ; 00:0e2a +; Fill wTileMap with blank tiles. + + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + ld a, " " + call ByteFill + ldh a, [rLCDC] + bit 7, a + ret z + jp WaitBGMap + +DrawTextBox:: ; 00:0e3d + + ; Top + push hl + ld a, "┌" + ld [hli], a + inc a ; "─" + call .PlaceChars + inc a ; "┐" + ld [hl], a + pop hl + + ; Middle + ld de, SCREEN_WIDTH + add hl, de +.row + push hl + ld a, "│" + ld [hli], a + ld a, " " + call .PlaceChars + ld [hl], "│" + pop hl + + ld de, SCREEN_WIDTH + add hl, de + dec b + jr nz, .row + + ; Bottom + ld a, "└" + ld [hli], a + ld a, "─" + call .PlaceChars + ld [hl], "┘" + + ret +; e6a + +.PlaceChars: ; e6a +; Place char a c times. + ld d, c +.loop + ld [hli], a + dec d + jr nz, .loop + ret +; e70 + +PrintText:: + push hl + hlcoord TEXTBOX_X, TEXTBOX_Y + ld b, TEXTBOX_INNERH + ld c, TEXTBOX_INNERW + call DrawTextBox + call UpdateSprites + call WaitBGMap + pop hl +PrintTextBoxText:: + bccoord TEXTBOX_INNERX, TEXTBOX_INNERY + call TextCommandProcessor + ret + +SpeechTextBox:: +; Standard textbox. + hlcoord TEXTBOX_X, TEXTBOX_Y + ld b, TEXTBOX_INNERH + ld c, TEXTBOX_INNERW + jp DrawTextBox + +PlaceString:: ; 00:0e93 + push hl +PlaceNextChar:: ; 00:0e94 + ld a, [de] + cp "@" + jr nz, CheckDict + ld b, h + ld c, l + pop hl + ret + +CheckDict:: ; 00:0e9d +dict: MACRO +if \1 == 0 + and a +else + cp \1 +endc + jp z, \2 +ENDM + + cp "<NEXT>" + jr nz, .asm_0eaa + pop hl + ld bc, 2 * SCREEN_WIDTH + add hl, bc + push hl + jp NextChar + +.asm_0eaa: ; 00:0eaa + cp "<LINE>" + jr nz, .asm_0eb6 + pop hl + hlcoord 1, 16 + push hl + jp NextChar + +.asm_0eb6: ; 00:0eb6 + dict 0, NullChar + dict "<SCROLL>", _ContTextNoPause + dict "<_CONT>", _ContText + dict "<PARA>", Paragraph + dict "<MOM>", PrintMomsName + dict "<PLAYER>", PrintPlayerName + dict "<RIVAL>", PrintRivalName + dict "#", PlacePOKe + dict "<PC>", PCChar + dict "<ROCKET>", RocketChar + dict "<TM>", TMChar + dict "<TRAINER>", TrainerChar + dict "<CONT>", ContText + dict "<……>", SixDotsChar + dict "<DONE>", DoneText + dict "<PROMPT>", PromptText + dict "<GA>", GaCharacter + dict "<DEXEND>", PlaceDexEnd + dict "<TARGET>", PlaceMoveTargetsName + dict "<USER>", PlaceMoveUsersName + + cp "゚" + jr z, .diacritic + cp "゙" + jr nz, .not_diacritic +.diacritic: ; 00:0f21 + push hl + ld bc, -SCREEN_WIDTH + add hl, bc + ld [hl], a + pop hl + jr NextChar + +.not_diacritic: ; 00:0f2a + cp FIRST_REGULAR_TEXT_CHAR + jr nc, .place + cp "パ" + jr nc, .handakuten + cp FIRST_HIRAGANA_DAKUTEN_CHAR + jr nc, .hiragana_dakuten + add "カ" - "ガ" + jr .katakana_dakuten + +.hiragana_dakuten: ; 00:0f3a + add "か" - "が" +.katakana_dakuten: ; 00:0f3c + push af + ld a, "゙" + push hl + ld bc, -SCREEN_WIDTH + add hl, bc + ld [hl], a + pop hl + pop af + jr .place + +.handakuten: ; 00:0f49 + cp "ぱ" + jr nc, .hiragana_handakuten + add "ハ" - "パ" + jr .katakana_handakuten + +.hiragana_handakuten: ; 00:0f51 + add "は" - "ぱ" +.katakana_handakuten: ; 00:0f53 + push af + ld a, "゚" + push hl + ld bc, -SCREEN_WIDTH + add hl, bc + ld [hl], a + pop hl + pop af +.place: ; 00:0f5e + ld [hli], a + call PrintLetterDelay +NextChar:: ; 00:0f62 + inc de + jp PlaceNextChar + +NullChar:: ; 00:0f66 + ld b, h + ld c, l + pop hl + ld de, .Text + dec de + ret + +.Text: + deciram hTextErrno, 1, 2 + text "エラー" + done + +print_name: MACRO + push de + ld de, \1 + jr PlaceCommandCharacter +ENDM + +PrintMomsName:: print_name wMomsName +PrintPlayerName:: print_name wPlayerName +PrintRivalName:: print_name wRivalsName + +TrainerChar:: print_name TrainerCharText +TMChar:: print_name TMCharText +PCChar:: print_name PCCharText +RocketChar:: print_name RocketCharText +PlacePOKe:: print_name POKeCharText +SixDotsChar:: print_name SixDotsCharText +GaCharacter:: print_name GaCharacterTExt + +PlaceMoveTargetsName:: ; 00:0fb3 + ldh a, [hBattleTurn] + xor $1 + jr asm_0fbb + +PlaceMoveUsersName:: ; 00:0fb9 + ldh a, [hBattleTurn] +asm_0fbb: ; 00:0fbb + push de + and a + jr nz, .asm_0fc4 + ld de, wEnemyMonNickname + jr PlaceCommandCharacter + +.asm_0fc4: ; 00:0fc4 + ld de, EnemyText + call PlaceString + ld h, b + ld l, c + ld de, wBattleMonNickname +PlaceCommandCharacter: ; 00:0fcf + call PlaceString + ld h, b + ld l, c + pop de + inc de + jp PlaceNextChar + +TMCharText:: db "わざマシン@" +TrainerCharText:: db "トレーナー@" +PCCharText:: db "パソコン@" +RocketCharText:: db "ロケットだん@" +POKeCharText:: db "ポケモン@" +SixDotsCharText:: db "……@" +EnemyText:: db "てきの @" +GaCharacterTExt:: db "が @" + +ContText:: ; 00:1001 + push de + ld b, h + ld c, l + ld hl, .Text + call TextCommandProcessor + ld h, b + ld l, c + pop de + inc de + jp PlaceNextChar + +.Text: + text "<_CONT>@" + db "@" + +PlaceDexEnd:: ; 00:1015 + ld [hl], "。" + pop hl + ret + +PromptText:: ; 00:1019 + ld a, [wLinkMode] + cp $3 + jp z, Function1026 + ld a, "▼" + ldcoord_a 18, 17 +Function1026:: ; 00:1026 + call ProtectedWaitBGMap + call ButtonSound + ld a, "─" + ldcoord_a 18, 17 +DoneText:: ; 00:1031 + pop hl + ld de, .Text + dec de + ret + +.Text:: ; 00:1037 + db "@" + +Paragraph:: ; 00:1038 + push de + ld a, "▼" + ldcoord_a 18, 17 + call ProtectedWaitBGMap + call ButtonSound + hlcoord 1, 13 + lb bc, 4, 18 + call ClearBox + ld a, "─" + ldcoord_a 18, 17 + ld c, 20 + call DelayFrames + pop de + hlcoord 1, 14 + jp NextChar + +_ContText:: ; 00:105e + ld a, "▼" + ldcoord_a 18, 17 + call ProtectedWaitBGMap + push de + call ButtonSound + pop de + ld a, "─" + ldcoord_a 18, 17 +_ContTextNoPause:: ; 00:1070 + push de + call ScrollTextUpOneLine + call ScrollTextUpOneLine + hlcoord 1, 16 + pop de + jp NextChar ScrollTextUpOneLine:: ; 107e (0:107e) ; move both rows of text in the normal text box up one row diff --git a/home/time.asm b/home/time.asm new file mode 100644 index 0000000..3eba96c --- /dev/null +++ b/home/time.asm @@ -0,0 +1,138 @@ +include "constants.asm" + +SECTION "RTC and Time Functions", ROM0 [$042B] + +LatchClock: ; 42b (0:042b) + ld a, 0 + ld [MBC3LatchClock], a + ld a, 1 + ld [MBC3LatchClock], a + ret + +UpdateTime:: ; 436 (0:0436) + ldh a, [hRTCStatusFlags] + bit 0, a + ret nz + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a + call LatchClock + ld a, RTC_S + ld [MBC3SRamBank], a + ld a, [MBC3RTC] + and $7f + ldh [hRTCSeconds], a + ld a, RTC_M + ld [MBC3SRamBank], a + ld a, [MBC3RTC] + and $7f + ldh [hRTCMinutes], a + ld a, RTC_H + ld [MBC3SRamBank], a + ld a, [MBC3RTC] + and $1f + ldh [hRTCHours], a + call CloseSRAM + ld a, [wce63] + bit 1, a + jr z, .asm_0478 + ld a, [wd153] + bit 7, a + jr nz, .asm_048a +.asm_0478 + ldh a, [hRTCHours] + ld b, a + ld hl, .Data_049c +.asm_047e + ld a, [hli] + cp b + jr nc, .asm_0485 + inc hl + jr .asm_047e + +.asm_0485 + ld a, [hl] + ld [wTimeOfDay], a + ret + +.asm_048a + ldh a, [hRTCSeconds] + ld b, a + ld hl, .Data_04a4 +.asm_0490 + ld a, [hli] + cp b + jr nc, .asm_0497 + inc hl + jr .asm_0490 + +.asm_0497 + ld a, [hl] + ld [wTimeOfDay], a + ret + +.Data_049c: + db $06, $01 + db $09, $03 + db $0f, $00 + db $18, $01 + +.Data_04a4: + db $1e, $00 + db $23, $01 + db $32, $02 + db $3b, $03 + +Function04ac:: + ld hl, hRTCStatusFlags + set 0, [hl] + call Function04ea + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a + call LatchClock + + ld a, RTC_S + ld [MBC3SRamBank], a + ld a, 0 + ld [MBC3RTC], a + + ld a, RTC_M + ld [MBC3SRamBank], a + ld a, [wStartMinute] + ld [MBC3RTC], a + + ld a, RTC_H + ld [MBC3SRamBank], a + ld a, [wStartHour] + ld [MBC3RTC], a + + ld a, [wStartDay] + ldh [hRTCDays], a + + call CloseSRAM + ld hl, hRTCStatusFlags + res 0, [hl] + ret + +Function04ea:: ; 4ea (0:04ea) + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a + call LatchClock + ld a, RTC_DH + ld [MBC3SRamBank], a + ld a, [MBC3RTC] + set 6, a + ld [MBC3RTC], a + call CloseSRAM + ret + +Function0502:: ; 0502 + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a + call LatchClock + ld a, RTC_DH + ld [MBC3SRamBank], a + ld a, [MBC3RTC] + res 6, a + ld [MBC3RTC], a + call CloseSRAM + ret diff --git a/home/unknown.asm b/home/unknown.asm index 5b9a6e1..e2cc5cd 100644 --- a/home/unknown.asm +++ b/home/unknown.asm @@ -121,3 +121,18 @@ _20F1:: ; 20f1 ld [de], a inc de ret + +SECTION "Unknown_094c", ROM0 [$094C] + +Function094c:: + ldh a, [hROMBank] + push af + ld a, BANK(Functionfe255) + call Bankswitch + + call Functionfe255 + + pop af + call Bankswitch + + jp Function4031 diff --git a/home/vcopy.asm b/home/vcopy.asm index a453da5..8e916f2 100644 --- a/home/vcopy.asm +++ b/home/vcopy.asm @@ -545,7 +545,7 @@ EnableSprites:: ; 1531 (0:1531) ret ; 0x1538 -Function_1538: ; 1538 (0:1538) +Function1538: ; 1538 (0:1538) ld a, [$d14f] bit 0, a ret z diff --git a/home/window.asm b/home/window.asm new file mode 100644 index 0000000..1815e89 --- /dev/null +++ b/home/window.asm @@ -0,0 +1,23 @@ +include "constants.asm" + +SECTION "Window Functions", ROM0[$1fd4] + +RefreshScreen:: + call ClearWindowData + ldh a, [hROMBank] + push af + ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; and BANK(LoadFonts_NoOAMUpdate) + call Bankswitch + + call ReanchorBGMap_NoOAMUpdate + call LoadFonts_NoOAMUpdate + + pop af + call Bankswitch + ret + +Function1fea:: + call Function3171 + call ClearWindowData + call Function202c + ret @@ -9,7 +9,9 @@ hRTCHours:: db ; ff8d hRTCMinutes:: db ; ff8e hRTCSeconds:: db ; ff8f hRTCDays:: db ; ff90 - ds 6 ; TODO + ds 2 ; TODO +hRTCStatusFlags:: db ; ff93 + ds 3 ; TODO hVBlankCounter:: ; ff97 db @@ -62,6 +64,10 @@ UNION hTextBoxCursorBlinkInterval:: ds 2 ; ffaf NEXTU + ds 1 ; TODO +hTextErrno:: db ; ffb0 + +NEXTU hSpriteWidth:: ; ffaf hSpriteInterlaceCounter:: ; ffaf @@ -112,8 +118,8 @@ hSerialReceived:: ; ffd4 hLinkPlayerNumber:: ; ffd5 db - - db ; TODO +hSerialIgnoringInitialData:: + db hSerialSend:: ; ffd7 diff --git a/macros/farcall.asm b/macros/farcall.asm index 50bb232..05bb7b1 100644 --- a/macros/farcall.asm +++ b/macros/farcall.asm @@ -20,3 +20,15 @@ homecall: MACRO pop af call Bankswitch ENDM + +jpba: MACRO + ld a, BANK(\1) + ld hl, \1 + jp FarCall_hl +ENDM + +jpab: MACRO + ld hl, \1 + ld a, BANK(\1) + jp FarCall_hl +ENDM @@ -1,26 +1,27 @@ ; ROM0 -00:032b UpdateTimeOfDayPalettes -00:0436 UpdateTime -00:051C Reset -00:0D0A LoadFont -00:0D1A LoadFontExtra -00:0E18 ClearBox -00:0E2A ClearTileMap -00:0E3D DrawTextBox -00:0E93 PlaceString -00:0E94 PlaceNextChar -00:0E9D CheckDict -00:15be GetMapObject +00:15BE GetMapObject 00:1720 CheckObjectVisibility -00:17bf GetObjectStruct -00:1d49 LoadMenuHeader -00:1e58 OpenMenu -00:1F9E ClearWindowData -00:1FCC ClearWindowData.bytefill +00:17A8 UpdateSprites +00:17BF GetObjectStruct +00:1A7C Function1a7c +00:1BF4 PushWindow +00:1BFC ExitMenu +00:1C44 InitVerticalMenuCursor +00:1C4C CloseWindow +00:1C60 Function1c60 ; PopWindow? +00:1C7A Function1c7a ; HandleWindow? +00:1C86 Function1c86 +00:1C96 CopyMenuData +00:1CAE Function1cae ; PushWindow? +00:1CB9 PlaceVerticalMenuItems +00:1CEB MenuBox +00:1D2D MenuBoxCoord2Tile +00:202C Function202c -00:23dc LoadWildMons -00:23e5 FadeIn ; This is not OverworldFadeIn, but I don't know what it is +00:23DC LoadWildMons +00:23E5 FadeIn ; This is not OverworldFadeIn, but I don't know what it is 00:2C05 StartMenuCheck +00:3171 Function3171 00:3621 WaitBGMap 00:362B SetPalettes 00:3634 ClearPalettes @@ -47,196 +48,141 @@ 00:3E32 Unk_3E32 -01:4031 Function_4031 +01:4031 Function4031 01:53CC MainMenu -01:5D27 Function_5d27 +01:5D27 Function5d27 01:6114 TitleScreenInputAndTimeout -01:6445 Function_6445 -01:66B1 Function_66b1 -01:6713 Function_6713 +01:63D8 ReanchorBGMap_NoOAMUpdate +01:6437 LoadFonts_NoOAMUpdate +01:6445 Function6445 +01:66B1 Function66b1 +01:6713 Function6713 01:68F3 ItemAttributes -02:4786 Function_8786 +02:4000 Function8000 02:4098 _InitializeVisibleSprites +02:4786 Function8786 02:4856 DecompTownMapTilemap 02:48DA DecompTownMapTilemap.tilemap 02:4C7C DrawMap 02:4DC2 TownMapGfx 02:4F32 PokegearRadioGfx -02:528B Function_928b +02:528B Function928b 02:5695 CheckSGB 03:4791 DebugWarp 03:479F DebugWarp.Destinations -03:4D33 Function_cd33 -03:4D6F Function_cd6f -03:4DE3 Function_cde3 -03:4DE3 Function_cde3_2 -03:4DE3 Function_cde3_3 -03:4DF9 Function_cdf9 -03:4E10 Function_ce10 -03:4E10 Function_ce10_2 -03:4E3C Function_ce3c -03:4E7C Function_ce7c -03:5886 Function_d886 -03:5A28 Function_da28 -03:5A4F Function_da4f -03:5AC8 Function_dac8 -03:5C16 Function_dc16 -03:5CFC Function_dcfc -03:5D5C Function_dd5c -03:5E79 Function_de79 -03:5F7D Function_df7d -03:5F91 Function_df91 +03:4D33 Functioncd33 +03:4D6F Functioncd6f +03:4DE3 Functioncde3 +03:4DE3 Functioncde3_2 +03:4DE3 Functioncde3_3 +03:4DF9 Functioncdf9 +03:4E10 Functionce10 +03:4E10 Functionce10_2 +03:4E3C Functionce3c +03:4E7C Functionce7c +03:5886 Functiond886 +03:5A28 Functionda28 +03:5A4F Functionda4f +03:5AC8 Functiondac8 +03:5C16 Functiondc16 +03:5CFC Functiondcfc +03:5D5C Functiondd5c +03:5E79 Functionde79 +03:5F7D Functiondf7d +03:5F91 Functiondf91 -04:528F Function_1128f -04:52C1 Function_112c1 +04:528F Function1128f +04:52C1 Function112c1 04:5677 DoPlayerMovement 04:5DBE DisplayStartMenu -04:640B Function_1240b +04:640B Function1240b 04:6C58 CheckRegisteredItem -05:400a GetPlayerSprite +05:4000 Function14000 +05:400A GetPlayerSprite 05:4036 AddMapSprites -05:404c CheckInteriorMap -05:405b AddIndoorSprites -05:40aa AddOutdoorSprites -05:40fb LoadUsedSpritesGfx ; TODO: maybe there's a better name -05:43E0 Function_143e0 -05:457A Function_1457a -05:45B8 Function_145b8 -05:45DE Function_145de -05:46DC Function_146dc +05:404C CheckInteriorMap +05:405B AddIndoorSprites +05:40AA AddOutdoorSprites +05:40FB LoadUsedSpritesGfx ; TODO: maybe there's a better name +05:43E0 Function143e0 +05:457A Function1457a +05:45B8 Function145b8 +05:45DE Function145de +05:46DC Function146dc ; Structure: ; byte Map group ($ff = end) ; byte Map ID ; ptr Copied to c5e9, also byte pointed to written at wMapScriptNumber ; ptr Copied to c5eb ; word Unknown (2 bytes) -05:470e UnknownMapBufferPointers +05:470E UnknownMapBufferPointers -0A:4C98 Function_28c98 -0A:4D6E Function_28d6e -0A:4DA4 Function_28da4 +0A:4C98 Function28c98 +0A:4D6E Function28d6e +0A:4DA4 Function28da4 -0B:5663 Function_2d663 +0B:5663 Function2d663 -0e:4b78 LoadTrainerClassName -0e:4ba0 LoadTrainerClassName.got_name -0e:4ba9 LoadTrainerClass +0E:4B78 LoadTrainerClassName +0E:4BA0 LoadTrainerClassName.got_name +0E:4BA9 LoadTrainerClass -0F:508C Function_3d08c -0F:55CE Function_3d5ce -0F:567C Function_3d67c -0F:61A4 Function_3e1a4 -0F:6874 Function_3e874 -0F:691E Function_3e91e -0F:6963 Function_3e963 -0f:69a9 _LoadWildMons -0F:6F19 Function_3ef19 -0F:7019 Function_3f019 -0F:704A Function_3f04a -0F:7068 Function_3f068 +0F:508C Function3d08c +0F:55CE Function3d5ce +0F:567C Function3d67c +0F:61A4 Function3e1a4 +0F:6874 Function3e874 +0F:691E Function3e91e +0F:6963 Function3e963 +0F:69A9 _LoadWildMons +0F:6F19 Function3ef19 +0F:7019 Function3f019 +0F:704A Function3f04a +0F:7068 Function3f068 -10:4000 Function_40000 +10:4000 Function40000 10:40A6 ShowPokedexMenu -10:4AC7 Function_40ac7 -10:4B5C Function_40b5c -10:5FA1 Function_41fa1 -10:61F8 Function_421f8 -10:6252 Function_42252 +10:4AC7 Function40ac7 +10:4B5C Function40b5c +10:5FA1 Function41fa1 +10:61F8 Function421f8 +10:6252 Function42252 -14:4000 Function_50000 -14:4073 Function_50073 -14:40A0 Function_500a0 -14:40C6 Function_500c6 -14:4244 Function_50244 -14:4248 Function_50248 -14:42B5 Function_502b5 -14:469E Function_5069e -14:46D4 Function_506d4 -14:4771 Function_50771 -14:4774 Function_50774 -14:481F Function_5081f -14:48C4 Function_508c4 -14:4B92 Function_50b92 -14:4BCD Function_50bcd -14:4BFE Function_50bfe -14:4ED9 Function_50ed9 +14:4000 Function50000 +14:4073 Function50073 +14:40A0 Function500a0 +14:40C6 Function500c6 +14:4244 Function50244 +14:4248 Function50248 +14:42B5 Function502b5 +14:469E Function5069e +14:46D4 Function506d4 +14:4771 Function50771 +14:4774 Function50774 +14:481F Function5081f +14:48C4 Function508c4 +14:4B92 Function50b92 +14:4BCD Function50bcd +14:4BFE Function50bfe +14:4ED9 Function50ed9 23:4000 AnimateTilesetImpl -23:42dc UpdateTimeOfDayPal +23:42DC UpdateTimeOfDayPal +23:42E3 _TimeOfDayPals +23:4335 _UpdateTimePals 23:4354 ReplaceTimeOfDayPals 23:4370 GetTimePalette -23:44BE Function_8c4be -23:4940 Function_8c940 -23:49C6 Function_8c9c6 -23:60cc MenuMonIconGfx +23:44BE Function8c4be +23:4940 Function8c940 +23:49C6 Function8c9c6 +23:60CC MenuMonIconGfx 24:4000 SetClockDialog 24:4239 SlotMachineGame -32:76FF Function_cb6ff -32:7710 Function_cb710 -32:7733 Function_cb733 -33:4000 Function_cc000 -33:4000 Function_cc000_2 -33:4001 Function_cc001 -33:467B QueueBattleAnimation -33:625D BattleAnim_Sine_e -33:6263 BattleAnim_Cosine_e -3A:441D Function_e841d -3A:45D8 Function_e85d8 -3A:47F9 Function_e87f9 -3A:4839 Function_e8839 -3A:484F Function_e884f -3A:4D9D _PlayCryHeader -3A:4E22 _PlaySFX -3A:4F11 LoadChannel -3A:4F6C LoadMusicByte -3A:52C7 Music -3F:40E9 InGameDebugMenu -3F:5B66 Function_fdb66 -3F:64CE MonsterTest -3F:654E PicTest -3F:6750 PicTestMenu -3F:6755 PicTestMenu.loop - -00:CBF2 wWindowData -00:CBF2 wWindowStackPointer -00:CC02 wMenuDataHeader -00:CC12 wMenuData2 -00:CC22 wMenuData3 -00:ce67 wPlayerName - -01:d165 wTMCounts -01:d19e wItems -01:d258 wRivalName -01:D264 wPlayerBikeSurfState -; The starting house's map script number is stored at d29a. Others are probably nearby. -01:d35f wOptions -01:d656 wMapGroup -01:d657 wMapId -01:D7D2 wPartyMonOT -01:DA3B wOTPartyMonOT -; MapAttributes -36:59DF Route1P1_MapAttributes -36:5ABE Route1P2_MapAttributes -36:724D RouteSilentEast_MapAttributes -36:4014 SilentHill_MapAttributes -26:4000 Route1Gate1F_MapAttributes -26:40DA Route1Gate2F_MapAttributes -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 -2F:53DD ShizukanaOka_MapAttributes -36:5BD4 Route2_MapAttributes -36:410D OldCity_MapAttributes 25:4000 Route2Gate1F_MapAttributes 25:407C Route2Gate2F_MapAttributes 25:40DC Route2House_MapAttributes @@ -257,7 +203,9 @@ 25:492F OldCityPokecenterTimeMachine_MapAttributes 25:49AC OldCityKurtsHouse_MapAttributes 25:4A26 OldCitySchool_MapAttributes -36:4372 West_MapAttributes + +26:4000 Route1Gate1F_MapAttributes +26:40DA Route1Gate2F_MapAttributes 26:4224 WestMart1F_MapAttributes 26:42A0 WestMart2F_MapAttributes 26:4374 WestMart3F_MapAttributes @@ -276,9 +224,7 @@ 26:4B5E WestGym_MapAttributes 26:4C1A WestHouse1_MapAttributes 26:4C9E WestHouse2_MapAttributes -36:5CC6 HaitekuWestRoute_MapAttributes -36:5DD1 HaitekuWestRouteOcean_MapAttributes -36:45D2 Haiteku_MapAttributes + 27:4000 HaitekuWestRouteGate_MapAttributes 27:405B HaitekuPokecenter1F_MapAttributes 27:40EF HaitekuPokecenter2F_MapAttributes @@ -290,13 +236,6 @@ 27:43DD HaitekuImposterOakHouse_MapAttributes 27:4444 HaitekuAquarium1F_MapAttributes 27:44CB HaitekuAquarium2F_MapAttributes -36:5F17 FontoRoute1_MapAttributes -36:61E8 FontoRoute2_MapAttributes -36:63B2 FontoRoute3_MapAttributes -36:62C6 FontoRoute4_MapAttributes -36:7444 FontoRoute5_MapAttributes -36:6083 FontoRoute6_MapAttributes -36:47F8 Fonto_MapAttributes 27:4537 FontoRouteGate1_MapAttributes 27:4592 FontoRouteGate2_MapAttributes 27:45ED FontoRouteGate3_MapAttributes @@ -306,12 +245,6 @@ 27:47AF FontoPokecenter1F_MapAttributes 27:4843 FontoPokecenter2F_MapAttributes 27:48BC FontoLab_MapAttributes -36:64BD BaadonRoute1_MapAttributes -36:6603 BaadonRoute2_MapAttributes -36:67EF BaadonRoute3_MapAttributes -36:48F3 Baadon_MapAttributes -27:4CDD BaadonRouteGateWest_MapAttributes -27:4D38 BaadonRouteGateNewtype_MapAttributes 27:4923 BaadonMart_MapAttributes 27:49A3 BaadonPokecenter1F_MapAttributes 27:4A2A BaadonPokecenter2F_MapAttributes @@ -320,15 +253,8 @@ 27:4B42 BaadonHouse2_MapAttributes 27:4B9C BaadonLeague1F_MapAttributes 27:4C3D BaadonLeague2F_MapAttributes -36:68DB Route15_MapAttributes -36:69BD NewtypeRoute_MapAttributes -36:6A6E Route18_MapAttributes -36:49F9 Newtype_MapAttributes -27:52E0 Route15Pokecenter1F_MapAttributes -27:5374 Route15Pokecenter2F_MapAttributes -27:53C6 NewtypeRouteGate_MapAttributes -27:5421 Route18Pokecenter1F_MapAttributes -27:54B5 Route18Pokecenter2F_MapAttributes +27:4CDD BaadonRouteGateWest_MapAttributes +27:4D38 BaadonRouteGateNewtype_MapAttributes 27:4D93 NewtypePokecenter1F_MapAttributes 27:4E27 NewtypePokecenter2F_MapAttributes 27:4EA0 NewtypeLeague1F_MapAttributes @@ -340,18 +266,17 @@ 27:51AF NewtypeDiner_MapAttributes 27:522C NewtypeHouse2_MapAttributes 27:5286 NewtypeHouse3_MapAttributes -36:6D8F SugarRoute_MapAttributes -36:4C3A Sugar_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 -36:6C6F BullForestRoute1_MapAttributes -36:6ED5 BullForestRoute2_MapAttributes -36:7530 BullForestRoute3_MapAttributes -36:4D05 BullForest_MapAttributes 27:57C5 BullForestRoute1House_MapAttributes 27:581F BullForestRouteGateStand_MapAttributes 27:587A BullMart_MapAttributes @@ -363,8 +288,6 @@ 27:5B11 BullLeague1F_MapAttributes 27:5BB2 BullLeague2F_MapAttributes 27:5C52 BullHouse4_MapAttributes -36:701B StandRoute_MapAttributes -36:4F28 Stand_MapAttributes 27:5C9F StandRouteGateKanto_MapAttributes 27:5CFA StandLab_MapAttributes 27:5D50 StandPokecenter1F_MapAttributes @@ -376,8 +299,6 @@ 27:6024 StandRocketHouse2F_MapAttributes 27:6083 StandLeague1F_MapAttributes 27:6124 StandLeague2F_MapAttributes -36:7161 KantoEastRoute_MapAttributes -36:519D Kanto_MapAttributes 27:61C4 KantoCeruleanHouse_MapAttributes 27:621E KantoPokecenter1F_MapAttributes 27:62B2 KantoPokecenter2F_MapAttributes @@ -414,22 +335,17 @@ 27:713B KantoLeague21F_MapAttributes 27:71DC KantoLeague22F_MapAttributes 27:727C KantoFishingGuru_MapAttributes -36:738C PrinceRoute_MapAttributes -36:55F3 Prince_MapAttributes -36:73E8 MtFujiRoute_MapAttributes -36:5677 MtFuji_MapAttributes -36:56EF South_MapAttributes 27:72D6 SouthHouse1_MapAttributes 27:7330 SouthPokecenter1F_MapAttributes 27:73C4 SouthPokecenter2F_MapAttributes 27:743D SouthMart_MapAttributes 27:74BD SouthHouse2_MapAttributes -36:5914 North_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 @@ -448,3 +364,99 @@ 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 + +33:4000 Functioncc000 +33:4000 Functioncc000_2 +33:4001 Functioncc001 +33:467B QueueBattleAnimation +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: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 + +3A:441D Functione841d +3A:45D8 Functione85d8 +3A:47F9 Functione87f9 +3A:4839 Functione8839 +3A:484F Functione884f +3A:4D9D _PlayCryHeader +3A:4E22 _PlaySFX +3A:4F11 LoadChannel +3A:4F6C LoadMusicByte +3A:52C7 Music + +3F:40E9 InGameDebugMenu +3F:5B66 Functionfdb66 +3F:6255 Functionfe255 +3F:64CE MonsterTest +3F:654E PicTest +3F:6750 PicTestMenu +3F:6755 PicTestMenu.loop + +00:CC22 wMenuData3 +00:CE67 wPlayerName + +01:D165 wTMCounts +01:D19E wItems +01:D258 wRivalName +01:D264 wPlayerBikeSurfState +; The starting house's map script number is stored at d29a. Others are probably nearby. +01:D35F wOptions +01:D656 wMapGroup +01:D657 wMapId +01:D7D2 wPartyMonOT +01:DA3B wOTPartyMonOT @@ -10,3 +10,6 @@ SECTION "Unknown, bank 0", SRAM[$A600],BANK[0] s0_a600:: ; TODO: properly label this ds 7 ; TODO: figure out exact size + +SECTION "Window Stack Top", SRAM[$BFFE], BANK[0] +sWindowStackTop:: dw @@ -166,8 +166,12 @@ ENDU ; c813 ds $32 wBattleAnimEnd:: ; c845 + ds $1b1 ; TODO - ds $1f8 ; TODO +wBattleMonNickname:: ds 6 ; c9f6 +wEnemyMonNickname:: ds 6 ; c9fc +; ca02 + ds $3b ; TODO wPlayerSubStatus3:: db ; ca3d ds $4 @@ -201,7 +205,18 @@ wRedrawFlashlightWidthHeight:: db ; cb20 ; in units of two tiles (people event meta tile) ENDU -SECTION "CB5B", WRAM0[$CB5B] +SECTION "CB56", WRAM0[$CB4C] +wOtherPlayerLinkMode:: db ; cb4c +wOtherPlayerLinkAction:: db ; cb4d + ds 3 ; TODO + +wPlayerLinkAction:: db ; cb51 + ds 4 ; TODO + +wLinkTimeoutFrames:: dw ; cb56 +wcb58:: ds 2 ; cb58 +; cb5a + ds 1 ; TODO wCurSpecies:: db ; cb5b wNamedObjectTypeBuffer:: db ; cb5c @@ -234,18 +249,43 @@ wTileRight:: db ; cb93 SECTION "CBD2", WRAM0[$CBD2] wcbd2:: ; cbd2 ds $14 +; cbe6 -SECTION "CBF7", WRAM0[$CBF7] +SECTION "CBF2", WRAM0[$CBF2] +wWindowData:: +wWindowStackPointer:: dw ; cbf2 +wMenuJoypad:: db ; cbf4 +wMenuSelection:: db ; cbf5 +wMenuSelectionQuantity:: db ; cbf6 wWhichIndexSet:: wActiveBackpackPocket:: db ; cbf7 - -SECTION "CC09", WRAM0[$CC09] - +wScrollingMenuCursorPosition:: db ; cbf8 +wWindowStackSize:: db ; cbf9 + +SECTION "CC09", WRAM0[$CC02] + +wMenuDataHeader:: + db ; cc02 +wMenuBorderTopCoord:: db ; cc03 +wMenuBorderLeftCoord:: db ; cc04 +wMenuBorderBottomCoord:: db ; cc05 +wMenuBorderRightCoord:: db ; cc06 +wMenuDataPointer:: dw ; cc07 wMenuCursorBuffer:: db ; cc09 +; cc0a + ds 8 ; TODO + +wMenuData2:: + db ; cc12 +wMenuDataItems:: db ; cc13 +wMenuDataIndicesPointer:: dw ; cc14 +wMenuDataDisplayFunctionPointer:: dw ; cc16 +wMenuDataPointerTableAddr:: dw ; cc18 -SECTION "CC2A", WRAM0[$CC2A] +SECTION "CC2A", WRAM0[$CC29] +wMenuJoypadFilter:: db ; cc29 wMenuCursorY:: db ; cc2a SECTION "CC32", WRAM0[$CC32] ; Please merge when more is disassembled @@ -314,9 +354,13 @@ wStringBuffer1:: ds 1 ; How long is this? ; cd26 SECTION "CD31", WRAM0[$CD31] +wStartDay:: wcd31:: ; cd31 db +wStartHour:: db +wStartMinute:: db + SECTION "CD3E", WRAM0[$CD3D] wRegularItemsCursor:: db ; cd3d @@ -345,6 +389,9 @@ wPredefBC:: ; cd54 wFarCallBCBuffer:: ; cd54 dw + ds 3 ; TODO +wVramState:: db + SECTION "CD72", WRAM0[$CD72] wcd72:: dw ; cd72 @@ -486,6 +533,8 @@ wce63:: db ; ce63 ; 76543210 ; \-- global debug enable +SECTION "Mom's Name", WRAM0[$CE6D] +wMomsName:: ds 6 ; ce6d SECTION "CE7F", WRAM0[$CE76] @@ -571,6 +620,9 @@ SECTION "D1DE", WRAM0[$D1DE] wNumBallItems:: db ; d1de wBallQuantities:: db ; d1df +SECTION "Rival's Name", WRAM0[$D258] +wRivalsName:: ds 6 ; d258 + SECTION "D4AB", WRAM0[$D4AB] wJoypadFlags:: db ; d4ab |
