mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-07-07 22:22:32 -04:00
Fix EUC-JP characters (#172)
* Fix euc jp characters * Update menu_items.c
This commit is contained in:
+11
-10
@@ -340,7 +340,7 @@ char* gDebugCharacterNames[] = {
|
||||
|
||||
char* D_800E76A8[] = {
|
||||
"MARIO", "LUIGI", "YOSHI", "TOAD", "D.K.", "WARIO", "PEACH", "BOWSER",
|
||||
"\xA1\xBC\xA1\xBC\xA1\xBC\xA1\xBC", // NOT HYPHENS!!! These are EUC-JP characters (0xa1 0xbc)
|
||||
"\xA1\xBC\xA1\xBC\xA1\xBC\xA1\xBC", // These are EUC-JP characters. Looks sort of like - or ー
|
||||
};
|
||||
|
||||
char* D_800E76CC[] = {
|
||||
@@ -398,9 +398,8 @@ char* gPrefixTimeText[] = {
|
||||
};
|
||||
|
||||
char* D_800E7744[] = {
|
||||
// The s/n/r/t here are not ASCII, they are EUC-JP characters
|
||||
// 0xae 0xf3/0xae 0xee/0xae 0xf2/0xae 0xf4
|
||||
"1 s", "2 n", "3 r", "4 t", "5 t", " ",
|
||||
// These are EUC-JP characters; 1 st, 2 st, 3 rd, 4 th, 5 th
|
||||
"1 \xA3\xF3", "2 \xA3\xEE", "3 \xA3\xF2", "4 \xA3\xF4", "5 \xA3\xF4", " ",
|
||||
};
|
||||
|
||||
// Also used to render the replay text in the replay mode
|
||||
@@ -8310,8 +8309,8 @@ void func_800A69C8(UNUSED MenuItem* arg0) {
|
||||
print_text1_center_mode_2(D_800E7380[var_s0].column, D_800E7380[var_s0].row, temp_s3, 0, 0.65f, 1.0f);
|
||||
}
|
||||
set_text_color(TEXT_BLUE);
|
||||
// Not a hyphen, that is an EUC-JP character
|
||||
text_draw(0x0000009E, D_800E7300[0].row + 0x6D, "ー", 0, 1.0f, 1.0f);
|
||||
// EUC-JP character which sort of looks like a hyphen -
|
||||
text_draw(0x0000009E, D_800E7300[0].row + 0x6D, "\xA1\xBC", 0, 1.0f, 1.0f);
|
||||
}
|
||||
|
||||
void func_800A6BEC(UNUSED MenuItem* arg0) {
|
||||
@@ -8369,7 +8368,6 @@ void func_800A6D94(s32 arg0, s32 arg1, u8* arg2) {
|
||||
0.75f);
|
||||
}
|
||||
|
||||
// The s/n/r/ー are not ASCII characters, they're EUC-JP characters
|
||||
void func_800A6E94(s32 arg0, s32 arg1, u8* arg2) {
|
||||
UNUSED s32 stackPadding0;
|
||||
u8* temp_v0;
|
||||
@@ -8386,7 +8384,8 @@ void func_800A6E94(s32 arg0, s32 arg1, u8* arg2) {
|
||||
} else {
|
||||
set_text_color(TEXT_YELLOW);
|
||||
}
|
||||
text_draw(temp_s0->column + 4, temp_s0->row + 0x5A, "1 s ー", 0, 0.8f, 0.8f);
|
||||
// EUC-JP char 1 st ー
|
||||
text_draw(temp_s0->column + 4, temp_s0->row + 0x5A, "1 \xA3\xF3 \xA1\xBC", 0, 0.8f, 0.8f);
|
||||
temp_v0 = arg2 + (arg1 * 3);
|
||||
convert_number_to_ascii(temp_v0[0], sp40);
|
||||
text_draw(temp_s0->column + 0x2D, temp_s0->row + 0x5A, sp40, 0, 0.8f, 0.8f);
|
||||
@@ -8395,7 +8394,8 @@ void func_800A6E94(s32 arg0, s32 arg1, u8* arg2) {
|
||||
} else {
|
||||
set_text_color(TEXT_BLUE);
|
||||
}
|
||||
text_draw(temp_s0->column + 4, temp_s0->row + 0x69, "2 n ー", 0, 0.8f, 0.8f);
|
||||
// EUC-JP char 2 nd ー
|
||||
text_draw(temp_s0->column + 4, temp_s0->row + 0x69, "2 \xA3\xEE \xA1\xBC", 0, 0.8f, 0.8f);
|
||||
convert_number_to_ascii(temp_v0[1], sp40);
|
||||
text_draw(temp_s0->column + 0x2D, temp_s0->row + 0x69, sp40, 0, 0.8f, 0.8f);
|
||||
if (++sp38 == rank) {
|
||||
@@ -8403,7 +8403,8 @@ void func_800A6E94(s32 arg0, s32 arg1, u8* arg2) {
|
||||
} else {
|
||||
set_text_color(TEXT_RED);
|
||||
}
|
||||
text_draw(temp_s0->column + 4, temp_s0->row + 0x78, "3 r ー", 0, 0.8f, 0.8f);
|
||||
// EUC-JP char 3 rd ー
|
||||
text_draw(temp_s0->column + 4, temp_s0->row + 0x78, "3 \xA3\xF2 \xA1\xBC", 0, 0.8f, 0.8f);
|
||||
convert_number_to_ascii(temp_v0[2], sp40);
|
||||
text_draw(temp_s0->column + 0x2D, temp_s0->row + 0x78, sp40, 0, 0.8f, 0.8f);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,8 @@ void FreecamWindow::DrawElement() {
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < NUM_PLAYERS; i++) {
|
||||
if (D_800E76A8[i] == NULL || D_800E76A8[i] == "ーーーー") {
|
||||
// These are euc-jp characters that look sort of like a hyphen -
|
||||
if (D_800E76A8[i] == NULL || D_800E76A8[i] == "\xA1\xBC\xA1\xBC\xA1\xBC\xA1\xBC") {
|
||||
break;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
|
||||
@@ -77,7 +77,8 @@ void MultiplayerWindow::DrawElement() {
|
||||
ImGui::Spacing();
|
||||
|
||||
for (size_t i = 0; i < NUM_PLAYERS; i++) {
|
||||
if (D_800E76A8[i] == NULL || D_800E76A8[i] == "ーーーー") {
|
||||
// These are euc-jp characters that look sort of like a hyphen -
|
||||
if (D_800E76A8[i] == NULL || D_800E76A8[i] == "\xA1\xBC\xA1\xBC\xA1\xBC\xA1\xBC") {
|
||||
break;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
|
||||
Reference in New Issue
Block a user