Files
firestorm/Gameleap/code/mw4/Code/MW4Application/ctime.h
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

56 lines
1.7 KiB
C++

#if !defined(__CTIME__)
#define __CTIME__
#if !defined(TIMEDATE_YEAR_BASE)
#define TIMEDATE_YEAR_BASE 1900
#endif // !defined(TIMEDATE_YEAR_BASE)
#if !defined(TIMEDATE_YEAR_BITS)
#define TIMEDATE_YEAR_BITS 8
#endif // !defined(TIMEDATE_YEAR_BITS)
#define TIMEDATE_RESERVED_BITS (32 - (5 + 4 + TIMEDATE_YEAR_BITS + 1 + 1)) // 13?
class CTimeDate
{
public:
union {
struct {
// Bit Fields declared first are at the low-bit end.
DWORD m_xDay: 5; // 2^0, 2^5-1
DWORD m_xMonth: 4; // 2^5, 2^4-1
DWORD m_xYear: TIMEDATE_YEAR_BITS; // from 1900-2155 // 2^9, 2^8-1
DWORD m_xReserved: TIMEDATE_RESERVED_BITS; // 2^17,2^13-1
DWORD m_xLunar: 1; // lunar system not solar system // 2^30, 2^1-1
DWORD m_xLeap: 1; // leap month? in case of lunar system // 2^31, 2^1-1
} m_LN;
long m_lDate;
};
public:
CTimeDate() { m_lDate = 0; } // TIMEDATE_YEAR_BASE/1/1 in solar
CTimeDate(const CTimeDate& that) { m_lDate = that.m_lDate; }
operator long& () { return *(long*)&m_lDate; }
static BOOL IsLeapYear(int nYear);
static long GetCurrent();
int const GetYear() const { return m_LN.m_xYear + TIMEDATE_YEAR_BASE; }
int const GetMonth() const { return m_LN.m_xMonth; }
int const GetDay() const { return m_LN.m_xDay; }
void CurrentDate();
BOOL GetDate(long lDate, BOOL bLunar = FALSE, BOOL bLeap = FALSE);
};
class CTimeLong
{
public:
long m_lTime; // time_t
public:
CTimeLong() { m_lTime = 0; }
CTimeLong(const CTimeLong& that) { m_lTime = that.m_lTime; }
operator long& () { return *(long*)&m_lTime; }
static long GetCurrent();
void CurrentTime();
void GetTime(tm& t) const;
};
#endif //!defined(__CTIME__)