Port pokered's more local system for trade animation scripts

Also factor out trade tilemaps
This commit is contained in:
Rangi 2020-07-17 16:43:41 -04:00
parent 59d9932255
commit de073374a6
6 changed files with 203 additions and 453 deletions

View File

@ -9,6 +9,15 @@ TRADEANIM_LEFT_ARROW EQU "▼" ; $ee
const TRADEANIMSTATE_3 ; 3 const TRADEANIMSTATE_3 ; 3
TRADEANIMJUMPTABLE_LENGTH EQU const_value TRADEANIMJUMPTABLE_LENGTH EQU const_value
add_tradeanim: MACRO
\1_TradeCmd:
dw \1
ENDM
tradeanim: MACRO
db (\1_TradeCmd - DoTradeAnimation.JumpTable) / 2
ENDM
TradeAnimation: TradeAnimation:
xor a xor a
ld [wcf66], a ld [wcf66], a
@ -22,43 +31,43 @@ TradeAnimation:
jr RunTradeAnimScript jr RunTradeAnimScript
.script .script
tradeanim_setup_givemon_scroll tradeanim TradeAnim_SetupGivemonScroll
tradeanim_show_givemon_data tradeanim TradeAnim_ShowGivemonData
tradeanim_do_givemon_scroll tradeanim TradeAnim_DoGivemonScroll
tradeanim_wait_80 tradeanim TradeAnim_Wait80
tradeanim_wait_96 tradeanim TradeAnim_Wait96
tradeanim_poof tradeanim TradeAnim_Poof
tradeanim_rocking_ball tradeanim TradeAnim_RockingBall
tradeanim_enter_link_tube tradeanim TradeAnim_EnterLinkTube1
tradeanim_wait_anim tradeanim TradeAnim_WaitAnim
tradeanim_bulge_through_tube tradeanim TradeAnim_BulgeThroughTube
tradeanim_wait_anim tradeanim TradeAnim_WaitAnim
tradeanim_textbox_scroll tradeanim TradeAnim_TextboxScrollStart
tradeanim_give_trademon_sfx tradeanim TradeAnim_GiveTrademonSFX
tradeanim_tube_to_ot tradeanim TradeAnim_TubeToOT1
tradeanim_sent_to_ot_text tradeanim TradeAnim_SentToOTText
tradeanim_scroll_out_right tradeanim TradeAnim_ScrollOutRight
tradeanim_ot_sends_text_1 tradeanim TradeAnim_OTSendsText1
tradeanim_ot_bids_farewell tradeanim TradeAnim_OTBidsFarewell
tradeanim_wait_40 tradeanim TradeAnim_Wait40
tradeanim_scroll_out_right tradeanim TradeAnim_ScrollOutRight
tradeanim_get_trademon_sfx tradeanim TradeAnim_GetTrademonSFX
tradeanim_tube_to_player tradeanim TradeAnim_TubeToPlayer1
tradeanim_enter_link_tube tradeanim TradeAnim_EnterLinkTube1
tradeanim_drop_ball tradeanim TradeAnim_DropBall
tradeanim_exit_link_tube tradeanim TradeAnim_ExitLinkTube
tradeanim_wait_anim tradeanim TradeAnim_WaitAnim
tradeanim_show_getmon_data tradeanim TradeAnim_ShowGetmonData
tradeanim_poof tradeanim TradeAnim_Poof
tradeanim_wait_anim tradeanim TradeAnim_WaitAnim
tradeanim_frontpic_scroll tradeanim TradeAnim_FrontpicScrollStart
tradeanim_animate_frontpic tradeanim TradeAnim_AnimateFrontpic
tradeanim_wait_80_if_ot_egg tradeanim TradeAnim_Wait80IfOTEgg
tradeanim_textbox_scroll tradeanim TradeAnim_TextboxScrollStart
tradeanim_take_care_of_text tradeanim TradeAnim_TakeCareOfText
tradeanim_scroll_out_right tradeanim TradeAnim_ScrollOutRight
tradeanim_end tradeanim TradeAnim_End
TradeAnimationPlayer2: TradeAnimationPlayer2:
xor a xor a
@ -73,42 +82,42 @@ TradeAnimationPlayer2:
jr RunTradeAnimScript jr RunTradeAnimScript
.script .script
tradeanim_ot_sends_text_2 tradeanim TradeAnim_OTSendsText2
tradeanim_ot_bids_farewell tradeanim TradeAnim_OTBidsFarewell
tradeanim_wait_40 tradeanim TradeAnim_Wait40
tradeanim_scroll_out_right tradeanim TradeAnim_ScrollOutRight
tradeanim_get_trademon_sfx tradeanim TradeAnim_GetTrademonSFX
tradeanim_tube_to_ot tradeanim TradeAnim_TubeToOT1
tradeanim_enter_link_tube tradeanim TradeAnim_EnterLinkTube1
tradeanim_drop_ball tradeanim TradeAnim_DropBall
tradeanim_exit_link_tube tradeanim TradeAnim_ExitLinkTube
tradeanim_wait_anim tradeanim TradeAnim_WaitAnim
tradeanim_show_getmon_data tradeanim TradeAnim_ShowGetmonData
tradeanim_poof tradeanim TradeAnim_Poof
tradeanim_wait_anim tradeanim TradeAnim_WaitAnim
tradeanim_frontpic_scroll tradeanim TradeAnim_FrontpicScrollStart
tradeanim_animate_frontpic tradeanim TradeAnim_AnimateFrontpic
tradeanim_wait_180_if_ot_egg tradeanim TradeAnim_Wait180IfOTEgg
tradeanim_textbox_scroll tradeanim TradeAnim_TextboxScrollStart
tradeanim_take_care_of_text tradeanim TradeAnim_TakeCareOfText
tradeanim_scroll_out_right tradeanim TradeAnim_ScrollOutRight
tradeanim_setup_givemon_scroll tradeanim TradeAnim_SetupGivemonScroll
tradeanim_show_givemon_data tradeanim TradeAnim_ShowGivemonData
tradeanim_do_givemon_scroll tradeanim TradeAnim_DoGivemonScroll
tradeanim_wait_40 tradeanim TradeAnim_Wait40
tradeanim_poof tradeanim TradeAnim_Poof
tradeanim_rocking_ball tradeanim TradeAnim_RockingBall
tradeanim_enter_link_tube tradeanim TradeAnim_EnterLinkTube1
tradeanim_wait_anim tradeanim TradeAnim_WaitAnim
tradeanim_bulge_through_tube tradeanim TradeAnim_BulgeThroughTube
tradeanim_wait_anim tradeanim TradeAnim_WaitAnim
tradeanim_textbox_scroll tradeanim TradeAnim_TextboxScrollStart
tradeanim_give_trademon_sfx tradeanim TradeAnim_GiveTrademonSFX
tradeanim_tube_to_player tradeanim TradeAnim_TubeToPlayer1
tradeanim_sent_to_ot_text tradeanim TradeAnim_SentToOTText
tradeanim_scroll_out_right tradeanim TradeAnim_ScrollOutRight
tradeanim_end tradeanim TradeAnim_End
RunTradeAnimScript: RunTradeAnimScript:
ld hl, wTradeAnimAddress ld hl, wTradeAnimAddress
@ -231,55 +240,54 @@ DoTradeAnimation:
jumptable .JumpTable, wJumptableIndex jumptable .JumpTable, wJumptableIndex
.JumpTable: .JumpTable:
; entries correspond to tradeanim_* constants (see macros/scripts/trade_anims.asm) add_tradeanim TradeAnim_AdvanceScriptPointer ; 00
dw TradeAnim_AdvanceScriptPointer ; 00 add_tradeanim TradeAnim_ShowGivemonData ; 01
dw TradeAnim_ShowGivemonData ; 01 add_tradeanim TradeAnim_ShowGetmonData ; 02
dw TradeAnim_ShowGetmonData ; 02 add_tradeanim TradeAnim_EnterLinkTube1 ; 03
dw TradeAnim_EnterLinkTube1 ; 03 add_tradeanim TradeAnim_EnterLinkTube2 ; 04
dw TradeAnim_EnterLinkTube2 ; 04 add_tradeanim TradeAnim_ExitLinkTube ; 05
dw TradeAnim_ExitLinkTube ; 05 add_tradeanim TradeAnim_TubeToOT1 ; 06
dw TradeAnim_TubeToOT1 ; 06 add_tradeanim TradeAnim_TubeToOT2 ; 07
dw TradeAnim_TubeToOT2 ; 07 add_tradeanim TradeAnim_TubeToOT3 ; 08
dw TradeAnim_TubeToOT3 ; 08 add_tradeanim TradeAnim_TubeToOT4 ; 09
dw TradeAnim_TubeToOT4 ; 09 add_tradeanim TradeAnim_TubeToOT5 ; 0a
dw TradeAnim_TubeToOT5 ; 0a add_tradeanim TradeAnim_TubeToOT6 ; 0b
dw TradeAnim_TubeToOT6 ; 0b add_tradeanim TradeAnim_TubeToOT7 ; 0c
dw TradeAnim_TubeToOT7 ; 0c add_tradeanim TradeAnim_TubeToOT8 ; 0d
dw TradeAnim_TubeToOT8 ; 0d add_tradeanim TradeAnim_TubeToPlayer1 ; 0e
dw TradeAnim_TubeToPlayer1 ; 0e add_tradeanim TradeAnim_TubeToPlayer2 ; 0f
dw TradeAnim_TubeToPlayer2 ; 0f add_tradeanim TradeAnim_TubeToPlayer3 ; 10
dw TradeAnim_TubeToPlayer3 ; 10 add_tradeanim TradeAnim_TubeToPlayer4 ; 11
dw TradeAnim_TubeToPlayer4 ; 11 add_tradeanim TradeAnim_TubeToPlayer5 ; 12
dw TradeAnim_TubeToPlayer5 ; 12 add_tradeanim TradeAnim_TubeToPlayer6 ; 13
dw TradeAnim_TubeToPlayer6 ; 13 add_tradeanim TradeAnim_TubeToPlayer7 ; 14
dw TradeAnim_TubeToPlayer7 ; 14 add_tradeanim TradeAnim_TubeToPlayer8 ; 15
dw TradeAnim_TubeToPlayer8 ; 15 add_tradeanim TradeAnim_SentToOTText ; 16
dw TradeAnim_SentToOTText ; 16 add_tradeanim TradeAnim_OTBidsFarewell ; 17
dw TradeAnim_OTBidsFarewell ; 17 add_tradeanim TradeAnim_TakeCareOfText ; 18
dw TradeAnim_TakeCareOfText ; 18 add_tradeanim TradeAnim_OTSendsText1 ; 19
dw TradeAnim_OTSendsText1 ; 19 add_tradeanim TradeAnim_OTSendsText2 ; 1a
dw TradeAnim_OTSendsText2 ; 1a add_tradeanim TradeAnim_SetupGivemonScroll ; 1b
dw TradeAnim_SetupGivemonScroll ; 1b add_tradeanim TradeAnim_DoGivemonScroll ; 1c
dw TradeAnim_DoGivemonScroll ; 1c add_tradeanim TradeAnim_FrontpicScrollStart ; 1d
dw TradeAnim_FrontpicScrollStart ; 1d add_tradeanim TradeAnim_TextboxScrollStart ; 1e
dw TradeAnim_TextboxScrollStart ; 1e add_tradeanim TradeAnim_ScrollOutRight ; 1f
dw TradeAnim_ScrollOutRight ; 1f add_tradeanim TradeAnim_ScrollOutRight2 ; 20
dw TradeAnim_ScrollOutRight2 ; 20 add_tradeanim TradeAnim_Wait80 ; 21
dw TraideAnim_Wait80 ; 21 add_tradeanim TradeAnim_Wait40 ; 22
dw TraideAnim_Wait40 ; 22 add_tradeanim TradeAnim_RockingBall ; 23
dw TradeAnim_RockingBall ; 23 add_tradeanim TradeAnim_DropBall ; 24
dw TradeAnim_DropBall ; 24 add_tradeanim TradeAnim_WaitAnim ; 25
dw TradeAnim_WaitAnim ; 25 add_tradeanim TradeAnim_WaitAnim2 ; 26
dw TradeAnim_WaitAnim2 ; 26 add_tradeanim TradeAnim_Poof ; 27
dw TradeAnim_Poof ; 27 add_tradeanim TradeAnim_BulgeThroughTube ; 28
dw TradeAnim_BulgeThroughTube ; 28 add_tradeanim TradeAnim_GiveTrademonSFX ; 29
dw TradeAnim_GiveTrademonSFX ; 29 add_tradeanim TradeAnim_GetTrademonSFX ; 2a
dw TradeAnim_GetTrademonSFX ; 2a add_tradeanim TradeAnim_End ; 2b
dw TradeAnim_End ; 2b add_tradeanim TradeAnim_AnimateFrontpic ; 2c
dw TradeAnim_AnimateFrontpic ; 2c add_tradeanim TradeAnim_Wait96 ; 2d
dw TraideAnim_Wait96 ; 2d add_tradeanim TradeAnim_Wait80IfOTEgg ; 2e
dw TraideAnim_Wait80IfOTEgg ; 2e add_tradeanim TradeAnim_Wait180IfOTEgg ; 2f
dw TraideAnim_Wait180IfOTEgg ; 2f
TradeAnim_IncrementJumptableIndex: TradeAnim_IncrementJumptableIndex:
ld hl, wJumptableIndex ld hl, wJumptableIndex
@ -840,32 +848,32 @@ TradeAnim_ShowFrontpic:
call WaitBGMap call WaitBGMap
ret ret
TraideAnim_Wait80: TradeAnim_Wait80:
ld c, 80 ld c, 80
call DelayFrames call DelayFrames
call TradeAnim_AdvanceScriptPointer call TradeAnim_AdvanceScriptPointer
ret ret
TraideAnim_Wait40: TradeAnim_Wait40:
ld c, 40 ld c, 40
call DelayFrames call DelayFrames
call TradeAnim_AdvanceScriptPointer call TradeAnim_AdvanceScriptPointer
ret ret
TraideAnim_Wait96: TradeAnim_Wait96:
ld c, 96 ld c, 96
call DelayFrames call DelayFrames
call TradeAnim_AdvanceScriptPointer call TradeAnim_AdvanceScriptPointer
ret ret
TraideAnim_Wait80IfOTEgg: TradeAnim_Wait80IfOTEgg:
call IsOTTrademonEgg call IsOTTrademonEgg
ret nz ret nz
ld c, 80 ld c, 80
call DelayFrames call DelayFrames
ret ret
TraideAnim_Wait180IfOTEgg: TradeAnim_Wait180IfOTEgg:
call IsOTTrademonEgg call IsOTTrademonEgg
ret nz ret nz
ld c, 180 ld c, 180
@ -1421,7 +1429,7 @@ DebugTrade: ; unreferenced
ret ret
debugtrade: MACRO debugtrade: MACRO
; species, ot name, ot id (?) ; species, ot name, ot id
db \1, \2 db \1, \2
dw \3 dw \3
ENDM ENDM
@ -1430,22 +1438,8 @@ ENDM
debugtrade VENUSAUR, "ゲーフり@@", $0123 ; GAME FREAK debugtrade VENUSAUR, "ゲーフり@@", $0123 ; GAME FREAK
debugtrade CHARIZARD, "クりーチャ@", $0456 ; Creatures Inc. debugtrade CHARIZARD, "クりーチャ@", $0456 ; Creatures Inc.
TradeGameBoyTilemap: TradeGameBoyTilemap: INCBIN "gfx/trade/game_boy.tilemap" ; 6x8
; 6x8 TradeLinkTubeTilemap: INCBIN "gfx/trade/link_cable.tilemap" ; 12x3
db $31, $32, $32, $32, $32, $33
db $34, $35, $36, $36, $37, $38
db $34, $39, $3a, $3a, $3b, $38
db $3c, $3d, $3e, $3e, $3f, $40
db $41, $42, $43, $43, $44, $45
db $46, $47, $43, $48, $49, $4a
db $41, $43, $4b, $4c, $4d, $4e
db $4f, $50, $50, $50, $51, $52
TradeLinkTubeTilemap:
; 12x3
db $43, $55, $56, $53, $53, $53, $53, $53, $53, $53, $53, $53
db $43, $57, $58, $54, $54, $54, $54, $54, $54, $54, $54, $54
db $43, $59, $5a, $43, $43, $43, $43, $43, $43, $43, $43, $43
TradeArrowRightGFX: INCBIN "gfx/trade/arrow_right.2bpp" TradeArrowRightGFX: INCBIN "gfx/trade/arrow_right.2bpp"
TradeArrowLeftGFX: INCBIN "gfx/trade/arrow_left.2bpp" TradeArrowLeftGFX: INCBIN "gfx/trade/arrow_left.2bpp"

