Menu cleanup
This commit is contained in:
@@ -256,8 +256,7 @@ Menu_ItemScreen:
|
|||||||
|
|
||||||
.no_inputs
|
.no_inputs
|
||||||
SEP #$30
|
SEP #$30
|
||||||
LDA.w $0202
|
LDA.w $0202 : ASL : TAY
|
||||||
ASL : TAY
|
|
||||||
REP #$10
|
REP #$10
|
||||||
LDX.w Menu_ItemCursorPositions-2, Y
|
LDX.w Menu_ItemCursorPositions-2, Y
|
||||||
JSR Menu_DrawCursor
|
JSR Menu_DrawCursor
|
||||||
@@ -277,8 +276,7 @@ Menu_ItemScreen:
|
|||||||
Menu_ScrollTo:
|
Menu_ScrollTo:
|
||||||
{
|
{
|
||||||
SEP #$20
|
SEP #$20
|
||||||
JSR Menu_ScrollHorizontal
|
JSR Menu_ScrollHorizontal : BCC .not_done
|
||||||
BCC .not_done
|
|
||||||
INC.w $0200
|
INC.w $0200
|
||||||
.not_done
|
.not_done
|
||||||
RTS
|
RTS
|
||||||
@@ -300,8 +298,7 @@ Menu_StatsScreen:
|
|||||||
|
|
||||||
Menu_ScrollFrom:
|
Menu_ScrollFrom:
|
||||||
{
|
{
|
||||||
JSR Menu_ScrollHorizontal
|
JSR Menu_ScrollHorizontal : BCC .not_done
|
||||||
BCC .not_done
|
|
||||||
JMP Menu_InitItemScreen
|
JMP Menu_InitItemScreen
|
||||||
.not_done
|
.not_done
|
||||||
RTS
|
RTS
|
||||||
@@ -397,32 +394,22 @@ Menu_InitiateScrollDown:
|
|||||||
|
|
||||||
.loop
|
.loop
|
||||||
LDA.w #$387F
|
LDA.w #$387F
|
||||||
STA.w $1000, X
|
STA.w $1000, X : STA.w $1100, X
|
||||||
STA.w $1100, X
|
STA.w $1200, X : STA.w $1300, X
|
||||||
STA.w $1200, X
|
STA.w $1400, X : STA.w $1500, X
|
||||||
STA.w $1300, X
|
STA.w $1600, X : STA.w $1700, X
|
||||||
STA.w $1400, X
|
DEX : DEX : BNE .loop
|
||||||
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
|
; TODO: The BPL wasn't working so figure out why and
|
||||||
; fix it instead of doing this abomination.
|
; fix it instead of doing this abomination.
|
||||||
STA.w $1000
|
STA.w $1000 : STA.w $1100
|
||||||
STA.w $1100
|
STA.w $1200 : STA.w $1300
|
||||||
STA.w $1200
|
STA.w $1400 : STA.w $1500
|
||||||
STA.w $1300
|
STA.w $1600 : STA.w $1700
|
||||||
STA.w $1400
|
|
||||||
STA.w $1500
|
|
||||||
STA.w $1600
|
|
||||||
STA.w $1700
|
|
||||||
|
|
||||||
SEP #$20
|
SEP #$20
|
||||||
|
|
||||||
JSL $0DFA58 ; HUD_Rebuild_Long
|
JSL RebuildHUD_long
|
||||||
|
|
||||||
; Draw one frame of the clock so it doesn't just
|
; Draw one frame of the clock so it doesn't just
|
||||||
; pop in when scrolling down.
|
; pop in when scrolling down.
|
||||||
@@ -454,9 +441,7 @@ Menu_InitiateScrollDown:
|
|||||||
|
|
||||||
LDA.b #$24 : STA.w $0116
|
LDA.b #$24 : STA.w $0116
|
||||||
LDA.b #$01 : STA.b $17
|
LDA.b #$01 : STA.b $17
|
||||||
|
|
||||||
LDA.b #$08 : STA.w $0200
|
LDA.b #$08 : STA.w $0200
|
||||||
|
|
||||||
LDA.b #$12 : STA.w $012F ; play menu exit sound effect
|
LDA.b #$12 : STA.w $012F ; play menu exit sound effect
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
@@ -596,8 +581,7 @@ Menu_SongMenu:
|
|||||||
|
|
||||||
JSR Menu_DrawItemName
|
JSR Menu_DrawItemName
|
||||||
SEP #$30
|
SEP #$30
|
||||||
LDA.w CurrentSong
|
LDA.w CurrentSong : ASL : TAY
|
||||||
ASL : TAY
|
|
||||||
REP #$10
|
REP #$10
|
||||||
LDX.w Menu_SongIconCursorPositions-2, Y
|
LDX.w Menu_SongIconCursorPositions-2, Y
|
||||||
JSR Menu_DrawCursor
|
JSR Menu_DrawCursor
|
||||||
@@ -653,8 +637,7 @@ Menu_RingBox:
|
|||||||
.continue
|
.continue
|
||||||
|
|
||||||
JSR DrawMagicRingNames
|
JSR DrawMagicRingNames
|
||||||
LDA.w $020B
|
LDA.w $020B : ASL : TAY
|
||||||
ASL : TAY
|
|
||||||
REP #$10
|
REP #$10
|
||||||
LDX.w Menu_RingIconCursorPositions, Y
|
LDX.w Menu_RingIconCursorPositions, Y
|
||||||
JSR Menu_DrawCursor
|
JSR Menu_DrawCursor
|
||||||
@@ -762,5 +745,3 @@ incsrc "menu_map_names.asm"
|
|||||||
print "End of Menu/menu.asm ", pc
|
print "End of Menu/menu.asm ", pc
|
||||||
incsrc "menu_hud.asm"
|
incsrc "menu_hud.asm"
|
||||||
print "End of Menu/menu_hud.asm ", pc
|
print "End of Menu/menu_hud.asm ", pc
|
||||||
|
|
||||||
; =========================================================
|
|
||||||
|
|||||||
@@ -69,20 +69,13 @@ Menu_DrawQuestIcons:
|
|||||||
LDX.w #$10
|
LDX.w #$10
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
LDA.w quest_icons, X
|
LDA.w quest_icons, X : STA.w $1364, X
|
||||||
STA.w $1364, X
|
LDA.w quest_icons+$10, X : STA.w $13A4, X
|
||||||
LDA.w quest_icons+$10, X
|
LDA.w quest_icons+$20, X : STA.w $13E4, X
|
||||||
STA.w $13A4, X
|
LDA.w quest_icons+$30, X : STA.w $1424, X
|
||||||
LDA.w quest_icons+$20, X
|
LDA.w quest_icons+$40, X : STA.w $1464, X
|
||||||
STA.w $13E4, X
|
LDA.w quest_icons+$50, X : STA.w $14A4, X
|
||||||
LDA.w quest_icons+$30, X
|
LDA.w quest_icons+$60, X : STA.w $14E4, 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
|
DEX : DEX : BPL .loop
|
||||||
|
|
||||||
LDA.w #$20F5 : STA.w $13B4 : STA.w $13F4 : STA.w $1474 : STA.w $14B4
|
LDA.w #$20F5 : STA.w $13B4 : STA.w $13F4 : STA.w $1474 : STA.w $14B4
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
; ---------------------------------------------------------
|
|
||||||
|
|
||||||
Menu_CheckHScroll:
|
Menu_CheckHScroll:
|
||||||
{
|
{
|
||||||
@@ -34,8 +33,6 @@ Menu_CheckHScroll:
|
|||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
; ---------------------------------------------------------
|
|
||||||
|
|
||||||
Menu_ScrollHorizontal:
|
Menu_ScrollHorizontal:
|
||||||
{
|
{
|
||||||
REP #$21 ; set A to 16 bit, clear carry flag
|
REP #$21 ; set A to 16 bit, clear carry flag
|
||||||
|
|||||||
@@ -186,7 +186,6 @@ Menu_DrawItemName:
|
|||||||
CMP.b #$01 : BCS .haveItem
|
CMP.b #$01 : BCS .haveItem
|
||||||
REP #$30
|
REP #$30
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.haveItem
|
.haveItem
|
||||||
|
|
||||||
LDA.w $0202 : CMP.b #$03 : BEQ .goldstar
|
LDA.w $0202 : CMP.b #$03 : BEQ .goldstar
|
||||||
@@ -361,24 +360,20 @@ DrawCollectibleNamesAndCount:
|
|||||||
DrawGoldstarName:
|
DrawGoldstarName:
|
||||||
{
|
{
|
||||||
REP #$30
|
REP #$30
|
||||||
LDX.w #$0000
|
LDX.w #$0000 : LDY.w #$0000
|
||||||
LDY.w #$0000
|
|
||||||
|
|
||||||
.draw_goldstar_loop
|
.draw_goldstar_loop
|
||||||
LDA.w Menu_GoldstarLabel, X
|
LDA.w Menu_GoldstarLabel, X : STA.w $1692, X
|
||||||
STA.w $1692, X : INX #2 : INY #2 : CPY #$001C : BCC .draw_goldstar_loop
|
INX #2 : INY #2 : CPY #$001C : BCC .draw_goldstar_loop
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawMushroomName:
|
DrawMushroomName:
|
||||||
{
|
{
|
||||||
REP #$30
|
REP #$30
|
||||||
LDX.w #$0000
|
LDX.w #$0000 : LDY.w #$0000
|
||||||
LDY.w #$0000
|
|
||||||
|
|
||||||
.draw_mushroom_loop
|
.draw_mushroom_loop
|
||||||
LDA.w Menu_MushroomLabel, X
|
LDA.w Menu_MushroomLabel, X : STA.w $1692, X
|
||||||
STA.w $1692, X : INX #2 : INY #2 : CPY #$001C : BCC .draw_mushroom_loop
|
INX #2 : INY #2 : CPY #$001C : BCC .draw_mushroom_loop
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,20 +392,20 @@ DrawLocationName:
|
|||||||
LDY.w #$000
|
LDY.w #$000
|
||||||
TAX
|
TAX
|
||||||
|
|
||||||
.draw_overworld_loop
|
.draw_overworld_loop
|
||||||
LDA.w OverworldLocationNames, X ; Load your text character
|
LDA.w OverworldLocationNames, X ; Load your text character
|
||||||
STA.w $12CC, Y ; Store into the buffer
|
STA.w $12CC, Y ; Store into the buffer
|
||||||
INX : INX
|
INX : INX
|
||||||
INY : INY : CPY #$0020 : BCC .draw_overworld_loop
|
INY : INY : CPY #$0020 : BCC .draw_overworld_loop
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.indoors
|
.indoors
|
||||||
LDA.b $A0 ; Load current room
|
LDA.b $A0 ; Load current room
|
||||||
ASL #5
|
ASL #5
|
||||||
TAY
|
TAY
|
||||||
LDX.w #$0000
|
LDX.w #$0000
|
||||||
|
|
||||||
.draw_indoors_loop
|
.draw_indoors_loop
|
||||||
LDA.w DungeonLocationNames, Y : STA.w $12CC, X
|
LDA.w DungeonLocationNames, Y : STA.w $12CC, X
|
||||||
|
|
||||||
INY : INY
|
INY : INY
|
||||||
@@ -426,7 +421,7 @@ Menu_DrawSelect:
|
|||||||
REP #$30
|
REP #$30
|
||||||
LDX.w #$16
|
LDX.w #$16
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
LDA.w SelectItemTXT, X : STA.w $1194, X
|
LDA.w SelectItemTXT, X : STA.w $1194, X
|
||||||
DEX #2 : BPL .loop
|
DEX #2 : BPL .loop
|
||||||
|
|
||||||
@@ -440,7 +435,7 @@ Menu_DrawQuestStatus:
|
|||||||
REP #$30
|
REP #$30
|
||||||
LDX.w #$16
|
LDX.w #$16
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
LDA.w QuestStatusTXT, X : STA.w $1194, X
|
LDA.w QuestStatusTXT, X : STA.w $1194, X
|
||||||
DEX #2 : BPL .loop
|
DEX #2 : BPL .loop
|
||||||
|
|
||||||
@@ -454,7 +449,7 @@ Menu_DrawAreaNameTXT:
|
|||||||
REP #$30
|
REP #$30
|
||||||
LDX.w #$26
|
LDX.w #$26
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
LDA.w AreaNameTXT, X
|
LDA.w AreaNameTXT, X
|
||||||
STA.w $128C, X
|
STA.w $128C, X
|
||||||
|
|
||||||
@@ -487,7 +482,8 @@ Menu_DrawAreaNameTXT:
|
|||||||
;
|
;
|
||||||
; B1-blank^
|
; 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:
|
AlphabetTable:
|
||||||
db $00, $01, $02, $03, $04, $05, $06, $07
|
db $00, $01, $02, $03, $04, $05, $06, $07
|
||||||
@@ -521,7 +517,6 @@ Menu_DrawCharacterName:
|
|||||||
.write_to_screen
|
.write_to_screen
|
||||||
CLC : ADC #$2550 : STA.w $134C, X
|
CLC : ADC #$2550 : STA.w $134C, X
|
||||||
DEX : DEX : BPL .draw_name_loop
|
DEX : DEX : BPL .draw_name_loop
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
.fix_i
|
.fix_i
|
||||||
@@ -532,3 +527,4 @@ Menu_DrawCharacterName:
|
|||||||
; accumulator and convert it to an uppercase value.
|
; accumulator and convert it to an uppercase value.
|
||||||
LDA.w #$1D : BRA .write_to_screen
|
LDA.w #$1D : BRA .write_to_screen
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user