diff --git a/Menu/menu.asm b/Menu/menu.asm index 0746313..130604f 100644 --- a/Menu/menu.asm +++ b/Menu/menu.asm @@ -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 @@ -649,12 +633,11 @@ Menu_RingBox: DEC.w $020B BRA .continue .zero - STZ.w $020B + STZ.w $020B .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 - -; ========================================================= diff --git a/Menu/menu_draw.asm b/Menu/menu_draw.asm index 48c299c..94f85f8 100644 --- a/Menu/menu_draw.asm +++ b/Menu/menu_draw.asm @@ -69,21 +69,14 @@ 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 - DEX : DEX : BPL .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 + DEX : DEX : BPL .loop LDA.w #$20F5 : STA.w $13B4 : STA.w $13F4 : STA.w $1474 : STA.w $14B4 diff --git a/Menu/menu_scroll.asm b/Menu/menu_scroll.asm index d3b6e05..8d42415 100644 --- a/Menu/menu_scroll.asm +++ b/Menu/menu_scroll.asm @@ -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 diff --git a/Menu/menu_text.asm b/Menu/menu_text.asm index bd6bd1d..9a14f7f 100644 --- a/Menu/menu_text.asm +++ b/Menu/menu_text.asm @@ -186,7 +186,6 @@ Menu_DrawItemName: CMP.b #$01 : BCS .haveItem REP #$30 RTS - .haveItem LDA.w $0202 : CMP.b #$03 : BEQ .goldstar @@ -258,59 +257,59 @@ Menu_DrawItemName: DrawPortalRodName: { - REP #$30 - LDX.w #$0000 - LDY.w #$0000 + REP #$30 + LDX.w #$0000 + LDY.w #$0000 - .draw_portal_rod_loop - LDA.w Menu_PortalRodItems, X : STA.w $1692, Y - INX #2 : INY #2 - CPY #$001C : BCC .draw_portal_rod_loop + .draw_portal_rod_loop + LDA.w Menu_PortalRodItems, X : STA.w $1692, Y + INX #2 : INY #2 + CPY #$001C : BCC .draw_portal_rod_loop RTS } DrawBottleNames: { - LDA.l $7EF35C, X : AND.w #$00FF - DEC : ASL #5 : TAX - LDY.w #$0000 + LDA.l $7EF35C, X : AND.w #$00FF + DEC : ASL #5 : TAX + LDY.w #$0000 - .draw_bottle_loop - LDA.w Menu_BottleItems, X : STA.w $1692, Y - INX #2 : INY #2 - CPY #$001C : BCC .draw_bottle_loop - RTS + .draw_bottle_loop + LDA.w Menu_BottleItems, X : STA.w $1692, Y + INX #2 : INY #2 + CPY #$001C : BCC .draw_bottle_loop + RTS } DrawMagicRingNames: { - REP #$30 - LDA.w $020B : ASL #5 : TAX + REP #$30 + LDA.w $020B : ASL #5 : TAX + LDY.w #$0000 + + .draw_ring_loop + LDA.w Menu_RingNames, X : STA.w $1692, Y + INX #2 : INY #2 + CPY #$001C : BCC .draw_ring_loop + + LDA.w $020B : ASL #5 : TAX + LDY.w #$0000 + + .draw_ring_desc_loop + LDA.w Menu_RingDescriptions, X : STA.w $1590, Y + INX #2 : INY #2 + CPY #$0020 : BCC .draw_ring_desc_loop + + LDA.l MAGICRINGS : AND.w #$00FF : STA.b $00 + LDA.l FOUNDRINGS : AND.w #$00FF : CMP.b $00 : BEQ + LDY.w #$0000 + .draw_found_ring + LDA.w Menu_RingsFound, Y : STA.w $1692, Y + INY #2 : CPY #$001C : BCC .draw_found_ring + + - .draw_ring_loop - LDA.w Menu_RingNames, X : STA.w $1692, Y - INX #2 : INY #2 - CPY #$001C : BCC .draw_ring_loop - - LDA.w $020B : ASL #5 : TAX - LDY.w #$0000 - - .draw_ring_desc_loop - LDA.w Menu_RingDescriptions, X : STA.w $1590, Y - INX #2 : INY #2 - CPY #$0020 : BCC .draw_ring_desc_loop - - LDA.l MAGICRINGS : AND.w #$00FF : STA.b $00 - LDA.l FOUNDRINGS : AND.w #$00FF : CMP.b $00 : BEQ + - LDY.w #$0000 - .draw_found_ring - LDA.w Menu_RingsFound, Y : STA.w $1692, Y - INY #2 : CPY #$001C : BCC .draw_found_ring - + - - SEP #$30 - RTS + SEP #$30 + RTS } Menu_CollectibleNames: @@ -360,26 +359,22 @@ DrawCollectibleNamesAndCount: DrawGoldstarName: { - REP #$30 - 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 - RTS + REP #$30 + 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 + RTS } DrawMushroomName: { - REP #$30 - 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 - RTS + REP #$30 + 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 + 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 } +