menu housekeeping

This commit is contained in:
scawful
2024-12-08 20:12:12 -05:00
parent 70f13ff1c0
commit efcd0f0ac3
3 changed files with 76 additions and 77 deletions

View File

@@ -358,7 +358,7 @@ DrawCollectibleNamesAndCount:
RTS
}
DrawGoldstarName:
DrawGoldstarName:
{
REP #$30
LDX.w #$0000
@@ -370,7 +370,7 @@ DrawGoldstarName:
RTS
}
DrawMushroomName:
DrawMushroomName:
{
REP #$30
LDX.w #$0000
@@ -387,15 +387,15 @@ DrawMushroomName:
DrawLocationName:
{
REP #$30
LDA $1B ; check if indoors or outdoors
AND.w #$00FF ; isolate bit
CMP.w #$01 ; if 1, then indoors
LDA $1B ; check if indoors or outdoors
AND.w #$00FF ; isolate bit
CMP.w #$01 ; if 1, then indoors
BEQ .indoors
LDA.b $8A
ASL #5
LDY.w #$000
TAX
TAX
.draw_overworld_loop
LDA.w OverworldLocationNames, X ; Load your text character
@@ -412,8 +412,8 @@ DrawLocationName:
.draw_indoors_loop
LDA.w DungeonLocationNames, Y : STA.w $12CC, X
INY : INY
INY : INY
INX : INX : CPX #$0020 : BCC .draw_indoors_loop
RTS
}
@@ -467,23 +467,23 @@ Menu_DrawAreaNameTXT:
; =========================================================
; Player's Name
; $3D9-$3E4: See appendix for listing of character codes.
; $3D9-$3E4: See appendix for listing of character codes.
; Note each of the six letters is represented by a 16-bit number.
;
; 00-A 01-B 02-C 03-D 04-E 05-F 06=G 07-H
; 08-I^ 09-J 0A-K 0B-L 0C-M 0D-N OE-O OF-P
; 10-?? 20-Q 21-R 22-S 23-T 24-U 25-V
; 26-W 27-X 28-Y 29-Z
; 00-A 01-B 02-C 03-D 04-E 05-F 06=G 07-H
; 08-I^ 09-J 0A-K 0B-L 0C-M 0D-N OE-O OF-P
; 10-?? 20-Q 21-R 22-S 23-T 24-U 25-V
; 26-W 27-X 28-Y 29-Z
;
; 2A-a 2B-b-2C-c 2D-d 2E-e 2F-f 40-g 41-h
; 42-k 43-j 44-i 45-l 46-m 47-n 48-o 49-p
; 2A-a 2B-b-2C-c 2D-d 2E-e 2F-f 40-g 41-h
; 42-k 43-j 44-i 45-l 46-m 47-n 48-o 49-p
; 4A-q 4B-r 4C-s 4D-t 4E-u 4F-v 60-w 61-x 62-y 63-z
;
; 64-0 65-1 66-2 67-3 68-4 69-5 6A-6 6B-7 6C-8 6D-9 6E-"?" 6F-"!"
; 80-"-"
; 81-"."
; 82-","
; 85-"(" 86-")"
; 81-"."
; 82-","
; 85-"(" 86-")"
;
; B1-blank^
;
@@ -505,30 +505,30 @@ Menu_DrawCharacterName:
REP #$30
LDX.w #$C
.draw_name_loop
; Player's Name in memory, indexed by X
.draw_name_loop
; Player's Name in memory, indexed by X
LDA.l $7EF3D9, X
; Check if the character is the special encoding for "I" first.
CMP.w #$AF : BEQ .fix_i
; Check if it is the gap between the P and Q characters
; Check if the character is the special encoding for "I" first.
CMP.w #$AF : BEQ .fix_i
; Check if it is the gap between the P and Q characters
CMP.w #$10 : BCC .write_to_screen ; handle P, Q gap
SBC.b #$10
CLC
CMP.w #$2A : BCS .fix_lowercase
.write_to_screen
CMP.w #$2A : BCS .fix_lowercase
.write_to_screen
CLC : ADC #$2550 : STA.w $134C, X
DEX : DEX : BPL .draw_name_loop
RTS
.fix_i
LDA.w #$08 : BRA .write_to_screen
.fix_i
LDA.w #$08 : BRA .write_to_screen
.fix_lowercase
; TODO: Convert the lowercase value of 2A or greater inside of the
; accumulator and convert it to an uppercase value.
.fix_lowercase
; TODO: Convert the lowercase value of 2A or greater inside of the
; accumulator and convert it to an uppercase value.
LDA.w #$1D : BRA .write_to_screen
}