diff --git a/engine/client/cl_ents.c b/engine/client/cl_ents.c index 9ff38a484..b25ebf2dc 100644 --- a/engine/client/cl_ents.c +++ b/engine/client/cl_ents.c @@ -1488,7 +1488,6 @@ packet_entities_t *CL_ProcessPacketEntities(float *servertime, qboolean nolerp) { packet_entities_t *packnew, *packold; int i; - static float oldoldtime; //, spnum; if (nolerp) diff --git a/engine/client/cl_input.c b/engine/client/cl_input.c index 7e98e0e0d..8e4979b7a 100644 --- a/engine/client/cl_input.c +++ b/engine/client/cl_input.c @@ -813,7 +813,6 @@ void CLNQ_SendCmd(void) float CL_FilterTime (double time, float wantfps) //now returns the extra time not taken in this slot. Note that negative 1 means uncapped. { - extern cvar_t rate; float fps, fpscap; if (cls.timedemo || cls.protocol == CP_QUAKE3) @@ -1061,8 +1060,6 @@ void CL_SendCmd (float frametime) extern cvar_t cl_maxfps; - int cursor_entitynumber=0;//I hate warnings as errors - if (cls.demoplayback != DPB_NONE) { if (cls.demoplayback == DPB_MVD) diff --git a/engine/client/cl_tent.c b/engine/client/cl_tent.c index 4bd3cfcfe..1cad6ebea 100644 --- a/engine/client/cl_tent.c +++ b/engine/client/cl_tent.c @@ -2291,9 +2291,7 @@ void CLQ2_ParseTEnt (void) // into a circle but it could be faked well enough, well except for // the fact that these effects have ids associated with them // sort of how beams have ents associated - { - int id = MSG_ReadShort(); - } + MSG_ReadShort(); // id if (P_RunParticleEffectTypeString(pos, NULL, 1, "te_widowbeamout")) P_RunParticleEffect(pos, NULL, 13*8, 300); break; diff --git a/engine/client/clq2_ents.c b/engine/client/clq2_ents.c index b24fc9868..cf0240f7d 100644 --- a/engine/client/clq2_ents.c +++ b/engine/client/clq2_ents.c @@ -1610,11 +1610,13 @@ void CLQ2_AddPacketEntities (q2frame_t *frame) renderfx |= Q2RF_SHELL_BLUE; // if we have a blue shell (and not a red shell), turn it to cyan by adding green else if (renderfx & Q2RF_SHELL_BLUE) + { // go to green if it's on already, otherwise do cyan (flash green) if (renderfx & Q2RF_SHELL_GREEN) renderfx &= ~Q2RF_SHELL_BLUE; else renderfx |= Q2RF_SHELL_GREEN; + } } } // pmm diff --git a/engine/client/in_win.c b/engine/client/in_win.c index 5db55acf4..5a8cc5269 100644 --- a/engine/client/in_win.c +++ b/engine/client/in_win.c @@ -64,6 +64,7 @@ cvar_t m_threshold_noforce = SCVAR("m_threshold_noforce", "0"); cvar_t cl_keypad = SCVAR("cl_keypad", "0"); qboolean CSQC_MouseMove(float xdelta, float ydelta); +qboolean Key_MouseShouldBeFree(void); typedef struct { union { @@ -1334,7 +1335,7 @@ void IN_MouseEvent (int mstate) static void ProcessMouse(mouse_t *mouse, usercmd_t *cmd, int pnum) { - extern int mouseusedforgui, mousecursor_x, mousecursor_y; + extern int mousecursor_x, mousecursor_y; extern int mousemove_x, mousemove_y; int mx, my; diff --git a/engine/client/menu.h b/engine/client/menu.h index 91b46e285..89c4cf0de 100644 --- a/engine/client/menu.h +++ b/engine/client/menu.h @@ -271,6 +271,7 @@ menubutton_t *MC_AddCommand(menu_t *menu, int x, int y, char *text, qboolean (*c menuedit_t *MC_AddEdit(menu_t *menu, int x, int y, char *text, char *def); menuedit_t *MC_AddEditCvar(menu_t *menu, int x, int y, char *text, char *name); menucustom_t *MC_AddCustom(menu_t *menu, int x, int y, void *data); +menucombo_t *MC_AddCvarCombo(menu_t *menu, int x, int y, const char *caption, cvar_t *cvar, const char **ops, const char **values); menu_t *M_CreateMenu (int extrasize); void M_AddMenu (menu_t *menu); diff --git a/engine/common/common.h b/engine/common/common.h index e1043681b..dce209de1 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -329,6 +329,7 @@ int FS_Remove(char *fname, int relativeto); //0 on success, non-0 on error qboolean FS_WriteFile (char *filename, void *data, int len, int relativeto); vfsfile_t *FS_OpenVFS(char *filename, char *mode, int relativeto); vfsfile_t *FS_OpenTemp(void); +vfsfile_t *FS_OpenTCP(char *name); void FS_UnloadPackFiles(void); void FS_ReloadPackFiles(void); char *FS_GenerateClientPacksList(char *buffer, int maxlen, int basechecksum); diff --git a/engine/common/net_wins.c b/engine/common/net_wins.c index 459320a7b..d326d8968 100644 --- a/engine/common/net_wins.c +++ b/engine/common/net_wins.c @@ -436,7 +436,8 @@ qboolean NET_StringToSockaddr (char *s, struct sockaddr_qstorage *sadr) #ifdef IPPROTO_IPV6 if (pgetaddrinfo) { - struct addrinfo *addrinfo, *pos; + struct addrinfo *addrinfo = NULL; + struct addrinfo *pos; struct addrinfo udp6hint; int error; char *port; diff --git a/engine/gl/gl_bloom.c b/engine/gl/gl_bloom.c index b028773da..96a998250 100644 --- a/engine/gl/gl_bloom.c +++ b/engine/gl/gl_bloom.c @@ -36,28 +36,28 @@ extern vrect_t scr_vrect; */ static float Diamond8x[8][8] = { - 0.0f, 0.0f, 0.0f, 0.1f, 0.1f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.2f, 0.3f, 0.3f, 0.2f, 0.0f, 0.0f, - 0.0f, 0.2f, 0.4f, 0.6f, 0.6f, 0.4f, 0.2f, 0.0f, - 0.1f, 0.3f, 0.6f, 0.9f, 0.9f, 0.6f, 0.3f, 0.1f, - 0.1f, 0.3f, 0.6f, 0.9f, 0.9f, 0.6f, 0.3f, 0.1f, - 0.0f, 0.2f, 0.4f, 0.6f, 0.6f, 0.4f, 0.2f, 0.0f, - 0.0f, 0.0f, 0.2f, 0.3f, 0.3f, 0.2f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.1f, 0.1f, 0.0f, 0.0f, 0.0f }; + {0.0f, 0.0f, 0.0f, 0.1f, 0.1f, 0.0f, 0.0f, 0.0f}, + {0.0f, 0.0f, 0.2f, 0.3f, 0.3f, 0.2f, 0.0f, 0.0f}, + {0.0f, 0.2f, 0.4f, 0.6f, 0.6f, 0.4f, 0.2f, 0.0f}, + {0.1f, 0.3f, 0.6f, 0.9f, 0.9f, 0.6f, 0.3f, 0.1f}, + {0.1f, 0.3f, 0.6f, 0.9f, 0.9f, 0.6f, 0.3f, 0.1f}, + {0.0f, 0.2f, 0.4f, 0.6f, 0.6f, 0.4f, 0.2f, 0.0f}, + {0.0f, 0.0f, 0.2f, 0.3f, 0.3f, 0.2f, 0.0f, 0.0f}, + {0.0f, 0.0f, 0.0f, 0.1f, 0.1f, 0.0f, 0.0f, 0.0f} }; static float Diamond6x[6][6] = { - 0.0f, 0.0f, 0.1f, 0.1f, 0.0f, 0.0f, - 0.0f, 0.3f, 0.5f, 0.5f, 0.3f, 0.0f, - 0.1f, 0.5f, 0.9f, 0.9f, 0.5f, 0.1f, - 0.1f, 0.5f, 0.9f, 0.9f, 0.5f, 0.1f, - 0.0f, 0.3f, 0.5f, 0.5f, 0.3f, 0.0f, - 0.0f, 0.0f, 0.1f, 0.1f, 0.0f, 0.0f }; + {0.0f, 0.0f, 0.1f, 0.1f, 0.0f, 0.0f}, + {0.0f, 0.3f, 0.5f, 0.5f, 0.3f, 0.0f}, + {0.1f, 0.5f, 0.9f, 0.9f, 0.5f, 0.1f}, + {0.1f, 0.5f, 0.9f, 0.9f, 0.5f, 0.1f}, + {0.0f, 0.3f, 0.5f, 0.5f, 0.3f, 0.0f}, + {0.0f, 0.0f, 0.1f, 0.1f, 0.0f, 0.0f} }; static float Diamond4x[4][4] = { - 0.3f, 0.4f, 0.4f, 0.3f, - 0.4f, 0.9f, 0.9f, 0.4f, - 0.4f, 0.9f, 0.9f, 0.4f, - 0.3f, 0.4f, 0.4f, 0.3f }; + {0.3f, 0.4f, 0.4f, 0.3f}, + {0.4f, 0.9f, 0.9f, 0.4f}, + {0.4f, 0.9f, 0.9f, 0.4f}, + {0.3f, 0.4f, 0.4f, 0.3f} }; static int BLOOM_SIZE; @@ -187,7 +187,6 @@ R_Bloom_InitTextures */ void R_Bloom_InitTextures( void ) { - extern int gl_filter_max; qbyte *data; int size; int maxtexsize; diff --git a/engine/gl/gl_rmain.c b/engine/gl/gl_rmain.c index 8ba98479f..f7c3a9648 100644 --- a/engine/gl/gl_rmain.c +++ b/engine/gl/gl_rmain.c @@ -231,8 +231,6 @@ void GL_InitSceneProcessingShaders_WaterWarp (void) void GL_InitSceneProcessingShaders_MenuTint(void) { - static vec3_t defaultcolor = {1, 1, 1}; - char *vshader = "\ varying vec2 texcoord;\ void main(void)\ diff --git a/engine/gl/gl_shader.c b/engine/gl/gl_shader.c index f71da4fa8..52885846a 100644 --- a/engine/gl/gl_shader.c +++ b/engine/gl/gl_shader.c @@ -541,7 +541,7 @@ static void Shader_EntityMergable ( shader_t *shader, shaderpass_t *pass, char * static void Shader_ProgramName ( shader_t *shader, shaderpass_t *pass, char **ptr ) { - char *vert, *frag; + void *vert, *frag; char *token; if (shader->programhandle) { //this allows fallbacks @@ -554,7 +554,7 @@ static void Shader_ProgramName ( shader_t *shader, shaderpass_t *pass, char **pt token = Shader_ParseString ( ptr ); FS_LoadFile(token, &frag); if (vert && frag) - shader->programhandle = GLSlang_CreateProgram("", vert, frag); + shader->programhandle = GLSlang_CreateProgram("", (char *)vert, (char *)frag); if (vert) FS_FreeFile(vert); if (frag) diff --git a/engine/qclib/qcc_cmdlib.c b/engine/qclib/qcc_cmdlib.c index 0f0342e76..53974cfc8 100644 --- a/engine/qclib/qcc_cmdlib.c +++ b/engine/qclib/qcc_cmdlib.c @@ -52,10 +52,10 @@ long QCC_SwapLong (long l) { qbyte b1,b2,b3,b4; - b1 = l&255; - b2 = (l>>8)&255; - b3 = (l>>16)&255; - b4 = (l>>24)&255; + b1 = (qbyte)l; + b2 = (qbyte)(l>>8); + b3 = (qbyte)(l>>16); + b4 = (qbyte)(l>>24); return ((long)b1<<24) + ((long)b2<<16) + ((long)b3<<8) + b4; } diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index e8e260c82..e0b9a4f79 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -6480,7 +6480,6 @@ int PR_EnableEBFSBuiltin(char *name, int binum) lh_extension_t *checkfteextensioncl(int mask, char *name) //true if the cient extension mask matches an extension name { int i; - unsigned int m = 1; for (i = 0; i < sizeof(FTE_Protocol_Extensions)/sizeof(lh_extension_t); i++) { if (mask & (1<flags | pfv[1]->flags | pfv[2]->flags) & (ALIAS_XY_CLIP_MASK | ALIAS_Z_CLIP) ) ) { // totally unclipped - extern int r_p0[6], r_p1[6], r_p2[6]; r_affinetridesc.pfinalverts = pfinalverts; r_affinetridesc.ptriangles = ptri; @@ -389,7 +386,6 @@ void R_AliasSetUpTransform (int trivial_accept) { int i; float rotationmatrix[3][4], t2matrix[3][4]; - static float tmatrix[3][4]; static float viewmatrix[3][4]; for (i=0 ; i<3 ; i++) diff --git a/engine/sw/sw_draw.c b/engine/sw/sw_draw.c index 7269a1958..32e62629a 100644 --- a/engine/sw/sw_draw.c +++ b/engine/sw/sw_draw.c @@ -790,9 +790,9 @@ void SWDraw_ColouredCharacter (int x, int y, unsigned int num) { if (source[i]) { - dest16[i] = ((((128+pal[source[i]*4+0]*ib_ri)>>12)<<10) + ((dest16[i]&0x7B00)>>1)) | + dest16[i] = (((((128+pal[source[i]*4+0]*ib_ri)>>12)<<10) + ((dest16[i]&0x7B00)>>1)) | ((((128+pal[source[i]*4+1]*ib_gi)>>12)<<5) + ((dest16[i]&0x03D0)>>1)) | - ((128+pal[source[i]*4+2]*ib_bi)>>12) + ((dest16[i]&0x001E)>>1); + ((128+pal[source[i]*4+2]*ib_bi)>>12)) + ((dest16[i]&0x001E)>>1); } } source += 128; @@ -919,7 +919,7 @@ qbyte *COM_LoadFile (char *path, int usehunk); void SWDraw_Crosshair(void) { int x, y; - extern cvar_t crosshair, cl_crossx, cl_crossy, crosshaircolor; + extern cvar_t crosshair, cl_crossx, cl_crossy; extern vrect_t scr_vrect; qbyte c, c2; int sc;