mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
we now compile and link with -fno-common. this cleans up the multiple,
uninitialized declarations of variables.
This commit is contained in:
parent
fa95bd35aa
commit
b5341f0d13
28 changed files with 38 additions and 52 deletions
|
@ -1224,7 +1224,7 @@ if test "x$GCC" = "xyes"; then
|
|||
else
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
fi
|
||||
# CFLAGS="$CFLAGS -Wall -pedantic"
|
||||
CFLAGS="$CFLAGS -fno-common"
|
||||
fi
|
||||
|
||||
AS="$CC"
|
||||
|
|
|
@ -29,10 +29,12 @@
|
|||
#ifndef __QF_input_h_
|
||||
#define __QF_input_h_
|
||||
|
||||
struct {
|
||||
typedef struct {
|
||||
vec3_t angles;
|
||||
vec3_t position;
|
||||
} viewdelta;
|
||||
} viewdelta_t;
|
||||
|
||||
extern viewdelta_t viewdelta;
|
||||
|
||||
#define freelook (in_mlook.state & 1 || in_freelook->int_val)
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ void D_SpriteDrawSpans (sspan_t *pspan);
|
|||
void D_DrawSkyScans (espan_t *pspan);
|
||||
|
||||
void R_ShowSubDiv (void);
|
||||
void (*prealspandrawer)(void);
|
||||
extern void (*prealspandrawer)(void);
|
||||
surfcache_t *D_CacheSurface (msurface_t *surface, int miplevel);
|
||||
|
||||
extern int D_MipLevelForScale (float scale);
|
||||
|
|
|
@ -58,8 +58,6 @@ static const char rcsid[] =
|
|||
|
||||
void EmitWaterPolys (msurface_t *fa);
|
||||
|
||||
qboolean r_cache_thrash;
|
||||
|
||||
int active_lightmaps;
|
||||
int dlightdivtable[8192];
|
||||
int gl_internalformat;
|
||||
|
|
|
@ -37,7 +37,7 @@ static const char rcsid[] =
|
|||
|
||||
#ifndef USE_INTEL_ASM
|
||||
|
||||
int r_bmodelactive;
|
||||
extern int r_bmodelactive; //FIXME this shouldn't even be getting compiled
|
||||
|
||||
|
||||
void
|
||||
|
|
|
@ -48,8 +48,6 @@ int ramp1[8] = { 0x6f, 0x6d, 0x6b, 0x69, 0x67, 0x65, 0x63, 0x61 };
|
|||
int ramp2[8] = { 0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x68, 0x66 };
|
||||
int ramp3[8] = { 0x6d, 0x6b, 6, 5, 4, 3 };
|
||||
|
||||
vec3_t r_pright, r_pup, r_ppn;
|
||||
|
||||
extern unsigned int r_maxparticles;
|
||||
extern particle_t *active_particles, *free_particles, *particles;
|
||||
|
||||
|
|
|
@ -59,7 +59,6 @@ static const char rcsid[] =
|
|||
void *colormap;
|
||||
vec3_t viewlightvec;
|
||||
alight_t r_viewlighting = { 128, 192, viewlightvec };
|
||||
float r_time1;
|
||||
int r_numallocatededges;
|
||||
qboolean r_drawpolys;
|
||||
qboolean r_drawculledpolys;
|
||||
|
|
|
@ -48,8 +48,6 @@ int ramp1[8] = { 0x6f, 0x6d, 0x6b, 0x69, 0x67, 0x65, 0x63, 0x61 };
|
|||
int ramp2[8] = { 0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x68, 0x66 };
|
||||
int ramp3[8] = { 0x6d, 0x6b, 6, 5, 4, 3 };
|
||||
|
||||
vec3_t r_pright, r_pup, r_ppn;
|
||||
|
||||
extern unsigned int r_maxparticles;
|
||||
extern particle_t *active_particles, *free_particles, *particles;
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ static qboolean vidmode_avail = false;
|
|||
|
||||
static qboolean vidmode_active = false;
|
||||
|
||||
cvar_t *vid_system_gamma;
|
||||
extern cvar_t *vid_system_gamma;
|
||||
qboolean vid_fullscreen_active;
|
||||
static qboolean vid_context_created = false;
|
||||
static int window_x, window_y, window_saved;
|
||||
|
|
|
@ -58,6 +58,8 @@ static const char rcsid[] =
|
|||
#include "QF/mathlib.h"
|
||||
#include "QF/vid.h"
|
||||
|
||||
viewdelta_t viewdelta;
|
||||
|
||||
cvar_t *in_grab;
|
||||
cvar_t *in_amp;
|
||||
cvar_t *in_pre_amp;
|
||||
|
|
|
@ -46,11 +46,9 @@ static const char rcsid[] =
|
|||
|
||||
#include "compat.h"
|
||||
|
||||
cvar_t *m_filter;
|
||||
cvar_t *in_grab;
|
||||
extern cvar_t *in_grab;
|
||||
|
||||
int old_windowed_mouse;
|
||||
int modestate; // FIXME: just to avoid cross-comp errors - remove later
|
||||
|
||||
|
||||
void
|
||||
|
|
|
@ -83,7 +83,7 @@ void (* qf_fxMesaMakeCurrent) (fxMesaContext ctx);
|
|||
// FIXME!!!!! This belongs in include/qfgl_ext.h -- deek
|
||||
typedef void (GLAPIENTRY * QF_3DfxSetDitherModeEXT) (GrDitherMode_t mode);
|
||||
|
||||
cvar_t *vid_system_gamma;
|
||||
extern cvar_t *vid_system_gamma;
|
||||
|
||||
static fxMesaContext fc = NULL;
|
||||
|
||||
|
|
|
@ -41,9 +41,7 @@ static const char rcsid[] =
|
|||
|
||||
extern viddef_t vid; // global video state
|
||||
|
||||
int scr_width, scr_height;
|
||||
cvar_t *vid_width;
|
||||
cvar_t *vid_height;
|
||||
extern int scr_width, scr_height;
|
||||
|
||||
unsigned short d_8to16table[256];
|
||||
unsigned int d_8to24table[256];
|
||||
|
|
|
@ -92,10 +92,10 @@ extern void VID_Init8bitPalette (void);
|
|||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
const char *gl_vendor;
|
||||
const char *gl_renderer;
|
||||
const char *gl_version;
|
||||
const char *gl_extensions;
|
||||
extern const char *gl_vendor;
|
||||
extern const char *gl_renderer;
|
||||
extern const char *gl_version;
|
||||
extern const char *gl_extensions;
|
||||
|
||||
|
||||
void
|
||||
|
|
|
@ -58,7 +58,7 @@ HWND mainwindow;
|
|||
|
||||
// static float oldin_grab = 0;
|
||||
|
||||
cvar_t *vid_system_gamma;
|
||||
extern cvar_t *vid_system_gamma;
|
||||
extern viddef_t vid; // global video state
|
||||
|
||||
int modestate; // FIXME: just to avoid cross-compile errors - remove later
|
||||
|
|
|
@ -64,7 +64,7 @@ HWND mainwindow;
|
|||
#define WARP_WIDTH 320
|
||||
#define WARP_HEIGHT 200
|
||||
|
||||
cvar_t *vid_system_gamma;
|
||||
extern cvar_t *vid_system_gamma;
|
||||
|
||||
int VID_options_items = 1;
|
||||
int modestate;
|
||||
|
|
|
@ -65,7 +65,7 @@ static const char rcsid[] =
|
|||
|
||||
void VGA_UpdatePlanarScreen (void *srcbuffer);
|
||||
|
||||
cvar_t *vid_system_gamma;
|
||||
extern cvar_t *vid_system_gamma;
|
||||
|
||||
static int num_modes, current_mode;
|
||||
static vga_modeinfo *modes;
|
||||
|
|
|
@ -106,10 +106,10 @@ lmode_t lowresmodes[] = {
|
|||
{512, 384},
|
||||
};
|
||||
|
||||
const char *gl_vendor;
|
||||
const char *gl_renderer;
|
||||
const char *gl_version;
|
||||
const char *gl_extensions;
|
||||
extern const char *gl_vendor;
|
||||
extern const char *gl_renderer;
|
||||
extern const char *gl_version;
|
||||
extern const char *gl_extensions;
|
||||
|
||||
// FIXME: Only used by MGL ..
|
||||
qboolean DDActive;
|
||||
|
|
|
@ -108,8 +108,8 @@ static int shiftmask_fl = 0;
|
|||
static long r_shift, g_shift, b_shift;
|
||||
static unsigned long r_mask, g_mask, b_mask;
|
||||
|
||||
cvar_t *vid_width;
|
||||
cvar_t *vid_height;
|
||||
extern cvar_t *vid_width;
|
||||
extern cvar_t *vid_height;
|
||||
|
||||
|
||||
static void
|
||||
|
|
|
@ -65,10 +65,11 @@ static const char rcsid[] =
|
|||
state bit 2 is edge triggered on the down to up transition
|
||||
*/
|
||||
|
||||
kbutton_t in_mlook, in_klook;
|
||||
extern kbutton_t in_strafe, in_mlook, in_klook, in_speed;
|
||||
|
||||
kbutton_t in_left, in_right, in_forward, in_back;
|
||||
kbutton_t in_lookup, in_lookdown, in_moveleft, in_moveright;
|
||||
kbutton_t in_strafe, in_speed, in_use, in_jump, in_attack;
|
||||
kbutton_t in_use, in_jump, in_attack;
|
||||
kbutton_t in_up, in_down;
|
||||
|
||||
int in_impulse;
|
||||
|
|
|
@ -57,7 +57,7 @@ cvar_t *topcolor;
|
|||
cvar_t *bottomcolor;
|
||||
cvar_t *cl_color;
|
||||
|
||||
char allskins[128];
|
||||
extern char allskins[128];
|
||||
|
||||
|
||||
void
|
||||
|
|
|
@ -54,9 +54,6 @@ static const char rcsid[] =
|
|||
extern cvar_t *noskins; // XXX FIXME, this shouldn't be here?
|
||||
|
||||
cvar_t *baseskin;
|
||||
cvar_t *skin;
|
||||
cvar_t *topcolor;
|
||||
cvar_t *bottomcolor;
|
||||
|
||||
char allskins[128];
|
||||
|
||||
|
|
|
@ -68,8 +68,8 @@ vec3_t r_origin;
|
|||
qboolean r_paused;
|
||||
entity_t *r_view_model;
|
||||
|
||||
extern cvar_t *cl_rollangle;
|
||||
extern cvar_t *cl_rollspeed;
|
||||
cvar_t *cl_rollangle;
|
||||
cvar_t *cl_rollspeed;
|
||||
|
||||
void
|
||||
CL_UpdateScreen (double realtime)
|
||||
|
|
|
@ -51,7 +51,6 @@ sv_globals_t sv_globals;
|
|||
sv_funcs_t sv_funcs;
|
||||
sv_fields_t sv_fields;
|
||||
|
||||
cvar_t *r_skyname;
|
||||
cvar_t *sv_progs;
|
||||
cvar_t *pr_checkextensions;
|
||||
|
||||
|
@ -335,8 +334,6 @@ SV_Progs_Init (void)
|
|||
void
|
||||
SV_Progs_Init_Cvars (void)
|
||||
{
|
||||
r_skyname = Cvar_Get ("r_skyname", "", CVAR_SERVERINFO, Cvar_Info,
|
||||
"name of skybox");
|
||||
sv_progs = Cvar_Get ("sv_progs", "progs.dat", CVAR_ROM, NULL,
|
||||
"Allows selectable game progs if you have several "
|
||||
"of them in the gamedir");
|
||||
|
|
|
@ -63,8 +63,8 @@ qboolean onground;
|
|||
usercmd_t cmd;
|
||||
|
||||
cvar_t *sv_idealpitchscale;
|
||||
cvar_t *cl_rollspeed;
|
||||
cvar_t *cl_rollangle;
|
||||
extern cvar_t *cl_rollspeed;
|
||||
extern cvar_t *cl_rollangle;
|
||||
|
||||
#define MAX_FORWARD 6
|
||||
|
||||
|
|
|
@ -75,10 +75,11 @@ cvar_t *cl_nodelta;
|
|||
state bit 2 is edge triggered on the down to up transition
|
||||
*/
|
||||
|
||||
kbutton_t in_mlook, in_klook;
|
||||
extern kbutton_t in_speed, in_strafe, in_klook, in_mlook;
|
||||
|
||||
kbutton_t in_left, in_right, in_forward, in_back;
|
||||
kbutton_t in_lookup, in_lookdown, in_moveleft, in_moveright;
|
||||
kbutton_t in_strafe, in_speed, in_use, in_jump, in_attack;
|
||||
kbutton_t in_use, in_jump, in_attack;
|
||||
kbutton_t in_up, in_down;
|
||||
|
||||
int in_impulse;
|
||||
|
|
|
@ -55,7 +55,7 @@ cvar_t *skin;
|
|||
cvar_t *topcolor;
|
||||
cvar_t *bottomcolor;
|
||||
|
||||
char allskins[128];
|
||||
extern char allskins[128];
|
||||
|
||||
|
||||
void
|
||||
|
|
|
@ -54,9 +54,6 @@ static const char rcsid[] =
|
|||
extern cvar_t *noskins; // XXX FIXME, this shouldn't be here?
|
||||
|
||||
cvar_t *baseskin;
|
||||
cvar_t *skin;
|
||||
cvar_t *topcolor;
|
||||
cvar_t *bottomcolor;
|
||||
|
||||
char allskins[128];
|
||||
|
||||
|
|
Loading…
Reference in a new issue