Commit Graph

180 Commits

Author SHA1 Message Date
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
Bill Currie a51e888a1b Nuke MAX_OSPATH and clean up the mess. 2010-08-25 13:31:08 +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 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 d66934942d nuke Con_Printf and Con_DPrintf and use Sys_* instead 2007-11-06 10:17:14 +00:00
Bill Currie ce0e0d421e don't try to open the dirconf file if it hasn't been specified 2007-04-07 12:17:01 +00:00
Bill Currie fd8f530656 make valgrind stop crying wolf 2007-03-26 09:06:50 +00:00
Bill Currie 02c41feabc make gamedir change a two phase operation so things can be done both before and after the cache is flushed. (still having problems with cached sounds, though) 2007-03-24 10:13:10 +00:00
Bill Currie 81a57bb3fa patch from phrosty for vc2005 support. includes fixes for a bunch of gcc-isms that crept in over the years. 2007-03-22 23:20:57 +00:00
Bill Currie 2d6f8c6501 compress // to / 2007-03-21 13:05:23 +00:00
Brian Koropoff b6e52faea8 Avoid duplicate entries when enumerating a directory 2007-03-20 05:55:29 +00:00
Brian Koropoff c3e8b5de3d Add naive QFS_IsDirectory and QFS_FilelistEnumerate until more intelligent pak handling is added 2007-03-19 10:43:29 +00:00
Bill Currie b320778b92 hmm, how did that happen? ah well 2007-03-18 10:42:16 +00:00
Brian Koropoff 25fdbdab58 More C++ compatibility fixes 2007-03-18 07:12:45 +00:00
Bill Currie 99c0954b47 the big dso visibility patch :). Sure, we have to have unique names for static builds, but with controlled visibitly we should get faster program loads (although this isn't C++, so it's not as bad) and complex plugins are cleaner. 2007-03-10 12:00:59 +00:00
Bill Currie 66e203b16b multi-dir patch for fs_sharepath from "Alexey I.Froloff" <raorn@altlinux.ru> 2005-09-06 11:39:32 +00:00
Bill Currie 3fb03fc2be hah, should have been using __attribute__((used)) all that time (rather
than __attribute__((unused))). fixes the missing console in -x11
2005-08-04 15:27:09 +00:00
Bill Currie addb57bfb3 plug some memory leaks 2005-05-05 22:50:09 +00:00
Bill Currie b7def83d19 patch from raorn ("Alexey I. Froloff" <sir_raorn@immo.ru>) to fix
interaction between -hipnotic (etc) and -game
2005-02-14 09:08:32 +00:00
Bill Currie 9a5cce7c14 hash.h: update the description of FindList quakefs.c: didn't need va there
This is an imperfect revision of history.
2004-11-02 07:39:00 +00:00
Bill Currie 67f913289c move wad_extract into the wad utility and make QFS_CreatePath more
generally usable
2004-05-09 22:58:37 +00:00
Bill Currie 2d671955fb fix an oopsie that broke skyboxlist (early morning paper routes are bad for
coding:)
2004-04-23 22:53:39 +00:00
Bill Currie 616be68bdd strip parameter to QFS_FilelistFill and add rua support 2004-04-20 22:52:09 +00:00
Bill Currie e8f9761d33 move the filelist building code into quakefs 2004-04-20 22:25:52 +00:00
Bill Currie 31b867a08e rework contains_updir to allow a specified number of ..s. QFS_FOpenFile now
allows one .. in the path (won't be able to find any files in a pak file
and is horribly inefficient, but oh well)
2004-04-14 02:15:14 +00:00
Bill Currie 1bf13a27b9 QFS_Open more secure and simplify contains_updir 2004-04-13 04:42:12 +00:00
Bill Currie 1fb50d2f08 don't create the path in QFS_Open if not writing 2004-04-13 03:38:16 +00:00
Bill Currie 9784ba5954 Grievre's gamedir callback patch to fix mangled sounds on gamedir change
plus a couple minor tweaks I notcied needed doing.
2004-02-03 03:01:06 +00:00
Bill Currie e154c9add5 be consistent with WIN32 and _WIN32 (now all _WIN32) 2004-01-20 03:47:27 +00:00
Bill Currie 77b2942982 several libs can now get built as dlls in windows: console, gamecode,
gamecode_builtins, gib, image, modules, object, ruamoko and util.
2004-01-19 07:47:41 +00:00
Bill Currie 1e20043bf3 remove some debug prints 2004-01-09 22:28:02 +00:00
Bill Currie 6c447b4b75 fix more string ownership issues 2004-01-07 08:54:00 +00:00
Bill Currie efd6ccff02 close a nasty hole in the gamedir code 2004-01-07 06:40:10 +00:00
Bill Currie ea552ae68e expand ~ for fs_dirconf 2004-01-06 07:33:19 +00:00
Bill Currie 40b8974c33 better external skin handling from Grievre 2003-12-28 05:25:06 +00:00
Bill Currie e0866a5e41 make the escape attempt notification a developer print 2003-09-02 04:57:44 +00:00
Bill Currie ada828bdc9 remove a whole swath of potential buffer overflows by removing the buffer.
Also audit a few of the "FIXME: overflow" tags
2003-08-05 01:45:52 +00:00
Bill Currie dfa16742e2 fix some silly bugs (sizeof (char*) :P) 2003-07-09 15:38:19 +00:00
Bill Currie 855fc53709 handle alloca properly 2003-07-09 06:28:09 +00:00
Bill Currie 84e071d235 fix an incorrect usage of HAVE_* that finally bit my bum 2003-07-09 04:21:45 +00:00
Bill Currie 4f66e1e9da fix a bunch of the previous FIXMEs. needs a bit more work for win32
compiling
2003-07-08 22:39:45 +00:00
Bill Currie dddf045221 put "FIXME: overflow" on all the char arrays I could find that weren't
obviously safe
2003-07-08 20:11:10 +00:00
Bill Currie f22bdfc23f d'oh, forgot to update the format 2003-06-06 15:47:12 +00:00
Bill Currie 8d470d2b49 don't use qfs_gamedir->* in QFS_NextFilename as it gets passed that in the
template (and shouldn't assume where to put the file anyway:). fixes the
all screenshots saves sas qf0000.tga bug.
2003-06-06 15:44:13 +00:00
Ragnvald Maartmann-Moe IV c6b6c7926f Fix one bug, but doesn't fix all screenshots being saved to qf0000.tga... 2003-06-06 12:35:52 +00:00
Bill Currie 191a7f61bc win32 compile fixes 2003-06-05 17:56:09 +00:00
Bill Currie f061c47242 make QFS_CreatePath work again and remove some old code from QFS_WriteFile 2003-05-30 01:44:39 +00:00
Brian Koropoff 3aecdcf42c Added a temporary hack to make ~/.quakeforgerc work again. 2003-05-25 05:40:25 +00:00
Bill Currie c2c3a62956 nuke Qexpand_squiggle. instead, expand ~ to $HOME on qfs initialization and
cache the value.

don't call Qopen directly in the engine. instead call QFS_Open (generic) or
QFS_WOpen (write only, zip flag).

rework QFS_NextFilename to use a dstring (avoiding a potential buffer
overflow), support 10000 files and work from the top-level fs_userpath
directory. adjust QFS_WriteFile and QFS_WriteBuffers etc to suit.

make sw32 screenshots actually get written.

hopefully everything gets written to the right places :)
2003-05-23 17:17:01 +00:00
Bill Currie b5a960c57b fix nq's gamedir handling for the -hipnotic etc shortcuts 2003-05-09 21:10:59 +00:00
Bill Currie 5f3573143a the beginnings of a jihad against buffer overflows 2003-05-08 23:24:02 +00:00
Bill Currie b43651685a fix a buffer overrun issue with -game 2003-04-21 04:49:02 +00:00
Bill Currie b80357afda change _FOpenFile to take a dstring for foundname plugging a potential
buffer overflow.
2003-04-09 05:55:41 +00:00
Bill Currie eeb2439eb6 need a specific entry for "qw:qw" since servers set the gamedir to "qw"
explicitly
2003-03-13 05:43:45 +00:00
Bill Currie 32ed283122 don't need that FIXME 2003-02-25 18:13:56 +00:00
Brian Koropoff 7eb2e42a3c Made QFS_NextFilename use Qexpand_squiggle on fs_userpath so screenshots
are saved to sequential filenames correctly.  This might be temporary if
taniwha has a better way of handling squiggle expansion in QFS in mind.
2003-02-16 22:43:06 +00:00
Bill Currie 851d203916 work towards a more secure qfs 2003-02-14 22:36:10 +00:00
Bill Currie 6a687f5e45 rename all the globals in quakefs.[ch] to be QFS_* or qfs_* 2003-02-14 19:46:07 +00:00
Bill Currie aaa6c2a2b0 fix some warnings picked up by ia-64 2003-02-12 23:29:16 +00:00
Bill Currie 137b56892f move menu.dat to its new home :) 2003-02-07 20:18:59 +00:00
Bill Currie ba12255550 get the qfs variable substitution more-or-less working 2003-01-27 21:56:30 +00:00
Bill Currie fd5695eb03 hash.[ch]:
add Hash_Free to ease freeing of hash table entries.
quakefs.c:
	beginnings of proper variable subtitution in qfs. not yet working but
	it compiles.
