Commit graph

419 commits

Author SHA1 Message Date
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
Brian Koropoff
99e18513f0 Added support for escape characters of the form \### where ### is the
decimal value of the desired character.
2002-10-26 03:09:38 +00:00
Bill Currie
8b46193e4d seeking to 1 byte before the beginning of the file doesn't seem to be such
a good idea
2002-10-24 22:36:15 +00:00
Brian Koropoff
20d47cde2f Added the global.delete builtin to clean up old global variables. Updated
cb.gib to use it.
2002-10-23 03:56:57 +00:00
Brian Koropoff
9fd055e183 A null ifs now causes every character to be considered a separate field in
a for loop. You can now pass a field separator string to a for loop that
will override the value of ifs.  Added the field.get command that returns
a single field from a list.  It also can take a field separator string that
overrides ifs.
2002-10-22 05:34:59 +00:00
Bill Currie
b345f510fa provide Hash_Buffer so buffers can be hashed 2002-10-20 03:30:22 +00:00
Brian Koropoff
8c2afef44c Changed GIB_Arg* into macros. Cleaned up GIB file access a bit and added
file.move and file.delete builtins.  Added Qremove to quakeio.[ch]. Did
a little cleaning and commenting in gib_parse.c.  Added support for \t
and \r escape characters.
2002-10-16 04:59:34 +00:00
Bill Currie
68b41f9b44 make dstring_adjust `grow' in increments of 1024. this should speed up
multiple appends nicely.
also create davsprintf and dasprintf to /append/ the printed strings to the
dstring rather than overwriting it as is done with dvsprintf and dsprintf.
2002-10-15 19:52:46 +00:00
Brian Koropoff
72e1ab0c57 Added the sleep console command that waits for a specified amount of time.
Note that this isn't a GIB-specific command but is very useful in GIB
threads.  Fixed the range GIB command to respect the ifs local variable.
2002-10-13 19:46:47 +00:00
Brian Koropoff
70c1fee4c9 Fixed some missing commas that resulted in garbled cbuf error messages. 2002-10-13 19:18:10 +00:00
Brian Koropoff
8b31103e6f Var substitution is now handled in the same pass as embedded return values.
This prevents var substitution from being performed on the return value
of a function.  The local variable ifs can now be set to specify a custom
field separator for use in for loops.  file.find will also insert ifs
between file names instead of a space if it is set.  file.find will also
no longer put . and .. in a list of file names.
2002-10-13 05:52:06 +00:00
Bill Currie
9f7c669370 various win32 compile fixes for the latest mingw (not fully working due to
LPCWAVEFORMATEX)
2002-10-11 20:47:17 +00:00
Brian Koropoff
9c4f2d32ca Add print and print.center GIB commands and fix a nasty bug with threads
that could cause a double free.
2002-10-06 04:40:18 +00:00
Bill Currie
ffb90a510a win32 compile fixes 2002-09-30 16:40:06 +00:00
Bill Currie
979d885776 get Qseek working properly (d'oh) and Qtell (forgot it needed adjusting) 2002-09-27 05:46:30 +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
d25ee82838 provide a tighter accuracy (but slower) _VectorNormalize for the tools 2002-09-25 21:35:49 +00:00
Bill Currie
dd5cac488c fix a few memory access bugs 2002-09-20 22:44:29 +00:00
Bill Currie
56843557f6 make _VectorCompare use EQUAL_EPSILON (VectorCompare is still the fast
macro) and use it instead of VectorCompare in the map tools. This (and, it
seems, RINT) fixes qfbsp on spc. Also, jump /all/ entities that get hit
by the filler in qfbsp
2002-09-20 17:02:53 +00:00
Bill Currie
0cd34d155f qfbsp now mostly works. only known issue is multiple texture wads don't
load properly and possibly a "reached occupant" issue (dunno if it's the
map or qfbsp)
2002-09-19 20:39:33 +00:00
Bill Currie
e8d74f3a26 round off the offsets/sizes again 2002-09-19 15:28:16 +00:00
Bill Currie
24a9b48127 rewrite bspfile.[ch] so they work off an object rather than global data.
The direct filesystem access is also removed. Fix up qfvis and qflight to
compile with the new bspfile. qfvis seems to work, qflight probably doesn't
2002-09-19 05:35:17 +00:00
Bill Currie
86f542a971 kill the last VFile ref and make the calculate the file size on opening for
reading (Qfilesize works only when Qopen is used in read mode).
2002-09-19 05:11:42 +00:00
Bill Currie
599fea0edb redo bspfile to use dynamic allocation for the arrays to avoid buffer
overflows. also fix up the verbosity levels in qfvis.c
2002-09-18 06:07:38 +00:00
Bill Currie
b8829faac4 bspfile.c:
start rewriting for saner code starting with making the private
	functions static
cmdlib.[ch]:
	win32 compile fixes (remove redundant function)
2002-09-13 15:07:48 +00:00
Brian Koropoff
11293819a5 Comments are now stripped out when a script is loaded instead of during
execution.
2002-09-10 01:26:02 +00:00
Ragnvald Maartmann-Moe IV
c4609f5195 Experimentally allow external texture loading. Also prevent loading RGB textures as RGBA, which wastes a lot of texture memory, and looks ugly on 16bpp boards. 2002-09-06 21:37:22 +00:00
Brian Koropoff
b32173db96 GIB: White space at the start of a list in a for loop is ignored. The
line where an error occurs in a cbuf is now printed.
2002-08-29 22:12:51 +00:00
Brian Koropoff
85465efb1d Made for use whitespace as a field separator and nuked list.get until
I figure out a standard way to specify a custom field separator.
2002-08-28 23:00:30 +00:00
Brian Koropoff
7cc9f48207 Whoops. I broke looping under some circumstances in GIB. Fixed. 2002-08-28 08:28:05 +00:00
Brian Koropoff
33d132fc4e Added initial support for newline-delimeted lists to GIB, including a for
loop that takes a variable through all elements of such a list.
2002-08-28 08:00:35 +00:00
Brian Koropoff
250a920ae2 Added file access builtins to GIB. 2002-08-27 23:25:52 +00:00
Bill Currie
7adaf456a1 plug a memory leak 2002-08-27 22:13:34 +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
Brian Koropoff
77445fe3c2 Forgot a newline 2002-08-27 06:46:49 +00:00
Brian Koropoff
98fc04e041 Added threads and callbacks to GIB, as well as several QW callbacks dealing
with player status.
2002-08-27 04:47:49 +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
Ragnvald Maartmann-Moe IV
46456158e8 Whitespace. 2002-08-25 04:47:57 +00:00
Brian Koropoff
876eaa467c Added a few useful builtins and began adding GIB hooks into quakeworld.
The player global branch variable is now updated with useful information
and the location.get builtin is available to return the current location
of the player based on loc files.  Fixed a bug with zooming out in zoom.gib.
2002-08-24 05:14:46 +00:00
Brian Koropoff
32f4e53aa5 Fixed the GIB math evaluator to handle unary operators properly, made
indexing/clipping more like python, made some cosmetic changes to zoom.gib,
and added the ability for GIB builtins to return values.
2002-08-23 21:18:00 +00:00
Ragnvald Maartmann-Moe IV
d757c10f07 Only need one define for R_Cull* 2002-08-23 20:46:19 +00:00
Brian Koropoff
5e9330ca21 Cleaned up the return builtin and made variable stripping ([foo:bar])
more robust.
2002-08-23 07:45:46 +00:00
Ragnvald Maartmann-Moe IV
6e8bd2aeb0 defines and ifdefs for R_CullSphere, just like R_CullBox. 2002-08-23 07:04:29 +00:00
Brian Koropoff
0715464bb1 Yay for escape characters. 2002-08-22 22:43:47 +00:00
Brian Koropoff
06e6c92da8 Fixed some bugs related to comments and global variables. Updated zoom.gib
to work with the new GIB parser.  It should be fully functional.
2002-08-22 20:50:12 +00:00
Bill Currie
9f1cedf812 don't seg if given a null table (ie, no vars in this context) 2002-08-22 16:20:06 +00:00