29 #include "../idlib/precompiled.h"
59 byte *buf = (
byte *)_alloca( bytes );
61 int fill = rand()&255;
62 for (
int i = 0 ;
i < bytes ;
i++ ) {
86 static void Session_Map_f(
const idCmdArgs &args ) {
104 common->
Printf(
"Can't find map %s\n",
string.c_str() );
107 common->
Printf(
"map %s is in an addon pak - reloading\n",
string.c_str() );
127 static void Session_DevMap_f(
const idCmdArgs &args ) {
145 common->
Printf(
"Can't find map %s\n",
string.c_str() );
148 common->
Printf(
"map %s is in an addon pak - reloading\n",
string.c_str() );
166 static void Session_TestMap_f(
const idCmdArgs &args ) {
189 static void Sess_WritePrecache_f(
const idCmdArgs &args ) {
190 if ( args.
Argc() != 2 ) {
223 static void Session_PromptKey_f(
const idCmdArgs &args ) {
226 static bool recursed =
false;
243 const char *prompt_msg = sessLocal.
GetAuthMsg();
244 if ( prompt_msg[ 0 ] ==
'\0' ) {
249 if ( sessLocal.
CheckKey( retkey,
false, valid ) ) {
550 static void Session_TestGUI_f(
const idCmdArgs &args ) {
560 if ( guiName && *guiName ) {
572 static idStr FindUnusedFileName(
const char *
format ) {
576 for ( i = 0 ; i < 999 ; i++ ) {
577 sprintf( filename, format, i );
592 static void Session_DemoShot_f(
const idCmdArgs &args ) {
593 if ( args.
Argc() != 2 ) {
594 idStr filename = FindUnusedFileName(
"demos/shot%03i.demo" );
606 static void Session_RecordDemo_f(
const idCmdArgs &args ) {
607 if ( args.
Argc() != 2 ) {
608 idStr filename = FindUnusedFileName(
"demos/demo%03i.demo" );
620 static void Session_CompressDemo_f(
const idCmdArgs &args ) {
621 if ( args.
Argc() == 2 ) {
623 }
else if ( args.
Argc() == 3 ) {
626 common->
Printf(
"use: CompressDemo <file> [scheme]\nscheme is the same as com_compressDemo, defaults to 2" );
635 static void Session_StopRecordingDemo_f(
const idCmdArgs &args ) {
644 static void Session_PlayDemo_f(
const idCmdArgs &args ) {
645 if ( args.
Argc() >= 2 ) {
655 static void Session_TimeDemo_f(
const idCmdArgs &args ) {
656 if ( args.
Argc() >= 2 ) {
666 static void Session_TimeDemoQuit_f(
const idCmdArgs &args ) {
679 static void Session_AVIDemo_f(
const idCmdArgs &args ) {
688 static void Session_AVIGame_f(
const idCmdArgs &args ) {
697 static void Session_AVICmdDemo_f(
const idCmdArgs &args ) {
706 static void Session_WriteCmdDemo_f(
const idCmdArgs &args ) {
707 if ( args.
Argc() == 1 ) {
708 idStr filename = FindUnusedFileName(
"demos/cmdDemo%03i.cdemo" );
710 }
else if ( args.
Argc() == 2 ) {
722 static void Session_PlayCmdDemo_f(
const idCmdArgs &args ) {
731 static void Session_TimeCmdDemo_f(
const idCmdArgs &args ) {
740 static void Session_Disconnect_f(
const idCmdArgs &args ) {
754 static void Session_EndOfDemo_f(
const idCmdArgs &args ) {
771 static void Session_ExitCmdDemo_f(
const idCmdArgs &args ) {
793 if ( !demoName[0] ) {
794 common->
Printf(
"idSessionLocal::StartRecordingRenderDemo: no name specified\n" );
825 common->
Printf(
"idSessionLocal::StopRecordingRenderDemo: not recording\n" );
868 idStr message =
va(
"%i frames rendered in %3.1f seconds = %3.1f fps\n",
numDemoFrames, demoSeconds, demoFPS );
904 if ( !demoName[0] ) {
905 common->
Printf(
"idSessionLocal::StartPlayingRenderDemo: no name specified\n" );
961 idStr demo = demoName;
1022 f->
Printf(
"\nINPUT\n" );
1024 f->
Printf(
"END_INPUT\n" );
1039 idStr demoName = _demoName;
1081 if ( !demoName || !demoName[0] ) {
1082 idStr filename = FindUnusedFileName(
"demos/game%03i.game" );
1083 demoName = filename.
c_str();
1098 idStr fullDemoName =
"demos/";
1099 fullDemoName += demoName;
1101 idStr compressedName = fullDemoName;
1103 compressedName.
Append(
"_compressed.demo" );
1125 static const int bufferSize = 65535;
1128 while ( 0 != (bytesRead = demoread.
Read( buffer, bufferSize ) ) ) {
1129 demowrite.
Write( buffer, bytesRead );
1152 common->
Printf(
"Dedicated servers cannot start singleplayer games.\n" );
1173 common->
Printf(
"Server running, use si_map / serverMapRestart\n");
1177 common->
Printf(
"Client running, disconnect from server first\n");
1215 return va(
"^3AutoSave:^0 %s", mapName );
1286 if ( !demoName[0] ) {
1287 common->
Printf(
"idSessionLocal::WriteCmdDemo: no name specified\n" );
1293 statsName = demoName;
1298 common->
Printf(
"writing save data to %s\n", demoName );
1301 if ( !cmdDemoFile ) {
1302 common->
Printf(
"Couldn't open for writing %s\n", demoName );
1341 idStr fullDemoName =
"demos/";
1342 fullDemoName += demoName;
1380 int minuteStart, minuteEnd;
1384 minuteStart = startTime;
1390 if ( count / 3600 != ( count - 1 ) / 3600 ) {
1392 sec = ( minuteEnd - minuteStart ) / 1000.0;
1393 minuteStart = minuteEnd;
1394 common->
Printf(
"minute %i took %3.1f seconds\n", count / 3600, sec );
1400 sec = ( endTime - startTime ) / 1000.0;
1401 common->
Printf(
"%i seconds of game, replayed in %5.1f seconds\n", count / 60, sec );
1440 idStr stripped = mapName;
1469 return 200 * 1024 * 1024;
1471 return 400 * 1024 * 1024;
1490 idStr declText =
"\nmapDef ";
1491 declText += mapDef->
GetName();
1495 if ( kv && (kv->
GetKey().
Cmp(
"classname") != 0 ) ) {
1496 declText +=
"\t\"" + kv->
GetKey() +
"\"\t\t\"" + kv->
GetValue() +
"\"\n";
1517 bool reloadingSameMap;
1540 if ( !noFadeWipe ) {
1552 idStr fullMapName =
"maps/";
1553 fullMapName += mapString;
1561 reloadingSameMap =
true;
1563 reloadingSameMap =
false;
1568 if ( !reloadingSameMap ) {
1587 if ( !reloadingSameMap ) {
1612 common->
Printf(
"--------- Map Initialization ---------\n" );
1655 if ( !reloadingSameMap ) {
1665 for ( i = 0; i < 10; i++ ) {
1670 common->
Printf (
"-----------------------------------\n");
1685 while ( pct < 1.0f ) {
1755 if ( sessLocal.
SaveGame( saveName ) ) {
1771 const char *
p = ( args.
Argc() > 1 ) ? args.
Argv( 1 ) :
"";
1781 const char *
p = ( args.
Argc() > 1 ) ? args.
Argv( 1 ) :
"";
1800 const char *people[] = {
1801 "Nobody",
"Adam",
"Brandon",
"David",
"PHook",
"Jay",
"Jake",
1802 "PatJ",
"Brett",
"Ted",
"Darin",
"Brian",
"Sean"
1805 const char *people[] = {
1806 "Tim",
"Kenneth",
"Robert",
1807 "Matt",
"Mal",
"Jerry",
"Steve",
"Pat",
1808 "Xian",
"Ed",
"Fred",
"James",
"Eric",
"Andy",
"Seneca",
"Patrick",
"Kevin",
1809 "MrElusive",
"Jim",
"Brian",
"John",
"Adrian",
"Nobody"
1812 const int numPeople =
sizeof( people ) /
sizeof( people[0] );
1816 for (
int i = 0; i < numPeople; i++ ) {
1817 guiList_people->
Push( people[i] );
1844 if ( args.
Argc() == 2 ) {
1867 inFileName = saveFileName;
1871 saveFileName.
Clear();
1873 int len = inFileName.
Length();
1874 for ( i = 0; i <
len; i++ ) {
1875 if ( strchr(
"',.~!@#$%^&*()[]{}<>\\|/=?+;:-\'\"", inFileName[i] ) ) {
1877 saveFileName +=
'_';
1878 }
else if ( (
const unsigned char)inFileName[i] >= 128 ) {
1880 saveFileName +=
'_';
1881 }
else if ( inFileName[i] ==
' ' ) {
1882 saveFileName +=
'_';
1884 saveFileName += inFileName[
i];
1896 common->
Printf(
"Dedicated servers cannot save games.\n" );
1900 idStr gameFile, previewFile, descriptionFile, mapName;
1914 common->
Printf(
"You must be alive to save the game\n" );
1920 common->
Printf(
"Not enough drive space to save the game\n" );
1926 pauseWorld->
Pause();
1931 gameFile = saveName;
1934 gameFile =
"savegames/" + gameFile;
1937 previewFile = gameFile;
1940 descriptionFile = gameFile;
1945 if ( fileOut == NULL ) {
1991 if ( fileDesc == NULL ) {
1992 common->
Warning(
"Failed to open description file '%s'\n", descriptionFile.
c_str() );
2000 idStr description = saveName;
2001 description.
Replace(
"\\",
"\\\\" );
2002 description.
Replace(
"\"",
"\\\"" );
2009 fileDesc->
Printf(
"\"%s\"\n", description.
c_str() );
2016 fileDesc->
Printf(
"\"guis/assets/autosave/%s\"\n", sshot.
c_str() );
2018 fileDesc->
Printf(
"\"\"\n" );
2042 common->
Printf(
"Dedicated servers cannot load games.\n" );
2056 loadFile = saveName;
2107 common->
Warning(
"Savegame Version mismatch: aborting loadgame and starting level with persistent data" );
2115 if ( saveMap.
Length() > 0 ) {
2184 static const char *cmd;
2186 if ( cmd && cmd[0] ) {
2187 common->
Printf(
"testGui event returned: '%s'\n", cmd );
2251 if ( skipFrames > 4 ) {
2260 while( skipFrames > -1 ) {
2309 static const int ANGLE_GRAPH_HEIGHT = 128;
2310 static const int ANGLE_GRAPH_STRETCH = 3;
2322 h &= (ANGLE_GRAPH_HEIGHT-1);
2372 bool fullConsole =
false;
2405 bool gameDraw =
false;
2429 if ( emptyDrawCount > 5 ) {
2432 common->
Warning(
"idSession: triggering mainmenu watchdog" );
2447 if ( !fullConsole && emptyDrawCount ) {
2448 common->
DPrintf(
"idSession: %d empty frame draws\n", emptyDrawCount );
2451 fullConsole =
false;
2461 if ( !fullConsole ) {
2491 if ( outOfSequence ) {
2587 #if defined( _WIN32 )
2678 lastGameTic += skip;
2679 numCmdsToRun -= skip;
2684 if ( numCmdsToRun > 10 ) {
2693 if ( numCmdsToRun < fixedTic ) {
2694 common->
Error(
"idSessionLocal::Frame: numCmdsToRun < fixedTic" );
2722 for ( i = 0 ; i < gameTicsToRun ; i++ ) {
2849 common->
Printf(
"-------- Initializing Session --------\n" );
2853 #ifndef ID_DEDICATED
2876 #ifdef ID_DEMO_BUILD
2883 #ifndef ID_DEDICATED
2906 #ifndef ID_DEMO_BUILD
2931 common->
Printf(
"--------------------------------------\n" );
2998 memset( buffer, 0,
sizeof(buffer) );
3012 memset( buffer, 0,
sizeof(buffer) );
3058 if ( !valid[ 0 ] ) {
3065 if ( !valid[ 1 ] ) {
3090 #define CDKEY_DIGITS "TWSBJCGD7PA23RLH"
3125 char l_chk[ 2 ][ 3 ];
3128 unsigned int checksum, chk8;
3129 bool edited_key[ 2 ];
3134 edited_key[ 0 ] = ( key[0] ==
'1' );
3150 offline_valid[ 0 ] = offline_valid[ 1 ] =
true;
3151 for( i_key = 0; i_key < imax; i_key++ ) {
3156 offline_valid[ i_key ] =
false;
3161 if ( edited_key[ i_key ] ) {
3164 chk8 = ( checksum & 0xff ) ^ ( ( ( checksum & 0xff00 ) >> 8 ) ^ ( ( ( checksum & 0xff0000 ) >> 16 ) ^ ( ( checksum & 0xff000000 ) >> 24 ) ) );
3167 offline_valid[ i_key ] =
false;
3173 if ( !offline_valid[ 0 ] || !offline_valid[1] ) {
3189 if ( !netConnect ) {
3207 bool emitAuth =
false;
void TakeViewNotes_f(const idCmdArgs &args)
void StartRecordingRenderDemo(const char *name)
virtual void SetupReloadEngine(const idCmdArgs &args)=0
virtual void SetCVarInteger(const char *name, const int value, int flags=0)=0
virtual idFile * OpenFileRead(const char *relativePath, bool allowCopyFiles=true, const char *gamedir=NULL)=0
virtual const idDict * SetUserInfo(int clientNum, const idDict &userInfo, bool isClient, bool canModify)=0
const int MAX_ASYNC_CLIENTS
char xpkey[CDKEY_BUF_LEN]
float GetFloat(const char *key, const char *defaultString="0") const
static int snPrintf(char *dest, int size, const char *fmt,...) id_attribute((format(printf
static void ArgCompletion_MapName(const idCmdArgs &args, void(*callback)(const char *s))
void SetBytesNeededForMapLoad(const char *mapName, int bytesNeeded)
void StartPlayingRenderDemo(idStr name)
virtual void EndFrame(int *frontEndMsec, int *backEndMsec)=0
idStr GetAutoSaveName(const char *mapName) const
int GetInt(const char *key, const char *defaultString="0") const
bool ReplaceSourceFileText(void)
idStr & SetFileExtension(const char *extension)
virtual int virtual int ReadInt(int &value)
virtual void SetColor(const idVec4 &rgba)=0
int bytesNeededForMapLoad
assert(prefInfo.fullscreenBtn)
void AdvanceRenderDemo(bool singleFrameOnly)
virtual void StateChanged(int time, bool redraw=false)=0
virtual void WritePrecacheCommands(idFile *f)=0
int Cmp(const char *text) const
bool IsActive(void) const
idCVarSystem * cvarSystem
void Delete(const char *key)
renderView_t currentDemoRenderView
static idCVar com_aviDemoTics
virtual void StopWritingDemo()=0
void RandomizeStack(void)
virtual void SetStateString(const char *varName, const char *value)=0
virtual idSoundWorld * AllocSoundWorld(idRenderWorld *rw)=0
virtual void virtual void virtual const idLangDict * GetLanguageDict(void)=0
virtual bool CDKeysAreValid(bool strict)
unsigned long CRC32_BlockChecksum(const void *data, int length)
GLenum GLsizei GLenum format
void AVICmdDemo(const char *name)
float GetFloat(void) const
virtual const char * GetCurrentMapName()
const idStr & GetKey(void) const
const int USERCMD_PER_DEMO_FRAME
void ScrubSaveGameFileName(idStr &saveFileName) const
void TakeNotes(const char *p, bool extended=false)
void WriteCmdDemo(const char *name, bool save=false)
static idCVar com_showDemo
ID_INLINE T Max(T x, T y)
virtual void DrawDemoPics()=0
virtual bool ProcessDemoCommand(idDemoFile *readDemo, renderView_t *demoRenderView, int *demoTimeOffset)=0
virtual int ReadFile(const char *relativePath, void **buffer, ID_TIME_T *timestamp=NULL)=0
void TestGUI(const char *name)
virtual void ProcessDemoCommand(idDemoFile *demo)=0
virtual void Clear(void)=0
virtual const char * MessageBox(msgBoxType_t type, const char *message, const char *title=NULL, bool wait=false, const char *fire_yes=NULL, const char *fire_no=NULL, bool network=false)
virtual void WriteCDKey(void)
void StartWipe(const char *materialName, bool hold=false)
virtual void GetMapLoadingGUI(char gui[MAX_STRING_CHARS])=0
static const int CDKEY_AUTH_TIMEOUT
virtual void ResetReadCount(void)=0
virtual int GetCVarInteger(const char *name) const =0
virtual void PlayShaderDirectly(const char *name, int channel=-1)=0
static idAsyncClient client
virtual int AsyncUpdate(int time)=0
virtual void SpawnPlayer(int clientNum)=0
idRenderSystem * renderSystem
int Sys_Milliseconds(void)
void MenuEvent(const sysEvent_t *event)
idFileSystem * fileSystem
virtual idFile * OpenExplicitFileRead(const char *OSPath)=0
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")
virtual void MapShutdown(void)=0
void TimeCmdDemo(const char *demoName)
static void ArgCompletion_DemoName(const idCmdArgs &args, void(*callback)(const char *s))
void ExtractFileBase(idStr &dest) const
virtual findFile_t FindFile(const char *path, bool scheduleAddons=false)=0
virtual void SetServerInfo(const idDict &serverInfo)=0
idCVar com_asyncInput("com_asyncInput","0", CVAR_BOOL|CVAR_SYSTEM,"sample input from the async thread")
virtual void ClearCDKey(bool valid[2])
const char * GetName(void) const
virtual void ExecuteCommandBuffer(void)=0
void Session_Hitch_f(const idCmdArgs &args)
void LoadGame_f(const idCmdArgs &args)
GLenum GLsizei const GLvoid * string
void WriteToFileHandle(idFile *f) const
volatile int com_ticNumber
virtual escReply_t HandleESC(idUserInterface **gui)=0
virtual ~idSessionLocal()
virtual void HandleNamedEvent(const char *eventName)=0
bool OpenForWriting(const char *fileName)
virtual const idDict & GetPersistentPlayerInfo(int clientNum)=0
const idMaterial * wipeMaterial
virtual void PacifierUpdate()
static idCVar serverDrawClient
void PacifierUpdate(void)
static idCVar com_showTics
void Sys_Sleep(const int time)
virtual const idMaterial * FindMaterial(const char *name, bool makeDefault=true)=0
idStr & DefaultFileExtension(const char *extension)
void Set(const char *key, const char *value)
void Sys_GenerateEvents(void)
void BeginAVICapture(const char *name)
idUserInterfaceManager * uiManager
virtual void BeginFrame(int windowWidth, int windowHeight)=0
idDict persistentPlayerInfo[MAX_ASYNC_CLIENTS]
virtual void StartWritingDemo(idDemoFile *demo)=0
HandleGuiCommand_t guiHandle
virtual const char * HandleEvent(const sysEvent_t *event, int time, bool *updateVisuals=NULL)=0
int Icmp(const char *text) const
virtual void SetPersistentPlayerInfo(int clientNum, const idDict &playerInfo)=0
virtual int WriteFile(const char *relativePath, const void *buffer, int size, const char *basePath="fs_savepath")=0
virtual void SetStateBool(const char *varName, const bool value)=0
const idMaterial * whiteMaterial
const char * GetAuthMsg(void)
virtual idUserInterface * FindGui(const char *qpath, bool autoLoad=false, bool needUnique=false, bool forceUnique=false)=0
static void ArgCompletion_SaveGame(const idCmdArgs &args, void(*callback)(const char *s))
idSoundWorld * menuSoundWorld
virtual void Pause(void)=0
virtual void BeginLevelLoad(void)=0
void MoveToNewMap(const char *mapName)
virtual void SetStateFloat(const char *varName, const float value)=0
static idCVar com_wipeSeconds
void ReadFromFileHandle(idFile *f)
idUserInterface * guiTest
bool insideExecuteMapChange
virtual idSoundWorld * GetPlayingSoundWorld(void)=0
virtual void BufferCommandText(cmdExecution_t exec, const char *text)=0
void StartPlayingCmdDemo(const char *demoName)
int Sys_GetDriveFreeSpace(const char *path)
void LoadCmdDemoFromFile(idFile *file)
bool MaybeWaitOnCDKey(void)
GLuint GLuint GLsizei count
static bool IsActive(void)
virtual idRenderWorld * AllocRenderWorld(void)=0
void CompressDemoFile(const char *scheme, const char *name)
virtual int WriteInt(const int value)
virtual void CaptureRenderToFile(const char *fileName, bool fixAlpha=false)=0
void AppendArg(const char *text)
idListGUI * guiMainMenu_MapList
const char * GetString(const char *key, const char *defaultString="") const
virtual void CaptureRenderToImage(const char *imageName)=0
idStr & StripFileExtension(void)
virtual const char * GetCDKey(bool xp)
virtual void Shutdown(void)=0
static idAsyncServer server
idCVar com_asyncSound("com_asyncSound","1", CVAR_INTEGER|CVAR_SYSTEM, ASYNCSOUND_INFO, 0, 1)
virtual void ClearAllSoundEmitters(void)=0
virtual void ReadCDKey(void)
virtual int WriteString(const char *string)
static void BuildInvalidKeyMsg(idStr &msg, bool valid[2])
virtual void SetPlayingSoundWorld(idSoundWorld *soundWorld)=0
idUserInterface * guiActive
idUserInterface * guiTakeNotes
void PacifierUpdate(void)
virtual bool Draw(int clientNum)=0
virtual bool InitFromSaveGame(const char *mapName, idRenderWorld *renderWorld, idSoundWorld *soundWorld, idFile *saveGameFile)=0
void StartNewGame(const char *mapName, bool devmap=false)
bool GetBool(const char *key, const char *defaultString="0") const
virtual idListGUI * AllocListGUI(void) const =0
virtual void BeginLevelLoad(void)=0
virtual const char * GetCVarString(const char *name) const =0
void StopRecordingRenderDemo()
virtual const idDecl * FindType(declType_t type, const char *name, bool makeDefault=true)=0
virtual void SetCVarBool(const char *name, const bool value, int flags=0)=0
int GetInteger(void) const
virtual bool ProcessEvent(const struct sysEvent_s *event, bool forceAccept)=0
virtual void Redraw(int time)=0
static const int CDKEY_BUF_LEN
virtual idFile * OpenFileWrite(const char *relativePath, const char *basePath="fs_savepath")=0
virtual int Read(void *buffer, int len)
static void Copynz(char *dest, const char *src, int destsize)
void DemoShot(const char *name)
virtual void virtual void virtual void virtual void PrintWarnings(void)=0
const char * GetString(const char *str) const
idCVar com_speeds("com_speeds","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"show engine timings")
virtual void FreeListGUI(idListGUI *listgui)=0
virtual bool ProcessEvent(const sysEvent_t *event)
virtual int GetScreenWidth(void) const =0
idDict userInfo[MAX_ASYNC_CLIENTS]
virtual gameReturn_t RunFrame(const usercmd_t *clientCmds)=0
virtual const char * Activate(bool activate, int time)=0
const idStr & GetValue(void) const
static idCVar com_aviDemoSamples
static idCVar serverDedicated
virtual bool InitFromMap(const char *mapName)=0
virtual void WritePrecacheCommands(idFile *f)=0
void GUIConfig(idUserInterface *pGUI, const char *name)
virtual void Draw(bool forceFullScreen)=0
virtual void InitForNewMap(void)=0
virtual void UnPause(void)=0
virtual void SetColor4(float r, float g, float b, float a)=0
void StopPlayingRenderDemo()
idUsercmdGen * usercmdGen
idStr & RemoveColors(void)
static idCVar com_showAngles
virtual int GetScreenHeight(void) const =0
virtual bool CheckGui(const char *qpath) const =0
virtual void Close(void)=0
virtual void SetPlayingSoundWorld()
virtual void UpdateScreen(bool outOfSequence=true)=0
virtual void Printf(const char *fmt,...) id_attribute((format(printf
virtual const idDict & State() const =0
virtual bool IsPaused(void)=0
void ExecuteMapChange(bool noFadeWipe=false)
virtual void DrawStretchPic(const idDrawVert *verts, const glIndex_t *indexes, int vertCount, int indexCount, const idMaterial *material, bool clip=true, float min_x=0.0f, float min_y=0.0f, float max_x=640.0f, float max_y=480.0f)=0
void SaveCmdDemoToFile(idFile *file)
virtual void BeginLevelLoad()=0
virtual void StartMenu(bool playIntro=false)
virtual void AVIOpen(const char *path, const char *name)=0
virtual const char * BuildOSPath(const char *base, const char *game, const char *relativePath)=0
void SetText(const char *text)
virtual void Config(idUserInterface *pGUI, const char *name)=0
idDeclManager * declManager
int GetLocalClientNum(void) const
idCVar com_allowConsole("com_allowConsole","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"allow toggling console with the tilde key")
virtual const char * RelativePathToOSPath(const char *relativePath, const char *basePath="fs_devpath")=0
mapSpawnData_t mapSpawnData
virtual void EndLevelLoad(void)=0
virtual void EndLevelLoad()=0
idUserInterface * guiIntro
virtual void GenerateAllInteractions()=0
virtual void virtual void WritePrecacheCommands(idFile *f)=0
void TokenizeString(const char *text, bool keepAsStrings)
void TimeRenderDemo(const char *name, bool twice=false)
void Session_RescanSI_f(const idCmdArgs &args)
virtual void SetMute(bool mute)=0
virtual int GetModifiedFlags(void) const =0
virtual bool Active(void)=0
void SetInt(const char *key, int val)
virtual void EndLevelLoad(const char *mapString)=0
virtual int GetReadCount(void)=0
idRenderModelManager * renderModelManager
const char * GetName(void)
idCVar gamename("gamename", GAME_VERSION, CVAR_GAME|CVAR_SERVERINFO|CVAR_ROM,"")
void TakeViewNotes2_f(const idCmdArgs &args)
void LoadLoadingGui(const char *mapName)
virtual void Reload(bool all)=0
virtual void StopBox(void)
virtual void InitFromNewMap(const char *mapName, idRenderWorld *renderWorld, idSoundWorld *soundWorld, bool isServer, bool isClient, int randseed)=0
int Write(const void *buffer, int len)
virtual void GuiFrameEvents()
idUserInterface * guiMainMenu
void Append(const char a)
bool OpenForReading(const char *fileName)
logStats_t loggedStats[MAX_LOGGED_STATS]
virtual void UpdateScreen(bool outOfSequence=true)
void Sys_ClearEvents(void)
virtual void SetGUI(idUserInterface *gui, HandleGuiCommand_t handle)
static idCVar com_aviDemoHeight
idUserInterface * guiGameOver
bool LoadGame(const char *saveName)
void AVIRenderDemo(const char *name)
idSoundSystem * soundSystem
virtual void Push(const idStr &s)=0
virtual void ClearNotifyLines(void)=0
virtual int Write(const void *buffer, int len)
const int MAX_LOGGED_USERCMDS
virtual void AVIClose(void)=0
virtual void StopWritingDemo()=0
void Sys_SetPhysicalWorkMemory(int minBytes, int maxBytes)
static idCVar com_fixedTic
virtual void SetCDKeyGuiVars(void)
const int MAX_BUFFERED_USERCMD
const char * c_str(void) const
#define RENDERDEMO_VERSION
virtual void RenderScene(const renderView_t *renderView)=0
void AVIGame(const char *name)
virtual void StartWritingDemo(idDemoFile *demo)=0
virtual bool GetCVarBool(const char *name) const =0
char cdkey[CDKEY_BUF_LEN]
void SaveGame_f(const idCmdArgs &args)
const idKeyValue * GetKeyVal(int index) const
idUserInterface * guiInGame
char sessionCommand[MAX_STRING_CHARS]
idUserInterface * guiLoading
const char * Argv(int arg) const
virtual const idDict * MoveCVarsToDict(int flags) const =0
usercmd_t mapSpawnUsercmd[MAX_ASYNC_CLIENTS]
virtual bool IsMultiplayer()
virtual void CropRenderSize(int width, int height, bool makePowerOfTwo=false, bool forceDimensions=false)=0
virtual int ReadString(idStr &string)
virtual void CreateOSPath(const char *OSPath)=0
virtual bool CheckKey(const char *key, bool netConnect, bool offline_valid[2])
virtual bool WaitingForGameAuth(void)
virtual void ClearWarnings(const char *reason)=0
virtual int GetSaveGameVersion(void)
virtual void SetRefreshOnPrint(bool set)=0
int GetBytesNeededForMapLoad(const char *mapName)
char * va(const char *fmt,...)
virtual void CloseFile(idFile *f)=0
virtual void DPrintf(const char *fmt,...) id_attribute((format(printf
virtual void Error(const char *fmt,...) id_attribute((format(printf
logCmd_t loggedUsercmds[MAX_LOGGED_USERCMDS]
static idCVar com_skipGameDraw
void Replace(const char *old, const char *nw)
static idCVar com_minTics
idCVar com_updateLoadSize("com_updateLoadSize","0", CVAR_BOOL|CVAR_SYSTEM|CVAR_NOCHEAT,"update the load size after loading a map")
virtual void CDKeysAuthReply(bool valid, const char *auth_msg)
bool Sys_IsWindowVisible(void)
int GetNumKeyVals(void) const
virtual usercmd_t GetDirectUsercmd(void)=0
idUserInterface * guiMsgRestore
virtual void virtual void Warning(const char *fmt,...) id_attribute((format(printf
idUserInterface * guiRestartMenu
virtual usercmd_t TicCmd(int ticNumber)=0
void Sys_LeaveCriticalSection(int index)
void Sys_EnterCriticalSection(int index)
int sprintf(idStr &string, const char *fmt,...)
int Read(void *buffer, int len)
void DisconnectFromServer(void)
virtual void ClearModifiedFlags(int flags)=0
virtual int Printf(const char *fmt,...) id_attribute((format(printf
virtual void BeginLevelLoad()=0
virtual bool HasD3XP(void)=0
void Sys_WaitForEvent(int index)
virtual void TimeHitch(int msec)
virtual void SaveGame(idFile *saveGameFile)=0
virtual void EndLevelLoad()=0
bool SaveGame(const char *saveName, bool autosave=false)
virtual void AddCommand(const char *cmdName, cmdFunction_t function, int flags, const char *description, argCompletion_t argCompletion=NULL)=0
virtual void TakeScreenshot(int width, int height, const char *fileName, int samples, struct renderView_s *ref)=0
static idCVar com_aviDemoWidth
void Sys_GrabMouseCursor(bool)
virtual void StopAllSounds(void)=0
virtual void WriteDemoPics()=0