chase.c, cl_input.c, cl_parse.c, client.h, common.c, common.h, console.h,

cvar.h, draw.h, gl_draw.c, gl_fog.c, gl_mesh.c, gl_model.c, gl_model.h,
gl_rmain.c, gl_rmisc.c, gl_screen.c, gl_sky.c, gl_texmgr.c, glquake.h,
host.c, keys.c, keys.h, main.c, menu.c, menu.h, pr_cmds.c, quakedef.h,
r_alias.c, r_brush.c, r_part.c, r_sprite.c, r_world.c, sbar.c, sbar.h,
screen.h, snd_dma.c, snd_mem.c, snd_mix.c, sv_main.c, sys_sdl.c, vid.h,
view.h, world.c, world.h:  Loads of warning fixes about missing function
prototypes, missing parens around &, missing braces leading to ambiguous
else statements and unused and uninitialized variables. There are still a
couple of unitialised variables here and there, but not much. The warnings
about strict aliasing violations need taking care of.


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@21 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2010-02-16 12:01:07 +00:00
parent d10086d324
commit 572e94ecdb
45 changed files with 153 additions and 176 deletions

View file

@ -83,7 +83,6 @@ TODO: stay at least 8 units away from all walls in this leaf
void Chase_UpdateForDrawing (void)
{
int i;
//float dist;
vec3_t forward, up, right;
vec3_t ideal, crosshair, temp;

View file

@ -183,25 +183,33 @@ float CL_KeyState (kbutton_t *key)
val = 0;
if (impulsedown && !impulseup)
{
if (down)
val = 0.5; // pressed and held this frame
else
val = 0; // I_Error ();
}
if (impulseup && !impulsedown)
{
if (down)
val = 0; // I_Error ();
else
val = 0; // released this frame
}
if (!impulsedown && !impulseup)
{
if (down)
val = 1.0; // held the entire frame
else
val = 0; // up the entire frame
}
if (impulsedown && impulseup)
{
if (down)
val = 0.75; // released and re-pressed this frame
else
val = 0.25; // pressed and released this frame
}
key->state &= 1; // clear impulses

View file

@ -932,6 +932,7 @@ void CL_ParseServerMessage (void)
//
MSG_BeginReading ();
lastcmd = 0;
while (1)
{
if (msg_badread)

View file

@ -368,3 +368,4 @@ void V_SetContentsColor (int contents);
//
void CL_InitTEnts (void);
void CL_SignonReply (void);

View file

@ -1143,7 +1143,7 @@ void COM_InitArgv (int argc, char **argv)
break;
}
if (com_cmdline[n-1] = ' ')
if (n > 0 && com_cmdline[n-1] == ' ')
com_cmdline[n-1] = 0; //johnfitz -- kill the trailing space
Con_Printf("\nCommand line: %s",com_cmdline);

View file

@ -158,6 +158,7 @@ char *COM_SkipPath (char *pathname);
void COM_StripExtension (char *in, char *out);
void COM_FileBase (char *in, char *out);
void COM_DefaultExtension (char *path, char *extension);
void COM_CreatePath (char *path);
char *va(char *format, ...);
// does a varargs printf into a temp buffer

View file

@ -51,3 +51,8 @@ void Con_NotifyBox (char *text); // during startup for sound / cd warnings
void Con_Show (void);
void Con_Hide (void);
char *Con_Quakebar (int len);
void Con_TabComplete (void);
void Con_LogCenterPrint (char *str);

View file

@ -97,4 +97,7 @@ void Cvar_WriteVariables (FILE *f);
cvar_t *Cvar_FindVar (char *var_name);
void Cvar_Init (void);
extern cvar_t *cvar_vars;

View file

@ -37,5 +37,7 @@ void Draw_FadeScreen (void);
void Draw_String (int x, int y, char *str);
qpic_t *Draw_PicFromWad (char *name);
qpic_t *Draw_CachePic (char *path);
void Draw_NewGame (void);
void GL_SetCanvas (canvastype newcanvas); //johnfitz
//void GL_SetCanvas (canvastype newcanvas); //johnfitz

View file

@ -149,7 +149,6 @@ int Scrap_AllocBlock (int w, int h, int *x, int *y)
{
int i, j;
int best, best2;
//int bestx; unused -- kristian
int texnum;
for (texnum=0 ; texnum<MAX_SCRAPS ; texnum++)
@ -367,7 +366,6 @@ Draw_NewGame -- johnfitz
*/
void Draw_NewGame (void)
{
//gltexture_t *glt; unused -- kristian
cachepic_t *pic;
int i;
@ -719,7 +717,7 @@ GL_SetCanvas -- johnfitz -- support various canvas types
void GL_SetCanvas (canvastype newcanvas)
{
extern vrect_t scr_vrect;
float s, w;
float s;
int lines;
if (newcanvas == currentcanvas)

View file

@ -56,7 +56,7 @@ void Fog_Update (float density, float red, float green, float blue, float time)
//check for a fade in progress
if (fade_done > cl.time)
{
float f;//, d; unused -- kristian
float f;
f = (fade_done - cl.time) / fade_time;
old_density = f * old_density + (1.0 - f) * fog_density;

View file

@ -203,14 +203,6 @@ void BuildTris (void)
{
int i, j, k;
int startv;
/* unused -- kristian
mtriangle_t *last, *check;
int m1, m2;
int striplength;
trivertx_t *v;
mtriangle_t *tv;
int index;
*/
float s, t;
int len, bestlen, besttype;
int bestverts[1024];
@ -230,6 +222,7 @@ void BuildTris (void)
continue;
bestlen = 0;
besttype = 0;
for (type = 0 ; type < 2 ; type++)
// type = 1;
{
@ -298,13 +291,6 @@ void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr)
int i, j;
int *cmds;
trivertx_t *verts;
/* unused -- kristian
maliasgroup_t *paliasgroup;
char cache[MAX_QPATH], fullpath[MAX_OSPATH], *c;
FILE *f;
int len;
byte *data;
*/
float hscale, vscale; //johnfitz -- padded skins
int count; //johnfitz -- precompute texcoords for padded skins
int *loadcmds; //johnfitz
@ -319,64 +305,9 @@ void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr)
//johnfitz -- generate meshes
#if 1 //always regenerate meshes
Con_DPrintf ("meshing %s...\n",m->name);
BuildTris ();
#else //conditional regeneration
if (gl_alwaysmesh.value) // build it from scratch, and don't bother saving it to disk
{
Con_DPrintf ("meshing %s...\n",m->name);
BuildTris ();
}
else // check disk cache, and rebuild it and save to disk if necessary
{
// FITZQUAKE 0.85 CREATES DIRECTORIES HERE
//
// look for a cached version
//
strcpy (cache, "glquake/");
COM_StripExtension (m->name+strlen("progs/"), cache+strlen("glquake/"));
strcat (cache, ".ms2");
COM_FOpenFile (cache, &f);
if (f)
{
fread (&numcommands, 4, 1, f);
fread (&numorder, 4, 1, f);
fread (&commands, numcommands * sizeof(commands[0]), 1, f);
fread (&vertexorder, numorder * sizeof(vertexorder[0]), 1, f);
fclose (f);
}
else
{
//
// build it from scratch
//
Con_Printf ("meshing %s...\n",m->name);
BuildTris ();
//
// save out the cached version
//
sprintf (fullpath, "%s/%s", com_gamedir, cache);
f = fopen (fullpath, "wb");
if (f)
{
fwrite (&numcommands, 4, 1, f);
fwrite (&numorder, 4, 1, f);
fwrite (&commands, numcommands * sizeof(commands[0]), 1, f);
fwrite (&vertexorder, numorder * sizeof(vertexorder[0]), 1, f);
fclose (f);
}
}
}
#endif
//johnfitz
// save the data out
paliashdr->poseverts = numorder;

View file

@ -379,7 +379,6 @@ void Mod_LoadTextures (lump_t *l)
int mark, fwidth, fheight;
char filename[MAX_OSPATH], filename2[MAX_OSPATH], mapname[MAX_OSPATH];
byte *data;
FILE *f;
extern byte *hunk_base;
//johnfitz
@ -900,7 +899,6 @@ void Mod_PolyForUnlitSurface (msurface_t *fa)
vec3_t verts[64];
int numverts, i, lindex;
float *vec;
// texture_t *t; unused -- kristian
glpoly_t *poly;
float texscale;
@ -1643,8 +1641,8 @@ Mod_LoadAliasFrame
*/
void * Mod_LoadAliasFrame (void * pin, maliasframedesc_t *frame)
{
trivertx_t *pframe, *pinframe;
int i, j;
trivertx_t *pinframe;
int i;
daliasframe_t *pdaliasframe;
pdaliasframe = (daliasframe_t *)pin;
@ -1807,10 +1805,9 @@ void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype)
{
int i, j, k, size, groupskins;
char name[32];
byte *copy, *skin, *texels;
byte *skin, *texels;
daliasskingroup_t *pinskingroup;
daliasskininterval_t *pinskinintervals;
int padx, pady, ii, jj; //johnfitz -- padded player skin
char fbr_mask_name[64]; //johnfitz -- added for fullbright support
unsigned offset; //johnfitz
@ -2017,7 +2014,7 @@ void Mod_LoadAliasModel (model_t *mod, void *buffer)
mdl_t *pinmodel;
stvert_t *pinstverts;
dtriangle_t *pintriangles;
int version, numframes;//, numskins; unused -- kristian
int version, numframes;
int size;
daliasframetype_t *pframetype;
daliasskintype_t *pskintype;
@ -2174,11 +2171,7 @@ void * Mod_LoadSpriteFrame (void * pin, mspriteframe_t **ppframe, int framenum)
{
dspriteframe_t *pinframe;
mspriteframe_t *pspriteframe;
int width, height, size, origin[2];//, i; unused -- kristian
/* unused -- kristian
unsigned short *ppixout;
byte *ppixin;
*/
int width, height, size, origin[2];
char name[64];
unsigned offset; //johnfitz

View file

@ -451,4 +451,6 @@ void Mod_TouchModel (char *name);
mleaf_t *Mod_PointInLeaf (float *p, model_t *model);
byte *Mod_LeafPVS (mleaf_t *leaf, model_t *model);
void Mod_SetExtraFlags (model_t *mod);
#endif // __MODEL__

View file

@ -100,6 +100,7 @@ cvar_t r_showbboxes = {"r_showbboxes", "0"};
cvar_t r_lerpmodels = {"r_lerpmodels", "1"};
cvar_t r_lerpmove = {"r_lerpmove", "1"};
cvar_t r_nolerp_list = {"r_nolerp_list", "progs/flame.mdl,progs/flame2.mdl,progs/braztall.mdl,progs/brazshrt.mdl,progs/longtrch.mdl,progs/flame_pyre.mdl,progs/v_saw.mdl,progs/v_xfist.mdl,progs/h2stuff/newfire.mdl"};
extern cvar_t r_vfog;
//johnfitz
/*
@ -456,7 +457,6 @@ R_DrawEntitiesOnList
*/
void R_DrawEntitiesOnList (qboolean alphapass) //johnfitz -- added parameter
{
extern cvar_t r_vfog; //johnfitz
int i;
if (!r_drawentities.value)

View file

@ -120,7 +120,6 @@ Grab six views for environment mapping tests
void R_Envmap_f (void)
{
byte buffer[256*256*4];
// char name[1024]; unused -- kristian
glDrawBuffer (GL_FRONT);
glReadBuffer (GL_FRONT);
@ -184,7 +183,6 @@ R_Init
*/
void R_Init (void)
{
// extern byte *hunk_base; unused -- kristian
extern cvar_t gl_finish;
Cmd_AddCommand ("timerefresh", R_TimeRefresh_f);
@ -376,10 +374,6 @@ void R_TimeRefresh_f (void)
{
int i;
float start, stop, time;
/* unused -- kristian
int startangle;
vrect_t vr;
*/
glDrawBuffer (GL_FRONT);
glFinish ();

View file

@ -263,10 +263,7 @@ Internal use only
static void SCR_CalcRefdef (void)
{
float size, scale; //johnfitz -- scale
/* unused -- kristian
vrect_t vrect;
int h;
*/
vid.recalc_refdef = 0;
// force the status bar to redraw
@ -959,8 +956,6 @@ needs almost the entire 256k of stack space!
*/
void SCR_UpdateScreen (void)
{
// vrect_t vrect; unused -- kristian
if (block_drawing)
return;

View file

@ -149,7 +149,6 @@ char *suf[6] = {"rt", "bk", "lf", "ft", "up", "dn"};
void Sky_LoadSkyBox (char *name)
{
int i, mark, width, height;
// FILE *f; unused -- kristian
char filename[MAX_OSPATH];
byte *data;
qboolean nonefound = true;
@ -494,7 +493,6 @@ Sky_ProcessPoly
void Sky_ProcessPoly (glpoly_t *p)
{
int i;
// float *v; unused -- kristian
vec3_t verts[MAX_CLIP_VERTS];
//draw it
@ -676,11 +674,6 @@ FIXME: eliminate cracks by adding an extra vert on tjuncs
void Sky_DrawSkyBox (void)
{
int i;
/* unused -- kristian
, j, k;
vec3_t v;
float s, t;
*/
for (i=0 ; i<6 ; i++)
{

View file

@ -23,6 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "quakedef.h"
extern qboolean gl_anisotropy_able;
cvar_t gl_texture_anisotropy = {"gl_texture_anisotropy", "1", true};
cvar_t gl_max_size = {"gl_max_size", "0"};
cvar_t gl_picmip = {"gl_picmip", "0"};
@ -173,7 +175,6 @@ FIXME: this is getting called twice (becuase of the recursive Cvar_SetValue call
*/
void TexMgr_Anisotropy_f (void)
{
// extern qboolean gl_anisotropy_able; unused -- kristian
extern float gl_max_anisotropy;
gltexture_t *glt;
@ -228,9 +229,9 @@ void TexMgr_Imagedump_f (void)
for (glt=active_gltextures; glt; glt=glt->next)
{
Q_strcpy(tempname, glt->name);
while (c = strchr(tempname, ':')) *c = '_';
while (c = strchr(tempname, '/')) *c = '_';
while (c = strchr(tempname, '*')) *c = '_';
while ( (c = strchr(tempname, ':')) ) *c = '_';
while ( (c = strchr(tempname, '/')) ) *c = '_';
while ( (c = strchr(tempname, '*')) ) *c = '_';
sprintf(tganame, "imagedump/%s.tga", tempname);
GL_Bind (glt);
@ -545,7 +546,7 @@ must be called before any texture loading
*/
void TexMgr_Init (void)
{
int i; //, mark; unused -- kristian
int i;
static byte notexture_data[16] = {159,91,83,255,0,0,0,255,0,0,0,255,159,91,83,255}; //black and pink checker
static byte nulltexture_data[16] = {127,191,255,255,0,0,0,255,0,0,0,255,127,191,255,255}; //black and blue checker
extern texture_t *r_notexture_mip, *r_notexture_mip2;
@ -1121,7 +1122,7 @@ gltexture_t *TexMgr_LoadImage (model_t *owner, char *name, int width, int height
extern int lightmap_bytes;
unsigned short crc;
gltexture_t *glt;
int mark; //, bytes; unused -- kristian
int mark;
if (isDedicated)
return NULL;

View file

@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void GL_BeginRendering (int *x, int *y, int *width, int *height);
void GL_EndRendering (void);
void GL_Set2D (void);
//johnfitz -- removed texture object stuff since they are standard in gl 1.1
@ -162,9 +163,6 @@ extern const char *gl_renderer;
extern const char *gl_version;
extern const char *gl_extensions;
void R_TranslatePlayerSkin (int playernum);
void R_TranslateNewPlayerSkin (int playernum); //johnfitz -- this handles cases when the actual texture changes
// Multitexture
#define TEXTURE0_SGIS 0x835E
#define TEXTURE1_SGIS 0x835F
@ -272,3 +270,61 @@ void Fog_SetupFrame (void);
void Fog_NewMap (void);
void Fog_Init (void);
//johnfitz
void R_NewGame (void);
void R_AnimateLight (void);
void R_MarkSurfaces (void);
void R_CullSurfaces (void);
qboolean R_CullBox (vec3_t emins, vec3_t emaxs);
void R_StoreEfrags (efrag_t **ppefrag);
qboolean R_CullModelForEntity (entity_t *e);
void R_RotateForEntity (vec3_t origin, vec3_t angles);
void R_MarkLights (dlight_t *light, int bit, mnode_t *node);
void R_InitParticles (void);
void R_DrawParticles (void);
void CL_RunParticles (void);
void R_ClearParticles (void);
void R_TranslatePlayerSkin (int playernum);
void R_TranslateNewPlayerSkin (int playernum); //johnfitz -- this handles cases when the actual texture changes
void R_UpdateWarpTextures (void);
void R_DrawWorld (void);
void R_DrawAliasModel (entity_t *e);
void R_DrawBrushModel (entity_t *e);
void R_DrawSpriteModel (entity_t *e);
void R_DrawTextureChains_Water (void);
void R_RenderDlights (void);
void GL_BuildLightmaps (void);
void R_RebuildAllLightmaps (void);
int R_LightPoint (vec3_t p);
void GL_SubdivideSurface (msurface_t *fa);
void R_BuildLightMap (msurface_t *surf, byte *dest, int stride);
void R_RenderDynamicLightmaps (msurface_t *fa);
void R_UploadLightmap (int lmap);
void R_DrawTextureChains_ShowTris (void);
void R_DrawBrushModel_ShowTris (entity_t *e);
void R_DrawAliasModel_ShowTris (entity_t *e);
void R_DrawParticles_ShowTris (void);
void GL_DrawAliasShadow (entity_t *e);
void DrawGLTriangleFan (glpoly_t *p);
void DrawGLPoly (glpoly_t *p);
void DrawWaterPoly (glpoly_t *p);
void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr);
void Sky_Init (void);
void Sky_DrawSky (void);
void Sky_NewMap (void);
void Sky_LoadTexture (texture_t *mt);
void Sky_LoadSkyBox (char *name);
void TexMgr_RecalcWarpImageSize (void);

View file

@ -454,7 +454,7 @@ void Host_ShutdownServer(qboolean crash)
int i;
int count;
sizebuf_t buf;
char message[4];
byte message[4];
double start;
if (!sv.active)

View file

@ -168,7 +168,7 @@ keyname_t keynames[] =
// dedicated before exiting
byte key_map[SDLK_LAST];
void BuildKeyMaps()
void BuildKeyMaps (void)
{
int i;
@ -383,7 +383,6 @@ void Key_Console (int key)
{
extern int con_vislines;
extern char key_tabpartial[MAXCMDLINE];
// char *cmd; unused -- kristian
switch (key)
{
@ -434,7 +433,6 @@ void Key_Console (int key)
char *line;
extern int con_current, con_linewidth;
extern char *con_text;
//extern float scr_con_current; unused -- kristian
for (i = con_current - con_totallines + 1 ; i <= con_current ; i++)
{

View file

@ -151,4 +151,8 @@ void Key_Init (void);
void Key_WriteBindings (FILE *f);
void Key_SetBinding (int keynum, char *binding);
void Key_ClearStates (void);
void BuildKeyMaps (void);
int Key_Map (SDL_KeyboardEvent *event);

View file

@ -75,6 +75,7 @@ int main(int argc, char *argv[])
switch (event.type) {
case SDL_ACTIVEEVENT:
if (event.active.state & SDL_APPACTIVE & SDL_APPINPUTFOCUS)
{
if (event.active.gain)
{
IN_Activate();
@ -84,6 +85,7 @@ int main(int argc, char *argv[])
// TODO: handle sound
IN_Deactivate(vid.type == MODE_WINDOWED);
}
}
break;
case SDL_MOUSEMOTION:
IN_MouseMove(event.motion.xrel, event.motion.yrel);
@ -112,7 +114,8 @@ int main(int argc, char *argv[])
case SDL_KEYDOWN:
case SDL_KEYUP:
// LSHIFT + ESC and circomflex always opens the console no matter what
if ((event.key.keysym.sym == SDLK_ESCAPE && (event.key.keysym.mod & KMOD_LSHIFT != 0)) || (event.key.keysym.sym == SDLK_CARET))
if ((event.key.keysym.sym == SDLK_ESCAPE && (event.key.keysym.mod & KMOD_LSHIFT) != 0)
|| (event.key.keysym.sym == SDLK_CARET))
{
if (event.key.type == SDL_KEYDOWN)
Con_ToggleConsole_f();

View file

@ -1607,7 +1607,7 @@ void M_Quit_Draw (void) //johnfitz -- modified for new quit message
char msg1[40];
char msg2[40];
char msg3[40];
int boxlen, y;
int boxlen;
if (wasInMenus)
{
@ -1913,16 +1913,20 @@ forward:
}
if (DirectConfig && (serialConfig_cursor == 3 || serialConfig_cursor == 4))
{
if (key == K_UPARROW)
serialConfig_cursor = 2;
else
serialConfig_cursor = 5;
}
if (SerialConfig && StartingGame && serialConfig_cursor == 4)
{
if (key == K_UPARROW)
serialConfig_cursor = 3;
else
serialConfig_cursor = 5;
}
}
//=============================================================================
@ -2289,10 +2293,12 @@ void M_LanConfig_Key (int key)
}
if (StartingGame && lanConfig_cursor == 2)
{
if (key == K_UPARROW)
lanConfig_cursor = 1;
else
lanConfig_cursor = 0;
}
l = Q_atoi(lanConfig_portname);
if (l > 65535)

View file

@ -36,4 +36,5 @@ void M_Keydown (int key);
void M_Draw (void);
void M_ToggleMenu_f (void);
void M_Print (int cx, int cy, char *str);

View file

@ -537,10 +537,12 @@ void PF_ambientsound (void)
//johnfitz -- PROTOCOL_FITZQUAKE
if (soundnum > 255)
{
if (sv.protocol == PROTOCOL_NETQUAKE)
return; //don't send any info protocol can't support
else
large = true;
}
//johnfitz
// add an svc_spawnambient command to the level signon packet

View file

@ -229,9 +229,9 @@ typedef struct
#include "wad.h"
#include "draw.h"
#include "cvar.h"
#include "screen.h"
#include "draw.h"
#include "net.h"
#include "protocol.h"
#include "cmd.h"
@ -309,6 +309,10 @@ void Host_Frame (float time);
void Host_Quit_f (void);
void Host_ClientCommands (char *fmt, ...);
void Host_ShutdownServer (qboolean crash);
void Host_WriteConfiguration (void);
void ExtraMaps_Init (void);
void Modlist_Init (void);
extern qboolean msg_suppress_1; // suppresses resolution and cache size console output
// an fullscreen DIB focus gain/loss
@ -326,5 +330,7 @@ extern int minimum_memory;
extern cvar_t chase_active;
void Chase_Init (void);
void TraceLine (vec3_t start, vec3_t end, vec3_t impact);
void Chase_UpdateForClient (void); //johnfitz
void Chase_UpdateForDrawing (void); //johnfitz

View file

@ -383,7 +383,6 @@ R_DrawAliasModel -- johnfitz -- almost completely rewritten
void R_DrawAliasModel (entity_t *e)
{
aliashdr_t *paliashdr;
vec3_t mins, maxs;
int i, anim;
gltexture_t *tx, *fb;
lerpdata_t lerpdata;
@ -657,7 +656,6 @@ void GL_DrawAliasShadow (entity_t *e)
0, 0, SHADOW_HEIGHT, 1};
float lheight;
aliashdr_t *paliashdr;
vec3_t mins, maxs;
lerpdata_t lerpdata;
if (R_CullModelForEntity(e))
@ -711,7 +709,6 @@ R_DrawAliasModel_ShowTris -- johnfitz
void R_DrawAliasModel_ShowTris (entity_t *e)
{
aliashdr_t *paliashdr;
vec3_t mins, maxs;
lerpdata_t lerpdata;
if (R_CullModelForEntity(e))

View file

@ -47,9 +47,6 @@ int allocated[MAX_LIGHTMAPS][BLOCK_WIDTH];
// main memory so texsubimage can update properly
byte lightmaps[4*MAX_LIGHTMAPS*BLOCK_WIDTH*BLOCK_HEIGHT];
void R_RenderDynamicLightmaps (msurface_t *fa);
void R_BuildLightMap (msurface_t *surf, byte *dest, int stride);
void R_UploadLightmap (int lmap);
/*
===============
@ -500,8 +497,7 @@ R_DrawBrushModel
*/
void R_DrawBrushModel (entity_t *e)
{
int j, k;
int i, numsurfaces;
int i, k;
msurface_t *psurf;
float dot;
mplane_t *pplane;
@ -582,7 +578,7 @@ R_DrawBrushModel_ShowTris -- johnfitz
*/
void R_DrawBrushModel_ShowTris (entity_t *e)
{
int i, j, k, numsurfaces;
int i;
msurface_t *psurf;
float dot;
mplane_t *pplane;
@ -711,9 +707,6 @@ int AllocBlock (int w, int h, int *x, int *y)
int i, j;
int best, best2;
int texnum;
/* unused -- kristian
int bestx;
*/
for (texnum=0 ; texnum<MAX_LIGHTMAPS ; texnum++)
{
@ -765,9 +758,6 @@ void GL_CreateSurfaceLightmap (msurface_t *surf)
{
int smax, tmax;
byte *base;
/* unused -- kristian
int s, t, l, i;
*/
smax = (surf->extents[0]>>4)+1;
tmax = (surf->extents[1]>>4)+1;
@ -791,15 +781,6 @@ void BuildSurfaceDisplayList (msurface_t *fa)
float *vec;
float s, t;
glpoly_t *poly;
/* unused -- kristian
int s_axis, t_axis;
float dist, lastdist, lzi, scale, u, v, frac;
unsigned mask;
vec3_t local, transformed;
mplane_t *pplane;
int newverts, newpage, lastvert;
qboolean visible;
*/
// reconstruct the polygon
pedges = currentmodel->edges;
@ -1049,9 +1030,6 @@ void R_BuildLightMap (msurface_t *surf, byte *dest, int stride)
unsigned scale;
int maps;
unsigned *bl;
/* unused -- kristian
int lightadj[4];
*/
surf->cached_dlight = (surf->dlightframe == r_framecount);
@ -1094,7 +1072,7 @@ void R_BuildLightMap (msurface_t *surf, byte *dest, int stride)
}
// bound, invert, and shift
store:
// store:
//johnfitz -- only support GL_RGB lightmaps
switch (gl_lightmap_format)

View file

@ -715,9 +715,6 @@ void CL_RunParticles (void)
int i;
float time1, time2, time3, dvel, frametime, grav;
extern cvar_t sv_gravity;
/* unused -- kristian
float scale;
*/
frametime = cl.time - cl.oldtime;
time3 = frametime * 15;
@ -825,9 +822,7 @@ void R_DrawParticles (void)
vec3_t up, right, p_up, p_right, p_upright; //johnfitz -- p_ vectors
byte color[4]; //johnfitz -- particle transparency
extern cvar_t r_particles; //johnfitz
/* unused -- kristian
float alpha; //johnfitz -- particle transparency
*/
//float alpha; //johnfitz -- particle transparency
if (!r_particles.value)
return;

View file

@ -85,9 +85,6 @@ void R_DrawSpriteModel (entity_t *e)
mspriteframe_t *frame;
float *s_up, *s_right;
float angle, sr, cr;
/* unused -- kristian
float len;
*/
//TODO: frustum cull it?

View file

@ -473,10 +473,6 @@ void R_DrawTextureChains_Water (void)
texture_t *t;
glpoly_t *p;
qboolean bound;
/* unused -- kristian
int j;
float *v;
*/
if (r_drawflat_cheatsafe || r_lightmap_cheatsafe || !r_drawworld_cheatsafe)
return;

View file

@ -277,7 +277,7 @@ void Sbar_DrawPic (int x, int y, qpic_t *pic)
Sbar_DrawPicAlpha -- johnfitz
=============
*/
Sbar_DrawPicAlpha (int x, int y, qpic_t *pic, float alpha)
void Sbar_DrawPicAlpha (int x, int y, qpic_t *pic, float alpha)
{
glDisable (GL_ALPHA_TEST);
glEnable (GL_BLEND);
@ -1162,7 +1162,6 @@ void Sbar_MiniDeathmatchOverlay (void)
int i, k, l, top, bottom, x, y, f, numlines;
char num[12];
float scale; //johnfitz
qpic_t *pic;
scoreboard_t *s;
scale = CLAMP (1.0, scr_sbarscale.value, (float)glwidth / 320.0); //johnfitz

View file

@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern int sb_lines; // scan lines to draw
void Sbar_Init (void);
void Sbar_LoadPics (void);
void Sbar_Changed (void);
// call whenever any of the client stats represented on the sbar changes

View file

@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// screen.h
void SCR_Init (void);
void SCR_LoadPics (void);
void SCR_UpdateScreen (void);

View file

@ -102,8 +102,6 @@ S_Startup
void S_Startup (void)
{
int rc;
if (!snd_initialized)
return;

View file

@ -263,7 +263,7 @@ wavinfo_t GetWavinfo (char *name, byte *wav, int wavlength)
// find "RIFF" chunk
FindChunk("RIFF");
if (!(data_p && !Q_strncmp(data_p+8, "WAVE", 4)))
if (!(data_p && !Q_strncmp((char *)data_p + 8, "WAVE", 4)))
{
Con_Printf("Missing RIFF/WAVE chunks\n");
return info;
@ -303,7 +303,7 @@ wavinfo_t GetWavinfo (char *name, byte *wav, int wavlength)
FindNextChunk ("LIST");
if (data_p)
{
if (!strncmp (data_p + 28, "mark", 4))
if (!strncmp((char *)data_p + 28, "mark", 4))
{ // this is not a proper parse, but it works with cooledit...
data_p += 24;
i = GetLittleLong (); // samples in loop

View file

@ -257,7 +257,7 @@ void SND_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count)
lscale = snd_scaletable[ch->leftvol >> 3];
rscale = snd_scaletable[ch->rightvol >> 3];
sfx = (signed char *)sc->data + ch->pos;
sfx = (unsigned char *) ((signed char *)sc->data + ch->pos);
for (i=0 ; i<count ; i++)
{

View file

@ -196,15 +196,19 @@ void SV_StartSound (edict_t *entity, int channel, char *sample, int volume,
//johnfitz -- PROTOCOL_FITZQUAKE
if (ent >= 8192)
{
if (sv.protocol == PROTOCOL_NETQUAKE)
return; //don't send any info protocol can't support
else
field_mask |= SND_LARGEENTITY;
}
if (sound_num >= 256 || channel >= 8)
{
if (sv.protocol == PROTOCOL_NETQUAKE)
return; //don't send any info protocol can't support
else
field_mask |= SND_LARGESOUND;
}
//johnfitz
// directed messages go only to the entity the are targeted on
@ -1218,7 +1222,7 @@ Tell all the clients that the server is changing levels
*/
void SV_SendReconnect (void)
{
char data[128];
byte data[128];
sizebuf_t msg;
msg.data = data;

View file

@ -150,7 +150,6 @@ void Sys_Error (char *error, ...)
char *text4 = "***********************************\n";
char *text5 = "\n";
double starttime;
//static int in_sys_error0 = 0; unused -- kristian
static int in_sys_error1 = 0;
static int in_sys_error2 = 0;
static int in_sys_error3 = 0;

View file

@ -78,3 +78,8 @@ void VID_Update (vrect_t *rects);
int VID_SetMode (int modenum); //johnfitz -- removed palette from argument list
// sets the mode; only used by the Quake engine for resetting to mode 0 (the
// base mode) on memory allocation failures
void VID_SyncCvars (void);
void VID_Toggle (void);

View file

@ -26,6 +26,8 @@ extern float v_blend[4];
void V_Init (void);
void V_RenderView (void);
void V_CalcBlend (void);
void V_UpdateBlend (void);
float V_CalcRoll (vec3_t angles, vec3_t velocity);
//void V_UpdatePalette (void); //johnfitz

View file

@ -390,7 +390,6 @@ SV_LinkEdict
void SV_LinkEdict (edict_t *ent, qboolean touch_triggers)
{
areanode_t *node;
// model_t *mod = NULL; //johnfitz unused -- kristian
if (ent->area.prev)
SV_UnlinkEdict (ent); // unlink from old position

View file

@ -77,3 +77,6 @@ trace_t SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, e
// shouldn't be considered solid objects
// passedict is explicitly excluded from clipping checks (normally NULL)
qboolean SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1, vec3_t p2, trace_t *trace);