Dismiss magic bean item sprite when planted

This commit is contained in:
scawful
2024-12-15 17:23:21 -05:00
parent e0166057c7
commit febb2adef8

View File

@@ -66,6 +66,7 @@ Sprite_BeanVendor_Prep:
LDA.b $8A : CMP.b #$00 : BNE + LDA.b $8A : CMP.b #$00 : BNE +
LDA.l MagicBeanProg : BNE .in_progress LDA.l MagicBeanProg : BNE .in_progress
LDA.b #$04 : STA.w SprAction, X LDA.b #$04 : STA.w SprAction, X
LDA.b #$01 : STA.w SprMiscD, X
JMP + JMP +
.in_progress .in_progress
CMP.b #$3F : BNE .not_flower CMP.b #$3F : BNE .not_flower
@@ -104,8 +105,7 @@ Sprite_BeanVendor_Main:
MagicBean: MagicBean:
{ {
%StartOnFrame(1) %SetFrame(1)
%PlayAnimation(1,1,1)
LDA.w SprMiscE, X : CMP.b #$01 : BEQ .not_lifting LDA.w SprMiscE, X : CMP.b #$01 : BEQ .not_lifting
LDA.w $0309 : CMP.b #$02 : BNE .not_lifting LDA.w $0309 : CMP.b #$02 : BNE .not_lifting
@@ -115,8 +115,13 @@ Sprite_BeanVendor_Main:
RTS RTS
.not_lifting .not_lifting
LDA.b #Sprite_BeanVendor
JSL Sprite_CheckCollisionWithSprite
LDA.w SprMiscF, X : BEQ ++
STZ.w SprState, X
++
JSL Sprite_CheckIfLifted JSL Sprite_CheckIfLifted
JSL ThrownSprite_TileAndSpriteInteraction_long
RTS RTS
} }
@@ -177,6 +182,7 @@ Sprite_BeanVendor_Main:
LDA.l MagicBeanProg LDA.l MagicBeanProg
ORA.b #$01 ORA.b #$01
STA.l MagicBeanProg STA.l MagicBeanProg
STZ.w SprMiscD, X
+ +
RTS RTS
} }
@@ -202,8 +208,6 @@ Sprite_BeanVendor_Main:
AND.b #$3F : BEQ ++ AND.b #$3F : BEQ ++
LDA.b #$04 : STA.w SprFrame, X LDA.b #$04 : STA.w SprFrame, X
++ ++
JSL ThrownSprite_TileAndSpriteInteraction_long
RTS RTS
} }
} }