29 #include "../idlib/precompiled.h"
30 #include "../sys/sys_local.h"
49 #define STDIO_PRINT( pre, post ) \
51 va_start( argptr, fmt ); \
53 vprintf( fmt, argptr ); \
62 virtual void Init(
int argc,
const char **argv,
const char *cmdline ) {}
64 virtual void Quit(
void ) {}
67 virtual void GUIFrame(
bool execCmd,
bool network ) {}
78 virtual void VPrintf(
const char *fmt, va_list arg ) { vprintf( fmt, arg ); }
79 virtual void DPrintf(
const char *fmt, ... ) { }
81 virtual void DWarning(
const char *fmt, ...) { }
84 virtual void Error(
const char *fmt, ... ) {
STDIO_PRINT(
"ERROR: ",
"\n" ); exit(0); }
115 static char cwd[1024];
117 _getcwd( cwd,
sizeof( cwd ) - 1 );
118 cwd[
sizeof( cwd ) - 1] = 0;
146 struct _finddata_t findinfo;
155 if ( extension[0] ==
'/' && extension[1] == 0 ) {
162 sprintf( search,
"%s\\*%s", directory, extension );
167 findhandle = _findfirst( search, &findinfo );
168 if ( findhandle == -1 ) {
173 if ( flag ^ ( findinfo.attrib & _A_SUBDIR ) ) {
174 list.
Append( findinfo.name );
176 }
while ( _findnext( findhandle, &findinfo ) != -1 );
178 _findclose( findhandle );
254 int main(
int argc,
char** argv ) {
255 idStr fileName, sourcePath;
284 for (
int i = 3;
i < argc;
i++ ) {
virtual const idLangDict * GetLanguageDict()
virtual double GetClockTicks(void)
virtual void DPrintf(const char *fmt,...)
#define SOURCE_CODE_BASE_FOLDER
xthreadInfo * g_threads[MAX_THREADS]
virtual const char * GetProcessorString(void)
virtual const char * GetCallStackCurStr(int depth)
void Sys_DestroyThread(xthreadInfo &info)
idCVarSystem * cvarSystem
const char * Sys_DefaultSavePath(void)
static void ShutDown(void)
virtual void DLL_Unload(int dllHandle)
virtual sysEvent_t GenerateMouseButtonEvent(int button, bool down)
idCommonLocal commonLocal
virtual double ClockTicksPerSecond(void)
virtual int KeyState(int key)
virtual void * DLL_GetProcAddress(int dllHandle, const char *procName)
void WriteTypeInfo(const char *fileName) const
ID_TIME_T Sys_FileTimeStamp(FILE *fp)
idCVar com_developer("developer","0", CVAR_BOOL|CVAR_SYSTEM,"developer mode")
idFileSystem * fileSystem
GLint GLint GLsizei GLsizei GLsizei depth
virtual void Error(const char *fmt,...)
virtual cpuid_t GetProcessorId(void)
void Sys_LeaveCriticalSection(int index)
virtual void FPU_SetDAZ(bool enable)
virtual const char * FPU_GetState(void)
virtual void StartupVariable(const char *match, bool once)
virtual void DWarning(const char *fmt,...)
virtual void Shutdown(void)
void Sys_TriggerEvent(int index)
virtual void Warning(const char *fmt,...)
int Sys_ListFiles(const char *directory, const char *extension, idStrList &list)
virtual void InitTool(const toolFlag_t tool, const idDict *dict)
virtual void Init(int argc, const char **argv, const char *cmdline)
int main(int argc, const char **argv)
virtual bool LockMemory(void *ptr, int bytes)
virtual void Init(void)=0
virtual void ClearWarnings(const char *reason)
virtual void ShutdownSymbols(void)
virtual void GUIFrame(bool execCmd, bool network)
static class idFileSystem * fileSystem
idDeclManager * declManager
void Sys_CreateThread(xthread_t function, void *parms, xthreadPriority priority, xthreadInfo &info, const char *name, xthreadInfo *threads[MAX_THREADS], int *thread_count)
virtual const char * GetCVarString(const char *name) const =0
#define STDIO_PRINT(pre, post)
virtual void SetRefreshOnPrint(bool set)
virtual bool UnlockMemory(void *ptr, int bytes)
virtual void FatalError(const char *fmt,...)
void AddDefine(const char *define)
virtual const char * GetCallStackStr(const address_t *callStack, const int callStackSize)
unsigned int(* xthread_t)(void *)
static void RegisterStaticVars(void)
virtual void Shutdown(void)=0
void Sys_EnterCriticalSection(int index)
virtual void FPU_SetFTZ(bool enable)
virtual void ActivateTool(bool active)
virtual bool IsInitialized(void) const
virtual void BeginRedirect(char *buffer, int buffersize, void(*flush)(const char *))
virtual void OpenURL(const char *url, bool quit)
const char * Sys_Cwd(void)
virtual const char * BindingFromKey(const char *key)
virtual bool FPU_StackIsEmpty(void)
int Append(const type &obj)
virtual int ButtonState(int key)
virtual sysEvent_t GenerateMouseMoveEvent(int deltax, int deltay)
virtual int DLL_Load(const char *dllName)
virtual const char * KeysFromBinding(const char *bind)
virtual void WriteFlaggedCVarsToFile(const char *filename, int flags, const char *setCmd)
static class idCVarSystem * cvarSystem
virtual void VPrintf(const char *fmt, va_list arg)
virtual void PrintWarnings(void)
virtual void WriteConfigToFile(const char *filename)
virtual void StartProcess(const char *exeName, bool quit)
int JournalLevel(void) const
virtual void Printf(const char *fmt,...)
virtual void FPU_EnableExceptions(int exceptions)
virtual void EndRedirect(void)
virtual void Shutdown(bool reloading)=0
const char * Sys_DefaultCDPath(void)
virtual void virtual void DebugVPrintf(const char *fmt, va_list arg)
void Sys_Mkdir(const char *path)
void CreateTypeInfo(const char *path)
virtual void DebugPrintf(const char *fmt,...) id_attribute((format(printf
virtual void Shutdown(void)=0
virtual void GetCallStack(address_t *callStack, const int callStackSize)
virtual void Init(void)=0
int sprintf(idStr &string, const char *fmt,...)
const char * Sys_EXEPath(void)
virtual void Init(void)=0
void Sys_WaitForEvent(int index)
const char * Sys_DefaultBasePath(void)
static class idCommon * common
virtual void DLL_GetFileName(const char *baseName, char *dllName, int maxLength)