View File

@ -0,0 +1 @@
12222345667849::;8<=>>?@ABCCDEFGCHIJACKLMNOPPPQR

View File

@ -0,0 +1 @@
CUVSSSSSSSSSCWXTTTTTTTTTCYZCCCCCCCCC

View File

@ -14,7 +14,6 @@ INCLUDE "macros/scripts/movement.asm"
INCLUDE "macros/scripts/map_setup.asm" INCLUDE "macros/scripts/map_setup.asm"
INCLUDE "macros/scripts/battle_commands.asm" INCLUDE "macros/scripts/battle_commands.asm"
INCLUDE "macros/scripts/battle_anims.asm" INCLUDE "macros/scripts/battle_anims.asm"
INCLUDE "macros/scripts/trade_anims.asm"
INCLUDE "macros/scripts/gfx_anims.asm" INCLUDE "macros/scripts/gfx_anims.asm"
INCLUDE "macros/legacy.asm" INCLUDE "macros/legacy.asm"

View File

@ -1,254 +0,0 @@
; DoTradeAnimation.JumpTable indexes (see engine/movies/trade_animation.asm)
const_def
const tradeanim_next_command ; $00
tradeanim_next: MACRO
db tradeanim_next_command
ENDM
const tradeanim_show_givemon_data_command ; $01
tradeanim_show_givemon_data: MACRO
db tradeanim_show_givemon_data_command
ENDM
const tradeanim_show_getmon_data_command ; $02
tradeanim_show_getmon_data: MACRO
db tradeanim_show_getmon_data_command
ENDM
const tradeanim_enter_link_tube_command ; $03
tradeanim_enter_link_tube: MACRO
db tradeanim_enter_link_tube_command
ENDM
const_skip ; continues tradeanim_enter_link_tube_command
const tradeanim_exit_link_tube_command ; $05
tradeanim_exit_link_tube: MACRO
db tradeanim_exit_link_tube_command
ENDM
const tradeanim_tube_to_ot_command ; $06
tradeanim_tube_to_ot: MACRO
db tradeanim_tube_to_ot_command
ENDM
const_skip 7 ; continues tradeanim_tube_to_ot_command
const tradeanim_tube_to_player_command ; $0e
tradeanim_tube_to_player: MACRO
db tradeanim_tube_to_player_command
ENDM
const_skip 7 ; continues tradeanim_tube_to_player_command
const tradeanim_sent_to_ot_text_command ; $16
tradeanim_sent_to_ot_text: MACRO
db tradeanim_sent_to_ot_text_command
ENDM
const tradeanim_ot_bids_farewell_command ; $17
tradeanim_ot_bids_farewell: MACRO
db tradeanim_ot_bids_farewell_command
ENDM
const tradeanim_take_care_of_text_command ; $18
tradeanim_take_care_of_text: MACRO
db tradeanim_take_care_of_text_command
ENDM
const tradeanim_ot_sends_text_1_command ; $19
tradeanim_ot_sends_text_1: MACRO
db tradeanim_ot_sends_text_1_command
ENDM
const tradeanim_ot_sends_text_2_command ; $1a
tradeanim_ot_sends_text_2: MACRO
db tradeanim_ot_sends_text_2_command
ENDM
const tradeanim_setup_givemon_scroll_command ; $1b
tradeanim_setup_givemon_scroll: MACRO
db tradeanim_setup_givemon_scroll_command
ENDM
const tradeanim_do_givemon_scroll_command ; $1c
tradeanim_do_givemon_scroll: MACRO
db tradeanim_do_givemon_scroll_command
ENDM
const tradeanim_frontpic_scroll_command ; $1d
tradeanim_frontpic_scroll: MACRO
db tradeanim_frontpic_scroll_command
ENDM
const tradeanim_textbox_scroll_command ; $1e
tradeanim_textbox_scroll: MACRO
db tradeanim_textbox_scroll_command
ENDM
const tradeanim_scroll_out_right_command ; $1f
tradeanim_scroll_out_right: MACRO
db tradeanim_scroll_out_right_command
ENDM
const_skip ; continues tradeanim_scroll_out_right_command
const tradeanim_wait_80_command ; $21
tradeanim_wait_80: MACRO
db tradeanim_wait_80_command
ENDM
const tradeanim_wait_40_command ; $22
tradeanim_wait_40: MACRO
db tradeanim_wait_40_command
ENDM
const tradeanim_rocking_ball_command ; $23
tradeanim_rocking_ball: MACRO
db tradeanim_rocking_ball_command
ENDM
const tradeanim_drop_ball_command ; $24
tradeanim_drop_ball: MACRO
db tradeanim_drop_ball_command
ENDM
const tradeanim_wait_anim_command ; $25
tradeanim_wait_anim: MACRO
db tradeanim_wait_anim_command
ENDM
const_skip ; continues tradeanim_wait_anim_command
const tradeanim_poof_command ; $27
tradeanim_poof: MACRO
db tradeanim_poof_command
ENDM
const tradeanim_bulge_through_tube_command ; $28
tradeanim_bulge_through_tube: MACRO
db tradeanim_bulge_through_tube_command
ENDM
const tradeanim_give_trademon_sfx_command ; $29
tradeanim_give_trademon_sfx: MACRO
db tradeanim_give_trademon_sfx_command
ENDM
const tradeanim_get_trademon_sfx_command ; $2a
tradeanim_get_trademon_sfx: MACRO
db tradeanim_get_trademon_sfx_command
ENDM
const tradeanim_end_command ; $2b
tradeanim_end: MACRO
db tradeanim_end_command
ENDM
const tradeanim_animate_frontpic_command ; $2c
tradeanim_animate_frontpic: MACRO
db tradeanim_animate_frontpic_command
ENDM
const tradeanim_wait_96_command ; $2d
tradeanim_wait_96: MACRO
db tradeanim_wait_96_command
ENDM
const tradeanim_wait_80_if_ot_egg_command ; $2e
tradeanim_wait_80_if_ot_egg: MACRO
db tradeanim_wait_80_if_ot_egg_command
ENDM
const tradeanim_wait_180_if_ot_egg_command ; $2f
tradeanim_wait_180_if_ot_egg: MACRO
db tradeanim_wait_180_if_ot_egg_command
ENDM
; Mobile
const_def $01
const mobiletradeanim_showgivemon_command ; $01
mobiletradeanim_showgivemon: MACRO
db mobiletradeanim_showgivemon_command
ENDM
const mobiletradeanim_02_command ; $02
mobiletradeanim_02: MACRO
db mobiletradeanim_02_command
ENDM
const mobiletradeanim_sendmon_command ; $03
mobiletradeanim_sendmon: MACRO
db mobiletradeanim_sendmon_command
ENDM
const_skip ; continues mobiletradeanim_sendmon_command
const mobiletradeanim_05_command ; $05
mobiletradeanim_05: MACRO
db mobiletradeanim_05_command
ENDM
const mobiletradeanim_06_command ; $06
mobiletradeanim_06: MACRO
db mobiletradeanim_06_command
ENDM
const mobiletradeanim_07_command ; $07
mobiletradeanim_07: MACRO
db mobiletradeanim_07_command
ENDM
const mobiletradeanim_receivemon_command ; $08
mobiletradeanim_receivemon: MACRO
db mobiletradeanim_receivemon_command
ENDM
const_skip 2 ; continues mobiletradeanim_receivemon_command
const mobiletradeanim_showgetmon_command ; $0b
mobiletradeanim_showgetmon: MACRO
db mobiletradeanim_showgetmon_command
ENDM
const mobiletradeanim_end_command ; $0c
mobiletradeanim_end: MACRO
db mobiletradeanim_end_command
ENDM
const mobiletradeanim_showgtsgivemon_command ; $0d
mobiletradeanim_showgtsgivemon: MACRO
db mobiletradeanim_showgtsgivemon_command
ENDM
const mobiletradeanim_showgtsgetmon_command ; $0e
mobiletradeanim_showgtsgetmon: MACRO
db mobiletradeanim_showgtsgetmon_command
ENDM
const mobiletradeanim_0f_command ; $0f
mobiletradeanim_0f: MACRO
db mobiletradeanim_0f_command
ENDM
const mobiletradeanim_10_command ; $10
mobiletradeanim_10: MACRO
db mobiletradeanim_10_command
ENDM
const mobiletradeanim_11_command ; $11
mobiletradeanim_11: MACRO
db mobiletradeanim_11_command
ENDM
const mobiletradeanim_12_command ; $12
mobiletradeanim_12: MACRO
db mobiletradeanim_12_command
ENDM
const mobiletradeanim_showoddegg_command ; $13
mobiletradeanim_showoddegg: MACRO
db mobiletradeanim_showoddegg_command
ENDM

