Skip to content

Commit

Permalink
Setting correct version of MinMod 1.4v
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrxd committed Mar 1, 2018
1 parent 7db7472 commit 75bd00c
Showing 1 changed file with 40 additions and 41 deletions.
81 changes: 40 additions & 41 deletions code/qcommon/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void QDECL Com_Printf( const char *fmt, ... ) {
}
Q_strcat(rd_buffer, rd_buffersize, msg);
// TTimo nooo .. that would defeat the purpose
//rd_flush(rd_buffer);
//rd_flush(rd_buffer);
//*rd_buffer = 0;
return;
}
Expand Down Expand Up @@ -190,11 +190,11 @@ void QDECL Com_Printf( const char *fmt, ... ) {
newtime = localtime( &aclock );

logfile = FS_FOpenFileWrite( com_logfileName->string );

if(logfile)
{
Com_Printf( "logfile opened on %s\n", asctime( newtime ) );

if ( com_logfile->integer > 1 )
{
// force it to not buffer so we get valid
Expand Down Expand Up @@ -227,15 +227,15 @@ A Com_Printf that only shows up if the "developer" cvar is set
void QDECL Com_DPrintf( const char *fmt, ...) {
va_list argptr;
char msg[MAXPRINTMSG];

if ( !com_developer || !com_developer->integer ) {
return; // don't confuse non-developers with techie stuff...
}

va_start (argptr,fmt);
va_start (argptr,fmt);
Q_vsnprintf (msg, sizeof(msg), fmt, argptr);
va_end (argptr);

dev = qtrue;
Com_Printf ("%s", msg);
dev = qfalse;
Expand Down Expand Up @@ -781,7 +781,7 @@ Z_ClearZone
*/
void Z_ClearZone( memzone_t *zone, int size ) {
memblock_t *block;

// set the entire zone to one free block

zone->blocklist.next = zone->blocklist.prev = block =
Expand All @@ -792,7 +792,7 @@ void Z_ClearZone( memzone_t *zone, int size ) {
zone->rover = block;
zone->size = size;
zone->used = 0;

block->prev = block->next = &zone->blocklist;
block->tag = 0; // free block
block->id = ZONEID;
Expand Down Expand Up @@ -825,7 +825,7 @@ Z_Free
void Z_Free( void *ptr ) {
memblock_t *block, *other;
memzone_t *zone;

if (!ptr) {
Com_Error( ERR_DROP, "Z_Free: NULL pointer" );
}
Expand Down Expand Up @@ -860,7 +860,7 @@ void Z_Free( void *ptr ) {
Com_Memset( ptr, 0xaa, block->size - sizeof( *block ) );

block->tag = 0; // mark as free

other = block->prev;
if (!other->tag) {
// merge with previous free block
Expand Down Expand Up @@ -950,10 +950,10 @@ void *Z_TagMalloc( int size, int tag ) {
size += sizeof(memblock_t); // account for size of block header
size += 4; // space for memory trash tester
size = PAD(size, sizeof(intptr_t)); // align to 32/64 bit boundary

base = rover = zone->rover;
start = base->prev;

do {
if (rover == start) {
#ifdef ZONE_DEBUG
Expand All @@ -970,7 +970,7 @@ void *Z_TagMalloc( int size, int tag ) {
rover = rover->next;
}
} while (base->tag || base->size < size);

//
// found a block big enough
//
Expand All @@ -987,12 +987,12 @@ void *Z_TagMalloc( int size, int tag ) {
base->next = new;
base->size = size;
}

base->tag = tag; // no longer a free block

zone->rover = base->next; // next allocation will start looking here
zone->used += base->size; //

base->id = ZONEID;

#ifdef ZONE_DEBUG
Expand All @@ -1019,7 +1019,7 @@ void *Z_MallocDebug( int size, char *label, char *file, int line ) {
void *Z_Malloc( int size ) {
#endif
void *buf;

//Z_CheckHeap (); // DEBUG

#ifdef ZONE_DEBUG
Expand Down Expand Up @@ -1049,7 +1049,7 @@ Z_CheckHeap
*/
void Z_CheckHeap( void ) {
memblock_t *block;

for (block = mainzone->blocklist.next ; ; block = block->next) {
if (block->next == &mainzone->blocklist) {
break; // all blocks have been hit
Expand Down Expand Up @@ -1146,7 +1146,7 @@ memstatic_t numberstring[] = {
{ {(sizeof(memstatic_t) + 3) & ~3, TAG_STATIC, NULL, NULL, ZONEID}, {'5', '\0'} },
{ {(sizeof(memstatic_t) + 3) & ~3, TAG_STATIC, NULL, NULL, ZONEID}, {'6', '\0'} },
{ {(sizeof(memstatic_t) + 3) & ~3, TAG_STATIC, NULL, NULL, ZONEID}, {'7', '\0'} },
{ {(sizeof(memstatic_t) + 3) & ~3, TAG_STATIC, NULL, NULL, ZONEID}, {'8', '\0'} },
{ {(sizeof(memstatic_t) + 3) & ~3, TAG_STATIC, NULL, NULL, ZONEID}, {'8', '\0'} },
{ {(sizeof(memstatic_t) + 3) & ~3, TAG_STATIC, NULL, NULL, ZONEID}, {'9', '\0'} }
};

Expand Down Expand Up @@ -1277,7 +1277,7 @@ void Com_Meminfo_f( void ) {
}

if (block->next == &mainzone->blocklist) {
break; // all blocks have been hit
break; // all blocks have been hit
}
if ( (byte *)block + block->size != (byte *)block->next) {
Com_Printf ("ERROR: block size does not touch the next block\n");
Expand All @@ -1299,7 +1299,7 @@ void Com_Meminfo_f( void ) {
}

if (block->next == &smallzone->blocklist) {
break; // all blocks have been hit
break; // all blocks have been hit
}
}

Expand Down Expand Up @@ -1375,7 +1375,7 @@ void Com_TouchMemory( void ) {
}
}
if ( block->next == &mainzone->blocklist ) {
break; // all blocks have been hit
break; // all blocks have been hit
}
}

Expand All @@ -1399,7 +1399,7 @@ void Com_InitSmallZoneMemory( void ) {
Com_Error( ERR_FATAL, "Small zone data failed to allocate %1.1f megs", (float)s_smallZoneTotal / (1024*1024) );
}
Z_ClearZone( smallzone, s_smallZoneTotal );

return;
}

Expand Down Expand Up @@ -1518,7 +1518,7 @@ void Com_InitHunkMemory( void ) {

// make sure the file system has allocated and "not" freed any temp blocks
// this allows the config and product id files ( journal files too ) to be loaded
// by the file system without redunant routines in the file system utilizing different
// by the file system without redunant routines in the file system utilizing different
// memory systems
if (FS_LoadStack() != 0) {
Com_Error( ERR_FATAL, "Hunk initialization failed. File system load stack not zero");
Expand Down Expand Up @@ -1762,7 +1762,7 @@ void *Hunk_AllocateTempMemory( int size ) {

// return a Z_Malloc'd block if the hunk has not been initialized
// this allows the config and product id files ( journal files too ) to be loaded
// by the file system without redunant routines in the file system utilizing different
// by the file system without redunant routines in the file system utilizing different
// memory systems
if ( s_hunkData == NULL )
{
Expand Down Expand Up @@ -1810,7 +1810,7 @@ void Hunk_FreeTempMemory( void *buf ) {

// free with Z_Free if the hunk has not been initialized
// this allows the config and product id files ( journal files too ) to be loaded
// by the file system without redunant routines in the file system utilizing different
// by the file system without redunant routines in the file system utilizing different
// memory systems
if ( s_hunkData == NULL )
{
Expand Down Expand Up @@ -2198,7 +2198,7 @@ int Com_Milliseconds (void) {
Com_PushEvent( &ev );
}
} while ( ev.evType != SE_NONE );

return ev.evTime;
}

Expand Down Expand Up @@ -2516,7 +2516,7 @@ void Com_Init( char *commandLine ) {
Cmd_AddCommand ("changeVectors", MSG_ReportChangeVectors_f );
Cmd_AddCommand ("writeconfig", Com_WriteConfig_f );

s = va("^5MinMod ^31.3V");
s = va("^5MinMod ^31.4V");
com_version = Cvar_Get ("version", s, CVAR_ROM | CVAR_SERVERINFO );

Sys_Init();
Expand Down Expand Up @@ -2666,7 +2666,7 @@ int Com_ModifyMsec( int msec ) {
} else if (com_cameraMode->integer) {
msec *= com_timescale->value;
}

// don't let it scale below 1 msec
if ( msec < 1 && com_timescale->value) {
msec = 1;
Expand All @@ -2680,7 +2680,7 @@ int Com_ModifyMsec( int msec ) {
Com_Printf( "Hitch warning: %i msec frame time\n", msec );

clampTime = 5000;
} else
} else
if ( !com_sv_running->integer ) {
// clients of remote servers do not want to clamp time, because
// it would skew their view of the server's time temporarily
Expand Down Expand Up @@ -2708,13 +2708,13 @@ void Com_Frame( void ) {

int msec, minMsec;
static int lastTime;

int timeBeforeFirstEvents;
int timeBeforeServer;
int timeBeforeEvents;
int timeBeforeClient;
int timeAfter;




Expand All @@ -2736,7 +2736,7 @@ void Com_Frame( void ) {
// key = 0x87243987;

// write config file if anything changed
Com_WriteConfiguration();
Com_WriteConfiguration();

// if "viewlog" has been modified, show or hide the log console
if ( com_viewlog->modified ) {
Expand Down Expand Up @@ -2848,15 +2848,15 @@ void Com_Frame( void ) {
sv -= time_game;
cl -= time_frontend + time_backend;

Com_Printf ("frame:%i all:%3i sv:%3i ev:%3i cl:%3i gm:%3i rf:%3i bk:%3i\n",
Com_Printf ("frame:%i all:%3i sv:%3i ev:%3i cl:%3i gm:%3i rf:%3i bk:%3i\n",
com_frameNumber, all, sv, ev, cl, time_game, time_frontend, time_backend );
}
}

//
// trace optimization tracking
//
if ( com_showtrace->integer ) {

extern int c_traces, c_brush_traces, c_patch_traces;
extern int c_pointcontents;

Expand Down Expand Up @@ -3051,7 +3051,7 @@ static void Field_CompleteKeyname( void )
}

Com_Printf( "]%s\n", completionField->buffer );

Key_KeynameCompletion( PrintMatches );
}
#endif
Expand Down Expand Up @@ -3085,7 +3085,7 @@ void Field_CompleteFilename( const char *dir,
}

Com_Printf( "]%s\n", completionField->buffer );

FS_FilenameCompletion( dir, ext, stripExt, PrintMatches );
}

Expand Down Expand Up @@ -3193,8 +3193,8 @@ static void Field_CompleteCommand( char *cmd,
else if( !Q_stricmp( baseCmd, "demo" ) && completionArgument == 2 )
{
char demoExt[ 16 ];
#ifdef USE_DEMO_FORMAT_42

#ifdef USE_DEMO_FORMAT_42
Com_sprintf( demoExt, sizeof( demoExt ), ".urtdemo" );
#else
Com_sprintf( demoExt, sizeof( demoExt ), ".dm_%d", PROTOCOL_VERSION );
Expand Down Expand Up @@ -3308,4 +3308,3 @@ void Com_RandomBytes( byte *string, int len )
for( i = 0; i < len; i++ )
string[i] = (unsigned char)( rand() % 255 );
}

0 comments on commit 75bd00c

Please sign in to comment.