Commit Graph

2734 Commits

Author SHA1 Message Date
Bill Currie abc17c1d91 New cvar commands from fitzquake. 2010-11-26 16:19:25 +09:00
Bill Currie d6ceaef7d2 Whee, 64bit cpus and sizeof. 2010-11-24 20:42:07 +09:00
Bill Currie addbcaa09c Add PL_GetFromFile builtin.
This is an extension "wrapper" (no such C function). This allows ruamoko
programs to read property lists without worrying about the memory required
to store the string for the property list being read.
2010-11-24 17:01:19 +09:00
Bill Currie defc2a264b Add QFile_GetHandle()
This allows other rua builtins to make use of ruamoko files.
2010-11-24 17:01:19 +09:00
Bill Currie fc2a6e0fb7 Don't be so spammy with file errors.
Record a file even if it could not be found. This way, the error message
gets printed once per file rather than every time.
2010-11-24 17:01:18 +09:00
Bill Currie 3878b76cc5 Start using autorelease.
Much more testing is required (oh, but for qc-valgrind), but there is now
a ~945kB block of free data in the menu progs heap :).

Also, correct the printed size of the memory block to not include the
block header size.
2010-11-24 17:01:18 +09:00
Bill Currie 4518e6af91 First stab at implementing autorelease.
It's probably nowhere near right, but probably ok for now (I need to study
the GNUStep code). I'm unhappy with the menu code hook, but it will have
to do for now.
2010-11-24 17:01:18 +09:00
Bill Currie 5fc4ef63f6 Rewrite ruamoko plist support to use handles.
The plist code was written long before I thought of resource handles, and
then it was forgotten. This is much nicer and safer than storing C
pointers in progs memory space (*shudder*).
2010-11-24 17:01:18 +09:00
Bill Currie 763cec3838 Some spelling/grammar corrections. 2010-11-24 17:01:18 +09:00
Bill Currie d4ae231f34 sezero's NET_SendToAll fix
Here's a patch to NET_SendToAll() which was always
broken: it never skipped non-connected clients.
Depending on the compiler, it would wait the whole
5 seconds of its blocktime before it gave up.
While there, changed its blocktime argument to
double (the comparison is against a double.)
2010-11-21 14:27:43 +09:00
Bill Currie 1dfb914c46 fix an oopsie (rebase!!) 2010-11-21 14:25:32 +09:00
Bill Currie 4cec187465 zixthree's wav file patch
Wav file were not read correctly when encoutering most chunk type beside the ones used by QuakeForge.

This patch will fix the riff loader code so that unused but defined chunk are skipped. Most wav files should now be loaded correctly fixing some silent sound effect.

Also fixed a typo in wav loader and reordered wav validity check so that format is checked first. The data chunk could be inexistant on some weird format and so an invalid format is a more helpful error text.

! Fix: Skip unsupported chunk in riff loader instead of rejecting riff file.
! Fix: typo in Microsoft name.
! Fix: ordering of wav validity to enable more helpful error text.
2010-11-21 14:18:15 +09:00
Bill Currie 99e87b092b zixthree's stereo swap patch.
Modified slightly for formatting and cleaner swapping.
2010-11-21 14:09:23 +09:00
Bill Currie 6771e7b8b5 sezero's win32 Sys_ConsoleInput patch. 2010-11-21 13:55:03 +09:00
Bill Currie 204c509a43 sezero's "Bad old_size value in Z_Realloc()" patch. 2010-11-21 10:06:56 +09:00
Bill Currie 15b423cbe7 Track 0 is used to stop the BGM 2010-11-20 14:32:27 +09:00
Bill Currie 3309f483b6 Don't require pr_boundscheck for quoth.
I don't know about other FTEqcc compiled progs, but quoth doesn't try to do
anything clever (all its denormals are either vars of the wrong type, or
-0.0).
2010-11-20 14:12:40 +09:00
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 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