Add sparkle to deku leaf when standing on

This commit is contained in:
scawful
2024-11-28 14:53:26 -05:00
parent 3d4af7b68b
commit 5115fccdcf

View File

@@ -37,21 +37,17 @@
Sprite_DekuLeaf_Long: Sprite_DekuLeaf_Long:
{ {
PHB : PHK : PLB PHB : PHK : PLB
LDA $8A : CMP.b #$3D : BEQ .whirlpool LDA $8A : CMP.b #$3D : BEQ .whirlpool
JSR Sprite_DekuLeaf_Draw ; Call the draw code JSR Sprite_DekuLeaf_Draw
JMP + JMP +
.whirlpool .whirlpool
JSR Sprite_Whirlpool_Draw JSR Sprite_Whirlpool_Draw
+ +
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_DekuLeaf_Main
JSR Sprite_DekuLeaf_Main ; Call the main sprite code
.SpriteIsNotActive .SpriteIsNotActive
PLB ; Get back the databank we stored previously PLB
RTL ; Go back to original code RTL
} }
; ========================================================= ; =========================================================
@@ -59,11 +55,9 @@ Sprite_DekuLeaf_Long:
Sprite_DekuLeaf_Prep: Sprite_DekuLeaf_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
LDA $8A : CMP.b #$3D : BNE .not_whirlpool LDA $8A : CMP.b #$3D : BNE .not_whirlpool
LDA.b #$01 : STA.w SprAction, X LDA.b #$01 : STA.w SprAction, X
.not_whirlpool .not_whirlpool
PLB PLB
RTL RTL
} }
@@ -85,6 +79,7 @@ Sprite_DekuLeaf_Main:
JSR CheckIfPlayerIsOn : BCC + JSR CheckIfPlayerIsOn : BCC +
LDA.b #$01 : STA.b $71 LDA.b #$01 : STA.b $71
JSL Sprite_SpawnPoofGarnish
RTS RTS
+ +
STZ.b $71 STZ.b $71
@@ -156,7 +151,6 @@ Sprite_DekuLeaf_Main:
Sprite_DekuLeaf_Draw: Sprite_DekuLeaf_Draw:
{ {
JSL Sprite_PrepOamCoord JSL Sprite_PrepOamCoord
; JSL Sprite_OAM_AllocateDeferToPlayer
LDA #$10 LDA #$10
JSL OAM_AllocateFromRegionB JSL OAM_AllocateFromRegionB