doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions | Variables
win_main.cpp File Reference
#include "../../idlib/precompiled.h"
#include <errno.h>
#include <float.h>
#include <fcntl.h>
#include <direct.h>
#include <io.h>
#include <conio.h>
#include <mapi.h>
#include <ShellAPI.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "../sys_local.h"
#include "win_local.h"
#include "rc/CreateResourceIDs.h"
#include "../../renderer/tr_local.h"

Go to the source code of this file.

Macros

#define MAXPRINTMSG   4096
 
#define MAXPRINTMSG   4096
 
#define MAX_QUED_EVENTS   256
 
#define MASK_QUED_EVENTS   ( MAX_QUED_EVENTS - 1 )
 
#define OSR2_BUILD_NUMBER   1111
 
#define WIN98_BUILD_NUMBER   1998
 
#define TEST_FPU_EXCEPTIONS
 

Functions

void Sys_GetExeLaunchMemoryStatus (sysMemoryStats_t &stats)
 
void Sys_CreateThread (xthread_t function, void *parms, xthreadPriority priority, xthreadInfo &info, const char *name, xthreadInfo *threads[MAX_THREADS], int *thread_count)
 
void Sys_DestroyThread (xthreadInfo &info)
 
void Sys_Sentry ()
 
const char * Sys_GetThreadName (int *index)
 
void Sys_EnterCriticalSection (int index)
 
void Sys_LeaveCriticalSection (int index)
 
void Sys_WaitForEvent (int index)
 
void Sys_TriggerEvent (int index)
 
void Sys_FlushCacheMemory (void *base, int bytes)
 
void Sys_Error (const char *error,...)
 
void Sys_Quit (void)
 
void Sys_Printf (const char *fmt,...)
 
void Sys_DebugPrintf (const char *fmt,...)
 
void Sys_DebugVPrintf (const char *fmt, va_list arg)
 
void Sys_Sleep (int msec)
 
void Sys_ShowWindow (bool show)
 
bool Sys_IsWindowVisible (void)
 
void Sys_Mkdir (const char *path)
 
ID_TIME_T Sys_FileTimeStamp (FILE *fp)
 
const char * Sys_Cwd (void)
 
const char * Sys_DefaultCDPath (void)
 
const char * Sys_DefaultBasePath (void)
 
const char * Sys_DefaultSavePath (void)
 
const char * Sys_EXEPath (void)
 
int Sys_ListFiles (const char *directory, const char *extension, idStrList &list)
 
char * Sys_GetClipboardData (void)
 
void Sys_SetClipboardData (const char *string)
 
int Sys_DLL_Load (const char *dllName)
 
voidSys_DLL_GetProcAddress (int dllHandle, const char *procName)
 
void Sys_DLL_Unload (int dllHandle)
 
void Sys_QueEvent (int time, sysEventType_t type, int value, int value2, int ptrLength, void *ptr)
 
void Sys_PumpEvents (void)
 
void Sys_GenerateEvents (void)
 
void Sys_ClearEvents (void)
 
sysEvent_t Sys_GetEvent (void)
 
void Sys_In_Restart_f (const idCmdArgs &args)
 
void Sys_StartAsyncThread (void)
 
bool Sys_AlreadyRunning (void)
 
void Sys_Init (void)
 
void Sys_Shutdown (void)
 
cpuid_t Sys_GetProcessorId (void)
 
const char * Sys_GetProcessorString (void)
 
void Win_Frame (void)
 
void _chkstk (int size)
 
void clrstk (void)
 
void TestChkStk (void)
 
void HackChkStk (void)
 
const char * GetExceptionCodeInfo (UINT code)
 
void EmailCrashReport (LPSTR messageText)
 
int Sys_FPU_PrintStateFlags (char *ptr, int ctrl, int stat, int tags, int inof, int inse, int opof, int opse)
 
EXCEPTION_DISPOSITION __cdecl _except_handler (struct _EXCEPTION_RECORD *ExceptionRecord, void *EstablisherFrame, struct _CONTEXT *ContextRecord, void *DispatcherContext)
 
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
 
 __declspec (naked) void clrstk(void)
 
