1
0
mirror of https://github.com/ptitSeb/Serious-Engine synced 2025-03-23 22:40:06 +01:00

Silence a whole bunch of warnings about string literals vs non-const char *.

This commit is contained in:
Ryan C. Gordon 2016-03-28 23:21:44 -04:00
parent a4000c69a8
commit 2f10f864d8
66 changed files with 332 additions and 332 deletions

@ -30,7 +30,7 @@ void InitializeGame(void)
{ {
#ifdef STATICALLY_LINKED #ifdef STATICALLY_LINKED
#define fnmExpanded NULL #define fnmExpanded NULL
CPrintF(TRANS("Loading game library '%s'...\n"), "(statically linked)"); CPrintF(TRANSV("Loading game library '%s'...\n"), "(statically linked)");
#else #else
CTFileName fnmDLL; CTFileName fnmDLL;
#ifndef NDEBUG #ifndef NDEBUG
@ -42,7 +42,7 @@ void InitializeGame(void)
fnmDLL = CDynamicLoader::ConvertLibNameToPlatform(fnmDLL); fnmDLL = CDynamicLoader::ConvertLibNameToPlatform(fnmDLL);
CTFileName fnmExpanded; CTFileName fnmExpanded;
ExpandFilePath(EFP_READ | EFP_NOZIPS,fnmDLL,fnmExpanded); ExpandFilePath(EFP_READ | EFP_NOZIPS,fnmDLL,fnmExpanded);
CPrintF(TRANS("Loading game library '%s'...\n"), (const char *)fnmExpanded); CPrintF(TRANSV("Loading game library '%s'...\n"), (const char *)fnmExpanded);
#endif #endif
CDynamicLoader *loader = CDynamicLoader::GetInstance(fnmExpanded); CDynamicLoader *loader = CDynamicLoader::GetInstance(fnmExpanded);
@ -269,7 +269,7 @@ BOOL Init(int argc, char* argv[])
_pNetwork->md_strGameID = sam_strGameName; _pNetwork->md_strGameID = sam_strGameName;
LoadStringVar(CTString("Data\\Var\\Sam_Version.var"), _strSamVersion); LoadStringVar(CTString("Data\\Var\\Sam_Version.var"), _strSamVersion);
CPrintF(TRANS("Serious Sam version: %s\n"), (const char *) _strSamVersion); CPrintF(TRANSV("Serious Sam version: %s\n"), (const char *) _strSamVersion);
#if (defined PLATFORM_WIN32) #if (defined PLATFORM_WIN32)
SetConsoleCtrlHandler(HandlerRoutine, TRUE); SetConsoleCtrlHandler(HandlerRoutine, TRUE);
@ -323,7 +323,7 @@ void RoundBegin(void)
// if this is first round // if this is first round
if (iRound==1) { if (iRound==1) {
// error // error
CPrintF(TRANS("No scripts present!\n")); CPrintF(TRANSV("No scripts present!\n"));
_bRunning = FALSE; _bRunning = FALSE;
return; return;
} }
@ -337,7 +337,7 @@ void RoundBegin(void)
// start the level specified there // start the level specified there
if (ded_strLevel=="") { if (ded_strLevel=="") {
CPrintF(TRANS("ERROR: No next level specified!\n")); CPrintF(TRANSV("ERROR: No next level specified!\n"));
_bRunning = FALSE; _bRunning = FALSE;
} else { } else {
EnableLoadingHook(); EnableLoadingHook();
@ -346,9 +346,9 @@ void RoundBegin(void)
_bRestart = 0; _bRestart = 0;
DisableLoadingHook(); DisableLoadingHook();
_tvLastLevelEnd = CTimerValue((__int64) -1); _tvLastLevelEnd = CTimerValue((__int64) -1);
CPrintF(TRANS("\nALL OK: Dedicated server is now running!\n")); CPrintF(TRANSV("\nALL OK: Dedicated server is now running!\n"));
CPrintF(TRANS("Use Ctrl+C to shutdown the server.\n")); CPrintF(TRANSV("Use Ctrl+C to shutdown the server.\n"));
CPrintF(TRANS("DO NOT use the 'Close' button, it might leave the port hanging!\n\n")); CPrintF(TRANSV("DO NOT use the 'Close' button, it might leave the port hanging!\n\n"));
} }
} }
@ -464,7 +464,7 @@ int SubMain(int argc, char* argv[])
_bForceRestart = FALSE; _bForceRestart = FALSE;
_bRestart = FALSE; _bRestart = FALSE;
RoundEnd(); RoundEnd();
CPrintF(TRANS("\nNOTE: Restarting server!\n\n")); CPrintF(TRANSV("\nNOTE: Restarting server!\n\n"));
RoundBegin(); RoundBegin();
} else { } else {
_bRestart = FALSE; _bRestart = FALSE;

@ -62,7 +62,7 @@ SType SType::operator+(const SType &other)
/* /*
* Function used for reporting errors. * Function used for reporting errors.
*/ */
void yyerror(char *s) void yyerror(const char *s)
{ {
fprintf( stderr, "%s(%d): Error: %s\n", _strInputFileName, _iLinesCt, s); fprintf( stderr, "%s(%d): Error: %s\n", _strInputFileName, _iLinesCt, s);
ctErrors++; ctErrors++;
@ -71,7 +71,7 @@ void yyerror(char *s)
/* /*
* Change the extension of the filename. * Change the extension of the filename.
*/ */
char *ChangeFileNameExtension(char *strFileName, char *strNewExtension) char *ChangeFileNameExtension(const char *strFileName, const char *strNewExtension)
{ {
char *strChanged = (char*)malloc(strlen(strFileName)+strlen(strNewExtension)+2); char *strChanged = (char*)malloc(strlen(strFileName)+strlen(strNewExtension)+2);
strcpy(strChanged, strFileName); strcpy(strChanged, strFileName);
@ -86,7 +86,7 @@ char *ChangeFileNameExtension(char *strFileName, char *strNewExtension)
/* /*
* Open a file and report an error if failed. * Open a file and report an error if failed.
*/ */
FILE *FOpen(const char *strFileName, char *strMode) FILE *FOpen(const char *strFileName, const char *strMode)
{ {
// open the input file // open the input file
FILE *f = fopen(strFileName, strMode); FILE *f = fopen(strFileName, strMode);

@ -11,7 +11,7 @@
#endif #endif
extern int yylex(void); extern int yylex(void);
extern void yyerror(char *s); extern void yyerror(const char *s);
extern int yyparse(void); extern int yyparse(void);
extern FILE *_fInput; extern FILE *_fInput;

@ -10,29 +10,29 @@
#define YYINITDEPTH 1000 #define YYINITDEPTH 1000
static char *_strCurrentClass; static const char *_strCurrentClass;
static int _iCurrentClassID; static int _iCurrentClassID;
static char *_strCurrentBase; static const char *_strCurrentBase;
static char *_strCurrentDescription; static const char *_strCurrentDescription;
static char *_strCurrentThumbnail; static const char *_strCurrentThumbnail;
static char *_strCurrentEnum; static const char *_strCurrentEnum;
static int _bClassIsExported = 0; static int _bClassIsExported = 0;
static char *_strCurrentPropertyID; static const char *_strCurrentPropertyID;
static char *_strCurrentPropertyIdentifier; static const char *_strCurrentPropertyIdentifier;
static char *_strCurrentPropertyPropertyType; static const char *_strCurrentPropertyPropertyType;
static char *_strCurrentPropertyEnumType; static const char *_strCurrentPropertyEnumType;
static char *_strCurrentPropertyDataType; static const char *_strCurrentPropertyDataType;
static char *_strCurrentPropertyName; static const char *_strCurrentPropertyName;
static char *_strCurrentPropertyShortcut; static const char *_strCurrentPropertyShortcut;
static char *_strCurrentPropertyColor; static const char *_strCurrentPropertyColor;
static char *_strCurrentPropertyFlags; static const char *_strCurrentPropertyFlags;
static char *_strCurrentPropertyDefaultCode; static const char *_strCurrentPropertyDefaultCode;
static char *_strCurrentComponentIdentifier; static const char *_strCurrentComponentIdentifier;
static char *_strCurrentComponentType; static const char *_strCurrentComponentType;
static char *_strCurrentComponentID; static const char *_strCurrentComponentID;
static char *_strCurrentComponentFileName; static const char *_strCurrentComponentFileName;
static int _ctInProcedureHandler = 0; static int _ctInProcedureHandler = 0;
static char _strLastProcedureName[256]; static char _strLastProcedureName[256];
@ -52,7 +52,7 @@ static int _bInProcedure; // set if currently compiling a procedure
static int _bInHandler; static int _bInHandler;
static int _bHasOtherwise; // set if current 'wait' block has an 'otherwise' statement static int _bHasOtherwise; // set if current 'wait' block has an 'otherwise' statement
static char *_strCurrentEvent; static const char *_strCurrentEvent;
static int _bFeature_AbstractBaseClass; static int _bFeature_AbstractBaseClass;
static int _bFeature_ImplementsOnInitClass; static int _bFeature_ImplementsOnInitClass;
static int _bFeature_ImplementsOnEndClass; static int _bFeature_ImplementsOnEndClass;
@ -89,7 +89,7 @@ char *RemoveLineDirective(char *str)
return str; return str;
} }
} }
char *GetLineDirective(SType &st) const char *GetLineDirective(SType &st)
{ {
char *str = st.strString; char *str = st.strString;
if (str[0]=='\n' && str[1]=='#' && str[2]=='l') { if (str[0]=='\n' && str[1]=='#' && str[2]=='l') {
@ -883,9 +883,9 @@ function_list
function_implementation function_implementation
: opt_export opt_virtual return_type opt_tilde identifier '(' parameters_list ')' opt_const : opt_export opt_virtual return_type opt_tilde identifier '(' parameters_list ')' opt_const
'{' statements '}' opt_semicolon { '{' statements '}' opt_semicolon {
char *strReturnType = $3.strString; const char *strReturnType = $3.strString;
char *strFunctionHeader = ($4+$5+$6+$7+$8+$9).strString; const char *strFunctionHeader = ($4+$5+$6+$7+$8+$9).strString;
char *strFunctionBody = ($10+$11+$12).strString; const char *strFunctionBody = ($10+$11+$12).strString;
if (strcmp($5.strString, _strCurrentClass)==0) { if (strcmp($5.strString, _strCurrentClass)==0) {
if (strcmp(strReturnType+strlen(strReturnType)-4, "void")==0 ) { if (strcmp(strReturnType+strlen(strReturnType)-4, "void")==0 ) {
strReturnType = ""; strReturnType = "";

@ -648,7 +648,7 @@ void CTString::LoadVar(const class CTFileName &fnmFile)
str.Load_t(fnmFile); str.Load_t(fnmFile);
*this = str; *this = str;
} catch (char *strError) { } catch (char *strError) {
CPrintF(TRANS("Cannot load variable from '%s':\n%s\n"), (const char *) (CTString&)fnmFile, strError); CPrintF(TRANSV("Cannot load variable from '%s':\n%s\n"), (const char *) (CTString&)fnmFile, strError);
} }
} }
@ -657,7 +657,7 @@ void CTString::SaveVar(const class CTFileName &fnmFile)
try { try {
Save_t(fnmFile); Save_t(fnmFile);
} catch (char *strError) { } catch (char *strError) {
CPrintF(TRANS("Cannot save variable to '%s':\n%s\n"), (const char *) (CTString&)fnmFile, strError); CPrintF(TRANSV("Cannot save variable to '%s':\n%s\n"), (const char *) (CTString&)fnmFile, strError);
} }
} }

@ -87,9 +87,9 @@ void CInput::SetKeyNames( void)
// -------- Get number of joysticks ---------- // -------- Get number of joysticks ----------
// get number of joystics // get number of joystics
INDEX ctJoysticksPresent = PlatformGetJoystickCount(); INDEX ctJoysticksPresent = PlatformGetJoystickCount();
CPrintF(TRANS(" joysticks found: %d\n"), ctJoysticksPresent); CPrintF(TRANSV(" joysticks found: %d\n"), ctJoysticksPresent);
ctJoysticksPresent = Min(ctJoysticksPresent, inp_ctJoysticksAllowed); ctJoysticksPresent = Min(ctJoysticksPresent, inp_ctJoysticksAllowed);
CPrintF(TRANS(" joysticks allowed: %d\n"), ctJoysticksPresent); CPrintF(TRANSV(" joysticks allowed: %d\n"), ctJoysticksPresent);
// -------- Enumerate axis and buttons for joysticks ---------- // -------- Enumerate axis and buttons for joysticks ----------
for (INDEX iJoy=0; iJoy<MAX_JOYSTICKS; iJoy++) { for (INDEX iJoy=0; iJoy<MAX_JOYSTICKS; iJoy++) {
@ -108,7 +108,7 @@ void CInput::AddJoystickAbbilities(INDEX iJoy)
CTString strJoystickName; CTString strJoystickName;
strJoystickName.PrintF("Joy %d", iJoy+1); strJoystickName.PrintF("Joy %d", iJoy+1);
CTString strJoystickNameTra; CTString strJoystickNameTra;
strJoystickNameTra.PrintF(TRANS("Joy %d"), iJoy+1); strJoystickNameTra.PrintF(TRANSV("Joy %d"), iJoy+1);
// for each axis // for each axis
for( UINT iAxis=0; iAxis<6; iAxis++) { for( UINT iAxis=0; iAxis<6; iAxis++) {
@ -156,7 +156,7 @@ void CInput::AddJoystickAbbilities(INDEX iJoy)
*/ */
void CInput::Initialize( void ) void CInput::Initialize( void )
{ {
CPrintF(TRANS("Detecting input devices...\n")); CPrintF(TRANSV("Detecting input devices...\n"));
SetKeyNames(); SetKeyNames();
CPrintF("\n"); CPrintF("\n");
} }

@ -112,7 +112,7 @@ BOOL GetReplacingFile(CTFileName fnSourceFile, CTFileName &fnReplacingFile,
(void) strError; (void) strError;
} }
CTString strTitle; CTString strTitle;
strTitle.PrintF(TRANS("For:\"%s\""), (const char *) (CTString&)fnSourceFile); strTitle.PrintF(TRANSV("For:\"%s\""), (const char *) (CTString&)fnSourceFile);
// call file requester for substituting file // call file requester for substituting file
CTString strDefaultFile; CTString strDefaultFile;
strDefaultFile = fnSourceFile.FileName() + fnSourceFile.FileExt(); strDefaultFile = fnSourceFile.FileName() + fnSourceFile.FileExt();

@ -620,7 +620,7 @@ LONG CInput::PlatformGetJoystickCount(void)
// check if a joystick exists // check if a joystick exists
BOOL CInput::CheckJoystick(INDEX iJoy) BOOL CInput::CheckJoystick(INDEX iJoy)
{ {
CPrintF(TRANS(" joy %d:"), iJoy + 1); CPrintF(TRANSV(" joy %d:"), iJoy + 1);
assert(ctJoysticks > iJoy); assert(ctJoysticks > iJoy);
CPrintF(" '%s'\n", SDL_JoystickName(iJoy)); CPrintF(" '%s'\n", SDL_JoystickName(iJoy));
@ -636,10 +636,10 @@ BOOL CInput::CheckJoystick(INDEX iJoy)
sticks[iJoy] = stick; sticks[iJoy] = stick;
int ctAxes = SDL_JoystickNumAxes(stick); int ctAxes = SDL_JoystickNumAxes(stick);
CPrintF(TRANS(" %d axes\n"), ctAxes); CPrintF(TRANSV(" %d axes\n"), ctAxes);
CPrintF(TRANS(" %d buttons\n"), SDL_JoystickNumButtons(stick)); CPrintF(TRANSV(" %d buttons\n"), SDL_JoystickNumButtons(stick));
if (SDL_JoystickNumHats(stick) > 0) { if (SDL_JoystickNumHats(stick) > 0) {
CPrintF(TRANS(" POV hat present\n")); CPrintF(TRANSV(" POV hat present\n"));
} }
// for each axis // for each axis
@ -938,7 +938,7 @@ void CInput::GetInput(BOOL bPreScan)
// if joystick reading failed // if joystick reading failed
if (!bSucceeded && inp_bAutoDisableJoysticks) { if (!bSucceeded && inp_bAutoDisableJoysticks) {
// kill it, so it doesn't slow down CPU // kill it, so it doesn't slow down CPU
CPrintF(TRANS("Joystick %d failed, disabling it!\n"), iJoy+1); CPrintF(TRANSV("Joystick %d failed, disabling it!\n"), iJoy+1);
inp_abJoystickOn[iJoy] = FALSE; inp_abJoystickOn[iJoy] = FALSE;
} }
} }

@ -197,21 +197,21 @@ void MakeFatalError(void* pArgs)
extern void ReportGlobalMemoryStatus(void) extern void ReportGlobalMemoryStatus(void)
{ {
#ifdef PLATFORM_WIN32 #ifdef PLATFORM_WIN32
CPrintF(TRANS("Global memory status...\n")); CPrintF(TRANSV("Global memory status...\n"));
MEMORYSTATUS ms; MEMORYSTATUS ms;
GlobalMemoryStatus(&ms); GlobalMemoryStatus(&ms);
#define MB (1024*1024) #define MB (1024*1024)
CPrintF(TRANS(" Physical memory used: %4d/%4dMB\n"), (ms.dwTotalPhys -ms.dwAvailPhys )/MB, ms.dwTotalPhys /MB); CPrintF(TRANSV(" Physical memory used: %4d/%4dMB\n"), (ms.dwTotalPhys -ms.dwAvailPhys )/MB, ms.dwTotalPhys /MB);
CPrintF(TRANS(" Page file used: %4d/%4dMB\n"), (ms.dwTotalPageFile-ms.dwAvailPageFile)/MB, ms.dwTotalPageFile/MB); CPrintF(TRANSV(" Page file used: %4d/%4dMB\n"), (ms.dwTotalPageFile-ms.dwAvailPageFile)/MB, ms.dwTotalPageFile/MB);
CPrintF(TRANS(" Virtual memory used: %4d/%4dMB\n"), (ms.dwTotalVirtual -ms.dwAvailVirtual )/MB, ms.dwTotalVirtual /MB); CPrintF(TRANSV(" Virtual memory used: %4d/%4dMB\n"), (ms.dwTotalVirtual -ms.dwAvailVirtual )/MB, ms.dwTotalVirtual /MB);
CPrintF(TRANS(" Memory load: %3d%%\n"), ms.dwMemoryLoad); CPrintF(TRANSV(" Memory load: %3d%%\n"), ms.dwMemoryLoad);
DWORD dwMin; DWORD dwMin;
DWORD dwMax; DWORD dwMax;
GetProcessWorkingSetSize(GetCurrentProcess(), &dwMin, &dwMax); GetProcessWorkingSetSize(GetCurrentProcess(), &dwMin, &dwMax);
CPrintF(TRANS(" Process working set: %dMB-%dMB\n\n"), dwMin/(1024*1024), dwMax/(1024*1024)); CPrintF(TRANSV(" Process working set: %dMB-%dMB\n\n"), dwMin/(1024*1024), dwMax/(1024*1024));
#endif #endif
} }

@ -128,13 +128,13 @@ void InitStreams(void)
LoadStringVar(CTString("DefaultMod.txt"), _fnmMod); LoadStringVar(CTString("DefaultMod.txt"), _fnmMod);
} }
CPrintF(TRANS("Current mod: %s\n"), CPrintF(TRANSV("Current mod: %s\n"),
(_fnmMod=="") ? TRANS("<none>") : (_fnmMod=="") ? TRANS("<none>") :
(const char *) (CTString&)_fnmMod); (const char *) (CTString&)_fnmMod);
// if there is a mod active // if there is a mod active
if (_fnmMod!="") { if (_fnmMod!="") {
// load mod's include/exclude lists // load mod's include/exclude lists
CPrintF(TRANS("Loading mod include/exclude lists...\n")); CPrintF(TRANSV("Loading mod include/exclude lists...\n"));
BOOL bOK = FALSE; BOOL bOK = FALSE;
bOK |= LoadFileList(_afnmBaseWriteInc , CTString("BaseWriteInclude.lst")); bOK |= LoadFileList(_afnmBaseWriteInc , CTString("BaseWriteInclude.lst"));
bOK |= LoadFileList(_afnmBaseWriteExc , CTString("BaseWriteExclude.lst")); bOK |= LoadFileList(_afnmBaseWriteExc , CTString("BaseWriteExclude.lst"));
@ -145,7 +145,7 @@ void InitStreams(void)
if (!bOK) { if (!bOK) {
// the mod is not valid // the mod is not valid
_fnmMod = CTString(""); _fnmMod = CTString("");
CPrintF(TRANS("Error: MOD not found!\n")); CPrintF(TRANSV("Error: MOD not found!\n"));
// if mod is ok // if mod is ok
} else { } else {
// remember mod name (the parameter that is passed on cmdline) // remember mod name (the parameter that is passed on cmdline)
@ -159,7 +159,7 @@ void InitStreams(void)
LoadStringVar(CTString("ModExt.txt"), _strModExt); LoadStringVar(CTString("ModExt.txt"), _strModExt);
CPrintF(TRANS("Loading group files...\n")); CPrintF(TRANSV("Loading group files...\n"));
// for each group file in base directory // for each group file in base directory
struct _finddata_t c_file; struct _finddata_t c_file;

@ -257,7 +257,7 @@ static __int64 GetCPUSpeedHz(void)
// if not found in registry // if not found in registry
if( !bFoundInReg) { if( !bFoundInReg) {
// use measured // use measured
CPrintF(TRANS(" CPU speed not found in registry, using calculated value\n\n")); CPrintF(TRANSV(" CPU speed not found in registry, using calculated value\n\n"));
return (__int64)slSpeedRead*1000000; return (__int64)slSpeedRead*1000000;
// if found in registry // if found in registry
} else { } else {
@ -265,7 +265,7 @@ static __int64 GetCPUSpeedHz(void)
const INDEX iTolerance = slSpeedRead *1/100; // %1 tolerance should be enough const INDEX iTolerance = slSpeedRead *1/100; // %1 tolerance should be enough
if( abs(slSpeedRead-slSpeedReg) > iTolerance) { if( abs(slSpeedRead-slSpeedReg) > iTolerance) {
// report warning and use registry value // report warning and use registry value
CPrintF(TRANS(" WARNING: calculated CPU speed different than stored in registry!\n\n")); CPrintF(TRANSV(" WARNING: calculated CPU speed different than stored in registry!\n\n"));
return (__int64)slSpeedReg*1000000; return (__int64)slSpeedReg*1000000;
} }
// use measured value // use measured value

@ -138,12 +138,12 @@ CTString GetZlibError(int ierr)
case Z_VERSION_ERROR: return TRANS("Z_VERSION_ERROR"); break; case Z_VERSION_ERROR: return TRANS("Z_VERSION_ERROR"); break;
case Z_ERRNO : { case Z_ERRNO : {
CTString strError; CTString strError;
strError.PrintF(TRANS("Z_ERRNO: %s"), strerror(errno)); strError.PrintF(TRANSV("Z_ERRNO: %s"), strerror(errno));
return strError; return strError;
} break; } break;
default: { default: {
CTString strError; CTString strError;
strError.PrintF(TRANS("Unknown ZLIB error: %d"), ierr); strError.PrintF(TRANSV("Unknown ZLIB error: %d"), ierr);
return strError; return strError;
} break; } break;
} }
@ -367,7 +367,7 @@ void ReadZIPDirectory_t(CTFileName *pfnmZip)
} }
// report that file was read // report that file was read
CPrintF(TRANS(" %s: %d files\n"), (const char *) (CTString&)*pfnmZip, ctFiles++); CPrintF(TRANSV(" %s: %d files\n"), (const char *) (CTString&)*pfnmZip, ctFiles++);
} }
// add one zip archive to current active set // add one zip archive to current active set

@ -872,7 +872,7 @@ void CInput::GetInput(BOOL bPreScan)
// if joystick reading failed // if joystick reading failed
if (!bSucceeded && inp_bAutoDisableJoysticks) { if (!bSucceeded && inp_bAutoDisableJoysticks) {
// kill it, so it doesn't slow down CPU // kill it, so it doesn't slow down CPU
CPrintF(TRANS("Joystick %d failed, disabling it!\n"), iJoy+1); CPrintF(TRANSV("Joystick %d failed, disabling it!\n"), iJoy+1);
inp_abJoystickOn[iJoy] = FALSE; inp_abJoystickOn[iJoy] = FALSE;
} }
} }

@ -112,7 +112,7 @@ BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReser
static void DetectCPU(void) static void DetectCPU(void)
{ {
#if (defined USE_PORTABLE_C) // rcg10072001 #if (defined USE_PORTABLE_C) // rcg10072001
CPrintF(TRANS(" (No CPU detection in this binary.)\n")); CPrintF(TRANSV(" (No CPU detection in this binary.)\n"));
#else #else
char strVendor[12+1]; char strVendor[12+1];
@ -177,8 +177,8 @@ static void DetectCPU(void)
INDEX iStepping = (ulTFMS>> 0)&0xF; INDEX iStepping = (ulTFMS>> 0)&0xF;
CPrintF(TRANS(" Vendor: %s\n"), strVendor); CPrintF(TRANSV(" Vendor: %s\n"), strVendor);
CPrintF(TRANS(" Type: %d, Family: %d, Model: %d, Stepping: %d\n"), CPrintF(TRANSV(" Type: %d, Family: %d, Model: %d, Stepping: %d\n"),
iType, iFamily, iModel, iStepping); iType, iFamily, iModel, iStepping);
BOOL bMMX = ulFeatures & (1<<23); BOOL bMMX = ulFeatures & (1<<23);
@ -187,9 +187,9 @@ static void DetectCPU(void)
CTString strYes = TRANS("Yes"); CTString strYes = TRANS("Yes");
CTString strNo = TRANS("No"); CTString strNo = TRANS("No");
CPrintF(TRANS(" MMX : %s\n"), (const char *) (bMMX ?strYes:strNo)); CPrintF(TRANSV(" MMX : %s\n"), (const char *) (bMMX ?strYes:strNo));
CPrintF(TRANS(" CMOV: %s\n"), (const char *) (bCMOV?strYes:strNo)); CPrintF(TRANSV(" CMOV: %s\n"), (const char *) (bCMOV?strYes:strNo));
CPrintF(TRANS(" Clock: %.0fMHz\n"), _pTimer->tm_llCPUSpeedHZ/1E6); CPrintF(TRANSV(" Clock: %.0fMHz\n"), _pTimer->tm_llCPUSpeedHZ/1E6);
sys_strCPUVendor = strVendor; sys_strCPUVendor = strVendor;
sys_iCPUType = iType; sys_iCPUType = iType;
@ -372,17 +372,17 @@ ENGINE_API void SE_InitEngine(const char *argv0, CTString strGameID)
_strEngineBuild.PrintF( TRANS("SeriousEngine Build: %d.%d"), _SE_BUILD_MAJOR, _SE_BUILD_MINOR); _strEngineBuild.PrintF( TRANS("SeriousEngine Build: %d.%d"), _SE_BUILD_MAJOR, _SE_BUILD_MINOR);
// print basic engine info // print basic engine info
CPrintF(TRANS("--- Serious Engine Startup ---\n")); CPrintF(TRANSV("--- Serious Engine Startup ---\n"));
CPrintF(" %s\n\n", (const char *) _strEngineBuild); CPrintF(" %s\n\n", (const char *) _strEngineBuild);
// print info on the started application // print info on the started application
CPrintF(TRANS("Executable: %s\n"), strExePath); CPrintF(TRANSV("Executable: %s\n"), strExePath);
CPrintF(TRANS("Assumed engine directory: %s\n"), (const char *) _fnmApplicationPath); CPrintF(TRANSV("Assumed engine directory: %s\n"), (const char *) _fnmApplicationPath);
CPrintF("\n"); CPrintF("\n");
// report os info // report os info
CPrintF(TRANS("Examining underlying OS...\n")); CPrintF(TRANSV("Examining underlying OS...\n"));
// !!! FIXME: Abstract this somehow. // !!! FIXME: Abstract this somehow.
#if (defined PLATFORM_WIN32) #if (defined PLATFORM_WIN32)
@ -402,12 +402,12 @@ ENGINE_API void SE_InitEngine(const char *argv0, CTString strGameID)
sys_iOSBuild = osv.dwBuildNumber & 0xFFFF; sys_iOSBuild = osv.dwBuildNumber & 0xFFFF;
sys_strOSMisc = osv.szCSDVersion; sys_strOSMisc = osv.szCSDVersion;
CPrintF(TRANS(" Type: %s\n"), (const char*)sys_strOS); CPrintF(TRANSV(" Type: %s\n"), (const char*)sys_strOS);
CPrintF(TRANS(" Version: %d.%d, build %d\n"), CPrintF(TRANSV(" Version: %d.%d, build %d\n"),
osv.dwMajorVersion, osv.dwMinorVersion, osv.dwBuildNumber & 0xFFFF); osv.dwMajorVersion, osv.dwMinorVersion, osv.dwBuildNumber & 0xFFFF);
CPrintF(TRANS(" Misc: %s\n"), osv.szCSDVersion); CPrintF(TRANSV(" Misc: %s\n"), osv.szCSDVersion);
} else { } else {
CPrintF(TRANS("Error getting OS info: %s\n"), GetWindowsError(GetLastError()) ); CPrintF(TRANSV("Error getting OS info: %s\n"), GetWindowsError(GetLastError()) );
} }
#elif (defined PLATFORM_MACOSX) #elif (defined PLATFORM_MACOSX)
@ -421,8 +421,8 @@ ENGINE_API void SE_InitEngine(const char *argv0, CTString strGameID)
sys_iOSBuild = ((osver & 0x000F) >> 0); sys_iOSBuild = ((osver & 0x000F) >> 0);
sys_strOS = "Mac OS X"; sys_strOS = "Mac OS X";
sys_strOSMisc = "Mac OS"; sys_strOSMisc = "Mac OS";
CPrintF(TRANS(" Type: %s\n"), (const char*)sys_strOS); CPrintF(TRANSV(" Type: %s\n"), (const char*)sys_strOS);
CPrintF(TRANS(" Version: %d.%d.%d\n"), CPrintF(TRANSV(" Version: %d.%d.%d\n"),
(int)sys_iOSMajor, (int)sys_iOSMinor, (int)sys_iOSBuild); (int)sys_iOSMajor, (int)sys_iOSMinor, (int)sys_iOSBuild);
#elif (defined PLATFORM_UNIX) // !!! FIXME: rcg10082001 what to do with this? #elif (defined PLATFORM_UNIX) // !!! FIXME: rcg10082001 what to do with this?
@ -431,7 +431,7 @@ ENGINE_API void SE_InitEngine(const char *argv0, CTString strGameID)
sys_iOSBuild = 0; sys_iOSBuild = 0;
sys_strOS = "Unix"; sys_strOS = "Unix";
sys_strOSMisc = "Unix"; sys_strOSMisc = "Unix";
CPrintF(TRANS(" Type: %s\n"), (const char*)sys_strOS); CPrintF(TRANSV(" Type: %s\n"), (const char*)sys_strOS);
#else #else
#error Do something with this for your platform. #error Do something with this for your platform.
@ -442,7 +442,7 @@ ENGINE_API void SE_InitEngine(const char *argv0, CTString strGameID)
// (rcg11232001 this is where _pShell was originally created.) // (rcg11232001 this is where _pShell was originally created.)
// report CPU // report CPU
CPrintF(TRANS("Detecting CPU...\n")); CPrintF(TRANSV("Detecting CPU...\n"));
DetectCPUWrapper(); DetectCPUWrapper();
CPrintF("\n"); CPrintF("\n");

@ -591,9 +591,9 @@ void CEntityComponent::Obtain_t(void) // throw char *
// if not already loaded and should not be precaching now // if not already loaded and should not be precaching now
if( ctUsed<=1 && !_precache_bNowPrecaching) { if( ctUsed<=1 && !_precache_bNowPrecaching) {
// report warning // report warning
CPrintF(TRANS("Not precached: (0x%08X)'%s'\n"), this->ec_slID, (const char *) ec_fnmComponent); CPrintF(TRANSV("Not precached: (0x%08X)'%s'\n"), this->ec_slID, (const char *) ec_fnmComponent);
} }
//CPrintF(TRANS("Precaching NOW: (0x%08X)'%s'\n"), this->ec_slID, (const char *) ec_fnmComponent); //CPrintF(TRANSV("Precaching NOW: (0x%08X)'%s'\n"), this->ec_slID, (const char *) ec_fnmComponent);
// add to CRC // add to CRC
AddToCRCTable(); AddToCRCTable();

@ -15,7 +15,7 @@
class CEntityPropertyEnumValue { class CEntityPropertyEnumValue {
public: public:
INDEX epev_iValue; // value INDEX epev_iValue; // value
char *epev_strName; // descriptive name of the enum value (for editor) const char *epev_strName; // descriptive name of the enum value (for editor)
}; };
class CEntityPropertyEnumType { class CEntityPropertyEnumType {
public: public:
@ -96,13 +96,13 @@ public:
ULONG ep_ulID; // property ID for this class ULONG ep_ulID; // property ID for this class
SLONG ep_slOffset; // offset of the property in the class SLONG ep_slOffset; // offset of the property in the class
char *ep_strName; // descriptive name of the property (for editor) const char *ep_strName; // descriptive name of the property (for editor)
ULONG ep_ulFlags; // additional flags for the property ULONG ep_ulFlags; // additional flags for the property
char ep_chShortcut; // shortcut key for selecting the property in editor (0 for none) char ep_chShortcut; // shortcut key for selecting the property in editor (0 for none)
COLOR ep_colColor; // property color, for various wed purposes (like target arrows) COLOR ep_colColor; // property color, for various wed purposes (like target arrows)
CEntityProperty(PropertyType eptType, CEntityPropertyEnumType *pepetEnumType, CEntityProperty(PropertyType eptType, CEntityPropertyEnumType *pepetEnumType,
ULONG ulID, SLONG slOffset, char *strName, char chShortcut, COLOR colColor, ULONG ulFlags) ULONG ulID, SLONG slOffset, const char *strName, char chShortcut, COLOR colColor, ULONG ulFlags)
: ep_eptType (eptType ) : ep_eptType (eptType )
, ep_pepetEnumType (pepetEnumType) , ep_pepetEnumType (pepetEnumType)
, ep_ulID (ulID ) , ep_ulID (ulID )
@ -166,7 +166,7 @@ public:
// NOTE: This uses special EFNM initialization for CTFileName class! // NOTE: This uses special EFNM initialization for CTFileName class!
CEntityComponent(EntityComponentType ectType, CEntityComponent(EntityComponentType ectType,
ULONG ulID, char *strEFNMComponent) ULONG ulID, const char *strEFNMComponent)
: ec_ectType(ectType) : ec_ectType(ectType)
, ec_slID(ulID) , ec_slID(ulID)
, ec_fnmComponent(strEFNMComponent, 4) { ec_pvPointer = NULL; }; , ec_fnmComponent(strEFNMComponent, 4) { ec_pvPointer = NULL; };
@ -187,8 +187,8 @@ public:
CEntityComponent *dec_aecComponents;// array of components CEntityComponent *dec_aecComponents;// array of components
INDEX dec_ctComponents; // number of components INDEX dec_ctComponents; // number of components
char *dec_strName; // descriptive name of the class const char *dec_strName; // descriptive name of the class
char *dec_strIconFileName; // filename of texture or thumbnail const char *dec_strIconFileName; // filename of texture or thumbnail
INDEX dec_iID; // class ID INDEX dec_iID; // class ID
CDLLEntityClass *dec_pdecBase; // pointer to the base class CDLLEntityClass *dec_pdecBase; // pointer to the base class

@ -296,7 +296,7 @@ void CGfxLibrary::InitAPIs(void)
if (SDL_Init(SDL_INIT_VIDEO) == -1) if (SDL_Init(SDL_INIT_VIDEO) == -1)
{ {
CPrintF(TRANS("SDL_Init failed! Reason: %s\n"), SDL_GetError()); CPrintF(TRANSV("SDL_Init failed! Reason: %s\n"), SDL_GetError());
return; return;
} }
@ -378,12 +378,12 @@ BOOL CDS_SetMode( PIX pixSizeI, PIX pixSizeJ, enum DisplayDepth dd)
case DISP_CHANGE_NOTUPDATED: strError = "DISP_CHANGE_NOTUPDATED"; break; case DISP_CHANGE_NOTUPDATED: strError = "DISP_CHANGE_NOTUPDATED"; break;
default: strError.PrintF("%d", lRes); break; default: strError.PrintF("%d", lRes); break;
} }
CPrintF(TRANS("CDS error: %s\n"), strError); CPrintF(TRANSV("CDS error: %s\n"), strError);
return FALSE; return FALSE;
} }
} }
// report // report
CPrintF(TRANS(" CDS: mode set to %dx%dx%d\n"), pixSizeI, pixSizeJ, devmode.dmBitsPerPel); CPrintF(TRANSV(" CDS: mode set to %dx%dx%d\n"), pixSizeI, pixSizeJ, devmode.dmBitsPerPel);
#endif #endif
return TRUE; return TRUE;
} }
@ -398,7 +398,7 @@ void CDS_ResetMode(void)
#ifdef PLATFORM_WIN32 #ifdef PLATFORM_WIN32
LONG lRes = ChangeDisplaySettings( NULL, 0); LONG lRes = ChangeDisplaySettings( NULL, 0);
ASSERT(lRes==DISP_CHANGE_SUCCESSFUL); ASSERT(lRes==DISP_CHANGE_SUCCESSFUL);
CPrintF(TRANS(" CDS: mode reset to original desktop settings\n")); CPrintF(TRANSV(" CDS: mode reset to original desktop settings\n"));
#endif #endif
} }

