Add alphabet switching and complete letters table
This commit is contained in:
parent
699b61ff5e
commit
9efe047bbe
|
@ -224,10 +224,11 @@ unsigned short setupCursorAction(int *Pos1, int *Pos2)
|
|||
return letter;
|
||||
}
|
||||
|
||||
void setupCursorMovement_Overworld_Alphabet(WINDOW *window, unsigned short *directionsMantainedTime)
|
||||
byte setupCursorMovement_Overworld_Alphabet(WINDOW *window, unsigned short *directionsMantainedTime)
|
||||
{
|
||||
int CursorX = window->cursor_x;
|
||||
int CursorY = window->cursor_y;
|
||||
byte returnByte = 0;
|
||||
int yAxys = 0;
|
||||
int xAxys = 0;
|
||||
bool mantainedX = false;
|
||||
|
@ -371,8 +372,19 @@ void setupCursorMovement_Overworld_Alphabet(WINDOW *window, unsigned short *dire
|
|||
m2_soundeffect(0x1A8);
|
||||
}
|
||||
|
||||
if(CursorY == 4 && CursorX == 0)
|
||||
returnByte = 1;
|
||||
else if(CursorY == 4 && CursorX ==0x7)
|
||||
returnByte = 2;
|
||||
else if(CursorY == 5 && CursorX == 0x11)
|
||||
returnByte = 3;
|
||||
else if(CursorY == 5)
|
||||
returnByte = 4;
|
||||
|
||||
window->cursor_x = CursorX;
|
||||
window->cursor_y = CursorY;
|
||||
|
||||
return returnByte;
|
||||
}
|
||||
|
||||
void setupCursorMovement()
|
||||
|
|
|
@ -1 +1 @@
|
|||
M鳰鵐鶰鸐麺齅﨧<EFBFBD>MyMMMMMMM颩馦蒑蔒薓蘉蚆蜯螹蠱袽MMMMMMMM騇襇覯訫誐諱譓豈費MMMMMMMMMM鞰MMMMMMMMMMMMMMMMMMMMMMMM鸐鳰郙酠釳鉓銶錗鍹鏜鐼镸MMMM麺<EFBFBD><EFBFBD><EFBFBD>
|
||||
MqMrMsMtMuMvMwMxMyMMMMM]MSMMMzM{M|M}M~MM€M丮侻MMMMWM甅MM僊凪匨哅嘙圡塎奙PMMMMM^M_MMM`MaMbMcMdMeMfMgMhMiMMMQM琈MMMMMMMMMMMMMMMMMMMMMMMMoM疢M<E796A2><4D><EFBFBD><EFBFBD>M慚扢揗擬昅朚桵楳橫MMMM]MSMMM歁汳淢滿濵烳燤<E783B3><E787A4>MMMMWM甅MM<4D><4D><EFBFBD><EFBFBD><EFBFBD>∕㎝狹PMMMMM^M_MMM`MaMbMcMdMeMfMgMhMiMMMQM琈MMMMMMMMMMMMMMMMMMMMMMMMoM疢M<E796A2><EFBFBD><EFBFBD><EFBFBD>
|
|
@ -1327,7 +1327,22 @@ nop
|
|||
.org 0x80C6CC6 :: bl c6cc6_overworld_naming_top_printing :: b 0x80C6D5E
|
||||
|
||||
//Player name alphabet - cursor movement
|
||||
.org 0x80C6F24 :: bl c6f24_overworld_alphabet_movement :: b 0x80C7364
|
||||
.org 0x80C6F24 :: bl c6f24_overworld_alphabet_movement :: b 0x80C7340
|
||||
|
||||
//Alphabet - switching support - removal of unused alphabet
|
||||
.org 0x80C7380 :: nop :: nop :: nop :: mov r0,r9 :: cmp r0,#0 :: beq 0x80C741A :: nop :: nop :: cmp r0,#1
|
||||
|
||||
//Print CAPITAL alphabet only if needed
|
||||
.org 0x80C7394 :: bl c7394_CAPITAL_overworld_alphabet :: b 0x80C73B8
|
||||
|
||||
//Print small alphabet
|
||||
.org 0x80C73B8 :: nop :: mov r0,r9 :: cmp r0,#2
|
||||
|
||||
//Print small alphabet only if needed
|
||||
.org 0x80C73C0 :: bl c73c0_small_overworld_alphabet :: b 0x80C73E2
|
||||
|
||||
//Choose character table based on alphabet loaded in
|
||||
.org 0x80C7578 :: bl c7578_load_letters
|
||||
|
||||
//==============================================================================
|
||||
// Data files
|
||||
|
@ -1336,7 +1351,7 @@ nop
|
|||
.org m2_default_names
|
||||
.incbin "data/m2-default-names.bin"
|
||||
|
||||
.org 0x8B1BBA0
|
||||
.org 0x8B1BA88
|
||||
|
||||
m2_overworld_alphabet_table:
|
||||
.incbin "data/m2-overworld-alphabet-table.bin"
|
||||
|
|
|
@ -2469,7 +2469,7 @@ mov r1,#0
|
|||
pop {pc}
|
||||
|
||||
//==============================================================================
|
||||
// A Press
|
||||
//A Press
|
||||
c75b4_overworld_naming_top_printing:
|
||||
push {lr}
|
||||
ldr r0,=#m2_player1
|
||||
|
@ -2479,7 +2479,7 @@ bl player_name_printing_registration
|
|||
pop {pc}
|
||||
|
||||
//==============================================================================
|
||||
// B Press
|
||||
//B Press
|
||||
c780e_overworld_naming_top_printing:
|
||||
push {lr}
|
||||
ldr r1,=#0x3005230
|
||||
|
@ -2489,7 +2489,7 @@ bl player_name_printing_registration
|
|||
pop {pc}
|
||||
|
||||
//==============================================================================
|
||||
// Backspace
|
||||
//Backspace
|
||||
c74cc_overworld_naming_top_printing:
|
||||
push {lr}
|
||||
ldr r1,=#0x3005230
|
||||
|
@ -2499,7 +2499,7 @@ bl player_name_printing_registration
|
|||
pop {pc}
|
||||
|
||||
//==============================================================================
|
||||
// Re-enter the menu
|
||||
//Re-enter the menu
|
||||
c6cc6_overworld_naming_top_printing:
|
||||
push {lr}
|
||||
mov r2,r0
|
||||
|
@ -2518,6 +2518,68 @@ mov r0,r7
|
|||
ldr r1,=#0x3002500
|
||||
add r1,#0x18
|
||||
bl setupCursorMovement_Overworld_Alphabet
|
||||
mov r9,r0
|
||||
ldr r2,=#0x3002500
|
||||
pop {pc}
|
||||
|
||||
.pool
|
||||
|
||||
//==============================================================================
|
||||
//Generic alphabet printing routine. Uses the default code. r0 is the alphabet and r1 is the alphabet string to print if need be
|
||||
print_alphabet_if_needed:
|
||||
push {lr}
|
||||
ldr r2,[sp,#0x2C]
|
||||
cmp r2,r0 //Is the alphabet loaded different from the one we're going in?
|
||||
beq @@end
|
||||
|
||||
str r0,[sp,#0x2C] //If it is, print the new alphabet
|
||||
ldr r5,=#0x3005230 //Default printing code
|
||||
ldr r4,[r5,#0x10] //Window
|
||||
mov r2,r1 //String to load
|
||||
ldr r0,=#0x8B17EE4 //String
|
||||
ldr r1,=#0x8B17424
|
||||
bl m2_strlookup
|
||||
mov r1,r0
|
||||
mov r0,r4
|
||||
mov r2,#0
|
||||
bl m2_initwindow
|
||||
ldr r0,[r5,#0x10]
|
||||
bl 0x80C8FFC //Print alphabet
|
||||
|
||||
@@end:
|
||||
pop {pc}
|
||||
|
||||
//==============================================================================
|
||||
//Loads stuff up for the small alphabet and calls print_alphabet_if_needed
|
||||
c73c0_small_overworld_alphabet:
|
||||
push {lr}
|
||||
mov r0,#1 //Alphabet 1, small
|
||||
mov r1,#0x62 //String 0x62, small alphabet
|
||||
bl print_alphabet_if_needed
|
||||
pop {pc}
|
||||
|
||||
//==============================================================================
|
||||
//Loads stuff up for the CAPITAL alphabet and calls print_alphabet_if_needed
|
||||
c7394_CAPITAL_overworld_alphabet:
|
||||
push {lr}
|
||||
mov r0,#0 //Alphabet 0, CAPITAL
|
||||
mov r1,#0x63 //String 0x63, CAPITAL alphabet
|
||||
bl print_alphabet_if_needed
|
||||
pop {pc}
|
||||
|
||||
//==============================================================================
|
||||
//Loads the proper letter table based on the loaded alphabet
|
||||
c7578_load_letters:
|
||||
push {lr}
|
||||
ldr r2,=#m2_overworld_alphabet_table //Letter table
|
||||
ldr r0,[sp,#0x28]
|
||||
cmp r0,#1
|
||||
bne @@generic_end
|
||||
mov r0,#0x90 //If this is the small alphabet, go to its alphabet
|
||||
add r2,r2,r0
|
||||
|
||||
@@generic_end:
|
||||
mov r3,#0x36 //Clobbered code
|
||||
pop {pc}
|
||||
|
||||
.pool
|
||||
|
|
|
@ -719,7 +719,7 @@
|
|||
"OffsetLocation": 11632760,
|
||||
"OldPointer": 11631723,
|
||||
"Old": "ひらがな カタカナ[00 FF]",
|
||||
"New": "misc64[00 FF]"
|
||||
"New": "[00 FF]"
|
||||
},
|
||||
{
|
||||
"Index": 101,
|
||||
|
|
Loading…
Reference in New Issue