Commit Graph

625 Commits

Author SHA1 Message Date
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 e32dc4cdb7 missed the new headers 2003-01-08 16:07:45 +00:00
Bill Currie de610ee47b missed this file 2003-01-06 20:01:13 +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
Brian Koropoff c522970a88 Added a GIB event system for registering GIB callback functions to be
started when a named event occurs.  Added a few test events to the qw
client and server.  Cleaned up the range GIB builtin a bit.
2003-01-03 04:30:38 +00:00
Brian Koropoff 86d73f1577 Include protection. 2003-01-03 04:12:27 +00:00
Bill Currie 637de7b687 chage PL_ObjectForKey to take a plitem directly and typecheck the item 2002-12-18 16:09:47 +00:00
Bill Currie a84b6bba5d make stuff static that can be and nuke some useless stuff 2002-12-16 23:26:14 +00:00
Brian Koropoff 32e5e6ef0b Numerous GIB bug fixes and optimizations. Fixed/updated some GIB scripts
as well.
2002-12-13 23:36:05 +00:00
Bill Currie 9fd59ac09a make sure r_screen.h gets distributed 2002-12-13 16:53:22 +00:00
Bill Currie 3b7f7bd2ad get working with both older (0.3) and newer (2.2) mingw 2002-12-12 20:11:01 +00:00
Bill Currie 37c5bb6ec6 merge the bulk of the three screen files into r_screen.c so all common code
is shared.
2002-12-11 17:34:48 +00:00
Brian Koropoff 74ee0cfd0e Changed the behavior of field::get with a null field separator to match
that of for loops.  Added support for var++, var--, var += foo, var -= foo,
var *= foo, and var /= foo.
2002-12-10 00:04:15 +00:00
Brian Koropoff 91266619f3 Added the sqrt and abs math functions and the continue GIB builtin. I
changed where a loop program gets copied back into its buffer so that the
continue builtin would work.
2002-12-08 20:55:40 +00:00
Bill Currie 92ea1de504 apply Kaare Slettnes' key name extention patch (Closes: #62) 2002-12-02 16:26:18 +00:00
Bill Currie ee30860cef fix a bunch of ;; typos 2002-11-20 21:44:04 +00:00
Brian Koropoff 854f6d9054 Created gib_regex.[ch] to manage regular expressions in GIB. Regexs are
now cached and only recompiled when compile flags change.  Changed regex
builtins to take an options string argument after the regular expression.
2002-11-19 06:24:29 +00:00
Brian Koropoff 860306e324 Oops, forgot these. 2002-11-19 04:24:09 +00:00
Brian Koropoff 0e0d8bd542 Added support for enclosing embedded commands in $() and cleaned up the
parser a bit to accomodate this.  Backslashes in double quotes are now only
removed if they escape a character that can't be written normally, or
another backslash.  Removed start position support from string::findsub
since variable slices can be used instead.  Added support for regular
expressions in the form of regex::match, regex::replace, and
regex::extract.  Checked in regex.c from GNU regex 0.12 for platforms that
do not have regex functions in their standard library. Two minor changes
were made to this file to fix gcc warnings.  Prepared the path transform
function for a change to a filesystem rooted at fs_userpath instead of the
current gamedir, but these changes are commented out pending security
considerations.
2002-11-19 04:15:36 +00:00
Brian Koropoff d4b1c74866 Added the string::findsub builtin. Added a reset function to the cbuf
interpreter struct so that custom cbuf data can be reset after an error.
This fixes a bug where GIB would think it was still waiting for a return
value after an error occurred in an embedded command.
2002-11-16 20:56:04 +00:00
Brian Koropoff 625e1e36d6 Added Sys_PathType, which reports whether a path is absolute, relative
below, or relative above (uses .. to ascend the filesystem). Changed
file functions in GIB to use this.  GIB can now be initialized in a
non-sandboxed mode, which at the moment means that GIB scripts run with
carne can access the entire filesystem.
2002-11-14 05:28:54 +00:00
Brian Koropoff 7b0c24a386 Added carne, the stand-alone GIB interpreter. Made a few changes to GIB
to accommodate it.  Added the strict flag to cbufs, which causes an error
to be generated when a command is not found instead of just warning the
user.  GIB buffers have the strict flag set by default.
2002-11-14 02:10:55 +00:00
Bill Currie 6ce0abe536 more alpha compile fixes. Closes: #60 because while it started out for
0.1.1 it developed into an alpha compile issue for 0.5.2
2002-11-13 20:20:50 +00:00
Bill Currie 836c469737 sys.[ch]:
handle SIGFPE and allow the registered signal handler to do recovery
	rather than bail