@ -1096,7 +1096,7 @@ void CGfxLibrary::Init(void)
#ifdef PLATFORM_WIN32 #ifdef PLATFORM_WIN32
// report desktop settings // report desktop settings
CPrintF(TRANS("Desktop settings...\n")); CPrintF(TRANSV("Desktop settings...\n"));
HDC hdc = GetDC(NULL); HDC hdc = GetDC(NULL);
SLONG slBPP = GetDeviceCaps(hdc, PLANES) * GetDeviceCaps(hdc, BITSPIXEL); SLONG slBPP = GetDeviceCaps(hdc, PLANES) * GetDeviceCaps(hdc, BITSPIXEL);
@ -1104,10 +1104,10 @@ void CGfxLibrary::Init(void)
gfx_ctMonitors = GetSystemMetrics(SM_CMONITORS); gfx_ctMonitors = GetSystemMetrics(SM_CMONITORS);
CPrintF(TRANS(" Color Depth: %dbit\n"), slBPP); CPrintF(TRANSV(" Color Depth: %dbit\n"), slBPP);
CPrintF(TRANS(" Screen: %dx%d\n"), GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); CPrintF(TRANSV(" Screen: %dx%d\n"), GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
CPrintF(TRANS(" Virtual screen: %dx%d\n"), GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN)); CPrintF(TRANSV(" Virtual screen: %dx%d\n"), GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN));
CPrintF(TRANS(" Monitors directly reported: %d\n"), gfx_ctMonitors); CPrintF(TRANSV(" Monitors directly reported: %d\n"), gfx_ctMonitors);
#else #else

