Skip to content
Browse files

Removed unneeded stuff from q_shared.h and q_shared.cpp, removed byte…

… functions and linked it from idLib. NOTE : Vanilla renderer and ET game logic broken for now (need to move that to C++)
  • Loading branch information...
1 parent 4e2fa32 commit 1d0cbe2d77b0ffc9b25a72d74d2d2e325f439f5a @TheDushan committed Sep 2, 2012
View
1 src/engine/botlib/be_aas_file.cpp
@@ -41,6 +41,7 @@ Maryland 20850 USA.
*
*****************************************************************************/
+#include "../idLib/precompiled.h"
#include "../qcommon/q_shared.h"
#include "l_memory.h"
#include "l_struct.h"
View
1 src/engine/botlib/be_aas_route.cpp
@@ -41,6 +41,7 @@ Maryland 20850 USA.
*
*****************************************************************************/
+#include "../idLib/precompiled.h"
#include "../qcommon/q_shared.h"
#include "l_utils.h"
#include "l_memory.h"
View
1 src/engine/botlib/be_aas_routetable.cpp
@@ -40,6 +40,7 @@ Maryland 20850 USA.
// Tab Size: 3
//===========================================================================
+#include "../idLib/precompiled.h"
#include "../qcommon/q_shared.h"
#include "l_memory.h"
#include "l_struct.h"
View
2 src/engine/client/cl_cin.cpp
@@ -49,7 +49,7 @@ Maryland 20850 USA.
// I need to ask Ryan if it's as simple as a constant index or
// if some more coding needs to be done.
-
+#include "../idLib/precompiled.h"
#include "client.h"
#include "../snd_system/snd_local.h"
#define MAXSIZE 8
View
2 src/engine/client/cl_net_chan.cpp
@@ -32,7 +32,7 @@ Maryland 20850 USA.
===========================================================================
*/
-
+#include "../idLib/precompiled.h"
#include "../qcommon/q_shared.h"
#include "../qcommon/qcommon.h"
#include "client.h"
View
124 src/engine/idLib/Lib.cpp
@@ -263,24 +263,24 @@ void idLib::Warning( const char *fmt, ... ) {
*/
// can't just use function pointers, or dll linkage can mess up
-//static short (*_BigShort)( short l );
-//static short (*_LittleShort)( short l );
-//static int (*_BigLong)( int l );
-//static int (*_LittleLong)( int l );
-//static float (*_BigFloat)( float l );
-//static float (*_LittleFloat)( float l );
+static short (*_BigShort)( short l );
+static short (*_LittleShort)( short l );
+static int (*_BigLong)( int l );
+static int (*_LittleLong)( int l );
+static float (*_BigFloat)( float l );
+static float (*_LittleFloat)( float l );
static void (*_BigRevBytes)( void *bp, int elsize, int elcount );
static void (*_LittleRevBytes)( void *bp, int elsize, int elcount );
static void (*_LittleBitField)( void *bp, int elsize );
static void (*_SixtetsForInt)( byte *out, int src );
static int (*_IntForSixtets)( byte *in );
-//short BigShort( short l ) { return _BigShort( l ); }
-//short LittleShort( short l ) { return _LittleShort( l ); }
-//int BigLong( int l ) { return _BigLong( l ); }
-//int LittleLong( int l ) { return _LittleLong( l ); }
-//float BigFloat( float l ) { return _BigFloat( l ); }
-//float LittleFloat( float l ) { return _LittleFloat( l ); }
+short BigShort( short l ) { return _BigShort( l ); }
+short LittleShort( short l ) { return _LittleShort( l ); }
+int BigLong( int l ) { return _BigLong( l ); }
+int LittleLong( int l ) { return _LittleLong( l ); }
+float BigFloat( float l ) { return _BigFloat( l ); }
+float LittleFloat( float l ) { return _LittleFloat( l ); }
void BigRevBytes( void *bp, int elsize, int elcount ) { _BigRevBytes( bp, elsize, elcount ); }
void LittleRevBytes( void *bp, int elsize, int elcount ){ _LittleRevBytes( bp, elsize, elcount ); }
void LittleBitField( void *bp, int elsize ){ _LittleBitField( bp, elsize ); }
@@ -292,30 +292,30 @@ int IntForSixtets( byte *in ) { return _IntForSixtets( in ); }
================
ShortSwap
================
-
+*/
short ShortSwap( short l ) {
byte b1,b2;
b1 = l&255;
b2 = (l>>8)&255;
return (b1<<8) + b2;
-}*/
+}
/*
================
ShortNoSwap
================
-
+*/
short ShortNoSwap( short l ) {
return l;
-}*/
+}
/*
================
LongSwap
================
-
+*/
int LongSwap ( int l ) {
byte b1,b2,b3,b4;
@@ -325,22 +325,22 @@ int LongSwap ( int l ) {
b4 = (l>>24)&255;
return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4;
-}*/
+}
/*
================
LongNoSwap
================
-
+*/
int LongNoSwap( int l ) {
return l;
-}*/
+}
/*
================
FloatSwap
================
-
+*/
float FloatSwap( float f ) {
union {
float f;
@@ -354,16 +354,16 @@ float FloatSwap( float f ) {
dat2.b[2] = dat1.b[1];
dat2.b[3] = dat1.b[0];
return dat2.f;
-}*/
+}
/*
================
FloatNoSwap
================
-
+*/
float FloatNoSwap( float f ) {
return f;
-}*/
+}
/*
=====================================================================
@@ -516,44 +516,44 @@ int IntForSixtetsBig( byte *in ) {
ret |= in[3] << 3*6;
return ret;
}
-//
-///*
-//================
-//Swap_Init
-//================
-//*/
-//void Swap_Init( void ) {
-// byte swaptest[2] = {1,0};
-//
-// // set the byte swapping variables in a portable manner
-// if ( *(short *)swaptest == 1) {
-// // little endian ex: x86
-// _BigShort = ShortSwap;
-// _LittleShort = ShortNoSwap;
-// _BigLong = LongSwap;
-// _LittleLong = LongNoSwap;
-// _BigFloat = FloatSwap;
-// _LittleFloat = FloatNoSwap;
-// _BigRevBytes = RevBytesSwap;
-// _LittleRevBytes = RevBytesNoSwap;
-// _LittleBitField = RevBitFieldNoSwap;
-// _SixtetsForInt = SixtetsForIntLittle;
-// _IntForSixtets = IntForSixtetsLittle;
-// } else {
-// // big endian ex: ppc
-// _BigShort = ShortNoSwap;
-// _LittleShort = ShortSwap;
-// _BigLong = LongNoSwap;
-// _LittleLong = LongSwap;
-// _BigFloat = FloatNoSwap;
-// _LittleFloat = FloatSwap;
-// _BigRevBytes = RevBytesNoSwap;
-// _LittleRevBytes = RevBytesSwap;
-// _LittleBitField = RevBitFieldSwap;
-// _SixtetsForInt = SixtetsForIntBig;
-// _IntForSixtets = IntForSixtetsBig;
-// }
-//}
+
+/*
+================
+Swap_Init
+================
+*/
+void Swap_Init( void ) {
+ byte swaptest[2] = {1,0};
+
+ // set the byte swapping variables in a portable manner
+ if ( *(short *)swaptest == 1) {
+ // little endian ex: x86
+ _BigShort = ShortSwap;
+ _LittleShort = ShortNoSwap;
+ _BigLong = LongSwap;
+ _LittleLong = LongNoSwap;
+ _BigFloat = FloatSwap;
+ _LittleFloat = FloatNoSwap;
+ _BigRevBytes = RevBytesSwap;
+ _LittleRevBytes = RevBytesNoSwap;
+ _LittleBitField = RevBitFieldNoSwap;
+ _SixtetsForInt = SixtetsForIntLittle;
+ _IntForSixtets = IntForSixtetsLittle;
+ } else {
+ // big endian ex: ppc
+ _BigShort = ShortNoSwap;
+ _LittleShort = ShortSwap;
+ _BigLong = LongNoSwap;
+ _LittleLong = LongSwap;
+ _BigFloat = FloatNoSwap;
+ _LittleFloat = FloatSwap;
+ _BigRevBytes = RevBytesNoSwap;
+ _LittleRevBytes = RevBytesSwap;
+ _LittleBitField = RevBitFieldSwap;
+ _SixtetsForInt = SixtetsForIntBig;
+ _IntForSixtets = IntForSixtetsBig;
+ }
+}
/*
==========
View
8 src/engine/idLib/Lib.h
@@ -107,11 +107,11 @@ void UnpackColor( const dword color, idVec4 &unpackedColor );
// little/big endian conversion
short BigShort( short l );
-//short LittleShort( short l );
+short LittleShort( short l );
int BigLong( int l );
-//int LittleLong( int l );e
-//float BigFloat( float l );
-//float LittleFloat( float l );
+int LittleLong( int l );
+float BigFloat( float l );
+float LittleFloat( float l );
void BigRevBytes( void *bp, int elsize, int elcount );
void LittleRevBytes( void *bp, int elsize, int elcount );
void LittleBitField( void *bp, int elsize );
View
2 src/engine/idLib/precompiled.h
@@ -319,7 +319,7 @@ class idFile {
// We have expression parsing and evaluation code in multiple places:
// materials, sound shaders, and guis. We should unify them.
-const int MAX_EXPRESSION_OPS = 4096;
+//const int MAX_EXPRESSION_OPS = 4096;
const int MAX_EXPRESSION_REGISTERS = 4096;
//
//// renderer
View
1 src/engine/qcommon/cm_load.cpp
@@ -34,6 +34,7 @@ Maryland 20850 USA.
// cmodel.c -- model loading
+#include "../idLib/precompiled.h"
#include "cm_local.h"
#ifdef BSPC
View
1 src/engine/qcommon/common.cpp
@@ -3070,6 +3070,7 @@ void Com_Init(char *commandLine)
// cvar and command buffer management
Com_ParseCommandLine(commandLine);
+ Swap_Init();
Cbuf_Init();
Com_InitZoneMemory();
View
1 src/engine/qcommon/msg.cpp
@@ -32,6 +32,7 @@ Maryland 20850 USA.
===========================================================================
*/
+#include "../idLib/precompiled.h"
#include "../qcommon/q_shared.h"
#include "qcommon.h"
View
1 src/engine/qcommon/q_math.cpp
@@ -3667,4 +3667,3 @@ void QuatTransformVector(const quat_t q, const vec3_t in, vec3_t out)
MatrixTransformNormal(m, in, out);
}
-NOGLOBALALIAS void Vec4_Cpy( vec4_t o, const vec4_t i ) { o[0] = i[0]; o[1] = i[1]; o[2] = i[2]; o[3] = i[3]; }
View
38 src/engine/qcommon/q_platform.h
@@ -419,44 +419,6 @@ Maryland 20850 USA.
#error "DLL_EXT not defined"
#endif
-//endianness
-short ShortSwap (short l);
-int LongSwap (int l);
-float FloatSwap (float f);
-
-#if defined( Q3_BIG_ENDIAN ) && defined( Q3_LITTLE_ENDIAN )
-#error "Endianness defined as both big and little"
-#elif defined( Q3_BIG_ENDIAN )
-
-#define LittleShort(x) ShortSwap(x)
-#define LittleLong(x) LongSwap(x)
-#define LittleFloat(x) FloatSwap(&x)
-#define BigShort
-#define BigLong
-#define BigFloat
-
-#elif defined( Q3_LITTLE_ENDIAN )
-
-#define LittleShort
-#define LittleLong
-#define LittleFloat
-#define BigShort(x) ShortSwap(x)
-#define BigLong(x) LongSwap(x)
-#define BigFloat(x) FloatSwap(&x)
-
-#elif defined( Q3_VM )
-
-#define LittleShort
-#define LittleLong
-#define LittleFloat
-#define BigShort
-#define BigLong
-#define BigFloat
-
-#else
-#error "Endianness not defined"
-#endif
-
//platform string
#ifdef NDEBUG
#define PLATFORM_STRING OS_STRING "-" ARCH_STRING
View
425 src/engine/qcommon/q_shared.cpp
@@ -211,7 +211,7 @@ int MemStreamGetLong(memStream_t * s)
if(MemStreamRead(s, &c, 4) == 0)
return -1;
- return LittleLong(c);
+ return c;// LongSwap(c);
}
int MemStreamGetShort(memStream_t * s)
@@ -224,7 +224,7 @@ int MemStreamGetShort(memStream_t * s)
if(MemStreamRead(s, &c, 2) == 0)
return -1;
- return LittleShort(c);
+ return c;// ShortSwap(c);
}
float MemStreamGetFloat(memStream_t * s)
@@ -237,7 +237,7 @@ float MemStreamGetFloat(memStream_t * s)
if(MemStreamRead(s, &c.i, 4) == 0)
return -1;
- return LittleFloat(c.f);
+ return c.f;// FloatSwap(c.f);
}
//=============================================================================
@@ -549,123 +549,6 @@ void COM_BitClear( int array[], int bitNum ) {
array[i] &= ~( 1 << bitNum );
}
-//============================================================================
-
-/*
-============================================================================
-
- BYTE ORDER FUNCTIONS
-
-============================================================================
-*/
-
-/*
-============================================================================
-
- BYTE ORDER FUNCTIONS
-
-============================================================================
-*/
-/*
-// can't just use function pointers, or dll linkage can
-// mess up when qcommon is included in multiple places
-static short ( *_BigShort )( short l ) = NULL;
-static short ( *_LittleShort )( short l ) = NULL;
-static int ( *_BigLong )( int l ) = NULL;
-static int ( *_LittleLong )( int l ) = NULL;
-static qint64 ( *_BigLong64 )( qint64 l ) = NULL;
-static qint64 ( *_LittleLong64 )( qint64 l ) = NULL;
-static float ( *_BigFloat )( float l ) = NULL;
-static float ( *_LittleFloat )( float l ) = NULL;
-
-short LittleShort( short l ) {return _LittleShort( l );}
-int LittleLong( int l ) {return _LittleLong( l );}
-qint64 LittleLong64( qint64 l ) {return _LittleLong64( l );}
-float LittleFloat( float l ) {return _LittleFloat( l );}
-
-short BigShort( short l ) {return _BigShort( l );}
-int BigLong( int l ) {return _BigLong( l );}
-qint64 BigLong64( qint64 l ) {return _BigLong64( l );}
-float BigFloat( float l ) {return _BigFloat( l );}
-*/
-
-short ShortSwap( short l ) {
- byte b1,b2;
-
- b1 = l & 255;
- b2 = ( l >> 8 ) & 255;
-
- return ( b1 << 8 ) + b2;
-}
-
-short ShortNoSwap( short l ) {
- return l;
-}
-
-int LongSwap( int l ) {
- byte b1,b2,b3,b4;
-
- b1 = l & 255;
- b2 = ( l >> 8 ) & 255;
- b3 = ( l >> 16 ) & 255;
- b4 = ( l >> 24 ) & 255;
-
- return ( (int)b1 << 24 ) + ( (int)b2 << 16 ) + ( (int)b3 << 8 ) + b4;
-}
-
-int LongNoSwap( int l ) {
- return l;
-}
-
-float FloatSwap( float f ) {
- union
- {
- float f;
- byte b[4];
- } dat1, dat2;
-
-
- dat1.f = f;
- dat2.b[0] = dat1.b[3];
- dat2.b[1] = dat1.b[2];
- dat2.b[2] = dat1.b[1];
- dat2.b[3] = dat1.b[0];
- return dat2.f;
-}
-
-float FloatNoSwap( float f ) {
- return f;
-}
-
-/*
-================
-Swap_Init
-================
-
-void Swap_Init( void ) {
- byte swaptest[2] = {1,0};
-
-// set the byte swapping variables in a portable manner
- if ( *(short *)swaptest == 1 ) {
- _BigShort = ShortSwap;
- _LittleShort = ShortNoSwap;
- _BigLong = LongSwap;
- _LittleLong = LongNoSwap;
- _BigFloat = FloatSwap;
- _LittleFloat = FloatNoSwap;
- } else
- {
- _BigShort = ShortNoSwap;
- _LittleShort = ShortSwap;
- _BigLong = LongNoSwap;
- _LittleLong = LongSwap;
- _BigFloat = FloatNoSwap;
- _LittleFloat = FloatSwap;
- }
-
-}
-
-*/
/*
============================================================================
@@ -1207,21 +1090,6 @@ char *COM_ParseExt2(char **data_p, qboolean allowLineBreaks)
}
// *INDENT-ON*
-
-/*
-==================
-COM_MatchToken
-==================
-*/
-void COM_MatchToken( char **buf_p, char *match ) {
- char *token;
-
- token = COM_Parse( buf_p );
- if ( strcmp( token, match ) ) {
- Com_Error( ERR_DROP, "MatchToken: %s != %s", token, match );
- }
-}
-
/*
=================
SkipBracedSection_Depth
@@ -1293,152 +1161,6 @@ void SkipRestOfLine( char **data ) {
*data = p;
}
-
-void Parse1DMatrix( char **buf_p, int x, float *m, qboolean checkBrackets ) {
- char *token;
- int i;
-
- if(checkBrackets)
- {
- COM_MatchToken( buf_p, "(" );
- }
-
- for ( i = 0 ; i < x ; i++ ) {
- token = COM_Parse( buf_p );
- m[i] = atof( token );
- }
-
- if(checkBrackets) {
- COM_MatchToken( buf_p, ")" );
- }
-}
-
-void Parse2DMatrix( char **buf_p, int y, int x, float *m ) {
- int i;
-
- COM_MatchToken( buf_p, "(" );
-
- for ( i = 0 ; i < y ; i++ ) {
- Parse1DMatrix( buf_p, x, m + i * x, qtrue );
- }
-
- COM_MatchToken( buf_p, ")" );
-}
-
-void Parse3DMatrix( char **buf_p, int z, int y, int x, float *m ) {
- int i;
-
- COM_MatchToken( buf_p, "(" );
-
- for ( i = 0 ; i < z ; i++ ) {
- Parse2DMatrix( buf_p, y, x, m + i * x * y );
- }
-
- COM_MatchToken( buf_p, ")" );
-}
-
-
-/*
-===============
-COM_Parse2Infos
-===============
-*/
-int COM_Parse2Infos( char *buf, int max, char infos[][MAX_INFO_STRING] ) {
- const char *token;
- int count;
- char key[MAX_TOKEN_CHARS];
-
- count = 0;
-
- while ( 1 ) {
- token = COM_Parse( &buf );
- if ( !token[0] ) {
- break;
- }
- if ( strcmp( token, "{" ) ) {
- Com_Printf( "Missing { in info file\n" );
- break;
- }
-
- if ( count == max ) {
- Com_Printf( "Max infos exceeded\n" );
- break;
- }
-
- infos[count][0] = 0;
- while ( 1 ) {
- token = COM_Parse( &buf );
- if ( !token[0] ) {
- Com_Printf( "Unexpected end of info file\n" );
- break;
- }
- if ( !strcmp( token, "}" ) ) {
- break;
- }
- Q_strncpyz( key, token, sizeof( key ) );
-
- token = COM_ParseExt( &buf, qfalse );
- if ( !token[0] ) {
- token = "<NULL>";
- }
- Info_SetValueForKey( infos[count], key, token );
- }
- count++;
- }
-
- return count;
-}
-
-void COM_Parse21DMatrix(char **buf_p, int x, float *m, qboolean checkBrackets)
-{
- char *token;
- int i;
-
- if(checkBrackets)
- {
- COM_MatchToken(buf_p, "(");
- }
-
- for(i = 0; i < x; i++)
- {
- token = COM_Parse2(buf_p);
- m[i] = atof(token);
- }
-
- if(checkBrackets)
- {
- COM_MatchToken(buf_p, ")");
- }
-}
-
-void COM_Parse22DMatrix(char **buf_p, int y, int x, float *m)
-{
- int i;
-
- COM_MatchToken(buf_p, "(");
-
- for(i = 0; i < y; i++)
- {
- COM_Parse21DMatrix(buf_p, x, m + i * x, qtrue);
- }
-
- COM_MatchToken(buf_p, ")");
-}
-
-void COM_Parse23DMatrix(char **buf_p, int z, int y, int x, float *m)
-{
- int i;
-
- COM_MatchToken(buf_p, "(");
-
- for(i = 0; i < z; i++)
- {
- COM_Parse22DMatrix(buf_p, y, x, m + i * x * y);
- }
-
- COM_MatchToken(buf_p, ")");
-}
-
/*
===================
Com_HexStrToInt
@@ -2438,70 +2160,6 @@ qboolean Com_ClientListContains( const clientList_t *list, int clientNum )
}
/*
-============
-Com_ClientListAdd
-============
-*/
-void Com_ClientListAdd( clientList_t *list, int clientNum )
-{
- if( clientNum < 0 || clientNum >= MAX_CLIENTS || !list )
- return;
- if( clientNum < 32 )
- list->lo |= ( 1 << clientNum );
- else
- list->hi |= ( 1 << ( clientNum - 32 ) );
-}
-
-/*
-============
-Com_ClientListRemove
-============
-*/
-void Com_ClientListRemove( clientList_t *list, int clientNum )
-{
- if( clientNum < 0 || clientNum >= MAX_CLIENTS || !list )
- return;
- if( clientNum < 32 )
- list->lo &= ~( 1 << clientNum );
- else
- list->hi &= ~( 1 << ( clientNum - 32 ) );
-}
-
-/*
-============
-Com_ClientListString
-============
-*/
-char *Com_ClientListString( const clientList_t *list )
-{
- static char s[ 17 ];
-
- s[ 0 ] = '\0';
- if( !list )
- return s;
- Com_sprintf( s, sizeof( s ), "%08x%08x", list->hi, list->lo );
- return s;
-}
-
-/*
-============
-Com_ClientListParse
-============
-*/
-void Com_ClientListParse( clientList_t *list, const char *s )
-{
- if( !list )
- return;
- list->lo = 0;
- list->hi = 0;
- if( !s )
- return;
- if( strlen( s ) != 16 )
- return;
- sscanf( s, "%x%x", &list->hi, &list->lo );
-}
-
-/*
================
VectorMatrixMultiply
================
@@ -2513,90 +2171,13 @@ void VectorMatrixMultiply( const vec3_t p, vec3_t m[ 3 ], vec3_t out )
out[ 2 ] = m[ 0 ][ 2 ] * p[ 0 ] + m[ 1 ][ 2 ] * p[ 1 ] + m[ 2 ][ 2 ] * p[ 2 ];
}
-void Q_ParseNewlines( char *dest, const char *src, int destsize ) {
- for( ; *src && destsize > 1; src++, destsize-- )
- *dest++ = ( ( *src == '\\' && *( ++src ) == 'n' ) ? '\n' : *src );
- *dest++ = '\0';
-}
-
-
#ifdef _MSC_VER
float rint( float v ) {
if( v >= 0.5f ) return ceilf( v );
else return floorf( v );
}
#endif
-float QDECL fatof( const char *string )
-{
- float sign;
- float value;
- int c;
-
-
- // skip whitespace
- while ( *string <= ' ' ) {
- if ( !*string ) {
- return 0;
- }
- string++;
- }
-
- // check sign
- switch ( *string ) {
- case '+':
- string++;
- sign = 1.0f;
- break;
- case '-':
- string++;
- sign = -1.0f;
- break;
- default:
- sign = 1.0f;
- break;
- }
-
- // read digits
- value = 0.0f;
- c = string[0];
- if ( c != '.' ) {
- for( ; ; )
- {
- c = *string++;
- if ( c < '0' || c > '9' ) {
- break;
- }
- c -= '0';
- value = value * 10.0f + c;
- }
- } else {
- string++;
- }
-
- // check for decimal point
- if ( c == '.' ) {
- float fraction;
-
- fraction = 0.1f;
- for( ; ; )
- {
- c = *string++;
- if ( c < '0' || c > '9' ) {
- break;
- }
- c -= '0';
- value += c * fraction;
- fraction *= 0.1f;
- }
-
- }
-
- // not handling 10e10 notation...
-
- return value * sign;
-}
-
void QDECL Com_FatalError( const char *error, ... ) {
va_list argptr;
char msg[8192];
View
52 src/engine/qcommon/q_shared.h
@@ -1307,13 +1307,10 @@ char *COM_Parse( char **data_p );
char *COM_Parse2(char **data_p);
char *COM_ParseExt2(char **data_p, qboolean allowLineBreak);
-float QDECL fatof( const char * );
-
char *COM_ParseExt( char **data_p, qboolean allowLineBreak );
int COM_Compress( char *data_p );
void COM_ParseError( char *format, ... ) _attribute( ( format( printf,1,2 ) ) );
void COM_ParseWarning( char *format, ... ) _attribute( ( format( printf,1,2 ) ) );
-int COM_Parse2Infos( char *buf, int max, char infos[][MAX_INFO_STRING] );
qboolean COM_BitCheck( const int array[], int bitNum );
void COM_BitSet( int array[], int bitNum );
@@ -1345,20 +1342,10 @@ typedef struct pc_token_s
// data is an in/out parm, returns a parsed out token
-void COM_MatchToken( char**buf_p, char *match );
-
-void COM_Parse21DMatrix(char **buf_p, int x, float *m, qboolean checkBrackets);
-void COM_Parse22DMatrix(char **buf_p, int y, int x, float *m);
-void COM_Parse23DMatrix(char **buf_p, int z, int y, int x, float *m);
-
qboolean SkipBracedSection( char **program );
qboolean SkipBracedSection_Depth( char **program, int depth ); // start at given depth if already
void SkipRestOfLine( char **data );
-void Parse1DMatrix( char **buf_p, int x, float *m, qboolean checkBrackets );
-void Parse2DMatrix( char **buf_p, int y, int x, float *m );
-void Parse3DMatrix( char **buf_p, int z, int y, int x, float *m );
-
int QDECL Com_sprintf (char *dest, int size, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
@@ -1425,42 +1412,11 @@ qboolean Q_strreplace(char *dest, int destsize, const char *find, const c
int Q_PrintStrlen( const char *string );
// removes color sequences from string
char *Q_CleanStr( char *string );
-// parse "\n" into '\n'
-void Q_ParseNewlines( char *dest, const char *src, int destsize );
// Count the number of char tocount encountered in string
int Q_CountChar(const char *string, char tocount);
// removes whitespaces and other bad directory characters
char *Q_CleanDirName( char *dirname );
-//=============================================
-
-// 64-bit integers for global rankings interface
-// implemented as a struct for qvm compatibility
-typedef struct
-{
- byte b0;
- byte b1;
- byte b2;
- byte b3;
- byte b4;
- byte b5;
- byte b6;
- byte b7;
-} qint64;
-
-/*
-short LittleShort(short l);
-int LittleLong(int l);
-qint64 LittleLong64(qint64 l);
-float LittleFloat(float l);
-
-short BigShort(short l);
-int BigLong(int l);
-qint64 BigLong64(qint64 l);
-float BigFloat(float l);
-
-void Swap_Init(void);
-*/
float *tv( float x, float y, float z );
char * QDECL va(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
@@ -2463,10 +2419,6 @@ typedef struct {
} clientList_t;
qboolean Com_ClientListContains( const clientList_t *list, int clientNum );
-void Com_ClientListAdd( clientList_t *list, int clientNum );
-void Com_ClientListRemove( clientList_t *list, int clientNum );
-char *Com_ClientListString( const clientList_t *list );
-void Com_ClientListParse( clientList_t *list, const char *s );
#define SQR( a ) ( ( a ) * ( a ) )
@@ -2499,14 +2451,10 @@ enum {
#define NOGLOBALALIAS
#endif
-
-
#ifndef REF_PARAM
#define REF_PARAM( p ) p
#endif
-NOGLOBALALIAS void Vec4_Cpy( vec4_t o, const vec4_t i );
-
typedef enum {
CT_FRONT_SIDED,
CT_BACK_SIDED,
View
5 src/engine/rendererGL/rendererD3D10.vcxproj
@@ -415,7 +415,7 @@
<AdditionalIncludeDirectories>..\..\libs\libsdl\include;..\..\libs\zlibwapi\include;..\..\libs\openexr;..\..\libs\jpeg;..\..\libs\libpng;..\..\libs\freetype\include\;..\..\libs\freetype\include\freetype2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;BUILD_FREETYPE;FT_FREETYPE_H;USE_D3D10;USE_XREAL_RENDERER;USE_INTERNAL_JPEG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>false</FunctionLevelLinking>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointModel>Fast</FloatingPointModel>
@@ -765,6 +765,9 @@
<ProjectReference Include="..\..\libs\libsdl\VisualC\SDL\SDL.vcxproj">
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
</ProjectReference>
+ <ProjectReference Include="..\idLib\idLib.vcxproj">
+ <Project>{4b9edd89-0b65-46f0-94e0-6827116bbc6d}</Project>
+ </ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
View
3 src/engine/rendererGL/rendererGL.vcxproj
@@ -699,6 +699,9 @@
<ProjectReference Include="..\..\libs\libsdl\VisualC\SDL\SDL.vcxproj">
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
</ProjectReference>
+ <ProjectReference Include="..\idLib\idLib.vcxproj">
+ <Project>{4b9edd89-0b65-46f0-94e0-6827116bbc6d}</Project>
+ </ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
View
4 src/engine/rendererGL/rendererGL.vcxproj.filters
@@ -368,10 +368,10 @@
<ClInclude Include="tr_local.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\renderer\tr_types.h">
+ <ClInclude Include="..\qcommon\q_shared.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\qcommon\q_shared.h">
+ <ClInclude Include="tr_types.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
View
2 src/engine/rendererGL/tr_bsp.cpp
@@ -22,6 +22,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
// tr_bsp.c
+
+#include "../idLib/precompiled.h"
#include "tr_local.h"
/*
View
4 src/engine/rendererGL/tr_image_tga.cpp
@@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
// tr_image.c
-#include "tr_local.h"
-
+#include "../idLib/precompiled.h"
+#include "tr_local.h"
/*
=============
View
14 src/engine/rendererGL/tr_init.cpp
@@ -21,6 +21,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
// tr_init.c -- functions that are not called every frame
+
+#include "../idLib/precompiled.h"
#include "tr_local.h"
#if defined(__cplusplus)
@@ -1758,7 +1760,11 @@ qboolean R_Init(void)
int i;
ri.Printf(PRINT_ALL, "----- R_Init -----\n");
-
+
+#if defined (COMPAT_ET)
+ Swap_Init();
+#endif
+
// clear all our internal state
Com_Memset(&tr, 0, sizeof(tr));
Com_Memset(&backEnd, 0, sizeof(backEnd));
@@ -2415,7 +2421,7 @@ void QDECL Com_Printf(const char *msg, ...)
char text[1024];
va_start(argptr, msg);
- Q_vsnprintf(text, sizeof(text), msg, argptr);
+ idStr::vsnPrintf(text, sizeof(text), msg, argptr);
va_end(argptr);
ri.Printf(PRINT_ALL, "%s", text);
@@ -2427,7 +2433,7 @@ void QDECL Com_DPrintf(const char *msg, ...)
char text[1024];
va_start(argptr, msg);
- Q_vsnprintf(text, sizeof(text), msg, argptr);
+ idStr::vsnPrintf(text, sizeof(text), msg, argptr);
va_end(argptr);
ri.Printf(PRINT_DEVELOPER, "%s", text);
@@ -2439,7 +2445,7 @@ void QDECL Com_Error(int level, const char *error, ...)
char text[1024];
va_start(argptr, error);
- Q_vsnprintf(text, sizeof(text), error, argptr);
+ idStr::vsnPrintf(text, sizeof(text), error, argptr);
va_end(argptr);
ri.Error(level, "%s", text);
View
4 src/engine/rendererGL/tr_model.cpp
@@ -21,6 +21,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
// tr_models.c -- model loading and caching
+
+#include "../idLib/precompiled.h"
#include "tr_local.h"
#define LL(x) x=LittleLong(x)
@@ -415,7 +417,7 @@ void R_XMLError(void *ctx, const char *fmt, ...)
static char msg[4096];
va_start(argptr, fmt);
- Q_vsnprintf(msg, sizeof(msg), fmt, argptr);
+ idStr::vsnPrintf(msg, sizeof(msg), fmt, argptr);
va_end(argptr);
ri.Printf(PRINT_WARNING, "%s", msg);
View
2 src/engine/rendererGL/tr_model_md3.cpp
@@ -21,6 +21,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
// tr_models.c -- model loading and caching
+
+#include "../idLib/precompiled.h"
#include "tr_local.h"
#define LL(x) x=LittleLong(x)
View
1 src/engine/rendererGL/tr_model_mdc.cpp
@@ -34,6 +34,7 @@ Maryland 20850 USA.
*/
// tr_model_mdc.c -- Enemy Territory .mdc model loading and caching
+#include "../idLib/precompiled.h"
#include "tr_local.h"
#define LL(x) x=LittleLong(x)
View
1 src/engine/rendererGL/tr_model_mdm.cpp
@@ -34,6 +34,7 @@ Maryland 20850 USA.
*/
// tr_model_mdm.c -- Enemy Territory .mdm model loading and caching
+#include "../idLib/precompiled.h"
#include "tr_local.h"
#include "tr_model_skel.h"
View
1 src/engine/server/sv_game.cpp
@@ -34,6 +34,7 @@ Maryland 20850 USA.
// sv_game.c -- interface to the game dll
+#include "../idLib/precompiled.h"
#include "server.h"
#include "../botlib/botlib.h"
View
1 src/engine/snd_system/snd_codec_wav.cpp
@@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
+#include "../idLib/precompiled.h"
#include "../client/client.h"
#include "snd_codec.h"
View
1 src/engine/snd_system/snd_dma.cpp
@@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
+#include "../idLib/precompiled.h"
#include "snd_local.h"
#include "snd_codec.h"
#include "../client/client.h"
View
1 src/engine/snd_system/snd_mem.cpp
@@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
+#include "../idLib/precompiled.h"
#include "snd_local.h"
#include "snd_codec.h"

0 comments on commit 1d0cbe2

Please sign in to comment.
Something went wrong with that request. Please try again.