add magic bean bottle logic with todo to finish storage and release

This commit is contained in:
scawful
2024-06-14 00:02:02 -04:00
parent 52eb8abb92
commit 3ee83ccfe6
2 changed files with 48 additions and 2 deletions

View File

@@ -82,8 +82,7 @@ LinkItem_CatchBottle:
LDA.b #$32 : JSR Player_DoSfx2 LDA.b #$32 : JSR Player_DoSfx2
.y_press: .y_press:
JSR $AE65 ; HaltLinkWhenUsingItems
JSR $AE65 ;UnknownRoutine
LDA $67 : AND.b #$F0 : STA $67 LDA $67 : AND.b #$F0 : STA $67
DEC $3D : BPL .bottle_exit DEC $3D : BPL .bottle_exit
@@ -125,9 +124,14 @@ LinkItem_Bottles:
CMP.b #$04 : BEQ .LinkItem_GreenPotion CMP.b #$04 : BEQ .LinkItem_GreenPotion
CMP.b #$05 : BEQ .LinkItem_BluePotion CMP.b #$05 : BEQ .LinkItem_BluePotion
CMP.b #$06 : BEQ .fairy CMP.b #$06 : BEQ .fairy
CMP.b #$09 : BEQ .magic_bean
BRL .LinkItem_BeeBottle BRL .LinkItem_BeeBottle
.magic_bean
JSL ReleaseMagicBean
RTS
.fairy .fairy
BRL .LinkItem_FairyBottle BRL .LinkItem_FairyBottle

View File

@@ -101,6 +101,41 @@ Sprite_BeanVendor_Main:
%StartOnFrame(1) %StartOnFrame(1)
%PlayAnimation(1,1,1) %PlayAnimation(1,1,1)
; TODO: Finish bottle logic
LDA.w SprMiscE, X : CMP.b #$01 : BEQ .not_lifting
LDA.w $0309 : CMP.b #$02 : BNE .not_lifting
LDA.l $7EF35C : BEQ .bottle1_available
LDA.l $7EF35D : BEQ .bottle2_available
LDA.l $7EF35E : BEQ .bottle3_available
LDA.l $7EF35F : BEQ .bottle4_available
%ShowUnconditionalMessage($033)
LDA.b #$01 : STA.w SprMiscE, X
JMP .not_lifting
.bottle1_available
LDA.b #$09 : STA.l $7EF35C
%ShowUnconditionalMessage($034)
LDA.b #$01 : STA.w SprMiscE, X
RTS
.bottle2_available
LDA.b #$09 : STA.l $7EF35D
%ShowUnconditionalMessage($034)
LDA.b #$01 : STA.w SprMiscE, X
RTS
.bottle3_available
LDA.b #$09 : STA.l $7EF35E
%ShowUnconditionalMessage($034)
LDA.b #$01 : STA.w SprMiscE, X
RTS
.bottle4_available
LDA.b #$09 : STA.l $7EF35F
%ShowUnconditionalMessage($034)
LDA.b #$01 : STA.w SprMiscE, X
RTS
.not_lifting
JSL Sprite_CheckIfLifted JSL Sprite_CheckIfLifted
RTS RTS
@@ -169,6 +204,13 @@ Sprite_BeanVendor_Main:
} }
} }
ReleaseMagicBean:
{
%ShowUnconditionalMessage($030)
; TODO: Release the magic bean sprite to be used on another map
RTL
}
; ========================================================= ; =========================================================
Sprite_BeanVendor_Draw: Sprite_BeanVendor_Draw: