Commit graph

2807 commits

Author SHA1 Message Date
Bill Currie
56fb4d9a22 allow safe bsp freeing
any memory the bsp thinks it does not own will not be freed
2010-10-13 20:52:05 +09:00
Bill Currie
1d86e71404 make WriteBSPFile take a const bsp_t *
This means that the supplied bsp can now be reused, as it should be.
2010-10-13 20:52:05 +09:00
Bill Currie
f4042c5b91 Make the bsp disk data structures type size independent.
However, this assumes float is always 32 bits.

Also use size_t for the *size fields in bsp_t and clean up the mess.
2010-10-13 20:52:05 +09:00
Bill Currie
3f08268038 Make sure unterminated lump names don't cause propblems when comparing. 2010-10-10 18:31:14 +09:00
Bill Currie
1902ca6159 Ensure the string to be hashed is terminated. 2010-10-10 18:21:30 +09:00
Bill Currie
7dc1ccdbea Add a function for retreiving the parsed token.
Saves having to reach into the token's dstring (script->token->str was
getting annoying).
2010-09-26 13:50:17 +09:00
Bill Currie
827d0d0ad6 Scripts now treat {}()': as single character tokens. 2010-09-26 13:50:17 +09:00
Bill Currie
f666f8d27a Get the lib dependency for testsound right.
No need for $(top_builddir) when the lib is in the same directory. Fixes
parallel builds.
2010-09-25 23:07:06 +09:00
Bill Currie
42faad9015 Move expand_squiggle() from quakefs to sys, and rename to Sys_ExpandSquiggle.
Hopefully the final resting place of this function.
2010-08-25 14:00:04 +09:00
Bill Currie
e9bd9a4baa Move QFS_CreatePath() to Sys_CreatePath(). 2010-08-25 13:52:24 +09:00
Bill Currie
4f620655be Document quakefs.h 2010-08-25 13:40:22 +09:00
Bill Currie
f1943ebaab Fix some path compression bugs. 2010-08-25 13:38:45 +09:00
Bill Currie
550b094b93 Unit testing for QFS_CompressPath 2010-08-25 13:38:30 +09:00
Bill Currie
05c57f219d Nuke a comment. 2010-08-25 13:38:24 +09:00
Bill Currie
c6be3c469a Make the names of static functions canonical. 2010-08-25 13:38:24 +09:00
Bill Currie
bbf2ac0204 Avoid creating // in path names. 2010-08-25 13:38:18 +09:00
Bill Currie
ba8ca132a9 Change QFS_Gamedir()'s parameter from dir to gamedir. 2010-08-25 13:31:24 +09:00
Bill Currie
745bdfafdf Eliminate QFS_LoadHunkFile().
It is unused, and part of the group of functions I wish to remove from QF.
2010-08-25 13:31:23 +09:00
Bill Currie
cbee789fe1 Change ProgPath to ModelPath and dir.progs to dir.models.
The default is still $path/progs, as that is what is expected by the
game-code.
2010-08-25 13:31:13 +09:00
Bill Currie
cf40f5073d Nuke QFS_WriteBuffers.
This function is too dangerous for my liking, and it's now unnecessary
since qfs has been locked down.
2010-08-25 13:31:13 +09:00
Bill Currie
031055a91f Move the qfs_* cvars out of quakefs.h
The qfs cvars are all private.
2010-08-25 13:31:13 +09:00
Bill Currie
0cc4bc8c69 Move searchpath out of quakefs.h.
It's not needed, nor should it be used, anywhere else.
2010-08-25 13:31:13 +09:00
Bill Currie
478394ef81 Nuke MAX_GAMEDIR_CALLBACKS
The number of gamedir callbacks is now unlimited.
2010-08-25 13:31:08 +09:00
Bill Currie
a51e888a1b Nuke MAX_OSPATH and clean up the mess. 2010-08-25 13:31:08 +09:00
Bill Currie
baede61f4f New function: dstring_strdup
I got tired of always doing dstring_newstr/dstring_copy, so I thought it
was time to wrap it. dstring_strdup is the dstring equivalent of strdup.
2010-08-25 13:31:00 +09:00
Bill Currie
5a6e66b23e hopefully, correct plugin linking options
how we got away with this for so long is beyond me, but it seems libtool
really wants -rpath even for plugins (otherwise it refuses to install them)
2010-08-21 13:01:35 +09:00
Bill Currie
2185a3dcd0 Remove almost all of my boxclip developement.
This is to prevent others accidently getting headaches from my code.
2010-08-20 14:13:23 +09:00
Bill Currie
fd24170b32 get the behavior or PL_NewData correct
It taking ownership of the data was the correct behavior, so go back to that.
2010-08-20 13:21:22 +09:00
Bill Currie
a744caa421 The public api of qfplist is now fully documented.
Evertyhing that can or should be private now is, and all public functions
are documented.
2010-08-20 13:10:37 +09:00
Bill Currie
1442273a8f more opaque correctness 2010-08-20 12:58:37 +09:00
Bill Currie
f55c203c5e use the plist api correctly
don't work directly with the plist data. the structs that enabled that will
go away shortly.
2010-08-20 11:57:47 +09:00
Bill Currie
669771681a split up and modernize configure.ac
Most of the guts of configure.ac have been moved to config.d and are then
brought in by m4_include. This will make maintaining configure.ac much easier.

