From 721aae41d912f80ec7430605b2e29ff2e5be9b3b Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 4 Mar 2023 23:00:13 -0600 Subject: [PATCH] update Menu_DrawCharacterName --- Menu/menu_text.asm | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Menu/menu_text.asm b/Menu/menu_text.asm index 8d06a36..f992d5a 100644 --- a/Menu/menu_text.asm +++ b/Menu/menu_text.asm @@ -260,25 +260,33 @@ Menu_DrawAreaNameTXT: Menu_DrawCharacterName: { REP #$30 - LDX.w #$C -.loop + +.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 - CMP.w #$10 : BCC .skip ; handle P -> Q gap + + ; 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 -.skip + +.write_to_screen CLC : ADC #$2550 STA.w $138C, X - DEX : DEX : BPL .loop + DEX : DEX : BPL .draw_name_loop RTS .fix_i - LDA.w #$08 : BRA .skip + LDA.w #$08 : BRA .write_to_screen .fix_lowercase - LDA.w #$1D : BRA .skip + ; 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 } \ No newline at end of file