From efee40447ef4bce70cb97fa9c653fe350af000d1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 17 Dec 2015 13:49:26 -0500 Subject: [PATCH] Mobile trade animations, pokepic animations --- battle/core.asm | 10 +- engine/breeding/egg.asm | 2 +- engine/intro_menu.asm | 6 +- engine/link.asm | 6 +- engine/mart.asm | 2 +- engine/stats_screen.asm | 2 +- engine/trade/animation.asm | 47 +- gfx/pics/animation.asm | 144 +++--- home/movement.asm | 2 +- macros/trade_anim.asm | 149 ++++-- main.asm | 54 +-- misc/gfx_41.asm | 2 +- misc/mobile_40.asm | 67 +-- misc/mobile_42.asm | 958 ++++++++++++++++++++----------------- text/common_2.asm | 48 +- wram.asm | 20 +- 16 files changed, 844 insertions(+), 675 deletions(-) diff --git a/battle/core.asm b/battle/core.asm index aa656652e..cf550a465 100644 --- a/battle/core.asm +++ b/battle/core.asm @@ -7577,7 +7577,7 @@ endr sbc c ld a, [hl] sbc b - jr c, .max_exp + jr c, .not_max_exp ld a, b ld [hli], a ld a, c @@ -7585,7 +7585,7 @@ endr ld a, d ld [hld], a -.max_exp +.not_max_exp xor a ; PARTYMON ld [MonType], a predef CopyPkmnToTempMon @@ -7599,7 +7599,7 @@ endr cp d jp z, .skip_stats ; grew to level ##! - ld [wc719], a + ld [wTempLevel], a ld a, [CurPartyLevel] push af ld a, d @@ -7707,7 +7707,7 @@ endr ld c, $9 call TextBox hlcoord 11, 1 - ld bc, $0004 + ld bc, 4 predef PrintTempMonStats ld c, $1e call DelayFrames @@ -7720,7 +7720,7 @@ endr ld a, [CurPartyLevel] push af ld c, a - ld a, [wc719] + ld a, [wTempLevel] ld b, a .level_loop diff --git a/engine/breeding/egg.asm b/engine/breeding/egg.asm index 4c2ff4c4c..221626bcf 100755 --- a/engine/breeding/egg.asm +++ b/engine/breeding/egg.asm @@ -703,7 +703,7 @@ EggHatch_AnimationSequence: ; 1728f (5:728f) push af ld de, MUSIC_NONE call PlayMusic - callba Function8000 + callba BlankScreen call DisableLCD ld hl, EggHatchGFX ld de, VTiles0 tile $00 diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm index 7c80f1005..ca80665b4 100755 --- a/engine/intro_menu.asm +++ b/engine/intro_menu.asm @@ -1067,7 +1067,7 @@ endr .jumptable dw _MainMenu - dw Function6389 + dw DeleteSaveData dw CrystalIntroSequence dw CrystalIntroSequence dw ResetClock @@ -1320,8 +1320,8 @@ TitleScreenEnd: ; 6375 ret ; 6389 -Function6389: ; 6389 - callba Function4d54c +DeleteSaveData: ; 6389 + callba _DeleteSaveData jp Init ; 6392 diff --git a/engine/link.asm b/engine/link.asm index 677c503fa..2083c9fb6 100755 --- a/engine/link.asm +++ b/engine/link.asm @@ -1258,7 +1258,7 @@ Function28835: ; 28835 ld [wd263], a callab Function50db9 ld hl, OTPartyMon1Species - callba Function4d319 + callba LinkMonStatsScreen jp Function2891c .asm_2885b @@ -1276,7 +1276,7 @@ Function28835: ; 28835 push bc ld bc, NAME_LENGTH add hl, bc - ld [hl], $7f + ld [hl], " " pop bc pop hl ld a, [PartyCount] @@ -1450,7 +1450,7 @@ Function28926: ; 28926 ld a, $4 ld [wd263], a callab Function50db9 - callba Function4d319 + callba LinkMonStatsScreen call Call_LoadTempTileMapToTileMap hlcoord 6, 1 lb bc, 6, 1 diff --git a/engine/mart.asm b/engine/mart.asm index 7d92e468b..d051d4632 100755 --- a/engine/mart.asm +++ b/engine/mart.asm @@ -369,7 +369,7 @@ BargainShopData: ; 15c51 BuyMenu: ; 15c62 call FadeToMenu - callba Function8000 + callba BlankScreen xor a ld [wd045 + 1], a ld a, 1 diff --git a/engine/stats_screen.asm b/engine/stats_screen.asm index ae6f9150e..4e3a6d9b3 100755 --- a/engine/stats_screen.asm +++ b/engine/stats_screen.asm @@ -120,7 +120,7 @@ Function4dd3a: ; 4dd3a (13:5d3a) call DelayFrame ret .asm_4dd49 - callba Functiond00b4 + callba SetUpPokeAnim jr nc, .asm_4dd56 ld hl, wcf64 res 6, [hl] diff --git a/engine/trade/animation.asm b/engine/trade/animation.asm index fe356d70a..a084fc3be 100755 --- a/engine/trade/animation.asm +++ b/engine/trade/animation.asm @@ -180,23 +180,23 @@ Function28fdb: ; 28fdb ld [hWX], a ld a, $90 ld [hWY], a - callba Function4d7fd + callba GetTrademonFrontpic call EnableLCD call Function2982b ld a, [wPlayerTrademonSpecies] ld hl, wPlayerTrademonDVs ld de, VTiles0 - call Function29491 + call TradeAnim_GetFrontpic ld a, [wOTTrademonSpecies] ld hl, wOTTrademonDVs ld de, VTiles0 tile $31 - call Function29491 + call TradeAnim_GetFrontpic ld a, [wPlayerTrademonSpecies] ld de, wPlayerTrademonSpeciesName - call Function294a9 + call TradeAnim_GetNickname ld a, [wOTTrademonSpecies] ld de, wOTTrademonSpeciesName - call Function294a9 + call TradeAnim_GetNickname call Function297ed ret ; 29082 @@ -368,7 +368,7 @@ Function2914e: ; 2914e call WaitBGMap ld b, SCGB_1B call GetSGBLayout - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbBGPals ld a, $d0 call DmgToCgbObjPal0 @@ -566,6 +566,7 @@ Function292be: ; 292be hlcoord 17, 3 ld a, $5d ld [hl], a + ld a, $61 ld de, SCREEN_WIDTH ld c, $3 @@ -574,6 +575,7 @@ Function292be: ; 292be ld [hl], a dec c jr nz, .loop + add hl, de ld a, $5f ld [hld], a @@ -644,9 +646,9 @@ TradeAnim_EnterLinkTube: ; 29348 call WaitBGMap ld b, SCGB_1B call GetSGBLayout - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbBGPals - ld de, $e4e4 + lb de, %11100100, %11100100 ; 3,2,1,0, 3,2,1,0 call DmgToCgbObjPals ld de, SFX_POTION call PlaySFX @@ -784,9 +786,9 @@ TradeAnim_ShowGivemonData: ; 2942e ld [TempMonDVs + 1], a ld b, SCGB_1A call GetSGBLayout - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbBGPals - call Function294bb + call TradeAnim_ShowGivemonFrontpic ld a, [wPlayerTrademonSpecies] call GetCryIndex @@ -810,20 +812,20 @@ TradeAnim_ShowGetmonData: ; 29461 ld [TempMonDVs + 1], a ld b, SCGB_1A call GetSGBLayout - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbBGPals - call Function294c0 + call TradeAnim_ShowGetmonFrontpic call TradeAnim_Next ret ; 29487 TradeAnim_AnimateFrontpic: ; 29487 - callba Function4d81e + callba AnimateTrademonFrontpic call TradeAnim_Next ret ; 29491 -Function29491: ; 29491 +TradeAnim_GetFrontpic: ; 29491 push de push af predef GetUnownLetter @@ -836,7 +838,7 @@ Function29491: ; 29491 ret ; 294a9 -Function294a9: ; 294a9 +TradeAnim_GetNickname: ; 294a9 push de ld [wd265], a call GetPokemonName @@ -847,14 +849,13 @@ Function294a9: ; 294a9 ret ; 294bb -Function294bb: ; 294bb +TradeAnim_ShowGivemonFrontpic: ; 294bb ld de, VTiles0 - jr Function294c3 + jr TradeAnim_ShowFrontpic -Function294c0: ; 294c0 +TradeAnim_ShowGetmonFrontpic: ; 294c0 ld de, VTiles0 tile $31 - -Function294c3: ; 294c3 +TradeAnim_ShowFrontpic: ; 294c3 call DelayFrame ld hl, VTiles2 lb bc, 10, $31 @@ -1087,7 +1088,7 @@ TradeAnim_Poof: ; 29649 ; 29660 TradeAnim_BulgeThroughTube: ; 29660 - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbObjPal0 depixel 5, 11 ld a, SPRITE_ANIM_INDEX_10 @@ -1374,13 +1375,13 @@ Function297db: ; 297db Function297ed: ; 297ed ld a, [hSGB] and a - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 jr z, .asm_297f6 ld a, $f0 .asm_297f6 call DmgToCgbObjPal0 - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbBGPals ret ; 297ff diff --git a/gfx/pics/animation.asm b/gfx/pics/animation.asm index ea87f97e5..182577cbc 100644 --- a/gfx/pics/animation.asm +++ b/gfx/pics/animation.asm @@ -97,7 +97,7 @@ AnimateFrontpic: ; d008e ret c call LoadMonAnimation .loop - call Functiond00b4 + call SetUpPokeAnim push af callba Function10402d pop af @@ -121,7 +121,7 @@ endr ret ; d00b4 -Functiond00b4: ; d00b4 +SetUpPokeAnim: ; d00b4 ld a, [rSVBK] push af ld a, $2 @@ -184,8 +184,8 @@ PokeAnim_Wait: ; d00fe ; d010b PokeAnim_Setup: ; d010b - ld c, $0 - ld b, $0 + ld c, FALSE + ld b, 0 call Functiond0228 call Functiond0504 ld a, [wPokeAnimSceneIndex] @@ -195,8 +195,8 @@ PokeAnim_Setup: ; d010b ; d011d PokeAnim_Setup2: ; d011d - ld c, $0 - ld b, $4 + ld c, FALSE + ld b, 4 call Functiond0228 call Functiond0504 ld a, [wPokeAnimSceneIndex] @@ -206,8 +206,8 @@ PokeAnim_Setup2: ; d011d ; d012f PokeAnim_Extra: ; d012f - ld c, $1 - ld b, $0 + ld c, TRUE + ld b, 0 call Functiond0228 call Functiond0504 ld a, [wPokeAnimSceneIndex] @@ -365,18 +365,18 @@ Functiond0228: ; d0228 ld a, $2 ld [rSVBK], a push bc - ld hl, w2_d172 - ld bc, wPokeAnimStructEnd - w2_d172 + ld hl, wPokeAnimExtraFlag + ld bc, wPokeAnimStructEnd - wPokeAnimExtraFlag xor a call ByteFill pop bc ld a, b ld [w2_d173], a ld a, c - ld [w2_d172], a - call Functiond055c - call Functiond05ce - call Functiond061b + ld [wPokeAnimExtraFlag], a + call GetMonAnimPointer + call GetMonFramesPointer + call GetMonBitmaskPointer pop af ld [rSVBK], a ret @@ -425,16 +425,16 @@ Functiond0282: ; d0282 PokeAnim_SetRepeat: ; d028e ld a, [w2_d183] - ld [w2_d17f], a + ld [wPokeAnimRepeatTimer], a jr Functiond0253 ; d0296 PokeAnim_DoRepeat: ; d0296 - ld a, [w2_d17f] + ld a, [wPokeAnimRepeatTimer] and a ret z dec a - ld [w2_d17f], a + ld [wPokeAnimRepeatTimer], a ret z ld a, [w2_d183] ld [w2_d17d], a @@ -509,14 +509,14 @@ Functiond02f8: ; d02f8 ld a, [w2_d17d] ld e, a ld d, $0 - ld hl, w2_d175 + ld hl, wPokeAnimPointerAddr ld a, [hli] ld h, [hl] ld l, a rept 2 add hl, de endr - ld a, [w2_d174] + ld a, [wPokeAnimPointerBank] call GetFarHalfword ld a, l ld [w2_d182], a @@ -533,16 +533,16 @@ Functiond031b: ; d031b dec a ld c, a ld b, $0 - ld hl, w2_d178 + ld hl, wPokeAnimFramesAddr ld a, [hli] ld h, [hl] ld l, a rept 2 add hl, bc endr - ld a, [w2_d177] + ld a, [wPokeAnimFramesBank] call GetFarHalfword - ld a, [w2_d177] + ld a, [wPokeAnimFramesBank] call GetFarByte ld [w2_d180], a inc hl @@ -552,7 +552,7 @@ endr Functiond033b: ; d033b call Functiond0356 push bc - ld hl, w2_d17b + ld hl, wPokeAnimBitmaskAddr ld a, [hli] ld h, [hl] ld l, a @@ -560,7 +560,7 @@ Functiond033b: ; d033b call AddNTimes pop bc ld de, w2_d188 - ld a, [w2_d17a] + ld a, [wPokeAnimBitmaskBank] call FarCopyBytes ret ; d0356 @@ -594,7 +594,7 @@ Functiond036b: ; d036b and a jr z, .next - ld a, [w2_d177] + ld a, [wPokeAnimFramesBank] call GetFarByte inc hl push hl @@ -737,20 +737,34 @@ Functiond03f7: ; d03f7 ret ; d042f +macro_d042f: MACRO +y = 7 +rept 7 +- \1 +x = \1 +rept 7 +- \1 + db x + y +x = x + 1 +endr +y = y + 7 +endr +endm + Unknown_d042f: - db 9, 10, 11, 12, 13 - db 16, 17, 18, 19, 20 - db 23, 24, 25, 26, 27 - db 30, 31, 32, 33, 34 - db 37, 38, 39, 40, 41 + macro_d042f 2 + ; db 9, 10, 11, 12, 13 + ; db 16, 17, 18, 19, 20 + ; db 23, 24, 25, 26, 27 + ; db 30, 31, 32, 33, 34 + ; db 37, 38, 39, 40, 41 Unknown_d0448: - db 8, 9, 10, 11, 12, 13 - db 15, 16, 17, 18, 19, 20 - db 22, 23, 24, 25, 26, 27 - db 29, 30, 31, 32, 33, 34 - db 36, 37, 38, 39, 40, 41 - db 43, 44, 45, 46, 47, 48 + macro_d042f 1 + ; db 8, 9, 10, 11, 12, 13 + ; db 15, 16, 17, 18, 19, 20 + ; db 22, 23, 24, 25, 26, 27 + ; db 29, 30, 31, 32, 33, 34 + ; db 36, 37, 38, 39, 40, 41 + ; db 43, 44, 45, 46, 47, 48 Functiond046c: ; d046c @@ -931,7 +945,7 @@ Functiond0551: ; d0551 ret ; d055c -Functiond055c: ; d055c +GetMonAnimPointer: ; d055c call PokeAnim_IsEgg jr z, .egg @@ -945,12 +959,12 @@ Functiond055c: ; d055c ld de, AnimationExtraPointers .unown - ld a, [w2_d172] + ld a, [wPokeAnimExtraFlag] and a - jr z, .asm_d057e + jr z, .extras ld h, d ld l, e -.asm_d057e +.extras ld a, [wPokeAnimSpeciesOrUnown] dec a @@ -960,30 +974,30 @@ rept 2 add hl, de endr ld a, c - ld [w2_d174], a + ld [wPokeAnimPointerBank], a call GetFarHalfword ld a, l - ld [w2_d175], a + ld [wPokeAnimPointerAddr], a ld a, h - ld [w2_d176], a + ld [wPokeAnimPointerAddr + 1], a ret .egg ld hl, EggAnimation ld c, BANK(EggAnimation) - ld a, [w2_d172] + ld a, [wPokeAnimExtraFlag] and a - jr z, .asm_d05a7 + jr z, .extras_egg ld hl, EggAnimationExtra ld c, BANK(EggAnimationExtra) -.asm_d05a7 +.extras_egg ld a, c - ld [w2_d174], a + ld [wPokeAnimPointerBank], a ld a, l - ld [w2_d175], a + ld [wPokeAnimPointerAddr], a ld a, h - ld [w2_d176], a + ld [wPokeAnimPointerAddr + 1], a ret ; d05b4 @@ -1003,7 +1017,7 @@ PokeAnim_GetFrontpicDims: ; d05b4 ret ; d05ce -Functiond05ce: ; d05ce +GetMonFramesPointer: ; d05ce call PokeAnim_IsEgg jr z, .egg @@ -1013,7 +1027,7 @@ Functiond05ce: ; d05ce ld hl, UnownFramesPointers jr z, .got_frames ld a, [wPokeAnimSpecies] - cp 151 + 1 + cp CHIKORITA ld b, BANK(FramesPointers) ld c, BANK(KantoFrames) ld hl, FramesPointers @@ -1021,7 +1035,7 @@ Functiond05ce: ; d05ce ld c, BANK(JohtoFrames) .got_frames ld a, c - ld [w2_d177], a + ld [wPokeAnimFramesBank], a ld a, [wPokeAnimSpeciesOrUnown] dec a @@ -1033,24 +1047,24 @@ endr ld a, b call GetFarHalfword ld a, l - ld [w2_d178], a + ld [wPokeAnimFramesAddr], a ld a, h - ld [w2_d179], a + ld [wPokeAnimFramesAddr + 1], a ret .egg ld hl, EggFrames ld c, BANK(EggFrames) ld a, c - ld [w2_d177], a + ld [wPokeAnimFramesBank], a ld a, l - ld [w2_d178], a + ld [wPokeAnimFramesAddr], a ld a, h - ld [w2_d179], a + ld [wPokeAnimFramesAddr + 1], a ret ; d061b -Functiond061b: ; d061b +GetMonBitmaskPointer: ; d061b call PokeAnim_IsEgg jr z, .egg @@ -1061,7 +1075,7 @@ Functiond061b: ; d061b ld a, BANK(BitmasksPointers) ld hl, BitmasksPointers .unown - ld [w2_d17a], a + ld [wPokeAnimBitmaskBank], a ld a, [wPokeAnimSpeciesOrUnown] dec a @@ -1070,23 +1084,23 @@ Functiond061b: ; d061b rept 2 add hl, de endr - ld a, [w2_d17a] + ld a, [wPokeAnimBitmaskBank] call GetFarHalfword ld a, l - ld [w2_d17b], a + ld [wPokeAnimBitmaskAddr], a ld a, h - ld [w2_d17c], a + ld [wPokeAnimBitmaskAddr + 1], a ret .egg ld c, BANK(EggBitmasks) ld hl, EggBitmasks ld a, c - ld [w2_d17a], a + ld [wPokeAnimBitmaskBank], a ld a, l - ld [w2_d17b], a + ld [wPokeAnimBitmaskAddr], a ld a, h - ld [w2_d17c], a + ld [wPokeAnimBitmaskAddr + 1], a ret ; d065c diff --git a/home/movement.asm b/home/movement.asm index 427c42cd9..cdb3507e0 100644 --- a/home/movement.asm +++ b/home/movement.asm @@ -139,7 +139,7 @@ endr InitMenu3:: ; 1bb1 push hl push bc - ld hl, wcfa1 + ld hl, w2DMenuCursorInitY ld b, $8 .loop ld a, [de] diff --git a/macros/trade_anim.asm b/macros/trade_anim.asm index 3b2aeaf09..c424724ca 100755 --- a/macros/trade_anim.asm +++ b/macros/trade_anim.asm @@ -1,166 +1,253 @@ enum_start enum tradeanim_next_command tradeanim_next: macro - db tradeanim_next_command + db tradeanim_next_command ; 00 endm enum tradeanim_show_givemon_data_command tradeanim_show_givemon_data: macro - db tradeanim_show_givemon_data_command + db tradeanim_show_givemon_data_command ; 01 endm enum tradeanim_show_getmon_data_command tradeanim_show_getmon_data: macro - db tradeanim_show_getmon_data_command + db tradeanim_show_getmon_data_command ; 02 endm enum tradeanim_enter_link_tube_command tradeanim_enter_link_tube: macro - db tradeanim_enter_link_tube_command + db tradeanim_enter_link_tube_command ; 03 endm __enum__ set $5 enum tradeanim_exit_link_tube_command tradeanim_exit_link_tube: macro - db tradeanim_exit_link_tube_command + db tradeanim_exit_link_tube_command ; 05 endm enum tradeanim_tube_to_ot_command tradeanim_tube_to_ot: macro - db tradeanim_tube_to_ot_command + db tradeanim_tube_to_ot_command ; 06 endm __enum__ set $e enum tradeanim_tube_to_player_command tradeanim_tube_to_player: macro - db tradeanim_tube_to_player_command + db tradeanim_tube_to_player_command ; 0e endm __enum__ set $16 enum tradeanim_sent_to_ot_text_command tradeanim_sent_to_ot_text: macro - db tradeanim_sent_to_ot_text_command + db tradeanim_sent_to_ot_text_command ; 16 endm enum tradeanim_ot_bids_farewell_command tradeanim_ot_bids_farewell: macro - db tradeanim_ot_bids_farewell_command + db tradeanim_ot_bids_farewell_command ; 17 endm enum tradeanim_take_care_of_text_command tradeanim_take_care_of_text: macro - db tradeanim_take_care_of_text_command + db tradeanim_take_care_of_text_command ; 18 endm enum tradeanim_ot_sends_text_1_command tradeanim_ot_sends_text_1: macro - db tradeanim_ot_sends_text_1_command + db tradeanim_ot_sends_text_1_command ; 19 endm enum tradeanim_ot_sends_text_2_command tradeanim_ot_sends_text_2: macro - db tradeanim_ot_sends_text_2_command + db tradeanim_ot_sends_text_2_command ; 1a endm enum tradeanim_setup_givemon_scroll_command tradeanim_setup_givemon_scroll: macro - db tradeanim_setup_givemon_scroll_command + db tradeanim_setup_givemon_scroll_command ; 1b endm enum tradeanim_do_givemon_scroll_command tradeanim_do_givemon_scroll: macro - db tradeanim_do_givemon_scroll_command + db tradeanim_do_givemon_scroll_command ; 1c endm enum tradeanim_1d_command tradeanim_1d: macro - db tradeanim_1d_command + db tradeanim_1d_command ; 1d endm enum tradeanim_1e_command tradeanim_1e: macro - db tradeanim_1e_command + db tradeanim_1e_command ; 1e endm enum tradeanim_scroll_out_right_command tradeanim_scroll_out_right: macro - db tradeanim_scroll_out_right_command + db tradeanim_scroll_out_right_command ; 1f endm __enum__ set $21 enum tradeanim_wait_80_command tradeanim_wait_80: macro - db tradeanim_wait_80_command + db tradeanim_wait_80_command ; 21 endm enum tradeanim_wait_40_command tradeanim_wait_40: macro - db tradeanim_wait_40_command + db tradeanim_wait_40_command ; 22 endm enum tradeanim_rocking_ball_command tradeanim_rocking_ball: macro - db tradeanim_rocking_ball_command + db tradeanim_rocking_ball_command ; 23 endm enum tradeanim_drop_ball_command tradeanim_drop_ball: macro - db tradeanim_drop_ball_command + db tradeanim_drop_ball_command ; 24 endm enum tradeanim_wait_anim_command tradeanim_wait_anim: macro - db tradeanim_wait_anim_command + db tradeanim_wait_anim_command ; 25 endm __enum__ set $27 enum tradeanim_poof_command tradeanim_poof: macro - db tradeanim_poof_command + db tradeanim_poof_command ; 27 endm enum tradeanim_bulge_through_tube_command tradeanim_bulge_through_tube: macro - db tradeanim_bulge_through_tube_command + db tradeanim_bulge_through_tube_command ; 28 endm enum tradeanim_give_trademon_sfx_command tradeanim_give_trademon_sfx: macro - db tradeanim_give_trademon_sfx_command + db tradeanim_give_trademon_sfx_command ; 29 endm enum tradeanim_get_trademon_sfx_command tradeanim_get_trademon_sfx: macro - db tradeanim_get_trademon_sfx_command + db tradeanim_get_trademon_sfx_command ; 2a endm enum tradeanim_end_command tradeanim_end: macro - db tradeanim_end_command + db tradeanim_end_command ; 2b endm enum tradeanim_animate_frontpic_command tradeanim_animate_frontpic: macro - db tradeanim_animate_frontpic_command + db tradeanim_animate_frontpic_command ; 2c endm enum tradeanim_wait_96_command tradeanim_wait_96: macro - db tradeanim_wait_96_command + db tradeanim_wait_96_command ; 2d endm enum tradeanim_wait_80_if_ot_egg_command tradeanim_wait_80_if_ot_egg: macro - db tradeanim_wait_80_if_ot_egg_command + db tradeanim_wait_80_if_ot_egg_command ; 2e endm enum tradeanim_wait_180_if_ot_egg_command tradeanim_wait_180_if_ot_egg: macro - db tradeanim_wait_180_if_ot_egg_command + db tradeanim_wait_180_if_ot_egg_command ; 2f endm + +; Mobile + enum_start 1 + + enum mobiletradeanim_showgivemon_command +mobiletradeanim_showgivemon: macro + db mobiletradeanim_showgivemon_command ; 01 +endm + + enum mobiletradeanim_02_command +mobiletradeanim_02: macro + db mobiletradeanim_02_command ; 02 +endm + + enum mobiletradeanim_sendmon_command +mobiletradeanim_sendmon: macro + db mobiletradeanim_sendmon_command ; 03 +endm + +__enum__ set $05 + + enum mobiletradeanim_05_command +mobiletradeanim_05: macro + db mobiletradeanim_05_command ; 05 +endm + + enum mobiletradeanim_06_command +mobiletradeanim_06: macro + db mobiletradeanim_06_command ; 06 +endm + + enum mobiletradeanim_07_command +mobiletradeanim_07: macro + db mobiletradeanim_07_command ; 07 +endm + + enum mobiletradeanim_receivemon_command +mobiletradeanim_receivemon: macro + db mobiletradeanim_receivemon_command ; 08 +endm + +__enum__ set $0b + + enum mobiletradeanim_showgetmon_command +mobiletradeanim_showgetmon: macro + db mobiletradeanim_showgetmon_command ; 0b +endm + + enum mobiletradeanim_end_command +mobiletradeanim_end: macro + db mobiletradeanim_end_command ; 0c +endm + + enum mobiletradeanim_showwondertradegivemon_command +mobiletradeanim_showwondertradegivemon: macro + db mobiletradeanim_showwondertradegivemon_command ; 0d +endm + + enum mobiletradeanim_showwondertradegetmon_command +mobiletradeanim_showwondertradegetmon: macro + db mobiletradeanim_showwondertradegetmon_command ; 0e +endm + + enum mobiletradeanim_0f_command +mobiletradeanim_0f: macro + db mobiletradeanim_0f_command ; 0f +endm + + enum mobiletradeanim_10_command +mobiletradeanim_10: macro + db mobiletradeanim_10_command ; 10 +endm + + enum mobiletradeanim_11_command +mobiletradeanim_11: macro + db mobiletradeanim_11_command ; 11 +endm + + enum mobiletradeanim_12_command +mobiletradeanim_12: macro + db mobiletradeanim_12_command ; 12 +endm + + enum mobiletradeanim_showoddegg_command +mobiletradeanim_showoddegg: macro + db mobiletradeanim_showoddegg_command ; 13 +endm diff --git a/main.asm b/main.asm index 9b29441f3..5e363266b 100644 --- a/main.asm +++ b/main.asm @@ -743,7 +743,7 @@ Predef1: ; 747a SECTION "bank2", ROMX, BANK[$2] -Function8000: ; 8000 +BlankScreen: ; 8000 call DisableSpriteUpdates xor a ld [hBGMapMode], a @@ -10286,7 +10286,7 @@ Special_MoveTutor: ; 4925b ; 492b9 CheckCanLearnMoveTutorMove: ; 492b9 - ld hl, MenuDataHeader_0x4930a + ld hl, .MenuDataHeader call LoadMenuDataHeader predef CanLearnTMHMMove @@ -10333,7 +10333,7 @@ CheckCanLearnMoveTutorMove: ; 492b9 ret ; 4930a -MenuDataHeader_0x4930a: ; 0x4930a +.MenuDataHeader: ; 0x4930a db $40 ; flags db 12, 00 ; start coords db 17, 19 ; end coords @@ -10601,11 +10601,11 @@ SaveMenu_LoadEDTile: ; 4cf45 (13:4f45) ld a, 1 ; BANK(VBGMap2) ld [rVBK], a hlcoord 0, 0, AttrMap - call Function4cf80 + call .LoadEDTile ld a, 0 ; BANK(VBGMap0) ld [rVBK], a hlcoord 0, 0 - call Function4cf80 + call .LoadEDTile .WaitLY2 ld a, [rLY] cp $60 @@ -10618,7 +10618,7 @@ SaveMenu_LoadEDTile: ; 4cf45 (13:4f45) ld [hBGMapMode], a ret -Function4cf80: ; 4cf80 (13:4f80) +.LoadEDTile: ; 4cf80 (13:4f80) ld [hSPBuffer], sp ; $ffd9 ld sp, hl ld a, [hBGMapAddress + 1] @@ -10809,7 +10809,7 @@ Shrink2Pic: ; 4d2d9 INCBIN "gfx/shrink2.2bpp.lz" ; 4d319 -Function4d319: ; 4d319 +LinkMonStatsScreen: ; 4d319 ld a, [wMenuCursorY] dec a ld [CurPartyMon], a @@ -10909,7 +10909,7 @@ Function4d3ab: ; 4d3ab ; 4d3b1 _ResetClock: ; 4d3b1 - callba Function8000 + callba BlankScreen ld b, SCGB_08 call GetSGBLayout call LoadStandardFont @@ -11184,17 +11184,17 @@ ClockResetPassword: ; 4d41e ret ; 4d54c -Function4d54c: ; 4d54c - callba Function8000 +_DeleteSaveData: ; 4d54c + callba BlankScreen ld b, SCGB_08 call GetSGBLayout call LoadStandardFont call LoadFontsExtra ld de, MUSIC_MAIN_MENU call PlayMusic - ld hl, UnknownText_0x4d580 + ld hl, .Text_ClearAllSaveData call PrintText - ld hl, MenuDataHeader_0x4d585 + ld hl, .NoYesMenuDataHeader call CopyMenuDataHeader call VerticalMenu ret c @@ -11205,21 +11205,21 @@ Function4d54c: ; 4d54c ret ; 4d580 -UnknownText_0x4d580: ; 0x4d580 +.Text_ClearAllSaveData: ; 0x4d580 ; Clear all save data? text_jump UnknownText_0x1c564a db "@" ; 0x4d585 -MenuDataHeader_0x4d585: ; 0x4d585 +.NoYesMenuDataHeader: ; 0x4d585 db $00 ; flags db 07, 14 ; start coords db 11, 19 ; end coords - dw MenuData2_0x4d58d + dw .MenuData2 db 1 ; default option ; 0x4d58d -MenuData2_0x4d58d: ; 0x4d58d +.MenuData2: ; 0x4d58d db $c0 ; flags db 2 ; items db "NO@" @@ -11301,9 +11301,9 @@ FlagPredef: ; 4d7c1 ret ; 4d7fd -Function4d7fd: ; 4d7fd - ld a, [wc702] - ld hl, wEnemyTrappingMove +GetTrademonFrontpic: ; 4d7fd + ld a, [wOTTrademonSpecies] + ld hl, wOTTrademonDVs ld de, VTiles2 push de push af @@ -11317,23 +11317,23 @@ Function4d7fd: ; 4d7fd ret ; 4d81e -Function4d81e: ; 4d81e - ld a, [wc702] +AnimateTrademonFrontpic: ; 4d81e + ld a, [wOTTrademonSpecies] call IsAPokemon ret c callba Function29549 - ld a, [wc702] + ld a, [wOTTrademonSpecies] ld [CurPartySpecies], a - ld a, [wEnemyTrappingMove] + ld a, [wOTTrademonDVs] ld [TempMonDVs], a - ld a, [wPlayerWrapCount] + ld a, [wOTTrademonDVs + 1] ld [TempMonDVs + 1], a ld b, SCGB_1A call GetSGBLayout - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbBGPals - callba Function294c0 - ld a, [wc702] + callba TradeAnim_ShowGetmonFrontpic + ld a, [wOTTrademonSpecies] ld [CurPartySpecies], a hlcoord 7, 2 ld d, $0 diff --git a/misc/gfx_41.asm b/misc/gfx_41.asm index 0ce38a5d1..6f55c237e 100755 --- a/misc/gfx_41.asm +++ b/misc/gfx_41.asm @@ -219,7 +219,7 @@ CallInSafeGFXMode: ; 104177 ld [hMapAnims], a ld a, [rSVBK] push af - ld a, 6 + ld a, $6 ld [rSVBK], a ld a, [rVBK] push af diff --git a/misc/mobile_40.asm b/misc/mobile_40.asm index 4409922c0..9daa37e06 100644 --- a/misc/mobile_40.asm +++ b/misc/mobile_40.asm @@ -2582,7 +2582,7 @@ Function10107d: ; 10107d ld hl, wc608 ld bc, wc7bd - wc608 call ByteFill - ld hl, wd26b + ld hl, OTPlayerName ld de, wc608 ld bc, NAME_LENGTH call CopyBytes @@ -3067,7 +3067,7 @@ Function1013aa: ; 1013aa ; 1013c0 Function1013c0: ; 1013c0 - callba Function8000 + callba BlankScreen callba MobileFunc_106462 callba Function106464 call Function2b5c @@ -3972,7 +3972,7 @@ Function10194b: ; 10194b ; 10196d Function10196d: ; 10196d - callba Function8000 + callba BlankScreen callba Function10060d ld hl, wcd29 set 5, [hl] @@ -4003,7 +4003,7 @@ Function1019ab: ; 1019ab xor a ld [wdc5f], a ld [wdc60], a - callba Function8000 + callba BlankScreen call SpeechTextBox callba Function100846 ld c, $78 @@ -6303,8 +6303,8 @@ Jumptable_1029cb: ; 1029cb Function1029cf: ; 1029cf call LoadStandardMenuDataHeader hlcoord 10, 7 - ld b, $3 - ld c, $8 + ld b, 3 + ld c, 8 ld d, h ld e, l callba _LinkTextbox @@ -6313,7 +6313,7 @@ Function1029cf: ; 1029cf call PlaceString ld hl, wcd4b set 1, [hl] - ld de, Unknown_102a33 + ld de, MenuData3_102a33 call InitMenu3 ld a, [wcd4a] inc a @@ -6327,7 +6327,7 @@ Function1029fe: ; 1029fe ret c callba MobileMenuJoypad ld a, c - ld hl, wcfa8 + ld hl, w2DMenuFlags4 and [hl] ret z push af @@ -6353,15 +6353,17 @@ String_102a26: ; 102a26 db "@" ; 102a33 -Unknown_102a33: - db $8, $b, $2, $1, $80, $, $20, $1 +MenuData3_102a33: + db 8, 11 + db 2, 1 + db $80, $00, $20, $01 Function102a3b: ; 102a3b ld a, [wcd30] ld [wc74e], a ld hl, PlayerName ld de, wc6e7 - ld bc, 11 + ld bc, NAME_LENGTH call CopyBytes ld a, [wcd4c] dec a @@ -6370,30 +6372,30 @@ Function102a3b: ; 102a3b ld hl, PartySpecies add hl, bc ld a, [hl] - ld [wc6d0], a + ld [wPlayerTrademonSpecies], a ld a, [wcd4c] dec a ld hl, PartyMonOT call SkipNames - ld de, wc6f2 - ld bc, 11 + ld de, wPlayerTrademonOTName + ld bc, NAME_LENGTH call CopyBytes ld a, [wcd4c] dec a ld hl, PartyMon1ID call GetPartyLocation ld a, [hli] - ld [wc6ff], a + ld [wPlayerTrademonID], a ld a, [hl] - ld [wc700], a + ld [wPlayerTrademonID + 1], a ld a, [wcd4c] dec a ld hl, PartyMon1DVs call GetPartyLocation ld a, [hli] - ld [wc6fd], a + ld [wPlayerTrademonDVs], a ld a, [hl] - ld [wc6fe], a + ld [wPlayerTrademonDVs + 1], a ld a, [wcd4c] dec a ld hl, PartyMon1Species @@ -6402,11 +6404,12 @@ Function102a3b: ; 102a3b ld c, l callba GetCaughtGender ld a, c - ld [wc701], a - ld hl, wd26b - ld de, wc719 - ld bc, 11 + ld [wPlayerTrademonCaughtData], a + ld hl, OTPlayerName + ld de, wOTTrademonSenderName + ld bc, NAME_LENGTH call CopyBytes + ld a, [wcd4d] dec a ld c, a @@ -6414,30 +6417,30 @@ Function102a3b: ; 102a3b ld hl, OTPartySpecies add hl, bc ld a, [hl] - ld [wc702], a + ld [wOTTrademonSpecies], a ld a, [wcd4d] dec a ld hl, OTPartyMonOT call SkipNames - ld de, wc724 - ld bc, 11 + ld de, wOTTrademonOTName + ld bc, NAME_LENGTH call CopyBytes ld a, [wcd4d] dec a ld hl, OTPartyMon1ID call GetPartyLocation ld a, [hli] - ld [wEnemyWrapCount], a + ld [wOTTrademonID], a ld a, [hl] - ld [wPlayerCharging], a + ld [wOTTrademonID + 1], a ld a, [wcd4d] dec a ld hl, OTPartyMon1DVs call GetPartyLocation ld a, [hli] - ld [wEnemyTrappingMove], a + ld [wOTTrademonDVs], a ld a, [hl] - ld [wPlayerWrapCount], a + ld [wOTTrademonDVs + 1], a ld a, [wcd4d] dec a ld hl, OTPartyMon1Species @@ -6446,12 +6449,12 @@ Function102a3b: ; 102a3b ld c, l callba GetCaughtGender ld a, c - ld [wEnemyCharging], a + ld [wOTTrademonCaughtData], a ret ; 102b12 Function102b12: ; 102b12 - ld c, $64 + ld c, 100 call DelayFrames call Function102d9a call LoadFontsBattleExtra @@ -6892,7 +6895,7 @@ Function102e4f: ; 102e4f call PlaceString ld a, $14 ld [bc], a - ld de, wd26b + ld de, OTPlayerName hlcoord 4, 8 call PlaceString ld a, $14 diff --git a/misc/mobile_42.asm b/misc/mobile_42.asm index a868457e7..24144721f 100644 --- a/misc/mobile_42.asm +++ b/misc/mobile_42.asm @@ -5,11 +5,17 @@ Function108000: ; 108000 ld a, $80 ld [wcf65], a ld de, Unknown_10800b - jp Function108089 + jp RunMobileTradeAnim_NoFrontpics ; 10800b Unknown_10800b: - db $0d, $12, $10, $03, $06, $0f, $0c + mobiletradeanim_showwondertradegivemon + mobiletradeanim_12 + mobiletradeanim_10 + mobiletradeanim_sendmon + mobiletradeanim_06 + mobiletradeanim_0f + mobiletradeanim_end Function108012: ld a, $80 @@ -20,11 +26,15 @@ Function108016: ; 108016 asm_108018: ld [wcf65], a ld de, Unknown_108021 - jp Function108089 + jp RunMobileTradeAnim_NoFrontpics ; 108021 Unknown_108021: - db $11, $07, $08, $0e, $0c + mobiletradeanim_11 + mobiletradeanim_07 + mobiletradeanim_receivemon + mobiletradeanim_showwondertradegetmon + mobiletradeanim_end Function108026: ; 108026 ld a, $0 @@ -36,34 +46,47 @@ Function10802a: ; 10802a asm_10802c: ld [wcf65], a ld de, Unknown_108035 - jp Function10805b + jp RunMobileTradeAnim_Frontpics ; 108035 -Unknown_108035: - db $01, $12, $02, $03, $05, $08, $0b, $0c +Unknown_108035: ; trade + mobiletradeanim_showgivemon + mobiletradeanim_12 + mobiletradeanim_02 + mobiletradeanim_sendmon + mobiletradeanim_05 + mobiletradeanim_receivemon + mobiletradeanim_showgetmon + mobiletradeanim_end Function10803d: ; 10803d ld a, $0 ld [wcf65], a ld de, Unknown_108048 - jp Function108089 + jp RunMobileTradeAnim_NoFrontpics ; 108048 Unknown_108048: - db $11, $07, $08, $13, $0c + mobiletradeanim_11 + mobiletradeanim_07 + mobiletradeanim_receivemon + mobiletradeanim_showoddegg + mobiletradeanim_end Function10804d: ; 10804d ld a, $0 ld [wcf65], a ld de, Unknown_108058 - jp Function108089 + jp RunMobileTradeAnim_NoFrontpics ; 108058 Unknown_108058: - db $11, $0e, $0c + mobiletradeanim_11 + mobiletradeanim_showwondertradegetmon + mobiletradeanim_end -Function10805b: ; 10805b - ld hl, wc734 +RunMobileTradeAnim_Frontpics: ; 10805b + ld hl, wTradeAnimPointer ld [hl], e inc hl ld [hl], d @@ -78,11 +101,11 @@ Function10805b: ; 10805b ld hl, Options ld a, [hl] push af - set 4, [hl] + set NO_TEXT_SCROLL, [hl] call Function1080b7 -.asm_108078 - call Function10824b - jr nc, .asm_108078 +.loop + call MobileTradeAnim_JumptableLoop + jr nc, .loop pop af ld [Options], a pop af @@ -92,8 +115,8 @@ Function10805b: ; 10805b ret ; 108089 -Function108089: ; 108089 - ld hl, BattleEnded +RunMobileTradeAnim_NoFrontpics: ; 108089 + ld hl, wTradeAnimPointer ld [hl], e inc hl ld [hl], d @@ -108,11 +131,11 @@ Function108089: ; 108089 ld hl, Options ld a, [hl] push af - set 4, [hl] + set NO_TEXT_SCROLL, [hl] call Function108157 -.asm_1080a6 - call Function10824b - jr nc, .asm_1080a6 +.loop + call MobileTradeAnim_JumptableLoop + jr nc, .loop pop af ld [Options], a pop af @@ -129,21 +152,25 @@ Function1080b7: ; 1080b7 call ClearSprites call ClearTileMap call DisableLCD - call Function1081ad - call Function1081ca + call MobileTradeAnim_ClearVTiles + call MobileTradeAnim_ClearBGMap call LoadStandardFont call LoadFontsBattleExtra + ld a, $1 ld [rVBK], a ld hl, LZ_108da7 ld de, VTiles2 call Decompress + ld a, $0 ld [rVBK], a ld hl, LZ_108d27 ld de, VTiles0 tile $20 call Decompress + call EnableLCD + xor a ld [hSCX], a ld [hSCY], a @@ -152,33 +179,42 @@ Function1080b7: ; 1080b7 ld a, $90 ld [hWY], a callba ClearSpriteAnims + call DelayFrame + ld de, TradeBallGFX ld hl, VTiles0 lb bc, BANK(TradeBallGFX), $06 call Request2bpp + ld de, TradePoofGFX ld hl, VTiles0 tile $06 lb bc, BANK(TradePoofGFX), $0c call Request2bpp + xor a - ld hl, wc300 + ld hl, wSpriteAnimDict ld [hli], a ld [hl], $0 - ld a, [$c6d0] - ld hl, $c6fd + + ld a, [wPlayerTrademonSpecies] + ld hl, wPlayerTrademonDVs ld de, VTiles0 tile $30 - call Function1081e9 - ld a, [wc702] - ld hl, wEnemyTrappingMove + call MobileTradeAnim_GetFrontpic + + ld a, [wOTTrademonSpecies] + ld hl, wOTTrademonDVs ld de, VTiles2 tile $31 - call Function1081e9 - ld a, [$c6d0] - ld de, $c6d1 - call Function108239 - ld a, [wc702] - ld de, wc703 - call Function108239 + call MobileTradeAnim_GetFrontpic + + ld a, [wPlayerTrademonSpecies] + ld de, wPlayerTrademonSpeciesName + call MobileTradeAnim_InitSpeciesName + + ld a, [wOTTrademonSpecies] + ld de, wOTTrademonSpeciesName + call MobileTradeAnim_InitSpeciesName + xor a call Function108b98 call Function108af4 @@ -192,8 +228,8 @@ Function108157: ; 108157 call ClearSprites call ClearTileMap call DisableLCD - call Function1081ad - call Function1081ca + call MobileTradeAnim_ClearVTiles + call MobileTradeAnim_ClearBGMap call LoadStandardFont call LoadFontsBattleExtra call EnableLCD @@ -206,55 +242,55 @@ Function108157: ; 108157 ld [hWY], a callba ClearSpriteAnims xor a - ld hl, wc300 + ld hl, wSpriteAnimDict ld [hli], a ld [hl], $0 call DelayFrame - ld a, [$c6d0] - ld de, $c6d1 - call Function108239 - ld a, [wc702] - ld de, wc703 - call Function108239 + ld a, [wPlayerTrademonSpecies] + ld de, wPlayerTrademonSpeciesName + call MobileTradeAnim_InitSpeciesName + ld a, [wOTTrademonSpecies] + ld de, wOTTrademonSpeciesName + call MobileTradeAnim_InitSpeciesName xor a call Function108b98 call Function108af4 ret ; 1081ad -Function1081ad: ; 1081ad +MobileTradeAnim_ClearVTiles: ; 1081ad ld a, $1 ld [rVBK], a ld hl, VTiles0 - ld bc, $1800 + ld bc, 3 * $80 tiles xor a call ByteFill ld a, $0 ld [rVBK], a ld hl, VTiles0 - ld bc, $1800 + ld bc, 3 * $80 tiles xor a call ByteFill ret ; 1081ca -Function1081ca: ; 1081ca +MobileTradeAnim_ClearBGMap: ; 1081ca ld a, $1 ld [rVBK], a hlbgcoord 0, 0 - ld bc, $0800 + ld bc, 2 * BG_MAP_HEIGHT * BG_MAP_WIDTH ld a, $0 call ByteFill ld a, $0 ld [rVBK], a hlbgcoord 0, 0 - ld bc, $0800 + ld bc, 2 * BG_MAP_HEIGHT * BG_MAP_WIDTH ld a, $7f call ByteFill ret ; 1081e9 -Function1081e9: ; 1081e9 +MobileTradeAnim_GetFrontpic: ; 1081e9 push de push af predef GetUnownLetter @@ -298,7 +334,7 @@ Function108229: ; 108229 ret ; 108239 -Function108239: ; 108239 +MobileTradeAnim_InitSpeciesName: ; 108239 push de ld [wd265], a call GetPokemonName @@ -309,16 +345,16 @@ Function108239: ; 108239 ret ; 10824b -Function10824b: ; 10824b +MobileTradeAnim_JumptableLoop: ; 10824b ld a, [wJumptableIndex] bit 7, a - jr nz, .asm_10825a - call Function10827b + jr nz, .StopAnim + call .ExecuteMobileTradeAnimCommand call DelayFrame and a ret -.asm_10825a +.StopAnim xor a ld [hSCX], a ld [hSCY], a @@ -334,11 +370,11 @@ Function10824b: ; 10824b ret ; 10827b -Function10827b: ; 10827b +.ExecuteMobileTradeAnimCommand: ; 10827b ld a, [wJumptableIndex] ld e, a ld d, 0 - ld hl, Jumptable_10828a + ld hl, .Jumptable rept 2 add hl, de endr @@ -348,37 +384,38 @@ endr jp [hl] ; 10828a -Jumptable_10828a: ; 10828a - dw Function1082b7 - dw Function10830e - dw Function108638 - dw Function108763 - dw Function1087cf - dw Function108811 - dw Function108838 - dw Function10884c - dw Function108863 - dw Function108894 - dw Function10890a - dw Function10839b - dw Function1082c6 - dw Function10842c - dw Function1084d7 - dw Function108919 - dw Function108689 - dw Function1086f4 - dw Function10893d - dw Function108589 +.Jumptable: ; 10828a + jumptable_start + jumptable GetMobileTradeAnimByte ; 00 + jumptable MobileTradeAnim_ShowPlayerMonToBeSent ; 01 + jumptable MobileTradeAnim_02 ; 02 + jumptable MobileTradeAnim_GiveTrademon1 ; 03 + jumptable MobileTradeAnim_GiveTrademon2 ; 04 + jumptable MobileTradeAnim_05 ; 05 + jumptable MobileTradeAnim_06 ; 06 + jumptable MobileTradeAnim_07 ; 07 + jumptable MobileTradeAnim_GetTrademon1 ; 08 + jumptable MobileTradeAnim_GetTrademon2 ; 09 + jumptable MobileTradeAnim_GetTrademon3 ; 0a + jumptable MobileTradeAnim_ShowOTMonFromTrade ; 0b + jumptable EndMobileTradeAnim ; 0c + jumptable MobileTradeAnim_ShowPlayerMonForWonderTrade ; 0d + jumptable MobileTradeAnim_ShowOTMonFromWonderTrade ; 0e + jumptable MobileTradeAnim_0f ; 0f + jumptable MobileTradeAnim_10 ; 10 + jumptable MobileTradeAnim_11 ; 11 + jumptable MobileTradeAnim_FadeToBlack ; 12 + jumptable MobileTradeAnim_GetOddEgg ; 13 get odd egg ; 1082b2 -Function1082b2: ; 1082b2 +MobileTradeAnim_Next: ; 1082b2 ld hl, wJumptableIndex inc [hl] ret ; 1082b7 -Function1082b7: ; 1082b7 - ld hl, wc734 +GetMobileTradeAnimByte: ; 1082b7 + ld hl, wTradeAnimPointer ld e, [hl] inc hl ld d, [hl] @@ -391,43 +428,43 @@ Function1082b7: ; 1082b7 ret ; 1082c6 -Function1082c6: ; 1082c6 +EndMobileTradeAnim: ; 1082c6 ld hl, wJumptableIndex set 7, [hl] ret ; 1082cc -Function1082cc: ; 1082cc -.asm_1082cc +WaitMobileTradeSpriteAnims: ; 1082cc +.loop push bc callba PlaySpriteAnimations pop bc call DelayFrame dec c - jr nz, .asm_1082cc + jr nz, .loop ret ; 1082db Function1082db: ; 1082db -.asm_1082db +.loop callba PlaySpriteAnimations - callba Functiond00b4 + callba SetUpPokeAnim callba Function10402d - jr nc, .asm_1082db + jr nc, .loop ret ; 1082f0 Function1082f0: ; 1082f0 -.asm_1082f0 +.loop call Function108b78 call DelayFrame dec c - jr nz, .asm_1082f0 + jr nz, .loop ret ; 1082fa Function1082fa: ; 1082fa -.asm_1082fa +.loop call Function108b78 push hl push bc @@ -436,11 +473,11 @@ Function1082fa: ; 1082fa pop hl call DelayFrame dec c - jr nz, .asm_1082fa + jr nz, .loop ret ; 10830e -Function10830e: ; 10830e +MobileTradeAnim_ShowPlayerMonToBeSent: ; 10830e ld de, MUSIC_EVOLUTION call PlayMusic2 ld a, $80 @@ -451,45 +488,45 @@ Function10830e: ; 10830e ld [hWX], a ld a, $50 ld [hWY], a - call Function1089a8 - ld a, [$c6d0] + call MobileTradeAnim_DisplayMonToBeSent + ld a, [wPlayerTrademonSpecies] ld [CurPartySpecies], a call Function10895e - ld a, [$c6fd] + ld a, [wPlayerTrademonDVs] ld [TempMonDVs], a - ld a, [$c6fe] + ld a, [wPlayerTrademonDVs + 1] ld [TempMonDVs + 1], a ld b, SCGB_1A call GetSGBLayout - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbBGPals call WaitBGMap -.asm_108348 +.loop ld a, [hWX] cp $7 - jr z, .asm_10835d + jr z, .okay sub $4 ld [hWX], a ld a, [hSCX] sub $4 ld [hSCX], a call DelayFrame - jr .asm_108348 + jr .loop -.asm_10835d +.okay ld a, $7 ld [hWX], a xor a ld [hSCX], a - ld a, [$c6d0] + ld a, [wPlayerTrademonSpecies] call GetCryIndex - jr c, .asm_108371 + jr c, .skip_cry ld e, c ld d, b call PlayCryHeader -.asm_108371 - ld c, $50 +.skip_cry + ld c, 80 call DelayFrames call Function108bec depixel 10, 11, 4, 0 @@ -498,24 +535,24 @@ Function10830e: ; 10830e ld de, SFX_BALL_POOF call PlaySFX hlcoord 0, 0 - ld bc, $00f0 + ld bc, 12 * SCREEN_WIDTH ld a, " " call ByteFill - ld c, $50 - call Function1082cc - call Function1082b7 + ld c, 80 + call WaitMobileTradeSpriteAnims + call GetMobileTradeAnimByte ret ; 10839b -Function10839b: ; 10839b +MobileTradeAnim_ShowOTMonFromTrade: ; 10839b call ClearBGPalettes call ClearSprites call ClearTileMap call DisableLCD - call Function1081ca - ld a, [wc702] + call MobileTradeAnim_ClearBGMap + ld a, [wOTTrademonSpecies] ld [CurPartySpecies], a - ld hl, wEnemyTrappingMove + ld hl, wOTTrademonDVs ld de, VTiles2 call Function108201 call EnableLCD @@ -534,11 +571,11 @@ Function10839b: ; 10839b ld a, $1 call Function108b98 call Function108af4 - ld c, $30 - call Function1082cc + ld c, 48 + call WaitMobileTradeSpriteAnims ld de, SFX_BALL_POOF call PlaySFX - call Function1089d2 + call MobileTradeAnim_DisplayReceivedMon xor a ld [hSCX], a ld [hSCY], a @@ -546,26 +583,26 @@ Function10839b: ; 10839b ld [hWX], a ld a, $50 ld [hWY], a - ld a, [wc702] + ld a, [wOTTrademonSpecies] ld [CurPartySpecies], a - ld a, [wEnemyTrappingMove] + ld a, [wOTTrademonDVs] ld [TempMonDVs], a - ld a, [wPlayerWrapCount] + ld a, [wOTTrademonDVs + 1] ld [TempMonDVs + 1], a ld b, SCGB_1A call GetSGBLayout - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbBGPals call Function108963 - ld a, [wc702] + ld a, [wOTTrademonSpecies] call Function108229 call Function1082db call Function108c16 - call Function1082b7 + call GetMobileTradeAnimByte ret ; 10842c -Function10842c: ; 10842c +MobileTradeAnim_ShowPlayerMonForWonderTrade: ; 10842c ld de, MUSIC_EVOLUTION call PlayMusic2 ld a, $80 @@ -576,10 +613,10 @@ Function10842c: ; 10842c ld [hWX], a ld a, $50 ld [hWY], a - call Function1089a8 - ld a, [$c6d0] + call MobileTradeAnim_DisplayMonToBeSent + ld a, [wPlayerTrademonSpecies] ld [CurPartySpecies], a - ld hl, $c6fd + ld hl, wPlayerTrademonDVs call Function10898a call DelayFrame ld de, TradeBallGFX @@ -590,41 +627,41 @@ Function10842c: ; 10842c ld hl, VTiles0 tile $06 lb bc, BANK(TradePoofGFX), $0c call Request2bpp - ld a, [$c6fd] + ld a, [wPlayerTrademonDVs] ld [TempMonDVs], a - ld a, [$c6fe] + ld a, [wPlayerTrademonDVs + 1] ld [TempMonDVs + 1], a ld b, SCGB_1A call GetSGBLayout - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbBGPals call WaitBGMap -.asm_108484 +.loop ld a, [hWX] cp $7 - jr z, .asm_108499 + jr z, .done sub $4 ld [hWX], a ld a, [hSCX] sub $4 ld [hSCX], a call DelayFrame - jr .asm_108484 + jr .loop -.asm_108499 +.done ld a, $7 ld [hWX], a xor a ld [hSCX], a - ld a, [$c6d0] + ld a, [wPlayerTrademonSpecies] call GetCryIndex - jr c, .asm_1084ad + jr c, .skip_cry ld e, c ld d, b call PlayCryHeader -.asm_1084ad - ld c, $50 +.skip_cry + ld c, 80 call DelayFrames call Function108c2b depixel 10, 11, 4, 0 @@ -633,24 +670,24 @@ Function10842c: ; 10842c ld de, SFX_BALL_POOF call PlaySFX hlcoord 0, 0 - ld bc, $00f0 + ld bc, 12 * SCREEN_WIDTH ld a, " " call ByteFill - ld c, $50 - call Function1082cc - call Function1082b7 + ld c, 80 + call WaitMobileTradeSpriteAnims + call GetMobileTradeAnimByte ret ; 1084d7 -Function1084d7: ; 1084d7 +MobileTradeAnim_ShowOTMonFromWonderTrade: ; 1084d7 call ClearBGPalettes call ClearSprites call ClearTileMap call DisableLCD - call Function1081ca - ld a, [wc702] + call MobileTradeAnim_ClearBGMap + ld a, [wOTTrademonSpecies] ld [CurPartySpecies], a - ld hl, wEnemyTrappingMove + ld hl, wOTTrademonDVs ld de, VTiles2 call Function108201 call EnableLCD @@ -678,11 +715,11 @@ Function1084d7: ; 1084d7 ld a, $1 call Function108b98 call Function108af4 - ld c, $30 - call Function1082cc + ld c, 48 + call WaitMobileTradeSpriteAnims ld de, SFX_BALL_POOF call PlaySFX - call Function1089d2 + call MobileTradeAnim_DisplayReceivedMon xor a ld [hSCX], a ld [hSCY], a @@ -690,36 +727,36 @@ Function1084d7: ; 1084d7 ld [hWX], a ld a, $50 ld [hWY], a - ld a, [wc702] + ld a, [wOTTrademonSpecies] ld [CurPartySpecies], a - ld a, [wEnemyTrappingMove] + ld a, [wOTTrademonDVs] ld [TempMonDVs], a - ld a, [wPlayerWrapCount] + ld a, [wOTTrademonDVs + 1] ld [TempMonDVs + 1], a ld b, SCGB_1A call GetSGBLayout - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbBGPals - ld a, [wc702] - ld hl, wEnemyTrappingMove + ld a, [wOTTrademonSpecies] + ld hl, wOTTrademonDVs call Function10898a - ld a, [wc702] + ld a, [wOTTrademonSpecies] call Function108229 call Function1082db call Function108c40 - call Function1082b7 + call GetMobileTradeAnimByte ret ; 108589 -Function108589: ; 108589 +MobileTradeAnim_GetOddEgg: ; 108589 call ClearBGPalettes call ClearSprites call ClearTileMap call DisableLCD - call Function1081ca - ld a, [wc702] + call MobileTradeAnim_ClearBGMap + ld a, [wOTTrademonSpecies] ld [CurPartySpecies], a - ld hl, wEnemyTrappingMove + ld hl, wOTTrademonDVs ld de, VTiles2 call Function108201 call EnableLCD @@ -747,8 +784,8 @@ Function108589: ; 108589 ld a, $1 call Function108b98 call Function108af4 - ld c, $30 - call Function1082cc + ld c, 48 + call WaitMobileTradeSpriteAnims ld de, SFX_BALL_POOF call PlaySFX call Function108a33 @@ -759,27 +796,27 @@ Function108589: ; 108589 ld [hWX], a ld a, $50 ld [hWY], a - ld a, [wc702] + ld a, [wOTTrademonSpecies] ld [CurPartySpecies], a - ld a, [wEnemyTrappingMove] + ld a, [wOTTrademonDVs] ld [TempMonDVs], a - ld a, [wPlayerWrapCount] + ld a, [wOTTrademonDVs + 1] ld [TempMonDVs + 1], a ld b, SCGB_1A call GetSGBLayout - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbBGPals - ld a, [wc702] - ld hl, wEnemyTrappingMove + ld a, [wOTTrademonSpecies] + ld hl, wOTTrademonDVs call Function10898a - ld a, [wc702] + ld a, [wOTTrademonSpecies] call Function108229 call Function1082db - call Function1082b7 + call GetMobileTradeAnimByte ret ; 108638 -Function108638: ; 108638 +MobileTradeAnim_02: ; 108638 callba DeinitializeAllSprites call ClearBGPalettes call ClearSprites @@ -787,7 +824,7 @@ Function108638: ; 108638 xor a ld [hBGMapMode], a call DisableLCD - call Function1081ca + call MobileTradeAnim_ClearBGMap call Function108c80 call Function108c6d call EnableLCD @@ -805,17 +842,17 @@ Function108638: ; 108638 ld [rSVBK], a ld hl, Palette_109107 ld de, UnknBGPals - ld bc, $0040 + ld bc, 8 palettes call CopyBytes pop af ld [rSVBK], a call Function108d07 call Function108af4 - call Function1082b7 + call GetMobileTradeAnimByte ret ; 108689 -Function108689: ; 108689 +MobileTradeAnim_10: ; 108689 callba DeinitializeAllSprites call ClearBGPalettes call ClearSprites @@ -823,7 +860,7 @@ Function108689: ; 108689 xor a ld [hBGMapMode], a call DisableLCD - call Function1081ca + call MobileTradeAnim_ClearBGMap ld a, $1 ld [rVBK], a ld hl, LZ_108da7 @@ -851,17 +888,17 @@ Function108689: ; 108689 ld [rSVBK], a ld hl, Palette_109107 ld de, UnknBGPals - ld bc, $0040 + ld bc, 8 palettes call CopyBytes pop af ld [rSVBK], a call Function108d07 call Function108af4 - call Function1082b7 + call GetMobileTradeAnimByte ret ; 1086f4 -Function1086f4: ; 1086f4 +MobileTradeAnim_11: ; 1086f4 call ClearBGPalettes call ClearSprites call ClearTileMap @@ -895,7 +932,7 @@ Function1086f4: ; 1086f4 ld [rSVBK], a ld hl, Palette_109107 ld de, UnknBGPals - ld bc, $0040 + ld bc, 8 palettes call CopyBytes pop af ld [rSVBK], a @@ -906,82 +943,81 @@ Function1086f4: ; 1086f4 ld [hSCX], a ld de, MUSIC_EVOLUTION call PlayMusic2 - call Function1082b7 + call GetMobileTradeAnimByte ret ; 108763 -Function108763: ; 108763 +MobileTradeAnim_GiveTrademon1: ; 108763 ld de, SFX_GIVE_TRADEMON call PlaySFX - ld c, $28 - ld hl, $d0b0 + ld c, 40 + ld hl, BGPals + 6 palettes call Function1082f0 call Function108af4 -.asm_108774 +.loop ld a, [hSCX] cp $e0 - jr z, .asm_108791 + jr z, .loop2 rept 2 dec a endr ld [hSCX], a cp $f8 - jr nz, .asm_10878a + jr nz, .next depixel 10, 11, 4, 0 ld a, SPRITE_ANIM_INDEX_22 call _InitSpriteAnimStruct -.asm_10878a - ld c, $1 - call Function1082cc - jr .asm_108774 +.next + ld c, 1 + call WaitMobileTradeSpriteAnims + jr .loop -.asm_108791 +.loop2 ld a, [hSCY] cp $f8 - jr z, .asm_1087cb + jr z, .done rept 2 dec a endr ld [hSCY], a cp $40 - jr z, .asm_1087a9 + jr z, .init cp $30 - jr z, .asm_1087b7 + jr z, .delete cp $68 - jr z, .asm_1087bc - jr .asm_1087c4 + jr z, .replace + jr .next2 -.asm_1087a9 +.init depixel 10, 11, 4, 0 ld a, SPRITE_ANIM_INDEX_22 call _InitSpriteAnimStruct xor a call Function108ad4 - jr .asm_1087c4 + jr .next2 -.asm_1087b7 - call Function108bbd - jr .asm_1087c4 +.delete + call MobileTradeAnim_DeleteSprites + jr .next2 -.asm_1087bc - call Function108bbd +.replace + call MobileTradeAnim_DeleteSprites ld a, $1 call Function108ad4 +.next2 + ld c, 1 + call WaitMobileTradeSpriteAnims + jr .loop2 -.asm_1087c4 - ld c, $1 - call Function1082cc - jr .asm_108791 - -.asm_1087cb - call Function1082b2 +.done + call MobileTradeAnim_Next ret ; 1087cf -Function1087cf: ; 1087cf - ld c, $28 - ld hl, StringBuffer2 + 2 +MobileTradeAnim_GiveTrademon2: ; 1087cf + ld c, 40 + ld hl, BGPals + 1 palettes call Function1082f0 call Function108af4 call Function108b5a @@ -990,83 +1026,83 @@ Function1087cf: ; 1087cf call _InitSpriteAnimStruct ld de, SFX_FORESIGHT call PlaySFX - ld c, $a - call Function1082cc + ld c, 10 + call WaitMobileTradeSpriteAnims xor a ld [wcf64], a depixel 9, 10, 2, 0 ld a, SPRITE_ANIM_INDEX_23 call _InitSpriteAnimStruct -.asm_1087fc +.loop ld a, [hSCY] cp $90 - jr z, .asm_10880d + jr z, .done sub $8 ld [hSCY], a - ld c, $1 - call Function1082cc - jr .asm_1087fc + ld c, 1 + call WaitMobileTradeSpriteAnims + jr .loop -.asm_10880d - call Function1082b7 +.done + call GetMobileTradeAnimByte ret ; 108811 -Function108811: ; 108811 - ld c, $28 - call Function1082cc +MobileTradeAnim_05: ; 108811 + ld c, 40 + call WaitMobileTradeSpriteAnims ld a, $1 ld [wcf64], a ld de, SFX_SHARPEN call PlaySFX - ld c, $3c - call Function1082cc + ld c, 60 + call WaitMobileTradeSpriteAnims depixel 30, 10, 2, 0 ld a, SPRITE_ANIM_INDEX_24 call _InitSpriteAnimStruct - call Function1082b7 + call GetMobileTradeAnimByte ld de, SFX_THROW_BALL call PlaySFX ret ; 108838 -Function108838: ; 108838 - ld c, $28 - call Function1082cc +MobileTradeAnim_06: ; 108838 + ld c, 40 + call WaitMobileTradeSpriteAnims ld a, $1 ld [wcf64], a ld de, SFX_SHARPEN call PlaySFX - call Function1082b7 + call GetMobileTradeAnimByte ret ; 10884c -Function10884c: ; 10884c +MobileTradeAnim_07: ; 10884c ld c, 80 call DelayFrames depixel 30, 10, 2, 0 ld a, SPRITE_ANIM_INDEX_24 call _InitSpriteAnimStruct - call Function1082b7 + call GetMobileTradeAnimByte ld de, SFX_THROW_BALL call PlaySFX ret ; 108863 -Function108863: ; 108863 - ld c, $28 - call Function1082cc -.asm_108868 +MobileTradeAnim_GetTrademon1: ; 108863 + ld c, 40 + call WaitMobileTradeSpriteAnims +.loop ld a, [hSCY] cp $f8 - jr z, .asm_108879 + jr z, .done add $8 ld [hSCY], a - ld c, $1 - call Function1082cc - jr .asm_108868 + ld c, 1 + call WaitMobileTradeSpriteAnims + jr .loop -.asm_108879 +.done callba DeinitializeAllSprites depixel 9, 10, 2, 0 ld a, SPRITE_ANIM_INDEX_25 @@ -1074,18 +1110,18 @@ Function108863: ; 108863 ld de, SFX_GLASS_TING_2 call PlaySFX call Function108af4 - call Function1082b2 + call MobileTradeAnim_Next ret ; 108894 -Function108894: ; 108894 - ld c, $14 - ld hl, StringBuffer2 + 2 +MobileTradeAnim_GetTrademon2: ; 108894 + ld c, 20 + ld hl, BGPals + 1 palettes call Function1082fa ld de, SFX_GIVE_TRADEMON call PlaySFX - ld c, $14 - ld hl, StringBuffer2 + 2 + ld c, 20 + ld hl, BGPals + 1 palettes call Function1082fa call Function108af4 .asm_1088ad @@ -1119,14 +1155,14 @@ endr jr .asm_1088e7 .asm_1088dd - call Function108bbd + call MobileTradeAnim_DeleteSprites ld a, $1 call Function108ad4 jr .asm_1088e7 .asm_1088e7 - ld c, $1 - call Function1082cc + ld c, 1 + call WaitMobileTradeSpriteAnims jr .asm_1088ad .asm_1088ee @@ -1137,60 +1173,60 @@ rept 2 inc a endr ld [hSCX], a - cp $f8 + cp -8 jr nz, .asm_1088e7 - call Function108bbd - ld c, $1 - call Function1082cc + call MobileTradeAnim_DeleteSprites + ld c, 1 + call WaitMobileTradeSpriteAnims jr .asm_1088ee .asm_108906 - call Function1082b2 + call MobileTradeAnim_Next ret ; 10890a -Function10890a: ; 10890a - ld c, $28 - ld hl, $d0b0 +MobileTradeAnim_GetTrademon3: ; 10890a + ld c, 40 + ld hl, BGPals + 6 palettes call Function1082f0 call Function108af4 - call Function1082b7 + call GetMobileTradeAnimByte ret ; 108919 -Function108919: ; 108919 - ld c, $28 - call Function1082cc +MobileTradeAnim_0f: ; 108919 + ld c, 40 + call WaitMobileTradeSpriteAnims callba DeinitializeAllSprites call ClearBGPalettes call ClearSprites call ClearTileMap call DisableLCD - call Function1081ad - call Function1081ca + call MobileTradeAnim_ClearVTiles + call MobileTradeAnim_ClearBGMap call EnableLCD - call Function1082b7 + call GetMobileTradeAnimByte ret ; 10893d -Function10893d: ; 10893d -.asm_10893d +MobileTradeAnim_FadeToBlack: ; 10893d +.loop ld a, [rBGP] and a - jr z, .asm_108953 + jr z, .blank sla a sla a call DmgToCgbBGPals call DmgToCgbObjPal0 - ld c, $4 + ld c, 4 call DelayFrames - jr .asm_10893d + jr .loop -.asm_108953 +.blank xor a call DmgToCgbBGPals call DmgToCgbObjPal0 - call Function1082b7 + call GetMobileTradeAnimByte ret ; 10895e @@ -1200,18 +1236,17 @@ Function10895e: ; 10895e Function108963: ld de, VTiles2 tile $31 - asm_108966 call DelayFrame ld hl, VTiles2 - lb bc, $0a, $31 + lb bc, $a, $31 ; $a is the bank of ????? call Request2bpp call WaitTop - call Function108ac8 + call MobileTradeAnim_ClearTilemap hlcoord 7, 2 xor a ld [hFillBox], a - ld bc, $0707 + lb bc, 7, 7 predef FillBox call WaitBGMap ret @@ -1219,121 +1254,121 @@ asm_108966 Function10898a: ; 10898a ld de, VTiles2 - call Function1081e9 + call MobileTradeAnim_GetFrontpic call WaitTop - call Function108ac8 + call MobileTradeAnim_ClearTilemap hlcoord 7, 2 xor a ld [hFillBox], a - ld bc, $0707 + lb bc, 7, 7 predef FillBox call WaitBGMap ret ; 1089a8 -Function1089a8: ; 1089a8 - ld de, $c6d0 +MobileTradeAnim_DisplayMonToBeSent: ; 1089a8 + ld de, wPlayerTrademonSpecies ld a, [de] - cp $fd - jr z, asm_1089fc - call Function108a5b - ld de, $c6d0 - call Function108a92 - ld de, $c6d1 - call Function108a9c - ld a, [wc701] - ld de, $c6f2 - call Function108aa3 - ld de, $c6ff - call Function108abe - call Function108a87 + cp EGG + jr z, MobileTradeAnim_DisplayEggData + call MobileTradeAnim_LoadMonTemplate + ld de, wPlayerTrademonSpecies + call MobileTradeAnim_MonDisplay_PrintSpeciesNumber + ld de, wPlayerTrademonSpeciesName + call MobileTradeAnim_MonDisplay_PrintSpeciesName + ld a, [wPlayerTrademonCaughtData] + ld de, wPlayerTrademonOTName + call MobileTradeAnim_MonDisplay_PrintOTNameAndGender + ld de, wPlayerTrademonID + call MobileTradeAnim_MonDisplay_PrintIDNumber + call MobileTradeAnim_MonDisplay_UpdateBGMap ret -Function1089d2: - ld de, wc702 +MobileTradeAnim_DisplayReceivedMon: + ld de, wOTTrademonSpecies ld a, [de] - cp $fd - jr z, asm_1089fc - call Function108a5b - ld de, wc702 - call Function108a92 - ld de, wc703 - call Function108a9c - ld a, [wEnemyCharging] - ld de, wc724 - call Function108aa3 - ld de, wEnemyWrapCount - call Function108abe - call Function108a87 + cp EGG + jr z, MobileTradeAnim_DisplayEggData + call MobileTradeAnim_LoadMonTemplate + ld de, wOTTrademonSpecies + call MobileTradeAnim_MonDisplay_PrintSpeciesNumber + ld de, wOTTrademonSpeciesName + call MobileTradeAnim_MonDisplay_PrintSpeciesName + ld a, [wOTTrademonCaughtData] + ld de, wOTTrademonOTName + call MobileTradeAnim_MonDisplay_PrintOTNameAndGender + ld de, wOTTrademonID + call MobileTradeAnim_MonDisplay_PrintIDNumber + call MobileTradeAnim_MonDisplay_UpdateBGMap ret -asm_1089fc +MobileTradeAnim_DisplayEggData call WaitTop - call Function108ac8 + call MobileTradeAnim_ClearTilemap ld a, VBGMap1 / $100 ld [hBGMapAddress + 1], a hlcoord 5, 0 - ld b, $6 - ld c, $9 + ld b, 6 + ld c, 9 call TextBox hlcoord 6, 2 - ld de, String_108a1d + ld de, .EggTemplate call PlaceString - call Function108a87 + call MobileTradeAnim_MonDisplay_UpdateBGMap ret ; 108a1d -String_108a1d: ; 108a1d +.EggTemplate: ; 108a1d db "タマゴ" next "おや/?????" - next $73, "№", $f2, "?????" + next "№·?????" db "@" ; 108a33 Function108a33: ; 108a33 call WaitTop - call Function108ac8 + call MobileTradeAnim_ClearTilemap ld a, VBGMap1 / $100 ld [hBGMapAddress + 1], a hlcoord 5, 0 - ld b, $6 - ld c, $9 + ld b, 6 + ld c, 9 call TextBox hlcoord 7, 4 - ld de, String_108a54 + ld de, .OddEgg call PlaceString - call Function108a87 + call MobileTradeAnim_MonDisplay_UpdateBGMap ret ; 108a54 -String_108a54: ; 108a54 +.OddEgg: ; 108a54 db "なぞのタマゴ@" ; 108a5b -Function108a5b: ; 108a5b +MobileTradeAnim_LoadMonTemplate: ; 108a5b call WaitTop - call Function108ac8 + call MobileTradeAnim_ClearTilemap ld a, VBGMap1 / $100 ld [hBGMapAddress + 1], a hlcoord 4, 0 - ld b, $6 - ld c, $a + ld b, 6 + ld c, 10 call TextBox hlcoord 5, 0 - ld de, String_108a79 + ld de, .MonTemplate call PlaceString ret ; 108a79 -String_108a79: ; 108a79 - db "─ №", $f2 +.MonTemplate: ; 108a79 + db "─ №·" next "" next "おや/" - next $73, "№", $f2 + next "№·" db "@" ; 108a87 -Function108a87: ; 108a87 +MobileTradeAnim_MonDisplay_UpdateBGMap: ; 108a87 call WaitBGMap call WaitTop ld a, VBGMap0 / $100 @@ -1341,31 +1376,30 @@ Function108a87: ; 108a87 ret ; 108a92 -Function108a92: ; 108a92 +MobileTradeAnim_MonDisplay_PrintSpeciesNumber: ; 108a92 hlcoord 9, 0 lb bc, PRINTNUM_LEADINGZEROS | 1, 3 call PrintNum ret ; 108a9c -Function108a9c: ; 108a9c +MobileTradeAnim_MonDisplay_PrintSpeciesName: ; 108a9c hlcoord 5, 2 call PlaceString ret ; 108aa3 -Function108aa3: ; 108aa3 +MobileTradeAnim_MonDisplay_PrintOTNameAndGender: ; 108aa3 cp $3 - jr c, .asm_108aa8 + jr c, .got_gender xor a - -.asm_108aa8 +.got_gender push af hlcoord 8, 4 call PlaceString inc bc pop af - ld hl, Unknown_108abb + ld hl, .GenderChars ld d, 0 ld e, a add hl, de @@ -1374,21 +1408,23 @@ Function108aa3: ; 108aa3 ret ; 108abb -Unknown_108abb: ; 108abb - db " ", "♂", "♀" +.GenderChars: ; 108abb + db " " + db "♂" + db "♀" ; 108abe -Function108abe: ; 108abe +MobileTradeAnim_MonDisplay_PrintIDNumber: ; 108abe hlcoord 8, 6 lb bc, PRINTNUM_LEADINGZEROS | 2, 5 call PrintNum ret ; 108ac8 -Function108ac8: ; 108ac8 +MobileTradeAnim_ClearTilemap: ; 108ac8 hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT - ld a, $7f + ld a, " " call ByteFill ret ; 108ad4 @@ -1401,12 +1437,11 @@ Function108ad4: ; 108ad4 .asm_108adc ld de, GFX_1091c7 - .asm_108adf ld a, $1 ld [rVBK], a ld hl, VTiles2 tile $4a - lb bc, $42, $10 + lb bc, BANK(GFX_1092c7), 16 call Get2bpp_2 call DelayFrame ld a, $0 @@ -1421,33 +1456,33 @@ Function108af4: ; 108af4 ld [rSVBK], a ld a, [wcf65] and $1 - jr z, .asm_108b1c + jr z, .copy_palette_109147 ld hl, Palette_109187 ld de, UnknOBPals - ld bc, $0040 + ld bc, 8 palettes call CopyBytes ld hl, Palette_109187 ld de, OBPals - ld bc, $0040 + ld bc, 8 palettes call CopyBytes - jr .asm_108b34 + jr .done_copy -.asm_108b1c +.copy_palette_109147 ld hl, Palette_109147 ld de, UnknOBPals - ld bc, $0040 + ld bc, 8 palettes call CopyBytes ld hl, Palette_109147 ld de, OBPals - ld bc, $0040 + ld bc, 8 palettes call CopyBytes -.asm_108b34 +.done_copy pop af ld [rSVBK], a - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbObjPal0 - ld a, $e4 + ld a, %11100100 ; 3,2,1,0 call DmgToCgbBGPals call DelayFrame ret @@ -1458,7 +1493,7 @@ Function108b45: ; 108b45 push af ld a, $5 ld [rSVBK], a - ld de, $7fff + ld de, (31 << 10) + (31 << 5) + 31 ; $7fff ld hl, UnknBGPals ld a, e ld [hli], a @@ -1474,16 +1509,16 @@ Function108b5a: ; 108b5a push af ld a, $5 ld [rSVBK], a - ld de, $3ff2 - ld hl, $d0a0 + ld de, (15 << 10) + (31 << 5) + 18 ; $3ff2 + ld hl, BGPals + 4 palettes ld c, $10 -.asm_108b69 +.loop ld a, e ld [hli], a ld a, d ld [hli], a dec c - jr nz, .asm_108b69 + jr nz, .loop pop af ld [rSVBK], a ld a, $1 @@ -1498,14 +1533,13 @@ Function108b78: ; 108b78 ld [rSVBK], a ld a, c and $2 - jr z, .asm_108b89 - ld de, $7fff - jr .asm_108b8c + jr z, .Orange + ld de, (31 << 10) + (31 << 5) + 31 ; $7fff + jr .load_pal -.asm_108b89 - ld de, $05ff - -.asm_108b8c +.Orange + ld de, ( 1 << 10) + (15 << 5) + 31 ; $05ff +.load_pal ld a, e ld [hli], a ld a, d @@ -1530,22 +1564,21 @@ Function108b98: ; 108b98 and $1 xor d jr z, .asm_108bad - ld hl, Palette_108b98 + 8 + ld hl, Palette_108b98 + 1 palettes jr .asm_108bb0 .asm_108bad ld hl, Palette_108b98 - .asm_108bb0 - ld de, UnknBGPals + 8 * 7 - ld bc, $0040 + ld de, UnknBGPals + 7 palettes + ld bc, 8 palettes call CopyBytes pop af ld [rSVBK], a ret ; 108bbd -Function108bbd: ; 108bbd +MobileTradeAnim_DeleteSprites: ; 108bbd callba DeinitializeAllSprites call ClearSprites ret @@ -1555,25 +1588,26 @@ Function108bc7: ; 108bc7 (42:4bc7) ld a, [wcf64] and a ret z - ld hl, $5 + ld hl, SPRITEANIMSTRUCT_YCOORD add hl, bc ld a, [hl] - cp $f2 - jr z, .asm_108bd9 - sub $8 + cp -1 * 8 - 6 + jr z, .delete + sub 1 * 8 ld [hl], a ret -.asm_108bd9 + +.delete callba DeinitializeSprite ret Function108be0: ; 108be0 (42:4be0) - ld hl, $5 + ld hl, SPRITEANIMSTRUCT_YCOORD add hl, bc ld a, [hl] - cp $4a + cp 9 * 8 + 2 ret z - add $8 + add 1 * 8 ld [hl], a ret ; 108bec (42:4bec) @@ -1581,28 +1615,28 @@ Function108be0: ; 108be0 (42:4be0) Function108bec: ; 108bec ld a, $90 ld [hWY], a - ld hl, UnknownText_0x108c07 + ld hl, .PlayerWillTradeMon call PrintText - ld c, $50 + ld c, 80 call DelayFrames - ld hl, UnknownText_0x108c0c + ld hl, .ForPartnersMon call PrintText - ld c, $50 + ld c, 80 call DelayFrames ret ; 108c07 -UnknownText_0x108c07: ; 0x108c07 +.PlayerWillTradeMon: ; 0x108c07 text_jump UnknownText_0x1bc787 db "@" ; 0x108c0c -UnknownText_0x108c0c: ; 0x108c0c +.ForPartnersMon: ; 0x108c0c text_jump UnknownText_0x1bc79d db "@" ; 0x108c11 -UnknownText_0x108c11: ; 0x108c11 +.UnusedTextPlayersMonTrade: ; 0x108c11 text_jump UnknownText_0x1bc7b0 db "@" ; 0x108c16 @@ -1610,14 +1644,14 @@ UnknownText_0x108c11: ; 0x108c11 Function108c16: ; 108c16 ld a, $90 ld [hWY], a - ld hl, UnknownText_0x108c26 + ld hl, .TakeGoodCareOfMon call PrintText - ld c, $50 + ld c, 80 call DelayFrames ret ; 108c26 -UnknownText_0x108c26: ; 0x108c26 +.TakeGoodCareOfMon: ; 0x108c26 text_jump UnknownText_0x1bc7c3 db "@" ; 0x108c2b @@ -1625,16 +1659,16 @@ UnknownText_0x108c26: ; 0x108c26 Function108c2b: ; 108c2b ld a, $90 ld [hWY], a - ld hl, UnknownText_0x108c3b + ld hl, .PlayersMonTrade call PrintText - ld c, $50 + ld c, 80 call DelayFrames ret ; 108c3b -UnknownText_0x108c3b: ; 0x108c3b +.PlayersMonTrade: ; 0x108c3b text_jump UnknownText_0x1bc7dd - db $50 + db "@" ; 0x108c40 Function108c40: ; 108c40 @@ -1643,26 +1677,26 @@ Function108c40: ; 108c40 ld a, [wcf65] and $80 jr z, .asm_108c57 - ld hl, UnknownText_0x108c68 + ld hl, .CameBack call PrintText - ld c, $50 + ld c, 80 call DelayFrames ret .asm_108c57 - ld hl, UnknownText_0x108c63 + ld hl, .TakeGoodCareOf call PrintText - ld c, $50 + ld c, 80 call DelayFrames ret ; 108c63 -UnknownText_0x108c63: ; 0x108c63 +.TakeGoodCareOf: ; 0x108c63 text_jump UnknownText_0x1bc7f0 db "@" ; 0x108c68 -UnknownText_0x108c68: ; 0x108c68 +.CameBack: ; 0x108c68 text_jump UnknownText_0x1bc80a db "@" ; 0x108c6d @@ -1691,81 +1725,81 @@ Function108c80: ; 108c80 ret ; 108c9b -Function108c9b: ; 108c9b -; localization error: $b should be 6 here +DebugMobileTrade: ; 108c9b +; localization error: NAME_LENGTH (11) should be 6 here - ld hl, Unknown_108ce9 + ld hl, .DebugTradeData ld a, [hli] - ld [$c6d0], a + ld [wPlayerTrademonSpecies], a - ld de, $c6e7 - ld c, $b -.asm_108ca7 + ld de, wPlayerTrademonSenderName + ld c, NAME_LENGTH +.your_name_loop ld a, [hli] ld [de], a inc de dec c - jr nz, .asm_108ca7 + jr nz, .your_name_loop - ld de, $c6ff - ld c, $2 -.asm_108cb2 + ld de, wPlayerTrademonID + ld c, 2 +.your_id_loop ld a, [hli] ld [de], a inc de dec c - jr nz, .asm_108cb2 + jr nz, .your_id_loop - ld de, $c6f2 - ld c, $b -.asm_108cbd + ld de, wPlayerTrademonOTName + ld c, NAME_LENGTH +.your_ot_loop ld a, [hli] ld [de], a inc de dec c - jr nz, .asm_108cbd + jr nz, .your_ot_loop ld a, [hli] - ld [wc702], a + ld [wOTTrademonSpecies], a - ld de, wc719 - ld c, $b -.asm_108ccc + ld de, wOTTrademonSenderName + ld c, NAME_LENGTH +.their_name_loop ld a, [hli] ld [de], a inc de dec c - jr nz, .asm_108ccc + jr nz, .their_name_loop - ld de, wEnemyWrapCount - ld c, $2 -.asm_108cd7 + ld de, wOTTrademonID + ld c, 2 +.their_id_loop ld a, [hli] ld [de], a inc de dec c - jr nz, .asm_108cd7 + jr nz, .their_id_loop - ld de, wc724 - ld c, $b -.asm_108ce2 + ld de, wOTTrademonOTName + ld c, NAME_LENGTH +.their_ot_loop ld a, [hli] ld [de], a inc de dec c - jr nz, .asm_108ce2 + jr nz, .their_ot_loop ret ; 108ce9 -Unknown_108ce9: - db 3 +.DebugTradeData: + db VENUSAUR db "ゲーフり@@" - db $23, $01 + dw $0123 db "かびーん@@" - db 6 + db CHARIZARD db "クりーチャ@" - db $56, $04 + dw $0456 db "マツミヤ@@" ; 108d07 @@ -1777,12 +1811,12 @@ Function108d07: ; 108d07 ld a, $7 .asm_108d12 - ld bc, $0008 + ld bc, 1 palettes ld hl, Palette_1093c7 call AddNTimes ld a, $5 - ld de, wd020 - ld bc, $0008 + ld de, UnknBGPals + 4 palettes + ld bc, 1 palettes call FarCopyWRAM ret ; 108d27 @@ -1800,12 +1834,16 @@ LZ_1090a7: INCBIN "gfx/unknown/1090a7.tilemap.lz" Palette_1090f7: +; unreferenced RGB 31, 31, 31 RGB 0, 0, 0 + RGB 31, 0, 25 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 0, 0, 0 + RGB 9, 19, 31 RGB 0, 0, 0 @@ -1814,30 +1852,37 @@ Palette_109107: RGB 20, 20, 20 RGB 11, 11, 11 RGB 0, 0, 0 + RGB 31, 15, 1 RGB 14, 14, 31 RGB 12, 9, 31 RGB 0, 0, 0 + RGB 18, 31, 15 RGB 14, 14, 31 RGB 12, 9, 31 RGB 0, 0, 0 + RGB 18, 31, 15 RGB 20, 20, 20 RGB 11, 11, 11 RGB 0, 0, 0 + RGB 18, 31, 15 RGB 31, 7, 9 RGB 18, 0, 1 RGB 0, 0, 0 + RGB 18, 31, 15 RGB 20, 20, 20 RGB 11, 11, 11 RGB 0, 0, 0 + RGB 31, 15, 1 RGB 18, 0, 30 RGB 9, 0, 17 RGB 0, 0, 0 + RGB 18, 31, 15 RGB 18, 0, 30 RGB 9, 0, 17 @@ -1848,30 +1893,37 @@ Palette_109147: RGB 31, 31, 12 RGB 31, 13, 12 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 31, 23, 15 RGB 31, 18, 7 RGB 31, 15, 0 + RGB 31, 31, 31 RGB 20, 20, 20 RGB 11, 11, 11 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 31, 0, 25 RGB 31, 0, 25 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 9, 19, 31 RGB 9, 19, 31 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 0, 0, 0 RGB 0, 0, 0 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 0, 0, 0 RGB 0, 0, 0 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 0, 0, 0 RGB 0, 0, 0 @@ -1882,30 +1934,37 @@ Palette_109187: RGB 31, 31, 12 RGB 31, 13, 12 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 31, 23, 15 RGB 31, 18, 7 RGB 31, 15, 0 + RGB 31, 31, 31 RGB 20, 20, 20 RGB 11, 11, 11 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 9, 19, 31 RGB 9, 19, 31 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 31, 0, 25 RGB 31, 0, 25 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 0, 0, 0 RGB 0, 0, 0 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 0, 0, 0 RGB 0, 0, 0 RGB 0, 0, 0 + RGB 31, 31, 31 RGB 0, 0, 0 RGB 0, 0, 0 @@ -1921,30 +1980,37 @@ Palette_1093c7: RGB 4, 13, 31 RGB 0, 0, 31 RGB 0, 0, 0 + RGB 18, 31, 15 RGB 31, 31, 0 RGB 31, 15, 0 RGB 0, 0, 0 + RGB 18, 31, 15 RGB 9, 24, 0 RGB 2, 16, 0 RGB 0, 0, 0 + RGB 18, 31, 15 RGB 31, 7, 9 RGB 18, 0, 1 RGB 0, 0, 0 + RGB 18, 31, 15 RGB 28, 5, 31 RGB 17, 0, 17 RGB 0, 0, 0 + RGB 18, 31, 15 RGB 9, 9, 9 RGB 4, 4, 4 RGB 0, 0, 0 + RGB 18, 31, 15 RGB 31, 13, 21 RGB 27, 7, 12 RGB 0, 0, 0 + RGB 18, 31, 15 RGB 21, 20, 20 RGB 14, 14, 31 diff --git a/text/common_2.asm b/text/common_2.asm index 78dd90069..6713fb9bb 100644 --- a/text/common_2.asm +++ b/text/common_2.asm @@ -441,10 +441,10 @@ UnknownText_0x1bc6c7: ; 0x1bc6c7 ; 0x1bc6e9 UnknownText_0x1bc6e9: ; 0x1bc6e9 - text_from_ram wc6d1 + text_from_ram wPlayerTrademonSpeciesName text " was" line "sent to @" - text_from_ram wc719 + text_from_ram wOTTrademonSenderName text "." done ; 0x1bc701 @@ -455,14 +455,14 @@ UnknownText_0x1bc701: ; 0x1bc701 ; 0x1bc703 UnknownText_0x1bc703: ; 0x1bc703 - text_from_ram wc719 + text_from_ram wOTTrademonSenderName text " bids" line "farewell to" done ; 0x1bc719 UnknownText_0x1bc719: ; 0x1bc719 - text_from_ram wc703 + text_from_ram wOTTrademonSpeciesName text "." done ; 0x1bc71f @@ -470,35 +470,35 @@ UnknownText_0x1bc719: ; 0x1bc719 UnknownText_0x1bc71f: ; 0x1bc71f text "Take good care of" line "@" - text_from_ram wc703 + text_from_ram wOTTrademonSpeciesName text "." done ; 0x1bc739 UnknownText_0x1bc739: ; 0x1bc739 text "For @" - text_from_ram wc6e7 + text_from_ram wPlayerTrademonSenderName text "'s" line "@" - text_from_ram wc6d1 + text_from_ram wPlayerTrademonSpeciesName text "," done ; 0x1bc74c UnknownText_0x1bc74c: ; 0x1bc74c - text_from_ram wc719 + text_from_ram wOTTrademonSenderName text " sends" line "@" - text_from_ram wc703 + text_from_ram wOTTrademonSpeciesName text "." done ; 0x1bc75e UnknownText_0x1bc75e: ; 0x1bc75e - text_from_ram wc719 + text_from_ram wOTTrademonSenderName text " will" line "trade @" - text_from_ram wc703 + text_from_ram wOTTrademonSpeciesName db "@" ; 0x1bc773 @@ -508,19 +508,19 @@ UnknownText_0x1bc773: ; 0x1bc773 UnknownText_0x1bc774: ; 0x1bc774 text "for @" - text_from_ram wc6e7 + text_from_ram wPlayerTrademonSenderName text "'s" line "@" - text_from_ram wc6d1 + text_from_ram wPlayerTrademonSpeciesName text "." done ; 0x1bc787 UnknownText_0x1bc787: ; 0x1bc787 - text_from_ram wc6e7 + text_from_ram wPlayerTrademonSenderName text " will" line "trade @" - text_from_ram wc6d1 + text_from_ram wPlayerTrademonSpeciesName db "@" ; 0x1bc79c @@ -530,19 +530,19 @@ UnknownText_0x1bc79c: ; 0x1bc79c UnknownText_0x1bc79d: ; 0x1bc79d text "for @" - text_from_ram wc719 + text_from_ram wOTTrademonSenderName text "'s" line "@" - text_from_ram wc703 + text_from_ram wOTTrademonSpeciesName text "." done ; 0x1bc7b0 UnknownText_0x1bc7b0: ; 0x1bc7b0 - text_from_ram wc6e7 + text_from_ram wPlayerTrademonSenderName text "'s" line "@" - text_from_ram wc6d1 + text_from_ram wPlayerTrademonSpeciesName text " trade…" done ; 0x1bc7c3 @@ -550,16 +550,16 @@ UnknownText_0x1bc7b0: ; 0x1bc7b0 UnknownText_0x1bc7c3: ; 0x1bc7c3 text "Take good care of" line "@" - text_from_ram wc703 + text_from_ram wOTTrademonSpeciesName text "." done ; 0x1bc7dd UnknownText_0x1bc7dd: ; 0x1bc7dd - text_from_ram wc6e7 + text_from_ram wPlayerTrademonSenderName text "'s" line "@" - text_from_ram wc6d1 + text_from_ram wPlayerTrademonSpeciesName text " trade…" done ; 0x1bc7f0 @@ -567,13 +567,13 @@ UnknownText_0x1bc7dd: ; 0x1bc7dd UnknownText_0x1bc7f0: ; 0x1bc7f0 text "Take good care of" line "@" - text_from_ram wc703 + text_from_ram wOTTrademonSpeciesName text "." done ; 0x1bc80a UnknownText_0x1bc80a: ; 0x1bc80a - text_from_ram wc703 + text_from_ram wOTTrademonSpeciesName text " came" line "back!" done diff --git a/wram.asm b/wram.asm index d988960b4..1ef780e92 100644 --- a/wram.asm +++ b/wram.asm @@ -1014,6 +1014,7 @@ wEnemySwitchMonParam:: wc717:: ds 1 wc718:: wEnemySwitchMonIndex:: ds 1 +wTempLevel:: wc719:: ds 1 LastPlayerMon:: ; c71a wc71a:: ds 1 @@ -3113,20 +3114,17 @@ w2_d16e:: ds 1 wPokeAnimCoord:: ds 2 wPokeAnimFrontpicHeight:: ds 1 ; PokeAnim Data -w2_d172:: ds 1 +wPokeAnimExtraFlag:: ds 1 w2_d173:: ds 1 -w2_d174:: ds 1 -w2_d175:: ds 1 -w2_d176:: ds 1 -w2_d177:: ds 1 -w2_d178:: ds 1 -w2_d179:: ds 1 -w2_d17a:: ds 1 -w2_d17b:: ds 1 -w2_d17c:: ds 1 +wPokeAnimPointerBank:: ds 1 +wPokeAnimPointerAddr:: ds 2 +wPokeAnimFramesBank:: ds 1 +wPokeAnimFramesAddr:: ds 2 +wPokeAnimBitmaskBank:: ds 1 +wPokeAnimBitmaskAddr:: ds 2 w2_d17d:: ds 1 w2_d17e:: ds 1 -w2_d17f:: ds 1 +wPokeAnimRepeatTimer:: ds 1 w2_d180:: ds 1 wPokeAnimWaitCounter:: ds 1 w2_d182:: ds 1