doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Typedefs | Enumerations | Functions | Variables
Common.cpp File Reference
#include "../idlib/precompiled.h"
#include "../renderer/Image.h"

Go to the source code of this file.

Classes

struct  version_s
 
class  idCommonLocal
 
struct  asyncStats_t
 

Macros

#define MAX_PRINT_MSG_SIZE   4096
 
#define MAX_WARNING_LIST   256
 
#define BUILD_DEBUG   ""
 
#define ASYNCSOUND_INFO   "0: mix sound inline, 1: memory mapped async mix, 2: callback mixing, 3: write async mix"
 
#define MAX_CONSOLE_LINES   32
 

Typedefs

typedef idHashTable< idStrListListHash
 

Enumerations

enum  errorParm_t { ERP_NONE, ERP_FATAL, ERP_DROP, ERP_DISCONNECT }
 

Functions

void Com_WriteConfig_f (const idCmdArgs &args)
 
void Com_SetMachineSpec_f (const idCmdArgs &args)
 
void Com_ExecMachineSpec_f (const idCmdArgs &args)
 
void Com_ReloadEngine_f (const idCmdArgs &args)
 
void Com_ReloadLanguage_f (const idCmdArgs &args)
 
void LoadMapLocalizeData (ListHash &listHash)
 
void LoadGuiParmExcludeList (idStrList &list)
 
bool TestMapVal (idStr &str)
 
bool TestGuiParm (const char *parm, const char *value, idStrList &excludeList)
 
void GetFileList (const char *dir, const char *ext, idStrList &list)
 
int LocalizeMap (const char *mapName, idLangDict &langDict, ListHash &listHash, idStrList &excludeList, bool writeFile)
 
void Com_LocalizeMaps_f (const idCmdArgs &args)
 
void Com_LocalizeGuis_f (const idCmdArgs &args)
 
void Com_LocalizeGuiParmsTest_f (const idCmdArgs &args)
 
void Com_LocalizeMapsTest_f (const idCmdArgs &args)
 
void Com_StartBuild_f (const idCmdArgs &args)
 
void Com_FinishBuild_f (const idCmdArgs &args)
 
void Com_Help_f (const idCmdArgs &args)
 

Variables

struct version_s version
 
idCVar com_version ("si_version", version.string, CVAR_SYSTEM|CVAR_ROM|CVAR_SERVERINFO,"engine version")
 
idCVar com_skipRenderer ("com_skipRenderer","0", CVAR_BOOL|CVAR_SYSTEM,"skip the renderer completely")
 
idCVar com_machineSpec ("com_machineSpec","-1", CVAR_INTEGER|CVAR_ARCHIVE|CVAR_SYSTEM,"hardware classification, -1 = not detected, 0 = low quality, 1 = medium quality, 2 = high quality, 3 = ultra quality")
 
idCVar com_purgeAll ("com_purgeAll","0", CVAR_BOOL|CVAR_ARCHIVE|CVAR_SYSTEM,"purge everything between level loads")
 
idCVar com_memoryMarker ("com_memoryMarker","-1", CVAR_INTEGER|CVAR_SYSTEM|CVAR_INIT,"used as a marker for memory stats")
 
idCVar com_preciseTic ("com_preciseTic","1", CVAR_BOOL|CVAR_SYSTEM,"run one game tick every async thread update")
 
idCVar com_asyncInput ("com_asyncInput","0", CVAR_BOOL|CVAR_SYSTEM,"sample input from the async thread")
 
idCVar com_asyncSound ("com_asyncSound","1", CVAR_INTEGER|CVAR_SYSTEM, ASYNCSOUND_INFO, 0, 1)
 