@ -147,26 +147,26 @@ void MonitorsOff(void)
// if there is more than one monitor, and OS is not WinNT // if there is more than one monitor, and OS is not WinNT
if (gfx_ctMonitors>1 && !bNT) { if (gfx_ctMonitors>1 && !bNT) {
CPrintF(TRANS("Multimonitor configuration detected...\n")); CPrintF(TRANSV("Multimonitor configuration detected...\n"));
// if multimon is not allowed // if multimon is not allowed
if (gfx_bDisableMultiMonSupport) { if (gfx_bDisableMultiMonSupport) {
CPrintF(TRANS(" Multimonitor support disallowed.\n")); CPrintF(TRANSV(" Multimonitor support disallowed.\n"));
CPrintF(TRANS(" Disabling multimonitor...")); CPrintF(TRANSV(" Disabling multimonitor..."));
// disable all but primary // disable all but primary
try { try {
Mon_DisableEnable9x_t(/*bDisable = */ TRUE); Mon_DisableEnable9x_t(/*bDisable = */ TRUE);
CPrintF(TRANS(" disabled\n")); CPrintF(TRANSV(" disabled\n"));
} catch(char *strError) { } catch(char *strError) {
CPrintF(TRANS(" error: %s\n"), strError); CPrintF(TRANSV(" error: %s\n"), strError);
} }
gfx_bMultiMonDisabled = TRUE; gfx_bMultiMonDisabled = TRUE;
// if multimon is allowed // if multimon is allowed
} else { } else {
CPrintF(TRANS(" Multimonitor support was allowed.\n")); CPrintF(TRANSV(" Multimonitor support was allowed.\n"));
} }
} }
#else #else
CPrintF(TRANS("Multimonitor is not supported on this platform.\n")); CPrintF(TRANSV("Multimonitor is not supported on this platform.\n"));
#endif #endif
} }
@ -175,18 +175,18 @@ void MonitorsOn(void)
#ifdef PLATFORM_WIN32 #ifdef PLATFORM_WIN32
// if multimon was disabled // if multimon was disabled
if (gfx_bMultiMonDisabled) { if (gfx_bMultiMonDisabled) {
CPrintF(TRANS("Multimonitor support was disabled.\n")); CPrintF(TRANSV("Multimonitor support was disabled.\n"));
CPrintF(TRANS(" re-enabling multimonitor...")); CPrintF(TRANSV(" re-enabling multimonitor..."));
// enable all secondary // enable all secondary
try { try {
Mon_DisableEnable9x_t(/*bDisable = */ FALSE); Mon_DisableEnable9x_t(/*bDisable = */ FALSE);
CPrintF(TRANS(" enabled\n")); CPrintF(TRANSV(" enabled\n"));
} catch(char *strError) { } catch(char *strError) {
CPrintF(TRANS(" error: %s\n"), strError); CPrintF(TRANSV(" error: %s\n"), strError);
} }
} }
#else #else
CPrintF(TRANS("Multimonitor is not supported on this platform.\n")); CPrintF(TRANSV("Multimonitor is not supported on this platform.\n"));
#endif #endif
} }

@ -37,7 +37,7 @@ BOOL CGfxLibrary::InitDriver_OGL(BOOL init3dfx)
CTString strDriverFileName = ((envlib) ? envlib : "libGL.so.1"); CTString strDriverFileName = ((envlib) ? envlib : "libGL.so.1");
if (SDL_GL_LoadLibrary(strDriverFileName) == -1) { if (SDL_GL_LoadLibrary(strDriverFileName) == -1) {
CPrintF(TRANS("Cannot load OpenGL driver '%s'"), (const char *) strDriverFileName); CPrintF(TRANSV("Cannot load OpenGL driver '%s'"), (const char *) strDriverFileName);
SDL_QuitSubSystem(SDL_INIT_VIDEO); SDL_QuitSubSystem(SDL_INIT_VIDEO);
return(FALSE); return(FALSE);
} }

@ -459,7 +459,7 @@ BOOL CBlockBuffer::ReadBlockToStream(CTStream &strm)
ASSERT(slSize == bh.bh_slSize); ASSERT(slSize == bh.bh_slSize);
} catch (char *strError) { } catch (char *strError) {
ASSERT(FALSE); ASSERT(FALSE);
CPrintF(TRANS("Buffer error reading to stream: %s\n"), strError); CPrintF(TRANSV("Buffer error reading to stream: %s\n"), strError);
return FALSE; return FALSE;
} }

@ -284,7 +284,7 @@ void CCommunicationInterface::InitWinsock(void)
if (iResult==0) { if (iResult==0) {
// remember that // remember that
cci_bWinSockOpen = TRUE; cci_bWinSockOpen = TRUE;
CPrintF(TRANS(" winsock opened ok\n")); CPrintF(TRANSV(" winsock opened ok\n"));
} }
#else #else
cci_bWinSockOpen = TRUE; cci_bWinSockOpen = TRUE;
@ -324,11 +324,11 @@ void CCommunicationInterface::PrepareForUse(BOOL bUseNetwork, BOOL bClient)
EndWinsock(); EndWinsock();
if (bUseNetwork) { if (bUseNetwork) {
CPrintF(TRANS("Initializing TCP/IP...\n")); CPrintF(TRANSV("Initializing TCP/IP...\n"));
if (bClient) { if (bClient) {
CPrintF(TRANS(" opening as client\n")); CPrintF(TRANSV(" opening as client\n"));
} else { } else {
CPrintF(TRANS(" opening as server\n")); CPrintF(TRANSV(" opening as server\n"));
} }
// make sure winsock is on // make sure winsock is on
@ -338,7 +338,7 @@ void CCommunicationInterface::PrepareForUse(BOOL bUseNetwork, BOOL bClient)
cm_ulLocalHost = 0; cm_ulLocalHost = 0;
// if there is a desired local address // if there is a desired local address
if (net_strLocalHost!="") { if (net_strLocalHost!="") {
CPrintF(TRANS(" user forced local address: %s\n"), (const char*)net_strLocalHost); CPrintF(TRANSV(" user forced local address: %s\n"), (const char*)net_strLocalHost);
// use that address // use that address
cm_strName = net_strLocalHost; cm_strName = net_strLocalHost;
cm_ulLocalHost = StringToAddress(cm_strName); cm_ulLocalHost = StringToAddress(cm_strName);
@ -346,12 +346,12 @@ void CCommunicationInterface::PrepareForUse(BOOL bUseNetwork, BOOL bClient)
if (cm_ulLocalHost==0 || cm_ulLocalHost==-1) { if (cm_ulLocalHost==0 || cm_ulLocalHost==-1) {
cm_ulLocalHost=0; cm_ulLocalHost=0;
// report it // report it
CPrintF(TRANS(" requested local address is invalid\n")); CPrintF(TRANSV(" requested local address is invalid\n"));
} }
} }
// if no valid desired local address // if no valid desired local address
CPrintF(TRANS(" getting local addresses\n")); CPrintF(TRANSV(" getting local addresses\n"));
// get default // get default
char hostname[256]; char hostname[256];
gethostname(hostname, sizeof(hostname)-1); gethostname(hostname, sizeof(hostname)-1);
@ -370,8 +370,8 @@ void CCommunicationInterface::PrepareForUse(BOOL bUseNetwork, BOOL bClient)
} }
} }
CPrintF(TRANS(" local addresses: %s (%s)\n"), (const char *) cm_strName, (const char *) cm_strAddress); CPrintF(TRANSV(" local addresses: %s (%s)\n"), (const char *) cm_strName, (const char *) cm_strAddress);
CPrintF(TRANS(" port: %d\n"), net_iPort); CPrintF(TRANSV(" port: %d\n"), net_iPort);
// try to open master UDP socket // try to open master UDP socket
try { try {
@ -379,9 +379,9 @@ void CCommunicationInterface::PrepareForUse(BOOL bUseNetwork, BOOL bClient)
cci_pbMasterInput.pb_ppbsStats = NULL; cci_pbMasterInput.pb_ppbsStats = NULL;
cci_pbMasterOutput.pb_ppbsStats = NULL; cci_pbMasterOutput.pb_ppbsStats = NULL;
cm_ciBroadcast.SetLocal(NULL); cm_ciBroadcast.SetLocal(NULL);
CPrintF(TRANS(" opened socket: \n")); CPrintF(TRANSV(" opened socket: \n"));
} catch (char *strError) { } catch (char *strError) {
CPrintF(TRANS(" cannot open UDP socket: %s\n"), strError); CPrintF(TRANSV(" cannot open UDP socket: %s\n"), strError);
} }
} }
@ -507,7 +507,7 @@ void CCommunicationInterface::SetNonBlocking_t(void)
CTString CCommunicationInterface::GetSocketError(INDEX iError) CTString CCommunicationInterface::GetSocketError(INDEX iError)
{ {
CTString strError; CTString strError;
strError.PrintF(TRANS("Socket %d, Error %d (%s)"), strError.PrintF(TRANSV("Socket %d, Error %d (%s)"),
cci_hSocket, iError, ErrorDescription(&SocketErrors, iError)); cci_hSocket, iError, ErrorDescription(&SocketErrors, iError));
return strError; return strError;
}; };
@ -849,7 +849,7 @@ BOOL CCommunicationInterface::Server_Update()
} }
} }
} else { } else {
CPrintF(TRANS("Unable to deliver data to client '%s', disconnecting.\n"),(const char *) AddressToString(cm_aciClients[iClient].ci_adrAddress.adr_ulAddress)); CPrintF(TRANSV("Unable to deliver data to client '%s', disconnecting.\n"),(const char *) AddressToString(cm_aciClients[iClient].ci_adrAddress.adr_ulAddress));
Server_ClearClient(iClient); Server_ClearClient(iClient);
_pNetwork->ga_srvServer.HandleClientDisconected(iClient); _pNetwork->ga_srvServer.HandleClientDisconected(iClient);
@ -894,7 +894,7 @@ BOOL CCommunicationInterface::Server_Update()
// warn about possible attack // warn about possible attack
extern INDEX net_bReportMiscErrors; extern INDEX net_bReportMiscErrors;
if (net_bReportMiscErrors) { if (net_bReportMiscErrors) {
CPrintF(TRANS("WARNING: Invalid message from: %s\n"), (const char *) AddressToString(ppaPacket->pa_adrAddress.adr_ulAddress)); CPrintF(TRANSV("WARNING: Invalid message from: %s\n"), (const char *) AddressToString(ppaPacket->pa_adrAddress.adr_ulAddress));
} }
} }
} }
@ -1230,7 +1230,7 @@ BOOL CCommunicationInterface::Client_Update(void)
// warn about possible attack // warn about possible attack
extern INDEX net_bReportMiscErrors; extern INDEX net_bReportMiscErrors;
if (net_bReportMiscErrors) { if (net_bReportMiscErrors) {
CPrintF(TRANS("WARNING: Invalid message from: %s\n"), (const char *) AddressToString(ppaPacket->pa_adrAddress.adr_ulAddress)); CPrintF(TRANSV("WARNING: Invalid message from: %s\n"), (const char *) AddressToString(ppaPacket->pa_adrAddress.adr_ulAddress));
} }
} }
} }
@ -1277,7 +1277,7 @@ void CCommunicationInterface::UpdateMasterBuffers()
if (!isWouldBlockError(iResult)) { if (!isWouldBlockError(iResult)) {
// report it // report it
if (iResult!=WSAECONNRESET || net_bReportICMPErrors) { if (iResult!=WSAECONNRESET || net_bReportICMPErrors) {
CPrintF(TRANS("Socket error during UDP receive. %s\n"), CPrintF(TRANSV("Socket error during UDP receive. %s\n"),
(const char*)GetSocketError(iResult)); (const char*)GetSocketError(iResult));
return; return;
} }
@ -1290,7 +1290,7 @@ void CCommunicationInterface::UpdateMasterBuffers()
// the packet is in error // the packet is in error
extern INDEX net_bReportMiscErrors; extern INDEX net_bReportMiscErrors;
if (net_bReportMiscErrors) { if (net_bReportMiscErrors) {
CPrintF(TRANS("WARNING: Bad UDP packet from '%s'\n"), (const char *) AddressToString(adrIncomingAddress.adr_ulAddress)); CPrintF(TRANSV("WARNING: Bad UDP packet from '%s'\n"), (const char *) AddressToString(adrIncomingAddress.adr_ulAddress));
} }
// there might be more to do // there might be more to do
bSomethingDone = TRUE; bSomethingDone = TRUE;
@ -1336,7 +1336,7 @@ void CCommunicationInterface::UpdateMasterBuffers()
return; return;
// report it // report it
} else if (iResult!=WSAECONNRESET || net_bReportICMPErrors) { } else if (iResult!=WSAECONNRESET || net_bReportICMPErrors) {
CPrintF(TRANS("Socket error during UDP send. %s\n"), CPrintF(TRANSV("Socket error during UDP send. %s\n"),
(const char*)GetSocketError(iResult)); (const char*)GetSocketError(iResult));
} }
return; return;

@ -397,11 +397,11 @@ static void KickClient(INDEX iClient, const CTString &strReason)
} }
iClient = Clamp(iClient, INDEX(0), INDEX(NET_MAXGAMECOMPUTERS)); iClient = Clamp(iClient, INDEX(0), INDEX(NET_MAXGAMECOMPUTERS));
if (!_pNetwork->ga_srvServer.srv_assoSessions[iClient].IsActive()) { if (!_pNetwork->ga_srvServer.srv_assoSessions[iClient].IsActive()) {
CPrintF(TRANS("Client not connected!\n")); CPrintF(TRANSV("Client not connected!\n"));
return; return;
} }
if (iClient == 0) { if (iClient == 0) {
CPrintF(TRANS("Can't kick local client!\n")); CPrintF(TRANSV("Can't kick local client!\n"));
return; return;
} }
CPrintF( TRANS("Kicking %d with explanation '%s'...\n"), iClient, (const char *) strReason); CPrintF( TRANS("Kicking %d with explanation '%s'...\n"), iClient, (const char *) strReason);
@ -1644,7 +1644,7 @@ void CNetworkLibrary::ChangeLevel_internal(void)
// if failed // if failed
} catch(char *strError) { } catch(char *strError) {
// report error // report error
CPrintF(TRANS("Cannot change level:\n%s"), strError); CPrintF(TRANSV("Cannot change level:\n%s"), strError);
// try to // try to
try { try {
// load the old world // load the old world
@ -1830,7 +1830,7 @@ void CNetworkLibrary::MainLoop(void)
StartDemoRec_t(strName); StartDemoRec_t(strName);
dem_iRecordedNumber+=1; dem_iRecordedNumber+=1;
} catch(char *strError) { } catch(char *strError) {
CPrintF(TRANS("Demo recording error: %s\n"), strError); CPrintF(TRANSV("Demo recording error: %s\n"), strError);
} }
} }
} }
@ -1976,11 +1976,11 @@ void CNetworkLibrary::MainLoop(void)
CTString strAdr = AddressToString(ulFrom); CTString strAdr = AddressToString(ulFrom);
if (net_strAdminPassword=="" || net_strAdminPassword!=strPass) { if (net_strAdminPassword=="" || net_strAdminPassword!=strPass) {
CPrintF(TRANS("Server: Client '%s', Wrong password for remote administration.\n"), (const char*)strAdr); CPrintF(TRANSV("Server: Client '%s', Wrong password for remote administration.\n"), (const char*)strAdr);
continue; continue;
} }
CPrintF(TRANS("Server: Client '%s', Admin cmd: %s\n"), (const char*)strAdr, strCmd); CPrintF(TRANSV("Server: Client '%s', Admin cmd: %s\n"), (const char*)strAdr, strCmd);
con_bCapture = TRUE; con_bCapture = TRUE;
con_strCapture = ""; con_strCapture = "";
@ -2485,7 +2485,7 @@ void CNetworkLibrary::FinishCRCGather(void)
ga_ulCRC = CRCT_MakeCRCForFiles_t(strmCRC); ga_ulCRC = CRCT_MakeCRCForFiles_t(strmCRC);
} catch (char *strError) { } catch (char *strError) {
CPrintF(TRANS("Warning, cannot get CRCs: %s\n"), strError); CPrintF(TRANSV("Warning, cannot get CRCs: %s\n"), strError);
} }
} }

