Commit Graph

588 Commits

Author SHA1 Message Date
Ragnvald Maartmann-Moe IV c4402e07bd Working towards merging q2 model, sprite, and map support. Check back in a few
years, might be finished. ;)
2004-02-08 02:49:38 +00:00
Bill Currie 8ea7690530 serious cleanup of refdef calculations. 2004-02-08 00:37:11 +00:00
Bill Currie 9784ba5954 Grievre's gamedir callback patch to fix mangled sounds on gamedir change
plus a couple minor tweaks I notcied needed doing.
2004-02-03 03:01:06 +00:00
Ragnvald Maartmann-Moe IV e1146a541c TruForm support. Controlled by gl_tessellate 2004-01-26 00:13:47 +00:00
Bill Currie e154c9add5 be consistent with WIN32 and _WIN32 (now all _WIN32) 2004-01-20 03:47:27 +00:00
Bill Currie 77b2942982 several libs can now get built as dlls in windows: console, gamecode,
gamecode_builtins, gib, image, modules, object, ruamoko and util.
2004-01-19 07:47:41 +00:00
Bill Currie acd54afff7 move to using a hash table for builtin number -> builtin lookup so sparse
ranges can be used efficiently. move the auto-allocated builtins to
0x10000000-0x7fffffff. should be more than enough :)

