Cleanup HelmetChuchu sprite

This commit is contained in:
scawful
2024-10-06 12:51:10 -04:00
parent 93553232ce
commit c37860bd83

View File

@@ -32,34 +32,29 @@
%Set_Sprite_Properties(Sprite_HelmetChuchu_Prep, Sprite_HelmetChuchu_Long) %Set_Sprite_Properties(Sprite_HelmetChuchu_Prep, Sprite_HelmetChuchu_Long)
; =========================================================
; 0-1: No Helmet Green
; 2-3: Mask Red
; 4-5: Helmet Green
Sprite_HelmetChuchu_Long: Sprite_HelmetChuchu_Long:
{ {
PHB : PHK : PLB PHB : PHK : PLB
JSR Sprite_HelmetChuchu_Draw ; Call the draw code JSR Sprite_HelmetChuchu_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_HelmetChuchu_Main
JSR Sprite_HelmetChuchu_Main ; Call the main sprite code
.SpriteIsNotActive .SpriteIsNotActive
PLB ; Get back the databank we stored previously PLB
RTL ; Go back to original code RTL
} }
; =========================================================
; 0-1: No Helmet Green
; 2-3: Mask Red
; 4-5: Helmet Green
Sprite_HelmetChuchu_Prep: Sprite_HelmetChuchu_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
LDA.l $7EF359 : DEC A : TAY LDA.l SWORD : DEC A : TAY
LDA.w .health, Y : STA.w SprHealth, X LDA.w .health, Y : STA.w SprHealth, X
JSL GetRandomInt : AND.b #$02 : STA.w SprAction, X JSL GetRandomInt : AND.b #$02 : STA.w SprAction, X
STZ.w SprMiscB, X STZ.w SprMiscB, X
@@ -202,10 +197,10 @@ HelmetChuchu_SpawnHookshotDrag:
PLX PLX
RTS RTS
.speed_x .speed_x
db 16, -11, -16, 11 db 16, -11, -16, 11
.speed_y .speed_y
db 0, 11, 0, -11 db 0, 11, 0, -11
} }
@@ -215,20 +210,20 @@ HelmetChuchu_SpawnHookshotDrag:
Sprite_CheckForHookshot: Sprite_CheckForHookshot:
{ {
PHX PHX
#_0FF544: LDX.b #$0A LDX.b #$0A
.next_ancilla .next_ancilla
#_0FF546: LDA.w $0C4A,X LDA.w $0C4A,X
#_0FF549: CMP.b #$1F ; ANCILLA 1F CMP.b #$1F ; ANCILLA 1F
#_0FF54B: BNE .not_hooker BNE .not_hooker
PLX PLX
SEC SEC
RTS RTS
.not_hooker .not_hooker
#_0FF557: DEX DEX
#_0FF558: BPL .next_ancilla BPL .next_ancilla
PLX PLX
CLC CLC
RTS RTS
@@ -312,7 +307,6 @@ Sprite_HelmetChuchu_Draw:
.nextTile .nextTile
PHX ; Save current Tile Index? PHX ; Save current Tile Index?
TXA : CLC : ADC $06 ; Add Animation Index Offset TXA : CLC : ADC $06 ; Add Animation Index Offset
PHA ; Keep the value with animation index offset? PHA ; Keep the value with animation index offset?
@@ -340,13 +334,9 @@ Sprite_HelmetChuchu_Draw:
LDA .properties, X : ORA $08 : STA ($90), Y LDA .properties, X : ORA $08 : STA ($90), Y
PHY PHY
TYA : LSR #2 : TAY TYA : LSR #2 : TAY
LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
PLY : INY PLY : INY
PLX : DEX : BPL .nextTile PLX : DEX : BPL .nextTile
PLX PLX