diff --git a/src/client/snd_local.h b/src/client/snd_local.h index 3fc08abad..62b0deceb 100644 --- a/src/client/snd_local.h +++ b/src/client/snd_local.h @@ -208,11 +208,8 @@ extern channel_t s_channels[MAX_CHANNELS]; extern channel_t loop_channels[MAX_CHANNELS]; extern int numLoopChannels; -extern int s_paintedtime; -extern vec3_t listener_forward; -extern vec3_t listener_right; -extern vec3_t listener_up; -extern dma_t dma; +extern int s_paintedtime; +extern dma_t dma; typedef struct { @@ -268,9 +265,6 @@ void S_PaintChannels(int endtime); void S_memoryLoad(sfx_t *sfx); -// spatializes a channel -void S_Spatialize(channel_t *ch); - // adpcm functions int S_AdpcmMemoryNeeded(const wavinfo_t *info); void S_AdpcmEncodeSound(sfx_t *sfx, short *samples); diff --git a/src/game/bg_public.h b/src/game/bg_public.h index b5582da2c..ad5a944d8 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -1494,7 +1494,6 @@ qboolean BG_AddMagicAmmo(playerState_t *ps, int *skill, int teamNum, int numOfCl void PM_ClipVelocity(vec3_t in, vec3_t normal, vec3_t out, float overbounce); -//#define ARENAS_PER_TIER 4 #define MAX_ARENAS 64 #define MAX_ARENAS_TEXT 8192 diff --git a/src/qcommon/q_shared.c b/src/qcommon/q_shared.c index fb7405409..ea109e74c 100644 --- a/src/qcommon/q_shared.c +++ b/src/qcommon/q_shared.c @@ -221,34 +221,6 @@ void COM_BitClear(int array[], int bitNum) } //============================================================================ -/* -============================================================================ - 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; @@ -281,27 +253,6 @@ int LongNoSwap(int l) return l; } -qint64 Long64Swap(qint64 ll) -{ - qint64 result; - - result.b0 = ll.b7; - result.b1 = ll.b6; - result.b2 = ll.b5; - result.b3 = ll.b4; - result.b4 = ll.b3; - result.b5 = ll.b2; - result.b6 = ll.b1; - result.b7 = ll.b0; - - return result; -} - -qint64 Long64NoSwap(qint64 ll) -{ - return ll; -} - float FloatSwap(const float *f) { floatint_t out; @@ -317,39 +268,6 @@ 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; - _BigLong64 = Long64Swap; - _LittleLong64 = Long64NoSwap; - _BigFloat = FloatSwap; - _LittleFloat = FloatNoSwap; - } else - { - _BigShort = ShortNoSwap; - _LittleShort = ShortSwap; - _BigLong = LongNoSwap; - _LittleLong = LongSwap; - _BigLong64 = Long64NoSwap; - _LittleLong64 = Long64Swap; - _BigFloat = FloatNoSwap; - _LittleFloat = FloatSwap; - } -} -*/ - /* ============================================================================ PARSING diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index 3f6d4f8d4..4b8b37a87 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -988,20 +988,6 @@ 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; - float *tv(float x, float y, float z); #define rc(x) va("%s^7", x) // shortcut for color reset after printing variable @@ -1766,15 +1752,6 @@ typedef enum FMV_ID_WAIT } e_status; -typedef enum _flag_status -{ - FLAG_ATBASE = 0, - FLAG_TAKEN, // CTF - FLAG_TAKEN_RED, // One Flag CTF - FLAG_TAKEN_BLUE, // One Flag CTF - FLAG_DROPPED -} flagStatus_t; - #define MAX_GLOBAL_SERVERS 4096 #define MAX_OTHER_SERVERS 128 #define MAX_PINGREQUESTS 16 diff --git a/src/qcommon/vm.c b/src/qcommon/vm.c index 97b19d838..9daf15839 100644 --- a/src/qcommon/vm.c +++ b/src/qcommon/vm.c @@ -436,8 +436,9 @@ vm_t *VM_Create(const char *module, intptr_t (*systemCalls)(intptr_t *), vmInter if (interpret == VMI_NATIVE) { // try to load as a system dll - vm->dllHandle = Sys_LoadDll(module, vm->fqpath, &vm->entryPoint, VM_DllSyscall); - // TTimo - never try qvm + vm->dllHandle = Sys_LoadDll(module, &vm->entryPoint, VM_DllSyscall); + + // never try qvm if (vm->dllHandle) { return vm; diff --git a/src/renderer/tr_local.h b/src/renderer/tr_local.h index aa549b4aa..9fe498641 100644 --- a/src/renderer/tr_local.h +++ b/src/renderer/tr_local.h @@ -1424,10 +1424,6 @@ void R_SwapBuffers(int); void R_RenderView(viewParms_t *parms); void R_AddMD3Surfaces(trRefEntity_t *e); -void R_AddNullModelSurfaces(trRefEntity_t *e); -void R_AddBeamSurfaces(trRefEntity_t *e); -void R_AddRailSurfaces(trRefEntity_t *e, qboolean isUnderwater); -void R_AddLightningBoltSurfaces(trRefEntity_t *e); void R_TagInfo_f(void); @@ -1554,7 +1550,6 @@ qhandle_t RE_RegisterShaderFromImage(const char *name, int lightmapIndex, image_ shader_t *R_FindShader(const char *name, int lightmapIndex, qboolean mipRawImage); shader_t *R_GetShaderByHandle(qhandle_t hShader); -shader_t *R_GetShaderByState(int index, long *cycleTime); shader_t *R_FindShaderByName(const char *name); void R_InitShaders(void); void R_ShaderList_f(void); @@ -1713,7 +1708,6 @@ SKIES void R_BuildCloudData(shaderCommands_t *shader); void R_InitSkyTexCoords(float cloudLayerHeight); -void R_DrawSkyBox(shaderCommands_t *shader); void RB_DrawSun(void); void RB_ClipSkyPolygons(shaderCommands_t *shader); @@ -1792,7 +1786,6 @@ ANIMATED MODELS ============================================================= */ -void R_MakeAnimModel(model_t *model); void R_AddAnimSurfaces(trRefEntity_t *ent); void RB_SurfaceAnim(mdsSurface_t *surfType); int R_GetBoneTag(orientation_t *outTag, mdsHeader_t *mds, int startTagIndex, const refEntity_t *refent, const char *tagName); diff --git a/src/sys/sys_local.h b/src/sys/sys_local.h index 9e09fd0da..1a26218ca 100644 --- a/src/sys/sys_local.h +++ b/src/sys/sys_local.h @@ -65,7 +65,7 @@ void Sys_AnsiColorPrint(const char *msg); int Sys_PID(void); qboolean Sys_PIDIsRunning(int pid); -void *Sys_LoadDll(const char *name, char *fqpath, +void *Sys_LoadDll(const char *name, intptr_t(**entryPoint) (int, ...), intptr_t (*systemcalls)(intptr_t, ...)); void Sys_UnloadDll(void *dllHandle); diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c index 5655327ff..1d584ad8a 100644 --- a/src/sys/sys_main.c +++ b/src/sys/sys_main.c @@ -529,11 +529,10 @@ void Sys_UnloadDll(void *dllHandle) * @brief Used by Sys_LoadDll to get handle on a mod library * @return Handle to a mod library */ -static void *Sys_TryLibraryLoad(const char *base, const char *gamedir, const char *fname, char *fqpath) +static void *Sys_TryLibraryLoad(const char *base, const char *gamedir, const char *fname) { void *libHandle; char *fn; - *fqpath = 0; fn = FS_BuildOSPath(base, gamedir, fname); @@ -556,7 +555,6 @@ static void *Sys_TryLibraryLoad(const char *base, const char *gamedir, const cha return NULL; } Com_Printf("succeeded\n"); - Q_strncpyz(fqpath, fn, MAX_QPATH) ; return libHandle; } @@ -567,7 +565,7 @@ static void *Sys_TryLibraryLoad(const char *base, const char *gamedir, const cha * #2 look in fs_basepath * #3 try to revert to the default mod library */ -void *Sys_LoadDll(const char *name, char *fqpath, +void *Sys_LoadDll(const char *name, intptr_t(**entryPoint) (int, ...), intptr_t (*systemcalls)(intptr_t, ...)) { @@ -596,18 +594,18 @@ void *Sys_LoadDll(const char *name, char *fqpath, } #endif - libHandle = Sys_TryLibraryLoad(homepath, gamedir, fname, fqpath); + libHandle = Sys_TryLibraryLoad(homepath, gamedir, fname); if (!libHandle && basepath) { - libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath); + libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname); } // HACK: sometimes a library is loaded from the mod dir when it shouldn't. Why? if (!libHandle && strcmp(gamedir, DEFAULT_MODGAME)) { Com_Printf("Sys_LoadDll: failed to load the mod library. Trying to revert to the default one.\n"); - libHandle = Sys_TryLibraryLoad(basepath, DEFAULT_MODGAME, fname, fqpath); + libHandle = Sys_TryLibraryLoad(basepath, DEFAULT_MODGAME, fname); } if (!libHandle) diff --git a/src/ui/ui_shared.h b/src/ui/ui_shared.h index 834a209a1..12bde9ac3 100644 --- a/src/ui/ui_shared.h +++ b/src/ui/ui_shared.h @@ -504,7 +504,6 @@ const char *String_Alloc(const char *p); void String_Init(void); void String_Report(void); void Init_Display(displayContextDef_t *dc); -void Display_ExpandMacros(char *buff); void Menu_Init(menuDef_t *menu); void Item_Init(itemDef_t *item); void Menu_PostParse(menuDef_t *menu);