progs.h, pr_exec.c, pr_load.c:
	if pr_faultchecks is 1 (0 is default), handle division by 0 gracefully
	by loading the maximum representable number into the answer
	Closes: #58
the rest:
	kill the SIGFPE stuff
2002-11-13 19:26:44 +00:00
Brian Koropoff cef0d957e2 Added useful error messages to the math parser, cleaned up implied
multiplication a bit, and added some whitespace to cbuf errors for
readability.
2002-11-13 03:03:37 +00:00
Bill Currie 77288fe90b make dist fix 2002-11-09 21:56:13 +00:00
Brian Koropoff b40400d59c Moved GIB into libs/gib and made util no longer depend on it. Cleaned up
some cruft from a previous incarnation of GIB.
2002-11-09 07:13:52 +00:00
Bill Currie 1dfbf4ba7e win32 compile fixes 2002-11-08 23:13:52 +00:00
Bill Currie 3d44623b57 change Cmd_Exec_File's api so it can conditionally use normal or quake
file system accesses. fixes the map.cfg exec problem
2002-11-08 16:39:28 +00:00
Bill Currie 62bbd0228a prototype Com_CollapsePath 2002-11-08 03:12:22 +00:00
Bill Currie eeb4e4f9a9 how that got past my compile tests is beyond me 2002-11-06 14:56:39 +00:00
Bill Currie ca4b3acd6c big protototype cleanup. Now, except for a few cases, all non-static
prototypes are in headers files.
2002-11-05 19:12:51 +00:00
Bill Currie 667efab4e0 clean out the old win32 support. it's obsolete or dead or only semi-legal 2002-10-30 06:06:57 +00:00
Bill Currie aa36b85ba6 add PR_StringValid and PR_EdictValid to check the validity of progs string
and entity values without crashing.
2002-10-29 05:07:10 +00:00
Brian Koropoff 01a7740f1b Added bind.get builtin that returns the command currently bound to a key.
Fixed gib_builtin.h to include another needed header.
2002-10-25 06:33:16 +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
Bill Currie 80e85226b9 pr_xstatement now always reflects the currently executing statement making
debugging easier in the event of a segfault
2002-10-22 15:07:54 +00:00
Bill Currie b345f510fa provide Hash_Buffer so buffers can be hashed 2002-10-20 03:30:22 +00:00
Bill Currie 4da662eb47 implement pr_obj_msg_sendv 2002-10-16 22:17:26 +00:00
Bill Currie be4b8096d4 two new instructions: move and movep: basicly memmove. qfcc support coming
as soon as I get it working :)
2002-10-16 06:44:41 +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
Bill Currie 1f0b6e84a5 change pr_obj_msgSend and pr_obj_msgSend_super so they either call builtin
methods directly or setup the progs struct for a normal function call to
call a progs method rather than recursively calling PR_ExecuteProgram. This
will reduce method call overhead (both cpu and stack usage), fix the loss
of tracing when calling a method and makes it possible to break out of the
progs engine simply if threaded progs are ever implemented.
2002-10-15 18:53:33 +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 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
Ragnvald Maartmann-Moe IV ef47bf6e12 gl_skymultipass -> gl_sky_multipass. Much nicer tab completion. 2002-10-10 19:49:36 +00:00
Bill Currie a13a67b163 fix make dist (bogus stamp-h.in) 2002-09-27 20:10:45 +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 d25ee82838 provide a tighter accuracy (but slower) _VectorNormalize for the tools 2002-09-25 21:35:49 +00:00