Also drop use of PROGRAM and VERSION, using PACKAGE_NAME, PACKAGE_VERSION, and
on occasion, PACKAGE_STRING instead, and clean out some old files we no longer
need.
2010-08-19 15:01:43 +09:00
Bill Currie
4449f10c0a get alsa and sdl working, though sdl seems to be mono only 2010-08-15 05:15:47 +00:00
Bill Currie
bc4a3e79dc d'oh, bogus $ 2010-08-14 02:48:53 +00:00
Bill Currie
81ac779b7f forgot to add libsamplerate to the default renderer 2010-08-14 02:38:19 +00:00
Bill Currie
cc697236e5 bah, forgot that libsamplerate doesn't check for errors 2010-08-13 01:48:48 +00:00
Bill Currie
54fc922f6c better error checking while reading streamed data 2010-08-13 01:48:20 +00:00
Bill Currie
ce5658416d add support for up to 8 channels in sound effect files
The sounds are down-mixed to 2 channels (qf does not (yet) support more than
2 channel output), but this allows pretty much anything to be used for a
source of music. Only 5.1 (6 channel), stereo and mono have been tested, but
the others should work (any issues would be mis-interpretation/implementation
of the channel layout).
2010-08-12 02:28:27 +00:00
Bill Currie
b1620616b9 reset the "resampler" when seeking 2010-08-11 23:47:31 +00:00
Bill Currie
22e8698827 resampling now works
However, no fallback for when libsamplerate is missing.
2010-08-11 23:47:03 +00:00
Bill Currie
1c985bc925 bah, forgot these 2010-08-11 23:46:28 +00:00
Bill Currie
3499f5257f add a test app and a workaround for the clicking in the resamled stream
the proper fix for the clicking is to either use SRC's callback resampler or
fix snd_mem.c to handle not getting the samples it expects, but I think the
callback will be better in the long run.
2010-08-11 23:45:56 +00:00
Bill Currie
0e3b395943 ok, non-resampled flacs now work beautifully 2010-08-11 23:45:32 +00:00
Bill Currie
7502cd9ec5 making slow progress on sound quality
streamed oggs playback cleaning when not resampling, but flacs are still crap
2010-08-11 23:45:09 +00:00
Bill Currie
65a748fc3c floating point mixer now working
the resampler is being badly abused for streams, and it's not yet properly
autoconfiscated, but things are working. Better yet, at the correct pitch and
speed.
2010-08-11 23:44:34 +00:00
Bill Currie
2bb2d14b89 make "sample counts" frame based rather than mono sample based
that was always horribly confusing
2010-08-11 23:43:35 +00:00
Bill Currie
d0906f1453 conditionally build the sound format support files
Rather than using an ifdef around the entire code, get autoconf to do the work
for us. For one thing, this allows doxygen to produce decent docs. It also
makes for less compalation when building without support for various formats.
2010-08-11 23:42:42 +00:00
Bill Currie
c0a8c6c695 properly prefix all functions, static or not
makes doxygen produce better docs
2010-08-11 23:41:04 +00:00
Bill Currie
ac44950a69 sanitize the code by using defines for old flac libs 2010-08-11 23:40:35 +00:00
Bill Currie
46a067b2f6 Do proper error handling when loading sound files.
This fixes the segfault grg got when trying to play a 5.1 channel file.
2010-08-08 03:02:55 +00:00
Bill Currie
0bbb805b94 fix a case&paste error pointed out by grg 2010-08-08 01:58:17 +00:00
Bill Currie
0dfff8fd58 ignore stuff 2010-08-07 10:42:09 +00:00
Bill Currie
adee45d22b add a comment about the valid range of samples 2010-08-06 01:58:12 +00:00
Bill Currie
98a0da742a Prefill the sfx stream buffer to ensure the decoders have allocated any memory they might need. Problem found using jack_interposer (http://repo.or.cz/w/jack_interposer.git). 2010-08-06 00:41:42 +00:00
Bill Currie
dabb720fd1 be a little more honest (don't say "Playing" until we actually can) 2010-08-05 07:23:06 +00:00
Bill Currie
6e2a8f1e3d Do not allow sounds to start when we have no connection to the jack server. This fixes the shutdown hang when the connection to the server is lost. 2010-08-05 07:20:50 +00:00
Bill Currie
ace5e7a702 oops 2010-08-05 02:38:47 +00:00
Bill Currie
970dd0b872 avoid the old dga headers if we can (they're now deprecated) 2010-08-05 02:35:16 +00:00
Bill Currie
3e0aaea535 more build fixes from Despair (parallel make, this time) 2010-05-28 13:37:51 +00:00
Bill Currie
c1b12ed6ec fix a couple of gcc 4.5 issues that Despair pointed out (I don't have it yet) 2010-05-27 12:21:50 +00:00
Bill Currie
eb636ea16f win32 fixes and vc2008 build files from phrosty 2010-03-12 10:51:07 +00:00
Bill Currie
b49614a44f a bit of ncurses related cleanup
doesn't fix the corrupted input line when the output window is busy, but that
might be a gnome-terminal bug (seems to be ok on the linux console)
2010-01-13 06:52:42 +00:00
Bill Currie
6a8f14c701 nuke another \ in command handling 2010-01-13 06:51:13 +00:00
Bill Currie
edabbd5abe fix inputline updates when tab completion produces a large list
o never use stdscr: curses does not support overlapping windows. though
    stdscr was used only for getting the screen size, this is not necessary as
    the TIOCGWINSZ can be used instead.
  o batch the prints generated by tab comletion to avoid frequent updates of
    the screen. this seems to have fixed the corrupted output of the inputline
2010-01-13 06:47:48 +00:00
Bill Currie
e35ca56c1e wrap the call to Con_BasicCompleteCommandLine in a local function 2010-01-13 06:47:21 +00:00
Bill Currie
df7c5b2908 cleanup Con_BasicCompleteCommandLine a tiny bit
remove an unnecessary strdup/free and fix a strncpy bug
2010-01-13 06:46:54 +00:00
Bill Currie
53cd9be90a Progress on map changing with qtv clients
Rename SV_DemoSendMessages to SVR_SendMessages, and make sure SVR_SendMessages
and SV_qtvSendMessages get called when SV_SendMessagesToAll is called.
2010-01-13 06:45:43 +00:00
Bill Currie
7827086b54 make sure we actually have a stack frame 2010-01-13 06:42:59 +00:00
Bill Currie
997102fea8 audit the usage of "only"
There are still a few iffy places (notably around certain prepositions), but
the relevant sentences are now much easier to read.
2010-01-13 06:42:26 +00:00
Bill Currie
0a203c0ab5 qccx (etc) "integer" autodetection.
Check for usage of denormal floats and if found, either bail with a
descriptive error message or give a mild warning that things will probably
break. This avoids the possibility of things like RuneQuake getting "lucky"
and doing real harm, and certainly avoids the segfaults.
2010-01-13 06:36:54 +00:00
Bill Currie
00e590f5f5 Really nail down the args param in rua_obj_msg_sendv(). 2010-01-13 06:36:16 +00:00
Bill Currie
dbe0c763d5 fix the placement of the "paused" icon 2010-01-13 06:35:33 +00:00
Bill Currie
8abb9a69aa remove support for an optional = in struct/union declarations 2010-01-13 06:34:32 +00:00
Bill Currie
00f9d48f10 be a little more paranoid 2010-01-13 06:33:03 +00:00
Bill Currie
5c788d8d44 state.f is not an id instruction 2010-01-13 06:30:07 +00:00
Bill Currie
ff61dbb329 fix some sillies with QFS_FileList
Use dynamic strings instead of temp strings for the list
2010-01-13 06:29:01 +00:00
Bill Currie
e0d669590c plug a memory leak
the progs memory was never being freed between maps because the pointer was
being cleared at the start of PR_LoadProgsFile.
2010-01-13 06:27:19 +00:00
Bill Currie
5d6977288f implement bounds checking on all opcodes 2010-01-13 06:19:50 +00:00
Bill Currie
cb5bd43d4c warning fix from shortcircuit 2009-12-24 07:33:24 +00:00
Bill Currie
f315a122e5 attempt to handle jack shutdown. this should avoid locking up on client shutdown when jack disappears 2009-12-24 06:35:15 +00:00
Bill Currie
bf04589510 conheight proved to be eaiser than expected (d'oh, don't know why I couldn't see the obvious) 2009-12-24 05:46:16 +00:00
Bill Currie
a5f0fbc821 Proper widescreen support. The GL renderer now respects the pixel aspect calculated by the vid init code. Also, a new cvar: vid_aspect. The format is width:height and the values may be any float greater than 0. The default is 4:3, but any units may be used. 2009-12-24 05:33:41 +00:00
Bill Currie
4b0320f341 glx, gly, glwidth and glheight are now gone too. also GL_BeginRendering 2009-12-23 08:20:29 +00:00
Bill Currie
ee0de1b4e1 got it right this time 2009-12-23 08:05:03 +00:00
Bill Currie
c2945605bc oops 2009-12-23 07:57:07 +00:00
Bill Currie
8ddfdf03b2 with the changes in size handling, viewport setup becomes much simpler 2009-12-23 07:53:05 +00:00
Bill Currie
f2004abecc nuke scr_width and scr_height 2009-12-23 07:00:42 +00:00
Bill Currie
a2fa2d425b fix viewsize interaction with the cleaned up screen size handling 2009-12-23 06:29:11 +00:00
Bill Currie
e0cfe795b0 fix a bogus range check. this could have caused an infinite loop 2009-12-23 06:28:11 +00:00
Bill Currie
97f54e22df fix the broken sdl/sdl32 hud 2009-12-23 02:08:49 +00:00
Bill Currie
018a0b3bb6 fix the missing crosshair 2009-12-23 01:26:14 +00:00
Bill Currie
28601c8ea4 more screen size cleanup 2009-12-22 13:12:03 +00:00
Bill Currie
5d15c70a0d progress in cleaning up the screen size mess 2009-12-22 06:02:53 +00:00
Bill Currie
4a7b8f8246 don't look up aux function info when we don't have it 2009-12-21 14:07:43 +00:00
Bill Currie
52b2631341 sanitize con_width and con_height handling. con_height cvar was being ignored. 2009-12-21 12:36:12 +00:00
Bill Currie
b6a4fc1b58 fix the glaring error of the sw renderer's aspect ratio. still not quite right for non-4:3 screens, but it's better. 2009-12-21 10:10:45 +00:00
Bill Currie
236e89ed6b newest x11 seems to not define X_XF86VidModeGetGamma. thanks to witukind 2009-12-21 06:03:19 +00:00
Bill Currie
36a9ccb01a memcpy->memmove pointed out by Philippe Troin 2009-12-20 05:59:22 +00:00
Bill Currie
8166af6d47 oss patch from Philippe Troin 2009-12-20 05:58:16 +00:00
Bill Currie
61366f081b fbdev patch from Philippe Troin 2009-12-20 05:41:08 +00:00
Bill Currie
4ff2cb88cf bigscreen patch from Philippe Troin 2009-12-20 05:34:41 +00:00
Bill Currie
b14fcccd8f get qf compiling with gcc 4.4 2009-12-19 10:54:23 +00:00
Bill Currie
51932ee433 --enable-boxclip configure option and some more tweaks, I guess (been too long) 2009-12-19 04:45:01 +00:00
Bill Currie
5df7fe5512 printf bogosity fixes from Dabb 2009-04-10 23:59:48 +00:00
Bill Currie
a26cd68ea9 more tests, more progress. just need to fix a regression that popped up while fixing the new test (18) 2009-03-22 00:31:44 +00:00
Bill Currie
dd27143f62 finally got the failing test I wanted 2009-03-20 15:01:18 +00:00
Bill Currie
21c12ad7d5 damn, it failing was because I was using the wrong hull. now, why does the engine fail here? 2009-03-20 11:57:36 +00:00
Bill Currie
7dae886b93 label "expect" and "got" lines 2009-03-20 11:55:47 +00:00
Bill Currie
1f1375fdbb add another (currently failing) testcase 2009-03-20 11:51:59 +00:00
Bill Currie
384ad30df8 correct the last 4 edges. all existing testcases now pass. 2009-03-20 11:38:04 +00:00
Bill Currie
fea4189150 complete rewrite of validate_solid. also, put the trace points on the other side of the split plane. Just one more set of related tests to fix. 2009-03-20 11:20:59 +00:00
Bill Currie
0ff4165149 why didn't I do this earlier? 2009-03-20 03:40:30 +00:00
Bill Currie
f59f2dc7b9 some more progress with box clipping and much a saner test harness 2009-03-20 03:33:03 +00:00
Bill Currie
e992edaf31 that fixed the test case (why isn't sgn a standard function? :P) 2009-03-19 04:56:44 +00:00
Bill Currie
3be88c3e1d still disabled since it's still broken, but progress has been made. Fortunately, some of the breakage shows up as a regression in the testcases. 2009-03-19 03:16:24 +00:00
Bill Currie
0b1cc3d21f Support Japanese keyoards (yay, I can finally toggle the console :P) 2009-03-18 00:26:34 +00:00
Bill Currie
59c077638a Fix the annoying "Unknown interpreter 'id'" error. It was both bogus and a symptom of other problems (also fixed). 2009-03-16 11:49:52 +00:00
Bill Currie
0af43cf016 make the resampling state a little more self-contained. this should make 2009-01-08 07:48:08 +00:00
Bill Currie
d52df3a733 missed this when fixing things for Hikaru 2008-08-01 00:48:18 +00:00
Bill Currie
22caa5b4c4 and some more 2008-07-28 01:31:20 +00:00
Bill Currie
ba6e3c69cd hopefully fix type punning for gcc 4.2 2008-07-28 01:26:56 +00:00
Bill Currie
fe95805d86 various gcc 4.3 fixes 2008-07-19 05:40:57 +00:00
Bill Currie
e3b47c9c6d This should make stdint stuff work better in general (can't test properly due to my mingw setup being borked) 2007-11-25 04:44:53 +00:00
Bill Currie
1a307e306f Con_Printf actually has a use after all: it prints to the console /only/ (no redirects, etc) 2007-11-07 08:19:17 +00:00
Bill Currie
2b81eaea6c console.h include cleanup 2007-11-06 12:40:38 +00:00
Bill Currie
6d6dc27592 make startup and shutdown a little quieter 2007-11-06 10:39:49 +00:00
Bill Currie
d66934942d nuke Con_Printf and Con_DPrintf and use Sys_* instead 2007-11-06 10:17:14 +00:00
Ragnvald Maartmann-Moe IV
2211f6fb1a Codingstyle cleanup. 2007-11-05 11:32:15 +00:00
Bill Currie
c04d9ef8c2 plug a potential (though unlikely) memory leak 2007-10-13 11:32:10 +00:00
Bill Currie
5c73d81e00 Python style long strings ("""...""") now supported for parsing. Any such strings will be written out as standard strings with escaped quotes when writing the plist. 2007-10-13 07:55:58 +00:00
Bill Currie
5294a97d6a make sure the \ gets written for all escapes, not just octals 2007-10-13 07:14:47 +00:00
Bill Currie
e15fae264a well, it finally seems to work, but q1 maps (especially start's ramp to e3) are not such that they're particulary playable due to being designed for point clipping. so still disabled until something can be sorted out. 2007-09-29 23:28:41 +00:00
Bill Currie
0ee9e1cf3e more accurate expects and don't recurse for non-crossings 2007-09-23 08:33:26 +00:00
Bill Currie
3d79256653 closer still. have problems with allsolid traces and flags in general 2007-09-23 05:41:17 +00:00
Bill Currie
973a30bce0 show inwater as well (though irrelevant for test map) 2007-09-23 05:40:08 +00:00
Bill Currie
9f7018685e a little easier to see what's expected 2007-09-23 04:07:39 +00:00
Bill Currie
0234b7ed93 nice little test of box clipping. doesn't get installed :) 2007-09-23 03:48:05 +00:00
Bill Currie
f7faad118b didn't quite get that checkin right 2007-09-21 14:04:30 +00:00
Bill Currie
36f5edb9d3 still disabled, but it's mostly working now. serves me right for blindly following the q2 code :P (it be buggy) 2007-09-21 13:58:07 +00:00
Bill Currie
19f0d23f8b it's disabled, but my box clipping is getting close 2007-09-21 12:44:19 +00:00
Bill Currie
7ceea13e10 fix an overflow bug 2007-09-21 10:43:27 +00:00
Bill Currie
e38bf6dd98 fix a signed/unsigned comparison warning 2007-09-21 09:01:21 +00:00
Bill Currie
37ad41ecb7 MOD_TraceLine doesn't need to return anything... 2007-09-17 11:24:42 +00:00
Bill Currie
2881b4b284 make MOD_TraceLine recursive again so I can work on box clipping without losing so much hair 2007-09-16 07:55:44 +00:00
Bill Currie
3e50aae01f "print" command for dumping values in the progs and add return type info to the debugging information 2007-09-15 07:47:31 +00:00
Bill Currie
d1e2b6b7d2 make the raw particle creation functions available and use them for creating the location marker effect rather than WizSpikeEffect 2007-09-15 04:20:45 +00:00
Ragnvald Maartmann-Moe IV
1571f0993f Const mismatch fix in net_udp6.c, plus whitespace in net_udp.c 2007-09-09 14:47:15 +00:00
Bill Currie
9c9f79d05c provide the ability to control which jack server to connect to 2007-07-03 10:30:13 +00:00
Bill Currie
ca0bbd909c correctly save and restore the parameters when calling +initialize. fixes the segfault in the qwaq test. 2007-06-09 13:44:06 +00:00
Bill Currie
4973a38cce speed up PF_VarString a little 2007-06-09 09:43:21 +00:00