Commit Graph

68 Commits

Author SHA1 Message Date
Bill Currie 759fa8dd5f bring scr_consize over from quakeforge-old 2001-02-02 23:40:46 +00:00
Ragnvald Maartmann-Moe IV 3affa48786 Whitespace, and a very minor tweak to dynamic texture generation. 2001-01-31 07:52:28 +00:00
Bill Currie bbac14a7d5 commands now sport descriptions (currently "No Description", but then I'm a
lazy bastard:)
2001-01-15 17:07:06 +00:00
Jeff Teunissen fc005fc215 Cleanup of extensions, they are no longer defined in glquake.h. In
addition, removed support (for now) for SGIS and EXT multitexture. It
allowed me to enhance support for ARB multitexture, which is better anyway
(especially for Radeon, but that won't get special support yet until we
need a third texture pass).

Updated the Unix 8-bit GL code to be more like the Windows version, which
may work better. It still defaults off, because many drivers have bugs in
their handling of the shared texture palette extension.
2001-01-06 07:29:17 +00:00
Bill Currie 76a11bd74a cvar doc patches from Misty 2000-12-31 04:46:04 +00:00
Bill Currie ccba39666b #include audit 2000-12-30 02:16:36 +00:00
Bill Currie c71fc78360 it was decided the menu code should return until release. here it is with the
gettimeofday -> Sys_DoubleTime change (though I'm having some operational
issues (non-critial) with the server list).
2000-12-29 03:14:53 +00:00
Jeff Teunissen 893a8ba827 The GL version of the clock rewrite -- also some whitespace 2000-12-28 07:49:42 +00:00
Zephaniah E. Hull 01238243c1 Due to snax's ping stuff not compiling under windows, I did a little
cleaning.

Specificly, the entire menu system has been completely and utterly
removed.

Flame me AFTER writing a replacement. <=:]
2000-12-26 17:41:26 +00:00
Jeff Teunissen de55871d32 Overhaul of parts of the polyblend system. Contrast in GL no longer uses
another alpha blend, it's set up exactly as another factor in determining
the final blend. This should help speed up framerates a little.

New cvars:
cl_cshift_bonus: Set to 0 to disable bonus flashes.
cl_cshift_contents: Set to 0 to disable content blends.
cl_cshift_damage: Set to 0 to disable damage blends.
cl_cshift_powerup: Set to 0 to disable powerup (quad, pent, etc) blends.

All of these cvars work for both GL and software, and all of them check
the value of the "cshifts" serverinfo. cshifts is a bit field, with the
following bits defined:

bonus: 1
contents: 2
damage: 4
powerup: 8

An admin can force any of these to be respected by choosing the numbers of
the cshifts to be enforced, and adding them up.

examples:

serverinfo cshifts 15

turns them all on.

serverinfo cshifts 10

turns on powerup and contents shifts.

also, the gl_cshiftpercent Cvar no longer does anything. I'll remove it
entirely soon.
2000-12-13 09:01:11 +00:00
Jeff Teunissen 0c662b0e6a cl_ents.c: misc. tweaks to CL_ParsePacketEntities ()
rest: Myriad stuff.

r_netgraph now recognizes and abides by the cl_hudswap Cvar.
show_fps and show_time are on the same line now, and stay out of each
others' way.

New Draw_ function: Draw_TextBox(). It's like M_DrawTextBox(), except it
doesn't screw around with the screen coordinates.
2000-12-12 02:46:46 +00:00
Bill Currie 0bd4b8d288 include/tga.h source/tga.c:
new function WriteTGAfile. Also, put in the tga header structure.
	NOTE: this is currently broken for non gcc ocmilers. you will get a
	#error message.
include/quakefs.h source/quakefs.c:
	new function COM_WriteBuffers. Like COM_WriteFile, but scatter/gather
	style.
source/gl_screen.c source/screen.c:
	misc cleanups. differences are getting fewer. should be mostly
	mergable soon (minus truly sw/gl specific code).
