Commit graph

395 commits

Author SHA1 Message Date
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
Bill Currie
42c03bb9e1 fix an out-by-one error that was causing segfaults for single line commands
ending with a // comment
2002-08-21 22:52:29 +00:00
Bill Currie
c12518de26 windows knows only a subset of the signals 2002-08-21 01:51:27 +00:00
Bill Currie
5009213564 Move the signal handling code from video/targets/* to sys.c (I'm leaving
the SDL target files for Despair since he's working on the currently). Also
make progs segfault handling much more robust (and general: sigill etc too:)
2002-08-20 23:04: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
Ragnvald Maartmann-Moe IV
c91f1a2aea Rename Length to VectorLength. 2002-08-20 02:22:40 +00:00
Bill Currie
451eaba2e1 change the value type for MSG_Write(Byte|Short|Long) from unsigned int to
int to avoid float -> unsigned int conversion problems
2002-08-19 01:58:01 +00:00
Bill Currie
3431b7ce82 float -> unsigned int needs to pass though int otherwise we lose the negative
range on the ps2 (nasal demons:)
2002-08-19 00:05:51 +00:00
Bill Currie
f753dd82ae put \n on some error messages 2002-08-15 19:06:21 +00:00
Bill Currie
141df55965 zap some FIXMEs 2002-08-14 20:01:23 +00:00
Brian Koropoff
513b5737f9 Got indexing into variables working and cleaned up variables a bit.
Partially translated zoom.gib into the new language, but it isn't done yet.
2002-08-14 05:28:07 +00:00
Bill Currie
ff8ea15c09 solaris compile fixes 2002-08-09 04:06:17 +00:00
Brian Koropoff
0390fe22ce Added tree variables (blah.1, blah.2, blah.1.foobar, etc), global variables,
made var substitution more robust, and began adding proper comments to
the code.
2002-08-08 09:20:00 +00:00
Bill Currie
c05db51069 add Qputs 2002-08-07 18:43:35 +00:00
Bill Currie
e171146582 Make Sys_Error repeat it's message to stderr to increase the changes of the
error being seen. (Closes: #39)
2002-08-07 15:31:56 +00:00
Brian Koropoff
5c60be3a49 If and while now work, and embedded commands use backticks instead of <> now
to prevent conflicts with math expressions.  All clients and servers are set
to create buffers with the normal parser.  However, scripts ending in .gib
are now executed in a GIB buffer, and the export command can be used to
make specific GIB functions available to normal command buffers (i.e. the
console).
2002-08-07 06:17:50 +00:00
Brian Koropoff
666c3fce07 Embedded commands now work without any bugs I can detect. Next up are
loops, branching, and getting the tokenizer to give special treatment
to certain builtin functions.  But first I should get some sleep :)
2002-08-06 08:15:20 +00:00
Brian Koropoff
bdd0f69f17 Declared variable in the wrong spot. Don't know why gcc 3 accepted it. 2002-08-05 05:58:17 +00:00
Brian Koropoff
87f0f480e4 Local variables work, preparing to get embedded commands done. 2002-08-05 00:01:06 +00:00
Brian Koropoff
cf48363c6e More of GIB done: builtins, functions, various cleanups, math, etc. 2002-08-03 06:04:00 +00:00
Bill Currie
c5192540c8 remove an accidental commit 2002-08-03 01:29:26 +00:00
Brian Koropoff
3c3844d2ac Checked in the beginnings of GIB mark III and modified qw-server to use
it for its console.
2002-08-02 04:07:25 +00:00
Bill Currie
4bd940e619 d'oh 2002-08-02 03:26:55 +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
2ce0f2ded2 we now require modern autoconf (2.52+), automake (1.6+) and libtool (1.4+).
This gives us a bunch more flexibility. plugins no longer have the "lib"
prefix or the version suffix, they're now installed in
$fs_sharepath/QFplugins,, builds should take much less time (in general,
only one of pic or non-pic versions are build), bins and libs can have
individual CFLAGS
2002-08-01 19:49:10 +00:00