From 93fe175cab701e2a9e8167a43fdc48cd698647de Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 23 Mar 2022 14:24:36 -0600 Subject: [PATCH] Don't delete hammer when hammer dashing through pots and the sprite limit is reached Hook for frozen enemies killed with hammer (if there's an item they won't automatically drop the freeze prize now) --- keydrop/standing_items.asm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/keydrop/standing_items.asm b/keydrop/standing_items.asm index 7131cef..7c1c92f 100644 --- a/keydrop/standing_items.asm +++ b/keydrop/standing_items.asm @@ -12,6 +12,9 @@ org $09C327 org $06F976 JSL RevealSpriteDrop : NOP +org $06E3C4 + JSL RevealSpriteDrop2 : NOP + org $06926e ; <- 3126e - sprite_prep.asm : 2664 (LDA $0B9B : STA $0CBA, X) JSL SpriteKeyPrep : NOP #2 @@ -284,6 +287,17 @@ RevealSpriteDrop: PEA.w $06F996-1 ; change return address to .no_forced_drop of (Sprite_DoTheDeath) RTL +RevealSpriteDrop2: + LDY.w SprDropsItem, X : BEQ .normal + BRA .no_forced_drop + .normal + LDY.w $0CBA, X : BEQ .no_forced_drop + RTL + .no_forced_drop + PLA : PLA ; remove the JSL reswamturn lower 16 bits + PEA.w $06E3CE-1 ; change return address to .no_forced_drop of (Sprite_DoTheDeath) + RTL + BitFieldMasks: dw $8000, $4000, $2000, $1000, $0800, $0400, $0200, $0100 dw $0080, $0040, $0020, $0010, $0008, $0004, $0002, $0001 @@ -444,6 +458,7 @@ CheckSprite_Spawn: RTL .check LDA $0D : CMP #$08 : BNE + + LDA $0372 : BNE .error LDX #$0F ; loop looking for a Sprite with state 0A (carried by the player)