More HUD stuff

This commit is contained in:
cassidoxa
2023-06-08 19:26:31 -04:00
parent 815c2ab81f
commit aec3370f48
7 changed files with 33 additions and 25 deletions

View File

@@ -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)

View File

@@ -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
;--------------------------------------------------------------------------------

View File

@@ -616,7 +616,6 @@ RTS
RTL
.incrementVanillaKey
LDA.l SmallKeyCounter : INC : STA.l SmallKeyCounter
JSL.l UpdateKeys
.incrementKey

View File

@@ -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:

View File

@@ -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
LDA.l ArrowMode : BNE .rupee_bow
LDA.l BowEquipment : TAX : BEQ .nobow
JSL.l DrawHUDArrows
LDA.l BowEquipment
TXA
RTL
.normal
LDA.l BowEquipment : BNE +
LDA.l BowTracking : AND.b #$40 : BEQ ++
JSL.l DrawHUDArrows
++
LDA.l BowEquipment
+
.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

View File

@@ -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:

View File

@@ -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
+