fix the mathlib corner case vectoangles2('0 0 -1', '...') git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8491 d7cf8633-e32d-0410-b094-e92efae38249
added DP_QC_VECTOANGLES_WITH_ROLL git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7774 d7cf8633-e32d-0410-b094-e92efae38249
move two #defined to quakedef.h, and always include quakedef.h first before any other includes, even system headers. This is to make compilation with gcc -combine work. Also, fix some type mismatches between source files. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7689 d7cf8633-e32d-0410-b094-e92efae38249
- the Linux sound modules (ALSA and OSS) are now write-based, instead of mmap-based. It should fix the problems with inboard sound cards - added 3 cvars controlling the sound output format: snd_speed, snd_channels, and snd_width (default values: 48000, 2, and 2 respectively). They're saved in the config file. - the checks for command line options and environment variables modifying the sound output format are now common to all modules. The command line options supported are: -sndmono, -sndstereo, -sndquad, -sndspeed, and -sndbits. The environment variables supported are: QUAKE_SOUND_CHANNELS, QUAKE_SOUND_SPEED, and QUAKE_SOUND_SAMPLEBITS. - added a (still dumb) function to figure out a better sound format when the initialization of the sound card failed - sound modules can now suggest a sound format if the initialization of the sound card failed - you can now do a "snd_restart" while having modified snd_width and/or snd_channel. Doing a snd_restart with a modified snd_speed isn't yet supported, it will fall back to the previous speed - The WGL video module was blocking the sound output when the application window lost the focus. Now, this code is shared and the AGL, GLX and SDL video modules implement such a mecanism - A lot of minor fixes, changes, factorizations and rewrites all over the sound engine code and its modules - added CeilPowerOf2() in the math library - fixed BSDmakefile for NetBSD git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6415 d7cf8633-e32d-0410-b094-e92efae38249
eliminated qbyte type, now uses unsigned char throughout the engine for this purpose git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5789 d7cf8633-e32d-0410-b094-e92efae38249
#ifdef 0'd out BoxOnPlaneSide_Separate as it is not used git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5761 d7cf8633-e32d-0410-b094-e92efae38249
replaced uses of VectorNormalizeFast with VectorNormalize as it was broken on x86_64 (probably just because it used long * casts of floats) and was never much faster on modern CPUs anyway made a lot of internal functions in portals.c static, and replaced two vector subtracts and a crossproduct with TriangleNormal git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5414 d7cf8633-e32d-0410-b094-e92efae38249
more refactoring of q1bsp rendering git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5029 d7cf8633-e32d-0410-b094-e92efae38249
Tomaz optimized AngleVectorsFLU for the roll == 0 case git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4175 d7cf8633-e32d-0410-b094-e92efae38249
Tomaz optimized AngleVectors for the roll == 0 case git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4173 d7cf8633-e32d-0410-b094-e92efae38249
added Print versions of Printf functions and made all calls that do not need formating use the Print versions; yes this is a cosmetic cleanup, prints are too rare to have any performance improvements. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3991 d7cf8633-e32d-0410-b094-e92efae38249
added several BoxPlane comparison functions to find information on corners relative to the plane (rather than merely checking which side it is on) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3850 d7cf8633-e32d-0410-b094-e92efae38249
more q3bsp work (and no it still doesn't work right) converted over most of the engine to use new SUPERCONTENTS_ values (bit flags), and the q1bsp and q3bsp loaders convert to these, conversion to q1 contents and back is supported as well other stuff... I've forgotten what git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3398 d7cf8633-e32d-0410-b094-e92efae38249
#if 0'd out a few unused functions git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3224 d7cf8633-e32d-0410-b094-e92efae38249
added Math_atov function (ascii to vector), tries to parse any imaginable vector (even badly formatted ones with varying numbers of spaces) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2854 d7cf8633-e32d-0410-b094-e92efae38249
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) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2793 d7cf8633-e32d-0410-b094-e92efae38249
tiny cleanup to RotatePointAroundVector (uses a VectorCopy instead of 3 lines) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2691 d7cf8633-e32d-0410-b094-e92efae38249
removed all 3x4 matrix support (wasn't used, and isn't likely to ever be used) moved Matrix4x4_Print to mathlib.[ch] because it really doesn't belong in the entirely quake-independent matrixlib.[ch] git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2639 d7cf8633-e32d-0410-b094-e92efae38249
BoxOnPlaneSideFunc code - gone, replaced by BoxOnPlaneSide BOX_ON_PLANE_SIDE macro - gone, no replacement necessary (use BoxOnPlaneSide) R_CullBox and R_CulledBox macros have been replaced by optimized functions this gets a minor speed gain overall git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2355 d7cf8633-e32d-0410-b094-e92efae38249
some whitespace cleanups and a correction of a comment git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2018 d7cf8633-e32d-0410-b094-e92efae38249