mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-12-25 15:14:51 +01:00
Silence a whole bunch of warnings about string literals vs non-const char *.
This commit is contained in:
parent
a4000c69a8
commit
2f10f864d8
|
@ -30,7 +30,7 @@ void InitializeGame(void)
|
|||
{
|
||||
#ifdef STATICALLY_LINKED
|
||||
#define fnmExpanded NULL
|
||||
CPrintF(TRANS("Loading game library '%s'...\n"), "(statically linked)");
|
||||
CPrintF(TRANSV("Loading game library '%s'...\n"), "(statically linked)");
|
||||
#else
|
||||
CTFileName fnmDLL;
|
||||
#ifndef NDEBUG
|
||||
|
@ -42,7 +42,7 @@ void InitializeGame(void)
|
|||
fnmDLL = CDynamicLoader::ConvertLibNameToPlatform(fnmDLL);
|
||||
CTFileName 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
|
||||
|
||||
CDynamicLoader *loader = CDynamicLoader::GetInstance(fnmExpanded);
|
||||
|
@ -269,7 +269,7 @@ BOOL Init(int argc, char* argv[])
|
|||
_pNetwork->md_strGameID = sam_strGameName;
|
||||
|
||||
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)
|
||||
SetConsoleCtrlHandler(HandlerRoutine, TRUE);
|
||||
|
@ -323,7 +323,7 @@ void RoundBegin(void)
|
|||
// if this is first round
|
||||
if (iRound==1) {
|
||||
// error
|
||||
CPrintF(TRANS("No scripts present!\n"));
|
||||
CPrintF(TRANSV("No scripts present!\n"));
|
||||
_bRunning = FALSE;
|
||||
return;
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ void RoundBegin(void)
|
|||
|
||||
// start the level specified there
|
||||
if (ded_strLevel=="") {
|
||||
CPrintF(TRANS("ERROR: No next level specified!\n"));
|
||||
CPrintF(TRANSV("ERROR: No next level specified!\n"));
|
||||
_bRunning = FALSE;
|
||||
} else {
|
||||
EnableLoadingHook();
|
||||
|
@ -346,9 +346,9 @@ void RoundBegin(void)
|
|||
_bRestart = 0;
|
||||
DisableLoadingHook();
|
||||
_tvLastLevelEnd = CTimerValue((__int64) -1);
|
||||
CPrintF(TRANS("\nALL OK: Dedicated server is now running!\n"));
|
||||
CPrintF(TRANS("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("\nALL OK: Dedicated server is now running!\n"));
|
||||
CPrintF(TRANSV("Use Ctrl+C to shutdown the server.\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;
|
||||
_bRestart = FALSE;
|
||||
RoundEnd();
|
||||
CPrintF(TRANS("\nNOTE: Restarting server!\n\n"));
|
||||
CPrintF(TRANSV("\nNOTE: Restarting server!\n\n"));
|
||||
RoundBegin();
|
||||
} else {
|
||||
_bRestart = FALSE;
|
||||
|
|
|
@ -62,7 +62,7 @@ SType SType::operator+(const SType &other)
|
|||
/*
|
||||
* Function used for reporting errors.
|
||||
*/
|
||||
void yyerror(char *s)
|
||||
void yyerror(const char *s)
|
||||
{
|
||||
fprintf( stderr, "%s(%d): Error: %s\n", _strInputFileName, _iLinesCt, s);
|
||||
ctErrors++;
|
||||
|
@ -71,7 +71,7 @@ void yyerror(char *s)
|
|||
/*
|
||||
* 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);
|
||||
strcpy(strChanged, strFileName);
|
||||
|
@ -86,7 +86,7 @@ char *ChangeFileNameExtension(char *strFileName, char *strNewExtension)
|
|||
/*
|
||||
* 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
|
||||
FILE *f = fopen(strFileName, strMode);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#endif
|
||||
|
||||
extern int yylex(void);
|
||||
extern void yyerror(char *s);
|
||||
extern void yyerror(const char *s);
|
||||
extern int yyparse(void);
|
||||
|
||||
extern FILE *_fInput;
|
||||
|
|
|
@ -10,29 +10,29 @@
|
|||
|
||||
#define YYINITDEPTH 1000
|
||||
|
||||
static char *_strCurrentClass;
|
||||
static const char *_strCurrentClass;
|
||||
static int _iCurrentClassID;
|
||||
static char *_strCurrentBase;
|
||||
static char *_strCurrentDescription;
|
||||
static char *_strCurrentThumbnail;
|
||||
static char *_strCurrentEnum;
|
||||
static const char *_strCurrentBase;
|
||||
static const char *_strCurrentDescription;
|
||||
static const char *_strCurrentThumbnail;
|
||||
static const char *_strCurrentEnum;
|
||||
static int _bClassIsExported = 0;
|
||||
|
||||
static char *_strCurrentPropertyID;
|
||||
static char *_strCurrentPropertyIdentifier;
|
||||
static char *_strCurrentPropertyPropertyType;
|
||||
static char *_strCurrentPropertyEnumType;
|
||||
static char *_strCurrentPropertyDataType;
|
||||
static char *_strCurrentPropertyName;
|
||||
static char *_strCurrentPropertyShortcut;
|
||||
static char *_strCurrentPropertyColor;
|
||||
static char *_strCurrentPropertyFlags;
|
||||
static char *_strCurrentPropertyDefaultCode;
|
||||
static const char *_strCurrentPropertyID;
|
||||
static const char *_strCurrentPropertyIdentifier;
|
||||
static const char *_strCurrentPropertyPropertyType;
|
||||
static const char *_strCurrentPropertyEnumType;
|
||||
static const char *_strCurrentPropertyDataType;
|
||||
static const char *_strCurrentPropertyName;
|
||||
static const char *_strCurrentPropertyShortcut;
|
||||
static const char *_strCurrentPropertyColor;
|
||||
static const char *_strCurrentPropertyFlags;
|
||||
static const char *_strCurrentPropertyDefaultCode;
|
||||
|
||||
static char *_strCurrentComponentIdentifier;
|
||||
static char *_strCurrentComponentType;
|
||||
static char *_strCurrentComponentID;
|
||||
static char *_strCurrentComponentFileName;
|
||||
static const char *_strCurrentComponentIdentifier;
|
||||
static const char *_strCurrentComponentType;
|
||||
static const char *_strCurrentComponentID;
|
||||
static const char *_strCurrentComponentFileName;
|
||||
|
||||
static int _ctInProcedureHandler = 0;
|
||||
static char _strLastProcedureName[256];
|
||||
|
@ -52,7 +52,7 @@ static int _bInProcedure; // set if currently compiling a procedure
|
|||
static int _bInHandler;
|
||||
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_ImplementsOnInitClass;
|
||||
static int _bFeature_ImplementsOnEndClass;
|
||||
|
@ -89,7 +89,7 @@ char *RemoveLineDirective(char *str)
|
|||
return str;
|
||||
}
|
||||
}
|
||||
char *GetLineDirective(SType &st)
|
||||
const char *GetLineDirective(SType &st)
|
||||
{
|
||||
char *str = st.strString;
|
||||
if (str[0]=='\n' && str[1]=='#' && str[2]=='l') {
|
||||
|
@ -883,9 +883,9 @@ function_list
|
|||
function_implementation
|
||||
: opt_export opt_virtual return_type opt_tilde identifier '(' parameters_list ')' opt_const
|
||||
'{' statements '}' opt_semicolon {
|
||||
char *strReturnType = $3.strString;
|
||||
char *strFunctionHeader = ($4+$5+$6+$7+$8+$9).strString;
|
||||
char *strFunctionBody = ($10+$11+$12).strString;
|
||||
const char *strReturnType = $3.strString;
|
||||
const char *strFunctionHeader = ($4+$5+$6+$7+$8+$9).strString;
|
||||
const char *strFunctionBody = ($10+$11+$12).strString;
|
||||
if (strcmp($5.strString, _strCurrentClass)==0) {
|
||||
if (strcmp(strReturnType+strlen(strReturnType)-4, "void")==0 ) {
|
||||
strReturnType = "";
|
||||
|
|
|
@ -648,7 +648,7 @@ void CTString::LoadVar(const class CTFileName &fnmFile)
|
|||
str.Load_t(fnmFile);
|
||||
*this = str;
|
||||
} 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 {
|
||||
Save_t(fnmFile);
|
||||
} 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 joystics
|
||||
INDEX ctJoysticksPresent = PlatformGetJoystickCount();
|
||||
CPrintF(TRANS(" joysticks found: %d\n"), ctJoysticksPresent);
|
||||
CPrintF(TRANSV(" joysticks found: %d\n"), ctJoysticksPresent);
|
||||
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 ----------
|
||||
for (INDEX iJoy=0; iJoy<MAX_JOYSTICKS; iJoy++) {
|
||||
|
@ -108,7 +108,7 @@ void CInput::AddJoystickAbbilities(INDEX iJoy)
|
|||
CTString strJoystickName;
|
||||
strJoystickName.PrintF("Joy %d", iJoy+1);
|
||||
CTString strJoystickNameTra;
|
||||
strJoystickNameTra.PrintF(TRANS("Joy %d"), iJoy+1);
|
||||
strJoystickNameTra.PrintF(TRANSV("Joy %d"), iJoy+1);
|
||||
|
||||
// for each axis
|
||||
for( UINT iAxis=0; iAxis<6; iAxis++) {
|
||||
|
@ -156,7 +156,7 @@ void CInput::AddJoystickAbbilities(INDEX iJoy)
|
|||
*/
|
||||
void CInput::Initialize( void )
|
||||
{
|
||||
CPrintF(TRANS("Detecting input devices...\n"));
|
||||
CPrintF(TRANSV("Detecting input devices...\n"));
|
||||
SetKeyNames();
|
||||
CPrintF("\n");
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ BOOL GetReplacingFile(CTFileName fnSourceFile, CTFileName &fnReplacingFile,
|
|||
(void) strError;
|
||||
}
|
||||
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
|
||||
CTString strDefaultFile;
|
||||
strDefaultFile = fnSourceFile.FileName() + fnSourceFile.FileExt();
|
||||
|
|
|
@ -620,7 +620,7 @@ LONG CInput::PlatformGetJoystickCount(void)
|
|||
// check if a joystick exists
|
||||
BOOL CInput::CheckJoystick(INDEX iJoy)
|
||||
{
|
||||
CPrintF(TRANS(" joy %d:"), iJoy + 1);
|
||||
CPrintF(TRANSV(" joy %d:"), iJoy + 1);
|
||||
|
||||
assert(ctJoysticks > iJoy);
|
||||
CPrintF(" '%s'\n", SDL_JoystickName(iJoy));
|
||||
|
@ -636,10 +636,10 @@ BOOL CInput::CheckJoystick(INDEX iJoy)
|
|||
sticks[iJoy] = stick;
|
||||
|
||||
int ctAxes = SDL_JoystickNumAxes(stick);
|
||||
CPrintF(TRANS(" %d axes\n"), ctAxes);
|
||||
CPrintF(TRANS(" %d buttons\n"), SDL_JoystickNumButtons(stick));
|
||||
CPrintF(TRANSV(" %d axes\n"), ctAxes);
|
||||
CPrintF(TRANSV(" %d buttons\n"), SDL_JoystickNumButtons(stick));
|
||||
if (SDL_JoystickNumHats(stick) > 0) {
|
||||
CPrintF(TRANS(" POV hat present\n"));
|
||||
CPrintF(TRANSV(" POV hat present\n"));
|
||||
}
|
||||
|
||||
// for each axis
|
||||
|
@ -938,7 +938,7 @@ void CInput::GetInput(BOOL bPreScan)
|
|||
// if joystick reading failed
|
||||
if (!bSucceeded && inp_bAutoDisableJoysticks) {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -197,21 +197,21 @@ void MakeFatalError(void* pArgs)
|
|||
extern void ReportGlobalMemoryStatus(void)
|
||||
{
|
||||
#ifdef PLATFORM_WIN32
|
||||
CPrintF(TRANS("Global memory status...\n"));
|
||||
CPrintF(TRANSV("Global memory status...\n"));
|
||||
|
||||
MEMORYSTATUS ms;
|
||||
GlobalMemoryStatus(&ms);
|
||||
|
||||
#define MB (1024*1024)
|
||||
CPrintF(TRANS(" 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(TRANS(" Virtual memory used: %4d/%4dMB\n"), (ms.dwTotalVirtual -ms.dwAvailVirtual )/MB, ms.dwTotalVirtual /MB);
|
||||
CPrintF(TRANS(" Memory load: %3d%%\n"), ms.dwMemoryLoad);
|
||||
CPrintF(TRANSV(" Physical memory used: %4d/%4dMB\n"), (ms.dwTotalPhys -ms.dwAvailPhys )/MB, ms.dwTotalPhys /MB);
|
||||
CPrintF(TRANSV(" Page file used: %4d/%4dMB\n"), (ms.dwTotalPageFile-ms.dwAvailPageFile)/MB, ms.dwTotalPageFile/MB);
|
||||
CPrintF(TRANSV(" Virtual memory used: %4d/%4dMB\n"), (ms.dwTotalVirtual -ms.dwAvailVirtual )/MB, ms.dwTotalVirtual /MB);
|
||||
CPrintF(TRANSV(" Memory load: %3d%%\n"), ms.dwMemoryLoad);
|
||||
|
||||
DWORD dwMin;
|
||||
DWORD 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
|
||||
}
|
||||
|
||||
|
|
|
@ -128,13 +128,13 @@ void InitStreams(void)
|
|||
LoadStringVar(CTString("DefaultMod.txt"), _fnmMod);
|
||||
}
|
||||
|
||||
CPrintF(TRANS("Current mod: %s\n"),
|
||||
CPrintF(TRANSV("Current mod: %s\n"),
|
||||
(_fnmMod=="") ? TRANS("<none>") :
|
||||
(const char *) (CTString&)_fnmMod);
|
||||
// if there is a mod active
|
||||
if (_fnmMod!="") {
|
||||
// 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;
|
||||
bOK |= LoadFileList(_afnmBaseWriteInc , CTString("BaseWriteInclude.lst"));
|
||||
bOK |= LoadFileList(_afnmBaseWriteExc , CTString("BaseWriteExclude.lst"));
|
||||
|
@ -145,7 +145,7 @@ void InitStreams(void)
|
|||
if (!bOK) {
|
||||
// the mod is not valid
|
||||
_fnmMod = CTString("");
|
||||
CPrintF(TRANS("Error: MOD not found!\n"));
|
||||
CPrintF(TRANSV("Error: MOD not found!\n"));
|
||||
// if mod is ok
|
||||
} else {
|
||||
// remember mod name (the parameter that is passed on cmdline)
|
||||
|
@ -159,7 +159,7 @@ void InitStreams(void)
|
|||
LoadStringVar(CTString("ModExt.txt"), _strModExt);
|
||||
|
||||
|
||||
CPrintF(TRANS("Loading group files...\n"));
|
||||
CPrintF(TRANSV("Loading group files...\n"));
|
||||
|
||||
// for each group file in base directory
|
||||
struct _finddata_t c_file;
|
||||
|
|
|
@ -257,7 +257,7 @@ static __int64 GetCPUSpeedHz(void)
|
|||
// if not found in registry
|
||||
if( !bFoundInReg) {
|
||||
// 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;
|
||||
// if found in registry
|
||||
} else {
|
||||
|
@ -265,7 +265,7 @@ static __int64 GetCPUSpeedHz(void)
|
|||
const INDEX iTolerance = slSpeedRead *1/100; // %1 tolerance should be enough
|
||||
if( abs(slSpeedRead-slSpeedReg) > iTolerance) {
|
||||
// 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;
|
||||
}
|
||||
// use measured value
|
||||
|
|
|
@ -138,12 +138,12 @@ CTString GetZlibError(int ierr)
|
|||
case Z_VERSION_ERROR: return TRANS("Z_VERSION_ERROR"); break;
|
||||
case Z_ERRNO : {
|
||||
CTString strError;
|
||||
strError.PrintF(TRANS("Z_ERRNO: %s"), strerror(errno));
|
||||
strError.PrintF(TRANSV("Z_ERRNO: %s"), strerror(errno));
|
||||
return strError;
|
||||
} break;
|
||||
default: {
|
||||
CTString strError;
|
||||
strError.PrintF(TRANS("Unknown ZLIB error: %d"), ierr);
|
||||
strError.PrintF(TRANSV("Unknown ZLIB error: %d"), ierr);
|
||||
return strError;
|
||||
} break;
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ void ReadZIPDirectory_t(CTFileName *pfnmZip)
|
|||
}
|
||||
|
||||
// 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
|
||||
|
|
|
@ -872,7 +872,7 @@ void CInput::GetInput(BOOL bPreScan)
|
|||
// if joystick reading failed
|
||||
if (!bSucceeded && inp_bAutoDisableJoysticks) {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReser
|
|||
static void DetectCPU(void)
|
||||
{
|
||||
#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
|
||||
char strVendor[12+1];
|
||||
|
@ -177,8 +177,8 @@ static void DetectCPU(void)
|
|||
INDEX iStepping = (ulTFMS>> 0)&0xF;
|
||||
|
||||
|
||||
CPrintF(TRANS(" Vendor: %s\n"), strVendor);
|
||||
CPrintF(TRANS(" Type: %d, Family: %d, Model: %d, Stepping: %d\n"),
|
||||
CPrintF(TRANSV(" Vendor: %s\n"), strVendor);
|
||||
CPrintF(TRANSV(" Type: %d, Family: %d, Model: %d, Stepping: %d\n"),
|
||||
iType, iFamily, iModel, iStepping);
|
||||
|
||||
BOOL bMMX = ulFeatures & (1<<23);
|
||||
|
@ -187,9 +187,9 @@ static void DetectCPU(void)
|
|||
CTString strYes = TRANS("Yes");
|
||||
CTString strNo = TRANS("No");
|
||||
|
||||
CPrintF(TRANS(" MMX : %s\n"), (const char *) (bMMX ?strYes:strNo));
|
||||
CPrintF(TRANS(" CMOV: %s\n"), (const char *) (bCMOV?strYes:strNo));
|
||||
CPrintF(TRANS(" Clock: %.0fMHz\n"), _pTimer->tm_llCPUSpeedHZ/1E6);
|
||||
CPrintF(TRANSV(" MMX : %s\n"), (const char *) (bMMX ?strYes:strNo));
|
||||
CPrintF(TRANSV(" CMOV: %s\n"), (const char *) (bCMOV?strYes:strNo));
|
||||
CPrintF(TRANSV(" Clock: %.0fMHz\n"), _pTimer->tm_llCPUSpeedHZ/1E6);
|
||||
|
||||
sys_strCPUVendor = strVendor;
|
||||
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);
|
||||
|
||||
// print basic engine info
|
||||
CPrintF(TRANS("--- Serious Engine Startup ---\n"));
|
||||
CPrintF(TRANSV("--- Serious Engine Startup ---\n"));
|
||||
CPrintF(" %s\n\n", (const char *) _strEngineBuild);
|
||||
|
||||
// print info on the started application
|
||||
CPrintF(TRANS("Executable: %s\n"), strExePath);
|
||||
CPrintF(TRANS("Assumed engine directory: %s\n"), (const char *) _fnmApplicationPath);
|
||||
CPrintF(TRANSV("Executable: %s\n"), strExePath);
|
||||
CPrintF(TRANSV("Assumed engine directory: %s\n"), (const char *) _fnmApplicationPath);
|
||||
|
||||
CPrintF("\n");
|
||||
|
||||
// report os info
|
||||
CPrintF(TRANS("Examining underlying OS...\n"));
|
||||
CPrintF(TRANSV("Examining underlying OS...\n"));
|
||||
|
||||
// !!! FIXME: Abstract this somehow.
|
||||
#if (defined PLATFORM_WIN32)
|
||||
|
@ -402,12 +402,12 @@ ENGINE_API void SE_InitEngine(const char *argv0, CTString strGameID)
|
|||
sys_iOSBuild = osv.dwBuildNumber & 0xFFFF;
|
||||
sys_strOSMisc = osv.szCSDVersion;
|
||||
|
||||
CPrintF(TRANS(" Type: %s\n"), (const char*)sys_strOS);
|
||||
CPrintF(TRANS(" Version: %d.%d, build %d\n"),
|
||||
CPrintF(TRANSV(" Type: %s\n"), (const char*)sys_strOS);
|
||||
CPrintF(TRANSV(" Version: %d.%d, build %d\n"),
|
||||
osv.dwMajorVersion, osv.dwMinorVersion, osv.dwBuildNumber & 0xFFFF);
|
||||
CPrintF(TRANS(" Misc: %s\n"), osv.szCSDVersion);
|
||||
CPrintF(TRANSV(" Misc: %s\n"), osv.szCSDVersion);
|
||||
} 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)
|
||||
|
@ -421,8 +421,8 @@ ENGINE_API void SE_InitEngine(const char *argv0, CTString strGameID)
|
|||
sys_iOSBuild = ((osver & 0x000F) >> 0);
|
||||
sys_strOS = "Mac OS X";
|
||||
sys_strOSMisc = "Mac OS";
|
||||
CPrintF(TRANS(" Type: %s\n"), (const char*)sys_strOS);
|
||||
CPrintF(TRANS(" Version: %d.%d.%d\n"),
|
||||
CPrintF(TRANSV(" Type: %s\n"), (const char*)sys_strOS);
|
||||
CPrintF(TRANSV(" Version: %d.%d.%d\n"),
|
||||
(int)sys_iOSMajor, (int)sys_iOSMinor, (int)sys_iOSBuild);
|
||||
|
||||
#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_strOS = "Unix";
|
||||
sys_strOSMisc = "Unix";
|
||||
CPrintF(TRANS(" Type: %s\n"), (const char*)sys_strOS);
|
||||
CPrintF(TRANSV(" Type: %s\n"), (const char*)sys_strOS);
|
||||
|
||||
#else
|
||||
#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.)
|
||||
|
||||
// report CPU
|
||||
CPrintF(TRANS("Detecting CPU...\n"));
|
||||
CPrintF(TRANSV("Detecting CPU...\n"));
|
||||
DetectCPUWrapper();
|
||||
CPrintF("\n");
|
||||
|
||||
|
|
|
@ -591,9 +591,9 @@ void CEntityComponent::Obtain_t(void) // throw char *
|
|||
// if not already loaded and should not be precaching now
|
||||
if( ctUsed<=1 && !_precache_bNowPrecaching) {
|
||||
// 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
|
||||
AddToCRCTable();
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
class CEntityPropertyEnumValue {
|
||||
public:
|
||||
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 {
|
||||
public:
|
||||
|
@ -96,13 +96,13 @@ public:
|
|||
|
||||
ULONG ep_ulID; // property ID for this 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
|
||||
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)
|
||||
|
||||
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_pepetEnumType (pepetEnumType)
|
||||
, ep_ulID (ulID )
|
||||
|
@ -166,7 +166,7 @@ public:
|
|||
|
||||
// NOTE: This uses special EFNM initialization for CTFileName class!
|
||||
CEntityComponent(EntityComponentType ectType,
|
||||
ULONG ulID, char *strEFNMComponent)
|
||||
ULONG ulID, const char *strEFNMComponent)
|
||||
: ec_ectType(ectType)
|
||||
, ec_slID(ulID)
|
||||
, ec_fnmComponent(strEFNMComponent, 4) { ec_pvPointer = NULL; };
|
||||
|
@ -187,8 +187,8 @@ public:
|
|||
CEntityComponent *dec_aecComponents;// array of components
|
||||
INDEX dec_ctComponents; // number of components
|
||||
|
||||
char *dec_strName; // descriptive name of the class
|
||||
char *dec_strIconFileName; // filename of texture or thumbnail
|
||||
const char *dec_strName; // descriptive name of the class
|
||||
const char *dec_strIconFileName; // filename of texture or thumbnail
|
||||
INDEX dec_iID; // class ID
|
||||
|
||||
CDLLEntityClass *dec_pdecBase; // pointer to the base class
|
||||
|
|
|
@ -296,7 +296,7 @@ void CGfxLibrary::InitAPIs(void)
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -378,12 +378,12 @@ BOOL CDS_SetMode( PIX pixSizeI, PIX pixSizeJ, enum DisplayDepth dd)
|
|||
case DISP_CHANGE_NOTUPDATED: strError = "DISP_CHANGE_NOTUPDATED"; break;
|
||||
default: strError.PrintF("%d", lRes); break;
|
||||
}
|
||||
CPrintF(TRANS("CDS error: %s\n"), strError);
|
||||
CPrintF(TRANSV("CDS error: %s\n"), strError);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
// 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
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ void CDS_ResetMode(void)
|
|||
#ifdef PLATFORM_WIN32
|
||||
LONG lRes = ChangeDisplaySettings( NULL, 0);
|
||||
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
|
||||
}
|
||||
|
||||
|
|
|
@ -1096,7 +1096,7 @@ void CGfxLibrary::Init(void)
|
|||
|
||||
#ifdef PLATFORM_WIN32
|
||||
// report desktop settings
|
||||
CPrintF(TRANS("Desktop settings...\n"));
|
||||
CPrintF(TRANSV("Desktop settings...\n"));
|
||||
|
||||
HDC hdc = GetDC(NULL);
|
||||
SLONG slBPP = GetDeviceCaps(hdc, PLANES) * GetDeviceCaps(hdc, BITSPIXEL);
|
||||
|
@ -1104,10 +1104,10 @@ void CGfxLibrary::Init(void)
|
|||
|
||||
gfx_ctMonitors = GetSystemMetrics(SM_CMONITORS);
|
||||
|
||||
CPrintF(TRANS(" Color Depth: %dbit\n"), slBPP);
|
||||
CPrintF(TRANS(" Screen: %dx%d\n"), GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
|
||||
CPrintF(TRANS(" Virtual screen: %dx%d\n"), GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN));
|
||||
CPrintF(TRANS(" Monitors directly reported: %d\n"), gfx_ctMonitors);
|
||||
CPrintF(TRANSV(" Color Depth: %dbit\n"), slBPP);
|
||||
CPrintF(TRANSV(" Screen: %dx%d\n"), GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
|
||||
CPrintF(TRANSV(" Virtual screen: %dx%d\n"), GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN));
|
||||
CPrintF(TRANSV(" Monitors directly reported: %d\n"), gfx_ctMonitors);
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -147,26 +147,26 @@ void MonitorsOff(void)
|
|||
|
||||
// if there is more than one monitor, and OS is not WinNT
|
||||
if (gfx_ctMonitors>1 && !bNT) {
|
||||
CPrintF(TRANS("Multimonitor configuration detected...\n"));
|
||||
CPrintF(TRANSV("Multimonitor configuration detected...\n"));
|
||||
// if multimon is not allowed
|
||||
if (gfx_bDisableMultiMonSupport) {
|
||||
CPrintF(TRANS(" Multimonitor support disallowed.\n"));
|
||||
CPrintF(TRANS(" Disabling multimonitor..."));
|
||||
CPrintF(TRANSV(" Multimonitor support disallowed.\n"));
|
||||
CPrintF(TRANSV(" Disabling multimonitor..."));
|
||||
// disable all but primary
|
||||
try {
|
||||
Mon_DisableEnable9x_t(/*bDisable = */ TRUE);
|
||||
CPrintF(TRANS(" disabled\n"));
|
||||
CPrintF(TRANSV(" disabled\n"));
|
||||
} catch(char *strError) {
|
||||
CPrintF(TRANS(" error: %s\n"), strError);
|
||||
CPrintF(TRANSV(" error: %s\n"), strError);
|
||||
}
|
||||
gfx_bMultiMonDisabled = TRUE;
|
||||
// if multimon is allowed
|
||||
} else {
|
||||
CPrintF(TRANS(" Multimonitor support was allowed.\n"));
|
||||
CPrintF(TRANSV(" Multimonitor support was allowed.\n"));
|
||||
}
|
||||
}
|
||||
#else
|
||||
CPrintF(TRANS("Multimonitor is not supported on this platform.\n"));
|
||||
CPrintF(TRANSV("Multimonitor is not supported on this platform.\n"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -175,18 +175,18 @@ void MonitorsOn(void)
|
|||
#ifdef PLATFORM_WIN32
|
||||
// if multimon was disabled
|
||||
if (gfx_bMultiMonDisabled) {
|
||||
CPrintF(TRANS("Multimonitor support was disabled.\n"));
|
||||
CPrintF(TRANS(" re-enabling multimonitor..."));
|
||||
CPrintF(TRANSV("Multimonitor support was disabled.\n"));
|
||||
CPrintF(TRANSV(" re-enabling multimonitor..."));
|
||||
// enable all secondary
|
||||
try {
|
||||
Mon_DisableEnable9x_t(/*bDisable = */ FALSE);
|
||||
CPrintF(TRANS(" enabled\n"));
|
||||
CPrintF(TRANSV(" enabled\n"));
|
||||
} catch(char *strError) {
|
||||
CPrintF(TRANS(" error: %s\n"), strError);
|
||||
CPrintF(TRANSV(" error: %s\n"), strError);
|
||||
}
|
||||
}
|
||||
#else
|
||||
CPrintF(TRANS("Multimonitor is not supported on this platform.\n"));
|
||||
CPrintF(TRANSV("Multimonitor is not supported on this platform.\n"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ BOOL CGfxLibrary::InitDriver_OGL(BOOL init3dfx)
|
|||
CTString strDriverFileName = ((envlib) ? envlib : "libGL.so.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);
|
||||
return(FALSE);
|
||||
}
|
||||
|
|
|
@ -459,7 +459,7 @@ BOOL CBlockBuffer::ReadBlockToStream(CTStream &strm)
|
|||
ASSERT(slSize == bh.bh_slSize);
|
||||
} catch (char *strError) {
|
||||
ASSERT(FALSE);
|
||||
CPrintF(TRANS("Buffer error reading to stream: %s\n"), strError);
|
||||
CPrintF(TRANSV("Buffer error reading to stream: %s\n"), strError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ void CCommunicationInterface::InitWinsock(void)
|
|||
if (iResult==0) {
|
||||
// remember that
|
||||
cci_bWinSockOpen = TRUE;
|
||||
CPrintF(TRANS(" winsock opened ok\n"));
|
||||
CPrintF(TRANSV(" winsock opened ok\n"));
|
||||
}
|
||||
#else
|
||||
cci_bWinSockOpen = TRUE;
|
||||
|
@ -324,11 +324,11 @@ void CCommunicationInterface::PrepareForUse(BOOL bUseNetwork, BOOL bClient)
|
|||
EndWinsock();
|
||||
|
||||
if (bUseNetwork) {
|
||||
CPrintF(TRANS("Initializing TCP/IP...\n"));
|
||||
CPrintF(TRANSV("Initializing TCP/IP...\n"));
|
||||
if (bClient) {
|
||||
CPrintF(TRANS(" opening as client\n"));
|
||||
CPrintF(TRANSV(" opening as client\n"));
|
||||
} else {
|
||||
CPrintF(TRANS(" opening as server\n"));
|
||||
CPrintF(TRANSV(" opening as server\n"));
|
||||
}
|
||||
|
||||
// make sure winsock is on
|
||||
|
@ -338,7 +338,7 @@ void CCommunicationInterface::PrepareForUse(BOOL bUseNetwork, BOOL bClient)
|
|||
cm_ulLocalHost = 0;
|
||||
// if there is a desired local address
|
||||
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
|
||||
cm_strName = net_strLocalHost;
|
||||
cm_ulLocalHost = StringToAddress(cm_strName);
|
||||
|
@ -346,12 +346,12 @@ void CCommunicationInterface::PrepareForUse(BOOL bUseNetwork, BOOL bClient)
|
|||
if (cm_ulLocalHost==0 || cm_ulLocalHost==-1) {
|
||||
cm_ulLocalHost=0;
|
||||
// report it
|
||||
CPrintF(TRANS(" requested local address is invalid\n"));
|
||||
CPrintF(TRANSV(" requested local address is invalid\n"));
|
||||
}
|
||||
}
|
||||
|
||||
// if no valid desired local address
|
||||
CPrintF(TRANS(" getting local addresses\n"));
|
||||
CPrintF(TRANSV(" getting local addresses\n"));
|
||||
// get default
|
||||
char hostname[256];
|
||||
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(TRANS(" port: %d\n"), net_iPort);
|
||||
CPrintF(TRANSV(" local addresses: %s (%s)\n"), (const char *) cm_strName, (const char *) cm_strAddress);
|
||||
CPrintF(TRANSV(" port: %d\n"), net_iPort);
|
||||
|
||||
// try to open master UDP socket
|
||||
try {
|
||||
|
@ -379,9 +379,9 @@ void CCommunicationInterface::PrepareForUse(BOOL bUseNetwork, BOOL bClient)
|
|||
cci_pbMasterInput.pb_ppbsStats = NULL;
|
||||
cci_pbMasterOutput.pb_ppbsStats = NULL;
|
||||
cm_ciBroadcast.SetLocal(NULL);
|
||||
CPrintF(TRANS(" opened socket: \n"));
|
||||
CPrintF(TRANSV(" opened socket: \n"));
|
||||
} 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 strError;
|
||||
strError.PrintF(TRANS("Socket %d, Error %d (%s)"),
|
||||
strError.PrintF(TRANSV("Socket %d, Error %d (%s)"),
|
||||
cci_hSocket, iError, ErrorDescription(&SocketErrors, iError));
|
||||
return strError;
|
||||
};
|
||||
|
@ -849,7 +849,7 @@ BOOL CCommunicationInterface::Server_Update()
|
|||
}
|
||||
}
|
||||
} 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);
|
||||
_pNetwork->ga_srvServer.HandleClientDisconected(iClient);
|
||||
|
||||
|
@ -894,7 +894,7 @@ BOOL CCommunicationInterface::Server_Update()
|
|||
// warn about possible attack
|
||||
extern INDEX 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
|
||||
extern INDEX 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)) {
|
||||
// report it
|
||||
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));
|
||||
return;
|
||||
}
|
||||
|
@ -1290,7 +1290,7 @@ void CCommunicationInterface::UpdateMasterBuffers()
|
|||
// the packet is in error
|
||||
extern INDEX 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
|
||||
bSomethingDone = TRUE;
|
||||
|
@ -1336,7 +1336,7 @@ void CCommunicationInterface::UpdateMasterBuffers()
|
|||
return;
|
||||
// report it
|
||||
} 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));
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -397,11 +397,11 @@ static void KickClient(INDEX iClient, const CTString &strReason)
|
|||
}
|
||||
iClient = Clamp(iClient, INDEX(0), INDEX(NET_MAXGAMECOMPUTERS));
|
||||
if (!_pNetwork->ga_srvServer.srv_assoSessions[iClient].IsActive()) {
|
||||
CPrintF(TRANS("Client not connected!\n"));
|
||||
CPrintF(TRANSV("Client not connected!\n"));
|
||||
return;
|
||||
}
|
||||
if (iClient == 0) {
|
||||
CPrintF(TRANS("Can't kick local client!\n"));
|
||||
CPrintF(TRANSV("Can't kick local client!\n"));
|
||||
return;
|
||||
}
|
||||
CPrintF( TRANS("Kicking %d with explanation '%s'...\n"), iClient, (const char *) strReason);
|
||||
|
@ -1644,7 +1644,7 @@ void CNetworkLibrary::ChangeLevel_internal(void)
|
|||
// if failed
|
||||
} catch(char *strError) {
|
||||
// report error
|
||||
CPrintF(TRANS("Cannot change level:\n%s"), strError);
|
||||
CPrintF(TRANSV("Cannot change level:\n%s"), strError);
|
||||
// try to
|
||||
try {
|
||||
// load the old world
|
||||
|
@ -1830,7 +1830,7 @@ void CNetworkLibrary::MainLoop(void)
|
|||
StartDemoRec_t(strName);
|
||||
dem_iRecordedNumber+=1;
|
||||
} 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);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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_strCapture = "";
|
||||
|
@ -2485,7 +2485,7 @@ void CNetworkLibrary::FinishCRCGather(void)
|
|||
ga_ulCRC = CRCT_MakeCRCForFiles_t(strmCRC);
|
||||
|
||||
} 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)
|
||||
{
|
||||
if (nm_pubPointer+slSize > nm_pubMessage+nm_slSize) {
|
||||
CPrintF(TRANS("Warning: Message over-reading!\n"));
|
||||
CPrintF(TRANSV("Warning: Message over-reading!\n"));
|
||||
ASSERT(FALSE);
|
||||
memset(pvBuffer, 0, slSize);
|
||||
return;
|
||||
|
@ -174,7 +174,7 @@ void CNetworkMessage::Read(void *pvBuffer, SLONG slSize)
|
|||
void CNetworkMessage::Write(const void *pvBuffer, SLONG slSize)
|
||||
{
|
||||
if (nm_pubPointer+slSize > nm_pubMessage+nm_slMaxSize) {
|
||||
CPrintF(TRANS("Warning: Message over-writing!\n"));
|
||||
CPrintF(TRANSV("Warning: Message over-writing!\n"));
|
||||
ASSERT(FALSE);
|
||||
return;
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ CNetworkMessage &CNetworkMessage::operator<<(const CTString &str)
|
|||
*nm_pubPointer++ = 0;
|
||||
nm_slSize++;
|
||||
// report error and stop
|
||||
CPrintF(TRANS("Warning: Message over-writing!\n"));
|
||||
CPrintF(TRANSV("Warning: Message over-writing!\n"));
|
||||
ASSERT(FALSE);
|
||||
return *this;
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ void CPlayerSource::ChangeCharacter(CPlayerCharacter &pcNew)
|
|||
// if the requested character has different guid
|
||||
if (!(pls_pcCharacter==pcNew)) {
|
||||
// fail
|
||||
CPrintF(TRANS("Cannot update character - different GUID\n"));
|
||||
CPrintF(TRANSV("Cannot update character - different GUID\n"));
|
||||
}
|
||||
|
||||
// just request the change
|
||||
|
|
|
@ -293,7 +293,7 @@ void CServer::SendDisconnectMessage(INDEX iClient, const char *strExplanation, B
|
|||
_pNetwork->SendToClientReliable(iClient, strmDisconnect);
|
||||
}
|
||||
// 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);
|
||||
// if not disconnected before
|
||||
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
|
||||
} else {
|
||||
// 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));
|
||||
sso.sso_iDisconnectedState = 2;
|
||||
}
|
||||
|
@ -514,7 +514,7 @@ void CServer::ResendGameStreamBlocks(INDEX iClient, INDEX iSequence0, INDEX ctSe
|
|||
{
|
||||
extern INDEX 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));
|
||||
}
|
||||
|
||||
|
@ -556,7 +556,7 @@ void CServer::ResendGameStreamBlocks(INDEX iClient, INDEX iSequence0, INDEX ctSe
|
|||
_pNetwork->SendToClient(iClient, nmPackedBlocks);
|
||||
extern INDEX 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);
|
||||
}
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ void CServer::ServerLoop(void)
|
|||
// try {
|
||||
// _cmiComm.Server_Accept_t();
|
||||
// } 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
|
||||
HandleAll();
|
||||
|
@ -862,7 +862,7 @@ void CServer::ConnectRemoteSessionState(INDEX iClient, CNetworkMessage &nm)
|
|||
if (iMajor!=_SE_BUILD_MAJOR || iMinor!=_SE_BUILD_MINOR) {
|
||||
// disconnect the client
|
||||
CTString strExplanation;
|
||||
strExplanation.PrintF(TRANS(
|
||||
strExplanation.PrintF(TRANSV(
|
||||
"This server runs version %d.%d, your version is %d.%d.\n"
|
||||
"Please visit http://www.croteam.com for information on version updating."),
|
||||
_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
|
||||
_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);
|
||||
// if failed
|
||||
} catch (char *strError) {
|
||||
|
@ -1000,7 +1000,7 @@ void CServer::ConnectRemoteSessionState(INDEX iClient, CNetworkMessage &nm)
|
|||
sso.Deactivate();
|
||||
|
||||
// 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
|
||||
_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),
|
||||
slFullSize/1024, slDeltaSize/1024, slSize/1024);
|
||||
if (net_bDumpConnectionInfo) {
|
||||
CPrintF(TRANS("Server: Connection data dumped.\n"));
|
||||
CPrintF(TRANSV("Server: Connection data dumped.\n"));
|
||||
}
|
||||
|
||||
// if failed
|
||||
|
@ -1073,7 +1073,7 @@ void CServer::SendSessionStateData(INDEX iClient)
|
|||
sso.Deactivate();
|
||||
|
||||
// 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
|
||||
INDEX iClient = -1;
|
||||
/* 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));
|
||||
}
|
||||
*/
|
||||
|
@ -1127,7 +1127,7 @@ void CServer::HandleAllForAClient(INDEX iClient)
|
|||
|
||||
// if the client is disconnected
|
||||
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
|
||||
_cmiComm.Server_ClearClient(iClient);
|
||||
// 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 (!_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
|
||||
_cmiComm.Server_ClearClient(iClient);
|
||||
// free all that data that was allocated for the client
|
||||
|
@ -1237,7 +1237,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
|
|||
} break;
|
||||
// if remote server asks for data
|
||||
case MSG_REQ_STATEDELTA: {
|
||||
CPrintF(TRANS("Sending statedelta response\n"));
|
||||
CPrintF(TRANSV("Sending statedelta response\n"));
|
||||
SendSessionStateData(iClient);
|
||||
} break;
|
||||
// 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
|
||||
if (iClient>0 && GetPlayersCountForClient(iClient)>=sso.sso_ctLocalPlayers) {
|
||||
CTString strMessage;
|
||||
strMessage.PrintF(TRANS("Protocol violation"));
|
||||
strMessage.PrintF(TRANSV("Protocol violation"));
|
||||
SendDisconnectMessage(iClient, strMessage);
|
||||
}
|
||||
|
||||
|
@ -1269,7 +1269,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
|
|||
if (CharacterNameIsUsed(pcCharacter)) {
|
||||
// send refusal message
|
||||
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());
|
||||
SendDisconnectMessage(iClient, strMessage);
|
||||
|
||||
|
@ -1500,7 +1500,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
|
|||
if (iClient==0) {
|
||||
strFrom = TRANS("Server");
|
||||
} else {
|
||||
strFrom.PrintF(TRANS("Client %d"), iClient);
|
||||
strFrom.PrintF(TRANSV("Client %d"), iClient);
|
||||
}
|
||||
nmOut<<strFrom;
|
||||
}
|
||||
|
@ -1522,7 +1522,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
|
|||
} break;
|
||||
// if a crc response is received
|
||||
case MSG_REQ_CRCLIST: {
|
||||
CPrintF(TRANS("Sending CRC response\n"));
|
||||
CPrintF(TRANSV("Sending CRC response\n"));
|
||||
// create CRC challenge
|
||||
CTMemoryStream strmCRC;
|
||||
strmCRC<<INDEX(MSG_REQ_CRCCHECK);
|
||||
|
@ -1531,7 +1531,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
|
|||
|
||||
// send the stream to the remote session state
|
||||
_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);
|
||||
|
||||
} break;
|
||||
|
@ -1547,7 +1547,7 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
|
|||
SendDisconnectMessage(iClient, TRANS("Wrong CRC check."));
|
||||
// if same
|
||||
} 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));
|
||||
// use the piggybacked sequence number to initiate sending stream to it
|
||||
CSessionSocket &sso = srv_assoSessions[iClient];
|
||||
|
@ -1566,17 +1566,17 @@ void CServer::Handle(INDEX iClient, CNetworkMessage &nmMessage)
|
|||
if (net_strAdminPassword=="") {
|
||||
CNetworkMessage nmRes(MSG_ADMIN_RESPONSE);
|
||||
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));
|
||||
_pNetwork->SendToClientReliable(iClient, nmRes);
|
||||
} 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));
|
||||
SendDisconnectMessage(iClient, TRANS("Wrong admin password. The attempt was logged."));
|
||||
break;
|
||||
} 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);
|
||||
|
||||
con_bCapture = TRUE;
|
||||
|
|
|
@ -350,7 +350,7 @@ void CSessionState::Start_AtClient_t(INDEX ctLocalPlayers) // throw char *
|
|||
{CNetworkMessage nmKeepAlive(MSG_KEEPALIVE);
|
||||
_pNetwork->SendToServer(nmKeepAlive); }
|
||||
// send data request
|
||||
CPrintF(TRANS("Sending statedelta request\n"));
|
||||
CPrintF(TRANSV("Sending statedelta request\n"));
|
||||
CNetworkMessage nmRequestDelta(MSG_REQ_STATEDELTA);
|
||||
_pNetwork->SendToServerReliable(nmRequestDelta);
|
||||
|
||||
|
@ -376,7 +376,7 @@ void CSessionState::Start_AtClient_t(INDEX ctLocalPlayers) // throw char *
|
|||
{CNetworkMessage nmKeepAlive(MSG_KEEPALIVE);
|
||||
_pNetwork->SendToServer(nmKeepAlive); }
|
||||
|
||||
CPrintF(TRANS("Sending CRC request\n"));
|
||||
CPrintF(TRANSV("Sending CRC request\n"));
|
||||
// send data request
|
||||
CNetworkMessage nmRequestCRC(MSG_REQ_CRCLIST);
|
||||
_pNetwork->SendToServerReliable(nmRequestCRC);
|
||||
|
@ -1125,7 +1125,7 @@ void CSessionState::ProcessGameStream(void)
|
|||
// if not successful
|
||||
} catch(char *strError) {
|
||||
// report error
|
||||
CPrintF(TRANS("Error while playing demo: %s"), strError);
|
||||
CPrintF(TRANSV("Error while playing demo: %s"), strError);
|
||||
_pfNetworkProfile.StopTimer(CNetworkProfile::PTI_SESSIONSTATE_PROCESSGAMESTREAM);
|
||||
return;
|
||||
}
|
||||
|
@ -1148,7 +1148,7 @@ void CSessionState::ProcessGameStream(void)
|
|||
// if not successful
|
||||
} catch(char *strError) {
|
||||
// report error
|
||||
CPrintF(TRANS("Error while recording demo: %s"), strError);
|
||||
CPrintF(TRANSV("Error while recording demo: %s"), strError);
|
||||
// stop recording
|
||||
_pNetwork->StopDemoRec();
|
||||
}
|
||||
|
@ -1209,7 +1209,7 @@ void CSessionState::ProcessGameStream(void)
|
|||
|
||||
extern INDEX 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);
|
||||
}
|
||||
|
||||
|
@ -1342,7 +1342,7 @@ void CSessionState::ProcessGameStreamBlock(CNetworkMessage &nmMessage)
|
|||
FatalError(TRANS("Cannot load Player class:\n%s"), strError);
|
||||
}
|
||||
if (!_pNetwork->IsPlayerLocal(penNewPlayer)) {
|
||||
CPrintF(TRANS("%s joined\n"), (const char *) penNewPlayer->GetPlayerName());
|
||||
CPrintF(TRANSV("%s joined\n"), (const char *) penNewPlayer->GetPlayerName());
|
||||
}
|
||||
} else {
|
||||
// attach entity to client data
|
||||
|
@ -1351,7 +1351,7 @@ void CSessionState::ProcessGameStreamBlock(CNetworkMessage &nmMessage)
|
|||
penNewPlayer->CharacterChanged(pcCharacter);
|
||||
|
||||
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();
|
||||
|
||||
// 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();
|
||||
// deactivate the player
|
||||
ses_apltPlayers[iPlayer].Deactivate();
|
||||
|
@ -1442,9 +1442,9 @@ void CSessionState::ProcessGameStreamBlock(CNetworkMessage &nmMessage)
|
|||
// report who paused
|
||||
if (ses_bPause!=bPauseBefore) {
|
||||
if (ses_bPause) {
|
||||
CPrintF(TRANS("Paused by '%s'\n"), (const char *) strPauser);
|
||||
CPrintF(TRANSV("Paused by '%s'\n"), (const char *) strPauser);
|
||||
} 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);
|
||||
// otherwise
|
||||
} 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());
|
||||
}
|
||||
}
|
||||
|
@ -2031,7 +2031,7 @@ void CSessionState::SessionStateLoop(void)
|
|||
CTString strReason;
|
||||
nmReliable>>strReason;
|
||||
ses_strDisconnected = strReason;
|
||||
CPrintF(TRANS("Disconnected: %s\n"), (const char *) strReason);
|
||||
CPrintF(TRANSV("Disconnected: %s\n"), (const char *) strReason);
|
||||
// disconnect
|
||||
_cmiComm.Client_Close();
|
||||
// if this is recon response
|
||||
|
@ -2042,7 +2042,7 @@ void CSessionState::SessionStateLoop(void)
|
|||
CPrintF("%s", (const char *) ("|"+strResponse+"\n"));
|
||||
// otherwise
|
||||
} 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());
|
||||
}
|
||||
}
|
||||
|
@ -2055,7 +2055,7 @@ void CSessionState::SessionStateLoop(void)
|
|||
(_pTimer->GetHighPrecisionTimer()-ses_tvMessageReceived).GetSeconds()>net_tmDisconnectTimeout &&
|
||||
ses_strDisconnected=="") {
|
||||
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
|
||||
_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* ?
|
||||
CPrintF(TRANS("OGG playing disabled: %s\n"), strError);
|
||||
CPrintF(TRANSV("OGG playing disabled: %s\n"), strError);
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -274,10 +274,10 @@ void CSoundDecoder::InitPlugins(void)
|
|||
|
||||
// if all successful, enable mpx playing
|
||||
_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* ?
|
||||
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;
|
||||
|
||||
} 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) {
|
||||
delete sdc_pogg->ogg_vfVorbisFile;
|
||||
sdc_pogg->ogg_vfVorbisFile = NULL;
|
||||
|
@ -505,7 +505,7 @@ CSoundDecoder::CSoundDecoder(const CTFileName &fnm)
|
|||
ThrowF_t(TRANS("cannot open mpx decoder"));
|
||||
}
|
||||
} 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) {
|
||||
UNZIPClose(iZipHandle);
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ static BOOL StartUp_SDLaudio( CSoundLibrary &sl, BOOL bReport=TRUE)
|
|||
sl.sl_bUsingDirectSound = FALSE;
|
||||
sl.sl_bUsingEAX = FALSE;
|
||||
snd_iDevice = 0;
|
||||
if( bReport) CPrintF(TRANS("SDL audio initialization ...\n"));
|
||||
if( bReport) CPrintF(TRANSV("SDL audio initialization ...\n"));
|
||||
|
||||
ASSERT(!_bDedicatedServer);
|
||||
if (_bDedicatedServer) {
|
||||
|
@ -205,7 +205,7 @@ static BOOL StartUp_SDLaudio( CSoundLibrary &sl, BOOL bReport=TRUE)
|
|||
else if (bps <= 16)
|
||||
desired.format = AUDIO_S16LSB;
|
||||
else {
|
||||
CPrintF(TRANS("Unsupported bits-per-sample: %d\n"), bps);
|
||||
CPrintF(TRANSV("Unsupported bits-per-sample: %d\n"), bps);
|
||||
return FALSE;
|
||||
}
|
||||
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 *
|
||||
((44100+sl.sl_SwfeFormat.nSamplesPerSec-1)/sl.sl_SwfeFormat.nSamplesPerSec);
|
||||
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);
|
||||
CPrintF(TRANS(" output buffers: %d x %d bytes\n"), 2, desired.size);
|
||||
CPrintF(TRANS(" mpx decode: %d bytes\n"), sl.sl_slDecodeBufferSize);
|
||||
CPrintF(TRANSV(" output buffers: %d x %d bytes\n"), 2, desired.size);
|
||||
CPrintF(TRANSV(" mpx decode: %d bytes\n"), sl.sl_slDecodeBufferSize);
|
||||
}
|
||||
|
||||
// initialize mixing and decoding buffer
|
||||
|
@ -688,7 +688,7 @@ static BOOL StartUp_dsound( CSoundLibrary &sl, BOOL bReport=TRUE)
|
|||
// update window handle (just in case)
|
||||
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);
|
||||
_hInstDS = LoadLibraryA( "dsound.dll");
|
||||
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);
|
||||
CPrintF( TRANS(" %dHz, %dbit, %s, mix-ahead: %gs\n"),
|
||||
sl.sl_SwfeFormat.nSamplesPerSec, sl.sl_SwfeFormat.wBitsPerSample, strDevice, snd_tmMixAhead);
|
||||
CPrintF(TRANS(" mixer buffer size: %d KB\n"), sl.sl_slMixerBufferSize /1024);
|
||||
CPrintF(TRANS(" decode buffer size: %d KB\n"), sl.sl_slDecodeBufferSize/1024);
|
||||
CPrintF(TRANSV(" mixer buffer size: %d KB\n"), sl.sl_slMixerBufferSize /1024);
|
||||
CPrintF(TRANSV(" decode buffer size: %d KB\n"), sl.sl_slDecodeBufferSize/1024);
|
||||
// EAX?
|
||||
CTString strEAX = TRANS("Disabled");
|
||||
if( sl.sl_bUsingEAX) strEAX = TRANS("Enabled");
|
||||
|
@ -827,7 +827,7 @@ static BOOL StartUp_waveout( CSoundLibrary &sl, BOOL bReport=TRUE)
|
|||
// not using DirectSound (obviously)
|
||||
sl.sl_bUsingDirectSound = 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
|
||||
INDEX ctMaxRetries = snd_iMaxOpenRetries;
|
||||
_ctChannelsOpened = 0;
|
||||
|
@ -911,11 +911,11 @@ static BOOL StartUp_waveout( CSoundLibrary &sl, BOOL bReport=TRUE)
|
|||
sl.sl_slDecodeBufferSize = sl.sl_slMixerBufferSize *
|
||||
((44100+sl.sl_SwfeFormat.nSamplesPerSec-1)/sl.sl_SwfeFormat.nSamplesPerSec);
|
||||
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);
|
||||
CPrintF(TRANS(" output buffers: %d x %d bytes\n"), ctWOBuffers, WAVEOUTBLOCKSIZE),
|
||||
CPrintF(TRANS(" mpx decode: %d bytes\n"), sl.sl_slDecodeBufferSize),
|
||||
CPrintF(TRANS(" extra sound channels taken: %d\n"), _ctChannelsOpened-1);
|
||||
CPrintF(TRANSV(" output buffers: %d x %d bytes\n"), ctWOBuffers, WAVEOUTBLOCKSIZE),
|
||||
CPrintF(TRANSV(" mpx decode: %d bytes\n"), sl.sl_slDecodeBufferSize),
|
||||
CPrintF(TRANSV(" extra sound channels taken: %d\n"), _ctChannelsOpened-1);
|
||||
}
|
||||
|
||||
// initialise waveout sound buffers
|
||||
|
@ -956,9 +956,9 @@ static void SetFormat_internal( CSoundLibrary &sl, CSoundLibrary::SoundFormat Es
|
|||
|
||||
// if none skip initialization
|
||||
_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( bReport) CPrintF(TRANS(" (no sound)\n"));
|
||||
if( bReport) CPrintF(TRANSV(" (no sound)\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1039,13 +1039,13 @@ void CSoundLibrary::Init(void)
|
|||
// !!! FIXME : rcg12162001 This should probably be done everywhere, honestly.
|
||||
#ifdef PLATFORM_UNIX
|
||||
if (_bDedicatedServer) {
|
||||
CPrintF(TRANS("Dedicated server; not initializing sound.\n"));
|
||||
CPrintF(TRANSV("Dedicated server; not initializing sound.\n"));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// print header
|
||||
CPrintF(TRANS("Initializing sound...\n"));
|
||||
CPrintF(TRANSV("Initializing sound...\n"));
|
||||
|
||||
// initialize sound library and set no-sound format
|
||||
SetFormat(SF_NONE);
|
||||
|
@ -1059,7 +1059,7 @@ void CSoundLibrary::Init(void)
|
|||
#ifdef PLATFORM_WIN32
|
||||
// get number of devices
|
||||
INDEX ctDevices = waveOutGetNumDevs();
|
||||
CPrintF(TRANS(" Detected devices: %d\n"), ctDevices);
|
||||
CPrintF(TRANSV(" Detected devices: %d\n"), ctDevices);
|
||||
sl_ctWaveDevices = ctDevices;
|
||||
|
||||
// for each device
|
||||
|
@ -1068,11 +1068,11 @@ void CSoundLibrary::Init(void)
|
|||
WAVEOUTCAPS woc;
|
||||
memset( &woc, 0, sizeof(woc));
|
||||
MMRESULT res = waveOutGetDevCaps(iDevice, &woc, sizeof(woc));
|
||||
CPrintF(TRANS(" device %d: %s\n"),
|
||||
CPrintF(TRANSV(" device %d: %s\n"),
|
||||
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);
|
||||
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);
|
||||
}
|
||||
// done
|
||||
|
|
|
@ -291,8 +291,8 @@ void CHashTable_TYPE::ReportEfficiency()
|
|||
dAvg = dSum/ht_ctCompartments; // average number of full slots per compartement
|
||||
dStDev = sqrt((dSum2-2*dSum*dAvg+ulCount*dAvg*dAvg)/(ulCount-1));
|
||||
|
||||
CPrintF(TRANS("Hash table efficiency report:\n"));
|
||||
CPrintF(TRANS(" 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(TRANS(" Standard deviation is: %5.2f\n"),dStDev);
|
||||
CPrintF(TRANSV("Hash table efficiency report:\n"));
|
||||
CPrintF(TRANSV(" Compartements: %ld, Slots per compartement: %ld, Full slots: %ld\n"),ht_ctCompartments,ht_ctSlotsPerComp,ulCount);
|
||||
CPrintF(TRANSV(" Percentage of full slots: %5.2f%%, Average full slots per compartement: %5.2f \n"),dFullPercent*100,dAvg);
|
||||
CPrintF(TRANSV(" Standard deviation is: %5.2f\n"),dStDev);
|
||||
}
|
|
@ -158,7 +158,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
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;
|
||||
}
|
||||
virtual const CTFileName &GetComputerMessageName(void) const {
|
||||
|
|
|
@ -360,7 +360,7 @@ functions:
|
|||
try {
|
||||
m_aoLightAnimation.SetData_t(CTFILENAME("Animations\\BasicEffects.ani"));
|
||||
} catch (char *strError) {
|
||||
WarningMessage(TRANS("Cannot load Animations\\BasicEffects.ani: %s"), strError);
|
||||
WarningMessage(TRANSV("Cannot load Animations\\BasicEffects.ani: %s"), strError);
|
||||
}
|
||||
// play light animation
|
||||
if (m_aoLightAnimation.GetData()!=NULL) {
|
||||
|
|
|
@ -76,7 +76,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
CTString str;
|
||||
str.PrintF(TRANS("A Reptiloid killed %s"), (const char *) strPlayerName);
|
||||
str.PrintF(TRANSV("A Reptiloid killed %s"), (const char *) strPlayerName);
|
||||
return str;
|
||||
}
|
||||
virtual const CTFileName &GetComputerMessageName(void) const {
|
||||
|
|
|
@ -77,9 +77,9 @@ functions:
|
|||
{
|
||||
CTString str;
|
||||
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 {
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
CTString str;
|
||||
str.PrintF(TRANS("A Cannon killed %s"), (const char *) strPlayerName);
|
||||
str.PrintF(TRANSV("A Cannon killed %s"), (const char *) strPlayerName);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
CTString str;
|
||||
str.PrintF(TRANS("A Cannon killed %s"), (const char *) strPlayerName);
|
||||
str.PrintF(TRANSV("A Cannon killed %s"), (const char *) strPlayerName);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
CTString str;
|
||||
str.PrintF(TRANS("Chainsaw freak dismembered %s"), (const char *) strPlayerName);
|
||||
str.PrintF(TRANSV("Chainsaw freak dismembered %s"), (const char *) strPlayerName);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
|
|
@ -903,7 +903,7 @@ BOOL SetPlayerAppearance_internal(CModelObject *pmo, const CTFileName &fnmAMC, C
|
|||
// if anything failed
|
||||
} catch (char *strError) {
|
||||
// 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);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1334,7 +1334,7 @@ CEntity *FixupCausedToPlayer(CEntity *penThis, CEntity *penCaused, BOOL bWarning
|
|||
}
|
||||
|
||||
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->GetDescription(),
|
||||
(const char*)penThis->GetClass()->GetName());
|
||||
|
|
|
@ -74,7 +74,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
CTString str;
|
||||
str.PrintF(TRANS("A Demon executed %s"), (const char *) strPlayerName);
|
||||
str.PrintF(TRANSV("A Demon executed %s"), (const char *) strPlayerName);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
CTString str;
|
||||
str.PrintF(TRANS("Ugh Zan killed %s"), (const char *) strPlayerName);
|
||||
str.PrintF(TRANSV("Ugh Zan killed %s"), (const char *) strPlayerName);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ procedures:
|
|||
/*
|
||||
// tell the key bearer that the key was used
|
||||
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);
|
||||
*/
|
||||
// become automatic door
|
||||
|
|
|
@ -273,7 +273,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
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;
|
||||
}
|
||||
virtual const CTFileName &GetComputerMessageName(void) const {
|
||||
|
|
|
@ -231,7 +231,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -896,7 +896,7 @@ functions:
|
|||
// if boss, clear boss
|
||||
if (m_bBoss) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -499,7 +499,7 @@ functions:
|
|||
|
||||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,9 +77,9 @@ functions:
|
|||
{
|
||||
CTString str;
|
||||
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 {
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
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;
|
||||
}
|
||||
virtual const CTFileName &GetComputerMessageName(void) const {
|
||||
|
|
|
@ -47,7 +47,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
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;
|
||||
}
|
||||
virtual const CTFileName &GetComputerMessageName(void) const {
|
||||
|
|
|
@ -75,7 +75,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
CTString str;
|
||||
str.PrintF(TRANS("Guffy gunned %s down"), (const char *) strPlayerName);
|
||||
str.PrintF(TRANSV("Guffy gunned %s down"), (const char *) strPlayerName);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,14 +88,14 @@ functions:
|
|||
CTString str;
|
||||
if (eDeath.eLastDamage.dmtType==DMT_EXPLOSION) {
|
||||
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 {
|
||||
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) {
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -928,41 +928,41 @@ void PrintPlayerDeathMessage(CPlayer *ppl, const EDeath &eDeath)
|
|||
CTString strKillerName = ((CPlayer*)penKiller)->GetPlayerName();
|
||||
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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 {
|
||||
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 {
|
||||
// make message from damage type
|
||||
switch(eDeath.eLastDamage.dmtType) {
|
||||
case DMT_DROWNING: CPrintF(TRANS("%s drowned\n"), (const char *) strMyName); break;
|
||||
case DMT_BURNING: CPrintF(TRANS("%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_FREEZING: CPrintF(TRANS("%s has frozen\n"), (const char *) strMyName); break;
|
||||
case DMT_ACID: CPrintF(TRANS("%s dissolved\n"), (const char *) strMyName); break;
|
||||
case DMT_DROWNING: CPrintF(TRANSV("%s drowned\n"), (const char *) strMyName); break;
|
||||
case DMT_BURNING: CPrintF(TRANSV("%s burst into flames\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(TRANSV("%s has frozen\n"), (const char *) strMyName); break;
|
||||
case DMT_ACID: CPrintF(TRANSV("%s dissolved\n"), (const char *) strMyName); break;
|
||||
case DMT_PROJECTILE:
|
||||
case DMT_EXPLOSION:
|
||||
CPrintF(TRANS("%s blew himself away\n"), (const char *) strMyName); break;
|
||||
default: CPrintF(TRANS("%s has committed suicide\n"), (const char *) strMyName);
|
||||
CPrintF(TRANSV("%s blew himself away\n"), (const char *) strMyName); break;
|
||||
default: CPrintF(TRANSV("%s has committed suicide\n"), (const char *) strMyName);
|
||||
}
|
||||
}
|
||||
// if killed by an enemy
|
||||
} else if (IsDerivedFromClass(penKiller, "Enemy Base")) {
|
||||
// check for telefrag first
|
||||
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;
|
||||
}
|
||||
// describe how this enemy killed player
|
||||
|
@ -972,17 +972,17 @@ void PrintPlayerDeathMessage(CPlayer *ppl, const EDeath &eDeath)
|
|||
} else {
|
||||
// make message from damage type
|
||||
switch(eDeath.eLastDamage.dmtType) {
|
||||
case DMT_SPIKESTAB: CPrintF(TRANS("%s was pierced\n"), (const char *) strMyName); break;
|
||||
case DMT_BRUSH: CPrintF(TRANS("%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_IMPACT: CPrintF(TRANS("%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;
|
||||
default: CPrintF(TRANS("%s passed away\n"), (const char *) strMyName);
|
||||
case DMT_SPIKESTAB: CPrintF(TRANSV("%s was pierced\n"), (const char *) strMyName); break;
|
||||
case DMT_BRUSH: CPrintF(TRANSV("%s was squashed\n"), (const char *) strMyName); break;
|
||||
case DMT_ABYSS: CPrintF(TRANSV("%s went over the edge\n"), (const char *) strMyName); break;
|
||||
case DMT_IMPACT: CPrintF(TRANSV("%s swashed\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(TRANSV("%s passed away\n"), (const char *) strMyName);
|
||||
}
|
||||
}
|
||||
// if no entity pointer (shouldn't happen)
|
||||
} 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->SetTextAspect( 1.0f);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -3373,7 +3373,7 @@ functions:
|
|||
ItemPicked(strKey, 0);
|
||||
// if in cooperative
|
||||
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;
|
||||
}
|
||||
|
@ -3772,14 +3772,14 @@ functions:
|
|||
// if the name has changed
|
||||
if (pcOrg.GetName()!=pcNew.GetName()) {
|
||||
// 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());
|
||||
}
|
||||
|
||||
// if the team has changed
|
||||
if (pcOrg.GetTeam()!=pcNew.GetTeam()) {
|
||||
// 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());
|
||||
}
|
||||
|
||||
|
@ -3794,12 +3794,12 @@ functions:
|
|||
if (bSuccess) {
|
||||
ParseGender(strNewLook);
|
||||
// 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);
|
||||
// if failed
|
||||
} else {
|
||||
// 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());
|
||||
}
|
||||
// attach weapon to new appearance
|
||||
|
@ -4433,21 +4433,21 @@ functions:
|
|||
}
|
||||
|
||||
// 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());
|
||||
|
||||
// report number of credits left
|
||||
if (GetSP()->sp_ctCredits>0) {
|
||||
if (GetSP()->sp_ctCreditsLeft==0) {
|
||||
CPrintF(TRANS(" no more credits left!\n"));
|
||||
CPrintF(TRANSV(" no more credits left!\n"));
|
||||
} else {
|
||||
CPrintF(TRANS(" %d credits left\n"), GetSP()->sp_ctCreditsLeft);
|
||||
CPrintF(TRANSV(" %d credits left\n"), GetSP()->sp_ctCreditsLeft);
|
||||
}
|
||||
}
|
||||
// if no more credits left
|
||||
} else {
|
||||
// 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
|
||||
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),
|
||||
m_psLevelStats.ps_iScore,
|
||||
m_psLevelStats.ps_iKills, m_psLevelTotal.ps_iKills,
|
||||
|
@ -5638,11 +5638,11 @@ procedures:
|
|||
// if killed by a player
|
||||
if (pplKillerPlayer!=NULL) {
|
||||
// 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
|
||||
} else {
|
||||
// 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 (penNextPlayer!=NULL) {
|
||||
// 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());
|
||||
penNextPlayer->m_ulKeys |= m_ulKeys;
|
||||
}
|
||||
|
|
|
@ -3004,7 +3004,7 @@ functions:
|
|||
strMessage.DeleteChar(iLen-1);
|
||||
};
|
||||
if( iAmmoTypes>4 ) {
|
||||
strMessage.PrintF(TRANS("Ammo pack"));
|
||||
strMessage.PrintF(TRANSV("Ammo pack"));
|
||||
};
|
||||
|
||||
((CPlayer&)*m_penPlayer).ItemPicked(strMessage, 0);
|
||||
|
|
|
@ -91,9 +91,9 @@ functions:
|
|||
{
|
||||
CTString str;
|
||||
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 {
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -266,7 +266,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
CTString str;
|
||||
str.PrintF(TRANS("The Summoner unsummoned %s"), (const char *) strPlayerName);
|
||||
str.PrintF(TRANSV("The Summoner unsummoned %s"), (const char *) strPlayerName);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ procedures:
|
|||
call SendEventToTargets();
|
||||
} else if (m_bTellCount) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ functions:
|
|||
virtual CTString GetPlayerKillDescription(const CTString &strPlayerName, const EDeath &eDeath)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,9 +64,9 @@ functions:
|
|||
{
|
||||
CTString str;
|
||||
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 {
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -570,7 +570,7 @@ void PrintTitle(CDrawPort *pdp)
|
|||
{
|
||||
SetFont2(pdp);
|
||||
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());
|
||||
pdp->PutText( strTitle, _pixMarginI*3, _pixMarginJ-2*_fScaling2+1, _colMedium);
|
||||
}
|
||||
|
|
|
@ -1060,7 +1060,7 @@ void CGame::InitInternal( void)
|
|||
try {
|
||||
Load_t();
|
||||
} 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();
|
||||
|
@ -1154,7 +1154,7 @@ BOOL CGame::NewGame(const CTString &strSessionName, const CTFileName &fnWorld,
|
|||
// stop network provider
|
||||
_pNetwork->StopProvider();
|
||||
// and display error
|
||||
CPrintF(TRANS("Cannot start game:\n%s\n"), strError);
|
||||
CPrintF(TRANSV("Cannot start game:\n%s\n"), strError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1200,7 +1200,7 @@ BOOL CGame::JoinGame(const CNetworkSession &session)
|
|||
// stop network provider
|
||||
_pNetwork->StopProvider();
|
||||
// and display error
|
||||
CPrintF(TRANS("Cannot join game:\n%s\n"), strError);
|
||||
CPrintF(TRANSV("Cannot join game:\n%s\n"), strError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1232,12 +1232,12 @@ BOOL CGame::LoadGame(const CTFileName &fnGame)
|
|||
// start the new session
|
||||
try {
|
||||
_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) {
|
||||
// stop network provider
|
||||
_pNetwork->StopProvider();
|
||||
// and display error
|
||||
CPrintF(TRANS("Cannot load game: %s\n"), strError);
|
||||
CPrintF(TRANSV("Cannot load game: %s\n"), strError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1282,12 +1282,12 @@ BOOL CGame::StartDemoPlay(const CTFileName &fnDemo)
|
|||
// start the new session
|
||||
try {
|
||||
_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) {
|
||||
// stop network provider
|
||||
_pNetwork->StopProvider();
|
||||
// and display error
|
||||
CPrintF(TRANS("Cannot play demo: %s\n"), strError);
|
||||
CPrintF(TRANSV("Cannot play demo: %s\n"), strError);
|
||||
gm_bFirstLoading = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1326,13 +1326,13 @@ BOOL CGame::StartDemoRec(const CTFileName &fnDemo)
|
|||
// save demo recording
|
||||
try {
|
||||
_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
|
||||
SaveThumbnail(fnDemo.NoExt()+"Tbn.tex");
|
||||
return TRUE;
|
||||
} catch (char *strError) {
|
||||
// and display error
|
||||
CPrintF(TRANS("Cannot start recording: %s\n"), strError);
|
||||
CPrintF(TRANSV("Cannot start recording: %s\n"), strError);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -1344,7 +1344,7 @@ void CGame::StopDemoRec(void)
|
|||
if (!gm_bGameOn) return;
|
||||
|
||||
_pNetwork->StopDemoRec();
|
||||
CPrintF(TRANS("Finished recording.\n"));
|
||||
CPrintF(TRANSV("Finished recording.\n"));
|
||||
}
|
||||
|
||||
BOOL CGame::SaveGame(const CTFileName &fnGame)
|
||||
|
@ -1354,7 +1354,7 @@ BOOL CGame::SaveGame(const CTFileName &fnGame)
|
|||
INDEX ctLivePlayers = GetLivePlayersCount();
|
||||
if (ctPlayers>0 && ctLivePlayers<=0) {
|
||||
// display error
|
||||
CPrintF(TRANS("Won't save game when dead!\n"));
|
||||
CPrintF(TRANSV("Won't save game when dead!\n"));
|
||||
// do not save
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1362,12 +1362,12 @@ BOOL CGame::SaveGame(const CTFileName &fnGame)
|
|||
// save new session
|
||||
try {
|
||||
_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");
|
||||
return TRUE;
|
||||
} catch (char *strError) {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
@ -1760,7 +1760,7 @@ BOOL CGame::AddPlayers(void)
|
|||
}
|
||||
}
|
||||
} catch (char *strError) {
|
||||
CPrintF(TRANS("Cannot add player:\n%s\n"), strError);
|
||||
CPrintF(TRANSV("Cannot add player:\n%s\n"), strError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2292,7 +2292,7 @@ void CGame::GameRedrawView( CDrawPort *pdpDrawPort, ULONG ulFlags)
|
|||
// print pause indicators
|
||||
CTString strIndicator;
|
||||
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()) {
|
||||
strIndicator = TRANS("Waiting for all players to connect");
|
||||
} else if (_pNetwork->IsWaitingForServer()) {
|
||||
|
|
|
@ -115,12 +115,12 @@ extern void ApplyGLSettings(BOOL bForce)
|
|||
// if none found
|
||||
if (pse==NULL) {
|
||||
// error
|
||||
CPrintF(TRANS("No matching preferences found! Automatic adjustment disabled!\n"));
|
||||
CPrintF(TRANSV("No matching preferences found! Automatic adjustment disabled!\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
// report
|
||||
CPrintF(TRANS("Matching: %s (%s)\n"),
|
||||
CPrintF(TRANSV("Matching: %s (%s)\n"),
|
||||
(const char *) pse->se_strRenderer,
|
||||
(const char *) pse->se_strDescription);
|
||||
|
||||
|
@ -130,17 +130,17 @@ extern void ApplyGLSettings(BOOL bForce)
|
|||
// if same as last
|
||||
if( pse->se_strDescription==_strLastRenderer && sam_iVideoSetup==_iLastPreferences) {
|
||||
// do nothing
|
||||
CPrintF(TRANS("Similar to last, keeping same preferences.\n"));
|
||||
CPrintF(TRANSV("Similar to last, keeping same preferences.\n"));
|
||||
return;
|
||||
}
|
||||
CPrintF(TRANS("Different than last, applying new preferences.\n"));
|
||||
CPrintF(TRANSV("Different than last, applying new preferences.\n"));
|
||||
} else {
|
||||
CPrintF(TRANS("Applying new preferences.\n"));
|
||||
CPrintF(TRANSV("Applying new preferences.\n"));
|
||||
}
|
||||
|
||||
// clamp rendering preferences (just to be on the safe side)
|
||||
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 (sam_iVideoSetup<3) {
|
||||
// execute the script
|
||||
|
@ -151,7 +151,7 @@ extern void ApplyGLSettings(BOOL bForce)
|
|||
_pShell->Execute("RefreshTextures();");
|
||||
}
|
||||
// done
|
||||
CPrintF(TRANS("Done.\n\n"));
|
||||
CPrintF(TRANSV("Done.\n\n"));
|
||||
|
||||
// remember settings
|
||||
_strLastRenderer = pse->se_strDescription;
|
||||
|
|
|
@ -90,7 +90,7 @@ int qsort_CompareLevels(const void *elem1, const void *elem2 )
|
|||
// init level-info subsystem
|
||||
void LoadLevelsList(void)
|
||||
{
|
||||
CPrintF(TRANS("Reading levels directory...\n"));
|
||||
CPrintF(TRANSV("Reading levels directory...\n"));
|
||||
|
||||
// list the levels directory with subdirs
|
||||
CDynamicStackArray<CTFileName> afnmDir;
|
||||
|
@ -100,11 +100,11 @@ void LoadLevelsList(void)
|
|||
for (INDEX i=0; i<afnmDir.Count(); 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
|
||||
CLevelInfo li;
|
||||
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
|
||||
CLevelInfo *pliNew = new CLevelInfo;
|
||||
|
@ -112,7 +112,7 @@ void LoadLevelsList(void)
|
|||
// add it to list of all levels
|
||||
_lhAllLevels.AddTail(pliNew->li_lnNode);
|
||||
} 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
|
||||
void LoadDemosList(void)
|
||||
{
|
||||
CPrintF(TRANS("Reading demos directory...\n"));
|
||||
CPrintF(TRANSV("Reading demos directory...\n"));
|
||||
|
||||
// list the levels directory with subdirs
|
||||
CDynamicStackArray<CTFileName> afnmDir;
|
||||
|
|
|
@ -686,10 +686,10 @@ CTString GetResolutionDescription(CDisplayMode &dm)
|
|||
CTString str;
|
||||
// if dual head
|
||||
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
|
||||
} 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
|
||||
} else {
|
||||
str.PrintF("%dx%d", dm.dm_pixSizeI, dm.dm_pixSizeJ);
|
||||
|
@ -933,7 +933,7 @@ void ModConnectConfirm(void)
|
|||
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;
|
||||
_pConfimedNo = NULL;
|
||||
mgConfirmLabel.mg_strText = TRANS("CHANGE THE MOD?");
|
||||
|
@ -4276,7 +4276,7 @@ void CControlsMenu::StartMenu(void)
|
|||
|
||||
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();
|
||||
CGameMenu::StartMenu();
|
||||
|
@ -4558,7 +4558,7 @@ BOOL CLoadSaveMenu::ParseFile(const CTFileName &fnm, CTString &strName)
|
|||
INDEX iCtl = -1;
|
||||
strName.ScanF("Controls%d", &iCtl);
|
||||
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) {
|
||||
mg_strText = "????";
|
||||
} 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
|
||||
|
||||
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");
|
||||
if (_hLock == NULL) {
|
||||
|
@ -402,7 +402,7 @@ void InitializeGame(void)
|
|||
try {
|
||||
#ifdef STATICALLY_LINKED
|
||||
#define fnmExpanded NULL
|
||||
CPrintF(TRANS("Loading game library '%s'...\n"), "(statically linked)");
|
||||
CPrintF(TRANSV("Loading game library '%s'...\n"), "(statically linked)");
|
||||
#else
|
||||
CTFileName fnmDLL;
|
||||
#ifndef NDEBUG
|
||||
|
@ -414,7 +414,7 @@ void InitializeGame(void)
|
|||
fnmDLL = CDynamicLoader::ConvertLibNameToPlatform(fnmDLL);
|
||||
CTFileName 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
|
||||
|
||||
const char *err;
|
||||
|
@ -562,8 +562,8 @@ BOOL Init( HINSTANCE hInstance, int nCmdShow, CTString strCmdLine)
|
|||
// !! NOTE !! Re-enable these to allow mod support.
|
||||
//LoadStringVar(CTString("Data\\Var\\Sam_Version.var"), sam_strVersion);
|
||||
//LoadStringVar(CTString("Data\\Var\\ModName.var"), sam_strModName);
|
||||
CPrintF(TRANS("Serious Sam version: %s\n"), (const char *) sam_strVersion);
|
||||
CPrintF(TRANS("Active mod: %s\n"), (const char *) sam_strModName);
|
||||
CPrintF(TRANSV("Serious Sam version: %s\n"), (const char *) sam_strVersion);
|
||||
CPrintF(TRANSV("Active mod: %s\n"), (const char *) sam_strModName);
|
||||
InitializeMenus();
|
||||
|
||||
// if there is a mod
|
||||
|
@ -606,7 +606,7 @@ BOOL Init( HINSTANCE hInstance, int nCmdShow, CTString strCmdLine)
|
|||
_pShell->SetINDEX("net_iPort", 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
|
||||
_pGame->gam_strJoinAddress = cmd_strServer;
|
||||
if (cmd_bQuickJoin) {
|
||||
|
@ -617,11 +617,11 @@ BOOL Init( HINSTANCE hInstance, int nCmdShow, CTString strCmdLine)
|
|||
}
|
||||
// if starting world from command line
|
||||
} 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 {
|
||||
if (cmd_iGoToMarker>=0) {
|
||||
CPrintF(TRANS("Command line marker: %d\n"), cmd_iGoToMarker);
|
||||
CPrintF(TRANSV("Command line marker: %d\n"), cmd_iGoToMarker);
|
||||
CTString strCommand;
|
||||
strCommand.PrintF("cht_iGoToMarker = %d;", cmd_iGoToMarker);
|
||||
_pShell->Execute(strCommand);
|
||||
|
@ -635,7 +635,7 @@ BOOL Init( HINSTANCE hInstance, int nCmdShow, CTString strCmdLine)
|
|||
StartSinglePlayerGame();
|
||||
}
|
||||
} 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
|
||||
} else {
|
||||
|
@ -1254,7 +1254,7 @@ int SubMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int
|
|||
// if addon is to be executed
|
||||
if (_iAddonExecState==1) {
|
||||
// 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;
|
||||
_iAddonExecState = 2;
|
||||
// if addon is ready for execution
|
||||
|
@ -1263,7 +1263,7 @@ int SubMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int
|
|||
CTString strCmd;
|
||||
strCmd.PrintF("include \"%s\"", (const char*)_fnmAddonToExec);
|
||||
_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;
|
||||
}
|
||||
|
||||
|
@ -1623,7 +1623,7 @@ void StartNewMode( enum GfxAPIType eGfxAPI, INDEX iAdapter, PIX pixSizeI, PIX pi
|
|||
eColorDepth = (DisplayDepth)aDefaultModes[iMode][0];
|
||||
eGfxAPI = (GfxAPIType) aDefaultModes[iMode][1];
|
||||
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);
|
||||
if( bSuccess) break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user