2000-12-11 06:38:58 +00:00
Bill Currie a4f03b4c12 move WritePCXfile to pcx.c, move the screenshot filname creation code to
COM_NextFilename in quakefs.c and fix up some remote screenshot snafus
2000-12-11 03:30:32 +00:00
Bill Currie 10e2d388db remove all pure whitepsace diffs between gl_screen.c and screen.c 2000-12-10 23:14:25 +00:00
Bill Currie 2ed7b7106d remove gratuitous differences between gl_screen.c and screen.c 2000-12-09 23:26:27 +00:00
Jeff Teunissen 54e2a4d9d3 Okay, the big whitespace reformat. There is some silliness (case
statements, variable declarations), but all in all it's not bad.
2000-12-08 06:51:37 +00:00
Bill Currie 4ee0be8f91 first step on the way to merged gl_screen.c and screen.c 2000-12-07 11:12:19 +00:00
Bill Currie dbbc2cd777 comment patches from Misty 2000-12-07 00:08:42 +00:00
Bill Currie 29970187d7 sprintf audit. 2000-12-05 16:51:01 +00:00
Zephaniah E. Hull 66e0e31b57 strcat -> strncat
sprintf -> snprintf

AKA, really big buffer overflow security fixes.

More to come, geez we have holes everywhere.
2000-12-05 11:08:30 +00:00
Bill Currie cbf7cd5447 show_time 2 will select 12h clock as opposed to 24h (Misty again) 2000-12-05 06:57:44 +00:00
Bill Currie 9554be96f9 clean up screen.c and gl_screen.c includes
remove scr_allowsnap from screen.c
move crosshair related cvars to *screen.c
2000-12-05 05:55:16 +00:00
Bill Currie 481fe0b9ed Misty's hudswap/fps/time patch to put the fps/time on the opposite side of the
screen to the hud.
2000-12-05 04:21:47 +00:00
Bill Currie 19a1e03f5d apply Misty's clock patch part 2 2000-12-05 03:22:35 +00:00
Bill Currie 37eb211c0a Misty's clock hack. show_clock 1 displays a clock on the screen for those that
need to know the current time while playing.
2000-12-04 03:46:04 +00:00
Bill Currie e92f295d06 remove some debug info 2000-11-15 05:37:46 +00:00
Bill Currie 47eea32832 fix the annoying white line at the bottom of the world view when viewsize is
90%. This was caused by a rounding error when converting from float to int.
Also, viewsize can now safely be changed in the console.
2000-10-30 04:10:32 +00:00
Zephaniah E. Hull 13bd5ce012 The init sequence cleanup!
Also broke up client.h into a lot of smaller headers.
Oh, software rendering works again.

And yes, this does hit a hell of a lot of files.
2000-10-29 15:35:24 +00:00
Bill Currie 06e50ba0c9 chop up gl_warp into gl_sky, pcx and tga. also break out pcx stuff from client.h 2000-10-28 19:58:22 +00:00
Jeff Teunissen 75778143ee tweaks 2000-10-26 18:13:59 +00:00
Jeff Teunissen c757f969c4 sw_view.c: whitespace
gl_screen.c: Some whitespace, some optimization. Still looking for the
culprit killing contrast in GL.
2000-10-24 02:22:29 +00:00
Bill Currie 66bc30c2a8 gl_polyblend: RIP 2000-10-23 14:58:15 +00:00
Bill Currie 2682888425 the big cvar value -> int_val audit. seems to work ok 2000-10-17 03:17:42 +00:00
Forest Hale 903fc1583e treat gl_lightmode as an int_val, epsilon checks on brightness/contrast 2000-10-06 23:50:12 +00:00
Jeff Teunissen 59f6bdf231 gl_screen.c: Whitespace
sbar.c: Simplify Sbar_ColorForMap()
gl_view.c: Remove palette shifting code -- we don't do that any more in
GL, we alpha blend the screen. Bad to do it twice, plus it messes up
texture loads.
2000-09-30 05:58:40 +00:00
Zephaniah E. Hull e4c9ccff8f Cvar audit 1, all unused cvars are gone, with the exception of software
rendering, and the server.
2000-09-30 04:08:40 +00:00
Zephaniah E. Hull cb0d141132 GL rendering path audit. 2000-09-30 02:46:48 +00:00
Zephaniah E. Hull 01a5c65e52 More cleanup, now working on the rendering line as a whole.
Con_SafePrintf is no longer needed, as Con_Printf is safe.
2000-09-29 19:29:22 +00:00
Zephaniah E. Hull f6bfcfc82d State change cleanup, but saner code! 2000-09-28 00:22:24 +00:00
Zephaniah E. Hull 68a4e60eaf Behold, the great state audit, and a few other things.
First off, a cleanup in alias model rendering.
Then we have R_CullBox, which is now a inline function.
Then the big one, the state change cleanup, right now GL_BLEND.
2000-09-26 09:03:21 +00:00
Jeff Teunissen eabff4f06b Forgot a couple of )'s in audit. 2000-09-25 06:50:59 +00:00
Jeff Teunissen 71b841adeb Cvar audit; These files set cvars improperly, by changing their values
without using Cvar_SetValue ().
2000-09-25 06:36:50 +00:00
Jeff Teunissen a3e19d5cc2 gl_screen.c: Minor tweaks, contrast gets clamped to 0.1-1 instead of 0.2-1
view.h: Add brightness, contrast cvars as extern
menu.c: Change brightness scroller to use the brightness cvar, add
contrast scroller.
r_view, sw_view.c: Add brightness/contrast cvars to software, and make
them work.
2000-09-20 04:06:12 +00:00
Zephaniah E. Hull 46855eff2d gl_screen.c:
- Cleanup for the screenshot code.. (Now requires OpenGL 1.2+)

