Commit Graph

766 Commits

Author SHA1 Message Date
Bill Currie 87390f53b0 Z_Realloc() should zero-fill the expandded part of the mem
Patch from Ozkan Sezer (sezero). Thank you.
2011-12-19 09:45:46 +09:00
Bill Currie 91e65b6c80 Rename mplane_t to plane_t and clean up the mess.
I got rather tired of there being multiple definitions of mostly compatible
plane types (and I need a common type anyway). dplane_t still exists for
now because I want to be careful when messing with the actual bsp format.
2011-11-28 20:54:34 +09:00
Bill Currie 6d2b92125a Make nva a little more memory efficient. 2011-11-15 13:47:05 +09:00
Bill Currie d9ab3a1f54 Move the config file/command line parsing into qargs.c
I don't like the COM prefix, but it will do for now.
2011-09-11 14:57:05 +09:00
Bill Currie a71acc9ae5 Move the essential init code into Sys_Init(). 2011-09-11 14:56:47 +09:00
Bill Currie 6fb73b5ae8 Nuke some mystery code.
I have no idea why I did that, but it crept in with the var substitution
fix, so I guess it might have been an attempt to fix a bug, but it looks
like it was broken anyway.
2011-09-11 13:10:14 +09:00
Bill Currie e5add8b4f5 Use dstring_freeze() to cleanup some code. 2011-09-11 13:09:24 +09:00
Bill Currie 8bab548d16 Make the hud type configurable via dirconf.
Currently only "id", "hipnotic" and "rogue" are supported (anything else is
treated as "id"). Has no effect in quakeworld (good thing too: changing
gamedirs is a little broken).
2011-09-11 08:13:26 +09:00
Bill Currie bfd1680c15 Fix a 32/64 bit portability issue. 2011-09-09 19:56:16 +09:00
Bill Currie 999912e49a I thought I'd tested those changes :( 2011-09-09 19:55:54 +09:00
Bill Currie d043e2bf17 Rewrite QFS_FileBase().
It now uses QFS_SkipPath() and QFS_FileExtention() to
find the file's base name.
2011-09-09 17:39:00 +09:00
Bill Currie d92488ce9f Rewrite QFS_DefaultExtension() and QFS_SetExtension().
They now use QFS_FileExtension() to find the correct
place for the extension.
2011-09-09 17:37:45 +09:00
Bill Currie 225f1cd06c Rewrite QFS_StripExtension() to use QFS_FileExtension(). 2011-09-09 17:35:12 +09:00
Bill Currie 96ef0ffaea Rewrite QFS_FileExtension() to be more correct. 2011-09-09 17:33:29 +09:00
Bill Currie 08fa6be9f4 Fix a potential buffer underflow. 2011-09-09 17:30:07 +09:00
Bill Currie 6da725d510 Simplify and slightly improve Cmd_StuffCmds().
Make use of dstring to manage the built command mini-script.
Ensure + and - that do not come after whitespace do not start a new
command.
2011-09-08 12:37:52 +09:00
Bill Currie e8e8dad535 Fix a potential crash with the cvar reset command. 2011-09-07 21:07:52 +09:00
Bill Currie deddb5cb6a Partially document the message api. 2011-09-04 09:58:12 +09:00
Bill Currie 9afb691dd9 Change MSG_ReadShort to return an unsigned short.
Avoiding the sign extension by default seems to be more useful.
2011-09-04 09:58:12 +09:00
Bill Currie 12e238f806 Add a function to convert quake angles to a quaternion.
The test works by comparing the result of AngleVectors with forward,
right, and up vectors rotated by the quaternion resulting from AngleQuat.
2011-09-04 09:58:12 +09:00
Bill Currie fe3cdbcf5a fix a snafu in quattomat 2011-09-04 09:58:12 +09:00
Bill Currie eb205d73fd Add a function to convert a quaternion to a rotation matrix. 2011-09-04 09:58:12 +09:00
Bill Currie f75b0a611b Some compile fixes for OpenBSD 2011-08-25 22:35:20 +09:00
Bill Currie 1402feafd2 Kill some magic numbers and clean up some whitespace. 2011-08-20 16:30:43 +09:00
Bill Currie cf2845a387 Ensure Sys_Error can not form an infinite loop.
I don't remember what propted this change, but it seems like a good idea
anyway, so get it into the repository and clean out my stash :)
2011-08-20 13:13:43 +09:00
Bill Currie ff857a9c71 Permit control of single character tokens. 2011-08-11 14:22:27 +09:00
Bill Currie bf58ad9d80 And silence a "set but not used" warning. 2011-07-29 17:21:33 +09:00
Antti Harri 358a844a42 Implement --version-info configure switch to override QuakeForge
library versioning. From Lasse Collin, thanks!
2011-07-09 01:23:36 +03:00
Bill Currie 6114156b49 Add Cvar_RemoveAlias.
Now aliases can be deleted (needed for menus).
2011-07-05 21:59:47 +09:00
Bill Currie a7291943f7 Fix up Cvar_MakeAlias's error checking. 2011-07-05 21:51:38 +09:00
Bill Currie d2894a6f68 Rename Cvar_AliasGet to Cvar_MakeAliase. 2011-07-05 20:28:57 +09:00
Bill Currie 6484dd16c7 Finish cvar alias support.
Several functions that manipulate cvars were not checking for aliases.
2011-07-04 21:05:42 +09:00
Bill Currie 607a4be2e2 Fix a "set but not used" warning/error.
I'm not sure what I had planned with "list", so I just commented it out
with FIXMEs.
2011-06-13 16:44:30 +09:00
Bill Currie b18ff4ed3e Move test-qfs.c into a test directory.
Same as before: avoiding -prefic-pic issues.

