Commit Graph

484 Commits

Author SHA1 Message Date
Tyrann
0ffb99b941 [PATCH] Save r_wateralpha value to config.cfg
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>
2006-09-10 19:12:18 +09:30
Tyrann
334ef33b38 [PATCH] Remove some printfs from common file functions
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>
2006-09-10 19:12:17 +09:30
Tyrann
bfcf3a7bff [PATCH] Fix NQ SZ_GetSpace overflowed flag
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>
2006-09-10 19:12:16 +09:30
Tyrann
40d598f186 [PATCH] Move r_sprite.c to common directory
No code changes, just move the file and remove the duplicate.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:12:16 +09:30
Tyrann
ef9a3048bb [PATCH] Align r_sprite.c for merge
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>
2006-09-10 19:12:15 +09:30
Tyrann
ff54174fdd [PATCH] Move r_alias.c to common directory
No code changes, just move the file and remove the duplicate.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:12:15 +09:30
Tyrann
acc2cca951 [PATCH] Align r_alias.c files
Ready to merge these two files.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:12:13 +09:30
Tyrann
1ced2bc4a1 [PATCH] Move sv_move.c to common directory
No code changes, just move the file and remove the duplicate.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:12:12 +09:30
Tyrann
8c94ce97e6 [PATCH] Align sv_move.c files
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>
2006-09-10 19:12:12 +09:30
Tyrann
262b7b7da4 [PATCH] Argument completion for playdemo and timedemo commands
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:08:54 +09:30
Tyrann
feb721761d [PATCH] Map command argument completion
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>
2006-09-10 19:08:53 +09:30
Tyrann
f9125a82bf [PATCH] Command argument completion callback
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>
2006-09-10 19:08:52 +09:30
Tyrann
e3aeea570e [PATCH] small Cbuf_AddText cleanup
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:08:49 +09:30
Tyrann
adc34b0359 [PATCH] Various cosmetic changes
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>
2006-09-10 19:08:49 +09:30
Tyrann
2edc0da51b [PATCH] Misc constification
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>
2006-09-10 19:08:48 +09:30
Tyrann
c03978c4a8 [PATCH] Increase Sys_Printf buffer
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>
2006-09-10 19:07:59 +09:30
Tyrann
1163a77dbe [PATCH] COM_ScanDir
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>
2006-09-10 19:07:57 +09:30
Tyrann
dd3d6a5ac6 [PATCH] Constify COM_CheckExtension
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:07:56 +09:30
Tyrann
03201f77eb [PATCH] view.c cleanups
* Minor re-formatting
* Remove some cruft, stale comments, etc.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:07:54 +09:30
Tyrann
c2a060dcf8 [PATCH] common.c cleanups
Remove unused function memsearch and make the searchpath variables static.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:07:53 +09:30
Tyrann
de9cc93ee8 [PATCH] Add helper for file extension test
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>
2006-09-10 19:07:53 +09:30
Tyrann
603a91dae0 [PATCH] gl_rmain minor cleanups
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>
2006-09-10 19:06:08 +09:30
Tyrann
e24ff3553f [PATCH] Use XF86 "Vidmode" gamma extension
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>
2006-09-10 19:06:07 +09:30
Tyrann
0dc8ce064e [PATCH] Start separating cshift and gamma concepts
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>
2006-09-10 19:06:06 +09:30
Tyrann
332c2096e9 [PATCH] Remove unnecessary palette calculations
Remove some palette calculations from GLQuake, since the results are not used.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:06:05 +09:30
Tyrann
e06162fb31 [PATCH] Gamma correction for GLQuake
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>
2006-09-10 19:06:04 +09:30
Tyrann
bc5f2818ec [PATCH] Set host_hunklevel before exec quake.rc
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:06:01 +09:30
Tyrann
b01adb5ade [PATCH] Save mlook state in config.cfg
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:06:00 +09:30
Tyrann
4d16cd2a4c [PATCH] basedir cleanup
Use a com_basedir in NQ, as in QW.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:06:00 +09:30
Tyrann
04fbd7465e [PATCH] char signedness fixes
Fix some of the more sensible char signedness warnings thrown out by GCC-4.0

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:05:56 +09:30
Tyrann
9da55bab84 [PATCH] Cleanup dlight colour handling
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>
2006-09-10 19:05:55 +09:30
Tyrann
f2c3f40032 [PATCH] GCC4 - socklen_t fixes
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:05:54 +09:30
Tyrann
2e90f72759 [PATCH] in_klook is static
Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:05:53 +09:30
Tyrann
130e22195a Import v0.47 sources 2006-09-10 19:02:51 +09:30