diff --git a/quakespasm/Quake/gl_rmain.c b/quakespasm/Quake/gl_rmain.c index 88034702..f42ea345 100644 --- a/quakespasm/Quake/gl_rmain.c +++ b/quakespasm/Quake/gl_rmain.c @@ -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 diff --git a/quakespasm/Quake/gl_screen.c b/quakespasm/Quake/gl_screen.c index 15bd0dfa..3ae0bb94 100644 --- a/quakespasm/Quake/gl_screen.c +++ b/quakespasm/Quake/gl_screen.c @@ -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; diff --git a/quakespasm/Quake/gl_texmgr.c b/quakespasm/Quake/gl_texmgr.c index ce668b81..c628c87e 100644 --- a/quakespasm/Quake/gl_texmgr.c +++ b/quakespasm/Quake/gl_texmgr.c @@ -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]; + /* ================================================================================ diff --git a/quakespasm/Quake/gl_texmgr.h b/quakespasm/Quake/gl_texmgr.h index 5f087bb0..2afc640d 100644 --- a/quakespasm/Quake/gl_texmgr.h +++ b/quakespasm/Quake/gl_texmgr.h @@ -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 diff --git a/quakespasm/Quake/gl_vidnt.c b/quakespasm/Quake/gl_vidnt.c index 102a1033..2d447ed8 100644 --- a/quakespasm/Quake/gl_vidnt.c +++ b/quakespasm/Quake/gl_vidnt.c @@ -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; diff --git a/quakespasm/Quake/gl_vidsdl.c b/quakespasm/Quake/gl_vidsdl.c index 752fcf48..b36c2715 100644 --- a/quakespasm/Quake/gl_vidsdl.c +++ b/quakespasm/Quake/gl_vidsdl.c @@ -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; diff --git a/quakespasm/Quake/gl_warp.c b/quakespasm/Quake/gl_warp.c index e064086f..085cf13f 100644 --- a/quakespasm/Quake/gl_warp.c +++ b/quakespasm/Quake/gl_warp.c @@ -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[] = diff --git a/quakespasm/Quake/glquake.h b/quakespasm/Quake/glquake.h index 9fb9aee3..5613eb57 100644 --- a/quakespasm/Quake/glquake.h +++ b/quakespasm/Quake/glquake.h @@ -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); diff --git a/quakespasm/Quake/host.c b/quakespasm/Quake/host.c index fcb4ba6c..7d3f64eb 100644 --- a/quakespasm/Quake/host.c +++ b/quakespasm/Quake/host.c @@ -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 diff --git a/quakespasm/Quake/menu.c b/quakespasm/Quake/menu.c index 33fce1dd..a236000f 100644 --- a/quakespasm/Quake/menu.c +++ b/quakespasm/Quake/menu.c @@ -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); diff --git a/quakespasm/Quake/menu.h b/quakespasm/Quake/menu.h index bcb837a3..8cf24c45 100644 --- a/quakespasm/Quake/menu.h +++ b/quakespasm/Quake/menu.h @@ -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 // diff --git a/quakespasm/Quake/net_dgrm.c b/quakespasm/Quake/net_dgrm.c index 7e48a8bf..bd760abd 100644 --- a/quakespasm/Quake/net_dgrm.c +++ b/quakespasm/Quake/net_dgrm.c @@ -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]; diff --git a/quakespasm/Quake/r_brush.c b/quakespasm/Quake/r_brush.c index adb7e84b..2631608f 100644 --- a/quakespasm/Quake/r_brush.c +++ b/quakespasm/Quake/r_brush.c @@ -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 {