@ -162,7 +162,7 @@ BOOL CNetworkMessage::EndOfMessage(void)
void CNetworkMessage::Read(void *pvBuffer, SLONG slSize) void CNetworkMessage::Read(void *pvBuffer, SLONG slSize)
{ {
if (nm_pubPointer+slSize > nm_pubMessage+nm_slSize) { if (nm_pubPointer+slSize > nm_pubMessage+nm_slSize) {
CPrintF(TRANS("Warning: Message over-reading!\n")); CPrintF(TRANSV("Warning: Message over-reading!\n"));
ASSERT(FALSE); ASSERT(FALSE);
memset(pvBuffer, 0, slSize); memset(pvBuffer, 0, slSize);
return; return;
@ -174,7 +174,7 @@ void CNetworkMessage::Read(void *pvBuffer, SLONG slSize)
void CNetworkMessage::Write(const void *pvBuffer, SLONG slSize) void CNetworkMessage::Write(const void *pvBuffer, SLONG slSize)
{ {
if (nm_pubPointer+slSize > nm_pubMessage+nm_slMaxSize) { if (nm_pubPointer+slSize > nm_pubMessage+nm_slMaxSize) {
CPrintF(TRANS("Warning: Message over-writing!\n")); CPrintF(TRANSV("Warning: Message over-writing!\n"));
ASSERT(FALSE); ASSERT(FALSE);
return; return;
} }
@ -223,7 +223,7 @@ CNetworkMessage &CNetworkMessage::operator<<(const CTString &str)
*nm_pubPointer++ = 0; *nm_pubPointer++ = 0;
nm_slSize++; nm_slSize++;
// report error and stop // report error and stop
CPrintF(TRANS("Warning: Message over-writing!\n")); CPrintF(TRANSV("Warning: Message over-writing!\n"));
ASSERT(FALSE); ASSERT(FALSE);
return *this; return *this;
} }

@ -125,7 +125,7 @@ void CPlayerSource::ChangeCharacter(CPlayerCharacter &pcNew)
// if the requested character has different guid // if the requested character has different guid
if (!(pls_pcCharacter==pcNew)) { if (!(pls_pcCharacter==pcNew)) {
// fail // fail
CPrintF(TRANS("Cannot update character - different GUID\n")); CPrintF(TRANSV("Cannot update character - different GUID\n"));
} }
// just request the change // just request the change

@ -293,7 +293,7 @@ void CServer::SendDisconnectMessage(INDEX iClient, const char *strExplanation, B
_pNetwork->SendToClientReliable(iClient, strmDisconnect); _pNetwork->SendToClientReliable(iClient, strmDisconnect);
} }
// report that it has gone away // report that it has gone away
CPrintF(TRANS("Client '%s' ordered to disconnect: %s\n"), CPrintF(TRANSV("Client '%s' ordered to disconnect: %s\n"),
(const char *) _cmiComm.Server_GetClientName(iClient), strExplanation); (const char *) _cmiComm.Server_GetClientName(iClient), strExplanation);
// if not disconnected before // if not disconnected before
if (sso.sso_iDisconnectedState==0) { if (sso.sso_iDisconnectedState==0) {
@ -302,7 +302,7 @@ void CServer::SendDisconnectMessage(INDEX iClient, const char *strExplanation, B
// if the client was already kicked before, but is still hanging here // if the client was already kicked before, but is still hanging here
} else { } else {
// force the disconnection // force the disconnection
CPrintF(TRANS("Forcing client '%s' to disconnect\n"), CPrintF(TRANSV("Forcing client '%s' to disconnect\n"),
(const char *) _cmiComm.Server_GetClientName(iClient)); (const char *) _cmiComm.Server_GetClientName(iClient));
sso.sso_iDisconnectedState = 2; sso.sso_iDisconnectedState = 2;
} }
@ -514,7 +514,7 @@ void CServer::ResendGameStreamBlocks(INDEX iClient, INDEX iSequence0, INDEX ctSe
{ {
extern INDEX net_bReportMiscErrors; extern INDEX net_bReportMiscErrors;
if (net_bReportMiscErrors) { if (net_bReportMiscErrors) {
CPrintF(TRANS("Server: Resending sequences %d-%d(%d) to '%s'..."), CPrintF(TRANSV("Server: Resending sequences %d-%d(%d) to '%s'..."),
iSequence0, iSequence0+ctSequences-1, ctSequences, (const char *) _cmiComm.Server_GetClientName(iClient)); iSequence0, iSequence0+ctSequences-1, ctSequences, (const char *) _cmiComm.Server_GetClientName(iClient));
} }
@ -556,7 +556,7 @@ void CServer::ResendGameStreamBlocks(INDEX iClient, INDEX iSequence0, INDEX ctSe
_pNetwork->SendToClient(iClient, nmPackedBlocks); _pNetwork->SendToClient(iClient, nmPackedBlocks);
extern INDEX net_bReportMiscErrors; extern INDEX net_bReportMiscErrors;
if (net_bReportMiscErrors) { if (net_bReportMiscErrors) {
CPrintF(TRANS(" sent %d-%d(%d - %db)\n"), CPrintF(TRANSV(" sent %d-%d(%d - %db)\n"),
iSequence0, iSequence, iSequence-iSequence0-1, nmPackedBlocks.nm_slSize); iSequence0, iSequence, iSequence-iSequence0-1, nmPackedBlocks.nm_slSize);
} }
} }
@ -710,7 +710,7 @@ void CServer::ServerLoop(void)
// try { // try {
// _cmiComm.Server_Accept_t(); // _cmiComm.Server_Accept_t();
// } catch (char *strError) { // } catch (char *strError) {
// CPrintF(TRANS("Accepting failed, no more clients can connect: %s\n"), strError); // CPrintF(TRANSV("Accepting failed, no more clients can connect: %s\n"), strError);
// } // }
// handle all incoming messages // handle all incoming messages
HandleAll(); HandleAll();
@ -862,7 +862,7 @@ void CServer::ConnectRemoteSessionState(INDEX iClient, CNetworkMessage &nm)
if (iMajor!=_SE_BUILD_MAJOR || iMinor!=_SE_BUILD_MINOR) { if (iMajor!=_SE_BUILD_MAJOR || iMinor!=_SE_BUILD_MINOR) {
// disconnect the client // disconnect the client
CTString strExplanation; CTString strExplanation;
strExplanation.PrintF(TRANS( strExplanation.PrintF(TRANSV(
"This server runs version %d.%d, your version is %d.%d.\n" "This server runs version %d.%d, your version is %d.%d.\n"
"Please visit http://www.croteam.com for information on version updating."), "Please visit http://www.croteam.com for information on version updating."),
_SE_BUILD_MAJOR, _SE_BUILD_MINOR, iMajor, iMinor); _SE_BUILD_MAJOR, _SE_BUILD_MINOR, iMajor, iMinor);
@ -992,7 +992,7 @@ void CServer::ConnectRemoteSessionState(INDEX iClient, CNetworkMessage &nm)
// send the stream to the remote session state // send the stream to the remote session state
_pNetwork->SendToClientReliable(iClient, strmInfo); _pNetwork->SendToClientReliable(iClient, strmInfo);
CPrintF(TRANS("Server: Sent initialization info to '%s' (%dk)\n"), CPrintF(TRANSV("Server: Sent initialization info to '%s' (%dk)\n"),
(const char*)_cmiComm.Server_GetClientName(iClient), slSize/1024); (const char*)_cmiComm.Server_GetClientName(iClient), slSize/1024);
// if failed // if failed
} catch (char *strError) { } catch (char *strError) {
@ -1000,7 +1000,7 @@ void CServer::ConnectRemoteSessionState(INDEX iClient, CNetworkMessage &nm)
sso.Deactivate(); sso.Deactivate();
// report error // report error
CPrintF(TRANS("Server: Cannot prepare connection data: %s\n"), strError); CPrintF(TRANSV("Server: Cannot prepare connection data: %s\n"), strError);
} }
} }
@ -1060,11 +1060,11 @@ void CServer::SendSessionStateData(INDEX iClient)
// send the stream to the remote session state // send the stream to the remote session state
_pNetwork->SendToClientReliable(iClient, strmInfo); _pNetwork->SendToClientReliable(iClient, strmInfo);
CPrintF(TRANS("Server: Sent connection data to '%s' (%dk->%dk->%dk)\n"), CPrintF(TRANSV("Server: Sent connection data to '%s' (%dk->%dk->%dk)\n"),
(const char*)_cmiComm.Server_GetClientName(iClient), (const char*)_cmiComm.Server_GetClientName(iClient),
slFullSize/1024, slDeltaSize/1024, slSize/1024); slFullSize/1024, slDeltaSize/1024, slSize/1024);
if (net_bDumpConnectionInfo) { if (net_bDumpConnectionInfo) {
CPrintF(TRANS("Server: Connection data dumped.\n")); CPrintF(TRANSV("Server: Connection data dumped.\n"));
} }
// if failed // if failed
@ -1073,7 +1073,7 @@ void CServer::SendSessionStateData(INDEX iClient)
sso.Deactivate(); sso.Deactivate();
// report error // report error
CPrintF(TRANS("Server: Cannot prepare connection data: %s\n"), strError); CPrintF(TRANSV("Server: Cannot prepare connection data: %s\n"), strError);
} }
} }
@ -1083,7 +1083,7 @@ void CServer::HandleAll()
// clear last accepted client info // clear last accepted client info
INDEX iClient = -1; INDEX iClient = -1;
/* if (_cmiComm.GetLastAccepted(iClient)) { /* if (_cmiComm.GetLastAccepted(iClient)) {
CPrintF(TRANS("Server: Accepted session connection by '%s'\n"), CPrintF(TRANSV("Server: Accepted session connection by '%s'\n"),
(const char *) _cmiComm.Server_GetClientName(iClient)); (const char *) _cmiComm.Server_GetClientName(iClient));
} }
*/ */
@ -1127,7 +1127,7 @@ void CServer::HandleAllForAClient(INDEX iClient)
// if the client is disconnected // if the client is disconnected
if (!_cmiComm.Server_IsClientUsed(iClient) || sso.sso_iDisconnectedState>1) { if (!_cmiComm.Server_IsClientUsed(iClient) || sso.sso_iDisconnectedState>1) {
CPrintF(TRANS("Server: Client '%s' disconnected.\n"), (const char *) _cmiComm.Server_GetClientName(iClient)); CPrintF(TRANSV("Server: Client '%s' disconnected.\n"), (const char *) _cmiComm.Server_GetClientName(iClient));
// clear it // clear it
_cmiComm.Server_ClearClient(iClient); _cmiComm.Server_ClearClient(iClient);
// free all that data that was allocated for the client // free all that data that was allocated for the client
@ -1151,7 +1151,7 @@ void CServer::HandleAllForAClient(INDEX iClient)
// if the client has confirmed disconnect in this loop // if the client has confirmed disconnect in this loop
if (!_cmiComm.Server_IsClientUsed(iClient) || sso.sso_iDisconnectedState>1) { if (!_cmiComm.Server_IsClientUsed(iClient) || sso.sso_iDisconnectedState>1) {
CPrintF(TRANS("Server: Client '%s' disconnected.\n"), (const char *) _cmiComm.Server_GetClientName(iClient)); CPrintF(TRANSV("Server: Client '%s' disconnected.\n"), (const char *) _cmiComm.Server_GetClientName(iClient));
// clear it // clear it
_cmiComm.Server_ClearClient(iClient); _cmiComm.Server_ClearClient(iClient);
// free all that data that was allocated for the client // free all that data that was allocated for the client
@ -1237,7 +1237,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
} break; } break;
// if remote server asks for data // if remote server asks for data
case MSG_REQ_STATEDELTA: { case MSG_REQ_STATEDELTA: {
CPrintF(TRANS("Sending statedelta response\n")); CPrintF(TRANSV("Sending statedelta response\n"));
SendSessionStateData(iClient); SendSessionStateData(iClient);
} break; } break;
// if player asks for registration // if player asks for registration
@ -1246,7 +1246,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
// check that someone doesn't add too many players // check that someone doesn't add too many players
if (iClient>0 && GetPlayersCountForClient(iClient)>=sso.sso_ctLocalPlayers) { if (iClient>0 && GetPlayersCountForClient(iClient)>=sso.sso_ctLocalPlayers) {
CTString strMessage; CTString strMessage;
strMessage.PrintF(TRANS("Protocol violation")); strMessage.PrintF(TRANSV("Protocol violation"));
SendDisconnectMessage(iClient, strMessage); SendDisconnectMessage(iClient, strMessage);
} }
@ -1269,7 +1269,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
if (CharacterNameIsUsed(pcCharacter)) { if (CharacterNameIsUsed(pcCharacter)) {
// send refusal message // send refusal message
CTString strMessage; CTString strMessage;
strMessage.PrintF(TRANS("Player character '%s' already exists in this session."), strMessage.PrintF(TRANSV("Player character '%s' already exists in this session."),
(const char *) pcCharacter.GetName()); (const char *) pcCharacter.GetName());
SendDisconnectMessage(iClient, strMessage); SendDisconnectMessage(iClient, strMessage);
@ -1500,7 +1500,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
if (iClient==0) { if (iClient==0) {
strFrom = TRANS("Server"); strFrom = TRANS("Server");
} else { } else {
strFrom.PrintF(TRANS("Client %d"), iClient); strFrom.PrintF(TRANSV("Client %d"), iClient);
} }
nmOut<<strFrom; nmOut<<strFrom;
} }
@ -1522,7 +1522,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
} break; } break;
// if a crc response is received // if a crc response is received
case MSG_REQ_CRCLIST: { case MSG_REQ_CRCLIST: {
CPrintF(TRANS("Sending CRC response\n")); CPrintF(TRANSV("Sending CRC response\n"));
// create CRC challenge // create CRC challenge
CTMemoryStream strmCRC; CTMemoryStream strmCRC;
strmCRC<<INDEX(MSG_REQ_CRCCHECK); strmCRC<<INDEX(MSG_REQ_CRCCHECK);
@ -1531,7 +1531,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
// send the stream to the remote session state // send the stream to the remote session state
_pNetwork->SendToClientReliable(iClient, strmCRC); _pNetwork->SendToClientReliable(iClient, strmCRC);
CPrintF(TRANS("Server: Sent CRC challenge to '%s' (%dk)\n"), CPrintF(TRANSV("Server: Sent CRC challenge to '%s' (%dk)\n"),
(const char*)_cmiComm.Server_GetClientName(iClient), slSize/1024); (const char*)_cmiComm.Server_GetClientName(iClient), slSize/1024);
} break; } break;
@ -1547,7 +1547,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
SendDisconnectMessage(iClient, TRANS("Wrong CRC check.")); SendDisconnectMessage(iClient, TRANS("Wrong CRC check."));
// if same // if same
} else { } else {
CPrintF(TRANS("Server: Client '%s', CRC check OK\n"), CPrintF(TRANSV("Server: Client '%s', CRC check OK\n"),
(const char*)_cmiComm.Server_GetClientName(iClient)); (const char*)_cmiComm.Server_GetClientName(iClient));
// use the piggybacked sequence number to initiate sending stream to it // use the piggybacked sequence number to initiate sending stream to it
CSessionSocket &sso = srv_assoSessions[iClient]; CSessionSocket &sso = srv_assoSessions[iClient];
@ -1566,17 +1566,17 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
if (net_strAdminPassword=="") { if (net_strAdminPassword=="") {
CNetworkMessage nmRes(MSG_ADMIN_RESPONSE); CNetworkMessage nmRes(MSG_ADMIN_RESPONSE);
nmRes<<CTString(TRANS("Remote administration not allowed on this server.\n")); nmRes<<CTString(TRANS("Remote administration not allowed on this server.\n"));
CPrintF(TRANS("Server: Client '%s', Tried to use remote administration.\n"), CPrintF(TRANSV("Server: Client '%s', Tried to use remote administration.\n"),
(const char*)_cmiComm.Server_GetClientName(iClient)); (const char*)_cmiComm.Server_GetClientName(iClient));
_pNetwork->SendToClientReliable(iClient, nmRes); _pNetwork->SendToClientReliable(iClient, nmRes);
} else if (net_strAdminPassword!=strPassword) { } else if (net_strAdminPassword!=strPassword) {
CPrintF(TRANS("Server: Client '%s', Wrong password for remote administration.\n"), CPrintF(TRANSV("Server: Client '%s', Wrong password for remote administration.\n"),
(const char*)_cmiComm.Server_GetClientName(iClient)); (const char*)_cmiComm.Server_GetClientName(iClient));
SendDisconnectMessage(iClient, TRANS("Wrong admin password. The attempt was logged.")); SendDisconnectMessage(iClient, TRANS("Wrong admin password. The attempt was logged."));
break; break;
} else { } else {
CPrintF(TRANS("Server: Client '%s', Admin cmd: %s\n"), CPrintF(TRANSV("Server: Client '%s', Admin cmd: %s\n"),
(const char*)_cmiComm.Server_GetClientName(iClient), (const char *) strCommand); (const char*)_cmiComm.Server_GetClientName(iClient), (const char *) strCommand);
con_bCapture = TRUE; con_bCapture = TRUE;

@ -350,7 +350,7 @@ void CSessionState::Start_AtClient_t(INDEX ctLocalPlayers) // throw char *
{CNetworkMessage nmKeepAlive(MSG_KEEPALIVE); {CNetworkMessage nmKeepAlive(MSG_KEEPALIVE);
_pNetwork->SendToServer(nmKeepAlive); } _pNetwork->SendToServer(nmKeepAlive); }
// send data request // send data request
CPrintF(TRANS("Sending statedelta request\n")); CPrintF(TRANSV("Sending statedelta request\n"));
CNetworkMessage nmRequestDelta(MSG_REQ_STATEDELTA); CNetworkMessage nmRequestDelta(MSG_REQ_STATEDELTA);
_pNetwork->SendToServerReliable(nmRequestDelta); _pNetwork->SendToServerReliable(nmRequestDelta);
@ -376,7 +376,7 @@ void CSessionState::Start_AtClient_t(INDEX ctLocalPlayers) // throw char *
{CNetworkMessage nmKeepAlive(MSG_KEEPALIVE); {CNetworkMessage nmKeepAlive(MSG_KEEPALIVE);
_pNetwork->SendToServer(nmKeepAlive); } _pNetwork->SendToServer(nmKeepAlive); }
CPrintF(TRANS("Sending CRC request\n")); CPrintF(TRANSV("Sending CRC request\n"));
// send data request // send data request
CNetworkMessage nmRequestCRC(MSG_REQ_CRCLIST); CNetworkMessage nmRequestCRC(MSG_REQ_CRCLIST);
_pNetwork->SendToServerReliable(nmRequestCRC); _pNetwork->SendToServerReliable(nmRequestCRC);
@ -1125,7 +1125,7 @@ void CSessionState::ProcessGameStream(void)
// if not successful // if not successful
} catch(char *strError) { } catch(char *strError) {
// report error // report error
CPrintF(TRANS("Error while playing demo: %s"), strError); CPrintF(TRANSV("Error while playing demo: %s"), strError);
_pfNetworkProfile.StopTimer(CNetworkProfile::PTI_SESSIONSTATE_PROCESSGAMESTREAM); _pfNetworkProfile.StopTimer(CNetworkProfile::PTI_SESSIONSTATE_PROCESSGAMESTREAM);
return; return;
} }
@ -1148,7 +1148,7 @@ void CSessionState::ProcessGameStream(void)
// if not successful // if not successful
} catch(char *strError) { } catch(char *strError) {
// report error // report error
CPrintF(TRANS("Error while recording demo: %s"), strError); CPrintF(TRANSV("Error while recording demo: %s"), strError);
// stop recording // stop recording
_pNetwork->StopDemoRec(); _pNetwork->StopDemoRec();
} }
@ -1209,7 +1209,7 @@ void CSessionState::ProcessGameStream(void)
extern INDEX net_bReportMiscErrors; extern INDEX net_bReportMiscErrors;
if (net_bReportMiscErrors) { if (net_bReportMiscErrors) {
CPrintF(TRANS("Session State: Missing sequences %d-%d(%d) timeout %g\n"), CPrintF(TRANSV("Session State: Missing sequences %d-%d(%d) timeout %g\n"),
iSequence, iSequence+ctSequences-1, ctSequences, ses_tmResendTimeout); iSequence, iSequence+ctSequences-1, ctSequences, ses_tmResendTimeout);
} }
@ -1342,7 +1342,7 @@ void CSessionState::ProcessGameStreamBlock(CNetworkMessage &nmMessage)
FatalError(TRANS("Cannot load Player class:\n%s"), strError); FatalError(TRANS("Cannot load Player class:\n%s"), strError);
} }
if (!_pNetwork->IsPlayerLocal(penNewPlayer)) { if (!_pNetwork->IsPlayerLocal(penNewPlayer)) {
CPrintF(TRANS("%s joined\n"), (const char *) penNewPlayer->GetPlayerName()); CPrintF(TRANSV("%s joined\n"), (const char *) penNewPlayer->GetPlayerName());
} }
} else { } else {
// attach entity to client data // attach entity to client data
@ -1351,7 +1351,7 @@ void CSessionState::ProcessGameStreamBlock(CNetworkMessage &nmMessage)
penNewPlayer->CharacterChanged(pcCharacter); penNewPlayer->CharacterChanged(pcCharacter);
if (!_pNetwork->IsPlayerLocal(penNewPlayer)) { if (!_pNetwork->IsPlayerLocal(penNewPlayer)) {
CPrintF(TRANS("%s rejoined\n"), (const char *) penNewPlayer->GetPlayerName()); CPrintF(TRANSV("%s rejoined\n"), (const char *) penNewPlayer->GetPlayerName());
} }
} }
@ -1366,7 +1366,7 @@ void CSessionState::ProcessGameStreamBlock(CNetworkMessage &nmMessage)
_pNetwork->ga_World.DeletePredictors(); _pNetwork->ga_World.DeletePredictors();
// inform entity of disconnnection // inform entity of disconnnection
CPrintF(TRANS("%s left\n"), (const char *) ses_apltPlayers[iPlayer].plt_penPlayerEntity->GetPlayerName()); CPrintF(TRANSV("%s left\n"), (const char *) ses_apltPlayers[iPlayer].plt_penPlayerEntity->GetPlayerName());
ses_apltPlayers[iPlayer].plt_penPlayerEntity->Disconnect(); ses_apltPlayers[iPlayer].plt_penPlayerEntity->Disconnect();
// deactivate the player // deactivate the player
ses_apltPlayers[iPlayer].Deactivate(); ses_apltPlayers[iPlayer].Deactivate();
@ -1442,9 +1442,9 @@ void CSessionState::ProcessGameStreamBlock(CNetworkMessage &nmMessage)
// report who paused // report who paused
if (ses_bPause!=bPauseBefore) { if (ses_bPause!=bPauseBefore) {
if (ses_bPause) { if (ses_bPause) {
CPrintF(TRANS("Paused by '%s'\n"), (const char *) strPauser); CPrintF(TRANSV("Paused by '%s'\n"), (const char *) strPauser);
} else { } else {
CPrintF(TRANS("Unpaused by '%s'\n"), (const char *) strPauser); CPrintF(TRANSV("Unpaused by '%s'\n"), (const char *) strPauser);
} }
} }
} }
@ -2013,7 +2013,7 @@ void CSessionState::SessionStateLoop(void)
PrintChatMessage(ulFrom, strFrom, strMessage); PrintChatMessage(ulFrom, strFrom, strMessage);
// otherwise // otherwise
} else { } else {
CPrintF(TRANS("Session state: Unexpected message during game: %s(%d)\n"), CPrintF(TRANSV("Session state: Unexpected message during game: %s(%d)\n"),
ErrorDescription(&MessageTypes, nmMessage.GetType()), nmMessage.GetType()); ErrorDescription(&MessageTypes, nmMessage.GetType()), nmMessage.GetType());
} }
} }
@ -2031,7 +2031,7 @@ void CSessionState::SessionStateLoop(void)
CTString strReason; CTString strReason;
nmReliable>>strReason; nmReliable>>strReason;
ses_strDisconnected = strReason; ses_strDisconnected = strReason;
CPrintF(TRANS("Disconnected: %s\n"), (const char *) strReason); CPrintF(TRANSV("Disconnected: %s\n"), (const char *) strReason);
// disconnect // disconnect
_cmiComm.Client_Close(); _cmiComm.Client_Close();
// if this is recon response // if this is recon response
@ -2042,7 +2042,7 @@ void CSessionState::SessionStateLoop(void)
CPrintF("%s", (const char *) ("|"+strResponse+"\n")); CPrintF("%s", (const char *) ("|"+strResponse+"\n"));
// otherwise // otherwise
} else { } else {
CPrintF(TRANS("Session state: Unexpected reliable message during game: %s(%d)\n"), CPrintF(TRANSV("Session state: Unexpected reliable message during game: %s(%d)\n"),
ErrorDescription(&MessageTypes, nmReliable.GetType()), nmReliable.GetType()); ErrorDescription(&MessageTypes, nmReliable.GetType()), nmReliable.GetType());
} }
} }
@ -2055,7 +2055,7 @@ void CSessionState::SessionStateLoop(void)
(_pTimer->GetHighPrecisionTimer()-ses_tvMessageReceived).GetSeconds()>net_tmDisconnectTimeout && (_pTimer->GetHighPrecisionTimer()-ses_tvMessageReceived).GetSeconds()>net_tmDisconnectTimeout &&
ses_strDisconnected=="") { ses_strDisconnected=="") {
ses_strDisconnected = TRANS("Connection timeout"); ses_strDisconnected = TRANS("Connection timeout");
CPrintF(TRANS("Disconnected: %s\n"), (const char*)ses_strDisconnected); CPrintF(TRANSV("Disconnected: %s\n"), (const char*)ses_strDisconnected);
} }
} }

