mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Improved Virtual Console patch identifiers (#357)
This commit is contained in:
parent
1dcaede8b5
commit
d7808d110f
11 changed files with 153 additions and 151 deletions
|
|
@ -176,12 +176,12 @@ PlayAnimation:
|
|||
ld h, [hl]
|
||||
ld l, a
|
||||
.animationLoop
|
||||
vc_hook FPA_Thunderbolt_End
|
||||
vc_hook Stop_reducing_move_anim_flashing_Thunderbolt
|
||||
ld a, [hli]
|
||||
vc_hook_red FPA_007_End
|
||||
vc_hook_blue FPA_009_End
|
||||
vc_hook_red Stop_reducing_move_anim_flashing_Reflect
|
||||
vc_hook_blue Stop_reducing_move_anim_flashing_Self_Destruct
|
||||
cp -1
|
||||
vc_hook_blue FPA_008_End
|
||||
vc_hook_blue Stop_reducing_move_anim_flashing_Reflect
|
||||
jr z, .AnimationOver
|
||||
cp FIRST_SE_ID ; is this subanimation or a special effect?
|
||||
jr c, .playSubanimation
|
||||
|
|
@ -250,55 +250,57 @@ PlayAnimation:
|
|||
ld a, [wAnimPalette]
|
||||
ldh [rOBP0], a
|
||||
call LoadAnimationTileset
|
||||
vc_hook FPA_001_Begin
|
||||
vc_hook Reduce_move_anim_flashing_Mega_Punch_Self_Destruct_Explosion
|
||||
call LoadSubanimation
|
||||
call PlaySubanimation
|
||||
vc_hook FPA_001_End
|
||||
vc_hook_red Stop_reducing_move_anim_flashing_Mega_Punch
|
||||
vc_hook_blue Stop_reducing_move_anim_flashing_Mega_Punch_Explosion
|
||||
pop af
|
||||
vc_hook_red FPA_008_End
|
||||
vc_hook_red Stop_reducing_move_anim_flashing_Dream_Eater
|
||||
ldh [rOBP0], a
|
||||
.nextAnimationCommand
|
||||
vc_hook FPA_005_End
|
||||
vc_hook_red Stop_reducing_move_anim_flashing_Hyper_Beam
|
||||
vc_hook_blue Stop_reducing_move_anim_flashing_Bubblebeam_Hyper_Beam_Blizzard
|
||||
pop hl
|
||||
vc_hook FPA_002_End
|
||||
vc_hook Stop_reducing_move_anim_flashing_Guillotine
|
||||
jr .animationLoop
|
||||
.AnimationOver
|
||||
ret
|
||||
|
||||
LoadSubanimation:
|
||||
vc_hook FPA_002_Begin
|
||||
vc_hook Reduce_move_anim_flashing_Guillotine
|
||||
ld a, [wSubAnimAddrPtr + 1]
|
||||
vc_hook FPA_003_Begin
|
||||
vc_hook Reduce_move_anim_flashing_Mega_Kick
|
||||
ld h, a
|
||||
vc_hook_red FPA_131_Begin
|
||||
vc_hook_red Reduce_move_anim_flashing_Blizzard
|
||||
ld a, [wSubAnimAddrPtr]
|
||||
vc_hook_red FPA_56_Begin
|
||||
vc_hook_red Reduce_move_anim_flashing_Self_Destruct
|
||||
ld l, a
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
vc_hook FPA_76_Begin
|
||||
vc_hook Reduce_move_anim_flashing_Explosion
|
||||
ld a, [hl]
|
||||
vc_hook FPA_Thunderbolt_Begin
|
||||
vc_hook Reduce_move_anim_flashing_Thunderbolt
|
||||
ld d, a ; de = address of subanimation
|
||||
ld a, [de]
|
||||
vc_hook_blue FPA_012_Begin
|
||||
vc_hook_blue Reduce_move_anim_flashing_Rock_Slide
|
||||
ld b, a
|
||||
vc_hook FPA_Spore_Begin
|
||||
vc_hook Reduce_move_anim_flashing_Spore
|
||||
and %00011111
|
||||
vc_hook FPA_Bubblebeam_Begin
|
||||
vc_hook Reduce_move_anim_flashing_Bubblebeam
|
||||
ld [wSubAnimCounter], a ; number of frame blocks
|
||||
vc_hook_red FPA_010_Begin
|
||||
vc_hook_blue FPA_009_Begin
|
||||
vc_hook_red Reduce_move_anim_flashing_Rock_Slide
|
||||
vc_hook_blue Reduce_move_anim_flashing_Self_Destruct
|
||||
ld a, b
|
||||
and %11100000
|
||||
cp SUBANIMTYPE_ENEMY << 5
|
||||
vc_hook_blue FPA_004_Begin
|
||||
vc_hook_blue Reduce_move_anim_flashing_Blizzard
|
||||
jr nz, .isNotType5
|
||||
.isType5
|
||||
call GetSubanimationTransform2
|
||||
jr .saveTransformation
|
||||
.isNotType5
|
||||
vc_hook FPA_Hyper_Beam_Begin
|
||||
vc_hook Reduce_move_anim_flashing_Hyper_Beam
|
||||
call GetSubanimationTransform1
|
||||
.saveTransformation
|
||||
; place the upper 3 bits of a into bits 0-2 of a before storing
|
||||
|
|
@ -329,7 +331,7 @@ LoadSubanimation:
|
|||
; sets the transform to SUBANIMTYPE_NORMAL if it's the player's turn
|
||||
; sets the transform to the subanimation type if it's the enemy's turn
|
||||
GetSubanimationTransform1:
|
||||
vc_hook FPA_Reflect_Begin
|
||||
vc_hook Reduce_move_anim_flashing_Reflect
|
||||
ld b, a
|
||||
ldh a, [hWhoseTurn]
|
||||
and a
|
||||
|
|
@ -422,15 +424,15 @@ MoveAnimation:
|
|||
jr nz, .animationsDisabled
|
||||
call ShareMoveAnimations
|
||||
call PlayAnimation
|
||||
vc_hook_red FPA_004_End
|
||||
vc_hook_blue FPA_011_End
|
||||
vc_hook_red Stop_reducing_move_anim_flashing_Bubblebeam_Mega_Kick
|
||||
vc_hook_blue Stop_reducing_move_anim_flashing_Spore
|
||||
jr .next4
|
||||
.animationsDisabled
|
||||
ld c, 30
|
||||
call DelayFrames
|
||||
.next4
|
||||
vc_hook_red FPA_010_End
|
||||
vc_hook_blue FPA_012_End
|
||||
vc_hook_red Stop_reducing_move_anim_flashing
|
||||
vc_hook_blue Stop_reducing_move_anim_flashing_Rock_Slide_Dream_Eater
|
||||
call PlayApplyingAttackAnimation ; shake the screen or flash the pic in and out (to show damage)
|
||||
.animationFinished
|
||||
call WaitForSoundToFinish
|
||||
|
|
@ -568,7 +570,7 @@ SetAnimationPalette:
|
|||
.notSGB
|
||||
ld a, $e4
|
||||
ld [wAnimPalette], a
|
||||
vc_hook FPA_Dream_Eater_Begin
|
||||
vc_hook Reduce_move_anim_flashing_Dream_Eater
|
||||
ldh [rOBP0], a
|
||||
ld a, $6c
|
||||
ldh [rOBP1], a
|
||||
|
|
@ -984,7 +986,7 @@ AnimationFlashScreenLong:
|
|||
ld [wFlashScreenLongCounter], a
|
||||
pop hl
|
||||
jr nz, .loop
|
||||
vc_hook_red FPA_phy_End
|
||||
vc_hook_red Stop_reducing_move_anim_flashing_Psychic
|
||||
ret
|
||||
|
||||
; BG palettes
|
||||
|
|
|
|||
|
|
@ -3023,7 +3023,7 @@ LinkBattleExchangeData:
|
|||
ld a, b
|
||||
.doExchange
|
||||
ld [wSerialExchangeNybbleSendData], a
|
||||
vc_hook send_byt2
|
||||
vc_hook Wireless_start_exchange
|
||||
callfar PrintWaitingText
|
||||
.syncLoop1
|
||||
call Serial_ExchangeNybble
|
||||
|
|
@ -3031,8 +3031,8 @@ LinkBattleExchangeData:
|
|||
ld a, [wSerialExchangeNybbleReceiveData]
|
||||
inc a
|
||||
jr z, .syncLoop1
|
||||
vc_hook send_byt2_ret
|
||||
vc_patch FIGHT
|
||||
vc_hook Wireless_end_exchange
|
||||
vc_patch Wireless_net_delay_1
|
||||
IF DEF(_RED_VC) || DEF(_BLUE_VC)
|
||||
ld b, 26
|
||||
ELSE
|
||||
|
|
@ -3044,8 +3044,8 @@ ENDC
|
|||
call Serial_ExchangeNybble
|
||||
dec b
|
||||
jr nz, .syncLoop2
|
||||
vc_hook send_dummy
|
||||
vc_patch FIGHT2
|
||||
vc_hook Wireless_start_send_zero_bytes
|
||||
vc_patch Wireless_net_delay_2
|
||||
IF DEF(_RED_VC) || DEF(_BLUE_VC)
|
||||
ld b, 26
|
||||
ELSE
|
||||
|
|
@ -3057,7 +3057,7 @@ ENDC
|
|||
call Serial_SendZeroByte
|
||||
dec b
|
||||
jr nz, .syncLoop3
|
||||
vc_hook send_dummy_end
|
||||
vc_hook Wireless_end_send_zero_bytes
|
||||
ret
|
||||
|
||||
ExecutePlayerMove:
|
||||
|
|
@ -6677,8 +6677,8 @@ BattleRandom:
|
|||
ld a, [hl]
|
||||
pop bc
|
||||
pop hl
|
||||
vc_hook fight_ret_c
|
||||
vc_patch fight_ret
|
||||
vc_hook Unknown_BattleRandom_ret_c
|
||||
vc_patch BattleRandom_ret
|
||||
IF DEF(_RED_VC) || DEF(_BLUE_VC)
|
||||
ret
|
||||
ELSE
|
||||
|
|
@ -6749,9 +6749,9 @@ HandleExplodingAnimation:
|
|||
|
||||
PlayMoveAnimation:
|
||||
ld [wAnimationID], a
|
||||
vc_hook_red FPA_conf_Begin
|
||||
vc_hook_red Reduce_move_anim_flashing_Confusion
|
||||
call Delay3
|
||||
vc_hook_red FPA_phy_Begin
|
||||
vc_hook_red Reduce_move_anim_flashing_Psychic
|
||||
predef_jump MoveAnimation
|
||||
|
||||
InitBattle::
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue