Cleanup menu components

This commit is contained in:
scawful
2024-10-02 18:11:59 -04:00
parent 305e093def
commit 63b8a6faf6
5 changed files with 76 additions and 88 deletions

View File

@@ -30,7 +30,6 @@ org $0DF14F ; AnimateHeartRefill
LDA.b #$C7 : STA $01 LDA.b #$C7 : STA $01
LDA.b #$7E : STA $02 LDA.b #$7E : STA $02
; ========================================================== ; ==========================================================
; Main HUD Update Loop ; Main HUD Update Loop
@@ -229,7 +228,6 @@ HUD_UpdateItemBox:
.no_silver_arrows .no_silver_arrows
LDX.b #$02 LDX.b #$02
LDA $7EF377 : BNE .draw_bow_item_icon LDA $7EF377 : BNE .draw_bow_item_icon
LDX.b #$01 LDX.b #$01
@@ -294,8 +292,6 @@ HUD_UpdateItemBox:
CPX.w #$0010 : BNE .custom_rod_not_equipped CPX.w #$0010 : BNE .custom_rod_not_equipped
LDA.w FishingOrPortalRod LDA.w FishingOrPortalRod
.custom_rod_not_equipped .custom_rod_not_equipped
JSR HUD_DrawItem JSR HUD_DrawItem
@@ -468,7 +464,6 @@ org $0DF859
dw $24D4, $24D5, $24E4, $24E5 ; Red dw $24D4, $24D5, $24E4, $24E5 ; Red
dw $34D4, $34D5, $34E4, $34E5 ; Gold dw $34D4, $34D5, $34E4, $34E5 ; Gold
; Roc's Feather (Net) ; Roc's Feather (Net)
org $0DF731 org $0DF731
dw $2840, $2841, $3C42, $3C43 ; Roc's Feather dw $2840, $2841, $3C42, $3C43 ; Roc's Feather
@@ -527,7 +522,7 @@ org $0DF811
org $0DFE77 org $0DFE77
HUD_Tilemap: HUD_Tilemap:
incbin tilemaps/hud.tilemap incbin tilemaps/hud.tilemap
; #_02816A: JSL RebuildHUD_Keys ; #_02816A: JSL RebuildHUD_Keys
@@ -587,18 +582,16 @@ FloorIndicator:
; Check the world state ; Check the world state
LDA $7EF3C5 : CMP.b #$02 : BCS .no_rain_state LDA $7EF3C5 : CMP.b #$02 : BCS .no_rain_state
; cause the ambient rain sound to occur (indoor version) ; cause the ambient rain sound to occur (indoor version)
LDA.b #$05 : STA $012D LDA.b #$05 : STA $012D
.no_rain_state
.no_rain_state
REP #$20 REP #$20
.not_floor_1F .not_floor_1F
.sanctuary_rat_room .sanctuary_rat_room
LDA $A4 : AND.w #$00FF LDA $A4 : AND.w #$00FF
BRA .set_floor_indicator_number BRA .set_floor_indicator_number
.basement_floor .basement_floor
SEP #$20 SEP #$20
; turn off any ambient sound effects ; turn off any ambient sound effects
LDA.b #$05 : STA $012D LDA.b #$05 : STA $012D
@@ -606,7 +599,7 @@ FloorIndicator:
INX #2 INX #2
LDA $A4 : ORA.w #$FF00 : EOR.w #$FFFF LDA $A4 : ORA.w #$FF00 : EOR.w #$FFFF
.set_floor_indicator_number .set_floor_indicator_number
ASL A : TAY ASL A : TAY
@@ -622,7 +615,7 @@ FloorIndicator:
RTL RTL
.hide_indicator ; *$57D90 ALTERNATE ENTRY POINT .hide_indicator ; *$57D90 ALTERNATE ENTRY POINT
REP #$20 REP #$20

View File

