diff options
author | Tim Angus <tim@ngus.net> | 2006-01-06 02:21:29 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2006-01-06 02:21:29 +0000 |
commit | dc6118816aa49c9b1e6dd82e6c6504f2153c37df (patch) | |
tree | cfcc2d80bd03f2abdaacc8292677650bd8e8181d /src/qcommon | |
parent | 4e6ae21de9bc373801b68a28b66067480bda4288 (diff) |
* Added traps to query demo state
* Demo state now displayed from cgame
* Merged ioq3-r464
- gcc4/-O0 bug fix
- zone/hunk megs faffage
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/common.c | 24 | ||||
-rw-r--r-- | src/qcommon/q_shared.h | 8 | ||||
-rw-r--r-- | src/qcommon/vm_x86.c | 2 |
3 files changed, 25 insertions, 9 deletions
diff --git a/src/qcommon/common.c b/src/qcommon/common.c index b0cee0d3..68a750c2 100644 --- a/src/qcommon/common.c +++ b/src/qcommon/common.c @@ -38,9 +38,12 @@ int demo_protocols[] = #define MAX_NUM_ARGVS 50 #define MIN_DEDICATED_COMHUNKMEGS 1 -#define MIN_COMHUNKMEGS 128 -#define DEF_COMHUNKMEGS "128" -#define DEF_COMZONEMEGS "24" +#define MIN_COMHUNKMEGS 128 +#define DEF_COMHUNKMEGS 128 +#define DEF_COMZONEMEGS 24 +#define STRING(x) #x +#define DEF_COMHUNKMEGS_S STRING(DEF_COMHUNKMEGS) +#define DEF_COMZONEMEGS_S STRING(DEF_COMZONEMEGS) int com_argc; char *com_argv[MAX_NUM_ARGVS+1]; @@ -409,7 +412,7 @@ Com_StartupVariable Searches for command line parameters that are set commands. If match is not NULL, only that cvar will be looked for. That is necessary because cddir and basedir need to be set -before the filesystem is started, but all other sets shouls +before the filesystem is started, but all other sets should be after execing the config and default. =============== */ @@ -1380,11 +1383,16 @@ void Com_InitSmallZoneMemory( void ) { void Com_InitZoneMemory( void ) { cvar_t *cv; + + //FIXME: 05/01/06 com_zoneMegs is useless right now as neither q3config.cfg nor + // Com_StartupVariable have been executed by this point. The net result is that + // s_zoneTotal will always be set to the default value. + // allocate the random block zone - cv = Cvar_Get( "com_zoneMegs", DEF_COMZONEMEGS, CVAR_LATCH | CVAR_ARCHIVE ); + cv = Cvar_Get( "com_zoneMegs", DEF_COMZONEMEGS_S, CVAR_LATCH | CVAR_ARCHIVE ); - if ( cv->integer < 20 ) { - s_zoneTotal = 1024 * 1024 * 16; + if ( cv->integer < DEF_COMZONEMEGS ) { + s_zoneTotal = 1024 * 1024 * DEF_COMZONEMEGS; } else { s_zoneTotal = cv->integer * 1024 * 1024; } @@ -1495,7 +1503,7 @@ void Com_InitHunkMemory( void ) { } // allocate the stack based hunk allocator - cv = Cvar_Get( "com_hunkMegs", DEF_COMHUNKMEGS, CVAR_LATCH | CVAR_ARCHIVE ); + cv = Cvar_Get( "com_hunkMegs", DEF_COMHUNKMEGS_S, CVAR_LATCH | CVAR_ARCHIVE ); // if we are not dedicated min allocation is 56, otherwise min is 1 if (com_dedicated && com_dedicated->integer) { diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index 537dee36..3955e2c4 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -1258,6 +1258,14 @@ typedef enum _flag_status { FLAG_DROPPED } flagStatus_t; +typedef enum { + DS_NONE, + + DS_PLAYBACK, + DS_RECORDING, + + DS_NUM_DEMO_STATES +} demoState_t; #define MAX_GLOBAL_SERVERS 4096 diff --git a/src/qcommon/vm_x86.c b/src/qcommon/vm_x86.c index de2c0eeb..617c4ac4 100644 --- a/src/qcommon/vm_x86.c +++ b/src/qcommon/vm_x86.c @@ -230,7 +230,7 @@ void AsmCall( void ) { "doret: \n\t" \ " ret \n\t" \ : "=rm" (callSyscallNum), "=rm" (callProgramStack), "=rm" (callOpStack) \ - : "rm" (instructionPointers) \ + : "m" (instructionPointers) \ : "ax", "di", "si", "cx" \ ); } |