ref: efee40447ef4bce70cb97fa9c653fe350af000d1
parent: 7203e9d2cc757a95bac02ec019ffa094f516c9dd
author: PikalaxALT <PikalaxALT@gmail.com>
date: Thu Dec 17 08:49:26 EST 2015
Mobile trade animations, pokepic animations
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -7577,7 +7577,7 @@
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 @@
ld a, d
ld [hld], a
-.max_exp
+.not_max_exp
xor a ; PARTYMON
ld [MonType], a
predef CopyPkmnToTempMon
@@ -7599,7 +7599,7 @@
cp d
jp z, .skip_stats
; <NICKNAME> grew to level ##!
- ld [wc719], a
+ ld [wTempLevel], a
ld a, [CurPartyLevel]
push af
ld a, d
@@ -7707,7 +7707,7 @@
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 @@
ld a, [CurPartyLevel]
push af
ld c, a
- ld a, [wc719]
+ ld a, [wTempLevel]
ld b, a
.level_loop
--- a/engine/breeding/egg.asm
+++ b/engine/breeding/egg.asm
@@ -703,7 +703,7 @@
push af
ld de, MUSIC_NONE
call PlayMusic
- callba Function8000
+ callba BlankScreen
call DisableLCD
ld hl, EggHatchGFX
ld de, VTiles0 tile $00
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -1067,7 +1067,7 @@
.jumptable
dw _MainMenu
- dw Function6389
+ dw DeleteSaveData
dw CrystalIntroSequence
dw CrystalIntroSequence
dw ResetClock
@@ -1320,8 +1320,8 @@
ret
; 6389
-Function6389: ; 6389
- callba Function4d54c
+DeleteSaveData: ; 6389
+ callba _DeleteSaveData
jp Init
; 6392
--- a/engine/link.asm
+++ b/engine/link.asm
@@ -1258,7 +1258,7 @@
ld [wd263], a
callab Function50db9
ld hl, OTPartyMon1Species
- callba Function4d319
+ callba LinkMonStatsScreen
jp Function2891c
.asm_2885b
@@ -1276,7 +1276,7 @@
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 @@
ld a, $4
ld [wd263], a
callab Function50db9
- callba Function4d319
+ callba LinkMonStatsScreen
call Call_LoadTempTileMapToTileMap
hlcoord 6, 1
lb bc, 6, 1
--- a/engine/mart.asm
+++ b/engine/mart.asm
@@ -369,7 +369,7 @@
BuyMenu: ; 15c62
call FadeToMenu
- callba Function8000
+ callba BlankScreen
xor a
ld [wd045 + 1], a
ld a, 1
--- a/engine/stats_screen.asm
+++ b/engine/stats_screen.asm
@@ -120,7 +120,7 @@
call DelayFrame
ret
.asm_4dd49
- callba Functiond00b4
+ callba SetUpPokeAnim
jr nc, .asm_4dd56
ld hl, wcf64
res 6, [hl]
--- a/engine/trade/animation.asm
+++ b/engine/trade/animation.asm
@@ -180,23 +180,23 @@
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 @@
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 @@
hlcoord 17, 3
ld a, $5d
ld [hl], a
+
ld a, $61
ld de, SCREEN_WIDTH
ld c, $3
@@ -574,6 +575,7 @@
ld [hl], a
dec c
jr nz, .loop
+
add hl, de
ld a, $5f
ld [hld], a
@@ -644,9 +646,9 @@
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 @@
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 @@
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 @@
ret
; 294a9
-Function294a9: ; 294a9
+TradeAnim_GetNickname: ; 294a9
push de
ld [wd265], a
call GetPokemonName
@@ -847,14 +849,13 @@
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 @@
; 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 @@
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
--- a/gfx/pics/animation.asm
+++ b/gfx/pics/animation.asm
@@ -97,7 +97,7 @@
ret c
call LoadMonAnimation
.loop
- call Functiond00b4
+ call SetUpPokeAnim
push af
callba Function10402d
pop af
@@ -121,7 +121,7 @@
ret
; d00b4
-Functiond00b4: ; d00b4
+SetUpPokeAnim: ; d00b4
ld a, [rSVBK]
push af
ld a, $2
@@ -184,8 +184,8 @@
; 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 @@
; 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 @@
; d012f
PokeAnim_Extra: ; d012f
- ld c, $1
- ld b, $0
+ ld c, TRUE
+ ld b, 0
call Functiond0228
call Functiond0504
ld a, [wPokeAnimSceneIndex]
@@ -365,8 +365,8 @@
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
@@ -373,10 +373,10 @@
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 @@
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,7 +509,7 @@
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
@@ -516,7 +516,7 @@
rept 2
add hl, de
endr
- ld a, [w2_d174]
+ ld a, [wPokeAnimPointerBank]
call GetFarHalfword
ld a, l
ld [w2_d182], a
@@ -533,7 +533,7 @@
dec a
ld c, a
ld b, $0
- ld hl, w2_d178
+ ld hl, wPokeAnimFramesAddr
ld a, [hli]
ld h, [hl]
ld l, a
@@ -540,9 +540,9 @@
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 @@
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 @@
call AddNTimes
pop bc
ld de, w2_d188
- ld a, [w2_d17a]
+ ld a, [wPokeAnimBitmaskBank]
call FarCopyBytes
ret
; d0356
@@ -594,7 +594,7 @@
and a
jr z, .next
- ld a, [w2_d177]
+ ld a, [wPokeAnimFramesBank]
call GetFarByte
inc hl
push hl
@@ -737,20 +737,34 @@
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 @@
ret
; d055c
-Functiond055c: ; d055c
+GetMonAnimPointer: ; d055c
call PokeAnim_IsEgg
jr z, .egg
@@ -945,12 +959,12 @@
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 @@
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 @@
ret
; d05ce
-Functiond05ce: ; d05ce
+GetMonFramesPointer: ; d05ce
call PokeAnim_IsEgg
jr z, .egg
@@ -1013,7 +1027,7 @@
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 @@
ld c, BANK(JohtoFrames)
.got_frames
ld a, c
- ld [w2_d177], a
+ ld [wPokeAnimFramesBank], a
ld a, [wPokeAnimSpeciesOrUnown]
dec a
@@ -1033,9 +1047,9 @@
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
@@ -1042,15 +1056,15 @@
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 @@
ld a, BANK(BitmasksPointers)
ld hl, BitmasksPointers
.unown
- ld [w2_d17a], a
+ ld [wPokeAnimBitmaskBank], a
ld a, [wPokeAnimSpeciesOrUnown]
dec a
@@ -1070,12 +1084,12 @@
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
@@ -1082,11 +1096,11 @@
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
--- a/home/movement.asm
+++ b/home/movement.asm
@@ -139,7 +139,7 @@
InitMenu3:: ; 1bb1
push hl
push bc
- ld hl, wcfa1
+ ld hl, w2DMenuCursorInitY
ld b, $8
.loop
ld a, [de]
--- a/macros/trade_anim.asm
+++ b/macros/trade_anim.asm
@@ -1,22 +1,22 @@
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
@@ -23,12 +23,12 @@
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
@@ -35,7 +35,7 @@
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
@@ -42,52 +42,52 @@
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
@@ -94,27 +94,27 @@
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
@@ -121,46 +121,133 @@
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
--- a/main.asm
+++ b/main.asm
@@ -743,7 +743,7 @@
SECTION "bank2", ROMX, BANK[$2]
-Function8000: ; 8000
+BlankScreen: ; 8000
call DisableSpriteUpdates
xor a
ld [hBGMapMode], a
@@ -10286,7 +10286,7 @@
; 492b9
CheckCanLearnMoveTutorMove: ; 492b9
- ld hl, MenuDataHeader_0x4930a
+ ld hl, .MenuDataHeader
call LoadMenuDataHeader
predef CanLearnTMHMMove
@@ -10333,7 +10333,7 @@
ret
; 4930a
-MenuDataHeader_0x4930a: ; 0x4930a
+.MenuDataHeader: ; 0x4930a
db $40 ; flags
db 12, 00 ; start coords
db 17, 19 ; end coords
@@ -10601,11 +10601,11 @@
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 @@
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 @@
INCBIN "gfx/shrink2.2bpp.lz"
; 4d319
-Function4d319: ; 4d319
+LinkMonStatsScreen: ; 4d319
ld a, [wMenuCursorY]
dec a
ld [CurPartyMon], a
@@ -10909,7 +10909,7 @@
; 4d3b1
_ResetClock: ; 4d3b1
- callba Function8000
+ callba BlankScreen
ld b, SCGB_08
call GetSGBLayout
call LoadStandardFont
@@ -11184,8 +11184,8 @@
ret
; 4d54c
-Function4d54c: ; 4d54c
- callba Function8000
+_DeleteSaveData: ; 4d54c
+ callba BlankScreen
ld b, SCGB_08
call GetSGBLayout
call LoadStandardFont
@@ -11192,9 +11192,9 @@
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 @@
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 @@
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 @@
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
--- a/misc/gfx_41.asm
+++ b/misc/gfx_41.asm
@@ -219,7 +219,7 @@
ld [hMapAnims], a
ld a, [rSVBK]
push af
- ld a, 6
+ ld a, $6
ld [rSVBK], a
ld a, [rVBK]
push af
--- a/misc/mobile_40.asm
+++ b/misc/mobile_40.asm
@@ -2582,7 +2582,7 @@
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 @@
; 1013c0
Function1013c0: ; 1013c0
- callba Function8000
+ callba BlankScreen
callba MobileFunc_106462
callba Function106464
call Function2b5c
@@ -3972,7 +3972,7 @@
; 10196d
Function10196d: ; 10196d
- callba Function8000
+ callba BlankScreen
callba Function10060d
ld hl, wcd29
set 5, [hl]
@@ -4003,7 +4003,7 @@
xor a
ld [wdc5f], a
ld [wdc60], a
- callba Function8000
+ callba BlankScreen
call SpeechTextBox
callba Function100846
ld c, $78
@@ -6303,8 +6303,8 @@
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 @@
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 @@
ret c
callba MobileMenuJoypad
ld a, c
- ld hl, wcfa8
+ ld hl, w2DMenuFlags4
and [hl]
ret z
push af
@@ -6353,8 +6353,10 @@
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]
@@ -6361,7 +6363,7 @@
ld [wc74e], a
ld hl, PlayerName
ld de, wc6e7
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyBytes
ld a, [wcd4c]
dec a
@@ -6370,13 +6372,13 @@
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
@@ -6383,17 +6385,17 @@
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 @@
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,13 +6417,13 @@
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
@@ -6427,17 +6430,17 @@
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 @@
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 @@
call PlaceString
ld a, $14
ld [bc], a
- ld de, wd26b
+ ld de, OTPlayerName
hlcoord 4, 8
call PlaceString
ld a, $14
--- a/misc/mobile_42.asm
+++ b/misc/mobile_42.asm
@@ -5,11 +5,17 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
call ClearSprites
call ClearTileMap
call DisableLCD
- call Function1081ad
- call Function1081ca
+ call MobileTradeAnim_ClearVTiles
+ call MobileTradeAnim_ClearBGMap
call LoadStandardFont
call LoadFontsBattleExtra
call EnableLCD
@@ -206,16 +242,16 @@
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
@@ -222,39 +258,39 @@
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 @@
ret
; 108239
-Function108239: ; 108239
+MobileTradeAnim_InitSpeciesName: ; 108239
push de
ld [wd265], a
call GetPokemonName
@@ -309,16 +345,16 @@
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 @@
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 @@
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 @@
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 @@
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,23 +488,23 @@
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]
@@ -474,22 +511,22 @@
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 @@
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 @@
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 @@
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 @@
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,19 +627,19 @@
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]
@@ -609,22 +646,22 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
xor a
ld [hBGMapMode], a
call DisableLCD
- call Function1081ca
+ call MobileTradeAnim_ClearBGMap
call Function108c80
call Function108c6d
call EnableLCD
@@ -805,17 +842,17 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 "<ID>№·?????"
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 "<ID>№·"
db "@"
; 108a87
-Function108a87: ; 108a87
+MobileTradeAnim_MonDisplay_UpdateBGMap: ; 108a87
call WaitBGMap
call WaitTop
ld a, VBGMap0 / $100
@@ -1341,7 +1376,7 @@
ret
; 108a92
-Function108a92: ; 108a92
+MobileTradeAnim_MonDisplay_PrintSpeciesNumber: ; 108a92
hlcoord 9, 0
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
call PrintNum
@@ -1348,24 +1383,23 @@
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,11 +1408,13 @@
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
@@ -1385,10 +1421,10 @@
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 @@
.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 @@
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 @@
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 @@
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 @@
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,15 +1564,14 @@
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
@@ -1545,7 +1578,7 @@
ret
; 108bbd
-Function108bbd: ; 108bbd
+MobileTradeAnim_DeleteSprites: ; 108bbd
callba DeinitializeAllSprites
call ClearSprites
ret
@@ -1555,25 +1588,26 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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
--- a/text/common_2.asm
+++ b/text/common_2.asm
@@ -441,10 +441,10 @@
; 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,7 +455,7 @@
; 0x1bc703
UnknownText_0x1bc703: ; 0x1bc703
- text_from_ram wc719
+ text_from_ram wOTTrademonSenderName
text " bids"
line "farewell to"
done
@@ -462,7 +462,7 @@
; 0x1bc719
UnknownText_0x1bc719: ; 0x1bc719
- text_from_ram wc703
+ text_from_ram wOTTrademonSpeciesName
text "."
done
; 0x1bc71f
@@ -470,7 +470,7 @@
UnknownText_0x1bc71f: ; 0x1bc71f
text "Take good care of"
line "@"
- text_from_ram wc703
+ text_from_ram wOTTrademonSpeciesName
text "."
done
; 0x1bc739
@@ -477,28 +477,28 @@
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_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_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_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_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
--- a/wram.asm
+++ b/wram.asm
@@ -1014,6 +1014,7 @@
wc717:: ds 1
wc718::
wEnemySwitchMonIndex:: ds 1
+wTempLevel::
wc719:: ds 1
LastPlayerMon:: ; c71a
wc71a:: ds 1
@@ -3113,20 +3114,17 @@
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