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

175 lines
5.4 KiB
C++

#if !defined(__CTCL_H__)
#define __CTCL_H__
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the CTCL_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// CTCL_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#define CTCL_API _stdcall
#if !defined(BOOL)
#define BOOL int
#if !defined(TRUE)
#define TRUE 1
#define FALSE 0
#endif // !defined(TRUE)
#endif // !defined(BOOL)
#pragma pack(push, 1)
#if !defined(CTCLS_EXPORTS)
class CInviteCOOP
{
public:
void* m_pParent;
int m_nTimeInvite;
int m_nResult; // 0: not inited, 1: requesting, 2: no, 3: yes...
int m_nResultAccepted;
GUID m_guidGameData;
public:
CInviteCOOP();
void Clear();
};
#endif // !defined(CTCLS_EXPORTS)
struct STeslaInfo
{
public:
BOOL m_bCameraShip;
unsigned long m_ulAddr;
const char* m_pcsz;
int m_nLauncherConnection; // 0: no connection, +1: connection, -1: connecting
int m_nConnection2; // Connection to game or camera ship per m_bCameraShip, 0: no connection, +1: connected, -1: connecting
int m_nApplType;
int m_nApplState;
int m_nGameState;
int m_nGameTime;
int m_nGameIsServer;
public:
};
#define MAX_PLYR_NAME 20
struct SPlayerInfo
{
public:
BYTE m_bBot;
BYTE m_bTeam;
int m_nLevelOrTesla;
char m_szName[MAX_PLYR_NAME];
UINT m_uPlayerID;
int m_nMechIndex;
short m_fileID;
WORD m_recordID;
char m_szMech[64];
int m_nTeamOrSkin;
int m_nDecal;
DWORD m_dwAddr;
};
#pragma pack(pop)
#define C_GameInfo 1 // Console 2 Launcher
#define S_GameInfo 1 // Launcher 2 Console
#define C_OrderAppl 10 // Console 2 Launcher
#define C_ErrorStartGame 19 // to server & client - error occurred, to mainmenu
#define C_ReadyStartGame 20 // to server - Game Server Start w/ HostSetup & Mission Params...
#define C_BOTS 21 // to server - Bot Infos
#define C_SetMechs 22 // to server & client -
#define C_GetReady 23 // to server & client -
#define C_DoLaunch 24 // to server
#define S_GameReturn 30 // game to console
#define C_SendFile 40
#define S_SendFile 40
#define C_InviteCOOP 50 // to server & client - invite clients
#define S_InviteCOOP 50 // to server & client - reply to server for invitation
class CTeslaInfo;
typedef CTeslaInfo* TESLA_HANDLE;
BOOL CTCL_API CTCL_Start(int nCTCLType);
void CTCL_API CTCL_Stop();
void CTCL_API CTCL_Run();
// Used by All
int CTCL_API CTCL_API CTCL_GetType();
BOOL CTCL_API CTCL_IsNone(); // no -ctcltype...
BOOL CTCL_API CTCL_IsConsole(); // Console Only
bool CTCL_API CTCL_IsCOOP(); // is COOP?
BOOL CTCL_API CTCL_IsConsoleOrCOOP(); // Console or COOP(COin OPerational)
BOOL CTCL_API CTCL_IsConsoleX(); // Game & Cameraship
// Used by Console(+ COOP)
int CTCL_API CTCL_GetTeslaCountAll();
int CTCL_API CTCL_GetTeslaCount();
TESLA_HANDLE CTCL_API CTCL_GetTeslaInfo(int nIndex, STeslaInfo& TI);
int CTCL_API CTCL_InviteCOOP(int nTimeInvite, int& nYes, int& nNo, int& nProcessings);
const char* CTCL_API CTCL_GetTeslaName(int nIndex);
int CTCL_API CTCL_OrderAppl(int nIndex, int nOrder, int nParam);
// Used by Launcher
// Used by Game
// Used by CameraShip
void CTCL_API CTCL_DoTerminateAppl();
void CTCL_API CTCL_DoEndMission();
void CTCL_API CTCL_DoMainShell();
void CTCL_API CTCL_DoCreateGame();
void CTCL_API CTCL_DoJoinGame();
void CTCL_API CTCL_StartGame(BOOL bRealLaunch);
void CTCL_API CTCL_InitMechDatas();
void CTCL_API CTCL_CheckJoinGame();
void CTCL_API CTCL_CheckNetConnectedToServer();
void CTCL_API CTCL_SetMissionParams();
void CTCL_API CTCL_CheckMissionParams();
void CTCL_API CTCL_SetMechs();
void CTCL_API CTCL_CheckClientReady();
void CTCL_API CTCL_CheckServerReady();
void CTCL_API CTCL_DefaultHostSetup(int nMode);
// from here - Mech4 only
void CTCL_API CTCL_DoSendGameReturn(int nValue);
void CTCL_API CTCL_SaveNMP(const void* p, int nSize);
void* CTCL_API CTCL_LoadNMP(int& nSize);
void CTCL_API CTCL_SendFile(const SYSTEMTIME& SysTime, const GUID& guid, int nType);
bool CTCL_API CTCL_DoReprintOrCheck(bool bRealPrint);
void CTCL_API CTCL_SetGameStateAsIdle();
// to here - Mech4 only
extern "C" {
extern int g_nCTCLType;
extern int g_nCTCL_DoLaunchGame;
#if !defined(CTCLS_EXPORTS)
extern CInviteCOOP g_InviteCOOP;
// console only...
// Mech4 only
extern int g_nMech4Comm;
// server & client only
extern BOOL g_bIsServer;
// console(All), server & client only(g_aPlayerInfos[0]), server only(g_aPlayerInfos[1..g_nBOTs]
extern SPlayerInfo g_aPlayerInfos[20];
extern int g_nPlayerInfos;
extern int g_nServer;
extern int g_nTeslas;
extern int g_nPrintOut;
extern int g_nMissionReview;
extern SYSTEMTIME g_SysTime;
extern GUID g_guidGameDatas;
// Tesla Server & Clients only
extern char g_szGameName[128];
extern int g_nBOTs;
extern DWORD g_dwJoinStartTicks;
#endif // !defined(CTCLS_EXPORTS)
extern const char PROF_INI[];
extern const char SECT_TESLAS[];
extern const char SECT_GAMES[];
extern const char SECT_CONFIG[];
} // end of extern "C"
#endif // !defined(__CTCL_H__)