void Sys_SetFatalError (const char *error)
 
void Sys_DoPreferences (void)
 

Variables

Win32Vars_t win32
 
xthreadInfog_threads [MAX_THREADS]
 
int g_thread_count = 0
 
sysEvent_t eventQue [MAX_QUED_EVENTS]
 
int eventHead = 0
 
int eventTail = 0
 

Macro Definition Documentation

#define MASK_QUED_EVENTS   ( MAX_QUED_EVENTS - 1 )

Definition at line 717 of file win_main.cpp.

#define MAX_QUED_EVENTS   256

Definition at line 716 of file win_main.cpp.

#define MAXPRINTMSG   4096

Definition at line 411 of file win_main.cpp.

#define MAXPRINTMSG   4096

Definition at line 411 of file win_main.cpp.

#define OSR2_BUILD_NUMBER   1111

Definition at line 961 of file win_main.cpp.

#define TEST_FPU_EXCEPTIONS
Value:
/* FPU_EXCEPTION_INVALID_OPERATION | */ \
/* FPU_EXCEPTION_DENORMALIZED_OPERAND | */ \
/* FPU_EXCEPTION_DIVIDE_BY_ZERO | */ \
/* FPU_EXCEPTION_NUMERIC_OVERFLOW | */ \
/* FPU_EXCEPTION_NUMERIC_UNDERFLOW | */ \
/* FPU_EXCEPTION_INEXACT_RESULT | */ \
0

Definition at line 1352 of file win_main.cpp.

#define WIN98_BUILD_NUMBER   1998

Definition at line 962 of file win_main.cpp.

Function Documentation

__declspec ( naked  )

Definition at line 1516 of file win_main.cpp.

void _chkstk ( int  size)
EXCEPTION_DISPOSITION __cdecl _except_handler ( struct _EXCEPTION_RECORD *  ExceptionRecord,
void EstablisherFrame,
struct _CONTEXT *  ContextRecord,
void DispatcherContext 
)

Definition at line 1286 of file win_main.cpp.

void clrstk ( void  )
void EmailCrashReport ( LPSTR  messageText)

Definition at line 1236 of file win_main.cpp.

const char* GetExceptionCodeInfo ( UINT  code)

Definition at line 1203 of file win_main.cpp.

void HackChkStk ( void  )

Definition at line 1189 of file win_main.cpp.

bool Sys_AlreadyRunning ( void  )

Definition at line 942 of file win_main.cpp.

void Sys_ClearEvents ( void  )

Definition at line 829 of file win_main.cpp.

void Sys_CreateThread ( xthread_t  function,
void parms,
xthreadPriority  priority,
xthreadInfo info,
const char *  name,
xthreadInfo threads[MAX_THREADS],
int thread_count 
)

Definition at line 93 of file win_main.cpp.

const char* Sys_Cwd ( void  )

Definition at line 490 of file win_main.cpp.

void Sys_DebugPrintf ( const char *  fmt,
  ... 
)

Definition at line 412 of file win_main.cpp.

void Sys_DebugVPrintf ( const char *  fmt,
va_list  arg 
)

Definition at line 429 of file win_main.cpp.

const char* Sys_DefaultBasePath ( void  )

Definition at line 513 of file win_main.cpp.

const char* Sys_DefaultCDPath ( void  )

Definition at line 504 of file win_main.cpp.

const char* Sys_DefaultSavePath ( void  )

Definition at line 522 of file win_main.cpp.

void Sys_DestroyThread ( xthreadInfo info)

Definition at line 119 of file win_main.cpp.

void* Sys_DLL_GetProcAddress ( int  dllHandle,
const char *  procName 
)

Definition at line 679 of file win_main.cpp.

int Sys_DLL_Load ( const char *  dllName)

Definition at line 658 of file win_main.cpp.

void Sys_DLL_Unload ( int  dllHandle)

Definition at line 688 of file win_main.cpp.

void Sys_DoPreferences ( void  )

Definition at line 1614 of file win_main.cpp.

void Sys_EnterCriticalSection ( int  index)

Definition at line 161 of file win_main.cpp.

void Sys_Error ( const char *  error,
  ... 
)