@@ -77,13 +77,12 @@ Menu_ItemCursorPositions:
; ========================================================= ; =========================================================
Menu_FindNextItem: Menu_FindNextItem:
{ {
LDY.w $0202 : INY LDY.w $0202 : INY
CPY.b #$19 : BCC .no_reset CPY.b #$19 : BCC .no_reset
LDY.b #$01 LDY.b #$01
.no_reset .no_reset
STY.w $0202 STY.w $0202
LDX.w Menu_AddressIndex-1, Y LDX.w Menu_AddressIndex-1, Y
LDA.l $7EF300, X LDA.l $7EF300, X
@@ -97,7 +96,7 @@ Menu_FindPrevItem:
{ {
LDY.w $0202 : DEY : BNE .no_reset LDY.w $0202 : DEY : BNE .no_reset
LDY.b #$18 LDY.b #$18
.no_reset .no_reset
STY.w $0202 STY.w $0202
LDX.w Menu_AddressIndex-1, Y LDX.w Menu_AddressIndex-1, Y
LDA.l $7EF300, X LDA.l $7EF300, X
@@ -112,7 +111,7 @@ Menu_FindNextDownItem:
LDA.w $0202 : CLC : ADC.b #$06 LDA.w $0202 : CLC : ADC.b #$06
CMP.b #$19 : BCC .no_reset CMP.b #$19 : BCC .no_reset
SBC.b #$18 SBC.b #$18
.no_reset .no_reset
TAY : STY.w $0202 TAY : STY.w $0202
LDX.w Menu_AddressIndex-1, Y LDX.w Menu_AddressIndex-1, Y
LDA.l $7EF300, X LDA.l $7EF300, X
@@ -127,14 +126,14 @@ Menu_FindNextUpItem:
LDA.w $0202 : SEC : SBC.b #$06 LDA.w $0202 : SEC : SBC.b #$06
BPL .no_reset : BNE .no_reset BPL .no_reset : BNE .no_reset
CLC : ADC.b #$18 CLC : ADC.b #$18
.no_reset .no_reset
TAY : STY.w $0202 TAY : STY.w $0202
CPY.b #$19 : BCS .reset_up CPY.b #$19 : BCS .reset_up
LDX.w Menu_AddressIndex-1, Y LDX.w Menu_AddressIndex-1, Y
LDA.l $7EF300, X LDA.l $7EF300, X
BEQ Menu_FindNextItem BEQ Menu_FindNextItem
RTS RTS
.reset_up .reset_up
LDY.b #$01 LDY.b #$01
STY.w $0202 STY.w $0202
LDX.w Menu_AddressIndex-1, Y LDX.w Menu_AddressIndex-1, Y
@@ -235,7 +234,7 @@ Menu_AddressLong:
db $58 ; Wolf Mask db $58 ; Wolf Mask
db $48 ; Bunny Hood db $48 ; Bunny Hood
db $52 ; Stone Mask db $52 ; Stone Mask
db $5F ; Bottle #4 db $5F ; Bottle 4
GotoNextItem_Local: GotoNextItem_Local:
{ {
@@ -243,7 +242,6 @@ GotoNextItem_Local:
; If we reach our limit (21), set it back to the bow and arrow slot. ; If we reach our limit (21), set it back to the bow and arrow slot.
LDA $0202 : INC A : CMP.b #$18 : BCC .dont_reset LDA $0202 : INC A : CMP.b #$18 : BCC .dont_reset
LDA.b #$01 LDA.b #$01
.dont_reset .dont_reset
; Otherwise try to equip the item in the next slot ; Otherwise try to equip the item in the next slot
STA $0202 STA $0202
@@ -325,6 +323,5 @@ SearchForEquippedItem:
} }
assert pc() <= $0DE3C7 assert pc() <= $0DE3C7
; =========================================================
pullpc pullpc

View File

@@ -85,7 +85,7 @@ Menu_DrawPlaytimeLabel:
{ {
LDX.w #$10 LDX.w #$10
.draw2 .draw2
LDA.w PlaytimeLabel, X LDA.w PlaytimeLabel, X
STA.w $1692, X STA.w $1692, X
DEX : DEX : BPL .draw2 DEX : DEX : BPL .draw2
@@ -100,7 +100,6 @@ Menu_DrawPlaytimeLabel:
; LDX #$18 ; LDX #$18
JSR Menu_DrawMinuteDigit JSR Menu_DrawMinuteDigit
RTS RTS
} }
@@ -199,7 +198,6 @@ Menu_DrawItemName:
CMP.b #$0C : BEQ .bottle_2 CMP.b #$0C : BEQ .bottle_2
CMP.b #$12 : BEQ .bottle_3 CMP.b #$12 : BEQ .bottle_3
CMP.b #$18 : BEQ .bottle_4 CMP.b #$18 : BEQ .bottle_4
.draw_item .draw_item
REP #$30 REP #$30
LDA.w $0202 : BEQ .no_items LDA.w $0202 : BEQ .no_items