Bill Currie
576c73cf7c
Replace qfs_file_from_pak with qfs_foundfile.
...
This exposes the found name, vpath and in_pak status.
2014-01-28 16:22:05 +09:00
Bill Currie
e5148493db
Prepend qfs_ to file_from_pak.
...
A little better name-spacing.
2014-01-28 16:22:05 +09:00
Bill Currie
82ded3fbe5
Fix some bitrot resulting from a rebase.
2014-01-28 16:22:05 +09:00
Bill Currie
5560696a65
Fix some unused variables.
2014-01-28 16:22:05 +09:00
Bill Currie
4b18501b00
Fix an uninitialized variable.
2014-01-28 16:22:05 +09:00
Bill Currie
40206904ba
Reimplement _QFS_FOpenFile using QFS_FindFile's internals.
...
_QFS_FOpenFile does a full search, however.
2014-01-28 16:22:05 +09:00
Bill Currie
6b87ddbb7c
Add QFS_FindFile.
...
QFS_FindFile's search can be constrained to begin or end at a certain
vpath.
2014-01-28 16:22:04 +09:00
Bill Currie
8bc2f7f6df
Print the vpath name when dumping the paths.
2014-01-28 16:22:04 +09:00
Bill Currie
098821e35d
Fix QFS_FilelistFill to work with vpaths.
2014-01-28 16:22:04 +09:00
Bill Currie
f05c7179c3
Split up the search paths into vpath chunks.
...
A vpath is the union of all locations searched for a file in a single
gamedir (eg, shadows, id1 etc). This is a necessary step to preventing
problems like id1/maps/start.lit being used for shadows/maps/start.bsp.
However, QFS_FilelistFill still needs to be reworked as it does not compile
yet (testing was done with a gutted QFS_FilelistFill).
2014-01-28 16:22:04 +09:00
Bill Currie
6910c50a43
Clean up the #ifdef mess in _QFS_FOpenFile
...
With proper initialization, only the one chunk of #ifdefs is needed. Now
the code is much easier to read.
2014-01-28 16:22:04 +09:00
Bill Currie
4e7e7c3ab0
Rename Sys_FileTime to Sys_FileExists.
...
The function never did anything but check the readability of the file.
2013-02-07 15:43:26 +09:00
Bill Currie
e27d7cbd2d
Handle alloca "correctly".
...
Use AC_FUNC_ALLOCA and the #ifdef mess suggested by the autoconf docs
(hidden in qfalloca.h).
2013-01-22 21:02:50 +09:00
Bill Currie
ec42bde527
Make hash tables more const correct.
...
And clean up the resulting mess :/
2012-10-27 11:44:31 +09:00
Bill Currie
1406cf13de
Mask the QFS_Rename message with SYS_FS.
...
It really should have been masked all along, but I guess developer 1 was
too noisy back then.
2012-07-21 22:34:10 +09:00
Bill Currie
23a38738fc
Massive whitespace cleanup.
...
Lots of trailing whitespace and otherwise blank lines.
2012-05-22 08:23:22 +09:00
Bill Currie
bc1b483525
Nuke the rcsid stuff.
...
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie
d8d21b00f4
Fix some issues found found by valgrind.
...
Buffer underflow and though strcpy has always been safe there, change to
memmove. Had the added benefit of helping me create more test cases for
better coverage.
2012-01-24 19:54:21 +09:00
Bill Currie
b13a2b6dbd
Move screenshots to $fs_userpath/QF.
...
I got tired of screenshots getting scatter across the tree. ShotsPath in
the dirconf can override this.
2012-01-05 17:07:27 +09:00
Bill Currie
764cd91879
Set the default hudtype.
...
Yay, Deek for finding another bug in qf :). He had an old dirconf that
didn't specify HudType and thus caused the status bar code to blow up. Set
the default to "id" if none is found.
2012-01-05 14:00:57 +09:00
Bill Currie
cc5140e3a1
Move min/max/bound and field_offset into better locations.
...
min/max bound into mathlib.h (they /are/ math functions, after all) and
field_offset into qtypes.h.
2011-12-24 10:04:33 +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
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
f75b0a611b
Some compile fixes for OpenBSD
2011-08-25 22:35:20 +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
8c4fe2f844
Rename Sys_DPrintf to Sys_MaskPrintf.
...
We now have finer runtime control over what gets printed. Need to do a
SYS_DEV audit, creating new masks as apropriate.
2010-11-26 16:19:26 +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
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
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