]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
cleaned up nearly all of the externs in .c files (moved to appropriate .h files)
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 27 May 2001 02:50:48 +0000 (02:50 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 27 May 2001 02:50:48 +0000 (02:50 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@207 d7cf8633-e32d-0410-b094-e92efae38249

64 files changed:
cd_win.c
cl_effects.c
cl_main.c
cl_parse.c
client.h
common.c
console.c
gl_draw.c
gl_models.c
gl_poly.c
gl_poly.h
gl_rmain.c
gl_rmisc.c
gl_rsurf.c
gl_screen.c
gl_textures.c
gl_warp.c
glquake.h
host.c
host_cmd.c
in_svgalib.c
keys.c
menu.h
model_alias.h
model_brush.c
model_brush.h
model_shared.c
model_shared.h
model_sprite.h
model_zymotic.h
net.h
net_dgrm.c
net_udp.c
net_wins.c
net_wipx.c
palette.c
palette.h
pr_edict.c
progs.h
quakedef.h
r_crosshairs.c
r_decals.c
r_decals.h
r_explosion.c
r_light.c
r_modules.c
r_modules.h
r_part.c
render.h
server.h
snd_alsa_0_9.c
snd_mix.c
sound.h
sv_main.c
sv_phys.c
sv_user.c
transform.c
transform.h
vid.h
vid_3dfxsvga.c
vid_glx.c
vid_shared.c
vid_wgl.c
view.c

index 3e249d13015d51502818d22ac2023b862f0808a6..5ef677d04721f9f386ce15f3d5c963e9b6211582 100644 (file)
--- a/cd_win.c
+++ b/cd_win.c
@@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "quakedef.h"
 
 extern HWND    mainwindow;
-extern cvar_t  bgmvolume;
 
 static qboolean cdValid = false;
 static qboolean        playing = false;
index d1973b8ed1fd7add0dbe0fefa1923c8c47fc08f0..5a7cad195c954ecc29ff309dfa9a8e366e8f66d7 100644 (file)
@@ -42,21 +42,21 @@ effect_t effect[MAX_EFFECTS];
 
 cvar_t r_draweffects = {"r_draweffects", "1"};
 
-void r_effects_start()
+void r_effects_start(void)
 {
        memset(effect, 0, sizeof(effect));
 }
 
-void r_effects_shutdown()
+void r_effects_shutdown(void)
 {
 }
 
-void r_effects_newmap()
+void r_effects_newmap(void)
 {
        memset(effect, 0, sizeof(effect));
 }
 
-void CL_Effects_Init()
+void CL_Effects_Init(void)
 {
        Cvar_RegisterVariable(&r_draweffects);
 
index 89c2f6ca4ed0b189ea4c32e0617884b74c6ebb62..d8a353e992909e93b0029f648a7d12c2c9f17975 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -43,8 +43,6 @@ cvar_t        m_side = {"m_side","0.8", true};
 
 cvar_t freelook = {"freelook", "1", true};
 
-cvar_t demo_nehahra = {"demo_nehahra", "0"};
-
 client_static_t        cls;
 client_state_t cl;
 // FIXME: put these on hunk?
@@ -422,7 +420,7 @@ float CL_EntityLerpPoint (entity_t *ent)
        return bound(0, f, 1);
 }
 
-void CL_RelinkStaticEntities()
+void CL_RelinkStaticEntities(void)
 {
        entity_t *ent, *endent;
        if (cl.num_statics > MAX_VISEDICTS)
@@ -683,9 +681,6 @@ void CL_RelinkEntities (void)
 }
 
 
-// used by cl_shownet
-int netshown;
-
 /*
 ===============
 CL_ReadFromServer
@@ -695,7 +690,7 @@ Read all incoming data from the server
 */
 int CL_ReadFromServer (void)
 {
-       int             ret;
+       int ret, netshown;
 
        cl.oldtime = cl.time;
        cl.time += cl.frametime;
@@ -710,8 +705,13 @@ int CL_ReadFromServer (void)
                        break;
                
                cl.last_received_message = realtime;
+
+               if (cl_shownet.value)
+                       netshown = true;
+
                CL_ParseServerMessage ();
-       } while (ret && cls.state == ca_connected);
+       }
+       while (ret && cls.state == ca_connected);
        
        if (netshown)
                Con_Printf ("\n");
@@ -887,9 +887,7 @@ void CL_Init (void)
        Cmd_AddCommand ("pausedemo", CL_PauseDemo_f);
        // LordHavoc: added pmodel command (like name, etc, only intended for Nehahra)
        Cmd_AddCommand ("pmodel", CL_PModel_f);
-       // LordHavoc: added demo_nehahra cvar
-       Cvar_RegisterVariable (&demo_nehahra);
-       if (nehahra)
-               Cvar_SetValue("demo_nehahra", 1);
+
+       CL_Parse_Init();
 }
 
index c8ac267c66859e6fcb6d388473ab2b57b9aec1cc..cf626f3211e8594b1c3ea6560268f7e12a0ed302 100644 (file)
@@ -88,6 +88,16 @@ char *svc_strings[128] =
 
 //=============================================================================
 
+cvar_t demo_nehahra = {"demo_nehahra", "0"};
+
+void CL_Parse_Init(void)
+{
+       // LordHavoc: added demo_nehahra cvar
+       Cvar_RegisterVariable (&demo_nehahra);
+       if (nehahra)
+               Cvar_SetValue("demo_nehahra", 1);
+}
+
 qboolean Nehahrademcompatibility; // LordHavoc: to allow playback of the early Nehahra movie segments
 qboolean dpprotocol; // LordHavoc: whether or not the current network stream is the enhanced DarkPlaces protocol
 
@@ -229,12 +239,6 @@ void CL_KeepaliveMessage (void)
        SZ_Clear (&cls.message);
 }
 