use static builtin tables ("nul" terminated) instead of a series of
function calls to add builtins to a vm. should be more memory efficient.
2004-01-06 05:51:09 +00:00
Bill Currie 40b8974c33 better external skin handling from Grievre 2003-12-28 05:25:06 +00:00
Ragnvald Maartmann-Moe IV 9dbb8335f6 Fix loading of some sky textures. 2003-12-23 22:24:48 +00:00
Bill Currie e53967b346 --disable-static now works (thanks for the heads-up, raorn) 2003-12-22 20:51:08 +00:00
Ragnvald Maartmann-Moe IV bcf3738c1c Make trails in sw renderers const-friendly. 2003-10-23 03:53:59 +00:00
Ragnvald Maartmann-Moe IV 1269241612 Make particle effects not mess with stuff they shouldn't. Also fix an
improperly declared variable.
2003-10-22 22:21:39 +00:00
Ragnvald Maartmann-Moe IV 2290ed3d3e l = 64, and taniwha is much happier. 2003-10-22 20:20:24 +00:00
Ragnvald Maartmann-Moe IV 5686ff51e5 Make R_DarkFieldParticles & R_EntityParticles work in all renderers. 2003-10-22 06:00:36 +00:00
Ragnvald Maartmann-Moe IV 0205a8a999 Optimize and slightly clean up R_DarkFieldParticles & R_EntityParticles. 2003-10-22 01:04:35 +00:00
Ragnvald Maartmann-Moe IV dc84232079 Whitespace, remove misleading .png extension from external conchars loader. 2003-09-20 04:29:42 +00:00
Bill Currie d699926e6f external conchars patch from DrSpliff 2003-09-19 06:22:02 +00:00
Bill Currie 89586e0181 don't flush garbage to the screen on the first render frame 2003-09-05 06:55:12 +00:00
Bill Currie 2b5a3753ca nuke QF/texture.h moving it's contents into QF/image.h (yay, finally, a
real home for tex_t:)
2003-09-04 18:59:39 +00:00
Bill Currie 39ed540979 LoadImage is now used for all external textures giving almost transparent
.png and .tga support.
2003-09-04 18:46:59 +00:00
Bill Currie 8db2660a4c make GL_LoadTexture support RGB textures (ie, 24 bit). I'm not happy with
the solution, but at least it works.
2003-09-04 05:22:23 +00:00
Bill Currie 0a8867fde9 replace all VectorSubtract (vec3_origin, ... and
VectorCopy (vec3_origin, ... with VectorNegate (... and VectorZero (...,
respectively. Should be a small speedup.
2003-09-03 22:17:04 +00:00
Bill Currie f7b1196b8d fix the gl stack overflow (and make sure all skybrush surfaces get checked
and queued)
2003-08-28 19:50:28 +00:00
Bill Currie 2c30939891 remove some magic numbers (sloppy coder:P) 2003-08-28 02:24:08 +00:00
Ragnvald Maartmann-Moe IV c2053fbfb1 Prettier particles! Renderer is now informed of sv_gravity changes in qw. Not
supportable without protocol changes in nq.
2003-08-27 22:20:03 +00:00
Bill Currie 415fae8d6b make the two normals arrays consistent 2003-08-26 07:00:13 +00:00
Ragnvald Maartmann-Moe IV d8068de4fa Commit experimental particle optimization. Reduces random particles from using
6 15 bit rand() to 2 calls, with 5 bits for each of the 6.
This is up to a 1% speedup for qf particles, and up to 2.1% for id.

It may particularly affect explosions with r_particles_style 0.
Please report any anomolies in any particle effects.
2003-08-15 20:26:09 +00:00
Ragnvald Maartmann-Moe IV 9ed8150b85 More particle optimizations. 2003-08-11 20:48:34 +00:00
Bill Currie 7ead5a91f8 don't let gcc automaticly inline functions but make gcc inline bigger
functions when told to. also make gcc warn if it can't inline a function.

Explicitly inline several functions (including moving VectorNormalize to
mathlib.h so it /can/ be) resulting in a 5.5% speedup for spam2 (88 to 92
fps)
2003-08-11 06:05:07 +00:00
Bill Currie b88d275994 fix some warnings 2003-08-11 05:16:04 +00:00
Ragnvald Maartmann-Moe IV f35b1db291 Fix a potential uninitialized variable segfault taniwha noticed, and optimize
particle effects a bit more.
2003-08-09 04:38:11 +00:00
Bill Currie 6a94607d9d rename VectorMA to VectorMultAdd, add VectorMultSub and use it in a few
places. Not certain how much speed difference it makes :/
2003-08-08 15:25:53 +00:00
Bill Currie 184aa7beb0 should be a minor speedup to mono lightmaps 2003-08-07 21:05:58 +00:00
Bill Currie 732a9a80d1 gain about 3 fps (180 to 183) in null-renderer 2003-08-07 19:58:39 +00:00
Bill Currie 6063fb75d9 make the console run at full speed no matter what demo_speed is at. what a
lot of work for such a simple concept :P
2003-07-25 22:21:47 +00:00
Bill Currie 772ad66019 don't need that any more (yay:) 2003-07-15 17:41:31 +00:00
Bill Currie 855fc53709 handle alloca properly 2003-07-09 06:28:09 +00:00
Bill Currie dddf045221 put "FIXME: overflow" on all the char arrays I could find that weren't
obviously safe
2003-07-08 20:11:10 +00:00
Bill Currie 66e2ef1926 fix an uninitialized variable 2003-05-23 17:39:33 +00:00
Bill Currie c2c3a62956 nuke Qexpand_squiggle. instead, expand ~ to $HOME on qfs initialization and
cache the value.

don't call Qopen directly in the engine. instead call QFS_Open (generic) or
QFS_WOpen (write only, zip flag).

rework QFS_NextFilename to use a dstring (avoiding a potential buffer
overflow), support 10000 files and work from the top-level fs_userpath
directory. adjust QFS_WriteFile and QFS_WriteBuffers etc to suit.

make sw32 screenshots actually get written.

hopefully everything gets written to the right places :)
2003-05-23 17:17:01 +00:00
Bill Currie ba3601685c wad pics don't have extensions (plugs a buffer underflow hole) 2003-05-16 19:44:25 +00:00
Brian Koropoff dd0332632e Make gcc2 stfu. 2003-05-15 04:37:00 +00:00
Brian Koropoff e2061095a6 Fixed .tga loading for GL targets. SW targets still need work in all
likelyhood.
2003-05-14 21:08:43 +00:00
Ragnvald Maartmann-Moe IV 6763d73f99 Make glError testing static, for now, to shut up compiler warnings. 2003-05-09 05:22:30 +00:00
Ragnvald Maartmann-Moe IV f6b556a3a1 *beats CVS with the cluebat* 2003-05-09 01:41:56 +00:00
Ragnvald Maartmann-Moe IV d68b4b6121 \n is nice occasionally. 2003-05-08 22:32:02 +00:00
Ragnvald Maartmann-Moe IV 28dd1612c3 Clean up glError handling. 2003-05-08 22:16:30 +00:00
Bill Currie 0a5f3c31eb ping/pl/fps/time now stays put and is now in the client rather than the
renderer (so nq is currently missing it)
2003-05-08 05:49:57 +00:00
Bill Currie a4abf526e8 there's no need to call Con_CheckResize every frame and it's now
detrimental anyway
2003-05-06 18:00:03 +00:00
Bill Currie e732cf591d remove all references to OFS_* from the C code. only the macros in progs.h
use them now
2003-04-22 18:20:15 +00:00
Bill Currie f842d98964 initialize noise1 2003-04-22 01:37:13 +00:00
Bill Currie 905f1826eb temporarily remove location support from nq (and location markers from both)
until client code has been cleaned up more
2003-04-21 18:26:21 +00:00
Bill Currie eb099ae0d3 make qf gcc 3.3 clean 2003-04-17 00:01:48 +00:00
Bill Currie 01bff9c79e WildCode's alias model VA prepatory patch 2003-04-08 04:13:49 +00:00
Bill Currie e483333bbe beat the skydome bugs to a pulp. no more seam (and probably a bunch faster
on slow cards)
2003-04-05 07:59:29 +00:00
Bill Currie 6cc7d43b53 make the texture coords in skyvec always 1/2 pixel in from the edge 2003-04-04 07:00:51 +00:00
Bill Currie e00966b319 speed up 16 bit vertex lerping by getting GL to do the 1/256 scaling for us 2003-04-03 23:09:43 +00:00
Ragnvald Maartmann-Moe IV 8db859b77c Minor bit of neatening, remove CHAIN_SURF alias, so it's clearer what is being used where. 2003-03-25 07:25:22 +00:00
Ragnvald Maartmann-Moe IV 6c7701a38b Prevent bad gl_max_size settings from causing buggy drivers to freak out. 2003-03-24 20:21:24 +00:00
Ragnvald Maartmann-Moe IV 3bfdf0aea3 Test for gl errors every frame. 2003-03-21 21:28:09 +00:00
Ragnvald Maartmann-Moe IV 88c2735d9c Make sprite rendering use vertex arrays, as a test for detection of vertex array support (tests only for OpenGL 1.1 or better, at the moment, no driver blacklist yet). 2003-03-20 19:58:18 +00:00
Bill Currie 57a470a88a alpha compile fixes (unused functions) 2003-03-08 07:17:32 +00:00
Ragnvald Maartmann-Moe IV 2000954a2c Whitespace, and a workaround for show_* misplacement. 2003-03-03 19:20:44 +00:00
Ragnvald Maartmann-Moe IV a9c61bb6bf Updated for OpenGL 1.4, plus whitespace. 2003-02-25 05:45:11 +00:00
Bill Currie 6a687f5e45 rename all the globals in quakefs.[ch] to be QFS_* or qfs_* 2003-02-14 19:46:07 +00:00
Ragnvald Maartmann-Moe IV a34980eda5 Fix easter_egg toggling. 2003-02-14 00:58:22 +00:00
Ragnvald Maartmann-Moe IV 6d6fade23a Change mach64 test to only happen at particle system inits, rather than testing for every individual particle injection.
Mach64 now gets id particle effects. Disabling the majority of effects isn't the best method, IMO.
2003-02-13 21:48:28 +00:00
Ragnvald Maartmann-Moe IV af33733ce4 More x86-64 (AMD, not intel IA64, taniwha!) fixes.
Compile problems pointed out by Mike A. Harris. Thanks!
2003-02-12 23:41:20 +00:00
Bill Currie 4bd1718475 re-arrange viewsize handling to fix the hud bug in glx 2003-02-11 21:24:27 +00:00
Ragnvald Maartmann-Moe IV 83f0901c17 Cleaned up fisheye code which totally ignored QF coding style.
Also attempt to fix an init bug in R_InitFishEyeOnce (add gl_cube_map_capable = false to else).
2003-02-09 19:35:49 +00:00
Bill Currie 3ab4eb6545 Arkadi's mach64 patch 2003-02-06 21:47:33 +00:00
Bill Currie d63cde4103 import the GL_ARB_texture_cube_map defines 2003-01-15 18:26:58 +00:00
Bill Currie 0ea15c3f82 sw and gl fisheye patches from Arkadi Shishlov (arkadi@it.lv). I don't
think /I/ can play that way (dizzy:)
2003-01-15 16:53:34 +00:00
Bill Currie 761a7546dd re-arrange things so __attribute__ and __builtin_expect are properly
autoconfiscated so rcsid will continue to work with gcc 3.3
2003-01-15 15:31:36 +00:00
Ragnvald Maartmann-Moe IV 34d4483424 white noise, er space. 2003-01-08 01:46:28 +00:00
Ragnvald Maartmann-Moe IV d2820cd857 Reduce code duplication, kill a function used by only one caller.
Also disables a workaround for "interpolation seams" that I believe to be an old DRI bug. If anyone has skybox (not dome!) seams, try altering the ftc `if 0` to `if 1`.
2003-01-07 22:12:54 +00:00
Bill Currie ca720c26a5 blah, forgot about no-asm :P 2003-01-06 19:05:51 +00:00
Bill Currie 71196fedf6 make gcc more anal about prototypes, string constants and function
visibility (ie, global functions must have a prototype)
2003-01-06 18:28:13 +00:00
Bill Currie 8a2fbf43a7 alphageek's crosshair patch modified so it's crosshair 3 (need to port this
to the sw renderer's:/)
2003-01-03 03:36:45 +00:00
Bill Currie f75c88b247 work around a gcc (GCC) 3.1 20020420 (prerelease) bug in darwin (ppc?) 2002-12-20 23:49:11 +00:00
Bill Currie 37c5bb6ec6 merge the bulk of the three screen files into r_screen.c so all common code
is shared.
2002-12-11 17:34:48 +00:00
Bill Currie bf3fa3dc76 remove some dead code and a lot of unnecessary diffs 2002-12-11 16:45:40 +00:00
Bill Currie ca55210c6e remove some redundant steps 2002-12-11 05:46:42 +00:00
Bill Currie 88f7b9ae84 it's rgb, not rbg 2002-12-11 05:33:54 +00:00
Bill Currie 15655c23cd get snaps working properly 2002-12-10 18:24:38 +00:00
Bill Currie 7da551d044 the output is rather mangled but the client no longer crashes 2002-12-10 05:04:30 +00:00
Bill Currie de7299a64f don't crash when doing a remote screenshot 2002-12-09 17:47:12 +00:00
Brian Koropoff f1279be1e5 Fixed a segfault with very high resolutions. 2002-11-23 05:47:17 +00:00
Bill Currie ee30860cef fix a bunch of ;; typos 2002-11-20 21:44:04 +00:00
Bill Currie 6ce0abe536 more alpha compile fixes. Closes: #60 because while it started out for
0.1.1 it developed into an alpha compile issue for 0.5.2
2002-11-13 20:20:50 +00:00
Bill Currie 498bdcc406 compile fixes for alpha linux 2002-11-10 02:50:42 +00:00
Bill Currie ca4b3acd6c big protototype cleanup. Now, except for a few cases, all non-static
prototypes are in headers files.
2002-11-05 19:12:51 +00:00
Ragnvald Maartmann-Moe IV 00b798c5b6 MORE whitespace. Will it never end? 2002-10-10 20:12:32 +00:00
Ragnvald Maartmann-Moe IV 0b0f9ee371 More whitespace. 2002-10-10 20:03:23 +00:00
Ragnvald Maartmann-Moe IV ef47bf6e12 gl_skymultipass -> gl_sky_multipass. Much nicer tab completion. 2002-10-10 19:49:36 +00:00
Ragnvald Maartmann-Moe IV b025a4e9aa Wh17e5p@c3! 2002-10-10 19:44:27 +00:00
Ragnvald Maartmann-Moe IV 998d68a833 In GL, have `r_speeds 1` display particle count. 2002-10-02 04:15:23 +00:00
Bill Currie 9aa84f4ead case i has 7 visits, not 6 :P 2002-10-02 01:58:29 +00:00
Bill Currie 3d668334e6 copy that fix for the other renderers 2002-09-30 21:35:13 +00:00
Bill Currie d7bbe82efd make sure the bottom part of the console gets updated properly if it covers
the status bar.
2002-09-30 21:25:24 +00:00
Bill Currie b0629d24fa handle the new case Despair discovered. 2002-09-23 06:18:48 +00:00
Bill Currie 5189ffeae9 fix software model lighting 2002-09-18 14:38:41 +00:00
Ragnvald Maartmann-Moe IV a9b16f5de5 Tweak ramp decay on new spark shower. 2002-09-17 05:13:13 +00:00
Ragnvald Maartmann-Moe IV d6a2b54252 Use ramps for spark showers, so they fade in color as well as alpha.
Lightning doesn't have a ramp, so it doesn't use this feature yet.
2002-09-17 02:14:58 +00:00
Bill Currie f7b4dffcc0 get larger player skins working in gl 2002-09-13 05:32:28 +00:00
Ragnvald Maartmann-Moe IV 2a8896d4a1 Grr, what's with cvs today? 2002-09-13 01:08:21 +00:00
Ragnvald Maartmann-Moe IV ca50e1945b Oops. 2002-09-13 00:23:58 +00:00
Bill Currie 899ad6bebe use the correct palette when writing out screen shots 2002-09-10 15:13:12 +00:00
Bill Currie ecdd537183 beat sw gamma handling till GL works. after a fasion. it /looks/ like it was
beaten on.
2002-09-10 06:35:32 +00:00
Bill Currie 9f6f50699d remove vid_basepal, creating vid.palette (current palette) and host_basepal 2002-09-10 03:51:10 +00:00
Bill Currie f6ab24e6bc min-clamp ambientcolor instead of shadecolor. should make for more visible
players
2002-09-09 23:06:08 +00:00
Ragnvald Maartmann-Moe IV c4609f5195 Experimentally allow external texture loading. Also prevent loading RGB textures as RGBA, which wastes a lot of texture memory, and looks ugly on 16bpp boards. 2002-09-06 21:37:22 +00:00
Ragnvald Maartmann-Moe IV 92db391e7c Optimize model rendering a hair. WildCode spotted that minimum shade was only being applied to the view model (why do we set it up for other stuff if it's not going to be used?). While looking at that, I noticed we could do the divide by 200 in model setup. 2002-09-01 23:45:22 +00:00
Ragnvald Maartmann-Moe IV c1a8a02762 Whitespace. 2002-08-27 19:38:04 +00:00
Bill Currie a7380fef66 nuke msg_suppress_1 in favor of Sys_DPrintf 2002-08-27 18:05:59 +00:00
Bill Currie ec47e08e1c go back to using QFile, quakeio.h and quakefs.h 2002-08-27 07:16:28 +00:00
Ragnvald Maartmann-Moe IV d11fbc0b5c Change from if/else if/else function for setting scale in a number of particle effects, to scale = pow (count, 0.23). Smooth particle size changes with varying count, and doesn't seem any slower in my benchmarks. 2002-08-26 00:11:16 +00:00
Ragnvald Maartmann-Moe IV ff03367bc2 Whitespace and comment cleanups. 2002-08-25 05:55:28 +00:00
Ragnvald Maartmann-Moe IV 147f940510 Kill dead gl_occlusion cvar. 2002-08-23 21:55:59 +00:00
Ragnvald Maartmann-Moe IV 7bf21e20ed Use R_CullSphere for rotated bsp models. 2002-08-23 21:14:43 +00:00
Ragnvald Maartmann-Moe IV aa85219dc4 Commit R_CullSphere use for alias models. Only a 3.3% speed hit for me, and should quiet "foo is disappearing" whinging. 2002-08-23 04:09:00 +00:00
Bill Currie c44ec1993d handle up to 512x512 map textures /properly/. would be nicer if the max
could be dynamic
2002-08-22 19:00:55 +00:00
Ragnvald Maartmann-Moe IV c91f1a2aea Rename Length to VectorLength. 2002-08-20 02:22:40 +00:00
Ragnvald Maartmann-Moe IV 32a85e7130 Clipping cleanups.
Calculate radius for alias models as well as brush.
Culling is no longer optional on alias models (was only ever disabled for viewmodel, which is a lot of extra effort to avoid clip testing 1 thing out of hundreds).
Clip QSG2 scaled alias models with a scaled bbox.
2002-08-20 00:48:59 +00:00
Bill Currie 55cdde81da rename clmodel to model 2002-08-19 04:15:46 +00:00
Bill Currie b1a180b25e move the view model check for min_light into the model loader (checks for
progs/v_*)
2002-08-19 04:05:02 +00:00
Bill Currie 1a0cf8d1f4 remove some redundant/incorrect code 2002-08-14 06:28:38 +00:00
Bill Currie 7ed7938b1c get colored lighting working reasonably well 2002-08-14 05:45:50 +00:00
Bill Currie 2abaf27cdc attempt to fix the dark models at centers of dlights 2002-08-12 15:36:52 +00:00
Bill Currie 8e97d6279a first stab at colored alias model lighting 2002-08-12 06:14:55 +00:00
Bill Currie 1afd2d95b2 break out the 1 vs 3 lightmap components code into separate functions and
do preliminary support for colored alias model lighting
2002-08-12 04:42:29 +00:00
Bill Currie 7e4e294089 fix the unlit models in full light bug 2002-08-12 02:05:45 +00:00
Bill Currie 4123d74e5e don't segfault when a surface uses the `null' texture (r_notexture_mip) 2002-08-09 06:07:25 +00:00
Bill Currie cbde41c669 damnit! 2002-08-08 04:41:41 +00:00
Bill Currie 3baec9e856 clean out the dead mtex code 2002-08-08 04:27:49 +00:00
Ragnvald Maartmann-Moe IV f773e1fa36 Minor alias model rendering speedup. 2002-08-03 07:07:23 +00:00
Ragnvald Maartmann-Moe IV 10c3f91a24 Revert taniwha's broken-radeon workaround. 2002-08-03 07:07:00 +00:00
Bill Currie 9c08f5b169 fix a typo that caused weirdness with the lerping 2002-08-03 06:13:35 +00:00
Ragnvald Maartmann-Moe IV 97d6f46f75 Speed up 16bit coord alias models a bit. (only one VectorScale per vertex now) 2002-08-02 18:07:53 +00:00
Bill Currie 2ce0f2ded2 we now require modern autoconf (2.52+), automake (1.6+) and libtool (1.4+).
This gives us a bunch more flexibility. plugins no longer have the "lib"
prefix or the version suffix, they're now installed in
$fs_sharepath/QFplugins,, builds should take much less time (in general,
only one of pic or non-pic versions are build), bins and libs can have
individual CFLAGS
2002-08-01 19:49:10 +00:00
Ragnvald Maartmann-Moe IV 587de27849 Another step towards QSG2 compliance. 2002-07-25 14:43:36 +00:00
Ragnvald Maartmann-Moe IV 3c7d65a798 Whitespace. 2002-07-25 14:42:41 +00:00
Ragnvald Maartmann-Moe IV 4ed68266ea Speedup when r_waterripple = 0, and small speedup to texture coordinate calculation. 2002-07-25 14:01:36 +00:00
Bill Currie 51e4cad3fe get Draw_SubImage doing transparencies 2002-07-25 05:04:22 +00:00
Bill Currie 51b189f56a make Draw_SubPic do transparent pics 2002-07-25 04:30:50 +00:00
Bill Currie defcedec49 give access to Draw_SubPic 2002-07-24 21:39:03 +00:00
Ragnvald Maartmann-Moe IV d3fc8c5fb6 No need for function pointers on R_AddDynamicLights_*, they are never called from outside the R_BuildLightMaps_* function that matches them.
Nice spotting, taniwha!
2002-07-24 15:30:28 +00:00
Ragnvald Maartmann-Moe IV 85c7e43aef Split lightmaps off from surface drawing. 2002-07-23 19:57:47 +00:00
Ragnvald Maartmann-Moe IV 1f8a1d613f Fix r_particles_nearclip being forced to max. 2002-07-08 00:05:33 +00:00
Ragnvald Maartmann-Moe IV d297c2b3a3 Colormod & alpha for brushmodels, excluding skypoly emittors. 2002-07-07 06:15:36 +00:00