Commit Graph

2276 Commits

Author SHA1 Message Date
Bill Currie 93834f2694 better source line tracking 2003-02-24 16:01:52 +00:00
Bill Currie 38d5c8c41a better line search algorithm (not perfect yet, though) 2003-02-24 03:34:11 +00:00
Bill Currie 5c3892cbb2 make sure the string is valid before attempting to print it 2003-02-24 03:07:26 +00:00
Brian Koropoff 71a4ff6379 Use floor() or ceil() based on sign for 'trunc' GIB math function. 2003-02-23 22:53:36 +00:00
Brian Koropoff 6141bc35d0 Removed the 'random' GIB builtin and replaced it with the rand() math
function in the math evaluator.  Added the trunc() math function as well.
2003-02-23 22:14:07 +00:00
Brian Koropoff 36774a612d Use atof when checking truth values. 2003-02-23 21:14:33 +00:00
Ragnvald Maartmann-Moe IV d9ed34a5fb More video mode selection robustness improvements. 2003-02-23 20:21:06 +00:00
Ragnvald Maartmann-Moe IV 59c4290563 Fix handling of all non-RLE-compressed tga formats we supposedly support. Now
we work even if the first pixel isn't in lower left. ;)
Handling the RLE-compressed oddball cases would require a lot more code
duplication, will brute force that later if nobody beats me to it with a clean
solution.
2003-02-23 17:39:23 +00:00
Bill Currie c026e61d22 make LittleLong and co defines rather than function pointers 2003-02-22 23:23:16 +00:00
Brian Koropoff 5acf0bbeda Fixed a bug in the 'contains' GIB builtin and added more to the GIB docs. 2003-02-22 07:19:51 +00:00
Bill Currie 72e5221f06 minor debugging tweaks 2003-02-21 15:09:02 +00:00
Bill Currie 152538bf90 zap the Cmd_Return stuff as that's dead and burried 2003-02-20 20:33:03 +00:00
Bill Currie bb5f5e0a0c fix a couple of gcc 2.95 warnings 2003-02-19 21:41:37 +00:00
Ragnvald Maartmann-Moe IV e3ea39e67b QuakeForge now supports map specific textures in `textures/mapname/`. 2003-02-19 17:41:16 +00:00
Bill Currie d93fceea38 fix a snafu in SVC_DirectConnect related to info strings, make
Info_ParseString take (and pass on to Info_SetValueForStarKey) a flags arg
and simplify the flags handing in Info_SetValueForStarKey.
2003-02-19 17:39:21 +00:00
Bill Currie b6a3bc8d1c try to give line numbers in the traceback 2003-02-19 06:26:49 +00:00
Brian Koropoff a9fa6c06d5 Remove some stupid hacks so that negation works again. 2003-02-17 20:33:56 +00:00
Brian Koropoff 00d71f13f6 Make %var expansion actually work. 2003-02-17 08:55:40 +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
Brian Koropoff f6da3baa1e Temporarily fixed GIB filesystem access until I can work out a system that
better meshes with the new QFS.  Fixed up some GIB scripts a bit.
2003-02-16 21:27:18 +00:00
Brian Koropoff 760210dc7b GIB: Many bugfixes and cleanups. Added bitwise math operations, expansion
of leaf names in a stem variable via %var, the builtin functions 'count'
and 'contains', and an initial interface between qw-server and GIB to allow
querying of clients and their info strings.  Also cleaned up the chat event
interface a bit.  Renamed a few builtins.
2003-02-16 19:46:34 +00:00
Brian Koropoff af520a373a More cleanups and bug fixes. Added stem-and-leaf variables back in and
added the global::delete builtin.
2003-02-16 02:44:24 +00:00
Brian Koropoff fc37941ca5 Tidied up some Sys_Printf()s that indent mangled. 2003-02-15 02:27:25 +00:00
Bill Currie c91137e4db run gib through indent 2003-02-14 22:42:11 +00:00
Bill Currie 851d203916 work towards a more secure qfs 2003-02-14 22:36:10 +00:00
Bill Currie 68d2167c9e fix a sequence point issue that could cause index to be put on the stack
before being initialized
2003-02-14 20:36:15 +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 fd7636137d implement a proper (and optionally secure) QFile interace for ruamoko. 2003-02-14 18:17:17 +00:00
Brian Koropoff 3c522a83bc Various cleanups and bugfixes. Added proper line number reporting to
errors.  A few new builtin functions, such as slice::find and thread::list.
2003-02-14 08:06:01 +00:00
Ragnvald Maartmann-Moe IV a34980eda5 Fix easter_egg toggling. 2003-02-14 00:58:22 +00:00
Ragnvald Maartmann-Moe IV 6d6fade23a Change mach64 test to only happen at particle system inits, rather than testing for every individual particle injection.
Mach64 now gets id particle effects. Disabling the majority of effects isn't the best method, IMO.
2003-02-13 21:48:28 +00:00
Ragnvald Maartmann-Moe IV 646f875a34 Add return value checking for in_grab. Also some dead code removal, dangling comment and white space cleanup. 2003-02-13 19:03:48 +00:00
Bill Currie 53d3252792 don't adjust the system gamma unless the window has focus. also quench an
internal warning (the event system can't handle shm events (doesn't seem to
need to anyway)).
2003-02-13 18:24:30 +00:00
Ragnvald Maartmann-Moe IV af33733ce4 More x86-64 (AMD, not intel IA64, taniwha!) fixes.
Compile problems pointed out by Mike A. Harris. Thanks!
2003-02-12 23:41:20 +00:00
Bill Currie aaa6c2a2b0 fix some warnings picked up by ia-64 2003-02-12 23:29:16 +00:00
Bill Currie 1051b8c748 missed a net.h -> netmain.h 2003-02-12 20:08:55 +00:00
Bill Currie 21d8b4f8dc link in hw, move the qw and nq networking code into libs/net and make
hw-master use libnetchan. there are evil include hacks that will need to be
taken care of in net*.[ch]
2003-02-11 22:48:57 +00:00
Bill Currie 4bd1718475 re-arrange viewsize handling to fix the hud bug in glx 2003-02-11 21:24:27 +00:00
Bill Currie d86b431860 fix a couple of warnings 2003-02-10 03:19:54 +00:00
Ragnvald Maartmann-Moe IV 83f0901c17 Cleaned up fisheye code which totally ignored QF coding style.
Also attempt to fix an init bug in R_InitFishEyeOnce (add gl_cube_map_capable = false to else).
2003-02-09 19:35:49 +00:00
Ragnvald Maartmann-Moe IV 76eb7917a7 More whitespace. 2003-02-09 10:18:43 +00:00
Ragnvald Maartmann-Moe IV 5466f33dff Whitespace, while I'm in the area... 2003-02-09 10:17:20 +00:00
Ragnvald Maartmann-Moe IV 22641c40fc Make -sgl video mode selection much more robust. Particularly needs testing with voodoo 1 & 2, and on windows.
If you have problems with input grabbing, try `+set vid_fullscreen 1` or `+set in_grab 1` on the command line.
2003-02-09 10:15:20 +00:00
Bill Currie 137b56892f move menu.dat to its new home :) 2003-02-07 20:18:59 +00:00
Bill Currie 3ab4eb6545 Arkadi's mach64 patch 2003-02-06 21:47:33 +00:00
Bill Currie 06dc22af3d make "wait" work again. 2003-02-03 16:05:53 +00:00
Bill Currie 963fa8ef98 fix non-vorbis compile 2003-02-02 04:54:40 +00:00
Bill Currie 3fcc6ae176 a bit more cleanup with more _null deaths 2003-01-31 23:16:28 +00:00
Bill Currie e6a6f7099b don't need this any more 2003-01-31 22:34:47 +00:00
Brian Koropoff 5870c2cbce Nuked some code obsoleted by reference counting. 2003-01-31 21:47:16 +00:00
Bill Currie 05fb5f9fb2 partial cleanup. more to come later :) 2003-01-31 20:51:04 +00:00
Brian Koropoff 48c3e5a6c3 Fixed a stupid, stupid bug. 2003-01-31 20:36:39 +00:00
Bill Currie 93b767d4e0 reduce the heavy pointer dereferencing needed to access the sound plugins 2003-01-31 20:19:42 +00:00
Bill Currie c103d77157 make SND_ClearBuffer get called directly by Block/UnblockSound and remove
S_ClearBuffer from the api
2003-01-31 19:55:21 +00:00
Bill Currie 881e7918c2 cut some overhead on sound rendering 2003-01-31 19:14:12 +00:00
Bill Currie 570a72497f patches from the FreeBSD ports that are still applicable 2003-01-31 18:19:55 +00:00
Bill Currie c788a2ea57 remove a redundant call to S_Init_Cvars and call S_ClearBuffer when sound
is blocked and unblocked.
2003-01-31 17:56:05 +00:00
Brian Koropoff b0e6f46b7e GIB: Even more bugfixes. 2003-01-31 05:22:20 +00:00
Bill Currie 3e693cbce5 change the default of sys_dead_sleep to 0 2003-01-31 04:51:35 +00:00
Bill Currie fdb74e1aba win32 doesn't like random 2003-01-31 04:40:40 +00:00
Brian Koropoff 47d35f3e2d GIB: Added ifnot, fixed several bugs, updated zoom.gib yet again. 2003-01-31 03:43:56 +00:00
Brian Koropoff 580ca17546 GIB: Added proper reference counting on parse trees, got threads working
again, added a few new builtins and renamed some others, made misc. fixes
and enhancements.
2003-01-30 23:26:43 +00:00
Brian Koropoff 4ee0c42dcc Made GIB var substitution use cvars as a last resort. 2003-01-30 20:43:57 +00:00
Brian Koropoff 15687970b3 Fix a braino that caused COM_execute_sets to work improperly. 2003-01-29 22:46:24 +00:00
Bill Currie 8a9cd78072 fix up a couple of error cases (and catch them!) 2003-01-29 20:32:44 +00:00
Brian Koropoff 1f5cabcba9 A few GIB bugfixes, cleanups, and enhancements. Still more to come. 2003-01-29 04:34:23 +00:00
Brian Koropoff 06cd013fc6 Fix for older compilers that only allow variables to be declared at the top
of a program block.
2003-01-28 23:55:21 +00:00
Brian Koropoff 1668dd5c1a Whoops, missed these. 2003-01-28 22:37:34 +00:00
Ragnvald Maartmann-Moe IV 979ee7b2f8 Fix misleading comment and cvar documentation. 2003-01-28 21:31:55 +00:00
Brian Koropoff 59fbd48a81 Overhauled GIB to parse scripts in advance, among other design and language
changes.  There still remains some bugs to be squashed, a feature or two to
add, and some polishing to be done.  However, it seems to be in a workable
state.
2003-01-28 21:16:21 +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 1342533234 make the PF_Find search field error more informative 2003-01-20 21:28:36 +00:00
Bill Currie c5eb7d6e94 bring back the screen saver code 2003-01-16 21:44:42 +00:00
Bill Currie 341b6a1d68 this /should/ fix the windows server input problems. based on Timmmm's fix. 2003-01-16 16:11:28 +00:00
Bill Currie d63cde4103 import the GL_ARB_texture_cube_map defines 2003-01-15 18:26:58 +00:00
Bill Currie 0ea15c3f82 sw and gl fisheye patches from Arkadi Shishlov (arkadi@it.lv). I don't
think /I/ can play that way (dizzy:)
2003-01-15 16:53:34 +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 a4dfef63c3 make all files with rcsid include config.h 2003-01-14 20:18:29 +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
Ragnvald Maartmann-Moe IV e2d199cfb2 Try to open graphics at desktop bit depth, rather than 8bpp. Might explain some very grainy windows screenshots... 2003-01-12 16:58:31 +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 f8eda03b63 fix a const correctness issue 2003-01-09 17:06:27 +00:00
Bill Currie 0926ab64ec make the plugin cvars rom rather than archive 2003-01-08 22:42:55 +00:00
Ragnvald Maartmann-Moe IV 34d4483424 white noise, er space. 2003-01-08 01:46:28 +00:00
Ragnvald Maartmann-Moe IV d2820cd857 Reduce code duplication, kill a function used by only one caller.
Also disables a workaround for "interpolation seams" that I believe to be an old DRI bug. If anyone has skybox (not dome!) seams, try altering the ftc `if 0` to `if 1`.
2003-01-07 22:12:54 +00:00
Bill Currie 9538e009b7 small bit of cleanup 2003-01-07 20:02:30 +00:00
Bill Currie e7d138e727 string const correctness 2003-01-06 21:41:46 +00:00
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
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
Bill Currie 99350cf4f1 cleanup some bitrot that caused qf to seg when using the null sound driver 2002-10-15 17:32:47 +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 652907bc58 X overlays crash fix from Vincent Cojot 2002-10-11 21:32:17 +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
Bill Currie a055269654 workaround for buggy glibc memcpy (Closes: #28) 2002-10-11 03:29:39 +00:00
Bill Currie d7e7b7de7d cause the model to load into a calloced buffer rather than the hunk temp
region to avoid the data getting corrupted by cache shufflings. This
/should/ fix the bad extents bug (Closes: #37)
2002-10-11 02:54:02 +00:00
Ragnvald Maartmann-Moe IV 00b798c5b6 MORE whitespace. Will it never end? 2002-10-10 20:12:32 +00:00
Ragnvald Maartmann-Moe IV 0b0f9ee371 More whitespace. 2002-10-10 20:03:23 +00:00
Ragnvald Maartmann-Moe IV ef47bf6e12 gl_skymultipass -> gl_sky_multipass. Much nicer tab completion. 2002-10-10 19:49:36 +00:00
Ragnvald Maartmann-Moe IV b025a4e9aa Wh17e5p@c3! 2002-10-10 19:44:27 +00:00
Ragnvald Maartmann-Moe IV 0d28f4d63a More whitespace. 2002-10-10 19:32:19 +00:00
Ragnvald Maartmann-Moe IV 9648fbf181 Whitespace. 2002-10-10 19:24:36 +00:00
Jeff Teunissen 575689296a Tidy up progs dump output, and do some whitespace. 2002-10-08 19:46:42 +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 6917d2c1a3 fix a silly pointed out by sixk@ifrance.com 2002-10-05 02:21:44 +00:00
Ragnvald Maartmann-Moe IV 998d68a833 In GL, have `r_speeds 1` display particle count. 2002-10-02 04:15:23 +00:00
Bill Currie 9aa84f4ead case i has 7 visits, not 6 :P 2002-10-02 01:58:29 +00:00
Chris Ison 7c9f1a51ec Bug Fix, mouse didn't work in svga client.Fixed by closing the mouse before initing it due to vga_init initing the mouse when called 2002-09-30 23:16:20 +00:00
Bill Currie 3d668334e6 copy that fix for the other renderers 2002-09-30 21:35:13 +00:00
Bill Currie d7bbe82efd make sure the bottom part of the console gets updated properly if it covers
the status bar.
2002-09-30 21:25:24 +00:00
Bill Currie ffb90a510a win32 compile fixes 2002-09-30 16:40:06 +00:00
Bill Currie 4a1db5a998 fix the crash on focus loss when using in_snd_block and -nosound 2002-09-30 03:59:55 +00:00
Bill Currie 6a96697080 use int_val instead of value for vid_fullscreen 2002-09-30 03:31:22 +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 5b9d4fb241 close the file if vorbis doesn't like it 2002-09-26 19:37:01 +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 b0629d24fa handle the new case Despair discovered. 2002-09-23 06:18:48 +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 5189ffeae9 fix software model lighting 2002-09-18 14:38:41 +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
Ragnvald Maartmann-Moe IV a9b16f5de5 Tweak ramp decay on new spark shower. 2002-09-17 05:13:13 +00:00
Ragnvald Maartmann-Moe IV d6a2b54252 Use ramps for spark showers, so they fade in color as well as alpha.
Lightning doesn't have a ramp, so it doesn't use this feature yet.
2002-09-17 02:14:58 +00:00
Bill Currie 75c7119cd8 gamma correct the loaded lightmaps so swgamma works better (MUCH better:) 2002-09-15 05:04:14 +00:00
Bill Currie eec3b7d8bc fix missed header commit 2002-09-14 07:51:53 +00:00
Jeff Teunissen e551c1f22b New dump format for progs. It looks like assembly code. setting pr_debug to 2
or higher adds more debug information.
2002-09-14 07:00:40 +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
Bill Currie f7b4dffcc0 get larger player skins working in gl 2002-09-13 05:32:28 +00:00
Ragnvald Maartmann-Moe IV 2a8896d4a1 Grr, what's with cvs today? 2002-09-13 01:08:21 +00:00
Ragnvald Maartmann-Moe IV ca50e1945b Oops. 2002-09-13 00:23:58 +00:00
Ragnvald Maartmann-Moe IV cb241c50bf Replace * with # in map names, rather than _. Seems to be the "standard" for replacement textures. 2002-09-10 23:40:13 +00:00
Bill Currie 899ad6bebe use the correct palette when writing out screen shots 2002-09-10 15:13:12 +00:00
Bill Currie ecdd537183 beat sw gamma handling till GL works. after a fasion. it /looks/ like it was
beaten on.
2002-09-10 06:35:32 +00:00
Bill Currie 9f6f50699d remove vid_basepal, creating vid.palette (current palette) and host_basepal 2002-09-10 03:51:10 +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
Bill Currie f6ab24e6bc min-clamp ambientcolor instead of shadecolor. should make for more visible
players
2002-09-09 23:06:08 +00:00
Bill Currie bf53f43e13 make PR_break do a backtrace instead of crashing the server 2002-09-07 06:48:15 +00:00
Ragnvald Maartmann-Moe IV b7c2f5efa3 Allow loading textures from `textures` directory, as well as from maps. 2002-09-06 21:52:11 +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
Bill Currie 5597dc2408 make maplist work over rcon 2002-09-04 18:56:53 +00:00
Ragnvald Maartmann-Moe IV 92db391e7c Optimize model rendering a hair. WildCode spotted that minimum shade was only being applied to the view model (why do we set it up for other stuff if it's not going to be used?). While looking at that, I noticed we could do the divide by 200 in model setup. 2002-09-01 23:45: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
Bill Currie 9a577c2233 make the old keyname message a little clearer 2002-08-29 18:56:55 +00:00
Ragnvald Maartmann-Moe IV e7f6930efa Hacky key repeat handling, just like in_x11.c! 2002-08-29 04:00:30 +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
Bill Currie be24d628af bah, thought I tested that. why dstrings were being used anyway I don't know... 2002-08-28 21:03:24 +00:00
Bill Currie 246ab0009c Change Con_ClearTyping to take a save flag that will cause the current line
(if not empty) to be saved in the inputline history.

Clear the input (but put in history) of say or say team when pressing escape.

Don't say or say_team if the text is empty.
2002-08-28 16:02:43 +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
Bill Currie e1a9cfb6f0 rename gl_max_vaelements to gl_vaelements_max 2002-08-28 07:44:58 +00:00
Bill Currie a99329eff9 add a cvar to control the maximum vertex array size for buggy drivers.
defaults to 0 (no limit).
2002-08-28 01:35:50 +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 be8df8bdaa fix a nasty bug with looped vorbis sound effects. samples with loop lengths
smaller than their unlooped sections were causing qf to hang.
2002-08-27 19:44:13 +00:00
Ragnvald Maartmann-Moe IV c1a8a02762 Whitespace. 2002-08-27 19:38:04 +00:00
Bill Currie a7380fef66 nuke msg_suppress_1 in favor of Sys_DPrintf 2002-08-27 18:05:59 +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 f473a4fa17 more thorough reporting on bad surface extents 2002-08-27 16:01:51 +00:00
Bill Currie f1938f6b36 fix some segfaults caused by my menu_item->text changes 2002-08-27 08:11:10 +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
Bill Currie c72f721eac fix the multiple frees of menus 2002-08-26 23:40:30 +00:00
Bill Currie 7f5c99efdc fix -sdl32 crashing on startup (vid_bitdepth init got lost) 2002-08-26 22:43:34 +00:00
Chris Ison 38f68330bb tanihwa fix for reloading the menu.dat only when gamedir changes 2002-08-26 19:50:00 +00:00
Bill Currie 8c82a54ac7 fix a 0 byte allocation 2002-08-26 00:30:31 +00:00
Ragnvald Maartmann-Moe IV d11fbc0b5c Change from if/else if/else function for setting scale in a number of particle effects, to scale = pow (count, 0.23). Smooth particle size changes with varying count, and doesn't seem any slower in my benchmarks. 2002-08-26 00:11:16 +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 e2e605841f Code in variable declarations. Yuck. *thwaps taniwha* 2002-08-25 16:51:30 +00:00
Ragnvald Maartmann-Moe IV ddb90e1acd More whitespace. Eek. 2002-08-25 16:35:22 +00:00
Ragnvald Maartmann-Moe IV 89412eee10 One step closer to BSD working. Now just needs some work on autoconfiscation... Yech. 2002-08-25 16:34:28 +00:00
Ragnvald Maartmann-Moe IV 19315a399f Whitespace, comment cleanups. 2002-08-25 14:25:38 +00:00
Ragnvald Maartmann-Moe IV ff03367bc2 Whitespace and comment cleanups. 2002-08-25 05:55:28 +00:00
Ragnvald Maartmann-Moe IV 46456158e8 Whitespace. 2002-08-25 04:47:57 +00:00
Ragnvald Maartmann-Moe IV 9d6bdf5fca Attempt to work around BSD segfault. 2002-08-24 07:40:10 +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
Ragnvald Maartmann-Moe IV 147f940510 Kill dead gl_occlusion cvar. 2002-08-23 21:55:59 +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 7bf21e20ed Use R_CullSphere for rotated bsp models. 2002-08-23 21:14:43 +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
Ragnvald Maartmann-Moe IV aa85219dc4 Commit R_CullSphere use for alias models. Only a 3.3% speed hit for me, and should quiet "foo is disappearing" whinging. 2002-08-23 04:09:00 +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
Ragnvald Maartmann-Moe IV 44e2fbaa87 More whitespace. 2002-08-22 20:06:30 +00:00
Ragnvald Maartmann-Moe IV 6ab0175cfc Whitespace... 2002-08-22 19:16:44 +00:00
Ragnvald Maartmann-Moe IV e6e920747c Whoops, more whitespace. 2002-08-22 19:08:33 +00:00
Bill Currie c44ec1993d handle up to 512x512 map textures /properly/. would be nicer if the max
could be dynamic
2002-08-22 19:00:55 +00:00
Ragnvald Maartmann-Moe IV 27f9b7a1c0 Whitespace. 2002-08-22 18:45:58 +00:00
Ragnvald Maartmann-Moe IV 87b5d2ec5b Whitespace. 2002-08-22 18:38:07 +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
Ragnvald Maartmann-Moe IV 9bf3ccd813 SDL-using targets are now aware if the cursor is in the window or not. in_snd_block now works for them.
(Also cursor hiding when in window was fixed for -sgl, already committed)
2002-08-21 06:06:05 +00:00
Ragnvald Maartmann-Moe IV f92c2d8525 Whitespace cleanups and some cruft removal. 2002-08-21 06:00:08 +00:00
Ragnvald Maartmann-Moe IV 9d2e09feee Whitespace. 2002-08-21 05:59:00 +00:00
Bill Currie 84afd9e299 d'oh, dunno why I did 8 bit that way, put /it/ back to the old shared buffer
way because it always worked and it really doesn't need the slowdown.
2002-08-21 05:15:08 +00:00
Bill Currie be75ff490f fix -x11 screenshots and remove some dead code 2002-08-21 04:58:47 +00:00
Bill Currie 09d89a3214 move bi_keys from csqc to pr_keys in targets allowing the server to link
with libQFcsqc (need a new name:P)
2002-08-21 02:25:51 +00:00
Bill Currie 6b559077dc Nuke the screen saver code as it hasn't been needed since we stopped using
dga keyboard input
2002-08-21 02:10:47 +00:00
Ragnvald Maartmann-Moe IV 1489ee8648 Remove old keyboard/mouse grabber cruft. 2002-08-21 01:55:31 +00:00
Bill Currie c12518de26 windows knows only a subset of the signals 2002-08-21 01:51:27 +00:00
Ragnvald Maartmann-Moe IV b96617e935 Some more whitespace, plus stop unconditionally resuming cd audio and sound when focus restored. 2002-08-21 01:40:21 +00:00
Ragnvald Maartmann-Moe IV ee7e3326e0 Merging common SDL video code into context_sdl.c, to make adding SDL features easier. 2002-08-21 00:05:27 +00:00
Ragnvald Maartmann-Moe IV 168915faed Some header cleanup, some whitespace. 2002-08-21 00:04:35 +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 d328e18de2 implement the "new" inputline api making it possible to pull the Draw_*
functions out of bi_inputline.c. now somebody can be insane enough to
implement a qc controled console for the server ;) (more importantly, one
step closer to being able to have the server link with libQFcsqc (hah!))
2002-08-20 21:19:53 +00:00
Bill Currie 099e2739b5 various msvc fixes thanks to muzzy (hope he doesn't give up:) 2002-08-20 19:16:11 +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 b99a72e876 pr_obj.c:
call obj_find_message with super instead of class when doing a super
	lookup
client_menu.[ch]:
	use the InputLine object instead of directly using the api
InputLine.r:
	builint functions are = #0, not = 0 :P
function.[ch]:
	provide copy_params
method.[ch]
	provide copy_keywordargs
expr.c:
	call inc_users for the parm temp if it's a bind expression
	revers a copy of the selector when building the selector name so the
	selector doesn't get mangled
qc-parse.y:
	catch erronous func = const inintializers (should be func = #const)
2002-08-20 02:09:34 +00:00
Ragnvald Maartmann-Moe IV 32a85e7130 Clipping cleanups.
Calculate radius for alias models as well as brush.
Culling is no longer optional on alias models (was only ever disabled for viewmodel, which is a lot of extra effort to avoid clip testing 1 thing out of hundreds).
Clip QSG2 scaled alias models with a scaled bbox.
2002-08-20 00:48:59 +00:00
Ragnvald Maartmann-Moe IV e9febea31c Whitespace. 2002-08-19 06:00:31 +00:00
Bill Currie 55cdde81da rename clmodel to model 2002-08-19 04:15:46 +00:00
Bill Currie b1a180b25e move the view model check for min_light into the model loader (checks for
progs/v_*)
2002-08-19 04:05:02 +00:00
Bill Currie 2b1fd8e8c0 fix the menu keybinding not working bug 2002-08-19 02:48:38 +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 c1c6c05cf5 pr_obj.c:
delay class fixups so order doesn't matter
class.c:
	write out the class and category diffs properly
2002-08-16 22:53:37 +00:00
Bill Currie c1f5659977 bi_inputline.c:
add InputLine_SetUserData
pr_resolve.c:
	report the correct missing symbol (self instead of time)
2002-08-16 21:52:37 +00:00
Bill Currie 4b1ceb9795 hopefully take care of glGetProcAddress type once and for all :) 2002-08-16 18:29:21 +00:00
Ragnvald Maartmann-Moe IV 3b65cbc35d Raorn's SDL_GL_GetProc support. Makes -sgl targets work again, hopefully on windows as well as linux.
Now just need to get key repeat, focus handling and sound blocking on focus loss working like x11 input system does, and sdl support will be in pretty good shape. And clean out all the stupid #ifdefs...
2002-08-16 07:53:11 +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
Bill Currie 8adad57941 Make the cbuf api use a supplied cbuf rather than allocating its own. Kills
a FIXME and (Closes: #32)
2002-08-14 18:45:09 +00:00
Bill Currie 1a0cf8d1f4 remove some redundant/incorrect code 2002-08-14 06:28:38 +00:00
Bill Currie 7ed7938b1c get colored lighting working reasonably well 2002-08-14 05:45:50 +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
Jeff Teunissen 87fd1adadb Enable compiling the null plugin by default. 2002-08-14 05:16:11 +00:00
Jeff Teunissen 2037db210c whitespace. 2002-08-14 05:12:57 +00:00
Bill Currie 2abaf27cdc attempt to fix the dark models at centers of dlights 2002-08-12 15:36:52 +00:00
Bill Currie 8e97d6279a first stab at colored alias model lighting 2002-08-12 06:14:55 +00:00
Bill Currie 1afd2d95b2 break out the 1 vs 3 lightmap components code into separate functions and
do preliminary support for colored alias model lighting
2002-08-12 04:42:29 +00:00
Bill Currie 7e4e294089 fix the unlit models in full light bug 2002-08-12 02:05:45 +00:00
Bill Currie 4123d74e5e don't segfault when a surface uses the `null' texture (r_notexture_mip) 2002-08-09 06:07:25 +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
Ragnvald Maartmann-Moe IV 30012cc753 Fix K_RCTRL handling. 2002-08-08 05:53:58 +00:00
Bill Currie cbde41c669 damnit! 2002-08-08 04:41:41 +00:00
Bill Currie 3baec9e856 clean out the dead mtex code 2002-08-08 04:27:49 +00:00
Bill Currie 0963c2476d improved server logging. "logfile" is gone from qw-server to be replaced
with "sv_logfile" and thus giving nq-server logging as well.
2002-08-07 18:46:53 +00:00
Bill Currie c05db51069 add Qputs 2002-08-07 18:43:35 +00:00
Bill Currie ca92e5885f part of the macroizing 2002-08-07 18:21:36 +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
Ragnvald Maartmann-Moe IV f773e1fa36 Minor alias model rendering speedup. 2002-08-03 07:07:23 +00:00
Ragnvald Maartmann-Moe IV 10c3f91a24 Revert taniwha's broken-radeon workaround. 2002-08-03 07:07:00 +00:00
Bill Currie 9c08f5b169 fix a typo that caused weirdness with the lerping 2002-08-03 06:13:35 +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
Chris Ison c6217dc7a7 fix bug where -commands where executed and command buffer could be filled when key repeated 2002-08-03 00:19:41 +00:00
Ragnvald Maartmann-Moe IV 97d6f46f75 Speed up 16bit coord alias models a bit. (only one VectorScale per vertex now) 2002-08-02 18:07:53 +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
Bill Currie 612f5c2a31 attempt to fix the win32 server input 2002-08-01 04:49:16 +00:00
Brian Koropoff 4e85063b52 Added support for execution stacks, misc. cleanups. 2002-08-01 02:42:19 +00:00
Brian Koropoff 439f9838d3 Whoops, missed some stuff that needed to be in idparse.h 2002-07-31 22:13:15 +00:00
Brian Koropoff a93b221272 Split off the old console parser into idparse.[ch] and prepared the cbuf
struct and support functions for GIB mark III.

Oh yeah, I'm back.
2002-07-31 22:03:53 +00:00
Bill Currie 4b9382d4a8 nuke GGI_CFLAGS (never set) 2002-07-31 18:51:34 +00:00
Bill Currie 0bb6769204 fix the non-parsing of quakeforge.conf 2002-07-31 06:06:44 +00:00
Bill Currie ad6e025a91 take cmd.[ch] back to basics. the gib code is temporarily gone pending
renovations. cmd_source handling is a little hacky in nq, but it's working.
2002-07-31 05:19:03 +00:00
Bill Currie 021decc7bd start on the cleanup of cmd.c. these aren't used yet, but the parsing is
working
2002-07-30 17:08:53 +00:00
Bill Currie 46ee46fdc6 dead code removal 2002-07-30 04:55:33 +00:00
Bill Currie b9d364d7b7 whitespace clean up 2002-07-30 02:06:37 +00:00
Bill Currie e0aa405e76 remove some dead code 2002-07-30 01:56:07 +00:00
Bill Currie 5fd916a0da looped oggs now work so long as they have a CUEPOINT= comment 2002-07-29 22:25:32 +00:00
Bill Currie d00ed9619f give dstring_adjust a prototype and fix up some whitespace 2002-07-29 19:52:19 +00:00
Bill Currie 0514d37458 don't accept absurdly large vertex arrays 2002-07-27 16:46:58 +00:00
Bill Currie d04eeb3ba2 get -wgl working again 2002-07-27 06:43:28 +00:00
Bill Currie 01228a8be0 set the file mode before seeking 2002-07-27 06:42:52 +00:00
Bill Currie b3d6875e61 _vsnprintf doesn't like a null pointer in windows 2002-07-27 02:00:06 +00:00
Bill Currie 587ac5670b using R_FLOAT for setting individual fields of the return vector ain't so
good a thing to do.
2002-07-25 14:58:02 +00:00
Ragnvald Maartmann-Moe IV 587de27849 Another step towards QSG2 compliance. 2002-07-25 14:43:36 +00:00
Ragnvald Maartmann-Moe IV 3c7d65a798 Whitespace. 2002-07-25 14:42:41 +00:00
Ragnvald Maartmann-Moe IV 4ed68266ea Speedup when r_waterripple = 0, and small speedup to texture coordinate calculation. 2002-07-25 14:01:36 +00:00
Bill Currie 2f57f95783 don't show the single player menu line 2002-07-25 05:33:16 +00:00
Bill Currie 51e4cad3fe get Draw_SubImage doing transparencies 2002-07-25 05:04:22 +00:00
Bill Currie 51b189f56a make Draw_SubPic do transparent pics 2002-07-25 04:30:50 +00:00
Bill Currie de22355371 use P_* for params and R_* for return values in builtins code 2002-07-24 21:42:33 +00:00
Bill Currie defcedec49 give access to Draw_SubPic 2002-07-24 21:39:03 +00:00
Ragnvald Maartmann-Moe IV d3fc8c5fb6 No need for function pointers on R_AddDynamicLights_*, they are never called from outside the R_BuildLightMaps_* function that matches them.
Nice spotting, taniwha!
2002-07-24 15:30:28 +00:00
Ragnvald Maartmann-Moe IV 85c7e43aef Split lightmaps off from surface drawing. 2002-07-23 19:57:47 +00:00
Ragnvald Maartmann-Moe IV 227da6afba Change pr_boundscheck default to 0. *grmbl* 2002-07-21 23:35:36 +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
Bill Currie bff6291bfb don't need to force developer now 2002-07-16 22:06:52 +00:00
Bill Currie ac1392eb74 object.r:
define __obj_exec_class, obj_msgSend and obj_msgSend_super for the way
	qfcc now handles these defs
pr_edict.c:
	PR_ValueString now checks that the function is valid before trying to
	print its name.
class.c:
	__obj_exec_class is now extern
linker.c:
	fix more mangled relocs
method.c:
	obj_msgSend and obj_msgSend_super are now extern
qfcc.c:
	fixes so obj_module_t doesn't get zapped
type.c:
	fixes so obj_module_t doesn't get zapped
2002-07-16 19:03:56 +00:00
Bill Currie 35d224f1da a little more info and force developer on for now 2002-07-16 15:39:49 +00:00
Bill Currie 34fa421638 whitespace 2002-07-13 03:41:33 +00:00
Ragnvald Maartmann-Moe IV 1f8a1d613f Fix r_particles_nearclip being forced to max. 2002-07-08 00:05:33 +00:00
Ragnvald Maartmann-Moe IV d297c2b3a3 Colormod & alpha for brushmodels, excluding skypoly emittors. 2002-07-07 06:15:36 +00:00
Ragnvald Maartmann-Moe IV edc4e27124 Minor order fixup. 2002-07-07 02:34:48 +00:00
Bill Currie 1337b8bd3d be a little more verbose with the "Bad surface extents" error. 2002-07-03 21:03:49 +00:00
Jeff Teunissen 065ec7ff39 Clean up the "fxMesa" error message so it makes more sense, and so most people
will actually see it if they need it.
2002-07-03 06:31:03 +00:00
Ragnvald Maartmann-Moe IV e1854315ac Clean out DDActive, except from -mgl, which isn't supported ATM. Clean up vid_mgl.c comments and dead code a bit. 2002-07-02 20:34:51 +00:00
Bill Currie 91dc5b20db nuke MSG_ReadChar. Other than the sign extention, it's redundant and nothing
a suitable typecast can't take care of.
2002-07-02 19:15:29 +00:00
Ragnvald Maartmann-Moe IV 5e5fdb7bc2 Kill MSG_WriteChar. 2002-07-02 19:13:53 +00:00
Bill Currie e5d8781150 win32 compile fixes. still have problems with DDActive, but Despair's going
to look at that.
2002-07-02 18:45:50 +00:00
Ragnvald Maartmann-Moe IV a49177c605 Merge a few more lines into queue_character, and prepare for optimizing gl Draw_nString. 2002-06-28 17:47:26 +00:00
Bill Currie 1828cbff5a get the type for getProcAddress right 2002-06-28 17:15:49 +00:00
Ragnvald Maartmann-Moe IV a6d999dfa4 Speed up most of the MSG_Write* functions by reducing the number of times SZ_GetSpace gets called. 2002-06-28 04:48:07 +00:00
Ragnvald Maartmann-Moe IV 4e467ac8df Whitespace. 2002-06-27 18:50:26 +00:00
Bill Currie e77d730054 windows really sucks 2002-06-27 16:37:16 +00:00
Ragnvald Maartmann-Moe IV fd1ded5c4a Add r_nearclip and r_particles_nearclip. Also put some limits on r_farclip. And fix id's insane max and min float, and some minor improvements in frustum setup in GL. 2002-06-26 22:20:12 +00:00
Ragnvald Maartmann-Moe IV e6e11af426 Move the contents of gl_funcs.c out of the renderer, and into targets where they belong. Also some cleanups. -sgl target is temporarily broken, all others should work. 2002-06-24 21:35:37 +00:00
Chris Ison 70d8026067 Removing -3dfx's dependancy on clide 2002-06-24 15:56:01 +00:00
Ragnvald Maartmann-Moe IV c8bc5dfb4c QSG2 glows almost working. Plus lots of typos killed. 2002-06-18 21:41:24 +00:00
Ragnvald Maartmann-Moe IV c25cfe6c9e A couple extra glFinishes a frame just aren't good for performance, even if they are a handy workaround for taniwha's text rendering bug... 2002-06-18 15:40:30 +00:00
Bill Currie 1486c97b8f move the vertex setup and va flushing code into inline functions, killing a
lot of duplicate code. Performance is not harmed :)
also some whitespace
2002-06-18 04:13:46 +00:00
Bill Currie 717127e0d8 don't print ! on uninitialized global defs that are the correct type for
the instruction
2002-06-17 05:31:08 +00:00
Bill Currie 59dba829f2 fix an out-by-one error caused by over-optimisation of floats. 2002-06-17 00:26:13 +00:00
Bill Currie 2264c28310 pr_strings:
remove a bogus 0x which caused confusion in an error message
def.c:
	vector fields still need an extra 3 globals for their component fields
2002-06-16 05:24:58 +00:00
Bill Currie 76704e9daf the other part of the rename 2002-06-16 04:22:51 +00:00
Ragnvald Maartmann-Moe IV 00f5d82a86 Make wizard spike hits visible, plus a couple minor cleanups. 2002-06-15 10:54:26 +00:00
Ragnvald Maartmann-Moe IV 2a4f2a77fb Whitespace. 2002-06-15 10:52:14 +00:00
Bill Currie 930ba48862 other than sounds that are ment to loop not looping (due to losing that info
when converting to ogg (I've got some ideas on that)), ogg/vorbis support is
working. Doesn't seem to be too much of a load-time hit.
2002-06-15 05:43:56 +00:00
Bill Currie ddf4f257f4 *sigh*, sometimes I hate automake 2002-06-15 03:20:59 +00:00
Bill Currie 9f1e6f9c82 make the vorbis support mostly work. qf segs in Cache_TryAlloc when loading
a map, but I think that's related to some of our other sound resample bugs.
2002-06-14 22:55:57 +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 b65c96ad99 don't call draw_z_sky_polys for modes that don't need it 2002-06-14 19:25:32 +00:00
Ragnvald Maartmann-Moe IV df55030fa8 Fix alias bounding box sizes, so that large critters don't disappear when at edge of view frustrum...
(Taken and debugged from tutorial on quakesrc.org)
2002-06-14 09:33:37 +00:00
Ragnvald Maartmann-Moe IV eaf0f90c2f Undo thinko. 2002-06-14 06:23:11 +00:00
Ragnvald Maartmann-Moe IV c7432caf2e Fixes to shadow rendering, plus get QSG scale working for alias models. Which breaks viewmodel rendering until we figure out how that is escaping getting scale set. 2002-06-14 06:08:45 +00:00
Ragnvald Maartmann-Moe IV f12af8a3d4 Minor cleanup/optimization of sprite model rendering. 2002-06-14 06:06:38 +00:00
Ragnvald Maartmann-Moe IV 463ac44d9f Minor optimization for shadows, and make translucent objects have shadows matching their alpha. 2002-06-14 04:14:52 +00:00
Ragnvald Maartmann-Moe IV 942bf55c06 Flush console text before rendering menus, and a tiny optimization to fullscreen blend rendering in GL. 2002-06-13 22:51:43 +00:00
Bill Currie e774943f24 va.[ch]:
new va function: nva which returns a strduped buffer
expr.c options.c:
	use nva instead of strdup (va (...
struct.c type.c:
	make type encoding work properly for structs
2002-06-13 16:39:33 +00:00
Brian Koropoff 0d2bd0ca77 Finally added a file_read command. 2002-06-13 05:58:48 +00:00
Ragnvald Maartmann-Moe IV 10d7d17fcc Use vertex arrays for text. Another 1-3% speedup. 2002-06-13 05:24:52 +00:00
Bill Currie 88fc0be127 arrays are /almost/ working again 2002-06-12 22:37:18 +00:00
Ragnvald Maartmann-Moe IV 87741d2b90 Tweak r_firecolor to reduce haloing on rocket dlights. 2002-06-12 04:37:33 +00:00
Bill Currie 0b1d1ade73 qfprogs can now read the debug data 2002-06-11 17:24:37 +00:00
Brian Koropoff fe48995a0c Fixed some error messages and a small bug in list.gib 2002-06-11 06:08:31 +00:00
Bill Currie 74597018ec heh, forgot to ifdef the call to R_InitVars 2002-06-10 22:52:13 +00:00
Bill Currie 3551b82a50 compile fix for when vidmode isn't available 2002-06-10 22:30:30 +00:00
Brian Koropoff b70ffbf871 Fixed a warning message. Changed writefile to file_write. Added file_find
which searches a directory for files matching a pattern and returns a \n-
separated list.
2002-06-10 22:03:51 +00:00
Bill Currie a7f1e1185b Patch to get oss sound working in BSD thanks to Alexander Leidinger
<Alexander@Leidinger.net>
2002-06-10 15:36:33 +00:00
Bill Currie a4b06b1074 blah, enums and switch... (at least gcc 3.1 is warning about that again:) 2002-06-09 16:31:08 +00:00
Ragnvald Maartmann-Moe IV 9bca381c41 Remove R_Init_Entity. Never used, and probably doesn't belong in the renderer. 2002-06-07 23:38:53 +00:00
Bill Currie 5c943d4ca9 this should speed up progs a little bit 2002-06-07 19:41:13 +00:00
Bill Currie 3de07df3d2 *sigh*, I'm having a real problem this morning :P 2002-06-07 15:11:59 +00:00
Bill Currie c0888ae8e4 I really hate the way cvs won't let you undo a poorly thought out removal 2002-06-07 15:09:57 +00:00
Bill Currie ebfdbd9285 the fpu manipulation stuff seems to be better off in the one place that
actually uses it...
2002-06-07 15:09:20 +00:00
Bill Currie 4e07810f0d a little cleanup of unneeded lines 2002-06-07 14:44:02 +00:00
Ragnvald Maartmann-Moe IV ceb73449bb Order of operations cleanup, QSG2 alpha is now colormod[3] in entities. 2002-06-07 11:25:47 +00:00
Ragnvald Maartmann-Moe IV 46949068a2 Check return value on R_AllocDlight. Small optimization, people cutting r_dlight_max heavily should like it. 2002-06-05 22:07:38 +00:00
Ragnvald Maartmann-Moe IV 0552d31b0b Minor optimization. 2002-06-05 06:46:21 +00:00
Ragnvald Maartmann-Moe IV 0bce2d0f2e Add QSG2 colormod, alpha, and scale for sprites. Probably not used by anything, but there you go. 2002-06-05 05:56:13 +00:00
Bill Currie 0f9adc182d win32 compile fixes 2002-06-04 16:17:10 +00:00
Jeff Teunissen 1ba994fd13 This is a test hack, to see if chopping off some of the integer realtime's
data helps in lengthening the amount of time a server can be up without Weird
Stuff(tm) happening.
2002-06-03 23:29:34 +00:00
Bill Currie 4039452297 more sys cleanup. server consoles may be broken for non-curses. 2002-06-03 19:11:48 +00:00
Bill Currie 0f94fd64e7 blah, forgot to #ifdef them :P 2002-06-03 17:26:09 +00:00
Bill Currie 54b299a7e2 set the type and size of the fpu control word vars 2002-06-03 17:04:47 +00:00
Bill Currie d7c7ac7891 don't add -version-info for static plugins 2002-06-03 16:34:46 +00:00
Bill Currie b4e8e0750c well, that's one way to confuse anybody
fixes the floating point exception
2002-06-03 07:23:41 +00:00
Bill Currie ad08ff7492 there, finally got it right. ugh 2002-06-03 06:01:19 +00:00
Bill Currie 3ffec9e8c1 d'oh, forgot to set up my GOT base register in all the functions :P 2002-06-03 04:58:42 +00:00
Bill Currie 07c7c05f64 finish making sys_ia32.S PIC friendly 2002-06-03 04:06:25 +00:00
Bill Currie f00e892d4e mingw gcc 3.1 is freaking weird 2002-06-02 05:27:32 +00:00
Bill Currie 321dbc87d2 missed a couple of global accesses 2002-06-02 04:07:18 +00:00
Brian Koropoff 13d6898fe0 Changed aliases to be handled by the command registering system in
preparation of separating GIB into its own module.  Command-related
functions will stay in util, but the buffer handling code and interpreter
will be moved out of cmd.c.
2002-06-01 22:13:14 +00:00
Bill Currie 9630a23391 more Sys_* cleanup 2002-06-01 03:00:13 +00:00
Bill Currie fc0bb7e175 move Sys_DebugLog 2002-05-31 22:50:43 +00:00
Bill Currie 55fcead77c look for the .this field but don't complain if not found 2002-05-31 17:21:38 +00:00
Bill Currie a8e177652a initialize the meta class super class pointer correctly 2002-05-31 14:58:42 +00:00
Bill Currie 2ee3aec19b reverse the order of linking 2002-05-31 06:52:48 +00:00
Bill Currie ea3c6995fd actually /use/ method_list.method_next and chain the class methods onto the
instance methods for root classes.
2002-05-31 06:01:47 +00:00
Brian Koropoff d85a238af2 Modified cmd.c to prepare for more file access functions and changed
the bind system to keep a restricted flag on binds to prevent the
server from executing restricted commands by binding them to keys.
2002-05-31 05:38:06 +00:00
Bill Currie 381bdb2323 it seems some GL libs can return a null extension list (ie, null pointer) 2002-05-31 03:38:01 +00:00
Bill Currie 9134e05aec return lists of multiple matching elements 2002-05-30 21:56:57 +00:00
Bill Currie 8a762bdaaf hack to work around the gl lighting fix breaking sw 2002-05-30 21:39:21 +00:00
Bill Currie 4e67f8d155 remove an extern 2002-05-30 18:38:57 +00:00
Bill Currie a7b5b56a2c implement Z_Realloc, PR_Zone_Realloc and pr_obj_realloc 2002-05-29 20:58:53 +00:00
Brian Koropoff 8025dfd2ce "runLength-- > 0" made runLength negative, even though the test failed.
Skins should work again.
2002-05-28 23:34:02 +00:00
Bill Currie 9b7b059d5c speed up LoadPCX a bit 2002-05-28 06:05:36 +00:00
Bill Currie bebf3f9599 massive speedup to noise_diamondsquare (not that it /really/ matters:) 2002-05-28 05:34:06 +00:00
Bill Currie 7a3b63418b `adequate' temporary fix for r_lightmap_components 1 2002-05-28 04:11:40 +00:00
Bill Currie f3132162ae speedup r_lightmap_components 3 by ~4.2% in null-render 2002-05-28 03:49:13 +00:00
Bill Currie 101d38bd0c two win32 fixes for gcc 3.1 2002-05-28 03:33:03 +00:00
Bill Currie acdd37b381 this seems to give ~2.9% speed boost to overkill for null-render 2002-05-28 00:04:01 +00:00
Bill Currie 6fbf011073 rpm building fixes 2002-05-27 20:28:10 +00:00
Ragnvald Maartmann-Moe IV 802bcc2762 Another 0.657% speedup for greyscale lighting. Unfortunately, at a price of considerable code duplication. But this is necessary for other planned changes. 2002-05-26 08:56:48 +00:00
Ragnvald Maartmann-Moe IV 6c8e2c24aa *grumbles about old gcc* 2002-05-26 07:07:10 +00:00
Brian Koropoff 75ec7de2f5 This better actually fix the lightmap code. 2002-05-25 21:55:34 +00:00
Brian Koropoff ddd96312b1 Removed useless dereferencing. With any luck I understand what despair's
code is supposed to do this time.
2002-05-25 20:04:42 +00:00
Ragnvald Maartmann-Moe IV f1f942dfd1 Hacking my way towards working r_lightmap_components 1.
Users of r_lightmap_components 1, should set `int mod_lightmap_bytes = 1` at the start of `quakeforge/libs/models/brush/gl_model_brush.c`.
2002-05-25 15:29:22 +00:00
Ragnvald Maartmann-Moe IV b7900a2c43 Undo snax's order of operation breakage, and fix the typo that broke lightmap merging for r_lightmap_components 1.
The real problem with greyscale lighting, is in brush model loading. It'll probably take me a while to sort it out, since taniwha didn't get to it before taking off for the weekend. Sorry...
2002-05-25 15:01:23 +00:00
Brian Koropoff 11a14c077e Small order-of-operations fix. 2002-05-24 23:32:34 +00:00
Ragnvald Maartmann-Moe IV 2fe76b39e7 Smarter lightmap handling code. Still considerable optimization possible, at expense of duplicate code. 2002-05-24 17:12:41 +00:00
Bill Currie 25ebab2e09 only call Cbuf_ExecuteStack when the buffer has anything to execute. this
gives an ~1.1% boost to overkill.
2002-05-23 05:42:51 +00:00
Bill Currie 33e055209e Semi-major (more than minor:) progs convenience macro cleanup. There will
be more to come.
2002-05-22 22:35:37 +00:00
Bill Currie ea36fceec5 fix a few missed initializations 2002-05-22 21:45:15 +00:00
Bill Currie 34ec521198 vararg functions can now be imlemented in qc using @argc (number of params
passed through ...) and @argv (array of vectors, one for each ... param)
2002-05-22 20:43:29 +00:00
Bill Currie 018b3ae536 more runtime implementation 2002-05-22 19:02:26 +00:00
Bill Currie 43e609241c initial stab at supporting most of the obj runtime 2002-05-22 17:32:44 +00:00
Bill Currie 33daf1e724 provide temporary stubs for most of Object's methods 2002-05-21 23:39:21 +00:00
Bill Currie 3815d4be7e blah, unitialized variable 2002-05-21 22:27:41 +00:00
Bill Currie 05c8cad2d1 grr, really should make compat.h include string[s].h
also, partially implement the messaging functions
2002-05-21 22:13:05 +00:00
Bill Currie 9820c5d45a start working in the obj runtime. any and all functions named ".ctor" will
be run in the order found.
2002-05-21 21:29:49 +00:00
Bill Currie a8c3fa8ffc correct the function names in PR_EnterFunction and PR_LeaveFunction 2002-05-21 21:14:32 +00:00
Bill Currie 1b550c80b1 finally get Sys_Error `right' 2002-05-21 21:03:46 +00:00
Brian Koropoff 25969dbad7 Added a temporary hack to make quake.rc, config.cfg, and default.cfg work
in some mods that would generate mismatched quotes otherwise.
2002-05-21 02:02:20 +00:00
Brian Koropoff ee5d0b7a99 Added r_farclip to control the far clipping plane. 2002-05-20 05:11:12 +00:00
Brian Koropoff 347962cc33 Fixed a bug introduced by my optimizations. 2002-05-19 06:32:57 +00:00
Bill Currie f78f921285 search for `.self' before `self' 2002-05-18 00:49:16 +00:00
Brian Koropoff 967d39541a Optimized GIB a bit. 2002-05-17 21:38:37 +00:00
Bill Currie 057aa61bd3 `document' the type sizes 2002-05-17 16:44:47 +00:00
Bill Currie 9d59915fdc it's a little hacky, but this might do better with keeping vid_gamma_avail
straight.
2002-05-17 03:17:33 +00:00
Brian Koropoff 4cb3a5087b Whoops. Fixed some GIB bugs. 2002-05-15 22:39:37 +00:00
Brian Koropoff 58e8a997f8 GIB: Added the writefile, legacy and eval commands and created the
beginnings of a GIB security model for console access by the server.
Fixed a bug in zoom.gib.
2002-05-15 22:14:17 +00:00
Bill Currie 8f0661f5be correct the copyright year 2002-05-14 23:07:38 +00:00
Bill Currie 6a5bbf6f0a memory allocation checking cleanup 2002-05-14 06:37:28 +00:00
Bill Currie 1e0611e156 Sys_Error now makes sure all messages are terminated with a \n 2002-05-14 06:14:53 +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 91779b04f7 new tool: qfprogs. currently only disassembles progs, but the idea is for it
to become a progs oriented nm, objdump etc
2002-05-13 19:37:36 +00:00
Brian Koropoff 09366866f7 GIB segfault fix 2002-05-12 20:28:19 +00:00
Brian Koropoff f6697e0ef0 Fixed an oversight in Cmd_FreeBuffer in GIB and made a few misc. fixes 2002-05-11 20:44:59 +00:00
Brian Koropoff 6d37a9e48a Fixed up zoom.rc, renamed it to zoom.gib. Made alias with only one
argument print the contents of that alias.  Added the sleep command,
which works like wait but pauses for a certain number of seconds.
2002-05-11 06:09:50 +00:00
Brian Koropoff 56d033efa4 Auditted cmd.h and cmd.c to fix a bug, a few bits of useless code, and to
add some preliminary comments about all the functions.  I also rearranged
a lot of the functions to be more logically grouped.
2002-05-11 03:00:14 +00:00
Brian Koropoff 3fffa26fb4 Added thread support to GIB and cleaned up escape characters yet again.
With any luck it should actually work this time.  Added the getimpulse
command so that GIB scripts can check if an impulse command is pending
before sending their own.  Fixed all the memory leaks I could find.
QuakeC and GIB seem to be clean except for maybe one or two sneaky leaks
I can't track down.
2002-05-11 00:36:12 +00:00
Bill Currie 73e6cf062c implement type encoding 2002-05-10 23:19:57 +00:00
Brian Koropoff e4f740bf02 Buffers created for embedded commands are now marked with a special flag.
This allows Cmd_Return_f to decide which buffer it should return a value
to.  End result: you can put blocks of code with a return statement inside
an embedded command statement.  I hope nobody minded me using my
quakeforge.net account to code a bit :P
2002-05-09 20:12:12 +00:00
Brian Koropoff 4074999b9b Numerous enhancement and fixes to GIB, including index ranges, fixed
escape characters, and more.
2002-05-08 23:01:07 +00:00
Bill Currie 44f9700ed2 two spelling correctsions are remove a redundant VectorCopy 2002-04-30 16:37:11 +00:00
Bill Currie 93febb90c9 search for .gz first 2002-04-30 04:39:03 +00:00
Brian Koropoff 942b3c2744 Floating point value of fov is now used. 2002-04-29 22:03:33 +00:00
Bill Currie 08f12355c5 this /should/ fix CoolMoDee's autoconf 2.53 issues 2002-04-29 19:19:26 +00:00
Bill Currie a1fef28b60 fix the sw32 fov caps so it maches sw and gl 2002-04-29 17:21:52 +00:00
Brian Koropoff 601736719d Fixed the use of double quotes in chat messages and removed single quotes
as an option to enclose tokens.
2002-04-29 01:04:29 +00:00
Jeff Teunissen 2711cbbe7c Don't restore gamma if it's never been initialized. :) 2002-04-28 09:03:50 +00:00
Brian Koropoff ff901a312f Added argument-list functions to EXP with trig and inverse trig functions
to start.  More will follow.  Switched to doubles from floats and allowed
numbers with exponents to be parsed properly.  Also changed the number of
significant digits printed to 10.  Changed fov so it is now capped at 1,
not 10.  The float value of fov is now used instead of int, so more
precision can be attained at small values.
2002-04-28 08:30:54 +00:00
Bill Currie a59e509033 Multi_key (K_COMPOSE) and Menu (K_MENU) are now supported 2002-04-27 00:25:40 +00:00
Bill Currie a5dc496c38 support the printscr key in X 2002-04-27 00:07:47 +00:00
Brian Koropoff 7121891895 Fixed Cmd_If_f so that embedded commands work again. 2002-04-26 22:09:28 +00:00
Jeff Teunissen 411ade4ce2 Fix gamma again. Also some minor whitespace and slight code cleanup. 2002-04-26 20:25:01 +00:00
Bill Currie ac73653741 XPutImage returns 0 for success, not error 2002-04-26 18:55:37 +00:00
Bill Currie 9399b35b02 alpha compile fix 2002-04-26 17:15:00 +00:00
Bill Currie 89f7604d40 VID_GetGamma neither compiles nor is needed :) 2002-04-25 21:54:07 +00:00
Chris Ison 54ed05e52b changed sig handling to allow for core dumps etc, like x11 and glx 2002-04-25 21:51:47 +00:00
Jeff Teunissen b75d50d088 X11 gamma restoration now works properly for systems with a normal gamma that
uses all three components (red, green, blue).

Next up: three-component internal gamma.
2002-04-25 20:53:15 +00:00
Jeff Teunissen c877ba7fbd System gamma is now restored properly in X11. 2002-04-25 20:28:15 +00:00
Bill Currie 45e98d80d9 redo the cvar vector reading code to produce more useful results 2002-04-25 20:08:18 +00:00
Bill Currie ce1c2e0bd1 sort the sources list 2002-04-25 19:39:26 +00:00
Jeff Teunissen 7c134a6f95 Fix up the watervis stuff. Whoops! :) 2002-04-25 14:34:15 +00:00
Jeff Teunissen 5b069de40c Redo r_wateralpha so that it doesn't force its value based on the watervis
serverinfo. Instead, create a new cl_wateralpha float variable that is set to
r_wateralpha->value in Host_Frame, and use that float during rendering.
2002-04-25 12:51:04 +00:00
Bill Currie da994c16e5 rewrite R_SplitEntityOnNode to be itterative rather than recursive (using
a static `stack') to avoid the function call overhead. this cuts about 40%
of the execution time from this function.

No matter what I tried, best results were obtained using __builtin_expect,
so make sure non-gcc compilers do the right thing when they encounter it.
2002-04-25 04:32:55 +00:00
Brian Koropoff bf323c3f0a Cleaned up Cmd_Args. It is no longer uselessly built up in
Cmd_TokenizeString since I realized the code was just pulling it apart and
putting it back together.  Added Cmd_Argsu to access the unprocessed
command.  Added support for else following if in such a way that
if/else if/else structures work.  Added support for unary operators in
EXP and added the ! (not) operator.  The ifnot command will be kept
for variety.
2002-04-24 22:33:04 +00:00
Bill Currie e4975cd675 very minor load-time optimisation 2002-04-23 17:23:18 +00:00
Brian Koropoff 7f295d61ee Added the getserverinfo command to return the value of a server info key
to GIB.  Fixed a bug in dstring_replace that was causing too much data to
be copied when the incoming string was larger than what was being replaced.
Very minor reorganization in cmd.c (1 function moved around I think).
cmd.c should probably get broken up into separate files soon.
2002-04-23 07:47:24 +00:00
Brian Koropoff 349fbf7150 Fixed a bug with escaped braces and quotes and added the strlen and streq
commands to GIB.
2002-04-22 04:23:36 +00:00
Bill Currie 4ccc9d6322 dstring.c dstring.h:
add dstring_replace. this replaces a string of lenth rlen at position
	pos with data of lenth len, growing, shrinking and shuffling data as
	appropriate. At this rate, the dstring `class' will get buffer gap
	editing capabilities :)
cmd.c:
	Cmd_TokenizeString builds cmd_active_buffer->line again.
	Cmd_Process bails out instantly if cmd_active_buffer is a legacy buffer
	and uses dstring_replace to modify the parameters in
	cmd_active_buffer->line. This last change results in drastic
	simplification (and accuracy) of the commandline reconstruction code,
	both in Cmd_TokenizeString and Cmd_Process.
2002-04-19 22:54:27 +00:00
Bill Currie ef81af9245 the "two birds with one stone" commit
1) when /not/ building static plugins, the plugin info name is, once again,
   PluginInfo, but is still type_name_PluginInfo for static plugins. This
   allows plugins to be symlinked (highly desirable for the debian packages,
   and likely others). This also requires plugins to /not/ be loaded with
   RTLD_GLOBAL.
2) because of 1, snd_alsa_0_9 has to explicitly load libasound itself. This
   just happens to fix my segfault on shutdown in RedHat 6.2.
2002-04-19 20:08:54 +00:00
Bill Currie e34ab5541c munmap the sound buffer when closing the device. This might help with some
hangs on shutdown.
2002-04-17 21:15:19 +00:00
Brian Koropoff 4cb89c69b2 Moved commands from bound keys into a separate buffer, changed the syntax
of for loops to be like that of C, changed math expressions to be
enclosed in #{} instead of #().
2002-04-17 07:05:43 +00:00
Brian Koropoff fafb014bbe Oops. Fixed a stupid bug that broke having more than one embedded command
in a token.
2002-04-17 01:15:10 +00:00
Brian Koropoff cb79de3584 Completely redid the way embedded functions are subroutines in general are
handled, meaning that execution can be paused at any time without a hitch.
Warning: This is a major change to the architecture (or lack thereof) of
GIB.  Please test for bugs!  Also, there are a few ugly bits of code that
need to be cleaned up, but that work for now.
2002-04-16 23:56:21 +00:00
Jeff Teunissen a4f3973ef1 Add multitexture support for Alias models, and disable the multitexture
support for BSP models, until they can be fixed. gl_multitexture should now
actually be a speedup!

NOTE: Some OpenGL implementations have trouble with the texture function
used. 3Dfx Voodoo 1/2 are known to have this trouble. I don't know how to fix
this, or even if it can be fixed. :/
2002-04-16 16:51:35 +00:00
Bill Currie 55a5c39187 Turns out that on PPC, va_list is an array (effectivly typedef struct
__va_list_tag va_list[1];) which causes grief when attempting to reuse
va_list variables (eg, in vsnprintf retry loops). This is the reason for
MisterP's crashes as the pointers in va_list no longer point to valid data.

acinclude.m4:
	shamelessly steal the va_list, va_copy and __va_copy macros from
	cdda2wav but modified so AC_DEFINE includes the description (so
	acconfig.h can remain gone)
configure.ac:
	use AC_TYPE_VA_LIST, AC_FUNC_VA_COPY and AC_FUNC_VA__COPY
dstring.c:
	stash the incoming va_list args in a temp var before calling vsnprintf
	then restore them each time before retrying, but only if va_list is an
	array (hopefully this is ok for when va_list is a structure)
2002-04-15 22:17:02 +00:00
Chris Ison 347cdc5e33 some small performance optimizations with textures and animations 2002-04-15 03:26:08 +00:00
Bill Currie 49deaf2661 that wasn't meant to get checked in. it came from an aborted change to
how commands get register.
2002-04-14 22:52:52 +00:00
Brian Koropoff c3da90fce0 You can now assign to local variables with var = value. You can also
index into variables in either substitution (i.e. $bob[25]) or assignment
(i.e. bob[25] = 'q') When using assignment into an index of a var, the
current character is removed and replace with the new value.  That means
that if the new value is longer than one character, the string will grow.
A feature that may be done in the future is indexing between two values
to get a substring, ie bob[25..30] = newstr.
2002-04-14 22:35:56 +00:00
Bill Currie 403af77038 give qc access to Cmd_Return 2002-04-14 01:25:24 +00:00
Brian Koropoff 503dab1aee The tokenizer will now not break tokens appart within quotes or braces.
This means things like echo ~{somefunc arg1 arg2} will get parsed properly
without having to enclose it in quotes.  Exported the Cmd_Return function
so that anything can return values to GIB (such as quakec).
2002-04-14 01:12:19 +00:00
Bill Currie b4c8546169 add the keyhelp command. think xev 2002-04-13 04:56:00 +00:00
Bill Currie 8220ddd83d and the command api to csqc and use it to bind menu_load and menu_save. F2
and F3 now work in nq :)
2002-04-12 17:19:49 +00:00
Bill Currie a974eb2333 move buildnum.c to util and make nq and qw init more similar 2002-04-11 18:42:55 +00:00
Bill Currie ba9ad15ebd it he's if I understand that Draw_CachePic puts the pic into the cache... 2002-04-10 06:56:25 +00:00
Bill Currie 0855e018dd d'oh, bloody gcc 2.95 builtin prototypes 2002-04-10 01:38:21 +00:00
Bill Currie 15e17acc1c the draw api now uses a `real' qpic_t rather than loading the pic every time 2002-04-09 21:38:41 +00:00
Bill Currie 76d004f9cf fix confim_quit 2002-04-09 17:00:39 +00:00
Bill Currie 47a94ed6af clear out the string hash resources completely 2002-04-09 16:21:27 +00:00
Bill Currie 8588d2d1cd fix a silly braino in the resources code that was causing the resource
structs to not get linked into the chain
2002-04-09 16:06:05 +00:00
Bill Currie 9dd7deb798 better catching of invalid inputline pointers 2002-04-09 15:29:48 +00:00
Bill Currie 4f65a313fd oops :) 2002-04-07 04:57:42 +00:00
Bill Currie 197db0aca7 more signed char indeces 2002-04-07 04:54:19 +00:00
Bill Currie ea9c1fc4ac setenv isn't as portable as one could wish... 2002-04-07 04:45:02 +00:00
Bill Currie 9885aa5916 fix some signed char index warnings 2002-04-07 03:41:10 +00:00
Bill Currie db75da7733 this should fix compiling snd_sun on solaris 2002-04-07 03:24:29 +00:00
Bill Currie b322835767 fix a missing \n 2002-04-03 18:50:36 +00:00
Brian Koropoff 93c9f96416 Added embedded commands with ~{} and the return command, created a token
structure to help tidy the command buffer struct up a bit, fixed a few
bugs and probably created 100 more.  A lot of things were changed to
allow embedded commands:
- Old buffers on the stack are left alone for Cbuf_ExecuteStack to
clean up.  This is so return values can be extracted from them.
- The imperative flag has been added.  An imperative buffer and all buffers
following it can not be paused with the wait command.
- The returning flag and retval dstring have been added.  If a buffer
returned something, the flag will be set.
- The return command was added so there was something to use in the
substitution.  Return nukes all loop buffers since they don't really count
as independent functions, sets the return value on the top buffer, and
clears it.
- Who knows what else.
2002-03-29 07:43:02 +00:00
Brian Koropoff 676bf39d9d Beautified GIB, improved looping and backtraces slightly. Old buffers are
now recycled, not freed.  Fixed some bugs in exp.c.  Ready to add embeded
functions (read: function calls with return values) and for loops.
Probably some other misc. fixes, I tend to go on debugging streaks.
2002-03-27 06:24:19 +00:00
Brian Koropoff 807e7de22e Fixed a bug with comments that don't have a newline after them. 2002-03-24 06:55:52 +00:00
Brian Koropoff 7c4cecd700 Fixed a stupid bug in Cmd_Exec_f that was causing map commands inside
executed files to crash the server.
2002-03-23 23:13:15 +00:00
Brian Koropoff 73f32465c5 Fixed a double free in exp.c, and made math error reports slightly more
useful.
2002-03-22 07:11:05 +00:00
Brian Koropoff e1b61d2116 Changed how looping works, fixed echo to work with taniwha's Cmd_Args
changes, added the != operator for math evaluation, added break command
to break out of loops early, added ifnot command, and who knows what else.
2002-03-22 00:22:03 +00:00
Bill Currie 961a716942 minor oops 2002-03-21 21:56:59 +00:00
Bill Currie 5a30278e77 whitespace 2002-03-21 21:56:22 +00:00
Bill Currie d00d6a539a add dstring_insertsubstr 2002-03-21 21:53:52 +00:00
Bill Currie 619a77b2f7 fix a couple of brainos that broke quotes entirely 2002-03-21 21:45:00 +00:00
Bill Currie c1deee9955 rework cmd_buffer_t->line and cmd_buffer_t->args building so quotes are
preseved
2002-03-21 21:17:31 +00:00
Bill Currie b7fc784718 add dstring_appendsubstr 2002-03-21 21:16:26 +00:00
Bill Currie 6f1b68aeb4 sys.h:
define SYS_CHECKMEM macro to ease memory allocation failure detection
cmd.c:
	loads of whitespace
2002-03-21 19:47:31 +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
Brian Koropoff d5fad096c0 Added local variables and replaced %-substitution with local variables.
Made variable substitution recursive, so ${${foo}} will be the value of
the variable whose name is contained in foo.  Added setl command to
manipulate local variables.  The only other place they can be used is in
variable substitution.
2002-03-20 04:24:31 +00:00
Robin Redeker 18082533d5 Fixed some memory problems in my string-hashes. 2002-03-19 18:08:07 +00:00
Robin Redeker 489bc7291a Playermenu working now fine.
Added some api-functions to complete playermenu.
(Playermenu isn't still finished)
2002-03-19 17:07:56 +00:00
Bill Currie 504ee0014f and another one :/ 2002-03-19 17:03:52 +00:00
Bill Currie 7816644fc3 missed a place for enter_hook 2002-03-19 16:59:25 +00:00
Brian Koropoff 1683633042 Changed to an execution stack system for aliases and config files, and
added error backtraces.
2002-03-18 23:39:03 +00:00
Bill Currie b01cda716f callback hooks for entering/leaving menus 2002-03-18 20:20:56 +00:00
Bill Currie 5f2dea43f6 break the dependency between cmd.h and dstring.h 2002-03-18 16:47:04 +00:00
Brian Koropoff 46cc4ac9dd Fixed some bugs and generalized the command buffer interface. Allowed for
buffers to be linked into execution stacks and changed aliases and script
files to be run in a new stack frame.  Cbuf_Execute executes the stack from
the top down, so wait commands are handled properly.
2002-03-18 04:12:09 +00:00
Brian Koropoff f4180e7ad8 Added math evaluation, the ability for commands to span multiple lines
within braces, and put support for comments back in (oops).  To use math
evaluation, put a math expression inside $().  If you have spaces in your
expression, you'll need to enclose the entire thing in quotes so it doesn't
get split up into multiple tokens.
2002-03-17 06:57:03 +00:00
Brian Koropoff aa00b7742c Changed the token finder to be recursive, added if and while commands, and
allow tokens within braces to continue across newlines.
2002-03-17 03:31:03 +00:00
Brian Koropoff e9ca911e34 Added the ability to use curly braces to enclose tokens. Tokens in braces
won't be processed except for escape characters, so that escaped braces
can be used within.  If an uneven number of curly braces are within a
token, it will be misparsed, so escaped braces are important if you
don't want them to be considered in the parsing of the token.  Ideally,
braces within quotes within braces should not need to be escaped, but this
would require a redesign of the parser to be recursive.  Maybe I will do
this later.
2002-03-16 21:17:01 +00:00
Robin Redeker adca50e52b Did further working on the menu code.
Added a _unfinished_ Player options-submenu, for setting
the name, top-/bottomcolor.
Added Draw_Fill and such to the progs api.
Added some comments.
2002-03-16 20:22:01 +00:00
Robin Redeker 757556022b 1. general menu code cleanup
2. added lots of comments to my menu code
3. wrote a string hash api (key -> value assignment list)
Hm, nothing else afaik. ;)
2002-03-16 15:52:17 +00:00
Bill Currie 51805ebd92 nothing much, just give wildcode a 30% speed boost. Basicly, stop binding
a texture for every single brush poly: due to texsort, they will come in
batches.
2002-03-16 09:25:06 +00:00
Brian Koropoff 2a3e1869ac Bug fixes! Fixed escape character detection, use of str = dstr->str
without considering that realloc could result in dstr->str being
changed.  Also made variable substitution of non-existant variables be
replaced with a null string rather than being left alone, to prevent
errors in scripts from causing weirdness as strings get passed through
the parser several times.
2002-03-16 06:31:59 +00:00
Brian Koropoff 0a90ddc51f Fixed an error in extract line that caused escaped quotes to be parsed as
normal quotes and made it so executed files are always inserted into the
console buffer so that class config files in TF can use the new parser
features, even though the exec command is run in the legacy buffer
2002-03-15 01:45:15 +00:00
Bill Currie 180c517771 signal handling improvements 2002-03-13 19:20:57 +00:00
Bill Currie 6cefb63e2e get back to work on creating a good command line pak file util. currently
only dumps the file names/sizes and segs if it's used incorrectly, but it's
a start.
2002-03-12 23:45:36 +00:00
Bill Currie f0609f04f3 forgot about the need for the proto itself 2002-03-12 17:44:45 +00:00
Bill Currie adbb59c5dd fix missing prototype for fnmatch on some systems 2002-03-12 17:36:17 +00:00
Bill Currie 1d420edcd0 start work on instrumenting GLstub.so 2002-03-11 23:55:50 +00:00
Bill Currie d5fe4e3130 make file open a little more secure 2002-03-11 19:01:13 +00:00
Bill Currie 5a2538faaf dstring.[ch]:
create dsprintf and dvsprintf to do formated prints to dynamic strings.
rest
	Use the new functions :)
2002-03-08 23:11:42 +00:00
Bill Currie 538515bee6 forgot to nuke this 2002-03-06 04:17:50 +00:00
Bill Currie 8f7f646d19 white space 2002-03-05 22:36:04 +00:00
Brian Koropoff e0e9084ad7 Merged in the new command parser. No major bugs or incompatibilities could
be found.
2002-03-05 21:51:12 +00:00
Bill Currie 544ca8118a "gib" never got all that useful, and with the new command parser coming in
and csqc, it's pretty obsolete, too.
2002-03-05 21:47:03 +00:00
Brian Koropoff 066c2c8a02 The final checkin before merging. Hopefully no showstopping bugs remain. 2002-03-05 21:26:37 +00:00
Brian Koropoff 669ca72e4f Added a bonus feature: %i evaluation in aliases. Just put %i in an alias
and it will get replaced with the ith argument to the alias, 0 being the
name of the alias itself.  %% will get replaced by %, out of range
numbers will simply be removed, and non-numbers will be ignored.
2002-03-04 02:37:40 +00:00
Brian Koropoff 7241d69036 Fixes to echo, correct use of cmd_source and src_command, and change nq to
use cmd_legacybuffer for stufftext.
2002-03-04 01:11:05 +00:00
Brian Koropoff 8d124f9c2b Implemented variable substitution and did various cleanups to the parser.
Changed Cmd_TokenizeString to accept a flag that controls the application
of filters (tags, variables, escape characters) to the tokens and modified
a few places in the source that called it.  Added a secondary command
buffer that is parsed without filters for legacy command support.
Currently, it is only used for commands stuffed into the console from the
server.  It is hacky, and I hope to eventually generalize the console
interface to support any number of buffers and audit the rest of the code
to recognize it.  For now, the legacy buffer at least keeps escape
character parsing from destroying info strings.
2002-03-03 23:28:57 +00:00
Brian Koropoff f78ec56975 Added escape characters, the <i> tag to ignore tags enclosed within it, and
generally cleaned the parser up.  If a line begins with |, it will be
stripped off by the tokenizer and no tags or escape characters will be
processed.  Commands stuffed into the console from the server are prepended
with | to ensure backward compatibility.  This can also be used anywhere
backward compatibility is needed, such as where info strings are stuffed
into the console, or as an alternative to using escape characters in the
entire string.
2002-03-03 08:29:28 +00:00
Bill Currie 26d7463be7 the majority of raptor's sgi build patch. I'll look at the last two bits
(server.c and vid_sdl.c) later.
2002-03-03 06:03:51 +00:00
Brian Koropoff 4a7f3b3189 This commit fixes up cmd_args to rebuild a string from the processed
tokens and adds support for comments.
2002-03-03 06:00:44 +00:00
Bill Currie 119731e90e fix a buffer overflow snax found 2002-03-03 04:42:32 +00:00
Brian Koropoff 6936615fdf HTML-like tags are more or less done. Next up is variable substitution
and escape characters.
2002-03-03 04:26:37 +00:00
Brian Koropoff 557846b220 This is the first commit to the newcmd branch, which is a mostly-rewritten
console command parser.  It will eventually include html-like tags for
modifying text (gold numbers, brown characters, etc) and escaped characters.
The major differences so far are that dynamic strings are now used instead
of static buffers, and single quotes can be used to enclose tokens as
well as double quotes.
2002-03-03 03:36:27 +00:00
Bill Currie a384870e4b cl_chatmode works again 2002-02-28 04:12:20 +00:00
Bill Currie 009e6346fe now, so long as ulimit allows it, we can always get a core dump. Looks a
little odd:

Received signal 11, exiting...
IN_Shutdown
IN_LL_Shutdown
VID_Shutdown
Segmentation fault (core dumped)

but the core file does accurately show the error
2002-02-27 06:55:21 +00:00
Bill Currie 2f62b744fa After an interesting discussion with Lordhavoc, make the GPU do more work in
the background. This is achieved by doing only a (qf)glFlush at the end of
the frame, doing the inter rendering-frame processing (ie, client frame
processing), glFinish, glXSwapBuffers, then starting the next frame. I've
changed the glFinish call in SCR_UpdateScreen to glFlush and the glFlush
call in GL_EndRendering to glFinish because there's no point in calling
glFinish followed by glFlush. Also, SwapBuffers should always be precedded
by glFinish rather than just glFlush (in Lordhavoc's experience). The
GL_EndRendering at the end of SCR_UpdateScreen got moved to the beginning.
2002-02-27 05:22:21 +00:00