Also, catch some minor snafus found in the previous commit. With this, make
distcheck passes again :)
2011-06-12 16:34:15 +09:00
Bill Currie 74a7e07dfc Use AM_CFLAGS instead of CFLAGS.
CFLAGS is meant to be reserved for the user.
2011-05-10 12:44:44 +09:00
Bill Currie d3771dfeba Resolve some inlining issues in recent gcc. 2011-05-04 09:31:18 +09:00
Bill Currie bc2174d92b Remove some dead variables reported by Spirit. 2011-05-04 09:30:38 +09:00
Bill Currie 7c113a12db Make zone errors a little more useful. 2011-03-20 15:50:09 +09:00
Bill Currie 4432bc0bef Make the offset in zone dumps more useful. 2011-03-08 22:44:56 +09:00
Bill Currie 33db650161 Add QuatInverse to calculate 1/q.
There's still no direct quaternion division because I don't know if the
definition of q1/q2 is (1/q2)*q1 or q1*(1/q2) (it does make a difference).
2011-01-18 22:22:18 +09:00
Bill Currie 13503198e5 Add quat_origin convenience constant.
Same as vec3_origin in that all elements are zero.
2011-01-11 08:41:40 +09:00
Bill Currie 3090a64faa Use the correct param for the full_new path.
This fixes the broken downloads.

*taniwha dons a brown paper bag.
2010-12-28 14:44:26 -05:00
Bill Currie 6e18c3df85 Make qfs developer prints a little more controllable. 2010-12-28 09:08:51 +09:00
Bill Currie 1f0851cc61 Fix QFS_FilelistFill for pak files.
Forgot to ensure the path separator was included in the fnmatch param. This
fixes the broken *list commands.
2010-12-27 10:31:54 +09:00
Bill Currie de04e1b602 Lots of win32 (mingw cross) build fixes.
HTTP (curl) support is missing, but everything else builds.
2010-12-23 11:40:16 +09:00
Bill Currie 9b9a60aa89 Make the -mem suggestion a little more realistic.
16M hasn't been enough for a long time.
2010-12-13 19:11:48 +09:00
Bill Currie 694a405578 Make sure unterminated lump names don't cause propblems when comparing. 2010-11-28 15:31:40 +09:00
Bill Currie f7412e8866 Ensure the string to be hashed is terminated. 2010-11-28 15:31:40 +09:00
Bill Currie 43a9232787 Add a function for retreiving the parsed token.
Saves having to reach into the token's dstring (script->token->str was
getting annoying).
2010-11-28 15:31:30 +09:00
Bill Currie ac88c86dd3 Scripts now treat {}()': as single character tokens. 2010-11-28 15:31:30 +09:00