entities: label AnimateBossDying

This commit is contained in:
Pierre de La Morinerie 2023-03-30 10:38:28 +00:00
parent e5c49acb45
commit 4f38b309f8
6 changed files with 26 additions and 22 deletions

View File

@ -404,7 +404,8 @@ ClearEntityStatusBank18::
ld [hl], $00 ; $7F0C: $36 $00
ret ; $7F0E: $C9
func_018_7F0F::
; Kill boss or mini-boss enemy with explosions animation
AnimateBossAgony_18::
ld hl, wEntitiesPrivateState2Table ; $7F0F: $21 $C0 $C2
add hl, bc ; $7F12: $09
ld a, [hl] ; $7F13: $7E
@ -510,7 +511,7 @@ label_018_7F6F:
jr_018_7FB0:
call ClearEntityStatusBank18 ; $7FB0: $CD $08 $7F
ld hl, hNoiseSfx ; $7FB3: $21 $F4 $FF
ld [hl], $1A ; $7FB6: $36 $1A
ld [hl], NOISE_SFX_1A ; $7FB6: $36 $1A
ret ; $7FB8: $C9
SetRoomStatus20::

View File

@ -5,7 +5,7 @@ BlainoEntityHandler::
call func_018_68EA ; $64CC: $CD $EA $68
ldh a, [hActiveEntityStatus] ; $64CF: $F0 $EA
cp $01 ; $64D1: $FE $01
jp z, func_018_7F0F ; $64D3: $CA $0F $7F
jp z, AnimateBossAgony_18 ; $64D3: $CA $0F $7F
call ReturnIfNonInteractive_18 ; $64D6: $CD $E8 $7D
call BossIntro ; $64D9: $CD $E8 $3E

View File

@ -68,7 +68,7 @@ TurtleRockHeadEntityHandler::
cp $05 ; $7365: $FE $05
jr z, jr_018_737E ; $7367: $28 $15
call func_018_7F0F ; $7369: $CD $0F $7F
call AnimateBossAgony_18 ; $7369: $CD $0F $7F
ld hl, wEntitiesStatusTable ; $736C: $21 $80 $C2
add hl, bc ; $736F: $09
ld a, [hl] ; $7370: $7E

View File

@ -979,15 +979,17 @@ ClearEntityStatus_19::
ld [hl], b ; $7E65: $70
ret ; $7E66: $C9
; Kill boss or mini-boss with explosions animation (unused in this bank)
AnimateBossAgony_19::
ld hl, wEntitiesPrivateState2Table ; $7E67: $21 $C0 $C2
add hl, bc ; $7E6A: $09
ld a, [hl] ; $7E6B: $7E
JP_TABLE ; $7E6C
._00 dw func_019_7E73 ; $7E6D
._01 dw func_019_7E84 ; $7E6F
._02 dw func_019_7E93 ; $7E71
._00 dw AnimateBossAgonyInit_19 ; $7E6D
._01 dw AnimateBossAgonyFlashing_19 ; $7E6F
._02 dw AnimateBossAgonyExploding_19 ; $7E71
func_019_7E73::
AnimateBossAgonyInit_19::
call GetEntityTransitionCountdown ; $7E73: $CD $05 $0C
ld [hl], $A0 ; $7E76: $36 $A0
ld hl, wEntitiesFlashCountdownTable ; $7E78: $21 $20 $C4
@ -1000,7 +1002,7 @@ IncrementEntityPrivateState2_19:
inc [hl] ; $7E82: $34
ret ; $7E83: $C9
func_019_7E84::
AnimateBossAgonyFlashing_19::
call GetEntityTransitionCountdown ; $7E84: $CD $05 $0C
ret nz ; $7E87: $C0
@ -1010,18 +1012,18 @@ func_019_7E84::
ld [hl], $FF ; $7E8E: $36 $FF
jp IncrementEntityPrivateState2_19 ; $7E90: $C3 $7E $7E
func_019_7E93::
AnimateBossAgonyExploding_19::
; When the explosions end, make the boss die
call GetEntityTransitionCountdown ; $7E93: $CD $05 $0C
jr nz, .jr_7EA1 ; $7E96: $20 $09
jr nz, .notDeadYet ; $7E96: $20 $09
call PlayBombExplosionSfx ; $7E98: $CD $4B $0C
call label_27DD ; $7E9B: $CD $DD $27
jp DidKillEnemy ; $7E9E: $C3 $50 $3F
.jr_7EA1
jp label_019_7EA4 ; $7EA1: $C3 $A4 $7E
.notDeadYet
jp .animateExplosions ; $7EA1: $C3 $A4 $7E
label_019_7EA4:
.animateExplosions
and $07 ; $7EA4: $E6 $07
ret nz ; $7EA6: $C0
@ -1049,7 +1051,7 @@ label_019_7EC4:
ldh [hMultiPurpose1], a ; $7ECD: $E0 $D8
ld a, TRANSCIENT_VFX_POOF ; $7ECF: $3E $02
call AddTranscientVfx ; $7ED1: $CD $C7 $0C
ld a, $13 ; $7ED4: $3E $13
ld a, NOISE_SFX_ENEMY_DESTROYED ; $7ED4: $3E $13
ldh [hNoiseSfx], a ; $7ED6: $E0 $F4
ret ; $7ED8: $C9
@ -1083,7 +1085,7 @@ label_019_7EC4:
jr_019_7F05:
call ClearEntityStatus_19 ; $7F05: $CD $61 $7E
ld hl, hNoiseSfx ; $7F08: $21 $F4 $FF
ld [hl], $1A ; $7F0B: $36 $1A
ld [hl], NOISE_SFX_1A ; $7F0B: $36 $1A
ret ; $7F0D: $C9
func_019_7F0E::