@ -251,10 +251,10 @@ void CSoundDecoder::InitPlugins(void)
// if all successful, enable mpx playing // if all successful, enable mpx playing
_bOVEnabled = TRUE; _bOVEnabled = TRUE;
CPrintF(TRANS(" " VORBISLIB " shared library loaded, ogg playing enabled\n")); CPrintF(TRANSV(" " VORBISLIB " shared library loaded, ogg playing enabled\n"));
} catch (char *strError) { // !!! FIXME: should be const char* ? } catch (char *strError) { // !!! FIXME: should be const char* ?
CPrintF(TRANS("OGG playing disabled: %s\n"), strError); CPrintF(TRANSV("OGG playing disabled: %s\n"), strError);
} }
try { try {
@ -274,10 +274,10 @@ void CSoundDecoder::InitPlugins(void)
// if all successful, enable mpx playing // if all successful, enable mpx playing
_bAMP11Enabled = TRUE; _bAMP11Enabled = TRUE;
CPrintF(TRANS(" amp11lib shared library loaded, mpx playing enabled\n")); CPrintF(TRANSV(" amp11lib shared library loaded, mpx playing enabled\n"));
} catch (char *strError) { // !!! FIXME: should be const char* ? } catch (char *strError) { // !!! FIXME: should be const char* ?
CPrintF(TRANS("MPX playing disabled: %s\n"), strError); CPrintF(TRANSV("MPX playing disabled: %s\n"), strError);
} }
} }
@ -399,7 +399,7 @@ CSoundDecoder::CSoundDecoder(const CTFileName &fnm)
sdc_pogg->ogg_wfeFormat = form; sdc_pogg->ogg_wfeFormat = form;
} catch (char*strError) { } catch (char*strError) {
CPrintF(TRANS("Cannot open encoded audio '%s' for streaming: %s\n"), (const char*)fnm, (const char*)strError); CPrintF(TRANSV("Cannot open encoded audio '%s' for streaming: %s\n"), (const char*)fnm, (const char*)strError);
if (sdc_pogg->ogg_vfVorbisFile!=NULL) { if (sdc_pogg->ogg_vfVorbisFile!=NULL) {
delete sdc_pogg->ogg_vfVorbisFile; delete sdc_pogg->ogg_vfVorbisFile;
sdc_pogg->ogg_vfVorbisFile = NULL; sdc_pogg->ogg_vfVorbisFile = NULL;
@ -505,7 +505,7 @@ CSoundDecoder::CSoundDecoder(const CTFileName &fnm)
ThrowF_t(TRANS("cannot open mpx decoder")); ThrowF_t(TRANS("cannot open mpx decoder"));
} }
} catch (char*strError) { } catch (char*strError) {
CPrintF(TRANS("Cannot open mpx '%s' for streaming: %s\n"), (const char*)fnm, (const char*)strError); CPrintF(TRANSV("Cannot open mpx '%s' for streaming: %s\n"), (const char*)fnm, (const char*)strError);
if (iZipHandle!=0) { if (iZipHandle!=0) {
UNZIPClose(iZipHandle); UNZIPClose(iZipHandle);
} }

@ -189,7 +189,7 @@ static BOOL StartUp_SDLaudio( CSoundLibrary &sl, BOOL bReport=TRUE)
sl.sl_bUsingDirectSound = FALSE; sl.sl_bUsingDirectSound = FALSE;
sl.sl_bUsingEAX = FALSE; sl.sl_bUsingEAX = FALSE;
snd_iDevice = 0; snd_iDevice = 0;
if( bReport) CPrintF(TRANS("SDL audio initialization ...\n")); if( bReport) CPrintF(TRANSV("SDL audio initialization ...\n"));
ASSERT(!_bDedicatedServer); ASSERT(!_bDedicatedServer);
if (_bDedicatedServer) { if (_bDedicatedServer) {
@ -205,7 +205,7 @@ static BOOL StartUp_SDLaudio( CSoundLibrary &sl, BOOL bReport=TRUE)
else if (bps <= 16) else if (bps <= 16)
desired.format = AUDIO_S16LSB; desired.format = AUDIO_S16LSB;
else { else {
CPrintF(TRANS("Unsupported bits-per-sample: %d\n"), bps); CPrintF(TRANSV("Unsupported bits-per-sample: %d\n"), bps);
return FALSE; return FALSE;
} }
desired.freq = sl.sl_SwfeFormat.nSamplesPerSec; desired.freq = sl.sl_SwfeFormat.nSamplesPerSec;
@ -267,10 +267,10 @@ static BOOL StartUp_SDLaudio( CSoundLibrary &sl, BOOL bReport=TRUE)
sl.sl_slDecodeBufferSize = sl.sl_slMixerBufferSize * sl.sl_slDecodeBufferSize = sl.sl_slMixerBufferSize *
((44100+sl.sl_SwfeFormat.nSamplesPerSec-1)/sl.sl_SwfeFormat.nSamplesPerSec); ((44100+sl.sl_SwfeFormat.nSamplesPerSec-1)/sl.sl_SwfeFormat.nSamplesPerSec);
if( bReport) { if( bReport) {
CPrintF(TRANS(" parameters: %d Hz, %d bit, stereo, mix-ahead: %gs\n"), CPrintF(TRANSV(" parameters: %d Hz, %d bit, stereo, mix-ahead: %gs\n"),
sl.sl_SwfeFormat.nSamplesPerSec, sl.sl_SwfeFormat.wBitsPerSample, snd_tmMixAhead); sl.sl_SwfeFormat.nSamplesPerSec, sl.sl_SwfeFormat.wBitsPerSample, snd_tmMixAhead);
CPrintF(TRANS(" output buffers: %d x %d bytes\n"), 2, desired.size); CPrintF(TRANSV(" output buffers: %d x %d bytes\n"), 2, desired.size);
CPrintF(TRANS(" mpx decode: %d bytes\n"), sl.sl_slDecodeBufferSize); CPrintF(TRANSV(" mpx decode: %d bytes\n"), sl.sl_slDecodeBufferSize);
} }
// initialize mixing and decoding buffer // initialize mixing and decoding buffer
@ -688,7 +688,7 @@ static BOOL StartUp_dsound( CSoundLibrary &sl, BOOL bReport=TRUE)
// update window handle (just in case) // update window handle (just in case)
HRESULT (WINAPI *pDirectSoundCreate)(GUID FAR *lpGUID, LPDIRECTSOUND FAR *lplpDS, IUnknown FAR *pUnkOuter); HRESULT (WINAPI *pDirectSoundCreate)(GUID FAR *lpGUID, LPDIRECTSOUND FAR *lplpDS, IUnknown FAR *pUnkOuter);
if( bReport) CPrintF(TRANS("Direct Sound initialization ...\n")); if( bReport) CPrintF(TRANSV("Direct Sound initialization ...\n"));
ASSERT( _hInstDS==NULL); ASSERT( _hInstDS==NULL);
_hInstDS = LoadLibraryA( "dsound.dll"); _hInstDS = LoadLibraryA( "dsound.dll");
if( _hInstDS==NULL) { if( _hInstDS==NULL) {
@ -807,8 +807,8 @@ static BOOL StartUp_dsound( CSoundLibrary &sl, BOOL bReport=TRUE)
if( snd_iDevice>=0) strDevice.PrintF( TRANS("device %d"), snd_iDevice); if( snd_iDevice>=0) strDevice.PrintF( TRANS("device %d"), snd_iDevice);
CPrintF( TRANS(" %dHz, %dbit, %s, mix-ahead: %gs\n"), CPrintF( TRANS(" %dHz, %dbit, %s, mix-ahead: %gs\n"),
sl.sl_SwfeFormat.nSamplesPerSec, sl.sl_SwfeFormat.wBitsPerSample, strDevice, snd_tmMixAhead); sl.sl_SwfeFormat.nSamplesPerSec, sl.sl_SwfeFormat.wBitsPerSample, strDevice, snd_tmMixAhead);
CPrintF(TRANS(" mixer buffer size: %d KB\n"), sl.sl_slMixerBufferSize /1024); CPrintF(TRANSV(" mixer buffer size: %d KB\n"), sl.sl_slMixerBufferSize /1024);
CPrintF(TRANS(" decode buffer size: %d KB\n"), sl.sl_slDecodeBufferSize/1024); CPrintF(TRANSV(" decode buffer size: %d KB\n"), sl.sl_slDecodeBufferSize/1024);
// EAX? // EAX?
CTString strEAX = TRANS("Disabled"); CTString strEAX = TRANS("Disabled");
if( sl.sl_bUsingEAX) strEAX = TRANS("Enabled"); if( sl.sl_bUsingEAX) strEAX = TRANS("Enabled");
@ -827,7 +827,7 @@ static BOOL StartUp_waveout( CSoundLibrary &sl, BOOL bReport=TRUE)
// not using DirectSound (obviously) // not using DirectSound (obviously)
sl.sl_bUsingDirectSound = FALSE; sl.sl_bUsingDirectSound = FALSE;
sl.sl_bUsingEAX = FALSE; sl.sl_bUsingEAX = FALSE;
if( bReport) CPrintF(TRANS("WaveOut initialization ...\n")); if( bReport) CPrintF(TRANSV("WaveOut initialization ...\n"));
// set maximum total number of retries for device opening // set maximum total number of retries for device opening
INDEX ctMaxRetries = snd_iMaxOpenRetries; INDEX ctMaxRetries = snd_iMaxOpenRetries;
_ctChannelsOpened = 0; _ctChannelsOpened = 0;
@ -911,11 +911,11 @@ static BOOL StartUp_waveout( CSoundLibrary &sl, BOOL bReport=TRUE)
sl.sl_slDecodeBufferSize = sl.sl_slMixerBufferSize * sl.sl_slDecodeBufferSize = sl.sl_slMixerBufferSize *
((44100+sl.sl_SwfeFormat.nSamplesPerSec-1)/sl.sl_SwfeFormat.nSamplesPerSec); ((44100+sl.sl_SwfeFormat.nSamplesPerSec-1)/sl.sl_SwfeFormat.nSamplesPerSec);
if( bReport) { if( bReport) {
CPrintF(TRANS(" parameters: %d Hz, %d bit, stereo, mix-ahead: %gs\n"), CPrintF(TRANSV(" parameters: %d Hz, %d bit, stereo, mix-ahead: %gs\n"),
sl.sl_SwfeFormat.nSamplesPerSec, sl.sl_SwfeFormat.wBitsPerSample, snd_tmMixAhead); sl.sl_SwfeFormat.nSamplesPerSec, sl.sl_SwfeFormat.wBitsPerSample, snd_tmMixAhead);
CPrintF(TRANS(" output buffers: %d x %d bytes\n"), ctWOBuffers, WAVEOUTBLOCKSIZE), CPrintF(TRANSV(" output buffers: %d x %d bytes\n"), ctWOBuffers, WAVEOUTBLOCKSIZE),
CPrintF(TRANS(" mpx decode: %d bytes\n"), sl.sl_slDecodeBufferSize), CPrintF(TRANSV(" mpx decode: %d bytes\n"), sl.sl_slDecodeBufferSize),
CPrintF(TRANS(" extra sound channels taken: %d\n"), _ctChannelsOpened-1); CPrintF(TRANSV(" extra sound channels taken: %d\n"), _ctChannelsOpened-1);
} }
// initialise waveout sound buffers // initialise waveout sound buffers
@ -956,9 +956,9 @@ static void SetFormat_internal( CSoundLibrary &sl, CSoundLibrary::SoundFormat Es
// if none skip initialization // if none skip initialization
_fLastNormalizeValue = 1; _fLastNormalizeValue = 1;
if( bReport) CPrintF(TRANS("Setting sound format ...\n")); if( bReport) CPrintF(TRANSV("Setting sound format ...\n"));
if( sl.sl_EsfFormat == CSoundLibrary::SF_NONE) { if( sl.sl_EsfFormat == CSoundLibrary::SF_NONE) {
if( bReport) CPrintF(TRANS(" (no sound)\n")); if( bReport) CPrintF(TRANSV(" (no sound)\n"));
return; return;
} }
@ -1039,13 +1039,13 @@ void CSoundLibrary::Init(void)
// !!! FIXME : rcg12162001 This should probably be done everywhere, honestly. // !!! FIXME : rcg12162001 This should probably be done everywhere, honestly.
#ifdef PLATFORM_UNIX #ifdef PLATFORM_UNIX
if (_bDedicatedServer) { if (_bDedicatedServer) {
CPrintF(TRANS("Dedicated server; not initializing sound.\n")); CPrintF(TRANSV("Dedicated server; not initializing sound.\n"));
return; return;
} }
#endif #endif
// print header // print header
CPrintF(TRANS("Initializing sound...\n")); CPrintF(TRANSV("Initializing sound...\n"));
// initialize sound library and set no-sound format // initialize sound library and set no-sound format
SetFormat(SF_NONE); SetFormat(SF_NONE);
@ -1059,7 +1059,7 @@ void CSoundLibrary::Init(void)
#ifdef PLATFORM_WIN32 #ifdef PLATFORM_WIN32
// get number of devices // get number of devices
INDEX ctDevices = waveOutGetNumDevs(); INDEX ctDevices = waveOutGetNumDevs();
CPrintF(TRANS(" Detected devices: %d\n"), ctDevices); CPrintF(TRANSV(" Detected devices: %d\n"), ctDevices);
sl_ctWaveDevices = ctDevices; sl_ctWaveDevices = ctDevices;
// for each device // for each device
@ -1068,11 +1068,11 @@ void CSoundLibrary::Init(void)
WAVEOUTCAPS woc; WAVEOUTCAPS woc;
memset( &woc, 0, sizeof(woc)); memset( &woc, 0, sizeof(woc));
MMRESULT res = waveOutGetDevCaps(iDevice, &woc, sizeof(woc)); MMRESULT res = waveOutGetDevCaps(iDevice, &woc, sizeof(woc));
CPrintF(TRANS(" device %d: %s\n"), CPrintF(TRANSV(" device %d: %s\n"),
iDevice, woc.szPname); iDevice, woc.szPname);
CPrintF(TRANS(" ver: %d, id: %d.%d\n"), CPrintF(TRANSV(" ver: %d, id: %d.%d\n"),
woc.vDriverVersion, woc.wMid, woc.wPid); woc.vDriverVersion, woc.wMid, woc.wPid);
CPrintF(TRANS(" form: 0x%08x, ch: %d, support: 0x%08x\n"), CPrintF(TRANSV(" form: 0x%08x, ch: %d, support: 0x%08x\n"),
woc.dwFormats, woc.wChannels, woc.dwSupport); woc.dwFormats, woc.wChannels, woc.dwSupport);
} }
// done // done

@ -291,8 +291,8 @@ void CHashTable_TYPE::ReportEfficiency()
dAvg = dSum/ht_ctCompartments; // average number of full slots per compartement dAvg = dSum/ht_ctCompartments; // average number of full slots per compartement
dStDev = sqrt((dSum2-2*dSum*dAvg+ulCount*dAvg*dAvg)/(ulCount-1)); dStDev = sqrt((dSum2-2*dSum*dAvg+ulCount*dAvg*dAvg)/(ulCount-1));
CPrintF(TRANS("Hash table efficiency report:\n")); CPrintF(TRANSV("Hash table efficiency report:\n"));
CPrintF(TRANS(" Compartements: %ld, Slots per compartement: %ld, Full slots: %ld\n"),ht_ctCompartments,ht_ctSlotsPerComp,ulCount); CPrintF(TRANSV(" Compartements: %ld, Slots per compartement: %ld, Full slots: %ld\n"),ht_ctCompartments,ht_ctSlotsPerComp,ulCount);
CPrintF(TRANS(" Percentage of full slots: %5.2f%%, Average full slots per compartement: %5.2f \n"),dFullPercent*100,dAvg); CPrintF(TRANSV(" Percentage of full slots: %5.2f%%, Average full slots per compartement: %5.2f \n"),dFullPercent*100,dAvg);
CPrintF(TRANS(" Standard deviation is: %5.2f\n"),dStDev); CPrintF(TRANSV(" Standard deviation is: %5.2f\n"),dStDev);
} }

@ -158,7 +158,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("%s was -*blown away*- by an Air Elemental"), (const char *) strPlayerName); str.PrintF(TRANSV("%s was -*blown away*- by an Air Elemental"), (const char *) strPlayerName);
return str; return str;
} }
virtual const CTFileName &GetComputerMessageName(void) const { virtual const CTFileName &GetComputerMessageName(void) const {

@ -360,7 +360,7 @@ functions:
try { try {
m_aoLightAnimation.SetData_t(CTFILENAME("Animations\\BasicEffects.ani")); m_aoLightAnimation.SetData_t(CTFILENAME("Animations\\BasicEffects.ani"));
} catch (char *strError) { } catch (char *strError) {
WarningMessage(TRANS("Cannot load Animations\\BasicEffects.ani: %s"), strError); WarningMessage(TRANSV("Cannot load Animations\\BasicEffects.ani: %s"), strError);
} }
// play light animation // play light animation
if (m_aoLightAnimation.GetData()!=NULL) { if (m_aoLightAnimation.GetData()!=NULL) {

@ -76,7 +76,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("A Reptiloid killed %s"), (const char *) strPlayerName); str.PrintF(TRANSV("A Reptiloid killed %s"), (const char *) strPlayerName);
return str; return str;
} }
virtual const CTFileName &GetComputerMessageName(void) const { virtual const CTFileName &GetComputerMessageName(void) const {

@ -77,9 +77,9 @@ functions:
{ {
CTString str; CTString str;
if (eDeath.eLastDamage.dmtType==DMT_CLOSERANGE) { if (eDeath.eLastDamage.dmtType==DMT_CLOSERANGE) {
str.PrintF(TRANS("%s was ripped apart by a Kleer"), (const char *) strPlayerName); str.PrintF(TRANSV("%s was ripped apart by a Kleer"), (const char *) strPlayerName);
} else { } else {
str.PrintF(TRANS("%s was killed by a Kleer"), (const char *) strPlayerName); str.PrintF(TRANSV("%s was killed by a Kleer"), (const char *) strPlayerName);
} }
return str; return str;
} }

@ -89,7 +89,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("A Cannon killed %s"), (const char *) strPlayerName); str.PrintF(TRANSV("A Cannon killed %s"), (const char *) strPlayerName);
return str; return str;
} }