-extern qboolean isworldmodel;
-extern char skyname[];
-extern void R_SetSkyBox (char *sky);
-extern void FOG_clear();
-extern cvar_t r_farclip;
-
 void CL_ParseEntityLump(char *entdata)
 {
        char *data;
@@ -329,7 +333,6 @@ void CL_ParseEntityLump(char *entdata)
 CL_ParseServerInfo
 ==================
 */
-extern cvar_t demo_nehahra;
 void CL_ParseServerInfo (void)
 {
        char    *str;
@@ -669,12 +672,12 @@ void CL_BitProfile_f(void)
        bitprofilecount = 0;
 }
 
-void CL_EntityUpdateSetup()
+void CL_EntityUpdateSetup(void)
 {
        memset(entkill, 1, MAX_EDICTS);
 }
 
-void CL_EntityUpdateEnd()
+void CL_EntityUpdateEnd(void)
 {
        int i;
        for (i = 1;i < MAX_EDICTS;i++)
@@ -888,11 +891,6 @@ void CL_ParseEffect2 (void)
 
 #define SHOWNET(x) if(cl_shownet.value==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x);
 
-extern void SHOWLMP_decodehide();
-extern void SHOWLMP_decodeshow();
-extern void R_SetSkyBox(char* sky);
-extern int netshown;
-
 /*
 =====================
 CL_ParseServerMessage
@@ -910,15 +908,9 @@ void CL_ParseServerMessage (void)
 // if recording demos, copy the message out
 //
        if (cl_shownet.value == 1)
-       {
                Con_Printf ("%i ",net_message.cursize);
-               netshown = true;
-       }
        else if (cl_shownet.value == 2)
-       {
                Con_Printf ("------------------\n");
-               netshown = true;
-       }
        
        cl.onground = false;    // unless the server says otherwise     
 //
index 130f26f01a72130437a154a53b6e1fcf60d340ea..0ff6de07b8252df29b0d9b6621fcc17d02643a88 100644 (file)
--- a/client.h
+++ b/client.h
@@ -272,20 +272,20 @@ extern    beam_t                  cl_beams[MAX_BEAMS];
 //
 // cl_main
 //
-void CL_AllocDlight (entity_t *ent, vec3_t org, float radius, float red, float green, float blue, float decay, float lifetime);
-void CL_DecayLights (void);
+extern void CL_AllocDlight (entity_t *ent, vec3_t org, float radius, float red, float green, float blue, float decay, float lifetime);
+extern void CL_DecayLights (void);
 
-void CL_Init (void);
+extern void CL_Init (void);
 
-void CL_EstablishConnection (char *host);
-void CL_Signon1 (void);
-void CL_Signon2 (void);
-void CL_Signon3 (void);
-void CL_Signon4 (void);
+extern void CL_EstablishConnection (char *host);
+extern void CL_Signon1 (void);
+extern void CL_Signon2 (void);
+extern void CL_Signon3 (void);
+extern void CL_Signon4 (void);
 
-void CL_Disconnect (void);
-void CL_Disconnect_f (void);
-void CL_NextDemo (void);
+extern void CL_Disconnect (void);
+extern void CL_Disconnect_f (void);
+extern void CL_NextDemo (void);
 
 // LordHavoc: raised this from 256 to the maximum possible number of entities visible
 #define MAX_VISEDICTS (MAX_EDICTS + MAX_STATIC_ENTITIES + MAX_TEMP_ENTITIES)
@@ -306,61 +306,62 @@ extern    kbutton_t       in_mlook, in_klook;
 extern         kbutton_t       in_strafe;
 extern         kbutton_t       in_speed;
 
-void CL_InitInput (void);
-void CL_SendCmd (void);
-void CL_SendMove (usercmd_t *cmd);
+extern void CL_InitInput (void);
+extern void CL_SendCmd (void);
+extern void CL_SendMove (usercmd_t *cmd);
 
-void CL_ParseTEnt (void);
-void CL_UpdateTEnts (void);
-void CL_DoEffects (void);
+extern void CL_ParseTEnt (void);
+extern void CL_UpdateTEnts (void);
+extern void CL_DoEffects (void);
 
-entity_t *CL_NewTempEntity (void);
+extern entity_t *CL_NewTempEntity (void);
 
-void CL_Effect(vec3_t org, int modelindex, int startframe, int framecount, float framerate);
+extern void CL_Effect(vec3_t org, int modelindex, int startframe, int framecount, float framerate);
 
-void CL_ClearState (void);
+extern void CL_ClearState (void);
 
 
-int  CL_ReadFromServer (void);
-void CL_WriteToServer (usercmd_t *cmd);
-void CL_BaseMove (usercmd_t *cmd);
+extern int  CL_ReadFromServer (void);
+extern void CL_WriteToServer (usercmd_t *cmd);
+extern void CL_BaseMove (usercmd_t *cmd);
 
 
-float CL_KeyState (kbutton_t *key);
-char *Key_KeynumToString (int keynum);
+extern float CL_KeyState (kbutton_t *key);
+extern char *Key_KeynumToString (int keynum);
 
 //
 // cl_demo.c
 //
-void CL_StopPlayback (void);
-int CL_GetMessage (void);
+extern void CL_StopPlayback (void);
+extern int CL_GetMessage (void);
 
-void CL_Stop_f (void);
-void CL_Record_f (void);
-void CL_PlayDemo_f (void);
-void CL_TimeDemo_f (void);
+extern void CL_Stop_f (void);
+extern void CL_Record_f (void);
+extern void CL_PlayDemo_f (void);
+extern void CL_TimeDemo_f (void);
 
 //
 // cl_parse.c
 //
-void CL_ParseServerMessage (void);
-void CL_BitProfile_f(void);
+extern void CL_Parse_Init(void);
+extern void CL_ParseServerMessage(void);
+extern void CL_BitProfile_f(void);
 
 //
 // view
 //
-void V_StartPitchDrift (void);
-void V_StopPitchDrift (void);
+extern void V_StartPitchDrift (void);
+extern void V_StopPitchDrift (void);
 
-void V_RenderView (void);
-void V_UpdateBlends (void);
-void V_Register (void);
-void V_ParseDamage (void);
-void V_SetContentsColor (int contents);
+extern void V_RenderView (void);
+extern void V_UpdateBlends (void);
+extern void V_Register (void);
+extern void V_ParseDamage (void);
+extern void V_SetContentsColor (int contents);
 
 
 //
 // cl_tent
 //
-void CL_InitTEnts (void);
-void CL_SignonReply (void);
+extern void CL_InitTEnts (void);
+extern void CL_SignonReply (void);
index 717317266bc30d01a24820ecc312126c369539b7..d5eed882fd004294d1df7697359b6bf893c7cbf1 100644 (file)
--- a/common.c
+++ b/common.c
@@ -1217,7 +1217,7 @@ void qfree(void *mem)
        free(m);
 }
 
-void GL_TextureStats_PrintTotal(void);
+extern void GL_TextureStats_PrintTotal(void);
 extern int hunk_low_used, hunk_high_used, hunk_size;
 void COM_Memstats_f(void)
 {
index fe4910663e621b239a7b831f1ac8e7f0dca24aa8..2c8939b129b33aed715539dad5d693dd8b351cd7 100644 (file)
--- a/console.c
+++ b/console.c
@@ -80,15 +80,13 @@ void Con_ToggleConsole_f (void)
        if (key_dest == key_console)
        {
                if (cls.state == ca_connected)
-               {
+//             {
                        key_dest = key_game;
-                       key_lines[edit_line][1] = 0;    // clear any typing
-                       key_linepos = 1;
-               }
+//                     key_lines[edit_line][1] = 0;    // clear any typing
+//                     key_linepos = 1;
+//             }
                else
-               {
                        M_Menu_Main_f ();
-               }
        }
        else
                key_dest = key_console;
index 5840b946ffeda48883831492cb0a185fb60abf84..59ed467ea1ce82fe682c46f7ff38d70cb4f86c79 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -119,16 +119,12 @@ qpic_t    *Draw_CachePic (char *path)
        return &pic->pic;
 }
 
-extern void LoadSky_f(void);
-
 /*
 ===============
 Draw_Init
 ===============
 */
-void rmain_registercvars();
-
-void gl_draw_start()
+void gl_draw_start(void)
 {
        int             i;
 
@@ -150,11 +146,11 @@ void gl_draw_start()
        draw_disc = Draw_PicFromWad ("disc");
 }
 
-void gl_draw_shutdown()
+void gl_draw_shutdown(void)
 {
 }
 
-void gl_draw_newmap()
+void gl_draw_newmap(void)
 {
 }
 
@@ -473,7 +469,7 @@ typedef struct showlmp_s
 
 showlmp_t showlmp[SHOWLMP_MAXLABELS];
 
-void SHOWLMP_decodehide()
+void SHOWLMP_decodehide(void)
 {
        int i;
        byte *lmplabel;
@@ -486,7 +482,7 @@ void SHOWLMP_decodehide()
                }
 }
 
-void SHOWLMP_decodeshow()
+void SHOWLMP_decodeshow(void)
 {
        int i, k;
        byte lmplabel[256], picname[256];
@@ -525,7 +521,7 @@ void SHOWLMP_decodeshow()
        showlmp[k].y = y;
 }
 
-void SHOWLMP_drawall()
+void SHOWLMP_drawall(void)
 {
        int i;
        for (i = 0;i < SHOWLMP_MAXLABELS;i++)
@@ -533,7 +529,7 @@ void SHOWLMP_drawall()
                        Draw_Pic(showlmp[i].x, showlmp[i].y, Draw_CachePic(showlmp[i].pic));
 }
 
-void SHOWLMP_clear()
+void SHOWLMP_clear(void)
 {
        int i;
        for (i = 0;i < SHOWLMP_MAXLABELS;i++)
index ebc22794cf96c6fe3df844013b3b25bfca1368bc..2829b94420b74a5b839a697f6d1998758d5315df 100644 (file)
@@ -29,7 +29,7 @@ void GL_LockArray(int first, int count)
        }
 }
 
