summaryrefslogtreecommitdiff
path: root/engine/battle/core.asm
diff options
context:
space:
mode:
authorvulcandth <vulcandth@gmail.com>2022-03-26 15:59:36 -0500
committerGitHub <noreply@github.com>2022-03-26 16:59:36 -0400
commitfe8d3c51a4056f0dd61dbef332ad9e714b82089a (patch)
tree871eb178792c4355564b858e79e0e61963e0ffef /engine/battle/core.asm
parent07df4a5f88aa5b9927a0f8a7c317afa57a313ab9 (diff)
Build the Virtual Console patches with `make red_vc` and `make blue_vc` (#351)
Diffstat (limited to 'engine/battle/core.asm')
-rw-r--r--engine/battle/core.asm25
1 files changed, 25 insertions, 0 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 4a166f7e..e7711707 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -3023,6 +3023,7 @@ LinkBattleExchangeData:
ld a, b
.doExchange
ld [wSerialExchangeNybbleSendData], a
+ vc_hook send_byt2
callfar PrintWaitingText
.syncLoop1
call Serial_ExchangeNybble
@@ -3030,18 +3031,33 @@ LinkBattleExchangeData:
ld a, [wSerialExchangeNybbleReceiveData]
inc a
jr z, .syncLoop1
+ vc_hook send_byt2_ret
+ vc_patch FIGHT
+IF DEF(_RED_VC) || DEF(_BLUE_VC)
+ ld b, 26
+ELSE
ld b, 10
+ENDC
+ vc_patch_end
.syncLoop2
call DelayFrame
call Serial_ExchangeNybble
dec b
jr nz, .syncLoop2
+ vc_hook send_dummy
+ vc_patch FIGHT2
+IF DEF(_RED_VC) || DEF(_BLUE_VC)
+ ld b, 26
+ELSE
ld b, 10
+ENDC
+ vc_patch_end
.syncLoop3
call DelayFrame
call Serial_SendZeroByte
dec b
jr nz, .syncLoop3
+ vc_hook send_dummy_end
ret
ExecutePlayerMove:
@@ -6661,7 +6677,14 @@ BattleRandom:
ld a, [hl]
pop bc
pop hl
+ vc_hook fight_ret_c
+ vc_patch fight_ret
+IF DEF(_RED_VC) || DEF(_BLUE_VC)
+ ret
+ELSE
ret c
+ENDC
+ vc_patch_end
; if we picked the last seed, we need to recalculate the nine seeds
push hl
@@ -6726,7 +6749,9 @@ HandleExplodingAnimation:
PlayMoveAnimation:
ld [wAnimationID], a
+ vc_hook_red FPA_conf_Begin
call Delay3
+ vc_hook_red FPA_phy_Begin
predef_jump MoveAnimation
InitBattle::