Commit graph

2937 commits

Author SHA1 Message Date
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
8e30d3098e Fix asm ilnking in mingw.
It seems that recent binutils/libtool doesn't like exporting symbols that
don't begin with a _.
2011-09-10 17:49:14 +09:00
Bill Currie
da7ddc35c0 Fix the segaults when trying to use snd_disk.
It's output is still bogus (and it writes to the current directory!), but
at least the plugin can be used without any nasty issues.
2011-09-10 12:07:18 +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
a426dacc8a Add a missing \n 2011-09-09 17:43:48 +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
20d056e6c5 Fix my broken warnings fixes.
That's what you get for blinding working on code you don't grok :P
2011-09-08 21:05:33 +09:00
Bill Currie
881d4babce Fix some undefined symbols in snd_alsa.c.
Serves me right for testing with only my debug build :P
2011-09-08 18:10:09 +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
2ae33a753a Support non-interleaved mmap sound.
Unfortuanately, I can't test this properly as I don't have any such
hardware, but as the code is mosly an edited copy of the interleaved code,
any errors should be easy to fix.
2011-09-07 17:00:57 +09:00
Bill Currie
a8ea3aaad9 Allow dma sound targets to specify an xfer function. 2011-09-07 17:00:18 +09:00
Bill Currie
9ffa1f410a Detect the silent death of the jack client thread.
When jackd gets an unhandled xrun, it stops all processing but neglects to
tell the client about it. Thus, add a bit of a watchdog function to
s_update() and assume the client thread is dead if there's no sign of life
after one second. No more hanging on exit.
2011-09-07 15:16:27 +09:00
Bill Currie
581539f7af Make debug printing a little smarter.
When a field or global name is used, the printed value reflects the type
of that variable.
2011-09-07 09:41:06 +09:00
Bill Currie
91f6b7f555 Better use of Sys_Printf. 2011-09-07 09:41:06 +09:00
Bill Currie
39190c5e2c Remove an unnecessary include.
Don't need that :P
2011-09-07 09:41:05 +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
1c47f9e16d Kill some magic numbers. 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
5c9ab2832f Fix win32 cross-building.
No idea if the code actually works :(
2011-09-04 09:48:16 +09:00
Bill Currie
e50f0e18ba Make netmain use netadr_t, same as netchan.
Having sockaddr and friends in a header file was bad news for portability
(especially windows).
2011-09-04 09:45:19 +09:00
Bill Currie
5ee01879ec Missed a spot for net_family. 2011-09-03 16:28:00 +09:00
Bill Currie
80b2b82092 Add a cvar to control the address family.
OpenBSD doesn't allow mixed binding of ipv4 and ipv6, but being able to use
ipv6 enabled qf with ipv4 addresses would be nice...
2011-09-03 13:04:47 +09:00
Bill Currie
29a52a8cc8 FIx it for IPv4, too.
Oops, I forgot about that :P
2011-08-31 18:32:47 +09:00
Bill Currie
bfcdc5ed17 Fix qw networking on OpenBSD.
OpenBSD is very picky about the address size, but does provide sa_len and
friends to make life easier. Use them as appropriate :)
2011-08-31 18:07:41 +09:00
Bill Currie
f75b0a611b Some compile fixes for OpenBSD 2011-08-25 22:35:20 +09:00
Bill Currie
0d5bebabe2 Replace qsockaddr with AF_address_t.
It seems qsockaddr's assumptions aren't necessarily portable, as OpenBSD
seems to be doing weird things with qsa_family. Even if that's not the
case, this is cleaner.
2011-08-24 09:14:02 +09:00
Jeff Teunissen
1cc2b1b178 whitespace 2011-08-23 01:39:40 -04:00
Jeff Teunissen
d2fa1e2479 QW IPv6: lose a pointless assign
We already assign a->family earlier, no need to do it again.
2011-08-23 01:39:40 -04:00
Bill Currie
87ad73f146 Add even more info to the address comparison failure.
It turns out the family check is failing. Why?
2011-08-22 18:34:52 +09:00
Bill Currie
ce07000054 Make the address comparison a little more informative.
Still hunting the openbsd connection issues. It seems the address
comparision isn't working.
2011-08-22 10:30:35 +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
bb065bd233 Be a little leniant with vector param stores.
qcc always used vector stores to load values into the function parameters,
but if the location of the value is too close to the end of the global data
block (the vector spans the end of the block), it would trigger the bounds
check code. Thus, allow such instructions without a murmer, so long as it
actually is a parameter write.
2011-08-16 12:10:05 +09:00
Bill Currie
53049e33eb Make the interface code more portable.
It turns out SIOCGIFINDEX isn't (readily?) available in BSD, but
if_nametoindex() is defined by posix, so use that instead.
2011-08-16 10:03:43 +09:00
Bill Currie
4cec4b9f96 Rewrite the interface detection code.
Turns out SIOCGIFCONF is rather painful to get working cross-platform. This
should work better, and can be used even with ipv6 :)
2011-08-11 18:32:39 +09:00
Bill Currie
c1a60551ae Clean up default rate setting and add explicit support for 48kHz. 2011-08-11 17:22:14 +09:00
Bill Currie
5feb0454ca Add and use SYS_SND for both sound and cd debug prints. 2011-08-11 17:20:33 +09:00