diff --git a/heartpieces.asm b/heartpieces.asm index c14bd0b..123e1ff 100644 --- a/heartpieces.asm +++ b/heartpieces.asm @@ -220,6 +220,12 @@ MaybeMarkDigSpotCollected: PLP : PLA RTL ;-------------------------------------------------------------------------------- +HeartPieceSpawnDelayFix: + ; Fix the delay when spawning a HeartPiece sprite + JSL.l Sprite_CheckIfPlayerPreoccupied : BCS + ; what we moved from $05F037 + JSL.l Sprite_CheckDamageToPlayerSameLayerLong : RTL ; what we wrote over + + CLC : RTL +;-------------------------------------------------------------------------------- macro GetPossiblyEncryptedItem(ItemLabel,TableLabel) LDA IsEncrypted : BNE ?encrypted LDA.l diff --git a/hooks.asm b/hooks.asm index d8c55b3..5d412fe 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2306,6 +2306,12 @@ AddReceivedItem_doneWithSoundEffects: org $05F030 ; <- 2F030 - display item JSL.l DrawHeartPieceGFX ;-------------------------------------------------------------------------------- +; moving LinkBusy check to later time to avoid a delay in HP movement +org $05F037 ; (JSL CheckIfLinkIsBusy : BCS .exit) +BRA + : NOP #4 : + +org $05F083 +JSL.l HeartPieceSpawnDelayFix +;-------------------------------------------------------------------------------- org $05F08A ; <- 2F08A - sprite_heart_upgrades.asm : 324 - (LDA $7EF36B : INC A : AND.b #$03 : STA $7EF36B : BNE .got_4_piecese) item determination JSL.l HeartPieceGet BCS $18 ; reinsert the near branch that appears midway through what we overrode