From f7f558cd59c77902baae7d09781908b5a08c618f Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 11 Oct 2023 12:21:06 -0600 Subject: [PATCH] Don't double count torch item. (AddInventory/Link_ReceiveItem now count properly.) Update the hud when a key is absorbed off the torch. Link_ReceiveItem already does this. --- bookofmudora.asm | 3 +-- stats.asm | 20 +------------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/bookofmudora.asm b/bookofmudora.asm index d00a880..05b1fa0 100644 --- a/bookofmudora.asm +++ b/bookofmudora.asm @@ -68,11 +68,10 @@ GiveBonkItem: PHY : LDY.b #$24 : JSL.l AddInventory : PLY ; do inventory processing for a small key LDA.l CurrentSmallKeys : INC A : STA.l CurrentSmallKeys LDA.b #$2F : JSL.l Sound_SetSfx3PanLong - JSL CountBonkItem + INC.w UpdateHUDFlag RTL .notKey PHY : TAY : JSL.l Link_ReceiveItem : PLY - JSL CountBonkItem RTL ;-------------------------------------------------------------------------------- LoadBonkItem: diff --git a/stats.asm b/stats.asm index 747f5ae..0060c9a 100644 --- a/stats.asm +++ b/stats.asm @@ -150,25 +150,7 @@ CountChestKey: .done PLX : PLA RTS -;-------------------------------------------------------------------------------- -CountBonkItem: ; called from GetBonkItem in bookofmudora.asm - LDA.b RoomIndex - CMP.b #115 : BNE + - LDA.l BonkKey_Desert - BRA ++ - + - CMP.b #140 : BNE + - LDA.l BonkKey_GTower : BRA ++ - + - LDA.b #$24 - ++ - CMP.b #$24 : BNE + - PHY - TAY - JSR CountChestKey - PLY - + -RTL + ;-------------------------------------------------------------------------------- IncrementAgahnim2Sword: PHA