Commit Graph

1635 Commits

Author SHA1 Message Date
Bill Currie ca720c26a5 blah, forgot about no-asm :P 2003-01-06 19:05:51 +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 6b705adc31 fix a missed libasm -> libvid_asm change 2003-01-04 03:08:32 +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 79a638198d Fix a memory leak. 2003-01-03 04:15:32 +00:00
Brian Koropoff 091e9d3f3d A few cleanups, and made assignment/incremement/decrement operations
return a value.
2003-01-03 04:10:50 +00:00
Bill Currie 8a2fbf43a7 alphageek's crosshair patch modified so it's crosshair 3 (need to port this
to the sw renderer's:/)
2003-01-03 03:36:45 +00:00
Bill Currie f75c88b247 work around a gcc (GCC) 3.1 20020420 (prerelease) bug in darwin (ppc?) 2002-12-20 23:49:11 +00:00
Bill Currie dbd5b16883 rename the convenience libs to avoid problems with libx11 vs libX11 on
darwin (damn case insensitive file systems :P)
2002-12-20 23:40:47 +00:00
Bill Currie 1130eed85a make the "no mouse" error message a little more informative 2002-12-19 16:58:44 +00:00
Bill Currie c85fd3bd56 fix a potential underflow and plug a memory leak 2002-12-18 20:53:49 +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
Brian Koropoff f03cc28b7d Fixed dsvprintf to work with different implementations of vsnprintf. 2002-12-17 22:35:14 +00:00
Bill Currie a84b6bba5d make stuff static that can be and nuke some useless stuff 2002-12-16 23:26:14 +00:00
Bill Currie ee868367d5 we don't currently support scitech's mgl 2002-12-16 21:57:36 +00:00
Bill Currie d332a9f5ae remove useless file 2002-12-16 21:09:25 +00:00
Bill Currie 86ed9e1130 add some missing ()s 2002-12-16 19:39:02 +00:00
Bill Currie 1c4b40c291 similar cleanups to vid_svgalib.c 2002-12-16 19:36:46 +00:00
Bill Currie 80146121dc require an 8 bpp mode 2002-12-16 19:36:14 +00:00
Ragnvald Maartmann-Moe IV 4b32916298 Legibility. Whitespace. Stuff like that. 2002-12-16 19:26:53 +00:00
Bill Currie e381d2a0fc remove vid_mode and the mode description commands 2002-12-16 19:23:41 +00:00
Bill Currie 1311773a90 make -svga mode selection consistent with -x11 etc and also fix the mode
matching algo so it actually works
2002-12-16 18:50:09 +00:00
Ragnvald Maartmann-Moe IV f053f3b70f Whitespace. Grr. 2002-12-16 17:59:45 +00:00
Brian Koropoff 2c643cde47 Reworked _dvsprintf a bit to make it cleaner and fix a segfault when
appending to large strings.
2002-12-15 07:01:50 +00:00
Brian Koropoff 19ac57dafc Fixed a bug with aliases and updated cb.gib a bit. 2002-12-14 20:34:20 +00:00
Bill Currie b8216807fe fix a warning 2002-12-14 01:56:37 +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 31969b67ad a couple of missed cleanups from the screen merge 2002-12-12 05:12:09 +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
Bill Currie bf3fa3dc76 remove some dead code and a lot of unnecessary diffs 2002-12-11 16:45:40 +00:00
Bill Currie ca55210c6e remove some redundant steps 2002-12-11 05:46:42 +00:00
Bill Currie 88f7b9ae84 it's rgb, not rbg 2002-12-11 05:33:54 +00:00
Bill Currie 15655c23cd get snaps working properly 2002-12-10 18:24:38 +00:00
Bill Currie c158f0028b fix gl_stub so it works again and also get the gl functions being looked up
properly
2002-12-10 15:30:16 +00:00
Bill Currie 7da551d044 the output is rather mangled but the client no longer crashes 2002-12-10 05:04:30 +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
Bill Currie de7299a64f don't crash when doing a remote screenshot 2002-12-09 17:47:12 +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
Brian Koropoff 0a8ff6a8cf In addition to .gib files, anything exec'ed from within a GIB buffer is now
put in a new buffer on the stack and stripped of comments.  Fixed an
instance of a function name that I forgot to change in cb.gib.
2002-12-03 05:54:13 +00:00
Ragnvald Maartmann-Moe IV 46a093faba Change sv_use_curses default to 0, until curses has scrollback support. 2002-12-02 20:03:12 +00:00
Bill Currie 92ea1de504 apply Kaare Slettnes' key name extention patch (Closes: #62) 2002-12-02 16:26:18 +00:00
Brian Koropoff 714f2ced4c Fixed several GIB bugs, optimized Cbuf_Execute_Stack a bit, changed QW
clients to use a separate buffer for stufftext commands.
2002-12-01 07:22:42 +00:00
Brian Koropoff f1279be1e5 Fixed a segfault with very high resolutions. 2002-11-23 05:47:17 +00:00
Brian Koropoff a62a92c1be Fixed regex::extract to start at the correct argument when setting the
value of variables.
2002-11-21 00:20:39 +00:00
Bill Currie ee30860cef fix a bunch of ;; typos 2002-11-20 21:44:04 +00:00
Bill Currie d78f34e795 fix some spelling errors 2002-11-20 21:21:22 +00:00
Bill Currie 261dcfe2a3 FreeBSD patch from q (see what happens for the other BSDs) 2002-11-20 17:20:52 +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
Bill Currie 1251cbda9e gee, you'ld think gnu would get pointer <-> int portability right :P 2002-11-19 05:40:04 +00:00
Bill Currie a17673bb69 fix some warnings 2002-11-19 04:34:44 +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 acbd838b09 Fixed a format string and added a cast to some pointer arithmetic. This
fix compile problems on non-intel archs.
2002-11-17 00:12:14 +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 ac8169ba54 Changed file::find to take the path and glob as one argument. Made some
miscellaneous file access cleanups.
2002-11-16 03:52:07 +00:00
Bill Currie f26ec7377c fix an uninitialized variable 2002-11-16 02:03:39 +00:00
Brian Koropoff 78785a90f8 Added a primitive interactive mode to carne and modified the file::read
GIB builtin to use Qopen instead of COM_LoadHunkFile.  This makes it work
properly in carne.
2002-11-15 23:27:07 +00:00
Bill Currie 06df342655 fix a stray ; 2002-11-15 14:56:57 +00:00
Bill Currie 2ad18a404b don't double print Sys_Error messages when the print function is still
the default
2002-11-14 22:17:25 +00:00
Bill Currie d1199f23da get categories working in the runtime :) 2002-11-14 20:42:48 +00:00
Bill Currie e544c1247f fix a clobbered by longjump warning 2002-11-14 15:37:09 +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
Brian Koropoff 0f71b02fd7 Changed the name of GIB builtins from string.length to string::length, etc.
Made a few miscellaneous cleanups and enhancements to builtins and changed
all the GIB scripts in CVS to reflect the new naming conventions.
2002-11-11 01:57:34 +00:00
Bill Currie aa5ad0f0f9 don't use glXGetProcAddressARB to look up the glX functions. hopefully fixes
the nvidea segfault
2002-11-10 23:31:19 +00:00
Bill Currie 498bdcc406 compile fixes for alpha linux 2002-11-10 02:50:42 +00:00
Bill Currie 5f606a2829 \r terminates a line only if followed by \n or the end of the buffer 2002-11-09 07:58:34 +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 a5ead00f8e small bit of cleanup 2002-11-08 17:13:23 +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 d46b37f940 use COM_CompressPath 2002-11-08 03:35:22 +00:00
Bill Currie ec0273e3dc do a pre and post pass for maps/mapname.cfg and use maps_default.cfg if
maps/mapname.cfg doesn't exist.
2002-11-08 02:43:04 +00:00
Bill Currie 71e95ee26f stop lying about responding to Delete events 2002-11-06 17:09:01 +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 1a6a9f177d make error reporting a little saner (hopefully) 2002-10-31 23:00: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 98563c15d6 fix vorbis include handling when --with-vorbis is needed 2002-10-30 02:03:24 +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 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
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
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
Bill Currie 012cc58eb4 move the debug related stuff from pr_exec.c to pr_debug.c 2002-10-23 20:42:02 +00:00
Bill Currie 3a3da6a1c4 nuke PR_InitEdicts as it's redundant and only used in the tools due to
forgetting to remove it
2002-10-23 15:55:38 +00:00
Bill Currie a4a5bb2d72 split out the parsing code 2002-10-23 04:57:08 +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
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 1d96156936 make sure files loaded by the progs engine can be freed safely 2002-10-22 04:30:20 +00:00
Bill Currie 6203d450eb resture pr_xstatement on return from PR_ExecuteProgram so recursive calls
don't mangle things with the new semantics of builtin calls
2002-10-22 02:51:57 +00:00
Bill Currie aad04efe25 move the correct amount of bytes (I keep forgetting the * 4 :P) 2002-10-21 16:38:45 +00:00
Bill Currie b345f510fa provide Hash_Buffer so buffers can be hashed 2002-10-20 03:30:22 +00:00
Bill Currie 4810046f39 copy the correct number of bytes 2002-10-17 19:33:06 +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