View File

@ -2206,7 +2206,7 @@ HardhitBeetleEntityHandler::
call func_036_4F4E ; $4CBD: $CD $4E $4F
ldh a, [hActiveEntityStatus] ; $4CC0: $F0 $EA
cp $05 ; $4CC2: $FE $05
jp nz, label_036_5C3C ; $4CC4: $C2 $3C $5C
jp nz, AnimateBossAgony_1836 ; $4CC4: $C2 $3C $5C
ldh a, [hFrameCounter] ; $4CC7: $F0 $E7
and $1F ; $4CC9: $E6 $1F
@ -3449,7 +3449,7 @@ GiantBuzzBlobEntityHandler::
call func_036_5844 ; $54E9: $CD $44 $58
ldh a, [hActiveEntityStatus] ; $54EC: $F0 $EA
cp $05 ; $54EE: $FE $05
jp nz, label_036_5C3C ; $54F0: $C2 $3C $5C
jp nz, AnimateBossAgony_1836 ; $54F0: $C2 $3C $5C
ld a, [wMagicPowderCount] ; $54F3: $FA $4C $DB
and a ; $54F6: $A7
@ -4645,7 +4645,7 @@ AvalaunchEntityHandler::
call label_3CD9 ; $5C01: $CD $D9 $3C
ldh a, [hActiveEntityStatus] ; $5C04: $F0 $EA
cp $05 ; $5C06: $FE $05
jr nz, label_036_5C3C ; $5C08: $20 $32
jr nz, AnimateBossAgony_1836 ; $5C08: $20 $32
call BossIntro ; $5C0A: $CD $E8 $3E
call ReturnIfNonInteractive_36 ; $5C0D: $CD $40 $6A
@ -4679,7 +4679,8 @@ AvalaunchEntityHandler::
._09 dw AvalaunchState9Handler
._0A dw AvalaunchStateAHandler
label_036_5C3C:
; Kill boss or mini-boss enemy with explosions
AnimateBossAgony_1836::
ld hl, wEntitiesPrivateState5Table ; $5C3C: $21 $90 $C3
add hl, bc ; $5C3F: $09
ld a, [hl] ; $5C40: $7E

View File

@ -228,7 +228,7 @@ NOISE_SFX_DRAW_SHIELD equ $16;
;NOISE_SFX_UNKNOWN equ $17;LVL2 shield?
NOISE_SFX_SWORD_D equ $18;
NOISE_SFX_TITLE_APPEARS equ $19;probably correct
;NOISE_SFX_UNKNOWN equ $1A
NOISE_SFX_1A equ $1A
;NOISE_SFX_UNKNOWN equ $1B
;NOISE_SFX_UNKNOWN equ $1C
;NOISE_SFX_UNKNOWN equ $1D