gl_rsurf.c:
 - Oh Mr Havoc, *WHACK*, you needed to disable GL_BLEND when you switch
   to GL_REPLACE..
2000-07-06 03:35:25 +00:00
Forest Hale 906ab864c2 Brightness controls (brightness, contrast) and gl_lightmode cvar. 2000-07-02 05:16:10 +00:00
Zephaniah E. Hull 29ef95a9b5 The end of Z_*!!
This after the Z_* stuff hit my profiling list as a top user..
2000-06-29 05:46:15 +00:00
Bill Currie 381891e7e4 bring knghtbrd's 1000 screenshot patch over from oldtree. 2000-06-22 11:56:08 +00:00
Joseph Carter a3e32e213e Draw_Character -> Draw_Character8
Draw_String -> Draw_String8
Draw_Alt_String -> Draw_AltString8

You know what this means right?  Draw_*16 is coming soon.  Very soon.
2000-06-05 01:05:25 +00:00
Joseph Carter 1cb3f49391 May fix Dabb's statusbar problem 2000-06-04 10:53:01 +00:00
Joseph Carter 8d08bc4d86 This is a NON-TRIVIAL update which took LordHavoc and I about 3 days to
make work properly:

Win32 thing..  If you don't free textures explicitly, you can cause a
problem with nVidia drivers.

Colored lighting is now RGB instead of RGBA.  The alpha is kinda pointless
on a lightmap and the effect's not all that great.  Plus people stuck with
16 bit OpenGL (any other 3dfx people out there?) will be quite pleased
with the improvement in image quality.  This does include LordHavoc's
dynamic light optimization code which takes most of the pain out of having
gl_flashblend off.

All glColor*'s are now half of what they used to be, except where they
aren't.  If that doesn't make sense, don't worry.  If you see one that's
only half what you'd expect, don't worry---it probably is meant to be like
that..  (More below)

glDisable (GL_BLEND) is now a thing of the GL_PAST.  As is GL_REPLACE.
Instead, we _always_ use GL_MODULATE and leave GL_BLEND turned on.  This
seems at first like it might be a performance hit, but I swear it's much
more expensive to change blending modes and texture functions 20-30 times
every screen frame!

Win32 issue..  Even though we check for multitexture, we currently don't
use it.  Reason is that I am planning to replace SGIS_multitexture with
the preferred ARB_multitexture extension which is supported in most GL 1.1
implementations and is a requirement for GL 1.2 anyway.  I also wanted to
get rid of some duplicated code.  Since Linux doesn't support multitexture
yet, I just commented out the code keeping me from compiling to get it to
work.  Win32 should work without it until it's fixed, which shouldn't be
long since the differences between SGIS and ARB multitextures as far as
Quake is concerned is minimal AT BEST.

LordHavoc and I have been working tirelessly (well not quite, we both did
manage to sleep sometime during this ordeal) to fix the lighting in the GL
renderers!  It looks DAMNED CLOSE to software's lighting now, including
the ability to overbright a color.  You've gotta see this to know what I'm
talking about.  That's why the glColor*'s are halved in most places.  The
gamma table code and the general way it works is LordHavoc's design, but
over the course of re-implementing it in QF we did come up with a few more
small optimizations.


A lot of people have noticed that QF's fps count has gone to shit lately.
No promises that this undid whatever the problem was.  That means there
could be a huge optimization lurking somewhere in the shadows, waiting for
us to fix it for a massive FPS boost.  Even if there's not, the code in
this commit DOUBLED MY FPS COUNT.  Granted I was getting pathetic FPS as
it was (around 30, which is pathetic even for a Voodoo3 in Linux) but
still---60 is a big improvement over 30!

Please be sure to "test" this code thuroughly.
2000-06-03 19:56:09 +00:00