summaryrefslogtreecommitdiff
path: root/src/d/d_meter2_info.cpp
diff options
context:
space:
mode:
authorMax Roncace <me@caseif.net>2025-09-19 14:32:05 -0400
committerGitHub <noreply@github.com>2025-09-19 21:32:05 +0300
commit11ebeb3fe04496ec46ab30a5aebb424f2b1175e3 (patch)
tree80683b3816d0944ed8275a8b39433fb6753cf3ff /src/d/d_meter2_info.cpp
parent818dec837f3370b4650476203f265b3b51cb82e6 (diff)
Link all oustanding US-matched TUs for JP (#2671)
Diffstat (limited to 'src/d/d_meter2_info.cpp')
-rw-r--r--src/d/d_meter2_info.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/d/d_meter2_info.cpp b/src/d/d_meter2_info.cpp
index 0ed7f510bd..e78e0e73a9 100644
--- a/src/d/d_meter2_info.cpp
+++ b/src/d/d_meter2_info.cpp
@@ -543,6 +543,15 @@ f32 dMeter2Info_c::getStringLength(J2DTextBox* i_textbox, char* i_string) {
str_width = 0.0f;
} else {
int c = (u8)*string;
+#if VERSION == VERSION_GCN_JPN
+ bool unkFlag1 = false;
+ if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) {
+ unkFlag1 = true;
+ }
+ if (unkFlag1) {
+ c = (c << 8) | (u8)*++string;
+ }
+#endif
str_width += charSpace + (fontSize.mSizeX * ((f32)font->getWidth(c) / (f32)font->getCellWidth()));
}
}
@@ -568,6 +577,15 @@ f32 dMeter2Info_c::getStringLength(JUTFont* i_font, f32 param_2, f32 param_3, ch
str_width = 0.0f;
} else {
int c = (u8)*string;
+#if VERSION == VERSION_GCN_JPN
+ bool unkFlag1 = false;
+ if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) {
+ unkFlag1 = true;
+ }
+ if (unkFlag1) {
+ c = (c << 8) | (u8)*++string;
+ }
+#endif
str_width += param_3 + param_2 * ((f32)i_font->getWidth(c) / (f32)i_font->getCellWidth());
}
}