2003-01-27 18:16:15 +00:00
Bill Currie 55bec57b18 get -game working again (well enough for "nq-x11 -game slide" to work,
anwyay:)
2003-01-22 20:00:46 +00:00
Bill Currie 761a7546dd re-arrange things so __attribute__ and __builtin_expect are properly
autoconfiscated so rcsid will continue to work with gcc 3.3
2003-01-15 15:31:36 +00:00
Bill Currie 9323f359db move the default GameCode definitions from qw:* and nq:* to QuakeWorld and
Quake as that seems to be a more logical place for them.
2003-01-13 17:32:00 +00:00
Bill Currie c9204e3237 forgot the path for nq games 2003-01-13 16:46:13 +00:00
Bill Currie 3b9e7db882 fix the skins dowload location issue (not really to my satisfaction, but it
will do for now)
2003-01-10 23:07:04 +00:00
Bill Currie 2e0ed3377c basic (very!) implementation of the new filesystem directory struture code.
All the details of game directories will be fully configurable (search
paths and gamecode file name currently supported). Downloading of skins to
qw/skins only currently broken (will download to $gamedir/skins for now).
2003-01-10 22:47:18 +00:00
Bill Currie 71196fedf6 make gcc more anal about prototypes, string constants and function
visibility (ie, global functions must have a prototype)
2003-01-06 18:28:13 +00:00
Bill Currie 7a195bb910 revert my fs code subversion (2001/07/17 22:10:20 utc commit) as it's no
longer necessary with the new progs loading code
2002-10-30 03:35:20 +00:00
Bill Currie 37e2aa8ad5 remove some dead functions 2002-10-30 02:43:23 +00:00
Bill Currie 912db0336e clean out the cmdlib crap from quakefs.c and nuke qfcc's last dependency
on cmdlib.h (and nuke qfcc's cmdlib.h itself:)
2002-10-30 02:31:29 +00:00
Bill Currie 9d8d570269 using Qseek on a pak sub-file should work better. this should make oggs in
paks work.
2002-09-27 04:27:19 +00:00
Bill Currie c745d2a868 make gzipped oggs explicitly unsupported 2002-09-26 20:57:48 +00:00
Bill Currie 68f607de3c sanity check the strings to snprintf in open_file as we seem to somehow be
getting a stack overflow in there.
2002-08-27 17:53:24 +00:00
Bill Currie ec47e08e1c go back to using QFile, quakeio.h and quakefs.h 2002-08-27 07:16:28 +00:00
Ragnvald Maartmann-Moe IV cfedb80d1d Rest of support for qflight/qfvis. bspfile.c and quakefs.c will need cleaning up, compare to previous cvs versions... 2002-08-25 23:10:57 +00:00
Bill Currie c927b2e834 quakefs.c:
allow . and .. in a path so long as the result doesn't escape from the
	game directory
cl_menu/Makefile.am:
	don't strip source paths
optoins.qc:
	use InputLine object
def.c:
	use notice to show stray temps
emit.c:
	make sure expression args get emitted for function calls
expr.c:
	'C' is a cast
	rewrite cast_expr to handle casted pointere derefs
2002-08-20 06:11:10 +00:00
Bill Currie 141df55965 zap some FIXMEs 2002-08-14 20:01:23 +00:00
Bill Currie 5f4c21d796 casting from (signed) char to int does not one whit of good towards avoiding
the problems associated with signed chars being used to index arrays. must
cast to usigned char so the bit expansion is done on an unsigned value to
avoid the sign extension.
2002-08-02 03:22:32 +00:00
Bill Currie 01228a8be0 set the file mode before seeking 2002-07-27 06:42:52 +00:00
Bill Currie acf9ce392c move pakfile.[ch] into libQFutil and make quakefs.c use it instead of its
own code. This also removes the evil pak file count limit :)
2002-07-21 06:11:28 +00:00
Ragnvald Maartmann-Moe IV c8bc5dfb4c QSG2 glows almost working. Plus lots of typos killed. 2002-06-18 21:41:24 +00:00
Bill Currie f2f6041e05 at long last, vorbis support :) load time only, though, so not yet suitable
for huge samples.
Also, change the file search order so that .gz is checked before the
requested file.
2002-06-14 20:36:28 +00:00
Bill Currie 44dcf74627 strip the \n from all(?) of the Sys_Error calls (Sys_Error itself will be
adding \n).
2002-05-14 06:12:29 +00:00
Bill Currie 93febb90c9 search for .gz first 2002-04-30 04:39:03 +00:00
Brian Koropoff 388ff7b597 Some bug fixes and memory leak fixes. Local variables break randomly,
probably due to my misuse of hash tables.  Anyone have any ideas?
2002-03-20 22:57:26 +00:00