diff --git a/fileselect.asm b/fileselect.asm index afaab50..7d0e1f2 100644 --- a/fileselect.asm +++ b/fileselect.asm @@ -372,8 +372,8 @@ DrawPlayerFileShared: LDA.l EquipmentSRAM+$0130 : AND.w #$00FF JSL.l HUDHex2Digit_Long - TXA : AND.w #$00FF : !ADD.w #$0210+!FS_COLOR_BW : %fs_draw8x8(11,26) - TYA : AND.w #$00FF : !ADD.w #$0210+!FS_COLOR_BW : %fs_draw8x8(11,27) + TYA : AND.w #$00FF : !ADD.w #$0210+!FS_COLOR_BW : %fs_draw8x8(11,26) + TXA : AND.w #$00FF : !ADD.w #$0210+!FS_COLOR_BW : %fs_draw8x8(11,27) ; Boots %fs_drawItemBasic(EquipmentSRAM+$15,3,28,FileSelectItems_boots) diff --git a/hooks.asm b/hooks.asm index d59e683..77511e6 100644 --- a/hooks.asm +++ b/hooks.asm @@ -1381,6 +1381,8 @@ org $0DF1AB JSR.w RebuildHUD_update org $0DDFC8 JSR.w RebuildHUD_update +org $0DDB88 ; Don't rebuild HUD twice on icon refresh +NOP #3 ; Not sure why this is here ;================================================================================ ; 300 Rupee NPC ;-------------------------------------------------------------------------------- diff --git a/inventory.asm b/inventory.asm index 999c5e0..44ce51b 100644 --- a/inventory.asm +++ b/inventory.asm @@ -616,7 +616,6 @@ RTS RTL .incrementVanillaKey - LDA.l SmallKeyCounter : INC : STA.l SmallKeyCounter JSL.l UpdateKeys .incrementKey diff --git a/newhud.asm b/newhud.asm index 7207699..0e19bd9 100644 --- a/newhud.asm +++ b/newhud.asm @@ -191,6 +191,7 @@ NewHUD_DrawPrizeIcon: ;================================================================================ NewHUD_DrawItemCounter: + REP #$20 LDA.w UpdateHUD : BEQ NewHUD_DrawMagicMeter LDA.l ItemCounterHUD : AND.w #$00FF : BEQ NewHUD_DrawMagicMeter LDA.w #!SlashTile : STA.w HUDGoalIndicator+$08 @@ -282,6 +283,7 @@ DrawCompassCounts: LDA.l CompassField : AND.l DungeonItemMasks,X : BEQ .done .draw_compass_count + SEP #$20 TYX : BNE .not_sewers INX @@ -301,6 +303,7 @@ DrawCompassCounts: STY.w HUDTileMapBuffer+$94 : STX.w HUDTileMapBuffer+$96 .done + SEP #$20 RTS ;================================================================================ DrawMapCounts: @@ -312,11 +315,11 @@ DrawMapCounts: LDA.l MapField : AND.l DungeonItemMasks,X : BEQ .done .draw_map_count + SEP #$20 TYX : BNE .not_sewers INX .not_sewers - SEP #$20 LDA.l DungeonCollectedKeys, X PHA @@ -332,6 +335,7 @@ DrawMapCounts: STX.w HUDTileMapBuffer+$A2 .done + SEP #$20 RTS ;================================================================================ ; Exits with: diff --git a/newitems.asm b/newitems.asm index d64db39..9fab5bc 100644 --- a/newitems.asm +++ b/newitems.asm @@ -873,26 +873,26 @@ RTL ;-------------------------------------------------------------------------------- ;Return BowEquipment but also draw silver arrows if you have the upgrade even if you don't have the bow CheckHUDSilverArrows: - LDA.l ArrowMode : BEQ .normal - .rupee_arrows - JSL.l DrawHUDArrows - LDA.l BowEquipment - RTL - .normal - LDA.l BowEquipment : BNE + - LDA.l BowTracking : AND.b #$40 : BEQ ++ - JSL.l DrawHUDArrows - ++ - LDA.l BowEquipment - + + LDA.l ArrowMode : BNE .rupee_bow + LDA.l BowEquipment : TAX : BEQ .nobow + JSL.l DrawHUDArrows + TXA + RTL + .rupee_bow + LDA.l BowEquipment : TAX + JSL.l DrawHUDArrows_rupee_arrows + TXA + RTL + .nobow + JSL.l DrawHUDArrows_silverscheck + TXA RTL ;-------------------------------------------------------------------------------- DrawHUDArrows: -LDA.l ArrowMode : BEQ .normal .rupee_arrows - LDA.l CurrentArrows : BEQ .none ; assuming silvers will increment this. if we go with something else, reorder these checks - LDA.l BowEquipment : BNE + + TXA : BNE + + .silverscheck LDA.l BowTracking : AND.b #$40 : BNE .silver BRA .wooden + CMP.b #03 : !BGE .silver @@ -902,8 +902,12 @@ LDA.l ArrowMode : BEQ .normal LDA.b #$20 : STA.l HUDTileMapBuffer+$21 LDA.b #$A9 : STA.l HUDTileMapBuffer+$22 LDA.b #$20 : STA.l HUDTileMapBuffer+$23 + .skip RTL - .normal ; in normal arrow mode this function is only ever called for silvers + .normal + TXA : BEQ .silverscheck + CMP.b #$03 : BCS .silver + BRA .wooden .silver LDA.b #$86 : STA.l HUDTileMapBuffer+$20 ; draw silver arrow marker LDA.b #$24 : STA.l HUDTileMapBuffer+$21 diff --git a/pendantcrystalhud.asm b/pendantcrystalhud.asm index 048fe34..39d0b19 100644 --- a/pendantcrystalhud.asm +++ b/pendantcrystalhud.asm @@ -22,14 +22,11 @@ HUDRebuildIndoorHole: .generic PLA LDA.l CurrentGenericKeys ; generic key count - STA.l CurrentSmallKeys - JSL.l RebuildHUD_update + JSL.l HUD_RebuildIndoor_Palace RTL .normal PLA - - STA.l CurrentSmallKeys - JSL.l RebuildHUD_update + JSL.l HUD_RebuildIndoor_Palace RTL ;================================================================================ HUDRebuildIndoor: diff --git a/retro.asm b/retro.asm index 806f0b6..3e03d5f 100644 --- a/retro.asm +++ b/retro.asm @@ -11,6 +11,7 @@ LoadBombCount16: .infinite RTL StoreBombCount: + INC.w UpdateHUD PHA : LDA.l InfiniteBombs : BEQ .finite .infinite PLA : LDA.b #$01 : RTL @@ -18,6 +19,7 @@ StoreBombCount: PLA : STA.l BombsEquipment RTL SearchForEquippedItem: + INC.w UpdateHUD LDA.l InfiniteBombs : BEQ + LDA.b #$01 : LDX.b #$00 : RTL +