diff --git a/include/glquake.h b/include/glquake.h index 5e688dcd8..802572c63 100644 --- a/include/glquake.h +++ b/include/glquake.h @@ -96,6 +96,16 @@ extern int player_fb_textures; extern int skytexturenum; // index in cl.loadmodel, not gl texture object extern cvar_t *r_novis; +extern cvar_t *r_particles; +extern cvar_t *r_norefresh; +extern cvar_t *r_drawviewmodel; +extern cvar_t *r_shadows; +extern cvar_t *r_wateralpha; +extern cvar_t *r_waterripple; +extern cvar_t *r_dynamic; +extern cvar_t *r_netgraph; +extern cvar_t *r_lightmap; +extern cvar_t *r_mirroralpha; extern cvar_t *gl_affinemodels; extern cvar_t *gl_clear; @@ -185,4 +195,49 @@ void GL_Set2D (void); void GL_CheckGamma (unsigned char *pal); void GL_CheckBrightness (unsigned char *pal); +typedef struct { + int key; // allows reusability + vec3_t origin, owner; + float size; + float die, decay; // duration settings + float minlight; // lighting threshold + float color[3]; // RGB +} fire_t; + +struct entity_s; +void R_AddFire (vec3_t, vec3_t, struct entity_s *ent); +fire_t *R_AllocFire (int); +void R_DrawFire (fire_t *); +void R_UpdateFires (void); + +void R_DrawBrushModel (struct entity_s *e); +void R_DrawWorld (void); +void R_RenderDlights (void); +void R_DrawSky (void); +void R_DrawSkyChain (msurface_t *s); +void EmitWaterPolys (msurface_t *fa); +void R_RotateForEntity (struct entity_s *e); +void EmitWaterPolys (msurface_t *fa); +void R_NetGraph (void); +void R_LoadSkys (const char *sky); + +extern float bubble_sintable[], bubble_costable[]; +extern float v_blend[4]; + +void AddLightBlend (float, float, float, float); +extern int c_brush_polys, c_alias_polys; +extern float r_world_matrix[16]; +extern mplane_t frustum[4]; + +extern inline qboolean R_CullBox (vec3_t mins, vec3_t maxs) +{ + int i; + + for (i=0 ; i<4 ; i++) + if (BoxOnPlaneSide (mins, maxs, &frustum[i]) == 2) + return true; + return false; +} + + #endif // __glquake_h diff --git a/libs/video/targets/Makefile.am b/libs/video/targets/Makefile.am index 2ca304bb3..851231bbe 100644 --- a/libs/video/targets/Makefile.am +++ b/libs/video/targets/Makefile.am @@ -23,12 +23,12 @@ libQFfbdev_la_SOURCES= fbset.c fbset_modes_y.y fbset_modes_l.l \ in_common.c in_fbdev.c vid.c vid_common_sw.c vid_fbdev.c YACCLEX_CLEANFILES= fbset_modes_y.c fbset_modes_y.h \ fbset_modes_y.tab.h fbset_modes_l.c -EXTRA_libQFfbdev_la_SOURCES=fbset_modes_y.h +#EXTRA_libQFfbdev_la_SOURCES=fbset_modes_y.h fbset_modes_y.lo: $(srcdir)/fbset_modes_y.c - $(COMPILE) -Wno-error -c $< + $(LTCOMPILE) -Wno-error -c $< fbset_modes_l.lo: $(srcdir)/fbset_modes_l.c - $(COMPILE) -Wno-error -c $< + $(LTCOMPILE) -Wno-error -c $< libQFmgl_la_LDFLAGS= -version-info 1:0:0 libQFmgl_la_SOURCES= in_common.c in_win.c vid.c vid_common_sw.c vid_mgl.c @@ -40,22 +40,22 @@ libQFsvga_la_LDFLAGS= -version-info 1:0:0 libQFsvga_la_SOURCES= d_copy.S in_common.c in_svgalib.c vid.c vid_common_sw.c \ vid_svgalib.c -libQFx11_la_LDFLAGS= -version-info 1:0:0 +libQFx11_la_LDFLAGS= -version-info 1:0:0 $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(X_SHM_LIB) libQFx11_la_SOURCES= in_common.c in_x11.c vid.c context_x11.c dga_check.c \ vid_common_sw.c vid_x11.c -libQFglx_la_LDFLAGS= -version-info 1:0:0 +libQFglx_la_LDFLAGS= -version-info 1:0:0 $(GLX_LIBS) $(X_PRE_LIBS) $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) libQFglx_la_SOURCES= in_common.c in_x11.c vid.c context_x11.c dga_check.c \ - vid_common_gl.c vid_glx.c + qfgl_ext.c vid_common_gl.c vid_glx.c libQFsgl_la_LDFLAGS= -version-info 1:0:0 -libQFsgl_la_SOURCES= in_common.c in_sdl.c vid.c vid_common_gl.c vid_sgl.c +libQFsgl_la_SOURCES= in_common.c in_sdl.c qfgl_ext.c vid.c vid_common_gl.c vid_sgl.c libQFtdfx_la_LDFLAGS= -version-info 1:0:0 -libQFtdfx_la_SOURCES= in_common.c in_svgalib.c vid.c vid_common_gl.c vid_3dfxsvga.c +libQFtdfx_la_SOURCES= in_common.c in_svgalib.c qfgl_ext.c vid.c vid_common_gl.c vid_3dfxsvga.c libQFwgl_la_LDFLAGS= -version-info 1:0:0 -libQFwgl_la_SOURCES= in_common.c in_win.c vid.c vid_wgl.c +libQFwgl_la_SOURCES= in_common.c in_win.c qfgl_ext.c vid.c vid_wgl.c LIBLIST = $(lib_LTLIBRARIES) @LIBRARY_SEARCH_PATH@ diff --git a/libs/video/targets/in_common.c b/libs/video/targets/in_common.c index 7440d47e2..fb81ff18c 100644 --- a/libs/video/targets/in_common.c +++ b/libs/video/targets/in_common.c @@ -153,3 +153,8 @@ IN_Init_Cvars (void) "mouse sensitivity multiplier"); IN_LL_Init_Cvars (); } + +void +IN_HandlePause (qboolean paused) +{ +} diff --git a/qw/source/qfgl_ext.c b/libs/video/targets/qfgl_ext.c similarity index 100% rename from qw/source/qfgl_ext.c rename to libs/video/targets/qfgl_ext.c diff --git a/libs/video/targets/vid.c b/libs/video/targets/vid.c index 6f614cdd5..7366715aa 100644 --- a/libs/video/targets/vid.c +++ b/libs/video/targets/vid.c @@ -175,3 +175,8 @@ VID_InitGamma (unsigned char *pal) VID_BuildGammaTable (vid_gamma->value); } + +void +VID_HandlePause (qboolean paused) +{ +} diff --git a/libs/video/targets/vid_common_gl.c b/libs/video/targets/vid_common_gl.c index c67659fc3..3ffe9b55a 100644 --- a/libs/video/targets/vid_common_gl.c +++ b/libs/video/targets/vid_common_gl.c @@ -64,6 +64,10 @@ unsigned char d_15to8table[65536]; cvar_t *vid_mode; extern byte gammatable[256]; +QF_glActiveTextureARB qglActiveTexture = NULL; +QF_glMultiTexCoord2fARB qglMultiTexCoord2f = NULL; +int gl_filter_min = GL_LINEAR_MIPMAP_NEAREST, gl_filter_max = GL_LINEAR; + /*-----------------------------------------------------------------------*/ int texture_extension_number = 1; @@ -85,8 +89,6 @@ cvar_t *vid_use8bit; cvar_t *brightness; cvar_t *contrast; -extern int gl_filter_min, gl_filter_max; - /*-----------------------------------------------------------------------*/ void diff --git a/nq/include/draw.h b/nq/include/draw.h index e24bc76f0..c0d0e5920 100644 --- a/nq/include/draw.h +++ b/nq/include/draw.h @@ -29,7 +29,7 @@ #ifndef __draw_h #define __draw_h -#include "wad.h" +#include "QF/wad.h" extern qpic_t *draw_disc; // also used on sbar diff --git a/nq/source/cl_input.c b/nq/source/cl_input.c index 8286522fa..acdc8fc4b 100644 --- a/nq/source/cl_input.c +++ b/nq/source/cl_input.c @@ -33,13 +33,15 @@ #include #include "QF/msg.h" -#include "host.h" -#include "client.h" #include "QF/cmd.h" #include "QF/console.h" #include "QF/compat.h" +#include "QF/keys.h" #include "QF/input.h" +#include "host.h" +#include "client.h" + /* =============================================================================== diff --git a/nq/source/cl_main.c b/nq/source/cl_main.c index 8a1c6e64e..66c521e3f 100644 --- a/nq/source/cl_main.c +++ b/nq/source/cl_main.c @@ -42,9 +42,11 @@ #include "host.h" #include "server.h" #include "QF/console.h" -#include "screen.h" +#include "QF/screen.h" #include "QF/cmd.h" +byte *vid_colormap; + // we need to declare some mouse variables here, because the menu system // references them even when on a unix system. diff --git a/nq/source/cl_parse.c b/nq/source/cl_parse.c index ab87bedb8..1e63276f5 100644 --- a/nq/source/cl_parse.c +++ b/nq/source/cl_parse.c @@ -41,7 +41,7 @@ #include "QF/msg.h" #include "QF/sys.h" #include "sbar.h" -#include "screen.h" +#include "QF/screen.h" #include "server.h" #include "QF/sound.h" // FIXME: DEFAULT_SOUND_PACKET_* #include "game.h" diff --git a/nq/source/console.c b/nq/source/console.c index 6d6633751..5a1b38c19 100644 --- a/nq/source/console.c +++ b/nq/source/console.c @@ -46,7 +46,7 @@ #include "QF/input.h" #include "QF/keys.h" #include "QF/qargs.h" -#include "screen.h" +#include "QF/screen.h" #include "QF/sys.h" #include "QF/va.h" diff --git a/nq/source/gl_draw.c b/nq/source/gl_draw.c index 9f692c47b..9b318eb2c 100644 --- a/nq/source/gl_draw.c +++ b/nq/source/gl_draw.c @@ -42,7 +42,7 @@ #include "QF/mathlib.h" // needed by: protocol.h, render.h, // client.h, // modelgen.h, glmodel.h -#include "wad.h" +#include "QF/wad.h" #include "draw.h" #include "QF/cvar.h" #include "net.h" // needed by: client.h diff --git a/nq/source/gl_refrag.c b/nq/source/gl_refrag.c index d7c54275e..85a32f76e 100644 --- a/nq/source/gl_refrag.c +++ b/nq/source/gl_refrag.c @@ -32,9 +32,11 @@ #include "render.h" #include "QF/model.h" -#include "client.h" #include "QF/sys.h" #include "QF/console.h" + +#include "client.h" +#include "d_iface.h" #include "glquake.h" mnode_t *r_pefragtopnode; diff --git a/nq/source/gl_rmisc.c b/nq/source/gl_rmisc.c index 472a8f702..a94b0f2fe 100644 --- a/nq/source/gl_rmisc.c +++ b/nq/source/gl_rmisc.c @@ -41,7 +41,7 @@ #include "QF/mathlib.h" // needed by: protocol.h, render.h, // client.h, // modelgen.h, glmodel.h -#include "wad.h" +#include "QF/wad.h" #include "draw.h" #include "QF/cvar.h" #include "net.h" // needed by: client.h @@ -56,6 +56,8 @@ #include "glquake.h" #include "r_local.h" +extern entity_t r_worldentity; + qboolean VID_Is8bit (void); void R_InitBubble (); void R_FireColor_f (void); diff --git a/nq/source/gl_rsurf.c b/nq/source/gl_rsurf.c index 38bab6650..05b0e753e 100644 --- a/nq/source/gl_rsurf.c +++ b/nq/source/gl_rsurf.c @@ -44,7 +44,7 @@ #include "QF/mathlib.h" // needed by: protocol.h, render.h, // client.h, // modelgen.h, glmodel.h -#include "wad.h" +#include "QF/wad.h" #include "draw.h" #include "QF/cvar.h" #include "net.h" // needed by: client.h diff --git a/nq/source/gl_screen.c b/nq/source/gl_screen.c index 5252d1010..d99c3baa4 100644 --- a/nq/source/gl_screen.c +++ b/nq/source/gl_screen.c @@ -44,7 +44,7 @@ #include "QF/mathlib.h" // needed by: protocol.h, render.h, // client.h, // modelgen.h, glmodel.h -#include "wad.h" +#include "QF/wad.h" #include "draw.h" #include "QF/cvar.h" #include "net.h" // needed by: client.h @@ -53,7 +53,8 @@ #include "QF/cmd.h" #include "sbar.h" #include "QF/sound.h" -#include "screen.h" +#include "QF/screen.h" +#include "r_local.h" #include "render.h" // needed by: client.h, gl_model.h, // glquake.h #include "client.h" // need cls in this file @@ -415,7 +416,7 @@ SCR_Init ================== */ void -SCR_InitCvars (void) +SCR_Init_Cvars (void) { scr_fov = Cvar_Get ("fov", "90", CVAR_NONE, NULL, "10 - 170"); scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE, NULL, "None"); diff --git a/nq/source/gl_warp.c b/nq/source/gl_warp.c index 9014f31a7..dcc6bebdb 100644 --- a/nq/source/gl_warp.c +++ b/nq/source/gl_warp.c @@ -43,8 +43,11 @@ #include "QF/console.h" #include "QF/model.h" #include "QF/quakefs.h" -#include "glquake.h" #include "QF/sys.h" +#include "QF/vid.h" + +#include "glquake.h" +#include "render.h" extern double realtime; extern model_t *loadmodel; @@ -476,7 +479,7 @@ R_LoadSkys */ char *suf[6] = { "rt", "bk", "lf", "ft", "up", "dn" }; void -R_LoadSkys (char *skyname) +R_LoadSkys (const char *skyname) { int i; QFile *f; diff --git a/nq/source/host.c b/nq/source/host.c index 8e8219945..9c55b8ebc 100644 --- a/nq/source/host.c +++ b/nq/source/host.c @@ -49,7 +49,7 @@ #include "QF/vid.h" #include "draw.h" #include "QF/input.h" -#include "screen.h" +#include "QF/screen.h" #include "gib.h" #include "sv_progs.h" @@ -927,7 +927,7 @@ Host_Init (quakeparms_t *parms) V_Init (); S_Init_Cvars (); - SCR_InitCvars (); + SCR_Init_Cvars (); VID_Init_Cvars (); COM_Init (); diff --git a/nq/source/host_cmd.c b/nq/source/host_cmd.c index d7c4f3ba6..f16ab2f33 100644 --- a/nq/source/host_cmd.c +++ b/nq/source/host_cmd.c @@ -37,7 +37,7 @@ #include "QF/compat.h" #include "world.h" #include "QF/va.h" -#include "screen.h" +#include "QF/screen.h" #include "QF/msg.h" #include "QF/model.h" #include "QF/console.h" diff --git a/nq/source/keys.c b/nq/source/keys.c index d913da01b..99b288cd2 100644 --- a/nq/source/keys.c +++ b/nq/source/keys.c @@ -48,7 +48,7 @@ #include "QF/console.h" #include "QF/cvar.h" #include "QF/keys.h" -#include "screen.h" +#include "QF/screen.h" #include "QF/sys.h" /* diff --git a/nq/source/net_dgrm.c b/nq/source/net_dgrm.c index 0ba0c3b27..7a3a2bf42 100644 --- a/nq/source/net_dgrm.c +++ b/nq/source/net_dgrm.c @@ -36,13 +36,14 @@ #include "QF/cmd.h" #include "QF/sys.h" #include "QF/keys.h" -#include "client.h" -#include "server.h" #include "QF/qendian.h" #include "QF/msg.h" #include "QF/qargs.h" -#include "screen.h" +#include "QF/screen.h" #include "QF/console.h" + +#include "client.h" +#include "server.h" #include "net.h" #include "game.h" #include "sv_progs.h" diff --git a/nq/source/r_view.c b/nq/source/r_view.c index edeb8af2a..24acf1feb 100644 --- a/nq/source/r_view.c +++ b/nq/source/r_view.c @@ -36,7 +36,7 @@ #include "QF/cmd.h" #include "chase.h" #include "draw.h" -#include "screen.h" +#include "QF/screen.h" #include "QF/console.h" #include "QF/msg.h" diff --git a/nq/source/sbar.c b/nq/source/sbar.c index 5207cc6c1..637622f89 100644 --- a/nq/source/sbar.c +++ b/nq/source/sbar.c @@ -38,8 +38,8 @@ #include "QF/vid.h" #include "QF/va.h" #include "draw.h" -#include "wad.h" -#include "screen.h" +#include "QF/wad.h" +#include "QF/screen.h" #include "client.h" #include "server.h" diff --git a/nq/source/screen.c b/nq/source/screen.c index 2d653dcf6..5784ca1d4 100644 --- a/nq/source/screen.c +++ b/nq/source/screen.c @@ -34,7 +34,7 @@ #include "r_local.h" #include "QF/cmd.h" #include "QF/compat.h" -#include "screen.h" +#include "QF/screen.h" #include "sbar.h" #include "QF/input.h" #include "view.h" @@ -91,7 +91,7 @@ qboolean block_drawing; void SCR_ScreenShot_f (void); void -SCR_InitCvars (void) +SCR_Init_Cvars (void) { } diff --git a/nq/source/sw_rmain.c b/nq/source/sw_rmain.c index 0f9ee8435..78f9e81fb 100644 --- a/nq/source/sw_rmain.c +++ b/nq/source/sw_rmain.c @@ -35,7 +35,7 @@ #include "QF/console.h" #include "view.h" #include "QF/cmd.h" -#include "screen.h" +#include "QF/screen.h" #include "chase.h" //define PASSAGES diff --git a/nq/source/wad.c b/nq/source/wad.c index bec02015d..841eea815 100644 --- a/nq/source/wad.c +++ b/nq/source/wad.c @@ -31,7 +31,7 @@ #endif #include "QF/qendian.h" -#include "wad.h" +#include "QF/wad.h" #include "QF/sys.h" #include "QF/quakefs.h" diff --git a/qw/include/r_local.h b/qw/include/r_local.h index 0447d8f3c..ff3448773 100644 --- a/qw/include/r_local.h +++ b/qw/include/r_local.h @@ -327,6 +327,6 @@ void R_ClipEdge (mvertex_t *pv0, mvertex_t *pv1, clipplane_t *clip); void R_SplitEntityOnNode2 (mnode_t *node); void R_MarkLights (vec3_t lightorigin, dlight_t *light, int bit, mnode_t *node); -void R_LoadSkys (char *); +void R_LoadSkys (const char *); #endif // _R_LOCAL_H diff --git a/qw/include/render.h b/qw/include/render.h index 605522aaf..c1ec65532 100644 --- a/qw/include/render.h +++ b/qw/include/render.h @@ -152,6 +152,6 @@ void D_DeleteSurfaceCache (void); void D_InitCaches (void *buffer, int size); void R_SetVrect (vrect_t *pvrect, vrect_t *pvrectin, int lineadj); -void R_LoadSkys (char *); +void R_LoadSkys (const char *); #endif // _RENDER_H diff --git a/qw/include/skin.h b/qw/include/skin.h index ce9f1e87f..1c0688b53 100644 --- a/qw/include/skin.h +++ b/qw/include/skin.h @@ -29,6 +29,8 @@ #ifndef _SKIN_H #define _SKIN_H +#include "client.h" + #define MAX_CACHED_SKINS 128 #define RSSHOT_WIDTH 320 diff --git a/qw/source/Makefile.am b/qw/source/Makefile.am index 8bc07f96c..574d8cc61 100644 --- a/qw/source/Makefile.am +++ b/qw/source/Makefile.am @@ -163,7 +163,7 @@ ogl_SOURCES= noisetextures.c gl_textures.c gl_draw.c gl_dyn_fires.c \ gl_rlight.c gl_rmain.c gl_rmisc.c gl_rsurf.c \ gl_screen.c gl_skin.c gl_sky.c gl_sky_clip.c gl_view.c \ gl_warp.c gl_model_alias.c gl_model_brush.c \ - gl_model_fullbright.c gl_model_sprite.c qfgl_ext.c + gl_model_fullbright.c gl_model_sprite.c # ... 3Dfx Voodoo 1 and 2 SVGAlib-based console GL qw_client_3dfx_SOURCES= $(common_SOURCES) $(client_SOURCES) $(ogl_SOURCES) diff --git a/qw/source/gl_dyn_part.c b/qw/source/gl_dyn_part.c index 993059187..d95d1984f 100644 --- a/qw/source/gl_dyn_part.c +++ b/qw/source/gl_dyn_part.c @@ -41,11 +41,14 @@ #include "QF/cmd.h" #include "QF/compat.h" #include "QF/console.h" +#include "QF/qargs.h" +#include "QF/sys.h" + +#include "client.h" #include "glquake.h" #include "host.h" #include "r_dynamic.h" -#include "QF/qargs.h" -#include "QF/sys.h" +#include "render.h" typedef enum { pt_static, pt_grav, pt_blob, pt_blob2, diff --git a/qw/source/gl_ngraph.c b/qw/source/gl_ngraph.c index d7d654513..9bd08f856 100644 --- a/qw/source/gl_ngraph.c +++ b/qw/source/gl_ngraph.c @@ -38,9 +38,12 @@ #include -#include "cl_parse.h" #include "QF/compat.h" #include "QF/cvar.h" +#include "QF/vid.h" + +#include "cl_parse.h" +#include "client.h" #include "draw.h" #include "glquake.h" #include "sbar.h" diff --git a/qw/source/gl_rlight.c b/qw/source/gl_rlight.c index 303899d3b..26d12418e 100644 --- a/qw/source/gl_rlight.c +++ b/qw/source/gl_rlight.c @@ -39,7 +39,9 @@ #include #include +#include "client.h" #include "glquake.h" +#include "r_shared.h" /* R_AnimateLight diff --git a/qw/source/gl_rmain.c b/qw/source/gl_rmain.c index 86b9e1f3a..01b491924 100644 --- a/qw/source/gl_rmain.c +++ b/qw/source/gl_rmain.c @@ -46,6 +46,8 @@ #include "QF/qargs.h" #include "QF/sound.h" #include "QF/sys.h" +#include "QF/vid.h" + #include "bothdefs.h" #include "cl_cam.h" #include "cl_main.h" @@ -54,8 +56,8 @@ #include "glquake.h" #include "locs.h" #include "r_dynamic.h" +#include "r_local.h" #include "skin.h" -#include "QF/vid.h" #include "view.h" entity_t r_worldentity; @@ -1053,7 +1055,7 @@ R_SetFrustum (void) /* R_SetupFrame */ -static void +void R_SetupFrame (void) { // don't allow cheats in multiplayer diff --git a/qw/source/gl_rmisc.c b/qw/source/gl_rmisc.c index 1a6d35525..c54053f23 100644 --- a/qw/source/gl_rmisc.c +++ b/qw/source/gl_rmisc.c @@ -41,12 +41,14 @@ #include "QF/cmd.h" #include "QF/console.h" #include "QF/cvar.h" -#include "glquake.h" -#include "r_dynamic.h" -#include "skin.h" #include "QF/sys.h" #include "QF/vid.h" +#include "glquake.h" +#include "r_dynamic.h" +#include "r_local.h" +#include "skin.h" + qboolean VID_Is8bit (void); void R_InitBubble (void); diff --git a/qw/source/gl_rsurf.c b/qw/source/gl_rsurf.c index d3e6954d5..5c734b880 100644 --- a/qw/source/gl_rsurf.c +++ b/qw/source/gl_rsurf.c @@ -40,10 +40,14 @@ #include #include -#include "glquake.h" #include "QF/compat.h" #include "QF/sys.h" +#include "client.h" +#include "glquake.h" +#include "r_local.h" +#include "r_shared.h" + qboolean r_cache_thrash; // extern cvar_t *gl_lightmap_align; @@ -353,9 +357,6 @@ extern int solidskytexture; extern int alphaskytexture; extern float speedscale; // for top sky and bottom sky -QF_glActiveTextureARB qglActiveTexture = NULL; -QF_glMultiTexCoord2fARB qglMultiTexCoord2f = NULL; - void GL_UploadLightmap (int i, int x, int y, int w, int h) { diff --git a/qw/source/gl_screen.c b/qw/source/gl_screen.c index 4b290e931..4e0089564 100644 --- a/qw/source/gl_screen.c +++ b/qw/source/gl_screen.c @@ -38,18 +38,20 @@ #include -#include "cl_parse.h" #include "QF/cmd.h" #include "QF/compat.h" #include "QF/console.h" +#include "QF/keys.h" +#include "QF/sys.h" + +#include "cl_parse.h" #include "draw.h" #include "glquake.h" #include "host.h" -#include "QF/keys.h" #include "pcx.h" +#include "r_local.h" #include "sbar.h" #include "skin.h" -#include "QF/sys.h" #include "tga.h" #include "view.h" diff --git a/qw/source/gl_sky.c b/qw/source/gl_sky.c index dedd1cc21..ce03e2bfa 100644 --- a/qw/source/gl_sky.c +++ b/qw/source/gl_sky.c @@ -38,7 +38,11 @@ #include "QF/compat.h" #include "QF/console.h" +#include "QF/quakefs.h" +#include "QF/vid.h" + #include "glquake.h" +#include "render.h" #include "tga.h" #include "view.h" @@ -60,7 +64,7 @@ qboolean skyloaded = false; */ char *suf[6] = { "rt", "bk", "lf", "ft", "up", "dn" }; void -R_LoadSkys (char *skyname) +R_LoadSkys (const char *skyname) { int i; QFile *f; diff --git a/qw/source/gl_sky_clip.c b/qw/source/gl_sky_clip.c index 673839122..8ae69ea98 100644 --- a/qw/source/gl_sky_clip.c +++ b/qw/source/gl_sky_clip.c @@ -39,8 +39,10 @@ #include #include "QF/console.h" -#include "glquake.h" #include "QF/sys.h" + +#include "client.h" +#include "glquake.h" #include "view.h" extern qboolean skyloaded; diff --git a/qw/source/gl_textures.c b/qw/source/gl_textures.c index 2b3558774..40849ae77 100644 --- a/qw/source/gl_textures.c +++ b/qw/source/gl_textures.c @@ -49,6 +49,7 @@ #include "QF/sys.h" #include "QF/vid.h" +extern int gl_filter_min, gl_filter_max; extern unsigned char d_15to8table[65536]; extern cvar_t *gl_picmip; @@ -169,10 +170,8 @@ static glformat_t formats[] = { {"GL_RGBA16", GL_RGBA16} }; -int gl_filter_min = GL_LINEAR_MIPMAP_NEAREST, gl_filter_max = GL_LINEAR; int gl_alpha_format = 4, gl_lightmap_format = 4, gl_solid_format = 3; - void GL_TextureMode_f (void) { diff --git a/qw/source/gl_view.c b/qw/source/gl_view.c index 90807deb6..7686ae160 100644 --- a/qw/source/gl_view.c +++ b/qw/source/gl_view.c @@ -38,10 +38,12 @@ #include +#include "QF/compat.h" + #include "bothdefs.h" +#include "client.h" #include "glquake.h" #include "view.h" -#include "QF/compat.h" extern byte *vid_basepal; diff --git a/qw/source/sw_rsky.c b/qw/source/sw_rsky.c index bfc22c3e5..f02ac2c9b 100644 --- a/qw/source/sw_rsky.c +++ b/qw/source/sw_rsky.c @@ -278,6 +278,6 @@ R_SetSkyFrame (void) skyboxes in GL targets, so we just do nothing here. --KB */ void -R_LoadSkys (char *name) +R_LoadSkys (const char *name) { }