@ -81,7 +81,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("A Cannon killed %s"), (const char *) strPlayerName); str.PrintF(TRANSV("A Cannon killed %s"), (const char *) strPlayerName);
return str; return str;
} }

@ -61,7 +61,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("Chainsaw freak dismembered %s"), (const char *) strPlayerName); str.PrintF(TRANSV("Chainsaw freak dismembered %s"), (const char *) strPlayerName);
return str; return str;
} }

@ -903,7 +903,7 @@ BOOL SetPlayerAppearance_internal(CModelObject *pmo, const CTFileName &fnmAMC, C
// if anything failed // if anything failed
} catch (char *strError) { } catch (char *strError) {
// report error // report error
CPrintF(TRANS("Cannot load player model:\n%s (%d) : %s\n"), CPrintF(TRANSV("Cannot load player model:\n%s (%d) : %s\n"),
(const char*)_strFile, _ctLines, strError); (const char*)_strFile, _ctLines, strError);
return FALSE; return FALSE;
} }
@ -1334,7 +1334,7 @@ CEntity *FixupCausedToPlayer(CEntity *penThis, CEntity *penCaused, BOOL bWarning
} }
if (bWarning && (ent_bReportBrokenChains || GetSP()->sp_bQuickTest)) { if (bWarning && (ent_bReportBrokenChains || GetSP()->sp_bQuickTest)) {
CPrintF(TRANS("WARNING: Triggering chain broken, entity: %s-%s(%s)\n"), CPrintF(TRANSV("WARNING: Triggering chain broken, entity: %s-%s(%s)\n"),
(const char*)penThis->GetName(), (const char*)penThis->GetName(),
(const char*)penThis->GetDescription(), (const char*)penThis->GetDescription(),
(const char*)penThis->GetClass()->GetName()); (const char*)penThis->GetClass()->GetName());

@ -74,7 +74,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("A Demon executed %s"), (const char *) strPlayerName); str.PrintF(TRANSV("A Demon executed %s"), (const char *) strPlayerName);
return str; return str;
} }

@ -240,7 +240,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("Ugh Zan killed %s"), (const char *) strPlayerName); str.PrintF(TRANSV("Ugh Zan killed %s"), (const char *) strPlayerName);
return str; return str;
} }

@ -267,7 +267,7 @@ procedures:
/* /*
// tell the key bearer that the key was used // tell the key bearer that the key was used
CTString strMsg; CTString strMsg;
strMsg.PrintF(TRANS("%s used"), GetKeyName(m_kitKey)); strMsg.PrintF(TRANSV("%s used"), GetKeyName(m_kitKey));
PrintCenterMessage(this, ePass.penOther, strMsg, 3.0f, MSS_INFO); PrintCenterMessage(this, ePass.penOther, strMsg, 3.0f, MSS_INFO);
*/ */
// become automatic door // become automatic door

@ -273,7 +273,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("%s was killed by a Lava Golem"), (const char *) strPlayerName); str.PrintF(TRANSV("%s was killed by a Lava Golem"), (const char *) strPlayerName);
return str; return str;
} }
virtual const CTFileName &GetComputerMessageName(void) const { virtual const CTFileName &GetComputerMessageName(void) const {

@ -231,7 +231,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("%s killed %s"), (const char *) GetClass()->ec_pdecDLLClass->dec_strName, (const char *) strPlayerName); str.PrintF(TRANSV("%s killed %s"), (const char *) GetClass()->ec_pdecDLLClass->dec_strName, (const char *) strPlayerName);
return str; return str;
} }
@ -896,7 +896,7 @@ functions:
// if boss, clear boss // if boss, clear boss
if (m_bBoss) { if (m_bBoss) {
if (((CMusicHolder&)*m_penMainMusicHolder).m_penBoss != this) { if (((CMusicHolder&)*m_penMainMusicHolder).m_penBoss != this) {
CPrintF(TRANS("More than one boss active!\n")); CPrintF(TRANSV("More than one boss active!\n"));
((CMusicHolder&)*m_penMainMusicHolder).m_penBoss = NULL; ((CMusicHolder&)*m_penMainMusicHolder).m_penBoss = NULL;
} }
} }

@ -499,7 +499,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) { virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) {
CTString str; CTString str;
str.PrintF(TRANS("Exotech larva reduced %s to pulp."), (const char *) strPlayerName); str.PrintF(TRANSV("Exotech larva reduced %s to pulp."), (const char *) strPlayerName);
return str; return str;
} }

@ -77,9 +77,9 @@ functions:
{ {
CTString str; CTString str;
if (m_bInAir) { if (m_bInAir) {
str.PrintF(TRANS("A Gnaar bit %s to death"), (const char *) strPlayerName); str.PrintF(TRANSV("A Gnaar bit %s to death"), (const char *) strPlayerName);
} else { } else {
str.PrintF(TRANS("%s was beaten up by a Gnaar"), (const char *) strPlayerName); str.PrintF(TRANSV("%s was beaten up by a Gnaar"), (const char *) strPlayerName);
} }
return str; return str;
} }

@ -48,7 +48,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("%s was electrocuted by a fish"), (const char *) strPlayerName); str.PrintF(TRANSV("%s was electrocuted by a fish"), (const char *) strPlayerName);
return str; return str;
} }
virtual const CTFileName &GetComputerMessageName(void) const { virtual const CTFileName &GetComputerMessageName(void) const {

@ -47,7 +47,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("%s ate a marsh hopper"), (const char *) strPlayerName); str.PrintF(TRANSV("%s ate a marsh hopper"), (const char *) strPlayerName);
return str; return str;
} }
virtual const CTFileName &GetComputerMessageName(void) const { virtual const CTFileName &GetComputerMessageName(void) const {

@ -75,7 +75,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("A Grunt sent %s into the halls of Valhalla"), (const char *) strPlayerName); str.PrintF(TRANSV("A Grunt sent %s into the halls of Valhalla"), (const char *) strPlayerName);
return str; return str;
} }

@ -256,7 +256,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("A Grunt sent %s into the halls of Valhalla"), (const char *) strPlayerName); str.PrintF(TRANSV("A Grunt sent %s into the halls of Valhalla"), (const char *) strPlayerName);
return str; return str;
} }

@ -65,7 +65,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("Guffy gunned %s down"), (const char *) strPlayerName); str.PrintF(TRANSV("Guffy gunned %s down"), (const char *) strPlayerName);
return str; return str;
} }

@ -88,14 +88,14 @@ functions:
CTString str; CTString str;
if (eDeath.eLastDamage.dmtType==DMT_EXPLOSION) { if (eDeath.eLastDamage.dmtType==DMT_EXPLOSION) {
if (m_hdtType==HDT_BOMBERMAN) { if (m_hdtType==HDT_BOMBERMAN) {
str.PrintF(TRANS("%s was bombed by a Bomberman"), (const char *) strPlayerName); str.PrintF(TRANSV("%s was bombed by a Bomberman"), (const char *) strPlayerName);
} else { } else {
str.PrintF(TRANS("%s fell victim of a Kamikaze"), (const char *) strPlayerName); str.PrintF(TRANSV("%s fell victim of a Kamikaze"), (const char *) strPlayerName);
} }
} else if (m_hdtType==HDT_ROCKETMAN) { } else if (m_hdtType==HDT_ROCKETMAN) {
str.PrintF(TRANS("A Rocketeer tickled %s to death"), (const char *) strPlayerName); str.PrintF(TRANSV("A Rocketeer tickled %s to death"), (const char *) strPlayerName);
} else if (m_hdtType==HDT_FIRECRACKER) { } else if (m_hdtType==HDT_FIRECRACKER) {
str.PrintF(TRANS("A Firecracker tickled %s to death"), (const char *) strPlayerName); str.PrintF(TRANSV("A Firecracker tickled %s to death"), (const char *) strPlayerName);
} }
return str; return str;
} }

