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)
; =========================================================
; 0-1: No Helmet Green
; 2-3: Mask Red
; 4-5: Helmet Green
Sprite_HelmetChuchu_Long:
{
PHB : PHK : PLB
JSR Sprite_HelmetChuchu_Draw ; Call the draw code
JSR Sprite_HelmetChuchu_Draw
JSL Sprite_DrawShadow
JSL Sprite_CheckActive ; Check if game is not paused
BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive
JSR Sprite_HelmetChuchu_Main ; Call the main sprite code
JSL Sprite_CheckActive : BCC .SpriteIsNotActive
JSR Sprite_HelmetChuchu_Main
.SpriteIsNotActive
PLB ; Get back the databank we stored previously
RTL ; Go back to original code
PLB
RTL
}
; =========================================================
; 0-1: No Helmet Green
; 2-3: Mask Red
; 4-5: Helmet Green
Sprite_HelmetChuchu_Prep:
{
PHB : PHK : PLB
LDA.l $7EF359 : DEC A : TAY
LDA.l SWORD : DEC A : TAY
LDA.w .health, Y : STA.w SprHealth, X
JSL GetRandomInt : AND.b #$02 : STA.w SprAction, X
STZ.w SprMiscB, X
@@ -202,11 +197,11 @@ HelmetChuchu_SpawnHookshotDrag:
PLX
RTS
.speed_x
db 16, -11, -16, 11
.speed_x
db 16, -11, -16, 11
.speed_y
db 0, 11, 0, -11
.speed_y
db 0, 11, 0, -11
}
; Based on Sprite_CancelHookshot
@@ -215,20 +210,20 @@ HelmetChuchu_SpawnHookshotDrag:
Sprite_CheckForHookshot:
{
PHX
#_0FF544: LDX.b #$0A
LDX.b #$0A
.next_ancilla
#_0FF546: LDA.w $0C4A,X
#_0FF549: CMP.b #$1F ; ANCILLA 1F
#_0FF54B: BNE .not_hooker
LDA.w $0C4A,X
CMP.b #$1F ; ANCILLA 1F
BNE .not_hooker
PLX
SEC
RTS
.not_hooker
#_0FF557: DEX
#_0FF558: BPL .next_ancilla
DEX
BPL .next_ancilla
PLX
CLC
RTS
@@ -312,7 +307,6 @@ Sprite_HelmetChuchu_Draw:
.nextTile
PHX ; Save current Tile Index?
TXA : CLC : ADC $06 ; Add 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
PHY
TYA : LSR #2 : TAY
LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
PLY : INY
PLX : DEX : BPL .nextTile
PLX