diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_lib.c | 12 | ||||
-rw-r--r-- | src/game/bg_lib.h | 7 | ||||
-rw-r--r-- | src/game/g_local.h | 2 | ||||
-rw-r--r-- | src/game/g_main.c | 13 | ||||
-rw-r--r-- | src/game/g_spawn.c | 2 | ||||
-rw-r--r-- | src/game/g_syscalls.c | 4 | ||||
-rw-r--r-- | src/game/g_utils.c | 2 | ||||
-rw-r--r-- | src/game/q_math.c | 2 | ||||
-rw-r--r-- | src/game/q_shared.h | 8 |
9 files changed, 21 insertions, 31 deletions
diff --git a/src/game/bg_lib.c b/src/game/bg_lib.c index b4ba5696..d940c6d8 100644 --- a/src/game/bg_lib.c +++ b/src/game/bg_lib.c @@ -51,6 +51,8 @@ * SUCH DAMAGE. */ +#include "bg_lib.h" + #if defined(LIBC_SCCS) && !defined(lint) #if 0 static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93"; @@ -312,9 +314,6 @@ char *strstr( const char *string, const char *strCharSet ) #endif // bk001211 -// bk001120 - presumably needed for Mac -//#if !defined(_MSC_VER) && !defined(__linux__) -// bk001127 - undid undo #if defined ( Q3_VM ) int tolower( int c ) @@ -335,7 +334,6 @@ int toupper( int c ) } #endif -//#ifndef _MSC_VER void *memmove( void *dest, const void *src, size_t count ) { @@ -1469,10 +1467,6 @@ double _atof( const char **stringPtr ) } -// bk001120 - presumably needed for Mac -//#if !defined ( _MSC_VER ) && ! defined ( __linux__ ) - -// bk001127 - undid undo #if defined ( Q3_VM ) int atoi( const char *string ) @@ -1870,7 +1864,7 @@ reswitch: case 'f': AddFloat( &buf_p, *(double *)arg, width, prec ); -#ifdef __LCC__ +#ifdef Q3_VM arg += 1; // everything is 32 bit in my compiler #else arg += 2; diff --git a/src/game/bg_lib.h b/src/game/bg_lib.h index d31f4cf8..61d64025 100644 --- a/src/game/bg_lib.h +++ b/src/game/bg_lib.h @@ -2,6 +2,12 @@ // compiled for the virtual machine // This file is NOT included on native builds +#ifndef BG_LIB_H +#define BG_LIB_H + +#ifndef NULL +#define NULL ((void *)0) +#endif /* * Portions Copyright (C) 2000-2001 Tim Angus @@ -83,3 +89,4 @@ double fabs( double x ); double acos( double x ); float pow( float x, float y ); +#endif // BG_LIB_H diff --git a/src/game/g_local.h b/src/game/g_local.h index d9997d49..57e1934a 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -709,7 +709,7 @@ void G_AddEvent( gentity_t *ent, int event, int eventParm ); void G_BroadcastEvent( int event, int eventParm ); void G_SetOrigin( gentity_t *ent, vec3_t origin ); void AddRemap(const char *oldShader, const char *newShader, float timeOffset); -const char *BuildShaderStateConfig(); +const char *BuildShaderStateConfig( void ); #define MAX_QUEUE_COMMANDS 64 //should be MAX_RELIABLE_COMMANDS/server.h diff --git a/src/game/g_main.c b/src/game/g_main.c index 52fec4e0..22ff74f7 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -209,9 +209,9 @@ This is the only way control passes into the module. This must be the very first function compiled into the .q3vm file ================ */ -int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, - int arg5, int arg6, int arg7, int arg8, int arg9, - int arg10, int arg11 ) +long vmMain( long command, long arg0, long arg1, long arg2, long arg3, long arg4, + long arg5, long arg6, long arg7, long arg8, long arg9, + long arg10, long arg11 ) { switch( command ) { @@ -224,7 +224,7 @@ int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, return 0; case GAME_CLIENT_CONNECT: - return (int)ClientConnect( arg0, arg1, arg2 ); + return (long)ClientConnect( arg0, arg1, arg2 ); case GAME_CLIENT_THINK: ClientThink( arg0 ); @@ -698,9 +698,6 @@ void G_ShutdownGame( int restart ) //=================================================================== -#ifndef GAME_HARD_LINKED -// this is only here so the functions in q_shared.c and bg_*.c can link - void QDECL Com_Error( int level, const char *error, ... ) { va_list argptr; @@ -725,8 +722,6 @@ void QDECL Com_Printf( const char *msg, ... ) G_Printf( "%s", text ); } -#endif - /* ======================================================================== diff --git a/src/game/g_spawn.c b/src/game/g_spawn.c index 080f7b41..c8481d9d 100644 --- a/src/game/g_spawn.c +++ b/src/game/g_spawn.c @@ -297,7 +297,7 @@ spawn_t spawns[ ] = { "misc_anim_model", SP_misc_anim_model }, { "misc_light_flare", SP_misc_light_flare }, - { 0, 0 } + { NULL, 0 } }; /* diff --git a/src/game/g_syscalls.c b/src/game/g_syscalls.c index 93035395..4f8a8ca7 100644 --- a/src/game/g_syscalls.c +++ b/src/game/g_syscalls.c @@ -19,10 +19,10 @@ // this file is only included when building a dll // g_syscalls.asm is included instead when building a qvm -static int (QDECL *syscall)( int arg, ... ) = (int (QDECL *)( int, ...))-1; +static long (QDECL *syscall)( long arg, ... ) = (long (QDECL *)( long, ...))-1; -void dllEntry( int (QDECL *syscallptr)( int arg,... ) ) +void dllEntry( long (QDECL *syscallptr)( long arg,... ) ) { syscall = syscallptr; } diff --git a/src/game/g_utils.c b/src/game/g_utils.c index 1f4fa6df..9b163a92 100644 --- a/src/game/g_utils.c +++ b/src/game/g_utils.c @@ -53,7 +53,7 @@ void AddRemap( const char *oldShader, const char *newShader, float timeOffset ) } } -const char *BuildShaderStateConfig( ) +const char *BuildShaderStateConfig( void ) { static char buff[ MAX_STRING_CHARS * 4 ]; char out[ ( MAX_QPATH * 2 ) + 5 ]; diff --git a/src/game/q_math.c b/src/game/q_math.c index 83410479..4171ebfc 100644 --- a/src/game/q_math.c +++ b/src/game/q_math.c @@ -1466,6 +1466,7 @@ float VectorMinComponent( vec3_t v ) return smallest; } +#ifdef Q3_VM /* =============== round @@ -1478,3 +1479,4 @@ float round( float v ) else return floor( v ); } +#endif diff --git a/src/game/q_shared.h b/src/game/q_shared.h index 6b1c8932..b59f1a5e 100644 --- a/src/game/q_shared.h +++ b/src/game/q_shared.h @@ -248,14 +248,6 @@ static inline float LittleFloat (const float l) { return FloatSwap(&l); } #define PATH_SEP '/' -// bk001205 - try -#ifdef Q3_STATIC -#define GAME_HARD_LINKED -#define CGAME_HARD_LINKED -#define UI_HARD_LINKED -#define BOTLIB_HARD_LINKED -#endif - #if !idppc inline static short BigShort( short l) { return ShortSwap(l); } #define LittleShort |