Commit Graph

2771 Commits

Author SHA1 Message Date
Bill Currie 9d6fd32206 Ensure the the progs data is aligned.
Some QuakeC compilers (eg, FTE) insert a data chunk between the progs
header and the rest of the progs data. Unfortunately, FTE does not maintain
the assumed 32-bit alignment.
2010-11-20 09:02:56 +09:00
Bill Currie 2f504709dd Print data being loaded from an entity. 2010-11-20 00:31:34 +09:00
Bill Currie 232d2f7e18 Fix an undefined operation thanks to spirit of the domain quaddicted.com. 2010-11-16 17:13:22 +09:00
Bill Currie 6260130ae5 Fix borked autoconf of dga/vidmode headers. 2010-11-16 00:58:19 +09:00
Bill Currie 37fb8d22da Don't open a streamed sfx when there's no sound driver.
This happens when qf fails to connect to jackd (possibly other times).
There is probably a better solution to the problem, but not opening a
stream when the sample rate is reported as 0 definitely fixes the inifinite
recursion in read_samples().
2010-11-14 20:46:29 +09:00
Bill Currie 824e33c82b Fix a sizeof braino.
Somebody (probably me) got a little over-happy with sizeof.
2010-11-14 19:22:47 +09:00
Bill Currie f63e505c92 Don't realloc the string pointer table.
This causes a bit of memory waste, but avoids breaking the pointers in the
string hash table.
2010-11-14 19:21:16 +09:00
Bill Currie e6b783a616 Don't touch the watchpoint conditional when printing. 2010-11-13 14:36:33 +09:00
Bill Currie ff49239500 Fix shared config files.
We've allowed a single level of parent directy access in quake path names
for a long time, but this got broken by qfs_expand_path. Thus, make
qfs_expand_path allow a certain number of parent directory levels (usually
0 or 1).
2010-10-16 14:17:09 +09:00
Bill Currie ef7958d680 Lots of const correctness. 2010-10-13 20:52:08 +09:00
Bill Currie 9a30968c87 type size correctness 2010-10-13 20:52:06 +09:00
Bill Currie cd159e1cc1 Use LoadBSPMem to load brush models.
Now that Mod_LoadBrushModel uses bspfile.[ch], the engine uses the same
code as the tools to work with bsp files.
2010-10-13 20:52:05 +09:00
Bill Currie db898655d1 make LoadBSPFile own the memory for the bsp data 2010-10-13 20:52:05 +09:00
Bill Currie 719ca15516 make LoadBSPMem work in-place
LoadBSPMem now modifies the passed in buffer rathern than allocating new
memory. One step closer to cleaning up brush model loading.
2010-10-13 20:52:05 +09:00
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