Files
firestorm/Gameleap/code/mw4/Code/MW4/@save_criomain.cpp
T
dicion af416960fa Translate Korean comments/strings to English; fix UTF-8 encoding across source tree
Korean translation (84 source files, 876 lines):
- Translated all EUC-KR/CP949 Korean developer comments to English across
  84 source files in Gameleap/code/. Zero Korean bytes remain outside the
  intentional font-table headers (D3FFontEdit2/fontedit all.h etc.).
- Comment markers: //상훈 앞/뒤 -> //sanghoon begin/end (Sang-hun's code
  region markers); //상훈짱 begin/end, //상훈.. variants; // 鉉 -> // hyun
  (second developer's markers); // 鉉 - start/end patterns.
- Functional string translations in recscore.cpp (mw4 + mw4print copies):
  body-part return values (왼발/오른발/etc. -> Left Leg/Right Leg/etc.),
  kill-announcer format strings (~30 entries), and the nonmfc.h assert dialog.
- GosView profiler: 킪 -> us (microseconds) in timing display strings.
- Network/socket code (ctcl.cpp, mugsocs.h, ctime.cpp across Launcher/
  MW4Application/MW4GameEd2/AnimScript): state-machine comments, socket
  ID comments, login/session management comments.
- render.hpp CHSH_Device member comments; GUIRadarManager.cpp drawing
  routine comments; hudchat/hudcomp2/huddamage/hudmap/hudweapon/hudtarg
  HUD component comments.
- DXRasterizer.cpp: cleaned residual U+FFFD replacement characters left
  from a prior partial encoding conversion.

UTF-8 encoding cleanup (76+ files):
- Latin-1 single bytes converted to proper UTF-8 multi-byte sequences:
  © (0xA9) in 3dsmax4/Maxscrpt Autodesk/Wainwright copyright headers,
  ® (0xAE) in gosHelp/Remote.cpp, · (0xB7) bullet points in ai command.hpp,
  Û (0xDB) in SafeChain_Test.cpp tool header,
  ß (0xDF) in AnimationSuite version strings (8 files).
- Font lookup tables (D3FFontEdit2/, fontedit/ *.h) intentionally left
  as-is: raw byte values are C array data, not text.

Language DLL:
- Replaced Gameleap/mw4/Language.dll (original Korean binary) and
  MW4/Language.dll with freshly built English version from
  Language - Win32 English config (Language.dsp). Fixes Korean button
  labels in the GameOS exception/crash dialog (??? ??... / ?? / ???
  were showing instead of More Details.../Continue/Exit).
2026-07-18 13:10:31 -05:00

172 lines
4.0 KiB
C++

/*
LONG g_JoystickXStart = INT_MAX;
LONG g_JoystickXEnd = INT_MIN;
LONG g_JoystickYStart = INT_MAX;
LONG g_JoystickYEnd = INT_MIN;
*/
//g_JoystickXStart = INT_MIN;
//g_JoystickXEnd = INT_MAX;
//g_JoystickYStart = INT_MAX;
//g_JoystickYEnd = INT_MIN;
void CRIOMAIN::UpdateJoystickX (DIJOYSTATE &js)
{
#define RANGE_JOYSTICK 1000L
#define DEADZONE_JOYSTICK 30L
LONG lJ;
LONG JoystickX_Center = 0L;
if ((g_JoystickX < -RANGE_JOYSTICK) || (g_JoystickX > RANGE_JOYSTICK))
{
// error
}
else
{
// Set StartPosition
if (g_JoystickXStart > g_JoystickX)
g_JoystickXStart = g_JoystickX;
// Set EndPosition
if (g_JoystickXEnd < g_JoystickX)
g_JoystickXEnd = g_JoystickX;
if ((g_JoystickXStart + g_JoystickXEnd) != 0) {
JoystickX_Center = (g_JoystickXStart + g_JoystickXEnd) / 2;
} else {
JoystickX_Center = 0L;
}
lJ = JoystickX_Center - g_JoystickX;
if (lJ > 0) {
lJ -= DEADZONE_JOYSTICK;
} else if (lJ < 0) {
lJ += DEADZONE_JOYSTICK;
}
if ((g_JoystickX < JoystickX_Center + DEADZONE_JOYSTICK) && (g_JoystickX > JoystickX_Center - DEADZONE_JOYSTICK)) {
g_JoystickXLast = 0;
} else {
g_JoystickXLast = lJ * 15.0L;
if (g_JoystickXLast < -1000L) {
g_JoystickXLast = -1000L;
} else if (g_JoystickXLast > 1000L) {
g_JoystickXLast = 1000L;
}
}
}
if (g_lpJoystickXMode)
{
*g_lpJoystickXMode = g_JoystickXLast;
}
#if defined(_DEBUG) && 0 // watcom
static char s_szStr[256];
sprintf (s_szStr, "@JOY_X@ RIO (%ld), CENTER (%ld),START (%ld), END (%ld), LAST (%ld) \n",
g_JoystickX, JoystickX_Center, g_JoystickXStart, g_JoystickXEnd, g_JoystickXLast);
::OutputDebugString(s_szStr);
#endif // watcom
}
void CRIOMAIN::UpdateJoystickY (DIJOYSTATE &js)
{
#define RANGE_JOYSTICK 1000L
#define DEADZONE_JOYSTICK 30L
LONG lJ;
LONG JoystickY_Center = 0L;
if ((g_JoystickY < -RANGE_JOYSTICK) || (g_JoystickY > RANGE_JOYSTICK))
{
// error
}
else
{
// Set StartPosition
if (g_JoystickYStart > g_JoystickY)
g_JoystickYStart = g_JoystickY;
// Set EndPosition
if (g_JoystickYEnd < g_JoystickY)
g_JoystickYEnd = g_JoystickY;
// Set CenterPosition
if ((g_JoystickYStart + g_JoystickYEnd) != 0) {
JoystickY_Center = (g_JoystickYStart + g_JoystickYEnd) / 2;
} else {
JoystickY_Center = 0L;
}
lJ = JoystickY_Center - g_JoystickY;
// High sensitivity
// Calculate from the moment of exiting the Dead Zone as 0
if (lJ > 0) {
lJ -= DEADZONE_JOYSTICK;
} else if (lJ < 0) {
lJ += DEADZONE_JOYSTICK;
}
if ((g_JoystickY < JoystickY_Center + DEADZONE_JOYSTICK) && (g_JoystickY > JoystickY_Center - DEADZONE_JOYSTICK)) {
g_JoystickYLast = 0;
} else {
g_JoystickYLast = lJ * -15.0L;
if (g_JoystickYLast < -1000L) {
g_JoystickYLast = -1000L;
} else if (g_JoystickYLast > 1000L) {
g_JoystickYLast = 1000L;
}
}
}
js.lY = g_JoystickYLast;
#if defined(_DEBUG) && 0 // watcom
static char s_szStr[256];
sprintf (s_szStr, "@JOY_Y@ RIO (%ld), CENTER (%ld),START (%ld), END (%ld), LAST (%ld) \n",
g_JoystickY, JoystickY_Center, g_JoystickYStart, g_JoystickYEnd, g_JoystickYLast);
::OutputDebugString(s_szStr);
#endif // watcom
}
/*
void CRIOMAIN::UpdateJoystick (DIJOYSTATE &js)
{
#define DEADZONE_JOYSTICK 20L
//*
// == JOYSTICK ==
// LEFT (+) - RIGHT (-)
// UP (-) - DOWN (+)
//
if (g_lpJoystickXMode)
{
if (g_JoystickX > DEADZONE_JOYSTICK || g_JoystickX < -DEADZONE_JOYSTICK) {
*g_lpJoystickXMode = g_JoystickX * -10;
} else {
*g_lpJoystickXMode = 0;
}
}
if (g_JoystickY > DEADZONE_JOYSTICK || g_JoystickY < -DEADZONE_JOYSTICK) {
js.lY = g_JoystickY * 10;
} else {
js.lY = 0;
}
#if defined(_DEBUG) && 0 // watcom
static char s_szStr[256];
sprintf (s_szStr, "x:[%ld], y:[%ld], z:[%ld]\n",
g_JoystickX, g_JoystickY, js.lRz);
::OutputDebugString(s_szStr);
#endif // watcom
}
*/