idCVar com_forceGenericSIMD ("com_forceGenericSIMD","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"force generic platform independent SIMD")
 
idCVar com_developer ("developer","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"developer mode")
 
idCVar com_allowConsole ("com_allowConsole","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"allow toggling console with the tilde key")
 
idCVar com_speeds ("com_speeds","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"show engine timings")
 
idCVar com_showFPS ("com_showFPS","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_ARCHIVE|CVAR_NOCHEAT,"show frames rendered per second")
 
idCVar com_showMemoryUsage ("com_showMemoryUsage","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"show total and per frame memory usage")
 
idCVar com_showAsyncStats ("com_showAsyncStats","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"show async network stats")
 
idCVar com_showSoundDecoders ("com_showSoundDecoders","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"show sound decoders")
 
idCVar com_timestampPrints ("com_timestampPrints","0", CVAR_SYSTEM,"print time with each console print, 1 = msec, 2 = sec", 0, 2, idCmdSystem::ArgCompletion_Integer< 0, 2 >)
 
idCVar com_timescale ("timescale","1", CVAR_SYSTEM|CVAR_FLOAT,"scales the time", 0.1f, 10.0f)
 
idCVar com_logFile ("logFile","0", CVAR_SYSTEM|CVAR_NOCHEAT,"1 = buffer log, 2 = flush after each print", 0, 2, idCmdSystem::ArgCompletion_Integer< 0, 2 >)
 
idCVar com_logFileName ("logFileName","qconsole.log", CVAR_SYSTEM|CVAR_NOCHEAT,"name of log file, if empty, qconsole.log will be used")
 
idCVar com_makingBuild ("com_makingBuild","0", CVAR_BOOL|CVAR_SYSTEM,"1 when making a build")
 
idCVar com_updateLoadSize ("com_updateLoadSize","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"update the load size after loading a map")
 
idCVar com_videoRam ("com_videoRam","64", CVAR_INTEGER|CVAR_SYSTEM|CVAR_NOCHEAT|CVAR_ARCHIVE,"holds the last amount of detected video ram")
 
idCVar com_product_lang_ext ("com_product_lang_ext","1", CVAR_INTEGER|CVAR_SYSTEM|CVAR_ARCHIVE,"Extension to use when creating language files.")
 
int time_gameFrame
 
int time_gameDraw
 
int time_frontend
 
int time_backend
 
int com_frameTime
 
int com_frameNumber
 
volatile int com_ticNumber
 
int com_editors
 
bool com_editorActive
 
idCommonLocal commonLocal
 
idCommoncommon = &commonLocal
 
int com_numConsoleLines
 
idCmdArgs com_consoleLines [MAX_CONSOLE_LINES]
 
asyncStats_t com_asyncStats [MAX_ASYNC_STATS]
 
int prevAsyncMsec
 
int lastTicMsec
 

Macro Definition Documentation

#define ASYNCSOUND_INFO   "0: mix sound inline, 1: memory mapped async mix, 2: callback mixing, 3: write async mix"

Definition at line 62 of file Common.cpp.

#define BUILD_DEBUG   ""

Definition at line 47 of file Common.cpp.

#define MAX_CONSOLE_LINES   32

Definition at line 810 of file Common.cpp.

#define MAX_PRINT_MSG_SIZE   4096

Definition at line 34 of file Common.cpp.

#define MAX_WARNING_LIST   256

Definition at line 35 of file Common.cpp.

Typedef Documentation

Definition at line 1825 of file Common.cpp.

Enumeration Type Documentation

Enumerator
ERP_NONE 
ERP_FATAL 
ERP_DROP 
ERP_DISCONNECT 

Definition at line 37 of file Common.cpp.

Function Documentation

void Com_ExecMachineSpec_f ( const idCmdArgs args)

Definition at line 1410 of file Common.cpp.

void Com_FinishBuild_f ( const idCmdArgs args)

Definition at line 2287 of file Common.cpp.

void Com_Help_f ( const idCmdArgs args)

Definition at line 2299 of file Common.cpp.

void Com_LocalizeGuiParmsTest_f ( const idCmdArgs args)

Definition at line 2143 of file Common.cpp.

void Com_LocalizeGuis_f ( const idCmdArgs args)

Definition at line 2098 of file Common.cpp.

void Com_LocalizeMaps_f ( const idCmdArgs args)

Definition at line 2028 of file Common.cpp.

void Com_LocalizeMapsTest_f ( const idCmdArgs args)

Definition at line 2190 of file Common.cpp.

void Com_ReloadEngine_f ( const idCmdArgs args)

Definition at line 1555 of file Common.cpp.

void Com_ReloadLanguage_f ( const idCmdArgs args)

Definition at line 1821 of file Common.cpp.

void Com_SetMachineSpec_f ( const idCmdArgs args)

Definition at line 1397 of file Common.cpp.

void Com_StartBuild_f ( const idCmdArgs args)

Definition at line 2278 of file Common.cpp.

void Com_WriteConfig_f ( const idCmdArgs args)

Definition at line 1378 of file Common.cpp.

void GetFileList ( const char *  dir,
const char *  ext,
idStrList list 
)

Definition at line 1922 of file Common.cpp.

void LoadGuiParmExcludeList ( idStrList list)

Definition at line 1860 of file Common.cpp.

void LoadMapLocalizeData ( ListHash listHash)

Definition at line 1826 of file Common.cpp.

int LocalizeMap ( const char *  mapName,
idLangDict langDict,
ListHash listHash,
idStrList excludeList,
bool  writeFile 
)

Definition at line 1943 of file Common.cpp.

bool TestGuiParm ( const char *  parm,
const char *  value,
idStrList excludeList 
)

Definition at line 1891 of file Common.cpp.

bool TestMapVal ( idStr str)

Definition at line 1882 of file Common.cpp.

Variable Documentation

idCVar com_allowConsole("com_allowConsole","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"allow toggling console with the tilde key")
idCVar com_asyncInput("com_asyncInput","0", CVAR_BOOL|CVAR_SYSTEM,"sample input from the async thread")
idCVar com_asyncSound("com_asyncSound","1", CVAR_INTEGER|CVAR_SYSTEM, ASYNCSOUND_INFO, 0, 1)
asyncStats_t com_asyncStats[MAX_ASYNC_STATS]

Definition at line 2543 of file Common.cpp.

idCmdArgs com_consoleLines[MAX_CONSOLE_LINES]

Definition at line 812 of file Common.cpp.

idCVar com_developer("developer","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"developer mode")
bool com_editorActive

Definition at line 98 of file Common.cpp.

int com_editors

Definition at line 97 of file Common.cpp.

idCVar com_forceGenericSIMD("com_forceGenericSIMD","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"force generic platform independent SIMD")
int com_frameNumber

Definition at line 95 of file Common.cpp.

int com_frameTime

Definition at line 94 of file Common.cpp.

idCVar com_logFile("logFile","0", CVAR_SYSTEM|CVAR_NOCHEAT,"1 = buffer log, 2 = flush after each print", 0, 2, idCmdSystem::ArgCompletion_Integer< 0, 2 >)
idCVar com_logFileName("logFileName","qconsole.log", CVAR_SYSTEM|CVAR_NOCHEAT,"name of log file, if empty, qconsole.log will be used")
idCVar com_machineSpec("com_machineSpec","-1", CVAR_INTEGER|CVAR_ARCHIVE|CVAR_SYSTEM,"hardware classification, -1 = not detected, 0 = low quality, 1 = medium quality, 2 = high quality, 3 = ultra quality")
idCVar com_makingBuild("com_makingBuild","0", CVAR_BOOL|CVAR_SYSTEM,"1 when making a build")
idCVar com_memoryMarker("com_memoryMarker","-1", CVAR_INTEGER|CVAR_SYSTEM|CVAR_INIT,"used as a marker for memory stats")
int com_numConsoleLines

Definition at line 811 of file Common.cpp.

idCVar com_preciseTic("com_preciseTic","1", CVAR_BOOL|CVAR_SYSTEM,"run one game tick every async thread update")
idCVar com_product_lang_ext("com_product_lang_ext","1", CVAR_INTEGER|CVAR_SYSTEM|CVAR_ARCHIVE,"Extension to use when creating language files.")
idCVar com_purgeAll("com_purgeAll","0", CVAR_BOOL|CVAR_ARCHIVE|CVAR_SYSTEM,"purge everything between level loads")
idCVar com_showAsyncStats("com_showAsyncStats","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"show async network stats")
idCVar com_showFPS("com_showFPS","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_ARCHIVE|CVAR_NOCHEAT,"show frames rendered per second")
idCVar com_showMemoryUsage("com_showMemoryUsage","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"show total and per frame memory usage")
idCVar com_showSoundDecoders("com_showSoundDecoders","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"show sound decoders")
idCVar com_skipRenderer("com_skipRenderer","0", CVAR_BOOL|CVAR_SYSTEM,"skip the renderer completely")
idCVar com_speeds("com_speeds","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"show engine timings")
volatile int com_ticNumber

Definition at line 96 of file Common.cpp.

idCVar com_timescale("timescale","1", CVAR_SYSTEM|CVAR_FLOAT,"scales the time", 0.1f, 10.0f)
idCVar com_timestampPrints("com_timestampPrints","0", CVAR_SYSTEM,"print time with each console print, 1 = msec, 2 = sec", 0, 2, idCmdSystem::ArgCompletion_Integer< 0, 2 >)
idCVar com_updateLoadSize("com_updateLoadSize","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"update the load size after loading a map")
idCVar com_version("si_version", version.string, CVAR_SYSTEM|CVAR_ROM|CVAR_SERVERINFO,"engine version")
idCVar com_videoRam("com_videoRam","64", CVAR_INTEGER|CVAR_SYSTEM|CVAR_NOCHEAT|CVAR_ARCHIVE,"holds the last amount of detected video ram")
idCommon* common = &commonLocal

Definition at line 206 of file Common.cpp.

idCommonLocal commonLocal

Definition at line 205 of file Common.cpp.

int lastTicMsec

Definition at line 2545 of file Common.cpp.

int prevAsyncMsec

Definition at line 2544 of file Common.cpp.

int time_backend

Definition at line 92 of file Common.cpp.

int time_frontend

Definition at line 91 of file Common.cpp.

int time_gameDraw

Definition at line 90 of file Common.cpp.

int time_gameFrame

Definition at line 89 of file Common.cpp.

struct version_s version