Menu cleanup

This commit is contained in:
scawful
2025-01-09 02:36:31 -05:00
parent 21514f841e
commit b90f7ffcea
4 changed files with 85 additions and 118 deletions

View File

@@ -256,8 +256,7 @@ Menu_ItemScreen:
.no_inputs
SEP #$30
LDA.w $0202
ASL : TAY
LDA.w $0202 : ASL : TAY
REP #$10
LDX.w Menu_ItemCursorPositions-2, Y
JSR Menu_DrawCursor
@@ -277,8 +276,7 @@ Menu_ItemScreen:
Menu_ScrollTo:
{
SEP #$20
JSR Menu_ScrollHorizontal
BCC .not_done
JSR Menu_ScrollHorizontal : BCC .not_done
INC.w $0200
.not_done
RTS
@@ -300,8 +298,7 @@ Menu_StatsScreen:
Menu_ScrollFrom:
{
JSR Menu_ScrollHorizontal
BCC .not_done
JSR Menu_ScrollHorizontal : BCC .not_done
JMP Menu_InitItemScreen
.not_done
RTS
@@ -397,32 +394,22 @@ Menu_InitiateScrollDown:
.loop
LDA.w #$387F
STA.w $1000, X
STA.w $1100, X
STA.w $1200, X
STA.w $1300, X
STA.w $1400, X
STA.w $1500, X
STA.w $1600, X
STA.w $1700, X
DEX : DEX
BNE .loop
STA.w $1000, X : STA.w $1100, X
STA.w $1200, X : STA.w $1300, X
STA.w $1400, X : STA.w $1500, X
STA.w $1600, X : STA.w $1700, X
DEX : DEX : BNE .loop
; TODO: The BPL wasn't working so figure out why and
; fix it instead of doing this abomination.
STA.w $1000
STA.w $1100
STA.w $1200
STA.w $1300
STA.w $1400
STA.w $1500
STA.w $1600
STA.w $1700
STA.w $1000 : STA.w $1100
STA.w $1200 : STA.w $1300
STA.w $1400 : STA.w $1500
STA.w $1600 : STA.w $1700
SEP #$20
JSL $0DFA58 ; HUD_Rebuild_Long
JSL RebuildHUD_long
; Draw one frame of the clock so it doesn't just
; pop in when scrolling down.
@@ -454,9 +441,7 @@ Menu_InitiateScrollDown:
LDA.b #$24 : STA.w $0116
LDA.b #$01 : STA.b $17
LDA.b #$08 : STA.w $0200
LDA.b #$12 : STA.w $012F ; play menu exit sound effect
RTS
@@ -596,8 +581,7 @@ Menu_SongMenu:
JSR Menu_DrawItemName
SEP #$30
LDA.w CurrentSong
ASL : TAY
LDA.w CurrentSong : ASL : TAY
REP #$10
LDX.w Menu_SongIconCursorPositions-2, Y
JSR Menu_DrawCursor
@@ -653,8 +637,7 @@ Menu_RingBox:
.continue
JSR DrawMagicRingNames
LDA.w $020B
ASL : TAY
LDA.w $020B : ASL : TAY
REP #$10
LDX.w Menu_RingIconCursorPositions, Y
JSR Menu_DrawCursor
@@ -762,5 +745,3 @@ incsrc "menu_map_names.asm"
print "End of Menu/menu.asm ", pc
incsrc "menu_hud.asm"
print "End of Menu/menu_hud.asm ", pc
; =========================================================

View File

@@ -69,20 +69,13 @@ Menu_DrawQuestIcons:
LDX.w #$10
.loop
LDA.w quest_icons, X
STA.w $1364, X
LDA.w quest_icons+$10, X
STA.w $13A4, X
LDA.w quest_icons+$20, X
STA.w $13E4, X
LDA.w quest_icons+$30, X
STA.w $1424, X
LDA.w quest_icons+$40, X
STA.w $1464, X
LDA.w quest_icons+$50, X
STA.w $14A4, X
LDA.w quest_icons+$60, X
STA.w $14E4, X
LDA.w quest_icons, X : STA.w $1364, X
LDA.w quest_icons+$10, X : STA.w $13A4, X
LDA.w quest_icons+$20, X : STA.w $13E4, X
LDA.w quest_icons+$30, X : STA.w $1424, X
LDA.w quest_icons+$40, X : STA.w $1464, X
LDA.w quest_icons+$50, X : STA.w $14A4, X
LDA.w quest_icons+$60, X : STA.w $14E4, X
DEX : DEX : BPL .loop
LDA.w #$20F5 : STA.w $13B4 : STA.w $13F4 : STA.w $1474 : STA.w $14B4

View File

@@ -1,4 +1,3 @@
; ---------------------------------------------------------
Menu_CheckHScroll:
{
@@ -34,8 +33,6 @@ Menu_CheckHScroll:
RTS
}
; ---------------------------------------------------------
Menu_ScrollHorizontal:
{
REP #$21 ; set A to 16 bit, clear carry flag

View File

@@ -186,7 +186,6 @@ Menu_DrawItemName:
CMP.b #$01 : BCS .haveItem
REP #$30
RTS
.haveItem
LDA.w $0202 : CMP.b #$03 : BEQ .goldstar
@@ -361,24 +360,20 @@ DrawCollectibleNamesAndCount:
DrawGoldstarName:
{
REP #$30
LDX.w #$0000
LDY.w #$0000
LDX.w #$0000 : LDY.w #$0000
.draw_goldstar_loop
LDA.w Menu_GoldstarLabel, X
STA.w $1692, X : INX #2 : INY #2 : CPY #$001C : BCC .draw_goldstar_loop
LDA.w Menu_GoldstarLabel, X : STA.w $1692, X
INX #2 : INY #2 : CPY #$001C : BCC .draw_goldstar_loop
RTS
}
DrawMushroomName:
{
REP #$30
LDX.w #$0000
LDY.w #$0000
LDX.w #$0000 : LDY.w #$0000
.draw_mushroom_loop
LDA.w Menu_MushroomLabel, X
STA.w $1692, X : INX #2 : INY #2 : CPY #$001C : BCC .draw_mushroom_loop
LDA.w Menu_MushroomLabel, X : STA.w $1692, X
INX #2 : INY #2 : CPY #$001C : BCC .draw_mushroom_loop
RTS
}
@@ -397,20 +392,20 @@ DrawLocationName:
LDY.w #$000
TAX
.draw_overworld_loop
.draw_overworld_loop
LDA.w OverworldLocationNames, X ; Load your text character
STA.w $12CC, Y ; Store into the buffer
INX : INX
INY : INY : CPY #$0020 : BCC .draw_overworld_loop
RTS
.indoors
.indoors
LDA.b $A0 ; Load current room
ASL #5
TAY
LDX.w #$0000
.draw_indoors_loop
.draw_indoors_loop
LDA.w DungeonLocationNames, Y : STA.w $12CC, X
INY : INY
@@ -426,7 +421,7 @@ Menu_DrawSelect:
REP #$30
LDX.w #$16
.loop
.loop
LDA.w SelectItemTXT, X : STA.w $1194, X
DEX #2 : BPL .loop
@@ -440,7 +435,7 @@ Menu_DrawQuestStatus:
REP #$30
LDX.w #$16
.loop
.loop
LDA.w QuestStatusTXT, X : STA.w $1194, X
DEX #2 : BPL .loop
@@ -454,7 +449,7 @@ Menu_DrawAreaNameTXT:
REP #$30
LDX.w #$26
.loop
.loop
LDA.w AreaNameTXT, X
STA.w $128C, X
@@ -487,7 +482,8 @@ Menu_DrawAreaNameTXT:
;
; B1-blank^
;
; ^This code is not the canon encoding of this character. ex. AF is the proper "I". 08 is not.
; ^This code is not the canon encoding of this character.
; ex. AF is the proper "I". 08 is not.
AlphabetTable:
db $00, $01, $02, $03, $04, $05, $06, $07
@@ -521,7 +517,6 @@ Menu_DrawCharacterName:
.write_to_screen
CLC : ADC #$2550 : STA.w $134C, X
DEX : DEX : BPL .draw_name_loop
RTS
.fix_i
@@ -532,3 +527,4 @@ Menu_DrawCharacterName:
; accumulator and convert it to an uppercase value.
LDA.w #$1D : BRA .write_to_screen
}