From 37a93b3e910bb3aef564daabb730b6b37758f81e Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Wed, 9 May 2001 22:40:51 +0000 Subject: [PATCH] Merge draw.h. --- {qw/include => include/QF}/draw.h | 4 +- nq/include/Makefile.am | 10 +-- nq/include/draw.h | 56 -------------- nq/source/console.c | 7 +- nq/source/draw.c | 9 ++- nq/source/gl_draw.c | 8 +- nq/source/gl_rmisc.c | 2 +- nq/source/gl_rsurf.c | 66 +++++++--------- nq/source/gl_screen.c | 106 +++++++++++-------------- nq/source/gl_textures.c | 7 +- nq/source/host.c | 4 +- nq/source/r_view.c | 123 ++++++++---------------------- nq/source/sbar.c | 103 +++++-------------------- nq/source/screen.c | 112 ++++++++------------------- nq/source/sw_view.c | 24 +++--- qw/include/Makefile.am | 4 +- qw/source/cl_main.c | 63 +++++++-------- qw/source/console.c | 42 ++++------ qw/source/draw.c | 59 +++++--------- qw/source/gl_draw.c | 17 +++-- qw/source/gl_ngraph.c | 7 +- qw/source/gl_screen.c | 10 ++- qw/source/gl_textures.c | 9 ++- qw/source/sbar.c | 90 ++++++++-------------- qw/source/screen.c | 11 +-- qw/source/sw_rmisc.c | 47 +++--------- 26 files changed, 324 insertions(+), 676 deletions(-) rename {qw/include => include/QF}/draw.h (100%) delete mode 100644 nq/include/draw.h diff --git a/qw/include/draw.h b/include/QF/draw.h similarity index 100% rename from qw/include/draw.h rename to include/QF/draw.h index bb55430ba..1fe613821 100644 --- a/qw/include/draw.h +++ b/include/QF/draw.h @@ -36,12 +36,13 @@ extern qpic_t *draw_disc; // also used on sbar void Draw_Init (void); void Draw_Init_Cvars (void); void Draw_Character8 (int x, int y, int num); -void Draw_SubPic(int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height); void Draw_Pic (int x, int y, qpic_t *pic); +void Draw_SubPic(int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height); void Draw_TextBox (int x, int y, int width, int lines); void Draw_TransPic (int x, int y, qpic_t *pic); void Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte *translation); void Draw_ConsoleBackground (int lines); +void Draw_Crosshair(void); void Draw_BeginDisc (void); void Draw_EndDisc (void); void Draw_TileClear (int x, int y, int w, int h); @@ -51,6 +52,5 @@ void Draw_String8 (int x, int y, char *str); void Draw_AltString8 (int x, int y, char *str); qpic_t *Draw_PicFromWad (char *name); qpic_t *Draw_CachePic (char *path, qboolean alpha); -void Draw_Crosshair(void); #endif // _DRAW_H diff --git a/nq/include/Makefile.am b/nq/include/Makefile.am index 60a5b6ab2..6e3fe368a 100644 --- a/nq/include/Makefile.am +++ b/nq/include/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in EXTRA_DIST= chase.h client.h config.h.in conproc.h d_iface.h d_ifacea.h \ - d_local.h draw.h game.h glquake2.h host.h mpdosock.h net.h \ - net_bw.h net_dgrm.h net_ipx.h net_loop.h net_mp.h net_ser.h \ - net_udp.h net_vcr.h net_wins.h net_wipx.h progdefs.h \ - progdefs.q1 progdefs.q2 protocol.h r_local.h r_shared.h \ - render.h resource.h server.h sv_pr_cmds.h sv_progs.h world.h + d_local.h game.h glquake2.h host.h mpdosock.h net.h net_bw.h \ + net_dgrm.h net_ipx.h net_loop.h net_mp.h net_ser.h net_udp.h \ + net_vcr.h net_wins.h net_wipx.h progdefs.h progdefs.q1 \ + progdefs.q2 protocol.h r_local.h r_shared.h render.h \ + resource.h server.h sv_pr_cmds.h sv_progs.h world.h diff --git a/nq/include/draw.h b/nq/include/draw.h deleted file mode 100644 index fbea6b36c..000000000 --- a/nq/include/draw.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - draw.h - - Video buffer handling definitions and prototypes - - Copyright (C) 1996-1997 Id Software, Inc. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to: - - Free Software Foundation, Inc. - 59 Temple Place - Suite 330 - Boston, MA 02111-1307, USA - - $Id$ -*/ - -#ifndef __draw_h -#define __draw_h - -#include "QF/wad.h" - -extern qpic_t *draw_disc; // also used on sbar - -void Draw_Init (void); -void Draw_Init_Cvars (void); -void Draw_Character8 (int x, int y, int num); -void Draw_DebugChar (char num); -void Draw_Pic (int x, int y, qpic_t *pic); -void Draw_SubPic(int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height); -void Draw_TransPic (int x, int y, qpic_t *pic); -void Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte *translation); -void Draw_ConsoleBackground (int lines); -void Draw_BeginDisc (void); -void Draw_EndDisc (void); -void Draw_TileClear (int x, int y, int w, int h); -void Draw_Fill (int x, int y, int w, int h, int c); -void Draw_FadeScreen (void); -void Draw_String8 (int x, int y, char *str); -void Draw_Crosshair(void); -qpic_t *Draw_PicFromWad (char *name); -qpic_t *Draw_CachePic (char *path, qboolean alpha); -void Draw_Crosshair(void); - -#endif // __draw_h diff --git a/nq/source/console.c b/nq/source/console.c index 5a1b38c19..a5693cab7 100644 --- a/nq/source/console.c +++ b/nq/source/console.c @@ -38,11 +38,9 @@ #include -#include "client.h" #include "QF/cmd.h" #include "QF/console.h" -#include "draw.h" -#include "host.h" +#include "QF/draw.h" #include "QF/input.h" #include "QF/keys.h" #include "QF/qargs.h" @@ -50,6 +48,9 @@ #include "QF/sys.h" #include "QF/va.h" +#include "client.h" +#include "host.h" + int con_ormask; console_t con_main; console_t con_chat; diff --git a/nq/source/draw.c b/nq/source/draw.c index 504215e1c..d409d8574 100644 --- a/nq/source/draw.c +++ b/nq/source/draw.c @@ -30,13 +30,14 @@ # include "config.h" #endif -#include "draw.h" +#include "QF/draw.h" +#include "QF/quakefs.h" +#include "QF/sound.h" +#include "QF/sys.h" #include "QF/vid.h" #include "QF/zone.h" -#include "QF/sys.h" -#include "QF/quakefs.h" + #include "d_iface.h" -#include "QF/sound.h" typedef struct { vrect_t rect; diff --git a/nq/source/gl_draw.c b/nq/source/gl_draw.c index 5ac7c7211..ff0eb1efc 100644 --- a/nq/source/gl_draw.c +++ b/nq/source/gl_draw.c @@ -38,17 +38,17 @@ #include -#include "client.h" #include "QF/cmd.h" #include "QF/console.h" -#include "draw.h" -#include "glquake.h" -#include "sbar.h" +#include "QF/draw.h" #include "QF/screen.h" #include "QF/sys.h" #include "QF/vid.h" #include "QF/va.h" +#include "client.h" +#include "glquake.h" +#include "sbar.h" extern byte *vid_basepal; extern cvar_t *crosshair, *cl_crossx, *cl_crossy, *crosshaircolor, diff --git a/nq/source/gl_rmisc.c b/nq/source/gl_rmisc.c index 5fef77da3..20ab7d4db 100644 --- a/nq/source/gl_rmisc.c +++ b/nq/source/gl_rmisc.c @@ -41,6 +41,7 @@ #include "QF/cmd.h" #include "QF/console.h" #include "QF/cvar.h" +#include "QF/draw.h" #include "QF/mathlib.h" #include "QF/model.h" #include "QF/sys.h" @@ -49,7 +50,6 @@ #include "QF/wad.h" #include "client.h" -#include "draw.h" #include "glquake.h" #include "net.h" #include "protocol.h" diff --git a/nq/source/gl_rsurf.c b/nq/source/gl_rsurf.c index 455c49688..b5214321e 100644 --- a/nq/source/gl_rsurf.c +++ b/nq/source/gl_rsurf.c @@ -40,23 +40,24 @@ #include #include -#include "QF/compat.h" -#include "r_local.h" -#include "QF/qargs.h" -#include "QF/vid.h" -#include "QF/sys.h" -#include "QF/mathlib.h" -#include "QF/wad.h" -#include "draw.h" -#include "QF/cvar.h" -#include "protocol.h" #include "QF/cmd.h" -#include "sbar.h" -#include "render.h" -#include "client.h" -#include "QF/model.h" +#include "QF/compat.h" #include "QF/console.h" +#include "QF/cvar.h" +#include "QF/draw.h" +#include "QF/mathlib.h" +#include "QF/model.h" +#include "QF/qargs.h" +#include "QF/sys.h" +#include "QF/vid.h" +#include "QF/wad.h" + +#include "protocol.h" +#include "client.h" #include "glquake.h" +#include "r_local.h" +#include "render.h" +#include "sbar.h" extern double realtime; int skytexturenum; @@ -138,6 +139,7 @@ R_ForceLightUpdate () LordHavoc: completely rewrote this, relies on 64bit integer math... */ + int dlightdivtable[8192]; int dlightdivtableinitialized = 0; @@ -366,11 +368,9 @@ R_BuildLightMap (msurface_t *surf, byte * dest, int stride) /* -=============== -R_TextureAnimation + R_TextureAnimation -Returns the proper texture for a given time and base texture -=============== + Returns the proper texture for a given time and base texture */ texture_t * R_TextureAnimation (texture_t *base) @@ -402,11 +402,7 @@ R_TextureAnimation (texture_t *base) /* -============================================================= - BRUSH MODELS - -============================================================= */ @@ -427,12 +423,10 @@ GL_UploadLightmap (int i, int x, int y, int w, int h) /* -================ -R_DrawSequentialPoly + R_DrawSequentialPoly -Systems that have fast state and texture changes can -just do everything as it passes with no need to sort -================ + Systems that have fast state and texture changes can + just do everything as it passes with no need to sort */ void R_DrawMultitexturePoly (msurface_t *s) @@ -828,12 +822,9 @@ R_DrawBrushModel (entity_t *e) glPopMatrix (); } + /* -============================================================= - WORLD MODEL - -============================================================= */ @@ -1016,13 +1007,10 @@ R_MarkLeaves (void) /* -============================================================================= - LIGHTMAP ALLOCATION - -============================================================================= */ + // returns a texture number and the position inside it int AllocBlock (int w, int h, int *x, int *y) @@ -1203,12 +1191,10 @@ GL_CreateSurfaceLightmap (msurface_t *surf) /* -================== -GL_BuildLightmaps + GL_BuildLightmaps -Builds the lightmap texture -with all the surfaces from all brush models -================== + Builds the lightmap texture + with all the surfaces from all brush models */ void GL_BuildLightmaps (void) diff --git a/nq/source/gl_screen.c b/nq/source/gl_screen.c index bff24eecd..049a3fa52 100644 --- a/nq/source/gl_screen.c +++ b/nq/source/gl_screen.c @@ -41,30 +41,31 @@ #include #include +#include "QF/cmd.h" +#include "QF/console.h" #include "QF/compat.h" -#include "QF/input.h" -#include "QF/qendian.h" -#include "QF/vid.h" -#include "QF/sys.h" -#include "QF/mathlib.h" -#include "QF/wad.h" -#include "draw.h" #include "QF/cvar.h" +#include "QF/draw.h" +#include "QF/input.h" +#include "QF/keys.h" +#include "QF/mathlib.h" +#include "QF/model.h" +#include "QF/qendian.h" +#include "QF/screen.h" +#include "QF/sound.h" +#include "QF/sys.h" +#include "QF/vid.h" +#include "QF/wad.h" + +#include "client.h" +#include "glquake.h" #include "net.h" #include "protocol.h" -#include "QF/keys.h" -#include "QF/cmd.h" -#include "sbar.h" -#include "QF/sound.h" -#include "QF/screen.h" #include "r_local.h" #include "render.h" -#include "client.h" -#include "QF/model.h" -#include "QF/console.h" -#include "glquake.h" +#include "sbar.h" #include "view.h" -#include "client.h" + /* @@ -109,7 +110,6 @@ console is: notify lines half full - */ @@ -164,11 +164,7 @@ qboolean block_drawing; void SCR_ScreenShot_f (void); /* -=============================================================================== - -CENTER PRINTING - -=============================================================================== + CENTER PRINTING */ char scr_centerstring[1024]; @@ -180,12 +176,10 @@ int scr_erase_center; /* -============== -SCR_CenterPrint + SCR_CenterPrint -Called for important messages that should stay in the center of the screen -for a few moments -============== + Called for important messages that should stay in the center of the + screen for a few moments */ void SCR_CenterPrint (char *str) @@ -291,12 +285,10 @@ CalcFov (float fov_x, float width, float height) /* -================= -SCR_CalcRefdef + SCR_CalcRefdef -Must be called whenever vid changes -Internal use only -================= + Must be called whenever vid changes + Internal use only */ static void SCR_CalcRefdef (void) @@ -381,11 +373,9 @@ SCR_CalcRefdef (void) /* -================= -SCR_SizeUp_f + SCR_SizeUp_f -Keybinding command -================= + Keybinding command */ void SCR_SizeUp_f (void) @@ -396,11 +386,9 @@ SCR_SizeUp_f (void) /* -================= -SCR_SizeDown_f + SCR_SizeDown_f -Keybinding command -================= + Keybinding command */ void SCR_SizeDown_f (void) @@ -633,11 +621,7 @@ SCR_DrawConsole (void) /* -============================================================================== - - SCREEN SHOTS - -============================================================================== + SCREEN SHOTS */ typedef struct _TargaHeader { @@ -778,13 +762,12 @@ SCR_DrawNotifyString (void) } while (1); } -/* -================== -SCR_ModalMessage -Displays a text string in the center of the screen and waits for a Y or N -keypress. -================== +/* + SCR_ModalMessage + + Displays a text string in the center of the screen and waits + for a Y or N keypress. */ int SCR_ModalMessage (char *text) @@ -819,11 +802,9 @@ SCR_ModalMessage (char *text) /* -=============== -SCR_BringDownConsole + SCR_BringDownConsole -Brings the console down and fades the palettes back to normal -================ + Brings the console down and fades the palettes back to normal */ void SCR_BringDownConsole (void) @@ -875,16 +856,15 @@ unsigned char lighthalf_v[3]; qboolean lighthalf; extern cvar_t *gl_lightmode; + /* -================== -SCR_UpdateScreen + SCR_UpdateScreen -This is called every frame, and can also be called explicitly to flush -text to the screen. + This is called every frame, and can also be called explicitly to + flush text to the screen. -WARNING: be very careful calling this from elsewhere, because the refresh -needs almost the entire 256k of stack space! -================== + WARNING: be very careful calling this from elsewhere, because the + refresh needs almost the entire 256k of stack space! */ void SCR_UpdateScreen (void) diff --git a/nq/source/gl_textures.c b/nq/source/gl_textures.c index f0e42fa48..73362c558 100644 --- a/nq/source/gl_textures.c +++ b/nq/source/gl_textures.c @@ -43,12 +43,13 @@ #include "QF/compat.h" #include "QF/console.h" #include "QF/crc.h" -#include "draw.h" -#include "glquake.h" -#include "sbar.h" +#include "QF/draw.h" #include "QF/sys.h" #include "QF/vid.h" +#include "glquake.h" +#include "sbar.h" + extern int gl_filter_min, gl_filter_max; extern unsigned char d_15to8table[65536]; extern cvar_t *gl_picmip; diff --git a/nq/source/host.c b/nq/source/host.c index 91b5de450..089481707 100644 --- a/nq/source/host.c +++ b/nq/source/host.c @@ -35,6 +35,8 @@ #include "QF/compat.h" #include "QF/cmd.h" #include "QF/console.h" +#include "QF/draw.h" +#include "QF/gib.h" #include "QF/input.h" #include "QF/keys.h" #include "QF/msg.h" @@ -46,8 +48,6 @@ #include "QF/vid.h" #include "chase.h" -#include "draw.h" -#include "QF/gib.h" #include "host.h" #include "r_local.h" #include "sbar.h" diff --git a/nq/source/r_view.c b/nq/source/r_view.c index 24acf1feb..f3c5350d2 100644 --- a/nq/source/r_view.c +++ b/nq/source/r_view.c @@ -30,15 +30,17 @@ # include "config.h" #endif -#include "view.h" -#include "r_local.h" -#include "host.h" #include "QF/cmd.h" -#include "chase.h" -#include "draw.h" -#include "QF/screen.h" #include "QF/console.h" +#include "QF/draw.h" #include "QF/msg.h" +#include "QF/screen.h" + +#include "chase.h" +#include "host.h" +#include "r_local.h" +#include "view.h" + /* @@ -89,12 +91,7 @@ extern int in_forward, in_forward2, in_back; void BuildGammaTable (float, float); -/* -=============== -V_CalcBob -=============== -*/ float V_CalcBob (void) { @@ -157,8 +154,8 @@ V_StopPitchDrift (void) cl.pitchvel = 0; } + /* -=============== V_DriftPitch Moves the client pitch angle towards cl.idealpitch sent by the server. @@ -168,7 +165,6 @@ mlook and mouse, or klook and keyboard, pitch drifting is constantly stopped. Drifting is enabled when the center view key is hit, mlook is released and lookspring is non 0, or when -=============== */ void V_DriftPitch (void) @@ -225,11 +221,7 @@ V_DriftPitch (void) /* -============================================================================== - - PALETTE FLASHES - -============================================================================== + PALETTE FLASHES */ @@ -250,11 +242,7 @@ cvar_t *v_gamma; byte gammatable[256]; // palette is sent through this -/* -================= -V_CheckGamma -================= -*/ + qboolean V_CheckGamma (void) { @@ -273,11 +261,6 @@ V_CheckGamma (void) } -/* -=============== -V_ParseDamage -=============== -*/ void V_ParseDamage (void) { @@ -340,11 +323,6 @@ V_ParseDamage (void) } -/* -================== -V_cshift_f -================== -*/ void V_cshift_f (void) { @@ -356,11 +334,9 @@ V_cshift_f (void) /* -================== -V_BonusFlash_f + V_BonusFlash_f -When you run over an item, the server sends this command -================== + When you run over an item, the server sends this command */ void V_BonusFlash_f (void) @@ -371,12 +347,11 @@ V_BonusFlash_f (void) cl.cshifts[CSHIFT_BONUS].percent = 50; } -/* -============= -V_SetContentsColor -Underwater, lava, etc each has a color shift -============= +/* + V_SetContentsColor + + Underwater, lava, etc each has a color shift */ void V_SetContentsColor (int contents) @@ -397,11 +372,7 @@ V_SetContentsColor (int contents) } } -/* -============= -V_CalcPowerupCshift -============= -*/ + void V_CalcPowerupCshift (void) { @@ -431,11 +402,7 @@ V_CalcPowerupCshift (void) /* -============================================================================== - - VIEW RENDERING - -============================================================================== + VIEW RENDERING */ float @@ -447,11 +414,7 @@ angledelta (float a) return a; } -/* -================== -CalcGunAngle -================== -*/ + void CalcGunAngle (void) { @@ -506,11 +469,7 @@ CalcGunAngle (void) v_iyaw_level->value; } -/* -============== -V_BoundOffsets -============== -*/ + void V_BoundOffsets (void) { @@ -536,11 +495,9 @@ V_BoundOffsets (void) } /* -============== -V_AddIdle + V_AddIdle -Idle swaying -============== + Idle swaying */ void V_AddIdle (void) @@ -558,11 +515,9 @@ V_AddIdle (void) /* -============== -V_CalcViewRoll + V_CalcViewRoll -Roll is induced by movement and damage -============== + Roll is induced by movement and damage */ void V_CalcViewRoll (void) @@ -588,12 +543,6 @@ V_CalcViewRoll (void) } -/* -================== -V_CalcIntermissionRefdef - -================== -*/ void V_CalcIntermissionRefdef (void) { @@ -616,12 +565,7 @@ V_CalcIntermissionRefdef (void) Cvar_SetValue (v_idlescale, old); } -/* -================== -V_CalcRefdef -================== -*/ void V_CalcRefdef (void) { @@ -744,23 +688,16 @@ V_CalcRefdef (void) Chase_Update (); } -/* -================== -V_RenderView -The player's clipping box goes from (-16 -16 -24) to (16 16 32) from -the entity origin, so any view position inside that will be valid -================== +/* + V_RenderView + + The player's clipping box goes from (-16 -16 -24) to (16 16 32) from + the entity origin, so any view position inside that will be valid */ extern vrect_t scr_vrect; -//============================================================================ -/* -============= -V_Init -============= -*/ void V_Init (void) { diff --git a/nq/source/sbar.c b/nq/source/sbar.c index 844b70768..7a7f937e1 100644 --- a/nq/source/sbar.c +++ b/nq/source/sbar.c @@ -33,6 +33,7 @@ #include "QF/cmd.h" #include "QF/compat.h" +#include "QF/draw.h" #include "QF/screen.h" #include "QF/vid.h" #include "QF/va.h" @@ -40,7 +41,6 @@ #include "sbar.h" #include "game.h" -#include "draw.h" #include "client.h" #include "server.h" @@ -165,10 +165,10 @@ Sbar_Changed (void) /* - * Drawing Routines - * - * Sbar_Draw* routines are relative to the location of the status bar. - */ + Drawing Routines + + Sbar_Draw* routines are relative to the location of the status bar. +*/ /* @@ -186,12 +186,12 @@ Sbar_DrawPic (int x, int y, qpic_t *pic) Draw_Pic (x, y + (vid.height - SBAR_HEIGHT), pic); } + /* Sbar_DrawSubPic Draw a _portion_ of a texture. */ - void Sbar_DrawSubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height) @@ -220,6 +220,7 @@ Sbar_DrawTransPic (int x, int y, qpic_t *pic) Draw_Pic (x, y + (vid.height - SBAR_HEIGHT), pic); } + /* Sbar_DrawCharacter @@ -235,6 +236,7 @@ Sbar_DrawCharacter (int x, int y, int num) Draw_Character8 (x + 4, y + vid.height - SBAR_HEIGHT, num); } + /* Sbar_DrawString @@ -250,6 +252,7 @@ Sbar_DrawString (int x, int y, char *str) Draw_String8 (x, y + vid.height - SBAR_HEIGHT, str); } + /* Sbar_itoa @@ -284,11 +287,6 @@ Sbar_itoa (int num, char *buf) } -/* -============= -Sbar_DrawNum -============= -*/ void Sbar_DrawNum (int x, int y, int num, int digits, int color) { @@ -325,11 +323,7 @@ int scoreboardbottom[MAX_SCOREBOARD]; int scoreboardcount[MAX_SCOREBOARD]; int scoreboardlines; -/* -=============== -Sbar_SortFrags -=============== -*/ + void Sbar_SortFrags (void) { @@ -355,11 +349,7 @@ Sbar_SortFrags (void) } } -/* -=============== -Sbar_UpdateScoreboard -=============== -*/ + void Sbar_UpdateScoreboard (void) { @@ -386,11 +376,6 @@ Sbar_UpdateScoreboard (void) } -/* -=============== -Sbar_SoloScoreboard -=============== -*/ void Sbar_SoloScoreboard (void) { @@ -422,11 +407,7 @@ Sbar_SoloScoreboard (void) Sbar_DrawString (232 - l * 4, 12, cl.levelname); } -/* -=============== -Sbar_DrawScoreboard -=============== -*/ + void Sbar_DrawScoreboard (void) { @@ -435,13 +416,10 @@ Sbar_DrawScoreboard (void) Sbar_DeathmatchOverlay (); } + //============================================================================= -/* -=============== -Sbar_DrawInventory -=============== -*/ + void Sbar_DrawInventory (void) { @@ -657,13 +635,10 @@ Sbar_DrawInventory (void) // } } + //============================================================================= -/* -=============== -Sbar_DrawFrags -=============== -*/ + void Sbar_DrawFrags (void) { @@ -719,14 +694,10 @@ Sbar_DrawFrags (void) } } + //============================================================================= -/* -=============== -Sbar_DrawFace -=============== -*/ void Sbar_DrawFace (void) { @@ -816,11 +787,7 @@ Sbar_DrawFace (void) Sbar_DrawPic (112, 0, sb_faces[f][anim]); } -/* -============= -Sbar_DrawNormal -============= -*/ + void Sbar_DrawNormal (void) { @@ -898,11 +865,7 @@ Sbar_DrawNormal (void) Sbar_DrawNum (248, 0, cl.stats[STAT_AMMO], 3, cl.stats[STAT_AMMO] <= 10); } -/* -=============== -Sbar_Draw -=============== -*/ + void Sbar_Draw (void) { @@ -954,14 +917,10 @@ Sbar_Draw (void) } } + //============================================================================= -/* -================== -Sbar_IntermissionNumber -================== -*/ void Sbar_IntermissionNumber (int x, int y, int num, int digits, int color) { @@ -988,12 +947,7 @@ Sbar_IntermissionNumber (int x, int y, int num, int digits, int color) } } -/* -================== -Sbar_DeathmatchOverlay -================== -*/ void Sbar_DeathmatchOverlay (void) { @@ -1051,12 +1005,7 @@ Sbar_DeathmatchOverlay (void) } } -/* -================== -Sbar_DeathmatchOverlay -================== -*/ void Sbar_MiniDeathmatchOverlay (void) { @@ -1132,12 +1081,7 @@ Sbar_MiniDeathmatchOverlay (void) } } -/* -================== -Sbar_IntermissionOverlay -================== -*/ void Sbar_IntermissionOverlay (void) { @@ -1177,12 +1121,6 @@ Sbar_IntermissionOverlay (void) } -/* -================== -Sbar_FinaleOverlay - -================== -*/ void Sbar_FinaleOverlay (void) { @@ -1194,6 +1132,7 @@ Sbar_FinaleOverlay (void) Draw_Pic ((vid.width - pic->width) / 2, 16, pic); } + /* Sbar_Init diff --git a/nq/source/screen.c b/nq/source/screen.c index 486d839ce..ffcc7fbe5 100644 --- a/nq/source/screen.c +++ b/nq/source/screen.c @@ -35,13 +35,13 @@ #include "QF/cmd.h" #include "QF/compat.h" #include "QF/console.h" +#include "QF/draw.h" #include "QF/input.h" #include "QF/keys.h" #include "QF/screen.h" #include "QF/sys.h" #include "QF/qendian.h" -#include "draw.h" #include "host.h" #include "r_local.h" #include "sbar.h" @@ -99,11 +99,7 @@ SCR_Init_Cvars (void) } /* -=============================================================================== - -CENTER PRINTING - -=============================================================================== + CENTER PRINTING */ char scr_centerstring[1024]; @@ -115,12 +111,10 @@ int scr_erase_center; /* -============== -SCR_CenterPrint + SCR_CenterPrint -Called for important messages that should stay in the center of the screen -for a few moments -============== + Called for important messages that should stay in the center + of the screen for a few moments */ void SCR_CenterPrint (char *str) @@ -223,14 +217,10 @@ SCR_CheckDrawCenterString (void) SCR_DrawCenterString (); } + //============================================================================= -/* -==================== -CalcFov -==================== -*/ float CalcFov (float fov_x, float width, float height) { @@ -251,12 +241,10 @@ CalcFov (float fov_x, float width, float height) /* -================= -SCR_CalcRefdef + SCR_CalcRefdef -Must be called whenever vid changes -Internal use only -================= + Must be called whenever vid changes + Internal use only */ static void SCR_CalcRefdef (void) @@ -321,11 +309,9 @@ SCR_CalcRefdef (void) /* -================= -SCR_SizeUp_f + SCR_SizeUp_f -Keybinding command -================= + Keybinding command */ void SCR_SizeUp_f (void) @@ -336,11 +322,9 @@ SCR_SizeUp_f (void) /* -================= -SCR_SizeDown_f + SCR_SizeDown_f -Keybinding command -================= + Keybinding command */ void SCR_SizeDown_f (void) @@ -349,14 +333,10 @@ SCR_SizeDown_f (void) vid.recalc_refdef = 1; } + //============================================================================ -/* -================== -SCR_Init -================== -*/ void SCR_Init (void) { @@ -384,11 +364,6 @@ SCR_Init (void) } -/* -============== -SCR_DrawRam -============== -*/ void SCR_DrawRam (void) { @@ -402,11 +377,6 @@ SCR_DrawRam (void) } -/* -============== -SCR_DrawTurtle -============== -*/ void SCR_DrawTurtle (void) { @@ -428,11 +398,6 @@ SCR_DrawTurtle (void) } -/* -============== -SCR_DrawNet -============== -*/ void SCR_DrawNet (void) { @@ -511,11 +476,6 @@ SCR_DrawTime (void) } -/* -============== -DrawPause -============== -*/ void SCR_DrawPause (void) { @@ -533,11 +493,6 @@ SCR_DrawPause (void) } -/* -============== -SCR_DrawLoading -============== -*/ void SCR_DrawLoading (void) { @@ -609,12 +564,9 @@ SCR_DrawConsole (void) } } -/* -============================================================================== - - SCREEN SHOTS - -============================================================================== + +/* + SCREEN SHOTS */ @@ -733,6 +685,7 @@ SCR_ScreenShot_f (void) Con_Printf ("Wrote %s\n", pcxname); } + //============================================================================= @@ -771,6 +724,7 @@ SCR_EndLoadingPlaque (void) Con_ClearNotify (); } + //============================================================================= char *scr_notifystring; @@ -811,12 +765,10 @@ SCR_DrawNotifyString (void) /* -================== -SCR_ModalMessage + SCR_ModalMessage -Displays a text string in the center of the screen and waits for a Y or N -keypress. -================== + Displays a text string in the center of the screen and waits + for a Y or N keypress. */ int SCR_ModalMessage (char *text) @@ -846,15 +798,14 @@ SCR_ModalMessage (char *text) return key_lastpress == 'y'; } + //============================================================================= /* -=============== -SCR_BringDownConsole + SCR_BringDownConsole -Brings the console down and fades the palettes back to normal -================ + Brings the console down and fades the palettes back to normal */ void SCR_BringDownConsole (void) @@ -873,15 +824,12 @@ SCR_BringDownConsole (void) /* -================== -SCR_UpdateScreen + SCR_UpdateScreen + This is called every frame, and can also be called explicitly to flush + text to the screen. -This is called every frame, and can also be called explicitly to flush -text to the screen. - -WARNING: be very careful calling this from elsewhere, because the refresh -needs almost the entire 256k of stack space! -================== + WARNING: be very careful calling this from elsewhere, because + the refresh needs almost the entire 256k of stack space! */ void SCR_UpdateScreen (void) diff --git a/nq/source/sw_view.c b/nq/source/sw_view.c index 4f606446d..1b8dadd7f 100644 --- a/nq/source/sw_view.c +++ b/nq/source/sw_view.c @@ -1,4 +1,3 @@ - /* view.c @@ -31,13 +30,14 @@ # include "config.h" #endif -#include "client.h" #include "QF/compat.h" #include "QF/console.h" -#include "draw.h" +#include "QF/draw.h" +#include "QF/vid.h" + +#include "client.h" #include "host.h" #include "view.h" -#include "QF/vid.h" extern byte gammatable[256]; @@ -52,9 +52,7 @@ extern cvar_t *scr_ofsx; extern cvar_t *scr_ofsy; extern cvar_t *scr_ofsz; -/* - V_UpdatePalette -*/ + void V_UpdatePalette (void) { @@ -122,13 +120,12 @@ V_UpdatePalette (void) VID_ShiftPalette (pal); } -/* -================== -V_RenderView -The player's clipping box goes from (-16 -16 -24) to (16 16 32) from -the entity origin, so any view position inside that will be valid -================== +/* + V_RenderView + + The player's clipping box goes from (-16 -16 -24) to (16 16 32) from + the entity origin, so any view position inside that will be valid */ extern vrect_t scr_vrect; @@ -161,6 +158,7 @@ V_RenderView (void) Draw_Crosshair (); } + void BuildGammaTable (float b, float c) { diff --git a/qw/include/Makefile.am b/qw/include/Makefile.am index 7f443138d..3f3e0cc77 100644 --- a/qw/include/Makefile.am +++ b/qw/include/Makefile.am @@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS= foreign EXTRA_DIST = bothdefs.h buildnum.h cl_cam.h cl_demo.h cl_ents.h cl_input.h \ cl_main.h cl_parse.h cl_pred.h cl_slist.h cl_tent.h client.h \ - commdef.h d_iface.h d_ifacea.h d_local.h draw.h game.h \ - host.h logos.h modelgen.h msg_ucmd.h net.h pmove.h progdefs.h \ + commdef.h d_iface.h d_ifacea.h d_local.h game.h host.h \ + logos.h modelgen.h msg_ucmd.h net.h pmove.h progdefs.h \ protocol.h r_dynamic.h r_local.h r_shared.h render.h server.h \ sv_pr_cmds.h sv_progs.h world.h diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index 1a3d69a61..986ec38e1 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -63,6 +63,7 @@ #include "QF/compat.h" #include "QF/console.h" #include "QF/cvar.h" +#include "QF/draw.h" #include "QF/input.h" #include "QF/keys.h" #include "QF/model.h" @@ -91,7 +92,6 @@ #include "cl_slist.h" #include "cl_tent.h" #include "client.h" -#include "draw.h" #include "game.h" #include "host.h" #include "net.h" @@ -212,9 +212,7 @@ char soundlist_name[] = "soundlist %i %i"; cvar_t *confirm_quit; -/* - CL_Quit_f -*/ + void CL_Quit_f (void) { @@ -227,9 +225,7 @@ CL_Quit_f (void) Sys_Quit (); } -/* - CL_Version_f -*/ + void CL_Version_f (void) { @@ -293,6 +289,7 @@ CL_SendConnectPacket (void) NET_SendPacket (strlen (data), data, adr); } + /* CL_CheckForResend @@ -337,6 +334,7 @@ CL_CheckForResend (void) NET_SendPacket (strlen (data), data, adr); } + void CL_BeginServerConnect (void) { @@ -344,9 +342,7 @@ CL_BeginServerConnect (void) CL_CheckForResend (); } -/* - CL_Connect_f -*/ + void CL_Connect_f (void) { @@ -408,9 +404,6 @@ CL_Rcon_f (void) } -/* - CL_ClearState -*/ void CL_ClearState (void) { @@ -446,6 +439,7 @@ CL_ClearState (void) cl.free_efrags[i].entnext = NULL; } + /* CL_StopCshifts @@ -461,6 +455,7 @@ CL_StopCshifts (void) cl.stats[i] = 0; } + /* CL_Disconnect @@ -512,12 +507,14 @@ CL_Disconnect (void) } + void CL_Disconnect_f (void) { CL_Disconnect (); } + /* CL_User_f @@ -550,6 +547,7 @@ CL_User_f (void) Con_Printf ("User not in server.\n"); } + /* CL_Users_f @@ -575,6 +573,7 @@ CL_Users_f (void) Con_Printf ("%i total users\n", c); } + /* CL_FullServerinfo_f @@ -621,11 +620,6 @@ CL_FullServerinfo_f (void) } } -/* - - CL_AddQFInfoKeys - -*/ void CL_AddQFInfoKeys (void) @@ -654,11 +648,7 @@ CL_AddQFInfoKeys (void) Con_Printf ("QuakeForge server detected\n"); } -/* - CL_RemoveQFInfoKeys - -*/ void CL_RemoveQFInfoKeys (void) { @@ -667,6 +657,7 @@ CL_RemoveQFInfoKeys (void) Info_RemoveKey (cls.userinfo, "*qsg_version"); } + /* CL_FullInfo_f @@ -716,6 +707,7 @@ CL_FullInfo_f (void) } } + /* CL_SetInfo_f @@ -742,6 +734,7 @@ CL_SetInfo_f (void) Cmd_ForwardToServer (); } + /* CL_Packet_f @@ -863,6 +856,7 @@ CL_Reconnect_f (void) CL_BeginServerConnect (); } + /* CL_ConnectionlessPacket @@ -1024,6 +1018,7 @@ CL_ConnectionlessPacket (void) Con_Printf ("unknown: %c\n", c); } + void CL_PingPacket (void) { @@ -1040,9 +1035,7 @@ CL_PingPacket (void) } } -/* - CL_ReadPackets -*/ + void CL_ReadPackets (void) { @@ -1097,11 +1090,10 @@ CL_ReadPackets (void) } + //============================================================================= -/* - CL_Download_f -*/ + void CL_Download_f (void) { @@ -1134,9 +1126,7 @@ CL_Download_f (void) } } -/* - CL_Init -*/ + void CL_Init (void) { @@ -1217,7 +1207,6 @@ CL_Init (void) } - void CL_Init_Cvars (void) { @@ -1325,6 +1314,7 @@ CL_Init_Cvars (void) R_Particles_Init_Cvars (); } + /* Host_EndGame @@ -1348,6 +1338,7 @@ Host_EndGame (char *message, ...) longjmp (host_abort, 1); } + /* Host_Error @@ -1409,6 +1400,7 @@ Host_WriteConfiguration (void) //============================================================================ + /* Host_SimulationTime @@ -1439,6 +1431,7 @@ Host_SimulationTime (float time) return true; } + /* Host_Frame @@ -1529,8 +1522,10 @@ Host_Frame (float time) fps_count++; } + //============================================================================ + static int check_quakerc (void) { @@ -1553,9 +1548,7 @@ check_quakerc (void) return ret; } -/* - Host_Init -*/ + void Host_Init (void) { diff --git a/qw/source/console.c b/qw/source/console.c index ceb0a6614..9745b266e 100644 --- a/qw/source/console.c +++ b/qw/source/console.c @@ -38,11 +38,10 @@ #include -#include "client.h" #include "QF/cmd.h" #include "QF/compat.h" #include "QF/console.h" -#include "draw.h" +#include "QF/draw.h" #include "QF/input.h" #include "QF/keys.h" #include "QF/qargs.h" @@ -50,6 +49,8 @@ #include "QF/sys.h" #include "QF/va.h" +#include "client.h" + int con_ormask; console_t con_main; console_t con_chat; @@ -80,6 +81,7 @@ extern int key_linepos; qboolean con_initialized; + void Key_ClearTyping (void) { @@ -87,9 +89,7 @@ Key_ClearTyping (void) key_linepos = 1; } -/* - Con_ToggleConsole_f -*/ + void Con_ToggleConsole_f (void) { @@ -104,9 +104,7 @@ Con_ToggleConsole_f (void) Con_ClearNotify (); } -/* - Con_ToggleChat_f -*/ + void Con_ToggleChat_f (void) { @@ -121,9 +119,7 @@ Con_ToggleChat_f (void) Con_ClearNotify (); } -/* - Con_Clear_f -*/ + void Con_Clear_f (void) { @@ -135,9 +131,6 @@ Con_Clear_f (void) } -/* - Con_ClearNotify -*/ void Con_ClearNotify (void) { @@ -148,9 +141,6 @@ Con_ClearNotify (void) } -/* - Con_MessageMode_f -*/ void Con_MessageMode_f (void) { @@ -160,9 +150,7 @@ Con_MessageMode_f (void) key_dest = key_message; } -/* - Con_MessageMode2_f -*/ + void Con_MessageMode2_f (void) { @@ -172,9 +160,7 @@ Con_MessageMode2_f (void) key_dest = key_message; } -/* - Con_Resize -*/ + void Con_Resize (console_t *con) { @@ -238,9 +224,6 @@ Con_CheckResize (void) } -/* - Con_Init -*/ void Con_Init (void) { @@ -267,6 +250,7 @@ Con_Init (void) con_initialized = true; } + void Con_Init_Cvars (void) { @@ -276,9 +260,6 @@ Con_Init_Cvars (void) } -/* - Con_Linefeed -*/ void Con_Linefeed (void) { @@ -292,6 +273,7 @@ Con_Linefeed (void) ' ', con_linewidth); } + /* Con_Print @@ -482,6 +464,7 @@ Con_DrawNotify (void) con_notifylines = v; } + /* Con_DrawConsole @@ -536,6 +519,7 @@ Con_DrawConsole (int lines) Con_DrawInput (); } + void Con_DrawDownload (int lines) { diff --git a/qw/source/draw.c b/qw/source/draw.c index 77ce78b2f..786153bcd 100644 --- a/qw/source/draw.c +++ b/qw/source/draw.c @@ -36,14 +36,15 @@ # include #endif -#include "client.h" #include "QF/console.h" -#include "d_iface.h" -#include "draw.h" +#include "QF/draw.h" #include "QF/quakefs.h" #include "QF/sound.h" #include "QF/sys.h" +#include "client.h" +#include "d_iface.h" + typedef struct { vrect_t rect; int width; @@ -73,12 +74,13 @@ cachepic_t menu_cachepics[MAX_CACHED_PICS]; int menu_numcachepics; -qpic_t * +qpic_t * Draw_PicFromWad (char *name) { return W_GetLumpName (name); } + /* Draw_ClearCache @@ -89,10 +91,8 @@ Draw_ClearCache (void) { } -/* - Draw_CachePic -*/ -qpic_t * + +qpic_t * Draw_CachePic (char *path, qboolean alpha) { cachepic_t *pic; @@ -130,6 +130,7 @@ Draw_CachePic (char *path, qboolean alpha) return dat; } + void Draw_TextBox (int x, int y, int width, int lines) { @@ -182,9 +183,7 @@ Draw_TextBox (int x, int y, int width, int lines) Draw_Pic (cx, cy + 8, p); } -/* - Draw_Init -*/ + void Draw_Init (void) { @@ -202,6 +201,7 @@ Draw_Init (void) "Client version string"); } + void Draw_Init_Cvars (void) { @@ -298,9 +298,7 @@ Draw_Character8 (int x, int y, int num) } } -/* - Draw_String8 -*/ + void Draw_String8 (int x, int y, char *str) { @@ -311,9 +309,7 @@ Draw_String8 (int x, int y, char *str) } } -/* - Draw_AltString8 -*/ + void Draw_AltString8 (int x, int y, char *str) { @@ -324,6 +320,7 @@ Draw_AltString8 (int x, int y, char *str) } } + void Draw_Pixel (int x, int y, byte color) { @@ -341,6 +338,7 @@ Draw_Pixel (int x, int y, byte color) } } + void Draw_Crosshair (void) { @@ -367,9 +365,7 @@ Draw_Crosshair (void) cl_crossy->int_val, '+'); } -/* - Draw_Pic -*/ + void Draw_Pic (int x, int y, qpic_t *pic) { @@ -440,9 +436,6 @@ Draw_Pic (int x, int y, qpic_t *pic) } -/* - Draw_SubPic -*/ void Draw_SubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height) @@ -481,9 +474,7 @@ Draw_SubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width, } } -/* - Draw_TransPicTranslate -*/ + void Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte * translation) { @@ -554,9 +545,6 @@ Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte * translation) } -/* - Draw_ConsoleBackground -*/ void Draw_ConsoleBackground (int lines) { @@ -622,9 +610,6 @@ Draw_ConsoleBackground (int lines) } -/* - R_DrawRect8 -*/ void R_DrawRect8 (vrect_t *prect, int rowbytes, byte * psrc, int transparent) { @@ -662,9 +647,6 @@ R_DrawRect8 (vrect_t *prect, int rowbytes, byte * psrc, int transparent) } -/* - R_DrawRect16 -*/ void R_DrawRect16 (vrect_t *prect, int rowbytes, byte * psrc, int transparent) { @@ -812,11 +794,10 @@ Draw_Fill (int x, int y, int w, int h, int c) } } + //============================================================================= -/* - Draw_FadeScreen -*/ + void Draw_FadeScreen (void) { @@ -844,8 +825,10 @@ Draw_FadeScreen (void) VID_LockBuffer (); } + //============================================================================= + /* Draw_BeginDisc diff --git a/qw/source/gl_draw.c b/qw/source/gl_draw.c index a54bd386e..6bfe79d92 100644 --- a/qw/source/gl_draw.c +++ b/qw/source/gl_draw.c @@ -38,17 +38,17 @@ #include -#include "client.h" #include "QF/cmd.h" #include "QF/console.h" -#include "draw.h" -#include "glquake.h" -#include "sbar.h" +#include "QF/draw.h" #include "QF/screen.h" #include "QF/sys.h" #include "QF/vid.h" #include "QF/va.h" +#include "client.h" +#include "glquake.h" +#include "sbar.h" extern byte *vid_basepal; extern cvar_t *crosshair, *cl_crossx, *cl_crossy, *crosshaircolor, @@ -267,6 +267,7 @@ gl_lightmode_callback (cvar_t *cvar) R_ForceLightUpdate (); } + void Draw_Init (void) { @@ -315,6 +316,7 @@ Draw_Init (void) glrsurf_init (); } + void Draw_Init_Cvars (void) { @@ -704,11 +706,10 @@ Draw_Fill (int x, int y, int w, int h, int c) glEnable (GL_TEXTURE_2D); } + //============================================================================= -/* - Draw_FadeScreen -*/ + void Draw_FadeScreen (void) { @@ -728,8 +729,10 @@ Draw_FadeScreen (void) Sbar_Changed (); } + //============================================================================= + /* Draw_BeginDisc diff --git a/qw/source/gl_ngraph.c b/qw/source/gl_ngraph.c index 9bd08f856..faa10ccd0 100644 --- a/qw/source/gl_ngraph.c +++ b/qw/source/gl_ngraph.c @@ -40,11 +40,11 @@ #include "QF/compat.h" #include "QF/cvar.h" +#include "QF/draw.h" #include "QF/vid.h" #include "cl_parse.h" #include "client.h" -#include "draw.h" #include "glquake.h" #include "sbar.h" @@ -61,6 +61,7 @@ int netgraphtexture; // netgraph texture static byte ngraph_texels[NET_GRAPHHEIGHT][NET_TIMINGS]; + static void R_LineGraph (int x, int h) { @@ -92,6 +93,7 @@ R_LineGraph (int x, int h) ngraph_texels[NET_GRAPHHEIGHT - i - 1][x] = (byte) 0xff; } + void Draw_CharToNetGraph (int x, int y, int num) { @@ -113,9 +115,6 @@ Draw_CharToNetGraph (int x, int y, int num) } -/* - R_NetGraph -*/ void R_NetGraph (void) { diff --git a/qw/source/gl_screen.c b/qw/source/gl_screen.c index 57fb3677e..effb76dd5 100644 --- a/qw/source/gl_screen.c +++ b/qw/source/gl_screen.c @@ -41,6 +41,7 @@ #include "QF/cmd.h" #include "QF/compat.h" #include "QF/console.h" +#include "QF/draw.h" #include "QF/keys.h" #include "QF/pcx.h" #include "QF/skin.h" @@ -48,13 +49,13 @@ #include "QF/tga.h" #include "cl_parse.h" -#include "draw.h" #include "glquake.h" #include "host.h" #include "r_local.h" #include "sbar.h" #include "view.h" + /* background clear @@ -102,6 +103,7 @@ console is: */ + int glx, gly, glwidth, glheight; // only the refresh window will be updated unless these variables are flagged @@ -618,8 +620,8 @@ SCR_DrawConsole (void) } -/* - SCREEN SHOTS +/* + SCREEN SHOTS */ @@ -646,7 +648,7 @@ SCR_ScreenShot_f (void) /* -Find closest color in the palette for named color + Find closest color in the palette for named color */ int MipColor (int r, int g, int b) diff --git a/qw/source/gl_textures.c b/qw/source/gl_textures.c index 74eef6752..87b985889 100644 --- a/qw/source/gl_textures.c +++ b/qw/source/gl_textures.c @@ -43,12 +43,13 @@ #include "QF/compat.h" #include "QF/console.h" #include "QF/crc.h" -#include "draw.h" -#include "glquake.h" -#include "sbar.h" +#include "QF/draw.h" #include "QF/sys.h" #include "QF/vid.h" +#include "glquake.h" +#include "sbar.h" + extern int gl_filter_min, gl_filter_max; extern unsigned char d_15to8table[65536]; extern cvar_t *gl_picmip; @@ -174,6 +175,7 @@ static glformat_t formats[] = { int gl_alpha_format = 4, gl_lightmap_format = 4, gl_solid_format = 3; + void GL_TextureMode_f (void) { @@ -421,7 +423,6 @@ GL_Upload32 (unsigned int *data, int width, int height, qboolean mipmap, } - /* GL_Upload8_EXT diff --git a/qw/source/sbar.c b/qw/source/sbar.c index ada28f40e..551d798ea 100644 --- a/qw/source/sbar.c +++ b/qw/source/sbar.c @@ -38,18 +38,19 @@ #include -#include "bothdefs.h" -#include "cl_cam.h" -#include "client.h" #include "QF/cmd.h" #include "QF/compat.h" -#include "draw.h" +#include "QF/draw.h" #include "QF/msg.h" -#include "sbar.h" #include "QF/screen.h" #include "QF/va.h" #include "QF/vid.h" +#include "bothdefs.h" +#include "cl_cam.h" +#include "client.h" +#include "sbar.h" + int sb_updates; // if >= vid.numpages, no update // needed @@ -89,6 +90,7 @@ void Sbar_MiniDeathmatchOverlay (void); static qboolean largegame = false; + /* Sbar_ShowTeamScores @@ -104,6 +106,7 @@ Sbar_ShowTeamScores (void) sb_updates = 0; } + /* Sbar_DontShowTeamScores @@ -116,6 +119,7 @@ Sbar_DontShowTeamScores (void) sb_updates = 0; } + /* Sbar_ShowScores @@ -131,6 +135,7 @@ Sbar_ShowScores (void) sb_updates = 0; } + /* Sbar_DontShowScores @@ -143,18 +148,14 @@ Sbar_DontShowScores (void) sb_updates = 0; } -/* - Sbar_Changed -*/ + void Sbar_Changed (void) { sb_updates = 0; // update next frame } -/* - Sbar_Init -*/ + void Sbar_Init (void) { @@ -248,11 +249,9 @@ Sbar_Init (void) //============================================================================= + // drawing routines are reletive to the status bar location -/* - Sbar_DrawPic -*/ void Sbar_DrawPic (int x, int y, qpic_t *pic) { @@ -260,12 +259,12 @@ Sbar_DrawPic (int x, int y, qpic_t *pic) pic); } + /* Sbar_DrawSubPic JACK: Draws a portion of the picture in the status bar. */ - void Sbar_DrawSubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height) @@ -275,9 +274,6 @@ Sbar_DrawSubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width, } -/* - Sbar_DrawTransPic -*/ void Sbar_DrawTransPic (int x, int y, qpic_t *pic) { @@ -285,6 +281,7 @@ Sbar_DrawTransPic (int x, int y, qpic_t *pic) pic); } + /* Sbar_DrawCharacter @@ -297,9 +294,7 @@ Sbar_DrawCharacter (int x, int y, int num) y + vid.height - SBAR_HEIGHT, num); } -/* - Sbar_DrawString -*/ + void Sbar_DrawString (int x, int y, char *str) { @@ -307,9 +302,7 @@ Sbar_DrawString (int x, int y, char *str) y + vid.height - SBAR_HEIGHT, str); } -/* - Sbar_itoa -*/ + int Sbar_itoa (int num, char *buf) { @@ -339,9 +332,6 @@ Sbar_itoa (int num, char *buf) } -/* - Sbar_DrawNum -*/ void Sbar_DrawNum (int x, int y, int num, int digits, int color) { @@ -368,6 +358,7 @@ Sbar_DrawNum (int x, int y, int num, int digits, int color) } } + //============================================================================= //ZOID: this should be MAX_CLIENTS, not MAX_SCOREBOARD!! @@ -384,9 +375,7 @@ team_t teams[MAX_CLIENTS]; int teamsort[MAX_CLIENTS]; int scoreboardteams; -/* - Sbar_SortFrags -*/ + void Sbar_SortFrags (qboolean includespec) { @@ -413,6 +402,7 @@ Sbar_SortFrags (qboolean includespec) } } + void Sbar_SortTeams (void) { @@ -479,6 +469,7 @@ Sbar_SortTeams (void) } } + int Sbar_ColorForMap (int m) { @@ -486,9 +477,6 @@ Sbar_ColorForMap (int m) } -/* - Sbar_SoloScoreboard -*/ void Sbar_SoloScoreboard (void) { @@ -506,11 +494,10 @@ Sbar_SoloScoreboard (void) Sbar_DrawString (184, 4, str); } + //============================================================================= -/* - Sbar_DrawInventory -*/ + void Sbar_DrawInventory (void) { @@ -611,11 +598,10 @@ Sbar_DrawInventory (void) } } + //============================================================================= -/* - Sbar_DrawFrags -*/ + void Sbar_DrawFrags (void) { @@ -672,12 +658,10 @@ Sbar_DrawFrags (void) } } + //============================================================================= -/* - Sbar_DrawFace -*/ void Sbar_DrawFace (void) { @@ -714,9 +698,7 @@ Sbar_DrawFace (void) Sbar_DrawPic (112, 0, sb_faces[f][anim]); } -/* - Sbar_DrawNormal -*/ + void Sbar_DrawNormal (void) { @@ -758,9 +740,7 @@ Sbar_DrawNormal (void) Sbar_DrawNum (248, 0, cl.stats[STAT_AMMO], 3, cl.stats[STAT_AMMO] <= 10); } -/* - Sbar_Draw -*/ + void Sbar_Draw (void) { @@ -831,11 +811,10 @@ Sbar_Draw (void) Sbar_MiniDeathmatchOverlay (); } + //============================================================================= -/* - Sbar_IntermissionNumber -*/ + void Sbar_IntermissionNumber (int x, int y, int num, int digits, int color) { @@ -862,6 +841,7 @@ Sbar_IntermissionNumber (int x, int y, int num, int digits, int color) } } + /* Sbar_TeamOverlay @@ -955,6 +935,7 @@ Sbar_TeamOverlay (void) Sbar_DeathmatchOverlay (y); } + /* Sbar_DeathmatchOverlay @@ -1110,6 +1091,7 @@ Sbar_DeathmatchOverlay (int start) largegame = true; } + /* Sbar_MiniDeathmatchOverlay @@ -1252,9 +1234,6 @@ Sbar_MiniDeathmatchOverlay (void) } -/* - Sbar_IntermissionOverlay -*/ void Sbar_IntermissionOverlay (void) { @@ -1268,9 +1247,6 @@ Sbar_IntermissionOverlay (void) } -/* - Sbar_FinaleOverlay -*/ void Sbar_FinaleOverlay (void) { diff --git a/qw/source/screen.c b/qw/source/screen.c index 78510cdb8..08506b8a3 100644 --- a/qw/source/screen.c +++ b/qw/source/screen.c @@ -41,6 +41,7 @@ #include "QF/cmd.h" #include "QF/compat.h" #include "QF/console.h" +#include "QF/draw.h" #include "QF/keys.h" #include "QF/pcx.h" #include "QF/skin.h" @@ -50,11 +51,11 @@ #include "cl_parse.h" #include "client.h" #include "d_iface.h" -#include "draw.h" #include "host.h" #include "sbar.h" #include "view.h" + /* background clear @@ -98,10 +99,9 @@ console is: notify lines half full - - */ + // only the refresh window will be updated unless these variables are flagged int scr_copytop; int scr_copyeverything; @@ -186,6 +186,7 @@ SCR_CenterPrint (char *str) } } + void SCR_DrawCenterString (void) { @@ -632,8 +633,8 @@ SCR_DrawConsole (void) } -/* - SCREEN SHOTS +/* + SCREEN SHOTS */ diff --git a/qw/source/sw_rmisc.c b/qw/source/sw_rmisc.c index 8125e8836..07440c397 100644 --- a/qw/source/sw_rmisc.c +++ b/qw/source/sw_rmisc.c @@ -33,20 +33,19 @@ #include "QF/compat.h" #include "QF/console.h" #include "QF/cmd.h" +#include "QF/draw.h" +#include "QF/sys.h" + #include "cl_parse.h" -#include "draw.h" #include "host.h" #include "r_local.h" #include "sbar.h" -#include "QF/sys.h" qboolean allowskybox; // whether or not to allow skyboxes // --KB -/* - R_CheckVariables -*/ + void R_CheckVariables (void) { @@ -70,6 +69,7 @@ Show (void) VID_Update (&vr); } + /* R_TimeRefresh_f @@ -110,9 +110,6 @@ R_TimeRefresh_f (void) } -/* - R_LoadSky_f -*/ void R_LoadSky_f (void) { @@ -171,6 +168,7 @@ R_LineGraph (int x, int y, int h) #endif } + /* R_TimeGraph @@ -221,9 +219,7 @@ R_TimeGraph (void) timex = (timex + 1) % MAX_TIMINGS; } -/* - R_NetGraph -*/ + void R_NetGraph (void) { @@ -257,9 +253,7 @@ R_NetGraph (void) } } -/* - R_ZGraph -*/ + void R_ZGraph (void) { @@ -280,9 +274,7 @@ R_ZGraph (void) } } -/* - R_PrintTimes -*/ + void R_PrintTimes (void) { @@ -299,9 +291,6 @@ R_PrintTimes (void) } -/* - R_PrintDSpeeds -*/ void R_PrintDSpeeds (void) { @@ -325,9 +314,6 @@ R_PrintDSpeeds (void) } -/* - R_PrintAliasStats -*/ void R_PrintAliasStats (void) { @@ -358,9 +344,6 @@ WarpPalette (void) } -/* - R_TransformFrustum -*/ void R_TransformFrustum (void) { @@ -385,9 +368,6 @@ R_TransformFrustum (void) #ifndef USE_INTEL_ASM -/* - TransformVector -*/ void TransformVector (vec3_t in, vec3_t out) { @@ -399,9 +379,6 @@ TransformVector (vec3_t in, vec3_t out) #endif -/* - R_TransformPlane -*/ void R_TransformPlane (mplane_t *p, float *normal, float *dist) { @@ -414,9 +391,6 @@ R_TransformPlane (mplane_t *p, float *normal, float *dist) } -/* - R_SetUpFrustumIndexes -*/ void R_SetUpFrustumIndexes (void) { @@ -442,9 +416,6 @@ R_SetUpFrustumIndexes (void) } -/* - R_SetupFrame -*/ void R_SetupFrame (void) {