@ -928,41 +928,41 @@ void PrintPlayerDeathMessage(CPlayer *ppl, const EDeath &eDeath)
CTString strKillerName = ((CPlayer*)penKiller)->GetPlayerName(); CTString strKillerName = ((CPlayer*)penKiller)->GetPlayerName();
if(eDeath.eLastDamage.dmtType==DMT_TELEPORT) { if(eDeath.eLastDamage.dmtType==DMT_TELEPORT) {
CPrintF(TRANS("%s telefragged %s\n"), (const char *) strKillerName, (const char *) strMyName); CPrintF(TRANSV("%s telefragged %s\n"), (const char *) strKillerName, (const char *) strMyName);
} else if(eDeath.eLastDamage.dmtType==DMT_CLOSERANGE) { } else if(eDeath.eLastDamage.dmtType==DMT_CLOSERANGE) {
CPrintF(TRANS("%s cut %s into pieces\n"), (const char *) strKillerName, (const char *) strMyName); CPrintF(TRANSV("%s cut %s into pieces\n"), (const char *) strKillerName, (const char *) strMyName);
} else if(eDeath.eLastDamage.dmtType==DMT_CHAINSAW) { } else if(eDeath.eLastDamage.dmtType==DMT_CHAINSAW) {
CPrintF(TRANS("%s cut %s into pieces\n"), (const char *) strKillerName, (const char *) strMyName); CPrintF(TRANSV("%s cut %s into pieces\n"), (const char *) strKillerName, (const char *) strMyName);
} else if(eDeath.eLastDamage.dmtType==DMT_BULLET) { } else if(eDeath.eLastDamage.dmtType==DMT_BULLET) {
CPrintF(TRANS("%s poured lead into %s\n"), (const char *) strKillerName, (const char *) strMyName); CPrintF(TRANSV("%s poured lead into %s\n"), (const char *) strKillerName, (const char *) strMyName);
} else if(eDeath.eLastDamage.dmtType==DMT_PROJECTILE || eDeath.eLastDamage.dmtType==DMT_EXPLOSION) { } else if(eDeath.eLastDamage.dmtType==DMT_PROJECTILE || eDeath.eLastDamage.dmtType==DMT_EXPLOSION) {
CPrintF(TRANS("%s blew %s away\n"), (const char *) strKillerName, (const char *) strMyName); CPrintF(TRANSV("%s blew %s away\n"), (const char *) strKillerName, (const char *) strMyName);
} else if(eDeath.eLastDamage.dmtType==DMT_CANNONBALL) { } else if(eDeath.eLastDamage.dmtType==DMT_CANNONBALL) {
CPrintF(TRANS("%s smashed %s with a cannon\n"), (const char *) strKillerName, (const char *) strMyName); CPrintF(TRANSV("%s smashed %s with a cannon\n"), (const char *) strKillerName, (const char *) strMyName);
} else if(eDeath.eLastDamage.dmtType==DMT_CANNONBALL_EXPLOSION) { } else if(eDeath.eLastDamage.dmtType==DMT_CANNONBALL_EXPLOSION) {
CPrintF(TRANS("%s nuked %s\n"), (const char *) strKillerName, (const char *) strMyName); CPrintF(TRANSV("%s nuked %s\n"), (const char *) strKillerName, (const char *) strMyName);
} else { } else {
CPrintF(TRANS("%s killed %s\n"), (const char *) strKillerName, (const char *) strMyName); CPrintF(TRANSV("%s killed %s\n"), (const char *) strKillerName, (const char *) strMyName);
} }
} else { } else {
// make message from damage type // make message from damage type
switch(eDeath.eLastDamage.dmtType) { switch(eDeath.eLastDamage.dmtType) {
case DMT_DROWNING: CPrintF(TRANS("%s drowned\n"), (const char *) strMyName); break; case DMT_DROWNING: CPrintF(TRANSV("%s drowned\n"), (const char *) strMyName); break;
case DMT_BURNING: CPrintF(TRANS("%s burst into flames\n"), (const char *) strMyName); break; case DMT_BURNING: CPrintF(TRANSV("%s burst into flames\n"), (const char *) strMyName); break;
case DMT_SPIKESTAB: CPrintF(TRANS("%s fell into a spike-hole\n"), (const char *) strMyName); break; case DMT_SPIKESTAB: CPrintF(TRANSV("%s fell into a spike-hole\n"), (const char *) strMyName); break;
case DMT_FREEZING: CPrintF(TRANS("%s has frozen\n"), (const char *) strMyName); break; case DMT_FREEZING: CPrintF(TRANSV("%s has frozen\n"), (const char *) strMyName); break;
case DMT_ACID: CPrintF(TRANS("%s dissolved\n"), (const char *) strMyName); break; case DMT_ACID: CPrintF(TRANSV("%s dissolved\n"), (const char *) strMyName); break;
case DMT_PROJECTILE: case DMT_PROJECTILE:
case DMT_EXPLOSION: case DMT_EXPLOSION:
CPrintF(TRANS("%s blew himself away\n"), (const char *) strMyName); break; CPrintF(TRANSV("%s blew himself away\n"), (const char *) strMyName); break;
default: CPrintF(TRANS("%s has committed suicide\n"), (const char *) strMyName); default: CPrintF(TRANSV("%s has committed suicide\n"), (const char *) strMyName);
} }
} }
// if killed by an enemy // if killed by an enemy
} else if (IsDerivedFromClass(penKiller, "Enemy Base")) { } else if (IsDerivedFromClass(penKiller, "Enemy Base")) {
// check for telefrag first // check for telefrag first
if(eDeath.eLastDamage.dmtType==DMT_TELEPORT) { if(eDeath.eLastDamage.dmtType==DMT_TELEPORT) {
CPrintF(TRANS("%s was telefragged\n"), (const char *) strMyName); CPrintF(TRANSV("%s was telefragged\n"), (const char *) strMyName);
return; return;
} }
// describe how this enemy killed player // describe how this enemy killed player
@ -972,17 +972,17 @@ void PrintPlayerDeathMessage(CPlayer *ppl, const EDeath &eDeath)
} else { } else {
// make message from damage type // make message from damage type
switch(eDeath.eLastDamage.dmtType) { switch(eDeath.eLastDamage.dmtType) {
case DMT_SPIKESTAB: CPrintF(TRANS("%s was pierced\n"), (const char *) strMyName); break; case DMT_SPIKESTAB: CPrintF(TRANSV("%s was pierced\n"), (const char *) strMyName); break;
case DMT_BRUSH: CPrintF(TRANS("%s was squashed\n"), (const char *) strMyName); break; case DMT_BRUSH: CPrintF(TRANSV("%s was squashed\n"), (const char *) strMyName); break;
case DMT_ABYSS: CPrintF(TRANS("%s went over the edge\n"), (const char *) strMyName); break; case DMT_ABYSS: CPrintF(TRANSV("%s went over the edge\n"), (const char *) strMyName); break;
case DMT_IMPACT: CPrintF(TRANS("%s swashed\n"), (const char *) strMyName); break; case DMT_IMPACT: CPrintF(TRANSV("%s swashed\n"), (const char *) strMyName); break;
case DMT_HEAT: CPrintF(TRANS("%s stood in the sun for too long\n"), (const char *) strMyName); break; case DMT_HEAT: CPrintF(TRANSV("%s stood in the sun for too long\n"), (const char *) strMyName); break;
default: CPrintF(TRANS("%s passed away\n"), (const char *) strMyName); default: CPrintF(TRANSV("%s passed away\n"), (const char *) strMyName);
} }
} }
// if no entity pointer (shouldn't happen) // if no entity pointer (shouldn't happen)
} else { } else {
CPrintF(TRANS("%s is missing in action\n"), (const char *) strMyName); CPrintF(TRANSV("%s is missing in action\n"), (const char *) strMyName);
} }
} }
@ -2459,7 +2459,7 @@ functions:
pdp->SetTextScaling( fScale); pdp->SetTextScaling( fScale);
pdp->SetTextAspect( 1.0f); pdp->SetTextAspect( 1.0f);
CTString strMsg; CTString strMsg;
strMsg.PrintF(TRANS("%s connected"), (const char *) GetPlayerName()); strMsg.PrintF(TRANSV("%s connected"), (const char *) GetPlayerName());
pdp->PutTextCXY( strMsg, pixDPWidth*0.5f, pixDPHeight*0.5f, SE_COL_BLUE_NEUTRAL_LT|CT_OPAQUE); pdp->PutTextCXY( strMsg, pixDPWidth*0.5f, pixDPHeight*0.5f, SE_COL_BLUE_NEUTRAL_LT|CT_OPAQUE);
} }
} }
@ -3373,7 +3373,7 @@ functions:
ItemPicked(strKey, 0); ItemPicked(strKey, 0);
// if in cooperative // if in cooperative
if (GetSP()->sp_bCooperative && !GetSP()->sp_bSinglePlayer) { if (GetSP()->sp_bCooperative && !GetSP()->sp_bSinglePlayer) {
CPrintF(TRANS("^cFFFFFF%s - %s^r\n"), (const char *) GetPlayerName(), (const char *) strKey); CPrintF(TRANSV("^cFFFFFF%s - %s^r\n"), (const char *) GetPlayerName(), (const char *) strKey);
} }
return TRUE; return TRUE;
} }
@ -3772,14 +3772,14 @@ functions:
// if the name has changed // if the name has changed
if (pcOrg.GetName()!=pcNew.GetName()) { if (pcOrg.GetName()!=pcNew.GetName()) {
// report that // report that
CPrintF(TRANS("%s is now known as %s\n"), CPrintF(TRANSV("%s is now known as %s\n"),
(const char *) pcOrg.GetNameForPrinting(), (const char *) pcNew.GetNameForPrinting()); (const char *) pcOrg.GetNameForPrinting(), (const char *) pcNew.GetNameForPrinting());
} }
// if the team has changed // if the team has changed
if (pcOrg.GetTeam()!=pcNew.GetTeam()) { if (pcOrg.GetTeam()!=pcNew.GetTeam()) {
// report that // report that
CPrintF(TRANS("%s switched to team %s\n"), CPrintF(TRANSV("%s switched to team %s\n"),
(const char *) pcNew.GetNameForPrinting(), (const char *) pcNew.GetTeamForPrinting()); (const char *) pcNew.GetNameForPrinting(), (const char *) pcNew.GetTeamForPrinting());
} }
@ -3794,12 +3794,12 @@ functions:
if (bSuccess) { if (bSuccess) {
ParseGender(strNewLook); ParseGender(strNewLook);
// report that // report that
CPrintF(TRANS("%s now appears as %s\n"), CPrintF(TRANSV("%s now appears as %s\n"),
(const char *) pcNew.GetNameForPrinting(), (const char *) strNewLook); (const char *) pcNew.GetNameForPrinting(), (const char *) strNewLook);
// if failed // if failed
} else { } else {
// report that // report that
CPrintF(TRANS("Cannot change appearance for %s: setting '%s' is unavailable\n"), CPrintF(TRANSV("Cannot change appearance for %s: setting '%s' is unavailable\n"),
(const char *) pcNew.GetNameForPrinting(), (const char*)ppsNew->GetModelFilename()); (const char *) pcNew.GetNameForPrinting(), (const char*)ppsNew->GetModelFilename());
} }
// attach weapon to new appearance // attach weapon to new appearance
@ -4433,21 +4433,21 @@ functions:
} }
// initiate respawn // initiate respawn
CPrintF(TRANS("%s is riding the gun again\n"), (const char *) GetPlayerName()); CPrintF(TRANSV("%s is riding the gun again\n"), (const char *) GetPlayerName());
SendEvent(EEnd()); SendEvent(EEnd());
// report number of credits left // report number of credits left
if (GetSP()->sp_ctCredits>0) { if (GetSP()->sp_ctCredits>0) {
if (GetSP()->sp_ctCreditsLeft==0) { if (GetSP()->sp_ctCreditsLeft==0) {
CPrintF(TRANS(" no more credits left!\n")); CPrintF(TRANSV(" no more credits left!\n"));
} else { } else {
CPrintF(TRANS(" %d credits left\n"), GetSP()->sp_ctCreditsLeft); CPrintF(TRANSV(" %d credits left\n"), GetSP()->sp_ctCreditsLeft);
} }
} }
// if no more credits left // if no more credits left
} else { } else {
// report that you cannot respawn // report that you cannot respawn
CPrintF(TRANS("%s rests in peace - out of credits\n"), (const char *) GetPlayerName()); CPrintF(TRANSV("%s rests in peace - out of credits\n"), (const char *) GetPlayerName());
} }
} }
} }
@ -5352,7 +5352,7 @@ functions:
// record stats for this level and add to global table // record stats for this level and add to global table
CTString strStats; CTString strStats;
strStats.PrintF(TRANS("%s\n Time: %s\n Score: %9d\n Kills: %03d/%03d\n Secrets: %02d/%02d\n"), strStats.PrintF(TRANSV("%s\n Time: %s\n Score: %9d\n Kills: %03d/%03d\n Secrets: %02d/%02d\n"),
TranslateConst(en_pwoWorld->GetName(), 0), (const char *) TimeToString(tmLevelTime), TranslateConst(en_pwoWorld->GetName(), 0), (const char *) TimeToString(tmLevelTime),
m_psLevelStats.ps_iScore, m_psLevelStats.ps_iScore,
m_psLevelStats.ps_iKills, m_psLevelTotal.ps_iKills, m_psLevelStats.ps_iKills, m_psLevelTotal.ps_iKills,
@ -5638,11 +5638,11 @@ procedures:
// if killed by a player // if killed by a player
if (pplKillerPlayer!=NULL) { if (pplKillerPlayer!=NULL) {
// print how much that player gained // print how much that player gained
CPrintF(TRANS(" %s: +%d points\n"), (const char *) pplKillerPlayer->GetPlayerName(), m_iMana); CPrintF(TRANSV(" %s: +%d points\n"), (const char *) pplKillerPlayer->GetPlayerName(), m_iMana);
// if it was a suicide, or an accident // if it was a suicide, or an accident
} else { } else {
// print how much you lost // print how much you lost
CPrintF(TRANS(" %s: -%d points\n"), (const char *) GetPlayerName(), m_iMana); CPrintF(TRANSV(" %s: -%d points\n"), (const char *) GetPlayerName(), m_iMana);
} }
} }
@ -6736,7 +6736,7 @@ procedures:
// if any found // if any found
if (penNextPlayer!=NULL) { if (penNextPlayer!=NULL) {
// transfer keys to that player // transfer keys to that player
CPrintF(TRANS("%s leaving, all keys transfered to %s\n"), CPrintF(TRANSV("%s leaving, all keys transfered to %s\n"),
(const char*)m_strName, (const char*)penNextPlayer->GetPlayerName()); (const char*)m_strName, (const char*)penNextPlayer->GetPlayerName());
penNextPlayer->m_ulKeys |= m_ulKeys; penNextPlayer->m_ulKeys |= m_ulKeys;
} }

@ -3004,7 +3004,7 @@ functions:
strMessage.DeleteChar(iLen-1); strMessage.DeleteChar(iLen-1);
}; };
if( iAmmoTypes>4 ) { if( iAmmoTypes>4 ) {
strMessage.PrintF(TRANS("Ammo pack")); strMessage.PrintF(TRANSV("Ammo pack"));
}; };
((CPlayer&)*m_penPlayer).ItemPicked(strMessage, 0); ((CPlayer&)*m_penPlayer).ItemPicked(strMessage, 0);

@ -91,9 +91,9 @@ functions:
{ {
CTString str; CTString str;
if (eDeath.eLastDamage.dmtType==DMT_CLOSERANGE) { if (eDeath.eLastDamage.dmtType==DMT_CLOSERANGE) {
str.PrintF(TRANS("%s was stabbed by an Arachnoid"), (const char *) strPlayerName); str.PrintF(TRANSV("%s was stabbed by an Arachnoid"), (const char *) strPlayerName);
} else { } else {
str.PrintF(TRANS("An Arachnoid poured lead into %s"), (const char *) strPlayerName); str.PrintF(TRANSV("An Arachnoid poured lead into %s"), (const char *) strPlayerName);
} }
return str; return str;
} }

@ -266,7 +266,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("The Summoner unsummoned %s"), (const char *) strPlayerName); str.PrintF(TRANSV("The Summoner unsummoned %s"), (const char *) strPlayerName);
return str; return str;
} }

@ -190,7 +190,7 @@ procedures:
call SendEventToTargets(); call SendEventToTargets();
} else if (m_bTellCount) { } else if (m_bTellCount) {
CTString strRemaining; CTString strRemaining;
strRemaining.PrintF(TRANS("%d more to go..."), m_iCountTmp); strRemaining.PrintF(TRANSV("%d more to go..."), m_iCountTmp);
PrintCenterMessage(this, m_penCaused, strRemaining, 3.0f, MSS_INFO); PrintCenterMessage(this, m_penCaused, strRemaining, 3.0f, MSS_INFO);
} }
} }

@ -87,7 +87,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("A Biomech blew %s away"), (const char *) strPlayerName); str.PrintF(TRANSV("A Biomech blew %s away"), (const char *) strPlayerName);
return str; return str;
} }

@ -57,7 +57,7 @@ functions:
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
{ {
CTString str; CTString str;
str.PrintF(TRANS("Sirian werebull sent %s flying"), (const char *) strPlayerName); str.PrintF(TRANSV("Sirian werebull sent %s flying"), (const char *) strPlayerName);
return str; return str;
} }

@ -64,9 +64,9 @@ functions:
{ {
CTString str; CTString str;
if (eDeath.eLastDamage.dmtType==DMT_CLOSERANGE) { if (eDeath.eLastDamage.dmtType==DMT_CLOSERANGE) {
str.PrintF(TRANS("%s was beaten by a Scythian Harpy"), (const char *) strPlayerName); str.PrintF(TRANSV("%s was beaten by a Scythian Harpy"), (const char *) strPlayerName);
} else { } else {
str.PrintF(TRANS("A Scythian Harpy got %s spellbound"), (const char *) strPlayerName); str.PrintF(TRANSV("A Scythian Harpy got %s spellbound"), (const char *) strPlayerName);
} }
return str; return str;
} }

@ -570,7 +570,7 @@ void PrintTitle(CDrawPort *pdp)
{ {
SetFont2(pdp); SetFont2(pdp);
CTString strTitle; CTString strTitle;
strTitle.PrintF(TRANS("NETRICSA v2.01 - personal version for: %s"), strTitle.PrintF(TRANSV("NETRICSA v2.01 - personal version for: %s"),
(const char *) _ppenPlayer->GetPlayerName()); (const char *) _ppenPlayer->GetPlayerName());
pdp->PutText( strTitle, _pixMarginI*3, _pixMarginJ-2*_fScaling2+1, _colMedium); pdp->PutText( strTitle, _pixMarginI*3, _pixMarginJ-2*_fScaling2+1, _colMedium);
} }

