make the code to compile with -fno-common flag:

glquake.h (dev_stats): Add extern.
(dev_peakstats): Likewise.
(dev_overflows): Likewise.
(lightmap_textures): Likewise.
(gl_warpimagesize): Likewise.
(r_drawflat_cheatsafe): Likewise.
(r_fullbright_cheatsafe): Likewise.
(r_lightmap_cheatsafe): Likewise.
(r_drawworld_cheatsafe): Likewise.
gl_texmgr.h (notexture): Likewise.
(nulltexture): Likewise.
(d_8to24table): Likewise.
(d_8to24table_fbright): Likewise.
(d_8to24table_nobright): Likewise.
(d_8to24table_conchars): Likewise.
(d_8to24table_shirt): Likewise.
(d_8to24table_pants): Likewise.
gl_screen.c (sb_lines): Remove and make it live only in sbar.c.
(vid): Remove and make it live only in gl_vid*.c
gl_vidsdl.c (m_state): Remove and make it live only in menu.c.
gl_vidnt.c (m_state): Likewise.
net_dgrm.c (m_state): Remove extern declaration.
menu.c (m_state): Tagged the m_state enum as m_state_e and moved it to menu.h.
Declared m_state as enum m_state_e.
menu.h (enum m_state_e): Moved from menu.c to here.
(m_state): Added extern declaration.
gl_rmain.c (r_drawflat_cheatsafe): Made the global to live here.
(r_fullbright_cheatsafe): Likewise.
(r_lightmap_cheatsafe): Likewise.
(r_drawworld_cheatsafe): Likewise.
gl_warp.c (gl_warpimagesize): Likewise.
host.c (dev_stats): Likewise.
(dev_peakstats): Likewise.
(dev_overflows): Likewise.
gl_texmgr.c (notexture): Likewise.
(nulltexture): Likewise.
(d_8to24table): Likewise.
(d_8to24table_fbright): Likewise.
(d_8to24table_nobright): Likewise.
(d_8to24table_conchars): Likewise.
(d_8to24table_shirt): Likewise.
(d_8to24table_pants[): Likewise.
r_brush.c (lightmap_textures): Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@117 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2010-04-22 19:02:29 +00:00
parent 4549e5a97c
commit f8a5363bfd
13 changed files with 55 additions and 83 deletions

View File

@ -103,6 +103,8 @@ cvar_t r_nolerp_list = {"r_nolerp_list", "progs/flame.mdl,progs/flame2.mdl,progs
extern cvar_t r_vfog;
//johnfitz
qboolean r_drawflat_cheatsafe, r_fullbright_cheatsafe, r_lightmap_cheatsafe, r_drawworld_cheatsafe; //johnfitz
/*
=================
R_CullBox -- johnfitz -- replaced with new function from lordhavoc

View File

@ -111,10 +111,6 @@ qpic_t *scr_turtle;
int clearconsole;
int clearnotify;
int sb_lines;
viddef_t vid; // global video state
vrect_t scr_vrect;
qboolean scr_disabled_for_loading;

View File

@ -34,8 +34,16 @@ const int gl_alpha_format = 4;
#define MAX_GLTEXTURES 2048
gltexture_t *active_gltextures, *free_gltextures;
gltexture_t *notexture, *nulltexture;
int numgltextures;
unsigned int d_8to24table[256];
unsigned int d_8to24table_fbright[256];
unsigned int d_8to24table_nobright[256];
unsigned int d_8to24table_conchars[256];
unsigned int d_8to24table_shirt[256];
unsigned int d_8to24table_pants[256];
/*
================================================================================

View File

@ -63,15 +63,15 @@ typedef struct gltexture_s {
int visframe; //matches r_framecount if texture was bound this frame
} gltexture_t;
gltexture_t *notexture;
gltexture_t *nulltexture;
extern gltexture_t *notexture;
extern gltexture_t *nulltexture;
unsigned int d_8to24table[256];
unsigned int d_8to24table_fbright[256];
unsigned int d_8to24table_nobright[256];
unsigned int d_8to24table_conchars[256];
unsigned int d_8to24table_shirt[256];
unsigned int d_8to24table_pants[256];
extern unsigned int d_8to24table[256];
extern unsigned int d_8to24table_fbright[256];
extern unsigned int d_8to24table_nobright[256];
extern unsigned int d_8to24table_conchars[256];
extern unsigned int d_8to24table_shirt[256];
extern unsigned int d_8to24table_pants[256];
// TEXTURE MANAGER

View File

@ -2365,28 +2365,6 @@ extern void M_DrawCheckbox (int x, int y, int on);
extern qboolean m_entersound;
enum {
m_none,
m_main,
m_singleplayer,
m_load,
m_save,
m_multiplayer,
m_setup,
m_net,
m_options,
m_video,
m_keys,
m_help,
m_quit,
m_serialconfig,
m_modemconfig,
m_lanconfig,
m_gameoptions,
m_search,
m_slist
} m_state;
#define VIDEO_OPTIONS_ITEMS 6
int video_cursor_table[] = {48, 56, 64, 72, 88, 96};
int video_options_cursor = 0;

View File

@ -1471,28 +1471,6 @@ extern void M_DrawCheckbox (int x, int y, int on);
extern qboolean m_entersound;
enum {
m_none,
m_main,
m_singleplayer,
m_load,
m_save,
m_multiplayer,
m_setup,
m_net,
m_options,
m_video,
m_keys,
m_help,
m_quit,
m_serialconfig,
m_modemconfig,
m_lanconfig,
m_gameoptions,
m_search,
m_slist
} m_state;
#define VIDEO_OPTIONS_ITEMS 7
int video_cursor_table[] = {48, 56, 64, 72, 80, 96, 104};
int video_options_cursor = 0;

View File

@ -27,6 +27,8 @@ cvar_t r_oldwater = {"r_oldwater", "1"};
cvar_t r_waterquality = {"r_waterquality", "8"};
cvar_t r_waterwarp = {"r_waterwarp", "1"};
int gl_warpimagesize;
float load_subdivide_size; //johnfitz -- remember what subdivide_size value was when this map was loaded
float turbsin[] =

View File

@ -238,7 +238,7 @@ typedef struct {
int beams;
int dlights;
} devstats_t;
devstats_t dev_stats, dev_peakstats;
extern devstats_t dev_stats, dev_peakstats;
//johnfitz
//ohnfitz -- reduce overflow warning spam
@ -247,18 +247,18 @@ typedef struct {
double efrags;
double beams;
} overflowtimes_t;
overflowtimes_t dev_overflows; //this stores the last time overflow messages were displayed, not the last time overflows occured
extern overflowtimes_t dev_overflows; //this stores the last time overflow messages were displayed, not the last time overflows occured
#define CONSOLE_RESPAM_TIME 3 // seconds between repeated warning messages
//johnfitz
//johnfitz -- moved here from r_brush.c
#define MAX_LIGHTMAPS 256 //johnfitz -- was 64
gltexture_t *lightmap_textures[MAX_LIGHTMAPS]; //johnfitz -- changed to an array
extern gltexture_t *lightmap_textures[MAX_LIGHTMAPS]; //johnfitz -- changed to an array
//johnfitz
int gl_warpimagesize; //johnfitz -- for water warp
extern int gl_warpimagesize; //johnfitz -- for water warp
qboolean r_drawflat_cheatsafe, r_fullbright_cheatsafe, r_lightmap_cheatsafe, r_drawworld_cheatsafe; //johnfitz
extern qboolean r_drawflat_cheatsafe, r_fullbright_cheatsafe, r_lightmap_cheatsafe, r_drawworld_cheatsafe; //johnfitz
//johnfitz -- fog functions called from outside gl_fog.c
void Fog_ParseServerMessage (void);

View File

@ -80,6 +80,9 @@ cvar_t temp1 = {"temp1","0"};
cvar_t devstats = {"devstats","0"}; //johnfitz -- track developer statistics that vary every frame
devstats_t dev_stats, dev_peakstats;
overflowtimes_t dev_overflows; //this stores the last time overflow messages were displayed, not the last time overflows occured
/*
================
Max_Edicts_f -- johnfitz

View File

@ -24,27 +24,7 @@ void (*vid_menucmdfn)(void); //johnfitz
void (*vid_menudrawfn)(void);
void (*vid_menukeyfn)(int key);
enum {
m_none,
m_main,
m_singleplayer,
m_load,
m_save,
m_multiplayer,
m_setup,
m_net,
m_options,
m_video,
m_keys,
m_help,
m_quit,
m_serialconfig,
m_modemconfig,
m_lanconfig,
m_gameoptions,
m_search,
m_slist
} m_state;
enum m_state_e m_state;
void M_Menu_Main_f (void);
void M_Menu_SinglePlayer_f (void);

View File

@ -31,6 +31,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern int m_activenet;
enum m_state_e {
m_none,
m_main,
m_singleplayer,
m_load,
m_save,
m_multiplayer,
m_setup,
m_net,
m_options,
m_video,
m_keys,
m_help,
m_quit,
m_serialconfig,
m_modemconfig,
m_lanconfig,
m_gameoptions,
m_search,
m_slist
};
extern enum m_state_e m_state;
//
// menus
//

View File

@ -81,7 +81,6 @@ struct
} packetBuffer;
extern int m_return_state;
extern int m_state;
extern qboolean m_return_onerror;
extern char m_return_reason[32];

View File

@ -31,6 +31,8 @@ int lightmap_bytes;
#define BLOCK_WIDTH 128 //johnfitz -- was 128
#define BLOCK_HEIGHT 128 //johnfitz -- was 128
gltexture_t *lightmap_textures[MAX_LIGHTMAPS]; //johnfitz -- changed to an array
unsigned blocklights[BLOCK_WIDTH*BLOCK_HEIGHT*3]; //johnfitz -- was 18*18, added lit support (*3) and loosened surface extents maximum (BLOCK_WIDTH*BLOCK_HEIGHT)
typedef struct glRect_s {