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 LDA.l EquipmentSRAM+$0130 : AND.w #$00FF
JSL.l HUDHex2Digit_Long 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,26)
TYA : AND.w #$00FF : !ADD.w #$0210+!FS_COLOR_BW : %fs_draw8x8(11,27) TXA : AND.w #$00FF : !ADD.w #$0210+!FS_COLOR_BW : %fs_draw8x8(11,27)
; Boots ; Boots
%fs_drawItemBasic(EquipmentSRAM+$15,3,28,FileSelectItems_boots) %fs_drawItemBasic(EquipmentSRAM+$15,3,28,FileSelectItems_boots)

View File

@@ -1381,6 +1381,8 @@ org $0DF1AB
JSR.w RebuildHUD_update JSR.w RebuildHUD_update
org $0DDFC8 org $0DDFC8
JSR.w RebuildHUD_update 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 ; 300 Rupee NPC
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------

View File

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

View File

@@ -191,6 +191,7 @@ NewHUD_DrawPrizeIcon:
;================================================================================ ;================================================================================
NewHUD_DrawItemCounter: NewHUD_DrawItemCounter:
REP #$20
LDA.w UpdateHUD : BEQ NewHUD_DrawMagicMeter LDA.w UpdateHUD : BEQ NewHUD_DrawMagicMeter
LDA.l ItemCounterHUD : AND.w #$00FF : BEQ NewHUD_DrawMagicMeter LDA.l ItemCounterHUD : AND.w #$00FF : BEQ NewHUD_DrawMagicMeter
LDA.w #!SlashTile : STA.w HUDGoalIndicator+$08 LDA.w #!SlashTile : STA.w HUDGoalIndicator+$08
@@ -282,6 +283,7 @@ DrawCompassCounts:
LDA.l CompassField : AND.l DungeonItemMasks,X : BEQ .done LDA.l CompassField : AND.l DungeonItemMasks,X : BEQ .done
.draw_compass_count .draw_compass_count
SEP #$20
TYX : BNE .not_sewers TYX : BNE .not_sewers
INX INX
@@ -301,6 +303,7 @@ DrawCompassCounts:
STY.w HUDTileMapBuffer+$94 : STX.w HUDTileMapBuffer+$96 STY.w HUDTileMapBuffer+$94 : STX.w HUDTileMapBuffer+$96
.done .done
SEP #$20
RTS RTS
;================================================================================ ;================================================================================
DrawMapCounts: DrawMapCounts:
@@ -312,11 +315,11 @@ DrawMapCounts:
LDA.l MapField : AND.l DungeonItemMasks,X : BEQ .done LDA.l MapField : AND.l DungeonItemMasks,X : BEQ .done
.draw_map_count .draw_map_count
SEP #$20
TYX : BNE .not_sewers TYX : BNE .not_sewers
INX INX
.not_sewers .not_sewers
SEP #$20
LDA.l DungeonCollectedKeys, X LDA.l DungeonCollectedKeys, X
PHA PHA
@@ -332,6 +335,7 @@ DrawMapCounts:
STX.w HUDTileMapBuffer+$A2 STX.w HUDTileMapBuffer+$A2
.done .done
SEP #$20
RTS RTS
;================================================================================ ;================================================================================
; Exits with: ; 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 ;Return BowEquipment but also draw silver arrows if you have the upgrade even if you don't have the bow
CheckHUDSilverArrows: CheckHUDSilverArrows:
LDA.l ArrowMode : BEQ .normal LDA.l ArrowMode : BNE .rupee_bow
.rupee_arrows LDA.l BowEquipment : TAX : BEQ .nobow
JSL.l DrawHUDArrows JSL.l DrawHUDArrows
LDA.l BowEquipment TXA
RTL RTL
.normal .rupee_bow
LDA.l BowEquipment : BNE + LDA.l BowEquipment : TAX
LDA.l BowTracking : AND.b #$40 : BEQ ++ JSL.l DrawHUDArrows_rupee_arrows
JSL.l DrawHUDArrows TXA
++ RTL
LDA.l BowEquipment .nobow
+ JSL.l DrawHUDArrows_silverscheck
TXA
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DrawHUDArrows: DrawHUDArrows:
LDA.l ArrowMode : BEQ .normal
.rupee_arrows .rupee_arrows
LDA.l CurrentArrows : BEQ .none ; assuming silvers will increment this. if we go with something else, reorder these checks 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 LDA.l BowTracking : AND.b #$40 : BNE .silver
BRA .wooden BRA .wooden
+ CMP.b #03 : !BGE .silver + CMP.b #03 : !BGE .silver
@@ -902,8 +902,12 @@ LDA.l ArrowMode : BEQ .normal
LDA.b #$20 : STA.l HUDTileMapBuffer+$21 LDA.b #$20 : STA.l HUDTileMapBuffer+$21
LDA.b #$A9 : STA.l HUDTileMapBuffer+$22 LDA.b #$A9 : STA.l HUDTileMapBuffer+$22
LDA.b #$20 : STA.l HUDTileMapBuffer+$23 LDA.b #$20 : STA.l HUDTileMapBuffer+$23
.skip
RTL 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 .silver
LDA.b #$86 : STA.l HUDTileMapBuffer+$20 ; draw silver arrow marker LDA.b #$86 : STA.l HUDTileMapBuffer+$20 ; draw silver arrow marker
LDA.b #$24 : STA.l HUDTileMapBuffer+$21 LDA.b #$24 : STA.l HUDTileMapBuffer+$21

View File

@@ -22,14 +22,11 @@ HUDRebuildIndoorHole:
.generic .generic
PLA PLA
LDA.l CurrentGenericKeys ; generic key count LDA.l CurrentGenericKeys ; generic key count
STA.l CurrentSmallKeys JSL.l HUD_RebuildIndoor_Palace
JSL.l RebuildHUD_update
RTL RTL
.normal .normal
PLA PLA
JSL.l HUD_RebuildIndoor_Palace
STA.l CurrentSmallKeys
JSL.l RebuildHUD_update
RTL RTL
;================================================================================ ;================================================================================
HUDRebuildIndoor: HUDRebuildIndoor:

View File

@@ -11,6 +11,7 @@ LoadBombCount16:
.infinite .infinite
RTL RTL
StoreBombCount: StoreBombCount:
INC.w UpdateHUD
PHA : LDA.l InfiniteBombs : BEQ .finite PHA : LDA.l InfiniteBombs : BEQ .finite
.infinite .infinite
PLA : LDA.b #$01 : RTL PLA : LDA.b #$01 : RTL
@@ -18,6 +19,7 @@ StoreBombCount:
PLA : STA.l BombsEquipment PLA : STA.l BombsEquipment
RTL RTL
SearchForEquippedItem: SearchForEquippedItem:
INC.w UpdateHUD
LDA.l InfiniteBombs : BEQ + LDA.l InfiniteBombs : BEQ +
LDA.b #$01 : LDX.b #$00 : RTL LDA.b #$01 : LDX.b #$00 : RTL
+ +