@ -1060,7 +1060,7 @@ void CGame::InitInternal( void)
try { try {
Load_t(); Load_t();
} catch (char *strError) { } catch (char *strError) {
CPrintF(TRANS("Cannot load game settings:\n%s\n Using defaults\n"), strError); CPrintF(TRANSV("Cannot load game settings:\n%s\n Using defaults\n"), strError);
} }
CON_DiscardLastLineTimes(); CON_DiscardLastLineTimes();
@ -1154,7 +1154,7 @@ BOOL CGame::NewGame(const CTString &strSessionName, const CTFileName &fnWorld,
// stop network provider // stop network provider
_pNetwork->StopProvider(); _pNetwork->StopProvider();
// and display error // and display error
CPrintF(TRANS("Cannot start game:\n%s\n"), strError); CPrintF(TRANSV("Cannot start game:\n%s\n"), strError);
return FALSE; return FALSE;
} }
@ -1200,7 +1200,7 @@ BOOL CGame::JoinGame(const CNetworkSession &session)
// stop network provider // stop network provider
_pNetwork->StopProvider(); _pNetwork->StopProvider();
// and display error // and display error
CPrintF(TRANS("Cannot join game:\n%s\n"), strError); CPrintF(TRANSV("Cannot join game:\n%s\n"), strError);
return FALSE; return FALSE;
} }
@ -1232,12 +1232,12 @@ BOOL CGame::LoadGame(const CTFileName &fnGame)
// start the new session // start the new session
try { try {
_pNetwork->Load_t( fnGame); _pNetwork->Load_t( fnGame);
CPrintF(TRANS("Loaded game: %s\n"), (const char *) fnGame); CPrintF(TRANSV("Loaded game: %s\n"), (const char *) fnGame);
} catch (char *strError) { } catch (char *strError) {
// stop network provider // stop network provider
_pNetwork->StopProvider(); _pNetwork->StopProvider();
// and display error // and display error
CPrintF(TRANS("Cannot load game: %s\n"), strError); CPrintF(TRANSV("Cannot load game: %s\n"), strError);
return FALSE; return FALSE;
} }
@ -1282,12 +1282,12 @@ BOOL CGame::StartDemoPlay(const CTFileName &fnDemo)
// start the new session // start the new session
try { try {
_pNetwork->StartDemoPlay_t( fnDemo); _pNetwork->StartDemoPlay_t( fnDemo);
CPrintF(TRANS("Started playing demo: %s\n"), (const char *) fnDemo); CPrintF(TRANSV("Started playing demo: %s\n"), (const char *) fnDemo);
} catch (char *strError) { } catch (char *strError) {
// stop network provider // stop network provider
_pNetwork->StopProvider(); _pNetwork->StopProvider();
// and display error // and display error
CPrintF(TRANS("Cannot play demo: %s\n"), strError); CPrintF(TRANSV("Cannot play demo: %s\n"), strError);
gm_bFirstLoading = FALSE; gm_bFirstLoading = FALSE;
return FALSE; return FALSE;
} }
@ -1326,13 +1326,13 @@ BOOL CGame::StartDemoRec(const CTFileName &fnDemo)
// save demo recording // save demo recording
try { try {
_pNetwork->StartDemoRec_t( fnDemo); _pNetwork->StartDemoRec_t( fnDemo);
CPrintF(TRANS("Started recording demo: %s\n"), (const char *) fnDemo); CPrintF(TRANSV("Started recording demo: %s\n"), (const char *) fnDemo);
// save a thumbnail // save a thumbnail
SaveThumbnail(fnDemo.NoExt()+"Tbn.tex"); SaveThumbnail(fnDemo.NoExt()+"Tbn.tex");
return TRUE; return TRUE;
} catch (char *strError) { } catch (char *strError) {
// and display error // and display error
CPrintF(TRANS("Cannot start recording: %s\n"), strError); CPrintF(TRANSV("Cannot start recording: %s\n"), strError);
return FALSE; return FALSE;
} }
} }
@ -1344,7 +1344,7 @@ void CGame::StopDemoRec(void)
if (!gm_bGameOn) return; if (!gm_bGameOn) return;
_pNetwork->StopDemoRec(); _pNetwork->StopDemoRec();
CPrintF(TRANS("Finished recording.\n")); CPrintF(TRANSV("Finished recording.\n"));
} }
BOOL CGame::SaveGame(const CTFileName &fnGame) BOOL CGame::SaveGame(const CTFileName &fnGame)
@ -1354,7 +1354,7 @@ BOOL CGame::SaveGame(const CTFileName &fnGame)
INDEX ctLivePlayers = GetLivePlayersCount(); INDEX ctLivePlayers = GetLivePlayersCount();
if (ctPlayers>0 && ctLivePlayers<=0) { if (ctPlayers>0 && ctLivePlayers<=0) {
// display error // display error
CPrintF(TRANS("Won't save game when dead!\n")); CPrintF(TRANSV("Won't save game when dead!\n"));
// do not save // do not save
return FALSE; return FALSE;
} }
@ -1362,12 +1362,12 @@ BOOL CGame::SaveGame(const CTFileName &fnGame)
// save new session // save new session
try { try {
_pNetwork->Save_t( fnGame); _pNetwork->Save_t( fnGame);
CPrintF(TRANS("Saved game: %s\n"), (const char *) fnGame); CPrintF(TRANSV("Saved game: %s\n"), (const char *) fnGame);
SaveThumbnail(fnGame.NoExt()+"Tbn.tex"); SaveThumbnail(fnGame.NoExt()+"Tbn.tex");
return TRUE; return TRUE;
} catch (char *strError) { } catch (char *strError) {
// and display error // and display error
CPrintF(TRANS("Cannot save game: %s\n"), (const char *) strError); CPrintF(TRANSV("Cannot save game: %s\n"), (const char *) strError);
return FALSE; return FALSE;
} }
} }
@ -1760,7 +1760,7 @@ BOOL CGame::AddPlayers(void)
} }
} }
} catch (char *strError) { } catch (char *strError) {
CPrintF(TRANS("Cannot add player:\n%s\n"), strError); CPrintF(TRANSV("Cannot add player:\n%s\n"), strError);
return FALSE; return FALSE;
} }
@ -2292,7 +2292,7 @@ void CGame::GameRedrawView( CDrawPort *pdpDrawPort, ULONG ulFlags)
// print pause indicators // print pause indicators
CTString strIndicator; CTString strIndicator;
if (_pNetwork->IsDisconnected()) { if (_pNetwork->IsDisconnected()) {
strIndicator.PrintF(TRANS("Disconnected: %s\nPress F9 to reconnect"), (const char *)_pNetwork->WhyDisconnected()); strIndicator.PrintF(TRANSV("Disconnected: %s\nPress F9 to reconnect"), (const char *)_pNetwork->WhyDisconnected());
} else if (_pNetwork->IsWaitingForPlayers()) { } else if (_pNetwork->IsWaitingForPlayers()) {
strIndicator = TRANS("Waiting for all players to connect"); strIndicator = TRANS("Waiting for all players to connect");
} else if (_pNetwork->IsWaitingForServer()) { } else if (_pNetwork->IsWaitingForServer()) {

@ -115,12 +115,12 @@ extern void ApplyGLSettings(BOOL bForce)
// if none found // if none found
if (pse==NULL) { if (pse==NULL) {
// error // error
CPrintF(TRANS("No matching preferences found! Automatic adjustment disabled!\n")); CPrintF(TRANSV("No matching preferences found! Automatic adjustment disabled!\n"));
return; return;
} }
// report // report
CPrintF(TRANS("Matching: %s (%s)\n"), CPrintF(TRANSV("Matching: %s (%s)\n"),
(const char *) pse->se_strRenderer, (const char *) pse->se_strRenderer,
(const char *) pse->se_strDescription); (const char *) pse->se_strDescription);
@ -130,17 +130,17 @@ extern void ApplyGLSettings(BOOL bForce)
// if same as last // if same as last
if( pse->se_strDescription==_strLastRenderer && sam_iVideoSetup==_iLastPreferences) { if( pse->se_strDescription==_strLastRenderer && sam_iVideoSetup==_iLastPreferences) {
// do nothing // do nothing
CPrintF(TRANS("Similar to last, keeping same preferences.\n")); CPrintF(TRANSV("Similar to last, keeping same preferences.\n"));
return; return;
} }
CPrintF(TRANS("Different than last, applying new preferences.\n")); CPrintF(TRANSV("Different than last, applying new preferences.\n"));
} else { } else {
CPrintF(TRANS("Applying new preferences.\n")); CPrintF(TRANSV("Applying new preferences.\n"));
} }
// clamp rendering preferences (just to be on the safe side) // clamp rendering preferences (just to be on the safe side)
sam_iVideoSetup = Clamp( sam_iVideoSetup, 0L, 3L); sam_iVideoSetup = Clamp( sam_iVideoSetup, 0L, 3L);
CPrintF(TRANS("Mode: %s\n"), (const char *) RenderingPreferencesDescription(sam_iVideoSetup)); CPrintF(TRANSV("Mode: %s\n"), (const char *) RenderingPreferencesDescription(sam_iVideoSetup));
// if not in custom mode // if not in custom mode
if (sam_iVideoSetup<3) { if (sam_iVideoSetup<3) {
// execute the script // execute the script
@ -151,7 +151,7 @@ extern void ApplyGLSettings(BOOL bForce)
_pShell->Execute("RefreshTextures();"); _pShell->Execute("RefreshTextures();");
} }
// done // done
CPrintF(TRANS("Done.\n\n")); CPrintF(TRANSV("Done.\n\n"));
// remember settings // remember settings
_strLastRenderer = pse->se_strDescription; _strLastRenderer = pse->se_strDescription;

@ -90,7 +90,7 @@ int qsort_CompareLevels(const void *elem1, const void *elem2 )
// init level-info subsystem // init level-info subsystem
void LoadLevelsList(void) void LoadLevelsList(void)
{ {
CPrintF(TRANS("Reading levels directory...\n")); CPrintF(TRANSV("Reading levels directory...\n"));
// list the levels directory with subdirs // list the levels directory with subdirs
CDynamicStackArray<CTFileName> afnmDir; CDynamicStackArray<CTFileName> afnmDir;
@ -100,11 +100,11 @@ void LoadLevelsList(void)
for (INDEX i=0; i<afnmDir.Count(); i++) { for (INDEX i=0; i<afnmDir.Count(); i++) {
CTFileName fnm = afnmDir[i]; CTFileName fnm = afnmDir[i];
CPrintF(TRANS(" file '%s' : "), (const char *)fnm); CPrintF(TRANSV(" file '%s' : "), (const char *)fnm);
// try to load its info, and if valid // try to load its info, and if valid
CLevelInfo li; CLevelInfo li;
if (GetLevelInfo(li, fnm)) { if (GetLevelInfo(li, fnm)) {
CPrintF(TRANS("'%s' spawn=0x%08x\n"), (const char *) li.li_strName, li.li_ulSpawnFlags); CPrintF(TRANSV("'%s' spawn=0x%08x\n"), (const char *) li.li_strName, li.li_ulSpawnFlags);
// create new info for that file // create new info for that file
CLevelInfo *pliNew = new CLevelInfo; CLevelInfo *pliNew = new CLevelInfo;
@ -112,7 +112,7 @@ void LoadLevelsList(void)
// add it to list of all levels // add it to list of all levels
_lhAllLevels.AddTail(pliNew->li_lnNode); _lhAllLevels.AddTail(pliNew->li_lnNode);
} else { } else {
CPrintF(TRANS("invalid level\n")); CPrintF(TRANSV("invalid level\n"));
} }
} }
@ -227,7 +227,7 @@ int qsort_CompareDemos(const void *elem1, const void *elem2 )
// init list of autoplay demos // init list of autoplay demos
void LoadDemosList(void) void LoadDemosList(void)
{ {
CPrintF(TRANS("Reading demos directory...\n")); CPrintF(TRANSV("Reading demos directory...\n"));
// list the levels directory with subdirs // list the levels directory with subdirs
CDynamicStackArray<CTFileName> afnmDir; CDynamicStackArray<CTFileName> afnmDir;

@ -686,10 +686,10 @@ CTString GetResolutionDescription(CDisplayMode &dm)
CTString str; CTString str;
// if dual head // if dual head
if (dm.IsDualHead()) { if (dm.IsDualHead()) {
str.PrintF(TRANS("%dx%d double"), dm.dm_pixSizeI/2, dm.dm_pixSizeJ); str.PrintF(TRANSV("%dx%d double"), dm.dm_pixSizeI/2, dm.dm_pixSizeJ);
// if widescreen // if widescreen
} else if (dm.IsWideScreen()) { } else if (dm.IsWideScreen()) {
str.PrintF(TRANS("%dx%d wide"), dm.dm_pixSizeI, dm.dm_pixSizeJ); str.PrintF(TRANSV("%dx%d wide"), dm.dm_pixSizeI, dm.dm_pixSizeJ);
// otherwise it is normal // otherwise it is normal
} else { } else {
str.PrintF("%dx%d", dm.dm_pixSizeI, dm.dm_pixSizeJ); str.PrintF("%dx%d", dm.dm_pixSizeI, dm.dm_pixSizeJ);
@ -933,7 +933,7 @@ void ModConnectConfirm(void)
return; return;
} }
CPrintF(TRANS("Server is running a different MOD (%s).\nYou need to reload to connect.\n"), (const char *) _fnmModSelected); CPrintF(TRANSV("Server is running a different MOD (%s).\nYou need to reload to connect.\n"), (const char *) _fnmModSelected);
_pConfimedYes = &ModConnect; _pConfimedYes = &ModConnect;
_pConfimedNo = NULL; _pConfimedNo = NULL;
mgConfirmLabel.mg_strText = TRANS("CHANGE THE MOD?"); mgConfirmLabel.mg_strText = TRANS("CHANGE THE MOD?");
@ -4276,7 +4276,7 @@ void CControlsMenu::StartMenu(void)
ControlsMenuOn(); ControlsMenuOn();
mgControlsNameLabel.mg_strText.PrintF(TRANS("CONTROLS FOR: %s"), (const char *) _pGame->gm_apcPlayers[iPlayer].GetNameForPrinting()); mgControlsNameLabel.mg_strText.PrintF(TRANSV("CONTROLS FOR: %s"), (const char *) _pGame->gm_apcPlayers[iPlayer].GetNameForPrinting());
ObtainActionSettings(); ObtainActionSettings();
CGameMenu::StartMenu(); CGameMenu::StartMenu();
@ -4558,7 +4558,7 @@ BOOL CLoadSaveMenu::ParseFile(const CTFileName &fnm, CTString &strName)
INDEX iCtl = -1; INDEX iCtl = -1;
strName.ScanF("Controls%d", &iCtl); strName.ScanF("Controls%d", &iCtl);
if (iCtl>=0 && iCtl<=7) { if (iCtl>=0 && iCtl<=7) {
strName.PrintF(TRANS("From player: %s"), (const char *) (_pGame->gm_apcPlayers[iCtl].GetNameForPrinting())); strName.PrintF(TRANSV("From player: %s"), (const char *) (_pGame->gm_apcPlayers[iCtl].GetNameForPrinting()));
} }
} }
} }

@ -1710,7 +1710,7 @@ void CMGChangePlayer::SetPlayerText(void)
if (iPlayer<0 || iPlayer>7) { if (iPlayer<0 || iPlayer>7) {
mg_strText = "????"; mg_strText = "????";
} else { } else {
mg_strText.PrintF(TRANS("Player %d: %s\n"), mg_iLocalPlayer+1, (const char *) pc.GetNameForPrinting()); mg_strText.PrintF(TRANSV("Player %d: %s\n"), mg_iLocalPlayer+1, (const char *) pc.GetNameForPrinting());
} }
} }

@ -193,7 +193,7 @@ static void DirectoryLockOn(void)
// try to open lock file // try to open lock file
if (_pFileSystem->Exists(_fnmLock)) if (_pFileSystem->Exists(_fnmLock))
CPrintF(TRANS("WARNING: SeriousSam didn't shut down properly last time!\n")); CPrintF(TRANSV("WARNING: SeriousSam didn't shut down properly last time!\n"));
_hLock = fopen(_fnmLock, "w"); _hLock = fopen(_fnmLock, "w");
if (_hLock == NULL) { if (_hLock == NULL) {
@ -402,7 +402,7 @@ void InitializeGame(void)
try { try {
#ifdef STATICALLY_LINKED #ifdef STATICALLY_LINKED
#define fnmExpanded NULL #define fnmExpanded NULL
CPrintF(TRANS("Loading game library '%s'...\n"), "(statically linked)"); CPrintF(TRANSV("Loading game library '%s'...\n"), "(statically linked)");
#else #else
CTFileName fnmDLL; CTFileName fnmDLL;
#ifndef NDEBUG #ifndef NDEBUG
@ -414,7 +414,7 @@ void InitializeGame(void)
fnmDLL = CDynamicLoader::ConvertLibNameToPlatform(fnmDLL); fnmDLL = CDynamicLoader::ConvertLibNameToPlatform(fnmDLL);
CTFileName fnmExpanded; CTFileName fnmExpanded;
ExpandFilePath(EFP_READ | EFP_NOZIPS,fnmDLL,fnmExpanded); ExpandFilePath(EFP_READ | EFP_NOZIPS,fnmDLL,fnmExpanded);
CPrintF(TRANS("Loading game library '%s'...\n"), (const char *)fnmExpanded); CPrintF(TRANSV("Loading game library '%s'...\n"), (const char *)fnmExpanded);
#endif #endif
const char *err; const char *err;
@ -562,8 +562,8 @@ BOOL Init( HINSTANCE hInstance, int nCmdShow, CTString strCmdLine)
// !! NOTE !! Re-enable these to allow mod support. // !! NOTE !! Re-enable these to allow mod support.
//LoadStringVar(CTString("Data\\Var\\Sam_Version.var"), sam_strVersion); //LoadStringVar(CTString("Data\\Var\\Sam_Version.var"), sam_strVersion);
//LoadStringVar(CTString("Data\\Var\\ModName.var"), sam_strModName); //LoadStringVar(CTString("Data\\Var\\ModName.var"), sam_strModName);
CPrintF(TRANS("Serious Sam version: %s\n"), (const char *) sam_strVersion); CPrintF(TRANSV("Serious Sam version: %s\n"), (const char *) sam_strVersion);
CPrintF(TRANS("Active mod: %s\n"), (const char *) sam_strModName); CPrintF(TRANSV("Active mod: %s\n"), (const char *) sam_strModName);
InitializeMenus(); InitializeMenus();
// if there is a mod // if there is a mod
@ -606,7 +606,7 @@ BOOL Init( HINSTANCE hInstance, int nCmdShow, CTString strCmdLine)
_pShell->SetINDEX("net_iPort", cmd_iPort); _pShell->SetINDEX("net_iPort", cmd_iPort);
strPort.PrintF(":%d", cmd_iPort); strPort.PrintF(":%d", cmd_iPort);
} }
CPrintF(TRANS("Command line connection: '%s%s'\n"), (const char *) cmd_strServer, (const char *) strPort); CPrintF(TRANSV("Command line connection: '%s%s'\n"), (const char *) cmd_strServer, (const char *) strPort);
// go to join menu // go to join menu
_pGame->gam_strJoinAddress = cmd_strServer; _pGame->gam_strJoinAddress = cmd_strServer;
if (cmd_bQuickJoin) { if (cmd_bQuickJoin) {
@ -617,11 +617,11 @@ BOOL Init( HINSTANCE hInstance, int nCmdShow, CTString strCmdLine)
} }
// if starting world from command line // if starting world from command line
} else if (cmd_strWorld!="") { } else if (cmd_strWorld!="") {
CPrintF(TRANS("Command line world: '%s'\n"), (const char *) cmd_strWorld); CPrintF(TRANSV("Command line world: '%s'\n"), (const char *) cmd_strWorld);
// try to start the game with that level // try to start the game with that level
try { try {
if (cmd_iGoToMarker>=0) { if (cmd_iGoToMarker>=0) {
CPrintF(TRANS("Command line marker: %d\n"), cmd_iGoToMarker); CPrintF(TRANSV("Command line marker: %d\n"), cmd_iGoToMarker);
CTString strCommand; CTString strCommand;
strCommand.PrintF("cht_iGoToMarker = %d;", cmd_iGoToMarker); strCommand.PrintF("cht_iGoToMarker = %d;", cmd_iGoToMarker);
_pShell->Execute(strCommand); _pShell->Execute(strCommand);
@ -635,7 +635,7 @@ BOOL Init( HINSTANCE hInstance, int nCmdShow, CTString strCmdLine)
StartSinglePlayerGame(); StartSinglePlayerGame();
} }
} catch (char *strError) { } catch (char *strError) {
CPrintF(TRANS("Cannot start '%s': '%s'\n"), (const char *) cmd_strWorld, strError); CPrintF(TRANSV("Cannot start '%s': '%s'\n"), (const char *) cmd_strWorld, strError);
} }
// if no relevant starting at command line // if no relevant starting at command line
} else { } else {
@ -1254,7 +1254,7 @@ int SubMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int
// if addon is to be executed // if addon is to be executed
if (_iAddonExecState==1) { if (_iAddonExecState==1) {
// print header and start console // print header and start console
CPrintF(TRANS("---- Executing addon: '%s'\n"), (const char*)_fnmAddonToExec); CPrintF(TRANSV("---- Executing addon: '%s'\n"), (const char*)_fnmAddonToExec);
sam_bToggleConsole = TRUE; sam_bToggleConsole = TRUE;
_iAddonExecState = 2; _iAddonExecState = 2;
// if addon is ready for execution // if addon is ready for execution
@ -1263,7 +1263,7 @@ int SubMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int
CTString strCmd; CTString strCmd;
strCmd.PrintF("include \"%s\"", (const char*)_fnmAddonToExec); strCmd.PrintF("include \"%s\"", (const char*)_fnmAddonToExec);
_pShell->Execute(strCmd); _pShell->Execute(strCmd);
CPrintF(TRANS("Addon done, press Escape to close console\n")); CPrintF(TRANSV("Addon done, press Escape to close console\n"));
_iAddonExecState = 3; _iAddonExecState = 3;
} }
@ -1623,7 +1623,7 @@ void StartNewMode( enum GfxAPIType eGfxAPI, INDEX iAdapter, PIX pixSizeI, PIX pi
eColorDepth = (DisplayDepth)aDefaultModes[iMode][0]; eColorDepth = (DisplayDepth)aDefaultModes[iMode][0];
eGfxAPI = (GfxAPIType) aDefaultModes[iMode][1]; eGfxAPI = (GfxAPIType) aDefaultModes[iMode][1];
iAdapter = aDefaultModes[iMode][2]; iAdapter = aDefaultModes[iMode][2];
CPrintF(TRANS("\nTrying recovery mode %d...\n"), iMode); CPrintF(TRANSV("\nTrying recovery mode %d...\n"), iMode);
bSuccess = TryToSetDisplayMode( eGfxAPI, iAdapter, pixSizeI, pixSizeJ, eColorDepth, bFullScreenMode); bSuccess = TryToSetDisplayMode( eGfxAPI, iAdapter, pixSizeI, pixSizeJ, eColorDepth, bFullScreenMode);
if( bSuccess) break; if( bSuccess) break;
} }