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).
109 lines
2.6 KiB
C
109 lines
2.6 KiB
C
#ifdef _DEBUG
|
|
|
|
#define AssertDebugBreak() _asm { int 3 }
|
|
|
|
inline BOOL AssertDialog(const char* pcszExpr, const char* pcszfile, int nLine)
|
|
{
|
|
char szBuf[MAX_PATH * 2];
|
|
|
|
sprintf(szBuf, "ASSERT!!! in \"%s\" at line %d\n\nDo you want to debug?", pcszfile, nLine);
|
|
|
|
#ifdef WIN32
|
|
return ::MessageBox(NULL, szBuf, pcszExpr, MB_YESNO) == IDYES;
|
|
#else // !WIN32
|
|
return FALSE;
|
|
#endif // WIN32
|
|
}
|
|
|
|
inline BOOL __cdecl AssertReturnFALSE()
|
|
{
|
|
return FALSE;
|
|
}
|
|
|
|
#ifndef ASSERT
|
|
#define ASSERT(x) { if (!(x)) AssertDialog(#x, THIS_FILE, __LINE__); }
|
|
#endif
|
|
#define ASSERT_FALSE() ASSERT(AssertReturnFALSE())
|
|
|
|
#ifndef VERIFY
|
|
#define VERIFY(x) { if (!(x)) AssertDialog(#x, THIS_FILE, __LINE__); }
|
|
#endif
|
|
|
|
#ifndef TRACE
|
|
inline int __DbgTrace(const char* pcszFormat, ...)
|
|
{
|
|
va_list ap;
|
|
va_start(ap, pcszFormat);
|
|
char caBuffer[1024];
|
|
vsprintf(caBuffer, pcszFormat, ap);
|
|
va_end(ap);
|
|
::OutputDebugString(caBuffer);
|
|
|
|
return 0;
|
|
}
|
|
|
|
#define TRACE __DbgTrace
|
|
#endif
|
|
|
|
#ifndef THIS_FILE
|
|
#define THIS_FILE __FILE__
|
|
#endif // !THIS_FILE
|
|
#ifndef BASED_CODE
|
|
#define BASED_CODE
|
|
#endif // !BASED_CODE
|
|
|
|
#ifdef malloc
|
|
#undef malloc
|
|
#undef calloc
|
|
#undef realloc
|
|
#undef _expand
|
|
#undef free
|
|
#undef _msize
|
|
#endif
|
|
|
|
#define malloc(s) _malloc_dbg(s, _NORMAL_BLOCK, THIS_FILE, __LINE__)
|
|
#define calloc(c, s) _calloc_dbg(c, s, _NORMAL_BLOCK, THIS_FILE, __LINE__)
|
|
#define realloc(p, s) _realloc_dbg(p, s, _NORMAL_BLOCK, THIS_FILE, __LINE__)
|
|
#define _expand(p, s) _expand_dbg(p, s, _NORMAL_BLOCK, THIS_FILE, __LINE__)
|
|
#define free(p) _free_dbg(p, _NORMAL_BLOCK)
|
|
#define _msize(p) _msize_dbg(p, _NORMAL_BLOCK)
|
|
|
|
//----------------------------------------------------------------------------------------------------------
|
|
inline void* __cdecl operator new(size_t nSize, LPCSTR lpszFileName, int nLine)
|
|
{
|
|
void* p = _malloc_dbg(nSize, _NORMAL_BLOCK, lpszFileName, nLine);
|
|
return p;
|
|
}
|
|
|
|
inline void __cdecl operator delete(void* p, LPCSTR lpszFileName, int nLine)
|
|
{
|
|
_free_dbg(p, _NORMAL_BLOCK);
|
|
}
|
|
//----------------------------------------------------------------------------------------------------------
|
|
|
|
#ifndef _AFX
|
|
#define DEBUG_NEW new //(THIS_FILE, __LINE__)
|
|
#define DEBUG_DELETE delete //(THIS_FILE, __LINE__)
|
|
#endif
|
|
|
|
#else // !_DEBUG
|
|
|
|
#define ASSERTDLG_PUSH(hWnd)
|
|
#define ASSERTDLG_POP()
|
|
|
|
#ifndef ASSERT
|
|
#define ASSERT(x)
|
|
#endif
|
|
#define ASSERT_FALSE()
|
|
|
|
#ifndef VERIFY
|
|
#define VERIFY(x) x
|
|
#endif
|
|
#ifndef TRACE
|
|
inline int __DbgTraceIgnore(const char* pcszFormat, ...) { &pcszFormat; return 0; }
|
|
#define TRACE 1 ? 0: __DbgTraceIgnore
|
|
#endif
|
|
|
|
#endif // _DEBUG
|
|
|