havoc [Thu, 27 Mar 2003 12:25:32 +0000 (12:25 +0000)]
Fix for win32 dedicated servers (oh it still doesn't compile, other problems remain with sys_win.c, but this one thing has been annoying me long enough)
havoc [Thu, 27 Mar 2003 08:58:07 +0000 (08:58 +0000)]
Elric added BuffBigLong, BuffBigShort, BuffLittleLong, and BuffLittleShort functions intended for reading from misaligned locations in file memory buffers (these read as bytes rather than entire numbers, so memory misalignments are not a problem on Sparc and certain other CPUs)
havoc [Fri, 21 Mar 2003 21:52:04 +0000 (21:52 +0000)]
Thanks to IceDagger for pointing out this important optimization to multipass specular rendering - removes one pass (dropping from 6 to 5 passes on GF2, 5 to 4 passes on GF3/Radeon) by squaring specular even on the first pass
havoc [Fri, 21 Mar 2003 21:47:57 +0000 (21:47 +0000)]
This is a patch from Elric greatly cleaning up the filesystem portions of the engine, and partially prepares the engine for .pk3 support (yay), this also removes support for gzipped files (but that had been disabled for months anyway)
havoc [Sat, 15 Mar 2003 04:54:47 +0000 (04:54 +0000)]
varray_* rewritten to remove padding (varray_vertex3f, varray_texcoord2f, varray_texcoord3f, varray_color4f now exist), this required changes to a huge amount of code (but netted a 30% speed gain typically)
fixed some various bugs
added voodoo1/2 support in realtime lighting engine (well, except for the fact it still requires stencil, which voodoo1/2 don't have, this will be addressed later when world lights and dlights are independently controlled)
changed lightning beams a bit (they're now white) and due to a request I added support for r_lightningbeam_qmbtexture (loads textures/particles/lightning.pcx and knows approximately how to use it, I recommend changing r_lightningbeam_repeatdistance to make it look right)
molivier [Thu, 13 Mar 2003 16:10:51 +0000 (16:10 +0000)]
Makefiles cleanups: r_explosion.o was declared twice in all Makefiles; removed some commented-out commands; diff reduction between makefile and makefile.mingwcross; forgot to call builddate previously; strip was even called on non-release binaries.
havoc [Sun, 9 Mar 2003 20:33:23 +0000 (20:33 +0000)]
Vic informed me of the AGP settings (0-0.25, 0-0.25, 0.25-0.75) and video memory settings (0-0.25, 0-0.25, 0.75-1) for use with GL_NV_vertex_array_range, they seem to have no effect but the defaults have been updated (to 0.2, 0.2, 0.7) to choose AGP
havoc [Sun, 9 Mar 2003 11:39:08 +0000 (11:39 +0000)]
changed R_Mesh_ system (again), now uses R_Mesh_GetSpace to set up varray_* pointers, then fills in the data, then calls R_Mesh_Draw (this can be done repeatedly, but vertex data should *NOT* be modified after the first call)
havoc [Sun, 9 Mar 2003 11:19:57 +0000 (11:19 +0000)]
Mod_FindNonSolidLocation now takes a radius and can output to a different vector than the input (purpose: the sphere is nudged out of any surfaces in the area, this makes realtime lighting look a lot better as the lights aren't too close to the surface)
havoc [Fri, 7 Mar 2003 09:34:15 +0000 (09:34 +0000)]
menu.c - changed M_DrawSlider to take a value and a min/max range, now prints the current value of the cvar as well
menu.c, menu.h, gl_draw.c - added new color control options menu (the gl_draw.c change is merely adding a "ditherpattern" texture)
menu.c - added "Delay refresh (faster)" to options menu (gl_delayfinish cvar)
menu.c - added "Game Speed" to options menu (slowmo cvar)
vid_wgl.c, vid_glx.c, vid_null.c, vid_shared.c, vid.h, palette.c, palette.h, host.c - gamma system redesigned (VID_SetGamma now takes ramps, VID_GetGamma added, other cruft removed), moved VID_UpdateGamma to vid_shared.c, gamma is now turned off when darkplaces is minimized in X11 (unmapped), and when it's window is not active in Windows as well
vid_wgl.c - trailing whitespace fixed
vid_shared.c - added v_color_enable, v_color_black_[rgb], v_color_grey_[rgb], and v_color_white_[rgb] cvars as another way to adjust color settings
gl_draw.c - added support for v_color_* cvars, removed support for darkening screen (not possible to do in color)
vid_glx.c - got rid of unfinished X11 colormap based gamma code (using XF86 VidMode extension instead)
havoc [Fri, 7 Mar 2003 09:30:21 +0000 (09:30 +0000)]
got rid of AreaNode stuff, now only has AreaGrid (had to add sv_areagrid_outside node)
renamed sv_useareanodes to sv_debugmove (inverted behavior)
SV_CreateAreaGrid now has a minimum grid size (sv_areagrid_mingridsize cvar), this greatly improved performance in helm18
SV_ClipToAreaGrid and SV_TouchAreaGrid no longer process any edicts twice (edict_t now has areagridmarknumber for this purpose)
increased AREA_GRID from 16 to 512
added SV_ClipToNode function to get rid of duplicate code in SV_ClipToAreaGrid
havoc [Fri, 7 Mar 2003 09:26:11 +0000 (09:26 +0000)]
added DrawQ_SuperPic, fixed severe bug in DrawQ_Mesh (was not allocating enough room in drawqueue for the texcoords), DrawQ_Pic and DrawQ_Fill now use DrawQ_SuperPic
havoc [Fri, 7 Mar 2003 09:24:59 +0000 (09:24 +0000)]
view.c, cl_parse.c, cl_main.c, gl_rmain.c - trying to remove all uses of origin, angles, or scale fields of entity_render_t
view.c, gl_rmain.c - viewmodel entities are now processed in view.c instead of gl_rmain.c
view.c now uses matrix and inversematrix for view damage kicks
what this means:
the QC feature viewmodelforclient now works
havoc [Sun, 2 Mar 2003 07:20:28 +0000 (07:20 +0000)]
changed gloss behavior, now darkens light intensity (to 25% of normal) instead of assuming gloss texture is dim, this is consistent with tenebrae behavior, inconsistent with doom3 behavior (sigh...), this makes OgrO's model skins look a lot better
no longer spews 'refusing to create light' warnings when loading map light entities that actually aren't lights at all
havoc [Fri, 28 Feb 2003 11:28:10 +0000 (11:28 +0000)]
lights now have an orientation (this isn't editable yet, and is infact not really supported for rotated lights at the moment, their bbox would need to be rotated)
lights now use bbox culling instead of radius (because they aren't round in 2D texture mode)
fixed LOTS of light culling bugs (particularly with surface selection)
fixed scissor to be more efficient (smaller) when easily done (entirely infront of view) and fixed some bugs
got rid of ShadowSphere code in gl_rmain.c (it was not used)
added back RadiusFromBounds (and optimized it) and added RadiusFromBoundsAndOrigin
removed trailing whitespace in mathlib.c
added BoxesOverlap macro to mathlib.h
fixed a portal-flow bug when a light lies directly inside a portal polygon (now checks both leafs involved, very mild search tolerance for leafs around the light)
added back 3d attenuation texture (true spherical lights make a return, r_shadow_texture3d cvar controls this)
fixed light-bleeding in attenuation textures at the edges (fixed a bug in the biasing during texture generation, now the edge is always black as it should be)
realtime lighting texture generation (attenuation/normalizationcubemap) now has some macros for more easily adjusting texture resolutions
reduced resolution of attenuation and normalization textures
added a bunch more rendering paths for diffuse and specular lighting, to reduce number of passes in a few cases (and allow use of 3D attenuation texture)
havoc [Fri, 28 Feb 2003 11:27:10 +0000 (11:27 +0000)]
some added structures in in preparation for another protocol version bump (to add partial entity updates to avoid kicking people off server when packet buffer fills up in a single frame - yes this means rate capping and such will be possible)
havoc [Thu, 27 Feb 2003 00:00:31 +0000 (00:00 +0000)]
changed TEXF_CLAMP to use GL_CLAMP_TO_EDGE (GL_EXT_texture_edge_clamp or GL_SGIS_texture_edge_clamp) instead of GL_CLAMP because it's a more useful behavior all-round, also fixed normalization cubemap on non-NVIDIA cards by doing this (I was properly using GL_CLAMP for attenuation texture, but not for normalization cubemap... *slaps self*)
havoc [Fri, 21 Feb 2003 09:24:53 +0000 (09:24 +0000)]
added new method of culling irrelevant entity collisions - a grid of areas
the areanode system still lingers because it can cope with things the grid can not (entities outside the grid, or too large for the alloted 16 grid links per entity)
havoc [Thu, 20 Feb 2003 09:17:42 +0000 (09:17 +0000)]
some minor cleanup of PartialIPAddress (and some comments about how stupid it is) and a comment about hostname coming from network address being stupid, and some whitespace
havoc [Thu, 20 Feb 2003 09:15:46 +0000 (09:15 +0000)]
now counts (very approximate) cost of builtin functions called by progs, profile command reports this in addition to the instructions count, also profile now reports a whole list, not just the top 10
havoc [Mon, 17 Feb 2003 00:58:53 +0000 (00:58 +0000)]
improved Com_HexDumpToConsole, it now prints properly (not with a data byte on the left side followed by offset number, and other sillyness), and also prints a text listing beside the hex, it remains the same width as the old hex-only listing.
havoc [Mon, 10 Feb 2003 14:46:15 +0000 (14:46 +0000)]
MAX_EDICTS has changed to 32768. Yes this is madness. Thanks to banshee for prompting this necessity to run his map helm10000!
Sound protocol has been upgraded to be able to send 16bit entity numbers (this allows going beyond the old 8192 limit)
MAX_ENTITY_DATABASE is now dependent on MAX_EDICTS
MAX_DATAGRAM increased from 8000 to 65536
MAX_MSGLEN has been removed (now uses MAX_DATAGRAM)
NET_MAXMESSAGE is now dependent on MAX_DATAGRAM
SV_PushMove's list of moved entities has been moved into sv.moved_edicts (just an array of pointers) and their original origin and angles have been moved into edict_t, this avoids stack crashes on win32 with the new edict limit
increased MAX_MODELS and MAX_SOUNDS from 1024 to 4096 (this is not really necessary but a good idea)
havoc [Fri, 31 Jan 2003 07:27:31 +0000 (07:27 +0000)]
chthon lightning no longer uses beam polygons
lightning beams are now relative to their owner entity (if they have one), this makes aiming lightning look instantaneous for the first time ever in quake
warp [Mon, 27 Jan 2003 09:38:31 +0000 (09:38 +0000)]
The gcc 2.95 problem was in fact OP_STORE_V doing nasty things to numbers that were not quite 'valid' floats, so we now just copy as ints.
This allows us to make the string handling /much/ cleaner again.
havoc [Mon, 27 Jan 2003 02:54:54 +0000 (02:54 +0000)]
lightning beams have been replaced with a polygon effect which renders faster than the model effect and looks... oh umm... about 100x better, old effect still available - cl_beampolygons 0 to go back to models - some r_lightningbeam_* cvars added for tweaking new effect
r_speeds now reports some realtime lighting info
shadowless light support added
(unsuccessful) attempt to fix r_drawportals by moving the call to happen whether portal rendering was used or not
comment about possible optimization to shadow volumes added (rather, inverted light volumes and how to get maximum performance from them)
light styles are now checked for validity (must be in the right number range)
tiny cleanup to cubemap name handling (cubemaps are still not actually supported)
r_editlights_rtlightcolorscale and sizescale are now applied only in LoadWorldLights and SaveWorldLights, not in light creation (also somewhat to compensate for this fact, .lights loading has been tweaked to double the brightness)
torch light colors changed (more orange)
r_editlights_spawn no longer takes parameters
r_editlights_edit now has subcommands instead of setting all properties, the commands are: origin, originx, originy, originz, move, movex, movey, movez, radius, color, style, cubemap, shadows
r_editlights_toggleshadow added (useful for point and click shadow toggling)
display overlay now shown when pointing at a light in editing mode, indicating all properties of the light
havoc [Thu, 23 Jan 2003 20:10:07 +0000 (20:10 +0000)]
entity shadow casting is now optional per entity (EF_NOSHADOW added), and special entities (static entities like torchs, and tempentities like beams) do not cast shadows
intermission player does not cast shadows and the cameraman in Nehahra movie and cinematics no longer casts shadows
havoc [Thu, 16 Jan 2003 23:53:26 +0000 (23:53 +0000)]
works with NULL worldmodel
fixed overbright lighting! (light flickering is now smooth and everything)
added r_editlights_rtlightssizescale and r_editlights_rtlightscolorscale which scale light properties when loading as well as saving (to undo the change - this can be exploited to modify all lights in the level)
reduced used area of attenuation texture a little to ensure black edges
changed defaults for attenuation texture settings and rtlights sizescale/colorscale to greatly improve performance while still looking good
now defaults to no fake bumpmapping on walls (saves texture memory and looks better to me)
havoc [Wed, 15 Jan 2003 13:05:32 +0000 (13:05 +0000)]
expanded string table offset table from 1024 to 65536, there must be a better solution than this though...
this fixes savegame loading (which allocates lots of negative string offsets)
havoc [Tue, 24 Dec 2002 23:00:59 +0000 (23:00 +0000)]
loadimagepixels is a little cleaner now (yes made cleaner by goto...) and dprints info about loaded images
critical bug in image_loadskin fixed (s->basepixels_width and height were not being set)
havoc [Sun, 22 Dec 2002 22:56:09 +0000 (22:56 +0000)]
unified model skinframe loaders used for mdl, md2, md3, and bsp textures (both external and internal where applicable)
imageskin_t and image_loadskin/image_freeskin functions added to image.[ch] for use by the unified skinframe loaders
added palette_nocolormap
split r_shadow_bumpscale cvar into r_shadow_bumpscale_bumpmap (for _bump textures) and r_shadow_bumpscale_basetexture (self explanatory)
now loads _norm normalmap textures (tenebrae compatibility)
_nmap normalmap texture support removed (it was broken in the previous release and I don't need to bog down the texture loader with even more unnecessary names)
r_shadow_lightattenuationpower added (default 2, to leave it looking identical to previous versions, this controls the falloff curve of light)
renamed detailtextures array to mod_shared_detailtextures and moved it and related code to model_shared.[ch]
removed progs/missile.mdl shadow casting check (in r_shadow_realtime mode) I had forgotten to remove before committing last time