View File

@ -1,3 +1,12 @@
add_mobiletradeanim: MACRO
\1_MobileTradeCmd:
dw \1
ENDM
mobiletradeanim: MACRO
db (\1_MobileTradeCmd - MobileTradeAnim_JumptableLoop.Jumptable) / 2
ENDM
MobileTradeAnimation_SendGivemonToGTS: MobileTradeAnimation_SendGivemonToGTS:
ld a, $80 ld a, $80
ld [wcf65], a ld [wcf65], a
@ -5,13 +14,13 @@ MobileTradeAnimation_SendGivemonToGTS:
jp RunMobileTradeAnim_NoFrontpics jp RunMobileTradeAnim_NoFrontpics
.TradeAnimScript: .TradeAnimScript:
mobiletradeanim_showgtsgivemon mobiletradeanim MobileTradeAnim_ShowPlayerMonForGTS
mobiletradeanim_12 mobiletradeanim MobileTradeAnim_FadeToBlack
mobiletradeanim_10 mobiletradeanim MobileTradeAnim_10
mobiletradeanim_sendmon mobiletradeanim MobileTradeAnim_GiveTrademon1
mobiletradeanim_06 mobiletradeanim MobileTradeAnim_06
mobiletradeanim_0f mobiletradeanim MobileTradeAnim_0f
mobiletradeanim_end mobiletradeanim EndMobileTradeAnim
MobileTradeAnimation_RetrieveGivemonFromGTS: MobileTradeAnimation_RetrieveGivemonFromGTS:
ld a, $80 ld a, $80
@ -25,11 +34,11 @@ asm_108018:
jp RunMobileTradeAnim_NoFrontpics jp RunMobileTradeAnim_NoFrontpics
.TradeAnimScript: .TradeAnimScript:
mobiletradeanim_11 mobiletradeanim MobileTradeAnim_11
mobiletradeanim_07 mobiletradeanim MobileTradeAnim_07
mobiletradeanim_receivemon mobiletradeanim MobileTradeAnim_GetTrademon1
mobiletradeanim_showgtsgetmon mobiletradeanim MobileTradeAnim_ShowOTMonFromGTS
mobiletradeanim_end mobiletradeanim EndMobileTradeAnim
Function108026: Function108026:
ld a, $0 ld a, $0
@ -44,14 +53,14 @@ asm_10802c:
jp RunMobileTradeAnim_Frontpics jp RunMobileTradeAnim_Frontpics
.TradeAnimScript: ; trade .TradeAnimScript: ; trade
mobiletradeanim_showgivemon mobiletradeanim MobileTradeAnim_ShowPlayerMonToBeSent
mobiletradeanim_12 mobiletradeanim MobileTradeAnim_FadeToBlack
mobiletradeanim_02 mobiletradeanim MobileTradeAnim_02
mobiletradeanim_sendmon mobiletradeanim MobileTradeAnim_GiveTrademon1
mobiletradeanim_05 mobiletradeanim MobileTradeAnim_05
mobiletradeanim_receivemon mobiletradeanim MobileTradeAnim_GetTrademon1
mobiletradeanim_showgetmon mobiletradeanim MobileTradeAnim_ShowOTMonFromTrade
mobiletradeanim_end mobiletradeanim EndMobileTradeAnim
Function10803d: Function10803d:
ld a, $0 ld a, $0
@ -60,11 +69,11 @@ Function10803d:
jp RunMobileTradeAnim_NoFrontpics jp RunMobileTradeAnim_NoFrontpics
.TradeAnimScript: .TradeAnimScript:
mobiletradeanim_11 mobiletradeanim MobileTradeAnim_11
mobiletradeanim_07 mobiletradeanim MobileTradeAnim_07
mobiletradeanim_receivemon mobiletradeanim MobileTradeAnim_GetTrademon1
mobiletradeanim_showoddegg mobiletradeanim MobileTradeAnim_GetOddEgg
mobiletradeanim_end mobiletradeanim EndMobileTradeAnim
Function10804d: Function10804d:
ld a, $0 ld a, $0
@ -73,9 +82,9 @@ Function10804d:
jp RunMobileTradeAnim_NoFrontpics jp RunMobileTradeAnim_NoFrontpics
.TradeAnimScript: .TradeAnimScript:
mobiletradeanim_11 mobiletradeanim MobileTradeAnim_11
mobiletradeanim_showgtsgetmon mobiletradeanim MobileTradeAnim_ShowOTMonFromGTS
mobiletradeanim_end mobiletradeanim EndMobileTradeAnim
RunMobileTradeAnim_Frontpics: RunMobileTradeAnim_Frontpics:
ld hl, wTradeAnimAddress ld hl, wTradeAnimAddress
@ -354,26 +363,26 @@ MobileTradeAnim_JumptableLoop:
jumptable .Jumptable, wJumptableIndex jumptable .Jumptable, wJumptableIndex
.Jumptable: .Jumptable:
dw GetMobileTradeAnimByte ; 00 add_mobiletradeanim GetMobileTradeAnimByte ; 00
dw MobileTradeAnim_ShowPlayerMonToBeSent ; 01 add_mobiletradeanim MobileTradeAnim_ShowPlayerMonToBeSent ; 01
dw MobileTradeAnim_02 ; 02 add_mobiletradeanim MobileTradeAnim_02 ; 02
dw MobileTradeAnim_GiveTrademon1 ; 03 add_mobiletradeanim MobileTradeAnim_GiveTrademon1 ; 03
dw MobileTradeAnim_GiveTrademon2 ; 04 add_mobiletradeanim MobileTradeAnim_GiveTrademon2 ; 04
dw MobileTradeAnim_05 ; 05 add_mobiletradeanim MobileTradeAnim_05 ; 05
dw MobileTradeAnim_06 ; 06 add_mobiletradeanim MobileTradeAnim_06 ; 06
dw MobileTradeAnim_07 ; 07 add_mobiletradeanim MobileTradeAnim_07 ; 07
dw MobileTradeAnim_GetTrademon1 ; 08 add_mobiletradeanim MobileTradeAnim_GetTrademon1 ; 08
dw MobileTradeAnim_GetTrademon2 ; 09 add_mobiletradeanim MobileTradeAnim_GetTrademon2 ; 09
dw MobileTradeAnim_GetTrademon3 ; 0a add_mobiletradeanim MobileTradeAnim_GetTrademon3 ; 0a
dw MobileTradeAnim_ShowOTMonFromTrade ; 0b add_mobiletradeanim MobileTradeAnim_ShowOTMonFromTrade ; 0b
dw EndMobileTradeAnim ; 0c add_mobiletradeanim EndMobileTradeAnim ; 0c
dw MobileTradeAnim_ShowPlayerMonForGTS ; 0d add_mobiletradeanim MobileTradeAnim_ShowPlayerMonForGTS ; 0d
dw MobileTradeAnim_ShowOTMonFromGTS ; 0e add_mobiletradeanim MobileTradeAnim_ShowOTMonFromGTS ; 0e
dw MobileTradeAnim_0f ; 0f add_mobiletradeanim MobileTradeAnim_0f ; 0f
dw MobileTradeAnim_10 ; 10 add_mobiletradeanim MobileTradeAnim_10 ; 10
dw MobileTradeAnim_11 ; 11 add_mobiletradeanim MobileTradeAnim_11 ; 11
dw MobileTradeAnim_FadeToBlack ; 12 add_mobiletradeanim MobileTradeAnim_FadeToBlack ; 12
dw MobileTradeAnim_GetOddEgg ; 13 get odd egg add_mobiletradeanim MobileTradeAnim_GetOddEgg ; 13 get odd egg
MobileTradeAnim_Next: MobileTradeAnim_Next:
ld hl, wJumptableIndex ld hl, wJumptableIndex