Update Twinrova_Long and CheckIfDead formatting

This commit is contained in:
scawful
2024-03-24 10:53:34 -04:00
parent ef7d3af09b
commit dd68a4929d

View File

@@ -1,5 +1,10 @@
; ========================================================= ; =========================================================
; Twinrova Boss Sprite ; Twinrova Boss Sprite
;
; Overrides Blind and the Blind Maiden to create a new
; boss sequence.
;
;
; ========================================================= ; =========================================================
!SPRID = $CE ; The sprite ID you are overwriting (HEX) !SPRID = $CE ; The sprite ID you are overwriting (HEX)
@@ -35,43 +40,42 @@
Sprite_Twinrova_Long: Sprite_Twinrova_Long:
{ {
PHB : PHK : PLB PHB : PHK : PLB
JSR Sprite_Twinrova_Draw ; Call the draw code JSR Sprite_Twinrova_Draw
JSL Sprite_DrawShadow JSL Sprite_DrawShadow
JSL Sprite_CheckActive ; Check if game is not paused JSL Sprite_CheckActive : BCC .SpriteIsNotActive
BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive
JSR Sprite_Twinrova_CheckIfDead ; Check if sprite is dead JSR Sprite_Twinrova_CheckIfDead
JSR Sprite_Twinrova_Main ; Call the main sprite code JSR Sprite_Twinrova_Main
.SpriteIsNotActive .SpriteIsNotActive
PLB ; Get back the databank we stored previously PLB
RTL ; Go back to original code RTL
} }
; ========================================================= ; =========================================================
Sprite_Twinrova_CheckIfDead: Sprite_Twinrova_CheckIfDead:
{ {
LDA $0D80, X : CMP.b #$0A : BEQ .not_dead LDA $0D80, X : CMP.b #$0A : BEQ .not_dead
; If health is negative, set back to zero ; If health is negative, set back to zero
LDA $0E50, X : CMP.b #$44 : BCC .healthNotNegative LDA $0E50, X : CMP.b #$44 : BCC .health_not_negative
LDA.b #$00 : STA $0E50, X LDA.b #$00 : STA $0E50, X
.healthNotNegative .health_not_negative
LDA $0E50, X : BNE .not_dead LDA $0E50, X : BNE .not_dead
PHX PHX
LDA.b #$04 : STA $0DD0, X ; Kill sprite boss style LDA.b #$04 : STA $0DD0, X ; Kill sprite boss style
LDA.b #$0A : STA $0D80, X ; Go to Twinrova_Dead stage LDA.b #$0A : STA $0D80, X ; Go to Twinrova_Dead stage
PLX PLX
.not_dead .not_dead
RTS RTS
} }
; ========================================================= ; =========================================================