add SwordShield collectible to map 0x58

This commit is contained in:
scawful
2024-08-10 13:58:36 -04:00
parent 33bc0d855c
commit e90f0d8340

View File

@@ -38,7 +38,12 @@ Sprite_Collectible_Long:
{ {
PHB : PHK : PLB PHB : PHK : PLB
LDA.b $8A : CMP.b #$58 : BNE .not_intro_sword
JSR Sprite_SwordShield_Draw
BRA +
.not_intro_sword
JSR Sprite_Pineapple_Draw JSR Sprite_Pineapple_Draw
+
JSL Sprite_DrawShadow JSL Sprite_DrawShadow
JSL Sprite_CheckActive JSL Sprite_CheckActive
BCC .SpriteIsNotActive BCC .SpriteIsNotActive
@@ -56,6 +61,13 @@ Sprite_Collectible_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
; Don't spawn the sword if we have it.
LDA.b $8A : CMP.b #$58 : BNE .not_intro_sword
LDA.l $7EF359 : BEQ +
STZ.w SprState, X
.not_intro_sword
+
PLB PLB
RTL RTL
} }
@@ -69,7 +81,7 @@ Sprite_Collectible_Main:
dw Pineapple dw Pineapple
dw Seashell dw Seashell
dw Lv1_Sword dw SwordShield
Pineapple: Pineapple:
{ {
@@ -91,11 +103,13 @@ Sprite_Collectible_Main:
RTS RTS
} }
Lv1_Sword: SwordShield:
{ {
%PlayAnimation(0,0,1)
JSL Sprite_Move JSL Sprite_Move
JSL Sprite_CheckDamageToPlayer : BCC + JSL Sprite_CheckDamageToPlayer : BCC +
; TODO: Add sword to player's inventory LDY.b #$00 : STZ $02E9
JSL Link_ReceiveItem
STZ.w SprState, X STZ.w SprState, X
+ +
RTS RTS