mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-12 08:11:10 +02:00
155 lines
5.3 KiB
C++
155 lines
5.3 KiB
C++
#pragma once
|
|
|
|
|
|
class idCommonLocal : public idCommon {
|
|
public:
|
|
idCommonLocal(void);
|
|
|
|
virtual void Init(int argc, const char** argv, const char* cmdline);
|
|
virtual void Shutdown(void);
|
|
virtual void Quit(void);
|
|
virtual bool IsInitialized(void) const;
|
|
virtual void Frame(void);
|
|
virtual void GUIFrame(bool execCmd, bool network);
|
|
virtual void StartupVariable(const char* match, bool once);
|
|
#ifdef QUAKE4
|
|
virtual int GetUserCmdHz(void) const;
|
|
virtual int GetUserCmdMSec(void) const;
|
|
virtual int GetFrameTime(void) const;
|
|
virtual bool IsRenderableGameFrame(void) const;
|
|
virtual void SetRenderableGameFrame(bool in);
|
|
virtual const char* GetErrorMessage(void) const;
|
|
virtual bool IsToolActive(void) const;
|
|
#ifdef _RV_MEM_SYS_SUPPORT
|
|
virtual void InitHeaps(void);
|
|
virtual void ShutdownHeaps(void);
|
|
#endif
|
|
virtual void RunAlwaysThinkGUIs(int time);
|
|
virtual bool DoingDeclValidation(void);
|
|
virtual void SetCrashReportAutoSendString(const char* psString);
|
|
#endif
|
|
virtual void InitTool(const toolFlag_t tool, const idDict* dict);
|
|
virtual void ActivateTool(bool active);
|
|
virtual void WriteConfigToFile(const char* filename);
|
|
virtual void WriteFlaggedCVarsToFile(const char* filename, int flags, const char* setCmd);
|
|
#ifdef QUAKE4
|
|
virtual void BeginRedirect(char* buffer, int buffersize, void (*flush)(const char*), bool rcon = false);
|
|
#else
|
|
virtual void BeginRedirect(char* buffer, int buffersize, void (*flush)(const char*));
|
|
#endif
|
|
virtual void EndRedirect(void);
|
|
virtual void SetRefreshOnPrint(bool set);
|
|
virtual void Printf(const char* fmt, ...) id_attribute((format(printf, 2, 3)));
|
|
virtual void VPrintf(const char* fmt, va_list arg);
|
|
virtual void DPrintf(const char* fmt, ...) id_attribute((format(printf, 2, 3)));
|
|
virtual void Warning(const char* fmt, ...) id_attribute((format(printf, 2, 3)));
|
|
virtual void DWarning(const char* fmt, ...) id_attribute((format(printf, 2, 3)));
|
|
virtual void PrintWarnings(void);
|
|
virtual void ClearWarnings(const char* reason);
|
|
virtual void Error(const char* fmt, ...) id_attribute((format(printf, 2, 3)));
|
|
virtual void FatalError(const char* fmt, ...) id_attribute((format(printf, 2, 3)));
|
|
virtual const idLangDict* GetLanguageDict(void);
|
|
#ifdef QUAKE4
|
|
virtual void DumpWarnings(void);
|
|
virtual const char* GetLocalizedString(const char* token, int langIndex = -1);
|
|
virtual const idLangKeyValue* GetLocalizedString(int index, int langIndex = -1);
|
|
virtual int GetNumLanguages(void) const;
|
|
virtual int GetNumLocalizedStrings(void) const;
|
|
virtual const char* GetLanguage(int index) const;
|
|
virtual bool LanguageHasVO(int index) const;
|
|
#endif
|
|
#ifdef PREY
|
|
virtual void MaterialKeyForBinding(const char* binding, char* materialName, char* keyText, bool* wideKey);
|
|
#endif
|
|
virtual const char* KeysFromBinding(const char* bind);
|
|
virtual const char* BindingFromKey(const char* key);
|
|
|
|
virtual int ButtonState(int key);
|
|
virtual int KeyState(int key);
|
|
#ifdef QUAKE4
|
|
virtual int GetRModeForMachineSpec(int machineSpec) const;
|
|
virtual void SetDesiredMachineSpec(int machineSpec);
|
|
virtual bool IsRCon(void) const;
|
|
#endif
|
|
|
|
void InitGame(void);
|
|
void ShutdownGame(bool reloading);
|
|
|
|
// localization
|
|
void InitLanguageDict(void);
|
|
void LocalizeGui(const char* fileName, idLangDict& langDict);
|
|
void LocalizeMapData(const char* fileName, idLangDict& langDict);
|
|
void LocalizeSpecificMapData(const char* fileName, idLangDict& langDict, const idLangDict& replaceArgs);
|
|
|
|
void SetMachineSpec(void);
|
|
|
|
private:
|
|
void InitCommands(void);
|
|
void InitRenderSystem(void);
|
|
void InitSIMD(void);
|
|
bool AddStartupCommands(void);
|
|
void ParseCommandLine(int argc, const char** argv);
|
|
void ClearCommandLine(void);
|
|
bool SafeMode(void);
|
|
void CheckToolMode(void);
|
|
void CloseLogFile(void);
|
|
void WriteConfiguration(void);
|
|
#ifndef QUAKE4
|
|
void DumpWarnings(void);
|
|
#endif
|
|
void LoadGameDLL(void);
|
|
void UnloadGameDLL(void);
|
|
void PrintLoadingMessage(const char* msg);
|
|
void FilterLangList(idStrList* list, idStr lang);
|
|
#ifdef QUAKE4
|
|
bool AddLanguage(const idStr& language);
|
|
void SetActiveLanguage(void);
|
|
void ApplyVideoSettings(void);
|
|
void SingleAsyncTic(void);
|
|
#endif
|
|
|
|
bool com_fullyInitialized;
|
|
bool com_refreshOnPrint; // update the screen every print for dmap
|
|
int com_errorEntered; // 0, ERP_DROP, etc
|
|
bool com_shuttingDown;
|
|
|
|
idFile* logFile;
|
|
|
|
char errorMessage[MAX_PRINT_MSG_SIZE];
|
|
|
|
char* rd_buffer;
|
|
int rd_buffersize;
|
|
void (*rd_flush)(const char* buffer);
|
|
#ifdef QUAKE4
|
|
bool rd_rcon;
|
|
#endif
|
|
|
|
idStr warningCaption;
|
|
idStrList warningList;
|
|
idStrList errorList;
|
|
#ifdef QUAKE4
|
|
int warningCount[MAX_WARNING_LIST];
|
|
#endif
|
|
|
|
INT_PTR gameDLL;
|
|
|
|
idLangDict languageDict;
|
|
#ifdef QUAKE4
|
|
idList<rvLanguage> languages;
|
|
int languageDictIndex;
|
|
int desiredMachineSpec;
|
|
bool com_renderableGameFrame;
|
|
#endif
|
|
|
|
#ifdef ID_WRITE_VERSION
|
|
idCompressor* config_compressor;
|
|
#endif
|
|
|
|
int gameFrame; // Frame number of the local game
|
|
double gameTimeResidual; // left over msec from the last game frame
|
|
|
|
virtual float Get_com_engineHz_latched(void);
|
|
virtual int64_t Get_com_engineHz_numerator(void);
|
|
virtual int64_t Get_com_engineHz_denominator(void);
|
|
};
|