Definition at line 335 of file win_main.cpp.

const char* Sys_EXEPath ( void  )

Definition at line 531 of file win_main.cpp.

ID_TIME_T Sys_FileTimeStamp ( FILE *  fp)

Definition at line 479 of file win_main.cpp.

void Sys_FlushCacheMemory ( void base,
int  bytes 
)

Definition at line 325 of file win_main.cpp.

int Sys_FPU_PrintStateFlags ( char *  ptr,
int  ctrl,
int  stat,
int  tags,
int  inof,
int  inse,
int  opof,
int  opse 
)

Definition at line 648 of file win_cpu.cpp.

void Sys_GenerateEvents ( void  )

Definition at line 794 of file win_main.cpp.

char* Sys_GetClipboardData ( void  )

Definition at line 587 of file win_main.cpp.

sysEvent_t Sys_GetEvent ( void  )

Definition at line 838 of file win_main.cpp.

void Sys_GetExeLaunchMemoryStatus ( sysMemoryStats_t stats)

Definition at line 84 of file win_main.cpp.

cpuid_t Sys_GetProcessorId ( void  )

Definition at line 1137 of file win_main.cpp.

const char* Sys_GetProcessorString ( void  )

Definition at line 1146 of file win_main.cpp.

const char* Sys_GetThreadName ( int index)

Definition at line 139 of file win_main.cpp.

void Sys_In_Restart_f ( const idCmdArgs args)

Definition at line 862 of file win_main.cpp.

void Sys_Init ( void  )

Definition at line 964 of file win_main.cpp.

bool Sys_IsWindowVisible ( void  )

Definition at line 461 of file win_main.cpp.

void Sys_LeaveCriticalSection ( int  index)

Definition at line 174 of file win_main.cpp.

int Sys_ListFiles ( const char *  directory,
const char *  extension,
idStrList list 
)

Definition at line 542 of file win_main.cpp.

void Sys_Mkdir ( const char *  path)

Definition at line 470 of file win_main.cpp.

void Sys_Printf ( const char *  fmt,
  ... 
)

Definition at line 389 of file win_main.cpp.

void Sys_PumpEvents ( void  )

Definition at line 761 of file win_main.cpp.

void Sys_QueEvent ( int  time,
sysEventType_t  type,
int  value,
int  value2,
int  ptrLength,
void ptr 
)

Definition at line 731 of file win_main.cpp.

void Sys_Quit ( void  )

Definition at line 375 of file win_main.cpp.

void Sys_Sentry ( )

Definition at line 130 of file win_main.cpp.

void Sys_SetClipboardData ( const char *  string)

Definition at line 613 of file win_main.cpp.

void Sys_SetFatalError ( const char *  error)

Definition at line 1606 of file win_main.cpp.

void Sys_ShowWindow ( bool  show)

Definition at line 452 of file win_main.cpp.

void Sys_Shutdown ( void  )

Definition at line 1128 of file win_main.cpp.

void Sys_Sleep ( int  msec)

Definition at line 443 of file win_main.cpp.

void Sys_StartAsyncThread ( void  )

Definition at line 912 of file win_main.cpp.

void Sys_TriggerEvent ( int  index)

Definition at line 198 of file win_main.cpp.

void Sys_WaitForEvent ( int  index)

Definition at line 184 of file win_main.cpp.

void TestChkStk ( void  )

Definition at line 1178 of file win_main.cpp.

void Win_Frame ( void  )

Definition at line 1160 of file win_main.cpp.

int WINAPI WinMain ( HINSTANCE  hInstance,
HINSTANCE  hPrevInstance,
LPSTR  lpCmdLine,
int  nCmdShow 
)

Definition at line 1365 of file win_main.cpp.

Variable Documentation

int eventHead = 0

Definition at line 720 of file win_main.cpp.

Definition at line 719 of file win_main.cpp.

int eventTail = 0

Definition at line 721 of file win_main.cpp.

int g_thread_count = 0

Definition at line 72 of file win_main.cpp.

xthreadInfo* g_threads[MAX_THREADS]

Definition at line 70 of file win_main.cpp.

Win32Vars_t win32

Definition at line 65 of file win_main.cpp.