Even though it's not used in software Quake, it's probably still a good idea
to save it. Thanks to Stephen A.
Signed-off-by: Tyrann <tyrann@disenchant.net>
Remove some generally not that useful Sys_Printf's from NQ/QW common.c.
Thanks to Stephen A for the initial patch.
Signed-off-by: Tyrann <tyrann@disenchant.net>
Set the overflowed flag on the sizebuf _after_ it is cleared. Otherwise, the
setting is just lost. This fix was alreay in QW. Also following QW's lead on
the printf thing...
Signed-off-by: Tyrann <tyrann@disenchant.net>
After adding the static declarations I must have missed at some point, the
files are almost identical. Further inspection reveals a typo only fixed in
one file - we got away with it for now because sizeof(float *) ==
sizeof(float) on 32 bit arches.
Signed-off-by: Tyrann <tyrann@disenchant.net>
Only very small differences between these files. NQ doesn't even need
quakedef.h, so remove that. Then, guard the unique includes with XX_HACK.
Signed-off-by: Tyrann <tyrann@disenchant.net>
Something I've always wanted to be able to do; allow the user to type
'map x<TAB>' and complete the map name starting with x, if unique. If not
unique, give the common prefix. Press TAB twice for a list of maps starting
with x.
Signed-off-by: Tyrann <tyrann@disenchant.net>
Add an argument completion callback to the command struct. Defaults to NULL.
If set, when tab completion is requested on the argument of a valid command,
the callback will be invoked, passing in the partial argument. The callback
then returns a (possibly partially) completed string.
The initial targets for this will be commands like map, playdemo, etc.
Signed-off-by: Tyrann <tyrann@disenchant.net>
Mostly just removing redundant comments and trying to keep the NQ/QW diffs to
a minimum. Also removed a couple of mostly useless Con_DPrintfs and properly
exported Con_ShowTree in console.h.
Signed-off-by: Tyrann <tyrann@disenchant.net>
Sprinkling a few const modifiers about the place. Removes some inconsitencies
between similar QW/NQ function prototypes (probably introduced by me at some
point...)
Signed-off-by: Tyrann <tyrann@disenchant.net>
This is a temporary band-aid to fix a problem where the NVidia OpenGL driver
extension string is too big for the current buffer. Will think about doing
something more dynamic later.
Signed-off-by: Tyrann <tyrann@disenchant.net>
Introduce a new helper function: COM_ScanDir.
The function populates a string tree with the filesnames found in the
given folder. An optional prefix and file extension can be specified
to filter the results. File extensions can be optionally stripped.
Signed-off-by: Tyrann <tyrann@disenchant.net>
Implement COM_CheckExtension which does a case insensitive test of a
given filename for a particular file extension.
Signed-off-by: Tyrann <tyrann@disenchant.net>
Mostly whitespace edits to removed some unnecessary differences between the
NQ/QW gl_rmain.c files. Fixes a typo (frustom -> frustum) and I ended up using
6144 for the depth of field for both NQ/QW in the MYgluPerspective function.
Signed-off-by: Tyrann <tyrann@disenchant.net>
This patch sets things up to make use of the XFree86 gamma manipulation
functions.
One issue is that the OpenGL blending substitute we set up is not really the
same as gamma correction because it only brightens pixels according to their
current values. This means black areas are not brightened using this method
(which I think is a good thing), but gamma correction adds "white" to every
area of the screen.
At the moment I've set up the "manual" OpenGL version as a fallback in case
the system gamma functions are not working or not available. I've also set
things up such that the system gamma is not used unless we are in fullscreen
mode since it affects the whole display.
The cvar _gl_allowgammafallback controls whether the fallback is used or not,
but I don't currently have a way to force it to use the "fallback" even if the
other gamma settings work. Most likely I'll separate out the two functions
into gamma and "intensity" similar to Quake 2 and later games.
Signed-off-by: Tyrann <tyrann@disenchant.net>
If we're doing hardware gamma, we probably don't want to be making adjustments
everytime an effect goes off (do we?) so it's only really for the "brightness"
slider (gamma cvar).
V_UpdatePalette seems to be wanting to mix together the colour shift effects
from damage, quad, etc. with gamma correction. For now, we'll remove the
colour shifting aspect from the gamma setting code (done with calls to
VID_ShiftPalette) and rely on the gl_polyblend mechanism for that.
Signed-off-by: Tyrann <tyrann@disenchant.net>
Implement hardware independent gamma correction for GLQuake. This comes at a
fill-rate cost since we cover the whole scene with an alpha blended poly.
Signed-off-by: Tyrann <tyrann@disenchant.net>
Keep all the standard colours in one place to make changes easier.
Change the dlight colour to a pointer.
Try to set the colour properly everywhere.
Signed-off-by: Tyrann <tyrann@disenchant.net>