-void GL_UnlockArray()
+void GL_UnlockArray(void)
 {
        if (arraylocked)
        {
@@ -52,7 +52,7 @@ void GL_SetupModelTransform (vec3_t origin, vec3_t angles, vec_t scale)
            glRotatef (angles[2],  1, 0, 0);
 }
 
-void makechrometexture()
+void makechrometexture(void)
 {
        int i;
        byte noise[64*64];
@@ -70,7 +70,7 @@ void makechrometexture()
        chrometexture = R_LoadTexture ("chrometexture", 64, 64, &data[0][0], TEXF_MIPMAP | TEXF_RGBA | TEXF_PRECACHE);
 }
 
-void gl_models_start()
+void gl_models_start(void)
 {
        // allocate vertex processing arrays
        aliasvert = qmalloc(sizeof(float[MD2MAX_VERTS][3]));
@@ -82,7 +82,7 @@ void gl_models_start()
        makechrometexture();
 }
 
-void gl_models_shutdown()
+void gl_models_shutdown(void)
 {
        qfree(aliasvert);
        qfree(aliasvertnorm);
@@ -92,11 +92,11 @@ void gl_models_shutdown()
        qfree(aliasvertusage);
 }
 
-void gl_models_newmap()
+void gl_models_newmap(void)
 {
 }
 
-void GL_Models_Init()
+void GL_Models_Init(void)
 {
        Cvar_RegisterVariable(&gl_transform);
        Cvar_RegisterVariable(&gl_lockarrays);
@@ -104,11 +104,6 @@ void GL_Models_Init()
        R_RegisterModule("GL_Models", gl_models_start, gl_models_shutdown, gl_models_newmap);
 }
 
-extern vec3_t softwaretransform_x;
-extern vec3_t softwaretransform_y;
-extern vec3_t softwaretransform_z;
-extern vec_t softwaretransform_scale;
-extern vec3_t softwaretransform_offset;
 void R_AliasTransformVerts(int vertcount)
 {
        int i;
@@ -321,7 +316,6 @@ R_DrawAliasFrame
 
 =================
 */
-extern vec3_t lightspot;
 void R_LightModel(entity_t *ent, int numverts, vec3_t center, vec3_t basecolor);
 void R_DrawAliasFrame (maliashdr_t *maliashdr, float alpha, vec3_t color, entity_t *ent, int shadow, vec3_t org, vec3_t angles, vec_t scale, frameblend_t *blend, rtexture_t **skin, int colormap, int effects, int flags)
 {
index 4a2e7a12210a43952618d7b2cff80b89119fb802..37c8c722fed12075ba5e052486c7dca3be4c55ca 100644 (file)
--- a/gl_poly.c
+++ b/gl_poly.c
@@ -34,7 +34,7 @@ float transviewdist; // distance of view origin along the view normal
 
 float transreciptable[256];
 
-void gl_poly_start()
+void gl_poly_start(void)
 {
        int i;
        transvert = qmalloc(MAX_TRANSVERTS * sizeof(transvert_t));
@@ -50,7 +50,7 @@ void gl_poly_start()
                transreciptable[i] = 1.0f / i;
 }
 
-void gl_poly_shutdown()
+void gl_poly_shutdown(void)
 {
        qfree(transvert);
        qfree(transpoly);
@@ -62,17 +62,17 @@ void gl_poly_shutdown()
        qfree(skypoly);
 }
 
-void gl_poly_newmap()
+void gl_poly_newmap(void)
 {
 }
 
-void GL_Poly_Init()
+void GL_Poly_Init(void)
 {
        Cvar_RegisterVariable (&gl_multitexture);
        R_RegisterModule("GL_Poly", gl_poly_start, gl_poly_shutdown, gl_poly_newmap);
 }
 
-void transpolyclear()
+void transpolyclear(void)
 {
        currenttranspoly = currenttransvert = 0;
        currenttranslist = translist;
@@ -117,7 +117,7 @@ void transpolyvert(float x, float y, float z, float s, float t, int r, int g, in
 }
 */
 
-void transpolyend()
+void transpolyend(void)
 {
        float center, d, maxdist;
        int i;
@@ -156,7 +156,7 @@ void transpolyend()
 
 int transpolyindices;
 
-void transpolyrender()
+void transpolyrender(void)
 {
        int i, j, tpolytype, texnum;
        transpoly_t *p;
@@ -349,12 +349,12 @@ void transpolyrender()
        glDisable(GL_ALPHA_TEST);
 }
 
-void wallpolyclear()
+void wallpolyclear(void)
 {
        currentwallpoly = currentwallvert = 0;
 }
 
-void wallpolyrender()
+void wallpolyrender(void)
 {
        int i, j, texnum, lighttexnum;
        wallpoly_t *p;
@@ -569,14 +569,12 @@ lit:
        glDepthMask(1);
 }
 
-void skypolyclear()
+void skypolyclear(void)
 {
        currentskypoly = currentskyvert = 0;
 }
 
-extern char skyname[];
-extern rtexture_t *solidskytexture, *alphaskytexture;
-void skypolyrender()
+void skypolyrender(void)
 {
        int i, j;
        skypoly_t *p;
index 25747e9ae118b003a6ab94cc7317fcf7b66c9c18..3ecc1412222e8a879bc2db547cc005d5a195e5b9 100644 (file)
--- a/gl_poly.h
+++ b/gl_poly.h
@@ -1,22 +1,20 @@
 
-extern float fog_density, fog_red, fog_green, fog_blue;
-
 #define TPOLYTYPE_ALPHA 0
 #define TPOLYTYPE_ADD 1
 
-extern void transpolyclear();
-extern void transpolyrender();
+extern void transpolyclear(void);
+extern void transpolyrender(void);
 extern void transpolybegin(int texnum, int glowtexnum, int fogtexnum, int transpolytype);
-extern void transpolyend();
+extern void transpolyend(void);
 
-extern void wallpolyclear();
-extern void wallpolyrender();
+extern void wallpolyclear(void);
+extern void wallpolyrender(void);
 
-extern void skypolyclear();
-extern void skypolyrender();
-extern void skypolybegin();
+extern void skypolyclear(void);
+extern void skypolyrender(void);
+extern void skypolybegin(void);
 extern void skypolyvert(float x, float y, float z);
-extern void skypolyend();
+extern void skypolyend(void);
 
 #define MAX_TRANSPOLYS 65536
 #define MAX_TRANSVERTS (MAX_TRANSPOLYS*4)
index d1acf3324bf1bf3f9c159ed71432139579153d0b..2303c5548d5f694c72daae7000305b2bfabb7744 100644 (file)
@@ -139,7 +139,7 @@ vec_t fogdensity;
 float fog_density, fog_red, fog_green, fog_blue;
 qboolean fogenabled;
 qboolean oldgl_fogenable;
-void FOG_framebegin()
+void FOG_framebegin(void)
 {
        if (nehahra)
        {
@@ -215,13 +215,13 @@ void FOG_framebegin()
        }
 }
 
-void FOG_frameend()
+void FOG_frameend(void)
 {
        if (glfog.value)
                glDisable(GL_FOG);
 }
 
-void FOG_clear()
+void FOG_clear(void)
 {
        if (nehahra)
        {
@@ -234,7 +234,7 @@ void FOG_clear()
        fog_density = fog_red = fog_green = fog_blue = 0.0f;
 }
 
-void FOG_registercvars()
+void FOG_registercvars(void)
 {
        Cvar_RegisterVariable (&glfog);
        if (nehahra)
@@ -249,19 +249,19 @@ void FOG_registercvars()
        }
 }
 
-void gl_main_start()
+void gl_main_start(void)
 {
 }
 
-void gl_main_shutdown()
+void gl_main_shutdown(void)
 {
 }
 
-void gl_main_newmap()
+void gl_main_newmap(void)
 {
 }
 
-void GL_Main_Init()
+void GL_Main_Init(void)
 {
        FOG_registercvars();
        Cvar_RegisterVariable (&r_drawentities);
@@ -283,20 +283,20 @@ void GL_Main_Init()
        R_RegisterModule("GL_Main", gl_main_start, gl_main_shutdown, gl_main_newmap);
 }
 
-extern void GL_Draw_Init();
-extern void GL_Main_Init();
-extern void GL_Models_Init();
-extern void GL_Poly_Init();
-extern void GL_Surf_Init();
-extern void GL_Screen_Init();
-extern void GL_Misc_Init();
-extern void R_Crosshairs_Init();
-extern void R_Light_Init();
-extern void R_Particles_Init();
-extern void R_Explosion_Init();
-extern void CL_Effects_Init();
-
-void Render_Init()
+extern void GL_Draw_Init(void);
+extern void GL_Main_Init(void);
+extern void GL_Models_Init(void);
+extern void GL_Poly_Init(void);
+extern void GL_Surf_Init(void);
+extern void GL_Screen_Init(void);
+extern void GL_Misc_Init(void);
+extern void R_Crosshairs_Init(void);
+extern void R_Light_Init(void);
+extern void R_Particles_Init(void);
+extern void R_Explosion_Init(void);
+extern void CL_Effects_Init(void);
+
+void Render_Init(void)
 {
        R_Modules_Shutdown();
        GL_Draw_Init();
@@ -627,8 +627,6 @@ void MYgluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble
 }
 
 
-extern char skyname[];
-
 /*
 =============
 R_SetupGL
@@ -637,7 +635,6 @@ R_SetupGL
 void R_SetupGL (void)
 {
        float   screenaspect;
-       extern  int glwidth, glheight;
        int             x, x2, y2, y, w, h;
 
        if (!r_render.value)
@@ -724,7 +721,7 @@ void R_Clear (void)
 }
 
 // LordHavoc: my trick to *FIX* GLQuake lighting once and for all :)
-void GL_Brighten()
+void GL_Brighten(void)
 {
        if (!r_render.value)
                return;
@@ -751,7 +748,7 @@ void GL_Brighten()
        glEnable (GL_CULL_FACE);
 }
 
-void GL_BlendView()
+void GL_BlendView(void)
 {
        if (!r_render.value)
                return;
@@ -802,9 +799,8 @@ R_RenderView
 r_refdef must be set before the first call
 ================
 */
-extern qboolean intimerefresh;
-extern void R_Sky();
-extern void UploadLightmaps();
+extern void R_Sky(void);
+extern void UploadLightmaps(void);
 char r_speeds2_string1[81], r_speeds2_string2[81], r_speeds2_string3[81], r_speeds2_string4[81], r_speeds2_string5[81], r_speeds2_string6[81], r_speeds2_string7[81];
 void R_RenderView (void)
 {
index 1981753362160750bdada6c730ba6a8dd85e2c9a..a4b675d1136d347e11ca17125ebc20b011cb7f21 100644 (file)
@@ -93,15 +93,15 @@ void R_Envmap_f (void)
 
 void R_InitParticles (void);
 
-void gl_misc_start()
+void gl_misc_start(void)
 {
 }
 
-void gl_misc_shutdown()
+void gl_misc_shutdown(void)
 {
 }
 
-void gl_misc_newmap()
+void gl_misc_newmap(void)
 {
 }
 
@@ -118,15 +118,14 @@ void GL_Misc_Init (void)
        R_RegisterModule("GL_Misc", gl_misc_start, gl_misc_shutdown, gl_misc_newmap);
 }
 
-void R_ClearParticles (void);
-void GL_BuildLightmaps (void);
+extern void R_ClearParticles (void);
+extern void GL_BuildLightmaps (void);
 
 /*
 ===============
 R_NewMap
 ===============
 */
-void SHOWLMP_clear();
 void R_NewMap (void)
 {
        int             i;
index 2b0f1c1738835e11d7513924d8b60cae8b671248..8029f021f66a3e7c7e10982e1f22f5473f645984 100644 (file)
@@ -54,19 +54,19 @@ int lightmapbytes;
 
 int wateralpha;
 
-void gl_surf_start()
+void gl_surf_start(void)
 {
 }
 
-void gl_surf_shutdown()
+void gl_surf_shutdown(void)
 {
 }
 
-void gl_surf_newmap()
+void gl_surf_newmap(void)
 {
 }
 
-void GL_Surf_Init()
+void GL_Surf_Init(void)
 {
        int i;
        for (i = 0;i < MAX_LIGHTMAPS;i++)
@@ -418,12 +418,6 @@ texture_t *R_TextureAnimation (texture_t *base)
 */
 
 
-extern int             solidskytexture;
-extern int             alphaskytexture;
-extern float   speedscale;             // for top sky and bottom sky
-
-extern char skyname[];
-
 float  turbsin[256] =
 {
        #include "gl_warp_sin.h"
@@ -431,7 +425,7 @@ float       turbsin[256] =
 #define TURBSCALE (256.0 / (2 * M_PI))
 
 
-void UploadLightmaps()
+void UploadLightmaps(void)
 {
        int i;
        if (nosubimage || nosubimagefragments)
@@ -783,8 +777,6 @@ void RSurf_DrawWall(msurface_t *s, texture_t *t, int transform)
 }
 
 // LordHavoc: transparent brush models
-extern float modelalpha;
-
 void RSurf_DrawWallVertex(msurface_t *s, texture_t *t, int transform, int isbmodel)
 {
        int i, alpha, size3;
@@ -964,7 +956,6 @@ void R_DrawBrushModel (entity_t *e)
 */
 
 static byte *worldvis;
-extern cvar_t r_novis;
 
 void R_MarkLeaves (void)
 {
@@ -978,7 +969,7 @@ void R_MarkLeaves (void)
        worldvis = Mod_LeafPVS (r_viewleaf, cl.worldmodel);
 }
 
-void R_SolidWorldNode ()
+void R_SolidWorldNode (void)
 {
        int l;
        mleaf_t *leaf;
@@ -1025,7 +1016,7 @@ void R_SolidWorldNode ()
 
 /*
 // experimental and inferior to the other in recursion depth allowances
-void R_PortalWorldNode ()
+void R_PortalWorldNode (void)
 {
        int i, j;
        mportal_t *p;
@@ -1098,7 +1089,7 @@ void R_PortalWorldNode ()
 }
 */
 
-void R_PortalWorldNode ()
+void R_PortalWorldNode (void)
 {
        int portalstack, i;
        mportal_t *p, *pstack[8192];
@@ -1213,7 +1204,7 @@ void R_DrawSurfaces (void)
        }
 }
 
-void R_DrawPortals()
+void R_DrawPortals(void)
 {
        int drawportals, i, r, g, b;
        mleaf_t *leaf, *endleaf;
index 9b2a7b22c2da6c43b087fb3c4ff667f06e2bde24..07238d49c7370b53dbe2c9b497db226414ad6c78 100644 (file)
@@ -355,18 +355,18 @@ void SCR_SizeDown_f (void)
 
 //============================================================================
 
-void gl_screen_start()
+void gl_screen_start(void)
 {
        scr_ram = Draw_PicFromWad ("ram");
        scr_net = Draw_PicFromWad ("net");
        scr_turtle = Draw_PicFromWad ("turtle");
 }
 
-void gl_screen_shutdown()
+void gl_screen_shutdown(void)
 {
 }
 
-void gl_screen_newmap()
+void gl_screen_newmap(void)
 {
 }
 
@@ -708,10 +708,7 @@ void SCR_DrawNotifyString (void)
 void DrawCrosshair(int num);
 void GL_Set2D (void);
 
-extern void SHOWLMP_drawall();
-extern cvar_t r_speeds2;
-
-void GL_BrightenScreen()
+void GL_BrightenScreen(void)
 {
        float f;
 
@@ -785,7 +782,7 @@ text to the screen.
 LordHavoc: due to my rewrite of R_WorldNode, it no longer takes 256k of stack space :)
 ==================
 */
-void GL_Finish();
+void GL_Finish(void);
 void SCR_UpdateScreen (void)
 {
        double  time1 = 0, time2;
@@ -884,7 +881,6 @@ void SCR_UpdateScreen (void)
 
        if (r_speeds2.value)
        {
-               extern char r_speeds2_string1[81], r_speeds2_string2[81], r_speeds2_string3[81], r_speeds2_string4[81], r_speeds2_string5[81], r_speeds2_string6[81], r_speeds2_string7[81];
                Draw_String(0, vid.height - sb_lines - 56, r_speeds2_string1, 80);
                Draw_String(0, vid.height - sb_lines - 48, r_speeds2_string2, 80);
                Draw_String(0, vid.height - sb_lines - 40, r_speeds2_string3, 80);
@@ -909,7 +905,7 @@ void SCR_UpdateScreen (void)
 }
 
 // for profiling, this is separated
-void GL_Finish()
+void GL_Finish(void)
 {
        if (!r_render.value)
                return;
index 8236e6263a62192f5c95f3f691ccb0133721e046..4cc437b64abae1c433f7bc4d6efec078f35ad4a1 100644 (file)
@@ -157,7 +157,7 @@ void GL_TextureStats_f(void)
 char engineversion[40];
 
 //void GL_UploadTexture (gltexture_t *glt);
-void r_textures_start()
+void r_textures_start(void)
 {
 //     int i;
 //     gltexture_t *glt;
@@ -165,11 +165,11 @@ void r_textures_start()
 //             GL_UploadTexture(glt);
 }
 
-void r_textures_shutdown()
+void r_textures_shutdown(void)
 {
 }
 
-void r_textures_newmap()
+void r_textures_newmap(void)
 {
 }
 
index 6c9b795c367052b8a640c3b5d5fb483e1bc34f3f..feaeeb400d9264004a84d63e46e77ecbab3109bf 100644 (file)
--- a/gl_warp.c
+++ b/gl_warp.c
@@ -21,8 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "quakedef.h"
 
-extern model_t *loadmodel;
-
 int            skytexturenum;
 
 rtexture_t *solidskytexture;
@@ -31,8 +29,6 @@ float speedscale;             // for top sky and bottom sky
 
 msurface_t     *warpface;
 
-extern cvar_t gl_subdivide_size;
-
 void BoundPoly (int numverts, float *verts, vec3_t mins, vec3_t maxs)
 {
        int             i, j;
@@ -243,13 +239,11 @@ void LoadSky_f (void)
        }
 }
 
-extern cvar_t r_farclip;
-
 #define R_SkyBoxPolyVec(s,t,x,y,z) \
        glTexCoord2f((s) * (254.0f/256.0f) + (1.0f/256.0f), (t) * (254.0f/256.0f) + (1.0f/256.0f));\
        glVertex3f((x) * 1024.0 + r_origin[0], (y) * 1024.0 + r_origin[1], (z) * 1024.0 + r_origin[2]);
 
-void R_SkyBox()
+void R_SkyBox(void)
 {
        glDisable (GL_BLEND);
        glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
@@ -356,7 +350,7 @@ void skydome(float *source, float s, float texscale)
        glDisableClientState(GL_TEXTURE_COORD_ARRAY);
 }
 
-void R_SkyDome()
+void R_SkyDome(void)
 {
        glDisable (GL_BLEND);
        glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
@@ -384,7 +378,7 @@ void R_SkyDome()
 }
 */
 
-void R_Sky()
+void R_Sky(void)
 {
        if (!r_render.value)
                return;
index eea60c1a8a63a8cd30a2337ec8e852dd9c807fad..d85f6d21e4d2cd386c7b6fb1765a6ba03ee08864 100644 (file)
--- a/glquake.h
+++ b/glquake.h
@@ -188,7 +188,7 @@ extern qboolean lighthalf;
 #include "r_lerpanim.h"
 
 void GL_LockArray(int first, int count);
-void GL_UnlockArray();
+void GL_UnlockArray(void);
 
 void R_DrawAliasModel (entity_t *ent, int cull, float alpha, model_t *clmodel, frameblend_t *blend, int skin, vec3_t org, vec3_t angles, vec_t scale, int effects, int flags, int colormap);
 
diff --git a/host.c b/host.c
index d169181f8d769e7370052bcee7ec011e524cc3f3..675e30ea0c30faf10d8c2fbdb7ee3ee9aa0e6b6a 100644 (file)
--- a/host.c
+++ b/host.c
@@ -119,7 +119,6 @@ This shuts down both the client and server
 ================
 */
 char hosterrorstring[4096];
-extern qboolean hostloopactive;
 void Host_Error (char *error, ...)
 {
        va_list         argptr;
@@ -762,14 +761,14 @@ void Host_Frame (float time)
 
 //============================================================================
 
-void Render_Init();
+void Render_Init(void);
 
 /*
 ====================
 Host_Init
 ====================
 */
-void Host_Init ()
+void Host_Init (void)
 {
        int i;
        /*
index 5a23bfca1d5f68845ba766450a1d5d1a55b7ddf1..5e0a66f6e3b72353e6a734e969f5b526ccc4f236 100644 (file)
@@ -20,8 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "quakedef.h"
 
-extern cvar_t  pausable;
-
 int    current_skill;
 
 void Mod_Print (void);
index 7c258a0c5a252b560cccaf9e40ba7e95d80f475f..d1854309cecc00b30d8230ee6d9bdf62eab33dfc 100644 (file)
@@ -60,8 +60,8 @@ static float  mouse_x, mouse_y;
 static float   old_mouse_x, old_mouse_y;
 static int     mx, my;
 
-static void IN_init_kb();
-static void IN_init_mouse();
+static void IN_init_kb(void);
+static void IN_init_mouse(void);
 
 cvar_t m_filter = {"m_filter","0"};
 
@@ -111,7 +111,7 @@ void IN_Init(void)
        in_svgalib_inited = 1;
 }
 
-static void IN_init_kb()
+static void IN_init_kb(void)
 {
        int i;
 
@@ -231,7 +231,7 @@ static void IN_init_kb()
        keyboard_seteventhandler(keyhandler);
 }
 
-static void IN_init_mouse()
+static void IN_init_mouse(void)
 {
        int mtype;
        char *mousedev;
diff --git a/keys.c b/keys.c
index 8d4de8b9a50b4ff5450a4ea7cb9e2e4989be68a0..c3a8a75497eef4f8d7bfa3bf24df205bcb2412fc 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -321,7 +321,7 @@ void Key_Message (int key)
        }
 
        // LordHavoc: increased messagemode length (was 31)
-       if (chat_bufferlen == 255)
+       if (chat_bufferlen == 240)
                return; // all full
 
        chat_buffer[chat_bufferlen++] = key;
diff --git a/menu.h b/menu.h
index 616de3f84813436c3022f89de8836eb9e024f395..8b5a34e18278d095c5a97b720d33a0347a97f766 100644 (file)
--- a/menu.h
+++ b/menu.h
@@ -25,7 +25,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #define        MNET_IPX                1
 #define        MNET_TCP                2
 
-extern int     m_activenet;
+extern int m_activenet;
+extern int m_return_state;
+extern int m_state;
+extern qboolean m_return_onerror;
+extern char m_return_reason[32];
 
 //
 // menus
index 4d30cdaee3c9c1e6ef580216731a10f391921127..3bac356cba11a2bc6ba02e00e69e445c82b90f21 100644 (file)
@@ -198,4 +198,9 @@ typedef struct
 #define ALIASTYPE_MD2 2
 #define ALIASTYPE_ZYM 3
 
+extern void Mod_LoadAliasModel (struct model_s *mod, void *buffer);
+extern void Mod_LoadQ2AliasModel (struct model_s *mod, void *buffer);
+
+extern void Mod_AliasInit(void);
+
 #include "model_zymotic.h"
\ No newline at end of file
index 803fa9255fe29623596db1c92c122f41c6fbf2b2..b01c1c37cd1c9335fd1d870f7a580bd3d719965d 100644 (file)
@@ -141,14 +141,10 @@ byte *Mod_LeafPVS (mleaf_t *leaf, model_t *model)
        return Mod_DecompressVis (leaf->compressed_vis, model);
 }
 
-extern byte    *mod_base;
-
-extern cvar_t r_fullbrights;
-
 rtexture_t *r_notexture;
 texture_t r_notexture_mip;
 
-void Mod_SetupNoTexture()
+void Mod_SetupNoTexture(void)
 {
        int             x, y;
        byte    pix[16][16][4];
@@ -546,10 +542,6 @@ void Mod_LoadVisibility (lump_t *l)
        memcpy (loadmodel->visdata, mod_base + l->fileofs, l->filelen);
 }
 
-void CL_ParseEntityLump(char *entdata);
-
-extern qboolean isworldmodel;
-
 /*
 =================
 Mod_LoadEntities
@@ -766,8 +758,6 @@ void CalcSurfaceExtents (msurface_t *s)
 
 void GL_SubdivideSurface (msurface_t *fa);
 
-extern char skyname[];
-
 /*
 =================
 Mod_LoadFaces
@@ -1497,7 +1487,7 @@ portal_t *AllocPortal (void)
        return p;
 }
 
-void Mod_FinalizePortals()
+void Mod_FinalizePortals(void)
 {
        int i, j, numportals, numpoints;
        portal_t *p, *pnext;
@@ -1854,7 +1844,7 @@ void Mod_MakeOutsidePortals(mnode_t *node)
 }
 */
 
-void Mod_MakePortals()
+void Mod_MakePortals(void)
 {
 //     Con_Printf("building portals for %s\n", loadmodel->name);
 
index 6470e1a9762ac8c703fd4ba9e529db7a2aad0b54..61dbc1ec81af3d459c8ea97c9b1416bf6c1c0816 100644 (file)
@@ -202,5 +202,9 @@ typedef struct mportal_s
 }
 mportal_t;
 
+extern void CL_ParseEntityLump(char *entdata);
 extern rtexture_t *r_notexture;
 extern texture_t r_notexture_mip;
+
+extern void Mod_LoadBrushModel (struct model_s *mod, void *buffer);
+extern void Mod_BrushInit(void);
index 1aaac8e46b4b42988b2f36cbb739c815c12f1d1d..9b5fc1d115e4131ab955df9db92f8146557905d8 100644 (file)
@@ -27,22 +27,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 model_t        *loadmodel;
 char   loadname[32];   // for hunk tags
 
-extern void Mod_LoadSpriteModel (model_t *mod, void *buffer);
-extern void Mod_LoadBrushModel (model_t *mod, void *buffer);
-extern void Mod_LoadAliasModel (model_t *mod, void *buffer);
-extern void Mod_LoadQ2AliasModel (model_t *mod, void *buffer);
-extern void Mod_LoadZymoticModel (model_t *mod, void *buffer);
-model_t *Mod_LoadModel (model_t *mod, qboolean crash);
-
 // LordHavoc: increased from 512 to 2048
 #define        MAX_MOD_KNOWN   2048
 model_t        mod_known[MAX_MOD_KNOWN];
 int            mod_numknown;
 
-extern void Mod_BrushInit();
-extern void Mod_AliasInit();
-extern void Mod_SpriteInit();
-
 /*
 ===============
 Mod_Init
index d5af37adec1b5f5943f3ae8c707101e098955206..0955d56f84c43e30b1198c42e759720d88578088 100644 (file)
@@ -142,20 +142,31 @@ typedef struct model_s
 
 //============================================================================
 
-void   Mod_Init (void);
-void   Mod_ClearAll (void);
+// used to avoid setting up submodels in non-world bmodels
+extern qboolean isworldmodel;
+// model loading
+extern model_t *loadmodel;
+extern byte    *mod_base;
+// sky/water subdivision
+extern cvar_t gl_subdivide_size;
+// texture fullbrights
+extern cvar_t r_fullbrights;
+
+void Mod_Init (void);
+void Mod_ClearAll (void);
 model_t *Mod_ForName (char *name, qboolean crash);
-void   *Mod_Extradata (model_t *mod);  // handles caching
-void   Mod_TouchModel (char *name);
+void *Mod_Extradata (model_t *mod);    // handles caching
+void Mod_TouchModel (char *name);
 
 mleaf_t *Mod_PointInLeaf (float *p, model_t *model);
-byte   *Mod_LeafPVS (mleaf_t *leaf, model_t *model);
+byte *Mod_LeafPVS (mleaf_t *leaf, model_t *model);
 
-extern model_t *loadmodel;
-extern char    loadname[32];   // for hunk tags
+extern model_t *loadmodel;
+extern char loadname[32];      // for hunk tags
 
 extern model_t *Mod_LoadModel (model_t *mod, qboolean crash);
 
 extern float RadiusFromBounds (vec3_t mins, vec3_t maxs);
 extern model_t *Mod_FindName (char *name);
+
 #endif // __MODEL__
index 595f226610c58fbf3d73d791826408ca2583bab9..05b0dce3c9484ebeaa79c6ecf4b4bf0f4bb71368 100644 (file)
@@ -47,3 +47,6 @@ typedef struct
 //     void                            *cachespot;             // remove?
        int                                     ofs_frames;
 } msprite_t;
+
+extern void Mod_LoadSpriteModel (struct model_s *mod, void *buffer);
+extern void Mod_SpriteInit(void);
index d5d96e87271e64c6b48e51821fb26e4dbaba5ed0..ff3f4b3df181a821e03d29417f29e7fcae013dcf 100644 (file)
@@ -1,3 +1,4 @@
+
 typedef struct zymlump_s
 {
        int start;
@@ -59,3 +60,5 @@ typedef struct zymvertex_s
        float origin[3];
 }
 zymvertex_t;
+
+extern void Mod_LoadZymoticModel (struct model_s *mod, void *buffer);
diff --git a/net.h b/net.h
index 19362ce46a7590e605ce3f63ef71181023ac4b65..105df0f534949571730751b6d1fcbf0a2e4618d2 100644 (file)
--- a/net.h
+++ b/net.h
@@ -325,4 +325,6 @@ extern      qboolean        slistInProgress;
 extern qboolean        slistSilent;
 extern qboolean        slistLocal;
 
+extern cvar_t hostname;
+
 void NET_Slist_f (void);
index b9ef1c19e6f160861823452ba3e59e5bce3e6233..fb7c7e7ce01cb52388b2b3735fdd84ac79e4a73f 100644 (file)
@@ -78,11 +78,6 @@ struct
        byte                    data[MAX_DATAGRAM];
 } packetBuffer;
 
-extern int m_return_state;
-extern int m_state;
-extern qboolean m_return_onerror;
-extern char m_return_reason[32];
-
 
 //#ifdef DEBUG
 char *StrAddr (struct qsockaddr *addr)
index f21c3ebd73b6f8f530e9f6b6400cd19c7710d4c3..ed5d066e0978e803b9fdba7c8087b3a40fe4d317 100644 (file)
--- a/net_udp.c
+++ b/net_udp.c
@@ -40,8 +40,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 extern int gethostname (char *, int);
 extern int close (int);
 
-extern cvar_t hostname;
-
 static int net_acceptsocket = -1;              // socket for fielding new connections
 static int net_controlsocket;
 static int net_broadcastsocket = 0;
index f16c51524676dfbc997e9744448e9e62ea1901b5..21eedf8c4e5b69fec73176d0697cc2aacb8a863c 100644 (file)
@@ -22,8 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "quakedef.h"
 #include "winquake.h"
 
-extern cvar_t hostname;
-
 #define MAXHOSTNAMELEN         256
 
 static int net_acceptsocket = -1;              // socket for fielding new connections
@@ -88,7 +86,7 @@ BOOL PASCAL FAR BlockingHook(void)
 } 
 
 
-void WINS_GetLocalAddress()
+void WINS_GetLocalAddress(void)
 {
        struct hostent  *local = NULL;
        char                    buff[MAXHOSTNAMELEN];
index f4b37f3e37906f15a265af8c9c32cf5e04847ab2..20f550a47da992709ce041b595321a90766d4649 100644 (file)
@@ -24,8 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include <wsipx.h>
 #include "net_wipx.h"
 
-extern cvar_t hostname;
-
 #define MAXHOSTNAMELEN         256
 
 static int net_acceptsocket = -1;              // socket for fielding new connections
index b574d8029a649a12083d45edc22555da48600a28..47428dfc742b5a643576a3cd7898ec1a3f2ead72 100644 (file)
--- a/palette.c
+++ b/palette.c
@@ -12,7 +12,7 @@ cvar_t vid_gamma = {"vid_gamma", "1", true};
 cvar_t vid_brightness = {"vid_brightness", "1", true};
 cvar_t vid_contrast = {"vid_contrast", "1", true};
 
-void Palette_Setup8to24()
+void Palette_Setup8to24(void)
 {
        byte *in, *out;
        unsigned short i;
@@ -30,7 +30,7 @@ void Palette_Setup8to24()
 }
 
 /*
-void   Palette_Setup15to8()
+void   Palette_Setup15to8(void)
 {
        byte    *pal;
        unsigned r,g,b;
@@ -116,7 +116,7 @@ void BuildGammaTable16(float prescale, float gamma, float scale, float base, uns
        }
 }
 
-void Texture_Gamma ()
+void Texture_Gamma (void)
 {
        int i, adjusted;
        double invgamma;
@@ -174,14 +174,14 @@ void VID_UpdateGamma(qboolean force)
                Con_Printf("Hardware gamma not supported.\n");
 }
 
-void Gamma_Init()
+void Gamma_Init(void)
 {
        Cvar_RegisterVariable(&vid_gamma);
        Cvar_RegisterVariable(&vid_brightness);
        Cvar_RegisterVariable(&vid_contrast);
 }
 
-void Palette_Init()
+void Palette_Init(void)
 {
        byte *pal;
        pal = (byte *)COM_LoadMallocFile ("gfx/palette.lmp", false);
index 7e6dbc4bc9742fda5929a48cef103d1a79ffea92..9fd075c1b14061cd17dabe75c84fdaf5272011d8 100644 (file)
--- a/palette.h
+++ b/palette.h
@@ -15,5 +15,5 @@ void VID_UpdateGamma(qboolean force);
 void BuildGammaTable8(float prescale, float gamma, float scale, float base, byte *out);
 void BuildGammaTable16(float prescale, float gamma, float scale, float base, unsigned short *out);
 
-void Gamma_Init();
-void Palette_Init();
+void Gamma_Init(void);
+void Palette_Init(void);
index 0a472da0a86ab4ff4aec0d997454530bcaf8065a..cec47e822e310a5094451d2271e9a195294f762f 100644 (file)
@@ -127,7 +127,7 @@ int FindFieldOffset(char *field)
        return d->ofs*4;
 }
 
-void FindEdictFieldOffsets()
+void FindEdictFieldOffsets(void)
 {
        eval_gravity = FindFieldOffset("gravity");
        eval_button3 = FindFieldOffset("button3");
diff --git a/progs.h b/progs.h
index bd8eada0445a1e8d78fb4894662fcfebeb0e4914..2264ac11597b837b140437463c1302fbcb7acb10 100644 (file)
--- a/progs.h
+++ b/progs.h
@@ -94,6 +94,10 @@ extern int eval_punchvector;
 
 #define GETEDICTFIELDVALUE(ed, fieldoffset) (fieldoffset ? (eval_t*)((char*)&ed->v + fieldoffset) : NULL)
 
+
+extern dfunction_t *SV_PlayerPhysicsQC;
+extern dfunction_t *EndFrameQC;
+
 //============================================================================
 
 extern dprograms_t             *progs;
index 4bd918598dd98f751008c6b8fc150cd5bd5746c5..499acbbb4ccb0bf20e8a31349455e035dc9fe337 100644 (file)
@@ -261,7 +261,7 @@ extern      double          realtime;                       // not bounded in any way, changed at
 void Host_ClearMemory (void);
 void Host_ServerFrame (void);
 void Host_InitCommands (void);
-void Host_Init ();
+void Host_Init (void);
 void Host_Shutdown(void);
 void Host_Error (char *error, ...);
 void Host_EndGame (char *message, ...);
index ef7e5c648b200875f319c49551ec7057fc50bd4d..2884c24cf2b9faf75b0dbae32ab7d01a4b1983f3 100644 (file)
@@ -109,7 +109,7 @@ void crosshairload(int num, byte *in)
        crosshairtex[num] = R_LoadTexture(va("crosshair%02d", num), 16, 16, &data[0][0], TEXF_ALPHA | TEXF_RGBA | TEXF_PRECACHE);
 }
 
-void r_crosshairs_start()
+void r_crosshairs_start(void)
 {
        int i;
        for (i = 0;i < NUMCROSSHAIRS;i++)
@@ -117,15 +117,15 @@ void r_crosshairs_start()
 //     crosshairtex[1] = crosshairload(crosshairtex2);
 }
 
-void r_crosshairs_shutdown()
+void r_crosshairs_shutdown(void)
 {
 }
 
-void r_crosshairs_newmap()
+void r_crosshairs_newmap(void)
 {
 }
 
-void R_Crosshairs_Init()
+void R_Crosshairs_Init(void)
 {
        Cvar_RegisterVariable(&crosshair_brightness);
        Cvar_RegisterVariable(&crosshair_alpha);
index d35eb58709badd9bbf179d4098b007a1f0a627fc..f920b2ab68a824e37dacf5419dbf2dd41af9a7b0 100644 (file)
@@ -41,25 +41,25 @@ int currentdecal; // wraps around in decal array, replacing old ones when a new
 cvar_t r_drawdecals = {"r_drawdecals", "1"};
 cvar_t r_decals_lighting = {"r_decals_lighting", "1"};
 
-void r_decals_start()
+void r_decals_start(void)
 {
        decals = (decal_t *) qmalloc(MAX_DECALS * sizeof(decal_t));
        memset(decals, 0, MAX_DECALS * sizeof(decal_t));
        currentdecal = 0;
 }
 
-void r_decals_shutdown()
+void r_decals_shutdown(void)
 {
        qfree(decals);
 }
 
-void r_decals_newmap()
+void r_decals_newmap(void)
 {
        memset(decals, 0, MAX_DECALS * sizeof(decal_t));
        currentdecal = 0;
 }
 
-void R_Decals_Init()
+void R_Decals_Init(void)
 {
        Cvar_RegisterVariable (&r_drawdecals);
        Cvar_RegisterVariable (&r_decals_lighting);
index 8a54e8d90cc1a7882fb22dfe9450c8f37b827201..9d2924cbe338f44d59dc40ca4a8f302d38fac79b 100644 (file)
@@ -1,6 +1,6 @@
 
-void R_Decals_Init();
+void R_Decals_Init(void);
 
-void GL_DrawDecals();
+void GL_DrawDecals(void);
 
 void R_Decal(vec3_t org, rtexture_t *tex, float scale, int cred, int cgreen, int cblue, int alpha);
index 0350ac724b70a1b742a4ed097a5749acdf813394..74e7dd425febc869285dc302fab95b2a3c8b271d 100644 (file)
@@ -72,7 +72,7 @@ int R_ExplosionVert(int column, int row)
        return i;
 }
 
-void r_explosion_start()
+void r_explosion_start(void)
 {
        int x, y;
        byte noise1[128][128], noise2[128][128], data[128][128][4];
@@ -101,16 +101,16 @@ void r_explosion_start()
        explosiontexturefog = R_LoadTexture ("explosiontexturefog", 128, 128, &data[0][0][0], TEXF_MIPMAP | TEXF_ALPHA | TEXF_RGBA | TEXF_PRECACHE);
 }
 
-void r_explosion_shutdown()
+void r_explosion_shutdown(void)
 {
 }
 
-void r_explosion_newmap()
+void r_explosion_newmap(void)
 {
        memset(explosion, 0, sizeof(explosion));
 }
 
-void R_Explosion_Init()
+void R_Explosion_Init(void)
 {
        int i, x, y;
        i = 0;
@@ -240,7 +240,7 @@ void R_MoveExplosion(explosion_t *e, float frametime)
        }
 }
 
-void R_MoveExplosions()
+void R_MoveExplosions(void)
 {
        int i;
        float frametime;
@@ -259,7 +259,7 @@ void R_MoveExplosions()
        }
 }
 
-void R_DrawExplosions()
+void R_DrawExplosions(void)
 {
        int i;
        if (!r_drawexplosions.value)
index 8f7b9837452c9bf81aa0011d4bf5f1a73fec87ba..168efc5d2f73828f2c85d9ea81f16940bd55fa6f 100644 (file)
--- a/r_light.c
+++ b/r_light.c
@@ -23,21 +23,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 cvar_t r_lightmodels = {"r_lightmodels", "1"};
 
-extern cvar_t gl_transform;
-
-void r_light_start()
+void r_light_start(void)
 {
 }
 
-void r_light_shutdown()
+void r_light_shutdown(void)
 {
 }
 
-void r_light_newmap()
+void r_light_newmap(void)
 {
 }
 
-void R_Light_Init()
+void R_Light_Init(void)
 {
        Cvar_RegisterVariable(&r_lightmodels);
        R_RegisterModule("R_Light", r_light_start, r_light_shutdown, r_light_newmap);
@@ -421,8 +419,6 @@ LIGHT SAMPLING
 mplane_t               *lightplane;
 vec3_t                 lightspot;
 
-extern cvar_t r_ambient;
-
 /*
 int RecursiveLightPoint (vec3_t color, mnode_t *node, vec3_t start, vec3_t end)
 {
@@ -790,10 +786,6 @@ void R_DynamicLightPointNoMask(vec3_t color, vec3_t org)
 }
 */
 
-extern float *aliasvert;
-extern float *aliasvertnorm;
-extern byte *aliasvertcolor;
-extern float modelalpha;
 void R_LightModel(entity_t *ent, int numverts, vec3_t center, vec3_t basecolor)
 {
        // LordHavoc: warning: reliance on int being 4 bytes here (of course the d_8to24table relies on that too...)
index 69086f6771d81d795f973b1ff9ecc3ee1b4c90eb..969519a6f00c5cae30d6368f7ab0b093bff1c759 100644 (file)
@@ -7,22 +7,22 @@ typedef struct rendermodule_s
 {
        int active; // set by start, cleared by shutdown
        char *name;
-       void(*start)();
-       void(*shutdown)();
-       void(*newmap)();
+       void(*start)(void);
+       void(*shutdown)(void);
+       void(*newmap)(void);
 }
 rendermodule_t;
 
 rendermodule_t rendermodule[MAXRENDERMODULES];
 
-void R_Modules_Init()
+void R_Modules_Init(void)
 {
        int i;
        for (i = 0;i < MAXRENDERMODULES;i++)
                rendermodule[i].name = NULL;
 }
 
-void R_RegisterModule(char *name, void(*start)(), void(*shutdown)(), void(*newmap)())
+void R_RegisterModule(char *name, void(*start)(void), void(*shutdown)(void), void(*newmap)(void))
 {
        int i;
        for (i = 0;i < MAXRENDERMODULES;i++)
@@ -41,7 +41,7 @@ void R_RegisterModule(char *name, void(*start)(), void(*shutdown)(), void(*newma
        rendermodule[i].newmap = newmap;
 }
 
-void R_Modules_Start ()
+void R_Modules_Start(void)
 {
        int i;
        for (i = 0;i < MAXRENDERMODULES;i++)
@@ -55,7 +55,7 @@ void R_Modules_Start ()
        }
 }
 
-void R_Modules_Shutdown ()
+void R_Modules_Shutdown(void)
 {
        int i;
        for (i = 0;i < MAXRENDERMODULES;i++)
@@ -69,13 +69,13 @@ void R_Modules_Shutdown ()
        }
 }
 
-void R_Modules_Restart ()
+void R_Modules_Restart(void)
 {
        R_Modules_Shutdown();
        R_Modules_Start();
 }
 
-void R_Modules_NewMap ()
+void R_Modules_NewMap(void)
 {
        int i;
        for (i = 0;i < MAXRENDERMODULES;i++)
index 72f41572ac4adab8eb457aa5aef970c762633748..93c8d3f45a64f0e0aea27b14a41a8526c0b9c368 100644 (file)
@@ -1,7 +1,7 @@
 
-void R_Modules_Init();
-void R_RegisterModule(char *name, void(*start)(), void(*shutdown)(), void(*newmap)());
-void R_Modules_Start();
-void R_Modules_Shutdown();
-void R_Modules_NewMap();
-void R_Modules_Restart();
+void R_Modules_Init(void);
+void R_RegisterModule(char *name, void(*start)(void), void(*shutdown)(void), void(*newmap)(void));
+void R_Modules_Start(void);
+void R_Modules_Shutdown(void);
+void R_Modules_NewMap(void);
+void R_Modules_Restart(void);
index e41be9f93a03a597eb9355258f15ae9e3c86aafb..fa9ec93c2efcedcae55f3b875f4f1e4e3facaed0 100644 (file)
--- a/r_part.c
+++ b/r_part.c
@@ -262,7 +262,7 @@ void R_InitParticleTexture (void)
        rocketglowparticletexture = R_LoadTexture ("glowparticletexture", 32, 32, &data[0][0][0], TEXF_MIPMAP | TEXF_ALPHA | TEXF_RGBA | TEXF_PRECACHE);
 }
 
-void r_part_start()
+void r_part_start(void)
 {
        particles = (particle_t *) qmalloc(r_numparticles * sizeof(particle_t));
        freeparticles = (void *) qmalloc(r_numparticles * sizeof(particle_t *));
@@ -270,14 +270,14 @@ void r_part_start()
        R_InitParticleTexture ();
 }
 
-void r_part_shutdown()
+void r_part_shutdown(void)
 {
        numparticles = 0;
        qfree(particles);
        qfree(freeparticles);
 }
 
-void r_part_newmap()
+void r_part_newmap(void)
 {
        numparticles = 0;
 }
@@ -1013,8 +1013,6 @@ void R_RocketTrail2 (vec3_t start, vec3_t end, int color, entity_t *ent)
 R_DrawParticles
 ===============
 */
-extern cvar_t  sv_gravity;
-
 void R_MoveParticles (void)
 {
        particle_t              *p;
index 2d22fd4c22c60b1853276ac2785f529446071f2a..56114375b905dcd000c62b4145f9324e8b2d2167 100644 (file)
--- a/render.h
+++ b/render.h
@@ -20,6 +20,48 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 // refresh.h -- public interface to refresh functions
 
+// sky stuff
+extern char skyname[];
+extern void R_SetSkyBox(char* sky);
+extern void LoadSky_f(void);
+extern rtexture_t *solidskytexture;
+extern rtexture_t *alphaskytexture;
+extern float speedscale; // for top sky and bottom sky
+
+// far clip distance for scene
+extern cvar_t r_farclip;
+
+// fog stuff
+extern void FOG_clear(void);
+extern float fog_density, fog_red, fog_green, fog_blue;
+
+// SHOWLMP stuff (Nehahra)
+extern void SHOWLMP_decodehide(void);
+extern void SHOWLMP_decodeshow(void);
+extern void SHOWLMP_drawall(void);
+extern void SHOWLMP_clear(void);
+
+// render profiling stuff
+extern qboolean intimerefresh;
+extern cvar_t r_speeds2;
+extern char r_speeds2_string1[81], r_speeds2_string2[81], r_speeds2_string3[81], r_speeds2_string4[81], r_speeds2_string5[81], r_speeds2_string6[81], r_speeds2_string7[81];
+
+// lighting stuff
+extern vec3_t lightspot;
+extern cvar_t r_ambient;
+
+// model rendering stuff
+extern float *aliasvert;
+extern float *aliasvertnorm;
+extern byte *aliasvertcolor;
+extern float modelalpha;
+
+// vis stuff
+extern cvar_t r_novis;
+
+// model transform stuff
+extern cvar_t gl_transform;
+
 #define        TOP_RANGE               16                      // soldier uniform colors
 #define        BOTTOM_RANGE    96
 
index 426291af1a2b75c99474d9754d6cdb98dc0709c1..5fbb3f714f02e73027486b48b15f0e18a9996695 100644 (file)
--- a/server.h
+++ b/server.h
@@ -183,21 +183,34 @@ typedef struct client_s
 
 //============================================================================
 
-extern cvar_t  teamplay;
-extern cvar_t  skill;
-extern cvar_t  deathmatch;
-extern cvar_t  coop;
-extern cvar_t  fraglimit;
-extern cvar_t  timelimit;
-
-extern server_static_t svs;                            // persistant server info
-extern server_t                sv;                                     // local server
-
-extern client_t        *host_client;
-
-extern jmp_buf         host_abortserver;
-
-extern edict_t         *sv_player;
+extern cvar_t teamplay;
+extern cvar_t skill;
+extern cvar_t deathmatch;
+extern cvar_t coop;
+extern cvar_t fraglimit;
+extern cvar_t timelimit;
+extern cvar_t pausable;
+extern cvar_t sv_deltacompress;
+extern cvar_t sv_maxvelocity;
+extern cvar_t sv_gravity;
+extern cvar_t sv_nostep;
+extern cvar_t sv_friction;
+extern cvar_t sv_edgefriction;
+extern cvar_t sv_stopspeed;
+extern cvar_t sv_maxspeed;
+extern cvar_t sv_accelerate;
+extern cvar_t sv_idealpitchscale;
+extern cvar_t sv_aim;
+extern cvar_t sv_predict;
+
+extern server_static_t svs;                            // persistant server info
+extern server_t sv;                                    // local server
+
+extern client_t *host_client;
+
+extern jmp_buf host_abortserver;
+
+extern edict_t *sv_player;
 
 //===========================================================
 
@@ -235,5 +248,5 @@ void SV_MoveToGoal (void);
 
 void SV_CheckForNewClients (void);
 void SV_RunClients (void);
-void SV_SaveSpawnparms ();
+void SV_SaveSpawnparms (void);
 void SV_SpawnServer (char *server);
index 49b6bb872b310acf7c4fb7a0b0827cd5c298141e..9ab93d3d72f159eec2d9d8ca321a26af9c5c1372 100644 (file)
@@ -218,7 +218,7 @@ qboolean SNDDMA_Init(void)
 }
 
 static inline int
-get_hw_ptr()
+get_hw_ptr(void)
 {
        size_t app_ptr;
        snd_pcm_sframes_t delay;
index 7444857f7fa2229ac8c359a1891d6d7eca4a3842..42e463fc2fa0e42efe852055c113b53481df543a 100644 (file)
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -36,7 +36,6 @@ short *snd_out;
 
 void Snd_WriteLinearBlastStereo16 (void);
 
-extern cvar_t snd_swapstereo;
 void Snd_WriteLinearBlastStereo16 (void)
 {
        int             i;
diff --git a/sound.h b/sound.h
index 3c9f980a355de930be2021cc9764da3bf5eafd14..4e8cafcab16bd2d11a1d03ffef834f70160a6dfa 100644 (file)
--- a/sound.h
+++ b/sound.h
@@ -130,12 +130,12 @@ void SNDDMA_Shutdown(void);
 #define        MAX_DYNAMIC_CHANNELS    128
 
 
-extern channel_t   channels[MAX_CHANNELS];
+extern channel_t channels[MAX_CHANNELS];
 // 0 to MAX_DYNAMIC_CHANNELS-1 = normal entity sounds
 // MAX_DYNAMIC_CHANNELS to MAX_DYNAMIC_CHANNELS + NUM_AMBIENTS -1 = water, etc
 // MAX_DYNAMIC_CHANNELS + NUM_AMBIENTS to total_channels = static sounds
 
-extern int                     total_channels;
+extern int total_channels;
 
 //
 // Fake dma is a synchronous faking of the DMA progress used for
@@ -143,10 +143,10 @@ extern    int                     total_channels;
 // number of times S_Update() is called per second.
 //
 
-extern qboolean                fakedma;
-extern int                     fakedma_updates;
-extern int             paintedtime;
-extern int             soundtime;
+extern qboolean fakedma;
+extern int fakedma_updates;
+extern int paintedtime;
+extern int soundtime;
 extern vec3_t listener_origin;
 extern vec3_t listener_forward;
 extern vec3_t listener_right;
@@ -155,13 +155,14 @@ extern volatile dma_t *shm;
 extern volatile dma_t sn;
 extern vec_t sound_nominal_clip_dist;
 
-extern cvar_t loadas8bit;
-extern cvar_t bgmvolume;
-extern cvar_t volume;
+extern cvar_t loadas8bit;
+extern cvar_t bgmvolume;
+extern cvar_t volume;
+extern cvar_t snd_swapstereo;
 
 extern qboolean        snd_initialized;
 
-extern int             snd_blocked;
+extern int snd_blocked;
 
 void S_LocalSound (char *s);
 sfxcache_t *S_LoadSound (sfx_t *s);
index 83f8ca52184fe74a95eb0870205aa2bad8dc861d..ef29fbf235d8696037f91437c067c6b0f67ffc15 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -26,8 +26,6 @@ server_static_t       svs;
 
 char   localmodels[MAX_MODELS][5];                     // inline model names for precache
 
-extern cvar_t  sv_deltacompress;
-
 //============================================================================
 
 /*
@@ -37,18 +35,7 @@ SV_Init
 */
 void SV_Init (void)
 {
-       int             i;
-       extern  cvar_t  sv_maxvelocity;
-       extern  cvar_t  sv_gravity;
-       extern  cvar_t  sv_nostep;
-       extern  cvar_t  sv_friction;
-       extern  cvar_t  sv_edgefriction;
-       extern  cvar_t  sv_stopspeed;
-       extern  cvar_t  sv_maxspeed;
-       extern  cvar_t  sv_accelerate;
-       extern  cvar_t  sv_idealpitchscale;
-       extern  cvar_t  sv_aim;
-       extern  cvar_t  sv_predict;
+       int i;
 
        Cvar_RegisterVariable (&sv_maxvelocity);
        Cvar_RegisterVariable (&sv_gravity);
@@ -63,7 +50,7 @@ void SV_Init (void)
        Cvar_RegisterVariable (&sv_predict);
        Cvar_RegisterVariable (&sv_deltacompress);
 
-       for (i=0 ; i<MAX_MODELS ; i++)
+       for (i = 0;i < MAX_MODELS;i++)
                sprintf (localmodels[i], "*%i", i);
 }
 
index 655af5f49e1c4bfff61e961c016ce8a24c3a9cc8..8effeb422124241656d1c553cbcfb00930258d04 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -1396,7 +1396,6 @@ SV_Physics
 
 ================
 */
-extern dfunction_t *EndFrameQC;
 void SV_Physics (void)
 {
        int             i;
index 10cd006b3c608863d8fcd5e379ef21a72ffeee3e..16405a073f889e5082b934deb28ebf2bf9812d84 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -23,11 +23,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 edict_t        *sv_player;
 
-extern cvar_t  sv_friction;
 cvar_t sv_edgefriction = {"edgefriction", "2"};
 cvar_t sv_predict = {"sv_predict", "1"};
 cvar_t sv_deltacompress = {"sv_deltacompress", "1"};
-extern cvar_t  sv_stopspeed;
 
 static vec3_t          forward, right, up;
 
@@ -628,7 +626,6 @@ nextmsg:
 SV_RunClients
 ==================
 */
-extern dfunction_t *SV_PlayerPhysicsQC;
 void SV_RunClients (void)
 {
        int                             i;
index 52107efc6791916373be0d877b6e9c21b79e3f42..b4945e1992ae9e2e32e22004e1baca787e8528fa 100644 (file)
@@ -81,7 +81,7 @@ void softwareuntransform (vec3_t in, vec3_t out)
 }
 
 // to save time on transforms, choose the appropriate function
-void softwaretransform_classify()
+void softwaretransform_classify(void)
 {
        if (softwaretransform_offset[0] != 0 || softwaretransform_offset[1] != 0 || softwaretransform_offset[2] != 0)
        {
@@ -127,7 +127,7 @@ void softwaretransform_classify()
        }
 }
 
-void softwaretransformidentity ()
+void softwaretransformidentity(void)
 {
        softwaretransform_offset[0] = softwaretransform_offset[1] = softwaretransform_offset[2] = softwaretransform_x[1] = softwaretransform_x[2] = softwaretransform_y[0] = softwaretransform_y[2] = softwaretransform_z[0] = softwaretransform_z[1] = 0;
        softwaretransform_x[0] = softwaretransform_y[1] = softwaretransform_z[2] = 1;
index b33b7c67c2609ce704d81b8b718acb8eca4b0bbc..506e5ed2585197ef31300cfdf907e6529a03103c 100644 (file)
@@ -3,6 +3,7 @@
 #define tft_translate 1
 #define tft_rotate 2
 
+extern vec_t softwaretransform_scale;
 extern vec3_t softwaretransform_offset;
 extern vec3_t softwaretransform_x;
 extern vec3_t softwaretransform_y;
@@ -10,7 +11,7 @@ extern vec3_t softwaretransform_z;
 extern int softwaretransform_type;
 
 extern void softwaretransformforentity (entity_t *e);
-extern void softwaretransformidentity ();
+extern void softwaretransformidentity (void);
 extern void softwaretransformset (vec3_t origin, vec3_t angles, vec_t scale);
 extern void (*softwaretransform) (vec3_t in, vec3_t out);
 extern void softwareuntransform (vec3_t in, vec3_t out);
diff --git a/vid.h b/vid.h
index d8638c42df24bbbad2bb65a7db44f96f27ca5fb8..174e7813d567a9030e9ccb9aa4448e9d09eaf814 100644 (file)
--- a/vid.h
+++ b/vid.h
@@ -49,14 +49,14 @@ extern cvar_t vid_mode;
 extern cvar_t vid_mouse;
 extern cvar_t vid_fullscreen;
 
-void VID_InitCvars();
+void VID_InitCvars(void);
 
 void GL_Init (void);
 
-void VID_CheckMultitexture();
-void VID_CheckCVA();
+void VID_CheckMultitexture(void);
+void VID_CheckCVA(void);
 
-void   VID_Init ();
+void   VID_Init (void);
 // Called at startup
 
 void   VID_Shutdown (void);
index e1dff04ad8379657442861cc936d4b2646a98d4f..7136f0420ceb2c7b6b6bfb42477f7118d533ce39 100644 (file)
@@ -109,7 +109,7 @@ void InitSig(void)
 
        Check for ARB, SGIS, or EXT multitexture support
 */
-void VID_CheckMultitexture()
+void VID_CheckMultitexture(void)
 {
        Con_Printf ("Checking for multitexture... ");
        if (COM_CheckParm ("-nomtex"))
@@ -175,7 +175,7 @@ void VID_CheckCVA(void)
 
 typedef void (GLAPIENTRY *gl3DfxSetDitherModeEXT_FUNC) (GrDitherMode_t mode);
 
-void VID_SetupDithering()
+void VID_SetupDithering(void)
 {
        Con_Printf ("Dithering: ");
 
@@ -309,7 +309,7 @@ int VID_SetGamma(float prescale, float gamma, float scale, float base)
        return FALSE;
 }
 
-void VID_Init()
+void VID_Init(void)
 {
        int i;
        GLint attribs[32];
index ea76ba6b0803e44c329f782834d29b8659ba7e50..1938a0dda82243b8a461223a9c24a4351ffd4318 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -523,7 +523,7 @@ int VID_SetGamma(float prescale, float gamma, float scale, float base)
        return FALSE;
 }
 
-void VID_Init()
+void VID_Init(void)
 {
        int i;
        int attrib[] = {
index 86205a125a994cb276bfed3c30650c0b7c4582b8..7cea963981ec615187b00c49f9de4964c5c099d6 100644 (file)
@@ -20,7 +20,7 @@ void (GLAPIENTRY *qglSelectTexture) (GLenum);
 void (GLAPIENTRY *qglLockArraysEXT) (GLint first, GLint count);
 void (GLAPIENTRY *qglUnlockArraysEXT) (void);
 
-void VID_InitCvars()
+void VID_InitCvars(void)
 {
        Cvar_RegisterVariable(&vid_mode);
        Cvar_RegisterVariable(&vid_mouse);
index fab43df8b14b8ac9dd048405436700f43be952c6..b1417868d4904aba53c8bf8492234d15456921f9 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -479,7 +479,7 @@ void VID_SetDefaultMode (void)
        IN_DeactivateMouse ();
 }
 
-void VID_RestoreSystemGamma();
+void VID_RestoreSystemGamma(void);
 
 void   VID_Shutdown (void)
 {
@@ -638,7 +638,7 @@ void ClearAllStates (void)
        IN_ClearStates ();
 }
 
-void VID_RestoreGameGamma();
+void VID_RestoreGameGamma(void);
 
 void AppActivate(BOOL fActive, BOOL minimize)
 /****************************************************************************
@@ -1260,12 +1260,12 @@ int VID_SetGamma(float prescale, float gamma, float scale, float base)
        return i; // return success or failure
 }
 
-void VID_RestoreGameGamma()
+void VID_RestoreGameGamma(void)
 {
        VID_UpdateGamma(true);
 }
 
-void VID_GetSystemGamma()
+void VID_GetSystemGamma(void)
 {
        HDC hdc;
        hdc = GetDC (NULL);
@@ -1275,7 +1275,7 @@ void VID_GetSystemGamma()
        ReleaseDC (NULL, hdc);
 }
 
-void VID_RestoreSystemGamma()
+void VID_RestoreSystemGamma(void)
 {
        HDC hdc;
        hdc = GetDC (NULL);
@@ -1290,7 +1290,7 @@ void VID_RestoreSystemGamma()
 VID_Init
 ===================
 */
-void   VID_Init ()
+void   VID_Init (void)
 {
        int             i;
 //     int             existingmode;
@@ -1595,14 +1595,10 @@ void VID_MenuDraw (void)
                }
        }
 
-       M_Print (3*8, 36 + MODE_AREA_HEIGHT * 8 + 8*2,
-                        "Video modes must be set from the");
-       M_Print (3*8, 36 + MODE_AREA_HEIGHT * 8 + 8*3,
-                        "command line with -width <width>");
-       M_Print (3*8, 36 + MODE_AREA_HEIGHT * 8 + 8*4,
-                        "and -bpp <bits-per-pixel>");
-       M_Print (3*8, 36 + MODE_AREA_HEIGHT * 8 + 8*6,
-                        "Select windowed mode with -window");
+       M_Print (3*8, 36 + MODE_AREA_HEIGHT * 8 + 8*2, "Video modes must be set from the");
+       M_Print (3*8, 36 + MODE_AREA_HEIGHT * 8 + 8*3, "command line with -width <width>");
+       M_Print (3*8, 36 + MODE_AREA_HEIGHT * 8 + 8*4, "and -bpp <bits-per-pixel>");
+       M_Print (3*8, 36 + MODE_AREA_HEIGHT * 8 + 8*6, "Select windowed mode with -window");
 }
 
 
diff --git a/view.c b/view.c
index a8821d1b231994ff423722a4e3ca4140e4d150aa..5b0da1ee968a8c9bf5c854f63598e274e388558e 100644 (file)
--- a/view.c
+++ b/view.c
@@ -61,8 +61,6 @@ cvar_t        gl_polyblend = {"gl_polyblend", "1", true};
 
 float  v_dmg_time, v_dmg_roll, v_dmg_pitch;
 
-extern int                     in_forward, in_forward2, in_back;
-
 
 /*
 ===============
@@ -729,7 +727,6 @@ V_CalcRefdef
 
 ==================
 */
-extern qboolean intimerefresh;
 void V_CalcRefdef (void)
 {
        entity_t        *ent, *view;