Commit Graph

1149 Commits

Author SHA1 Message Date
Bill Currie 36fe939ea5 don't hang when processing \{N} escape sequences and fix a comment 2010-01-13 06:21:29 +00:00
Bill Currie 58c167eaed correct a bogus comment 2009-12-23 11:21:34 +00:00
Bill Currie 4b0320f341 glx, gly, glwidth and glheight are now gone too. also GL_BeginRendering 2009-12-23 08:20:29 +00:00
Bill Currie f2004abecc nuke scr_width and scr_height 2009-12-23 07:00:42 +00:00
Bill Currie b14fcccd8f get qf compiling with gcc 4.4 2009-12-19 10:54:23 +00:00
Bill Currie 0b1cc3d21f Support Japanese keyoards (yay, I can finally toggle the console :P) 2009-03-18 00:26:34 +00:00
Bill Currie 59c077638a Fix the annoying "Unknown interpreter 'id'" error. It was both bogus and a symptom of other problems (also fixed). 2009-03-16 11:49:52 +00:00
Bill Currie 9ac15436d9 More docs.
Enhance qfprogs qfo debugging.

Make sure functions marked as extern don't emit anything. Fixes the segfault
when building klik.
2008-08-01 13:54:24 +00:00
Bill Currie 23e3fc0cb8 document most of obj_file.h (and a few other doc tweaks) 2008-08-01 00:47:38 +00:00
Bill Currie 1a307e306f Con_Printf actually has a use after all: it prints to the console /only/ (no redirects, etc) 2007-11-07 08:19:17 +00:00
Bill Currie d66934942d nuke Con_Printf and Con_DPrintf and use Sys_* instead 2007-11-06 10:17:14 +00:00
Bill Currie 5c73d81e00 Python style long strings ("""...""") now supported for parsing. Any such strings will be written out as standard strings with escaped quotes when writing the plist. 2007-10-13 07:55:58 +00:00
Bill Currie 3e50aae01f "print" command for dumping values in the progs and add return type info to the debugging information 2007-09-15 07:47:31 +00:00
Bill Currie ca0bbd909c correctly save and restore the parameters when calling +initialize. fixes the segfault in the qwaq test. 2007-06-09 13:44:06 +00:00
Bill Currie 201f01b66c hopefully speed up byte swaps 2007-05-26 23:18:46 +00:00
Bill Currie a72f2046f5 speed up PL_WritePropertyList by ~3x. 2007-05-13 03:13:01 +00:00
Bill Currie 57bd43fc52 make the watchpoint (optionally) conditional 2007-05-08 02:25:01 +00:00
Bill Currie fe4a4a9e55 "hardware" (haha) watch points (one!) in progs. only catches changes done by progs, and the expression parser is as flaky as anything, but it's better than nothing :) 2007-05-08 02:04:47 +00:00
Bill Currie dd1adc0431 remove S_TouchSound: it doesn't seem to be necessary 2007-05-07 12:20:38 +00:00
Bill Currie 72daa2fd2b add some sounds to the menus (not yet finished) 2007-05-07 12:17:12 +00:00
Bill Currie 7af2378e03 turn on graph generation in the doxygen output. very slow, but the diagrams are worth it. Also make the data member of sfx_t a union rather than void so doxygen can see the relationships (and gets rid of a bunch of casts that I never liked anyway). 2007-05-07 05:20:24 +00:00
Bill Currie 59498cd5e7 make the edict macros consistent in return type 2007-04-09 08:55:05 +00:00
Bill Currie b5e6aa4519 for pr_debug 1, don't dump disassembly when tracing, just source lines. pr_debug >= 2 forces disassembly. detailed disassembly now on pr_debug >= 3 figure out the types of arguments in a function call 2007-04-09 06:16:03 +00:00
Bill Currie 7925e16d73 audit the usage of view_draw. It is really meant for draw callbacks, not direct usage by the application. 2007-04-09 00:22:17 +00:00
Bill Currie 2894182ec5 The status bar in the quakeworld server curses console finally does something. Currently only cpu usage, but as a proof-of-concept, it more than does its job. 2007-04-09 00:10:10 +00:00
Bill Currie 1d2a7e2eff add z order comments 2007-04-08 09:01:07 +00:00
Bill Currie ab01262675 document the view api 2007-04-08 08:48:13 +00:00
Bill Currie c6ea999d4d whee, finally. stateful console mode :) nukes cl_chatmode. 2007-04-07 05:50:29 +00:00
Bill Currie 124506fda2 Fix the access alignment bug on 64 bit archs. 2007-04-07 01:41:23 +00:00
Bill Currie df2bebde7e more vc build patches from phrosy 2007-04-06 01:09:58 +00:00
Bill Currie 5b761bac83 make progs related code a little more consistent with its int type usage 2007-04-06 00:47:41 +00:00
Bill Currie 38254186da other than floats, progs should now be int size safe 2007-04-04 12:30:49 +00:00
Bill Currie fcf464ef99 make riff int-size safe 2007-04-04 09:23:10 +00:00
Bill Currie ac02c36aaf interim linux compile fixes for the in64 fixes (hah) 2007-04-04 08:27:49 +00:00
Bill Currie ff132bb536 64bit windows patch from phrosty 2007-04-04 07:48:14 +00:00
Bill Currie 4cab5b90e6 new cache allocation scheme. still a couple warts, but at least now there's something to work with, and more importantly, there won't be cache movement anywhere near as often. 2007-03-28 13:09:49 +00:00
Bill Currie e5b972529b take a chainsaw to the existing code, cleaning out anything that's obviously unnecessary. preparation for the cache re-write 2007-03-28 09:52:01 +00:00
Bill Currie 1d1982fddf more improvements to the sound offsetting 2007-03-25 08:12:43 +00:00
Bill Currie 02c41feabc make gamedir change a two phase operation so things can be done both before and after the cache is flushed. (still having problems with cached sounds, though) 2007-03-24 10:13:10 +00:00
Bill Currie 818756ace5 add a debug function 2007-03-23 12:36:55 +00:00
Bill Currie 81a57bb3fa patch from phrosty for vc2005 support. includes fixes for a bunch of gcc-isms that crept in over the years. 2007-03-22 23:20:57 +00:00
Brian Koropoff 0c237ccc08 Allow cbuf interpreter to handle completion finding. Enhance completion logic a bit. 2007-03-20 21:31:07 +00:00
Bill Currie fa011b55d1 client side of http transfer support (untested) 2007-03-20 14:16:43 +00:00
Brian Koropoff c3e8b5de3d Add naive QFS_IsDirectory and QFS_FilelistEnumerate until more intelligent pak handling is added 2007-03-19 10:43:29 +00:00
Bill Currie d67cbeae7f bring cd_file in line with the new sound api 2007-03-18 12:54:59 +00:00
Bill Currie 5a0e2460a3 whee, lockless channel management. still have a problem with unbalanced retain/release, though. 2007-03-18 10:32:01 +00:00
Brian Koropoff 25fdbdab58 More C++ compatibility fixes 2007-03-18 07:12:45 +00:00
Brian Koropoff 39d8a90336 Allow interpreter providers for the console to be registered and allow on-the-fly interpreter switching. 2007-03-18 03:48:09 +00:00
Brian Koropoff ab310cb443 Allow compatibility with C++ 2007-03-18 02:16:10 +00:00
Brian Koropoff fc293864dc Fix visibility of VectorNormalize and other math functions 2007-03-17 21:06:00 +00:00
Bill Currie cde6e60848 most of the hacking needed to break out the common code from snd_dma.c 2007-03-17 03:10:45 +00:00
Bill Currie 0105754f6f clean out some no-op functions 2007-03-10 14:17:52 +00:00
Bill Currie 99c0954b47 the big dso visibility patch :). Sure, we have to have unique names for static builds, but with controlled visibitly we should get faster program loads (although this isn't C++, so it's not as bad) and complex plugins are cleaner. 2007-03-10 12:00:59 +00:00
Bill Currie d4719db021 a bunch of docs for snd_render.h and a some cleanup of namepace and old cruft 2007-03-10 04:21:32 +00:00
Bill Currie 6f017f18ac add some documentation to QF/sound.h and move renderer private stuff into snd_render.h 2007-03-10 01:06:00 +00:00
Bill Currie 45d467d748 box tracing (instead of point). Currently disabled because it doesn't work right just yet. However, when it is working, it will let us do things like crouching, crawling, arbitrary sized objects (including players), etc. 2006-12-24 03:13:29 +00:00
Bill Currie 961f30f846 correct some harmless c&p errors 2006-12-18 13:11:26 +00:00
Bill Currie 70ec9848e7 add PL_RemoveObjectForKey and make PL_D_AddObject take a normal C string for key instead of a pl string. 2006-12-09 06:00:36 +00:00
Bill Currie c290e9a988 use plists for save-games. old save-games can still be read, but new ones will always be in the new format. might be a good idea to back up any old saves until more testing has been done. 2006-12-09 02:35:44 +00:00
Bill Currie 9cbac0bbc1 add array item removal 2006-12-09 02:33:08 +00:00
Bill Currie 2a79f42eb5 progs now internally uses plists for entity/global initialization, with support for direct conversion from id's format. This means that the entity string in a map (or the external ent file) can be a plist. 2006-12-09 00:02:57 +00:00
Bill Currie ab1102bcd0 fix an open commment 2006-12-07 13:40:00 +00:00
Bill Currie 6fbddc3d43 so that's the right way to do groups and subgroups... 2006-12-05 11:40:00 +00:00
Bill Currie 42f1334b87 I've discovered \par :) 2006-12-04 13:08:52 +00:00
Bill Currie 5062930bad bit more cleanup and some documentation 2006-12-03 06:25:57 +00:00
Bill Currie f37cfefc5a fix the doxygen comments to produce proper docs 2006-12-02 23:02:34 +00:00
Bill Currie 7bca4cf8af clean up the draw interface a bit 2006-12-02 10:07:08 +00:00
Ragnvald Maartmann-Moe IV b218de3c30 whitespace 2006-12-01 06:58:41 +00:00
Ragnvald Maartmann-Moe IV 42d51bc486 Remove SDLK_WORLD_*, as they are no longer supported. Add SDLK_UNDO. 2006-12-01 06:58:23 +00:00
Bill Currie d28952dfcc fix a bunch of gcc-4.1 warnings (thanks for the heads up, jordi) 2006-11-30 22:52:36 +00:00
Bill Currie a2b2261913 this should fix a couple warnings found by raorn 2006-09-11 22:56:16 +00:00
Bill Currie 88543d6e86 add Qfopen: basicly wrap a QFile around an existing FILE. gzip is NOT supported 2006-05-24 11:17:18 +00:00
Bill Currie 87cc09233c "long" audit. can't use long when we want 32 bits. May be a few more cases. 2005-10-23 13:19:21 +00:00
Bill Currie e3c9cfd3d2 some documentation work 2005-07-27 12:14:35 +00:00
Bill Currie 3a709cac0f revamp the server curses code to use views (planning on "watch windows" for
debugging things)
2005-06-14 11:30:33 +00:00
Bill Currie 762aefc9b1 implement Raven's calling convention (rcall: first 2 params in opb and
opc). should give a general speedup to most progs.
2005-06-12 09:54:01 +00:00
Bill Currie 501180aaac gcc-4.0 fixes. even found some bugs :) (names /not/ mangled this time) 2005-06-08 06:35:48 +00:00
Bill Currie 63d787d9e9 add MSG_WriteUTF8 and MSG_ReadUTF8 to handle 31 bit values nicely for
future protocol extensions. Equivalent to MSG_*Byte or MSG_*Char. Use
MSG_ReadString and MSG_WriteString with the appropriate libc functions for
utf8 strings.
2005-05-05 00:27:04 +00:00
Bill Currie 925ea16e1d we get to "spawn". whee. not long now and I'll have to work on the client
side :)
2005-05-02 09:00:17 +00:00
Bill Currie b7def83d19 patch from raorn ("Alexey I. Froloff" <sir_raorn@immo.ru>) to fix
interaction between -hipnotic (etc) and -game
2005-02-14 09:08:32 +00:00
Bill Currie d63e7b609e net_socket must be "int" for sane systems 2005-01-26 01:19:36 +00:00
Bill Currie 23f71485d1 more tree recovering. This includes Despair's anisotropy support work. 2005-01-02 14:23:20 +00:00
Bill Currie 2488465bc9 resurrect Z_Print.
This is an imperfect revision of history.
2004-11-14 00:49:00 +00:00
Bill Currie 0e324d1851 use the script api for parsing ent data and savegames
This is an imperfect revision of history.
2004-11-12 02:39:00 +00:00
Bill Currie aadf6ebf6a "finish" qfplist
This is an imperfect revision of history.
2004-11-11 11:18:00 +00:00
Bill Currie 64cc8c60d2 compile time protocol support seems to be complete now. fortunatly, protocols had never been written out so the corrections to the protocol related stuctures do not need a progs version bump. runtime protocol support hasn't been fully tested yet.
+load runtime support seems to be working.

This is an imperfect revision of history.
2004-11-11 00:34:00 +00:00
Bill Currie b35561504c do proper selector registration. unfortunatly, I discovered I'd created pr_method_t incorrectly and so had to bump the progs version again
This is an imperfect revision of history.
2004-11-10 05:37:00 +00:00
Bill Currie 78d98ea787 remove the time pointer (not really needed)
This is an imperfect revision of history.
2004-11-09 22:32:00 +00:00
Bill Currie 8770df39e5 start documenting things (progs building still borked)
This is an imperfect revision of history.
2004-11-08 23:27:00 +00:00
Bill Currie 0bfac8dd88 win32 compile fixes
This is an imperfect revision of history.
2004-11-06 02:21:00 +00:00
Bill Currie f5bc90a53a clean up some redundant progs functions (may be broken for a while)
This is an imperfect revision of history.
2004-11-05 11:49:00 +00:00
Bill Currie 9a5cce7c14 hash.h: update the description of FindList quakefs.c: didn't need va there
This is an imperfect revision of history.
2004-11-02 07:39:00 +00:00
Bill Currie 8e2f392d2d pr_obj.h: add the structure for static instances rua_obj.c: add support for +initialize test.r: add some test code for +initialize main.c: don't need to initialize the hunk any more and fix a buffer overflow
This is an imperfect revision of history.
2004-11-02 05:12:00 +00:00
Bill Currie 25484f415b move the script parser from qfbsp into libQFutil and correct a spelling error
This is an imperfect revision of history.
2004-11-02 05:05:00 +00:00
Bill Currie 33bc7858f7 avoid using the hunk in the progs engine (except for the override-able load and alloc functions) so tools (qfprogs and qwaq) don't need to create it.
register only the first instance of a progs provided string

This is an imperfect revision of history.
2004-11-02 04:59:00 +00:00
Bill Currie 67f913289c move wad_extract into the wad utility and make QFS_CreatePath more
generally usable
2004-05-09 22:58:37 +00:00
Bill Currie 8a237169c3 patches to allow for multiple view ports 2004-05-07 03:54:35 +00:00
Bill Currie 9ed9832789 bring back the alpha setting for dlights (finally found out what it was
for) and "fix" the wayward dlights in mvds: caused by svc_muzzleflash being
written before the player updates. Should probably fix properly that in the
server too.
2004-05-03 06:21:39 +00:00
Bill Currie fc4211c257 the rest of Grievre's lighting tweaks 2004-05-02 21:21:00 +00:00
Brian Koropoff c16194cf76 Disable libQFobject from being built or used, since it doesn't serve
any purpose right now.
2004-04-27 21:58:21 +00:00
Bill Currie 2d671955fb fix an oopsie that broke skyboxlist (early morning paper routes are bad for
coding:)
2004-04-23 22:53:39 +00:00
Bill Currie 616be68bdd strip parameter to QFS_FilelistFill and add rua support 2004-04-20 22:52:09 +00:00
Bill Currie e8f9761d33 move the filelist building code into quakefs 2004-04-20 22:25:52 +00:00
Bill Currie 633dada682 quaternion conjugate support (engine side) 2004-04-08 04:57:17 +00:00
Bill Currie 8d6f634f30 engine side quaternion support 2004-04-08 00:56:30 +00:00
Bill Currie 39685d0c63 more readability and add the quaternion functions 2004-04-07 18:01:45 +00:00
Bill Currie 524c02e97a make the vector macros more readable 2004-04-07 02:29:41 +00:00
Bill Currie 27da4ad233 add quat_t for quaternions (not used yet) 2004-04-07 02:29:12 +00:00
Bill Currie ab52e74874 Grievre's skin DoS fix 2004-04-04 02:34:05 +00:00
Bill Currie ff5b215c13 multi statement macro fixes as pointed out by Grievre 2004-03-16 04:15:07 +00:00
Bill Currie e24cbd75e0 M_BUTTON6 and M_BUTTON7. nuff said :) 2004-03-16 04:12:28 +00:00
Ragnvald Maartmann-Moe IV 29502c8f5a Lots of optimizations, particularly for GL state changes, and tweak lighting a
bit more.

Also a cleanup from Grievre: Use VectorIsZero in two places in gl_mod_alias.c.
2004-03-15 21:32:19 +00:00
Ragnvald Maartmann-Moe IV 9cd16b8dfd Grievre's lighting patch, plus some of my own changes.
My changes:
Emit normals if truform is enabled.
Attempt to avoid 0,0,0 normals (makes lighting & tesselation unhappy).
Fix some (ancient) apparent bugs in GetAliasFrameVerts16().
Clamp minlight, instead of adding it.
Apply colormod as glColor, rather than adding it to emission, to prevent QSG2
 issues with fullbrights.
Rearrange init code, and don't go quite as wild with responsiveness to lights.

Material & lightmode settings will need tweaking & testing to work well on all
 cards. Feedback needed there.
2004-03-10 08:14:38 +00:00
Ragnvald Maartmann-Moe IV b7df0b5278 Remove gl_doublebright, remove fractional overbrights, clean up init a bit,
uglify init a bit. Stuff for taniwha to look at. Nothing to see here, move
along.
2004-03-07 23:51:29 +00:00
Bill Currie 37024a4419 final (?) cleanup of center printing. turns out there's no reason to keep
it in the renderer and every reason to pull it out (ok, some might
disagree:)
2004-03-02 03:55:18 +00:00
Bill Currie 39fc0fe721 more centerprint cleanup. 2004-03-02 00:58:13 +00:00
Bill Currie 2955fac550 first step of centerprint/finale cleanup. fixes the misplaced text for
end-of-episode text
2004-03-01 23:47:39 +00:00
Ragnvald Maartmann-Moe IV 0c133699d0 Whee. 2004-02-29 02:58:15 +00:00
Ragnvald Maartmann-Moe IV 44c89c1904 Optimize fullbright testing for brushes, assorted other cleanups, test for
functions built into current GL drivers, as well as the old extensions, and
add incorrectly rendering BGRA support.
Whee!
2004-02-24 20:50:55 +00:00
Bill Currie f9b95cee92 some micro-optimisations 2004-02-23 07:17:41 +00:00
Ragnvald Maartmann-Moe IV 872498a1f0 Reorder a lot of code, removing tons of ifs. multitexture paths are a bit more
sane now. Also optimize QSG2 color handling, and fix some QSG2 bugs. Not that
anyone cares, nobody uses it anyways.
Should be faster, but isn't here. *grmbl*
2004-02-22 06:00:15 +00:00
Ragnvald Maartmann-Moe IV 5157f668ad Fix a bunch of state leaks that made multitextured fullbrights smear the world.
Now just have one (known) issue with bmodels with fullbright textures not
rendering their base texture. Floating fullbrights are nifty!

Also a number of optimizations, which need wider performance testing.
2004-02-21 05:36:19 +00:00
Bill Currie 8069becadf pkgincludedir and pkglibdir patch from
"Alexey I. Froloff" <sir_raorn@immo.ru> (raorn)
2004-02-18 06:28:37 +00:00
Chris Ison 6642686e33 removal of legacy MGL block_drawing variable. Fixed window restore bug that prevented the screen from being updated. 2004-02-15 03:40:50 +00:00
Ragnvald Maartmann-Moe IV fef9b30bd7 QF, now complete with underbrights, thanks to Grievre.
Play with gl_overbright and gl_doublebright. That's an order.
2004-02-15 00:02:04 +00:00
Bill Currie 85a268c62f Grievre's lightmap/fullbright multitexture patch (fbs not tested due to
lack of drivers supporting 3 tmus)
2004-02-14 05:10:29 +00:00
Bill Currie f34335a0c9 provide a builtin to draw a crosshair. 2004-02-13 23:16:33 +00:00
Bill Currie a821f048a0 change FNC to FN and fnc to fn for function based opcodes 2004-02-11 06:52:19 +00:00
Bill Currie c3f41e3e69 new opcode: state.f. same as state, but takes a 3rd float operand to
specify the step for calculating nextthink. accessed using
[frame, think, step] (state is [frame, think])
2004-02-11 01:43:33 +00:00
Ragnvald Maartmann-Moe IV c4402e07bd Working towards merging q2 model, sprite, and map support. Check back in a few
years, might be finished. ;)
2004-02-08 02:49:38 +00:00
Bill Currie 8ea7690530 serious cleanup of refdef calculations. 2004-02-08 00:37:11 +00:00
Bill Currie 893d3ec290 hash.[ch]:
add Hash_NumElements to get the number of elements in the hash table
qfplist.[ch]:
	add PL_A_NumObjects and PL_D_NumKeys, to get the number of objects or
	number of keys in the array or dictionary, respectively
2004-02-07 07:47:23 +00:00
Bill Currie a45981bc6a don't look up the gl functions until after the context has been setup, just
incase it affects which functions glGetProcAddress actually returns.
2004-02-06 00:58:35 +00:00
Bill Currie 77d266d938 use a little less make recursion. should speed up builds a bit 2004-02-04 07:36:47 +00:00
Bill Currie 9784ba5954 Grievre's gamedir callback patch to fix mangled sounds on gamedir change
plus a couple minor tweaks I notcied needed doing.
2004-02-03 03:01:06 +00:00
Bill Currie 24294c8778 make printing of global contents in PR_PrintStatement optional so
disassembly output is cleaner
2004-01-31 04:26:01 +00:00
Ragnvald Maartmann-Moe IV 0e6681a069 Add QFGL_WANT, and ability to handle non-required extensions. 2004-01-28 02:49:57 +00:00
Ragnvald Maartmann-Moe IV e1146a541c TruForm support. Controlled by gl_tessellate 2004-01-26 00:13:47 +00:00
Bill Currie 390ca99a92 first step to making qfdefs redundant. "standard" progs now get resolved
staticly rather than looking up the defs. "broken" progs should now work.
2004-01-21 08:09:47 +00:00
Bill Currie d5a33c9545 extend the sound api slightly to ease things like cd_file and make cd_file
work as intended :)
2004-01-21 02:52:12 +00:00
Bill Currie 19ef80c555 this should fix static win32 builds 2004-01-21 00:15:35 +00:00
Bill Currie f7fe0a4a8c remove two redundant functions from cd_funcs_t and convert all the cd
plugins to using pre-initialized structs
2004-01-20 08:34:57 +00:00
Bill Currie 6d02004ca8 Mike Gorchak's <mike@malva.ua> second (final for now:) QNX patch. renames
msg_t to qmsg_t.
2004-01-20 06:11:00 +00:00
Bill Currie e154c9add5 be consistent with WIN32 and _WIN32 (now all _WIN32) 2004-01-20 03:47:27 +00:00
Bill Currie 77b2942982 several libs can now get built as dlls in windows: console, gamecode,
gamecode_builtins, gib, image, modules, object, ruamoko and util.
2004-01-19 07:47:41 +00:00
Bill Currie eb69be5e5a more doxygen fixes 2004-01-17 08:09:30 +00:00
Bill Currie 249aee2e9f move the OO runtime support code from libQFgamecode to libQFruamoko where
it really belongs :)
2004-01-16 08:02:31 +00:00
Bill Currie e7ffad8772 more rua cleanups: now just one init function to call (it calls the rest) 2004-01-16 07:03:58 +00:00
Bill Currie 01392c78bb move the bulk of what whas libQFcsqc to libQFruamoko. 2004-01-16 05:46:19 +00:00
Bill Currie 31d970aca0 can now dump a map's textures to a wad file (name currently based on bsp
file name (eg, foo.bsp -> foo.wad)
2004-01-15 07:16:44 +00:00
Bill Currie 2a399cc4b4 Sys_PathType has been unnecessary for a while so nuke it 2004-01-13 21:30:13 +00:00
Bill Currie 03a24be4de partial work on wad file access cleanup in preparation of making a wad
utility
2004-01-09 23:34:32 +00:00
Bill Currie 808baf2198 doxygen didn't like that construct 2004-01-09 03:32:00 +00:00
Bill Currie c5c5c33e7d I had forgotten the free string refs list /had/ to be in the progs vm 2004-01-08 04:03:47 +00:00
Bill Currie ccfa9081b0 fix shm properly :) 2004-01-08 03:46:11 +00:00
Bill Currie 16f0a54a84 fix some inconsistencies pointed out by doxygen 2004-01-07 20:06:15 +00:00
Bill Currie b3f76e1e48 add some string builtins (only the basics for now, but enough to deal with
temporary strings) and fix the game load/save menus.
2004-01-07 07:36:17 +00:00
Jeff Teunissen eb6b179add plist functions that add objects return qboolean, not int. Also doc fixes. 2004-01-07 07:01:31 +00:00
Bill Currie 9c92a916ff change the dict and array add functions to return true/false and add some
more docs
2004-01-07 06:19:11 +00:00
Bill Currie e455b760ca use a cycled pool of "return strings". I'd love to come up with something
better, but this will do (similar to what qwe does, but qf style:)
2004-01-07 05:22:57 +00:00
Jeff Teunissen d1b4c5df72 Change PL_D_AddObject() so that it replaces values instead of stacking them.
Add PL_D_AllKeys(), which returns a list of all keys in a dictionary.
Rename PL_FreeItem() to PL_Free() -- what was I smoking?
Document some of the property list system for doxygen.
2004-01-06 11:09:40 +00:00
Bill Currie 133879f8fa provide builtin mappings for id (none, really), qf and ktpro/qwe (qw only),
add qwe builtin extensions to qw-server. provide sv_progs_ext to control
the builtin mapping. valid values are "id", "qf" (our old static builtins),
"qwe"/"ktpro" (either works. for ktpro mod support) and "none" (no
mapping). any other value is equivalent to "none".
2004-01-06 07:00:39 +00:00
Bill Currie d7592781d7 add builtin mapping support (not used yet) and fix an uninitialized
variable
2004-01-06 06:08:59 +00:00
Bill Currie acd54afff7 move to using a hash table for builtin number -> builtin lookup so sparse
ranges can be used efficiently. move the auto-allocated builtins to
0x10000000-0x7fffffff. should be more than enough :)

use static builtin tables ("nul" terminated) instead of a series of
function calls to add builtins to a vm. should be more memory efficient.
2004-01-06 05:51:09 +00:00
Bill Currie 595280decb do the builtin function lookup at load time rather than runtime and store
the function address in the progs function descriptor. this will speed up
calls to builtin functions, especially when ranges get introduced.
2004-01-05 08:08:46 +00:00
Bill Currie dfc83c1f5f add PR_PushFrame and PR_PopFrame so temp strings are easy to use for
parameters to progs functions.

double the progs stack sizes (call depth of 32? eek)

allow one extra call on the progs stack :)

misc minor cleanups
2004-01-05 07:10:32 +00:00
Bill Currie dfe7f263c7 new internal printf engine for progs, mostly thanks to Deek.
also a few cleanup bits
2004-01-04 07:42:43 +00:00
Bill Currie a533761770 Nuke PR_GarbageCollect as it's both redundant with the new temp strings
and wrong anyway (could free strings it wasn't supposed to).

Don't free the string pointed to by a strref since it's already been
implicity freed (whole memory space nuked). Fixes new map crash.
2004-01-04 02:03:30 +00:00
Bill Currie bd561fafc3 o all progs strings are now stored in progs memory
o  temporary strings automaticly get freed when the function they're
    created in (results of str + str and most strings returned from
	builtins). a way to keep temp strings will be provided later
 o	fix up qwaq to test the temp strings
2004-01-03 08:43:57 +00:00
Ragnvald Maartmann-Moe IV 1be98dcf08 gl_external_textures -> gl_textures_external, plus whitespace & codingstyle. 2003-12-23 20:05:52 +00:00
Bill Currie 4b6b5135ac more texture tweeks from Griever: gl_external_textures 2003-12-23 08:38:33 +00:00
Bill Currie 5eff81b005 dstrings now have individual memory management functions 2003-12-22 23:35:22 +00:00
Bill Currie 9e3f33f318 don't need to see these :) 2003-12-19 04:25:07 +00:00
Brian Koropoff f8baa5be27 Added a finalize method to all Objects and modified the garbage
collector to deal with objects that might gain references during
finalization.
2003-12-09 06:57:35 +00:00
Brian Koropoff 991fc06360 Garbage collection:
Moved from reference counting over to a mark and sweep method.  Objects
are now required to implement an allRefs method which returns a pointer
to a list of all other referenced objects.  How the list is maintained
is up to each object.  The retain/release mechanism still works; objects
with any references will not be garbage collected, even if the collector
thinks they should be.
2003-12-09 02:01:05 +00:00
Brian Koropoff e498b196fe Fix a bug with ArrayList_Deinit_f (tried too hard to be clever), and add
an incremental, reference counting garbage collector for QFobjects.  A
different kind of collector will eventually be needed to run once in a
while to sweep up cyclic structures.
2003-12-07 22:45:32 +00:00
Brian Koropoff 7598ab35fb Move the QF object system into it's own library, fix up the standard
classes.
2003-12-07 04:50:46 +00:00
Bill Currie 09143b7fb1 more whitespace 2003-12-06 22:49:18 +00:00
Bill Currie 4d3ca27227 white space 2003-12-05 22:33:11 +00:00
Brian Koropoff a0b8566337 Add the instanceOf() macro and supporting function, and try to fix
gcc 2.95 support again.
2003-11-29 23:09:50 +00:00
Brian Koropoff dfe1dbe4bf This should fix object.h on gcc 2.95. 2003-11-29 22:51:16 +00:00
Brian Koropoff 55181621bd First commit of an experimental low-level object system. At some point
GIB will be reworked to use it, and hopefully Rua will also so that the
two languages can share objects, events, etc.

Warning: This uses quite a few hacks and tortured macros, it might cause
breakage.
2003-11-29 04:40:25 +00:00
Brian Koropoff 37a64e59ab Change some error names, mark a few things static that should be. Instead
of using a colon to specify a parent class in a GIB class definition,
"extends" is now used.  If no parent class is specified, it now defaults to
Object.
2003-11-29 02:01:31 +00:00
Bill Currie cd8035319d PR_GetString should have been returning const char *. now does 2003-11-21 21:34:53 +00:00
Bill Currie 5f5662a063 PF_VarString return a plain char * and make it easier to add "at load" init
functions
2003-11-20 07:46:56 +00:00
Bill Currie b3c6e763cd allow cbufs to have a callback for unknown commands. if the callback
returns non-zero the unknown command is assumed to have been handled and no
error is reported
2003-11-20 07:02:14 +00:00
Bill Currie 481c9c4e8d add Sys_TimeOfDay from QWE (HighlandeR) 2003-11-20 07:00:07 +00:00
Brian Koropoff f4c174184d Add support for named arguments in GIB functions and methods, fix a few
bugs, allow subclasses of classes written in GIB to access the same set
of instance variables.
2003-10-19 00:51:47 +00:00
Brian Koropoff ad61e0684c Make GIB_Reply an actual function, store object handles as a string, add
the ObjectHash class.
2003-09-21 00:30:47 +00:00
Bill Currie 84ea81a770 fix E_POINTER and E_FUNCTION 2003-09-12 23:12:21 +00:00
Brian Koropoff 362d58fd95 Made reference counting of objects more sane. If a message is sent by an
object, the sending object is included in the message.  This is available
in GIB-scripted methods as the local variable "sender", which will be 0
if the sender was not an object.
2003-09-11 08:51:44 +00:00
Brian Koropoff 687a0845b6 Introducing the GIB Object System (TM). This breaks scriptable HUD for now
and probably has enough bugs to leave the Orkin man scratching his head,
but it works and allows you to do neat things like write classes in GIB
(amazing!) and subclass builtin classes (which are Object and Thread at the
moment, Hash should be coming soon as a replacement for stem and leaf
variables).
2003-09-11 06:03:13 +00:00
Bill Currie 1ed772a933 convert \ to / while extracting and accecpt file names on the command line
to control extraction.
2003-09-10 20:48:59 +00:00
Bill Currie 4ce44cf9eb PNG write support from DrSpliff 2003-09-09 16:18:13 +00:00
Bill Currie 2ea7ca1efd windows has a LoadImage #define, so kill it :) 2003-09-08 15:49:21 +00:00
Bill Currie 6b036d14ed in_mouse_accel patch from qize@gmx.net 2003-09-04 22:29:40 +00:00
Bill Currie 2b5a3753ca nuke QF/texture.h moving it's contents into QF/image.h (yay, finally, a
real home for tex_t:)
2003-09-04 18:59:39 +00:00
Bill Currie 39ed540979 LoadImage is now used for all external textures giving almost transparent
.png and .tga support.
2003-09-04 18:46:59 +00:00
Bill Currie 753dc02deb use dtrings to do the filename manipulation 2003-09-04 18:09:02 +00:00
Bill Currie 9cd2d366ed dstring.h:
document the functions (for doxygen)
dstring.c:
	fix a bunch of potential buffer overflows
2003-09-04 17:17:38 +00:00
Bill Currie d186f242b7 DrSpliff's LoadImage code (thanks:) 2003-09-04 16:32:39 +00:00
Bill Currie 3305c0f51f PNG reading support, much thanks to DrSpliff 2003-09-04 05:24:05 +00:00
Bill Currie 231a1bfb56 bring in many of LordHavoc's changes to qbsp: HalfLife WorldCraft texture
alighnment, partial "point of plane" autocorrection (currently disabled: I
want to make it optional), large map support (not sure where that's
hiding), hipnotic entity rotation
2003-09-03 22:00:08 +00:00
Bill Currie ef4ca0c798 some doxygen tweaks 2003-08-31 05:24:24 +00:00
Bill Currie 8868a9d0bd get rid of some unneeded defines and ifdefs 2003-08-28 23:26:59 +00:00
Bill Currie b50d283b28 make sel_get_uid and class_get_instance_method work 2003-08-23 22:16:42 +00:00
Bill Currie 385a90e8fb correct pr_symtab_t to include the pointer to the array of selectors used
in the module. Unfortunatly, this requires a version bump on both qfo and
progs files due to the changes structure layout.
2003-08-23 06:15:19 +00:00
Bill Currie 0a0f8d0cfa make a LoadBSPMem function so bsp files can be read from already loaded
images
2003-08-11 22:40:46 +00:00
Bill Currie 7ead5a91f8 don't let gcc automaticly inline functions but make gcc inline bigger
functions when told to. also make gcc warn if it can't inline a function.

Explicitly inline several functions (including moving VectorNormalize to
mathlib.h so it /can/ be) resulting in a 5.5% speedup for spam2 (88 to 92
fps)
2003-08-11 06:05:07 +00:00
Bill Currie 6a94607d9d rename VectorMA to VectorMultAdd, add VectorMultSub and use it in a few
places. Not certain how much speed difference it makes :/
2003-08-08 15:25:53 +00:00
Bill Currie ada828bdc9 remove a whole swath of potential buffer overflows by removing the buffer.
Also audit a few of the "FIXME: overflow" tags
2003-08-05 01:45:52 +00:00
Bill Currie 9210829573 PLUGIN_INFO decl cleanup 2003-08-01 19:53:46 +00:00
Bill Currie 0806fc33dd debugging improvements. opcodes now sport an optional format specifier for
printing their args (default is "%Ga, %Gb, %gc") and PR_ValueString will
try to print what a pointer points to
2003-07-30 22:24:16 +00:00
Ragnvald Maartmann-Moe IV 5838cfb565 Missed one. And fixed duplicate declaration of scr_viewsize Deek noticed. 2003-07-28 00:32:41 +00:00
Ragnvald Maartmann-Moe IV 0a7b56f003 show_fps -> hud_fps, show_ping -> hud_ping, show_pl -> hud_pl,
show_time -> hud_time, show_scoresuid -> hud_scoreboard_uid
2003-07-27 23:20:11 +00:00
Jeff Teunissen c9858f4f65 Preliminary "unsigned" support for qfcc and the gamecode engine. Should still
be compatible.
2003-07-26 21:07:51 +00:00
Bill Currie 6063fb75d9 make the console run at full speed no matter what demo_speed is at. what a
lot of work for such a simple concept :P
2003-07-25 22:21:47 +00:00
Brian Koropoff 9b63402f12 Added llist.[ch], a set of general-purpose linked list routines. Added
cl_chat.[ch] to qw to hold advanced chat features, the first of which is
the ability to ignore chat messages from annoying players.  Some polishing
in this area still remains, but the current implementation seems to work.
2003-07-18 06:27:26 +00:00
Bill Currie 9367a62e0a turned out not to be the right solution 2003-07-17 19:16:20 +00:00
Bill Currie 043ec906c4 qnx patch from DrSpliff 2003-07-17 15:17:41 +00:00
Bill Currie cb6bf2e2ae minor house-keeping 2003-07-15 16:34:43 +00:00
Bill Currie 4f66e1e9da fix a bunch of the previous FIXMEs. needs a bit more work for win32
compiling
2003-07-08 22:39:45 +00:00
Bill Currie d42e011760 make dist fix 2003-06-04 18:26:19 +00:00
Bill Currie 00abd17dd4 dstring.[ch]:
add dstring_copysubstr and make all the substr functions use strnlen
	for the incoming string. also fix the append string functions to append
	the present string correctly.
cbuf.c:
	use dstring_copystr instead of dstring_clearstr/dstring_appendstr
idparse.c:
	use dstring_copysubstr instead of dstring_clearstr/dstring_insert
2003-05-26 19:14:18 +00:00
Brian Koropoff 3aecdcf42c Added a temporary hack to make ~/.quakeforgerc work again. 2003-05-25 05:40:25 +00:00
Bill Currie c2c3a62956 nuke Qexpand_squiggle. instead, expand ~ to $HOME on qfs initialization and
cache the value.

don't call Qopen directly in the engine. instead call QFS_Open (generic) or
QFS_WOpen (write only, zip flag).

rework QFS_NextFilename to use a dstring (avoiding a potential buffer
overflow), support 10000 files and work from the top-level fs_userpath
directory. adjust QFS_WriteFile and QFS_WriteBuffers etc to suit.

make sw32 screenshots actually get written.

hopefully everything gets written to the right places :)
2003-05-23 17:17:01 +00:00
Bill Currie 6a8469df14 start working on VA support for borked GL libs 2003-05-21 21:53:21 +00:00
Bill Currie dedb2fa6bf get [super ...] working correctly 2003-05-15 05:58:31 +00:00
Brian Koropoff e160ead563 Added the scriptable HUD interface between the engine, Rua, and GIB. 2003-05-14 21:17:32 +00:00
Bill Currie b5a960c57b fix nq's gamedir handling for the -hipnotic etc shortcuts 2003-05-09 21:10:59 +00:00
Ragnvald Maartmann-Moe IV 09fa88e637 Don't export R_TestErrors. 2003-05-09 01:30:22 +00:00
Bill Currie be0b3867c7 add dstring_copy and dstring_copystr to make dstring init easier 2003-05-08 23:05:39 +00:00
Bill Currie f12f4a8898 add view_insert to provide greater control over view order 2003-05-06 02:41:37 +00:00
Bill Currie 56bfc6dc45 fix the input line location bug and change enabled to visible due to
enabled meaning something else in UIs
2003-05-06 02:25:46 +00:00
Bill Currie 508fb4fb5c new view stuff mostly working. just a few visual bugs to iron out 2003-05-06 02:19:13 +00:00
Bill Currie 1bdcd879be initial work on dynamic view support for the console. I'm aware that
QF/view.h vs view.h may cause some confusion, but I'm hoping to eleminate
view.h.

Also put the sample hud.txt into docs so it doesn't get lost.
2003-05-05 18:50:14 +00:00
Bill Currie 09f3f1ea26 mindHog's plugin global symbol handling patch so his python plugin can work
(reloads the plugin with RTLD_GLOBAL if the plugin requests it).
2003-04-30 02:14:44 +00:00
Bill Currie 0985c90ce9 hash.h:
write some docs on mixing (eg) Hash_Add and Hash_DelElement
sv_user.c:
	fix a warning
2003-04-28 16:04:22 +00:00
Bill Currie f7d806e8d5 can now handle > vector sized parameters 2003-04-22 20:11:16 +00:00
Bill Currie e732cf591d remove all references to OFS_* from the C code. only the macros in progs.h
use them now
2003-04-22 18:20:15 +00:00
Bill Currie 714bd341fc 'copy' streams on openning. fixes the shared stream issues, though other
problems might arrise (eg, running out of file handles or memory)
2003-04-20 07:19:51 +00:00
Bill Currie 64d5e4e053 mindHog's (mindhog@mindhog.net) plugin command patch 2003-04-17 15:18:16 +00:00
Bill Currie eb099ae0d3 make qf gcc 3.3 clean 2003-04-17 00:01:48 +00:00
Brian Koropoff 11e2f0d16a Added a generic interface for using handles in GIB and made GIB threads
use it.
2003-04-14 01:17:55 +00:00
Brian Koropoff e707e9bb89 Moved gib_*.h into include/ and moved the necessary declarations and struct
definitions to QF/gib.h to interface with libQFgib.
2003-04-13 22:07:58 +00:00
Brian Koropoff 3b703db4d4 Added the beginnings of an interface between Ruamoko and GIB. Although the
API is by no means finalized, it's now possible to write GIB builtins in
Ruamoko that can take arguments and return values to GIB.
2003-04-13 20:43:52 +00:00
Brian Koropoff 63c3038ad8 Added the useful dstring_freeze function to convert a dstring to a
finalized, plain C string.
2003-04-13 05:48:28 +00:00
Bill Currie e3f8c833ad getting closer. wav's successfully load, but playback is always looped (?).
oggs hang
2003-04-11 21:14:38 +00:00
Brian Koropoff f287e78030 Optimized the way resetting buffer states occurs and fixed thread::kill so
threads actually die as they are supposed to.
2003-04-11 05:58:58 +00:00
Brian Koropoff af114732ef Oops, forgot these. 2003-04-11 04:37:41 +00:00
Brian Koropoff d8c0f50c11 The ultimate GIB bugfix commit, including reworked semantic processing,
a fix for arguments passed to a GIB function run via rcon, and various
other fixes.
2003-04-11 02:57:11 +00:00
Bill Currie ccb56eea39 half way though the sfx loader re-write. nothing works :) 2003-04-11 01:17:48 +00:00
Bill Currie e5a23c95dc make riff.c portable 2003-04-10 22:52:58 +00:00
Bill Currie 722c55391e read fmt chunks properly 2003-04-10 22:03:55 +00:00
Bill Currie 5e98c762ed riff namespace cleanup (sorta, it's ugly:/) 2003-04-10 21:45:12 +00:00
Bill Currie 0045ab7c09 implement Qungetc and nuke Qgetpos and Qsetpos 2003-04-10 21:11:40 +00:00
Bill Currie 022cac6082 oops, forgot this 2003-04-10 16:53:54 +00:00
Bill Currie e937fecdc1 move the riff reading code into libQFutil 2003-04-10 16:52:39 +00:00
Bill Currie b80357afda change _FOpenFile to take a dstring for foundname plugging a potential
buffer overflow.
2003-04-09 05:55:41 +00:00
Bill Currie d3b6fcbd61 revert the inappropriately complicated event code for the simpler version.
even that's not likely to be final
2003-04-08 19:20:48 +00:00
Bill Currie 255a7522bd merge IN_SendKeyEvents and IN_Commands into IN_ProcessEvents 2003-04-08 18:45:12 +00:00
Bill Currie 35eb866603 kill VID_HandlePause and IN_HandlePause as they never did anything and
IN_ModeChanged as it's a dead prototype
2003-04-08 17:55:32 +00:00
Bill Currie 01bff9c79e WildCode's alias model VA prepatory patch 2003-04-08 04:13:49 +00:00
Bill Currie 0b0dfcc38e nuke the string api (never really liked it) 2003-04-08 02:35:09 +00:00
Bill Currie 13fd0b8533 nuke the string hash api as it's been obsoleted 2003-04-07 22:34:39 +00:00
Bill Currie 7001f1d851 plist api (hope it works:) 2003-04-07 20:02:06 +00:00
Bill Currie d5003f363d make plist arrays unlimited in size 2003-04-07 19:29:52 +00:00
Bill Currie 33c9ce0f7b add hash table api 2003-04-07 16:38:34 +00:00
Ragnvald Maartmann-Moe IV 91bebf1bfa Don't need LA for greyscale textures, switch to luminance-only. 2003-03-21 22:08:46 +00:00
Ragnvald Maartmann-Moe IV 3bfdf0aea3 Test for gl errors every frame. 2003-03-21 21:28:09 +00:00
Bill Currie 00c61fe07c add a luminance/alpha tex def 2003-03-20 23:30:24 +00:00
Ragnvald Maartmann-Moe IV 88c2735d9c Make sprite rendering use vertex arrays, as a test for detection of vertex array support (tests only for OpenGL 1.1 or better, at the moment, no driver blacklist yet). 2003-03-20 19:58:18 +00:00
Bill Currie 3423ed59d5 expand the plist api to make plist creation easier 2003-03-18 19:15:31 +00:00
Bill Currie 71a60717d9 make pr_source_path a ; separated list of dirs and make it controllable in
qfprogs
2003-03-12 22:31:44 +00:00
Bill Currie c731afa957 hopefully fix the input grabbing (and evem more hopefully, without driving
Despair to ... um... ;)
2003-03-07 03:55:51 +00:00
Brian Koropoff 2be8a851d5 Oops, make 'return' GIB builtin actually end the current function. 2003-03-01 02:44:58 +00:00
Bill Currie a9a169e820 make the more relevant parts of qfs available to progs. bi_file.c will
eventually be moving into bi_qfs.c
2003-02-28 05:35:27 +00:00
Brian Koropoff c9fbb334f1 Cleaned up the GIB parser and GIB_Execute() a lot. Made aliases work in
GIB.  Added some breakpoint GIB builtins for debugging script/intepreter
interactions.  Made carne work properly again (local variables don't
disappear in interactive mode)
2003-02-25 06:52:27 +00:00
Ragnvald Maartmann-Moe IV 0fd0bd5d96 Replace removed bigendian declaration. 2003-02-23 22:53:03 +00:00
Bill Currie c026e61d22 make LittleLong and co defines rather than function pointers 2003-02-22 23:23:16 +00:00
Bill Currie 6805d479f3 improve Hash_Free's docs 2003-02-21 02:37:44 +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
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
Bill Currie 851d203916 work towards a more secure qfs 2003-02-14 22:36:10 +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 2cb4c7836d Remove dead cvar. 2003-02-14 02:21:31 +00:00
Ragnvald Maartmann-Moe IV 911933c8fd *punts cvs* 2003-02-13 19:04:08 +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
Bill Currie 4bd1718475 re-arrange viewsize handling to fix the hud bug in glx 2003-02-11 21:24:27 +00:00
Bill Currie 2dc7cbaef0 remove a redundant prototype 2003-02-10 21:04:50 +00:00
Bill Currie 3ab4eb6545 Arkadi's mach64 patch 2003-02-06 21:47:33 +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
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
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
Bill Currie 1f16e95564 add gib_tree.h 2003-01-30 04:43:40 +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 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 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 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 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 71196fedf6 make gcc more anal about prototypes, string constants and function
visibility (ie, global functions must have a prototype)
2003-01-06 18:28:13 +00:00
Brian Koropoff c522970a88 Added a GIB event system for registering GIB callback functions to be
started when a named event occurs.  Added a few test events to the qw
client and server.  Cleaned up the range GIB builtin a bit.
2003-01-03 04:30:38 +00:00
Brian Koropoff 86d73f1577 Include protection. 2003-01-03 04:12:27 +00:00
Bill Currie 637de7b687 chage PL_ObjectForKey to take a plitem directly and typecheck the item 2002-12-18 16:09:47 +00:00
Bill Currie a84b6bba5d make stuff static that can be and nuke some useless stuff 2002-12-16 23:26:14 +00:00
Brian Koropoff 32e5e6ef0b Numerous GIB bug fixes and optimizations. Fixed/updated some GIB scripts
as well.
2002-12-13 23:36:05 +00:00
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 92ea1de504 apply Kaare Slettnes' key name extention patch (Closes: #62) 2002-12-02 16:26:18 +00:00
Bill Currie ee30860cef fix a bunch of ;; typos 2002-11-20 21:44:04 +00:00
Brian Koropoff 854f6d9054 Created gib_regex.[ch] to manage regular expressions in GIB. Regexs are
now cached and only recompiled when compile flags change.  Changed regex
builtins to take an options string argument after the regular expression.
2002-11-19 06:24:29 +00:00
Brian Koropoff 860306e324 Oops, forgot these. 2002-11-19 04:24:09 +00:00
Brian Koropoff d4b1c74866 Added the string::findsub builtin. Added a reset function to the cbuf
interpreter struct so that custom cbuf data can be reset after an error.
This fixes a bug where GIB would think it was still waiting for a return
value after an error occurred in an embedded command.
2002-11-16 20:56:04 +00:00
Brian Koropoff 625e1e36d6 Added Sys_PathType, which reports whether a path is absolute, relative
below, or relative above (uses .. to ascend the filesystem). Changed
file functions in GIB to use this.  GIB can now be initialized in a
non-sandboxed mode, which at the moment means that GIB scripts run with
carne can access the entire filesystem.
2002-11-14 05:28:54 +00:00
Brian Koropoff 7b0c24a386 Added carne, the stand-alone GIB interpreter. Made a few changes to GIB
to accommodate it.  Added the strict flag to cbufs, which causes an error
to be generated when a command is not found instead of just warning the
user.  GIB buffers have the strict flag set by default.
2002-11-14 02:10:55 +00:00
Bill Currie 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
Bill Currie 77288fe90b make dist fix 2002-11-09 21:56:13 +00:00
Brian Koropoff b40400d59c Moved GIB into libs/gib and made util no longer depend on it. Cleaned up
some cruft from a previous incarnation of GIB.
2002-11-09 07:13:52 +00:00
Bill Currie 3d44623b57 change Cmd_Exec_File's api so it can conditionally use normal or quake
file system accesses. fixes the map.cfg exec problem
2002-11-08 16:39:28 +00:00
Bill Currie 62bbd0228a prototype Com_CollapsePath 2002-11-08 03:12:22 +00:00
Bill Currie eeb4e4f9a9 how that got past my compile tests is beyond me 2002-11-06 14:56:39 +00:00
Bill Currie ca4b3acd6c big protototype cleanup. Now, except for a few cases, all non-static
prototypes are in headers files.
2002-11-05 19:12:51 +00:00
Bill Currie aa36b85ba6 add PR_StringValid and PR_EdictValid to check the validity of progs string
and entity values without crashing.
2002-10-29 05:07:10 +00:00
Brian Koropoff 01a7740f1b Added bind.get builtin that returns the command currently bound to a key.
Fixed gib_builtin.h to include another needed header.
2002-10-25 06:33:16 +00:00
Brian Koropoff 20d47cde2f Added the global.delete builtin to clean up old global variables. Updated
cb.gib to use it.
2002-10-23 03:56:57 +00:00
Bill Currie 80e85226b9 pr_xstatement now always reflects the currently executing statement making
debugging easier in the event of a segfault
2002-10-22 15:07:54 +00:00
Bill Currie b345f510fa provide Hash_Buffer so buffers can be hashed 2002-10-20 03:30:22 +00:00
Bill Currie 4da662eb47 implement pr_obj_msg_sendv 2002-10-16 22:17:26 +00:00
Bill Currie be4b8096d4 two new instructions: move and movep: basicly memmove. qfcc support coming
as soon as I get it working :)
2002-10-16 06:44:41 +00:00
Brian Koropoff 8c2afef44c Changed GIB_Arg* into macros. Cleaned up GIB file access a bit and added
file.move and file.delete builtins.  Added Qremove to quakeio.[ch]. Did
a little cleaning and commenting in gib_parse.c.  Added support for \t
and \r escape characters.
2002-10-16 04:59:34 +00:00
Bill Currie 68b41f9b44 make dstring_adjust `grow' in increments of 1024. this should speed up
multiple appends nicely.
also create davsprintf and dasprintf to /append/ the printed strings to the
dstring rather than overwriting it as is done with dvsprintf and dsprintf.
2002-10-15 19:52:46 +00:00
Bill Currie 1f0b6e84a5 change pr_obj_msgSend and pr_obj_msgSend_super so they either call builtin
methods directly or setup the progs struct for a normal function call to
call a progs method rather than recursively calling PR_ExecuteProgram. This
will reduce method call overhead (both cpu and stack usage), fix the loss
of tracing when calling a method and makes it possible to break out of the
progs engine simply if threaded progs are ever implemented.
2002-10-15 18:53:33 +00:00
Brian Koropoff 72e1ab0c57 Added the sleep console command that waits for a specified amount of time.
Note that this isn't a GIB-specific command but is very useful in GIB
threads.  Fixed the range GIB command to respect the ifs local variable.
2002-10-13 19:46:47 +00:00
Brian Koropoff 8b31103e6f Var substitution is now handled in the same pass as embedded return values.
This prevents var substitution from being performed on the return value
of a function.  The local variable ifs can now be set to specify a custom
field separator for use in for loops.  file.find will also insert ifs
between file names instead of a space if it is set.  file.find will also
no longer put . and .. in a list of file names.
2002-10-13 05:52:06 +00:00
Bill Currie 9d8d570269 using Qseek on a pak sub-file should work better. this should make oggs in
paks work.
2002-09-27 04:27:19 +00:00
Bill Currie d25ee82838 provide a tighter accuracy (but slower) _VectorNormalize for the tools 2002-09-25 21:35:49 +00:00
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 24a9b48127 rewrite bspfile.[ch] so they work off an object rather than global data.
The direct filesystem access is also removed. Fix up qfvis and qflight to
compile with the new bspfile. qfvis seems to work, qflight probably doesn't
2002-09-19 05:35:17 +00:00
Bill Currie 86f542a971 kill the last VFile ref and make the calculate the file size on opening for
reading (Qfilesize works only when Qopen is used in read mode).
2002-09-19 05:11:42 +00:00
Bill Currie 599fea0edb redo bspfile to use dynamic allocation for the arrays to avoid buffer
overflows. also fix up the verbosity levels in qfvis.c
2002-09-18 06:07:38 +00:00
Bill Currie eec3b7d8bc fix missed header commit 2002-09-14 07:51:53 +00:00
Bill Currie f7b4dffcc0 get larger player skins working in gl 2002-09-13 05:32:28 +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 5597dc2408 make maplist work over rcon 2002-09-04 18:56:53 +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 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 ec47e08e1c go back to using QFile, quakeio.h and quakefs.h 2002-08-27 07:16:28 +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 7f5c99efdc fix -sdl32 crashing on startup (vid_bitdepth init got lost) 2002-08-26 22:43:34 +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 d757c10f07 Only need one define for R_Cull* 2002-08-23 20:46:19 +00:00
Ragnvald Maartmann-Moe IV 6e8bd2aeb0 defines and ifdefs for R_CullSphere, just like R_CullBox. 2002-08-23 07:04:29 +00:00
Brian Koropoff 0715464bb1 Yay for escape characters. 2002-08-22 22:43:47 +00:00
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
Ragnvald Maartmann-Moe IV c91f1a2aea Rename Length to VectorLength. 2002-08-20 02:22:40 +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
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 4b1ceb9795 hopefully take care of glGetProcAddress type once and for all :) 2002-08-16 18:29:21 +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
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
Brian Koropoff 0390fe22ce Added tree variables (blah.1, blah.2, blah.1.foobar, etc), global variables,
made var substitution more robust, and began adding proper comments to
the code.
2002-08-08 09:20:00 +00:00
Bill Currie c05db51069 add Qputs 2002-08-07 18:43:35 +00:00
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
Bill Currie ff14989edf whitespace 2002-08-06 15:10:46 +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 87f0f480e4 Local variables work, preparing to get embedded commands done. 2002-08-05 00:01:06 +00:00
Brian Koropoff cf48363c6e More of GIB done: builtins, functions, various cleanups, math, etc. 2002-08-03 06:04:00 +00:00
Bill Currie 175be2e397 when adding new headers, be sure to update include_HEADERS or EXTRA_DIST as
appropriate
2002-08-02 15:35:11 +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 69bf19b6e7 when adding new header files, they MUST be included in include_HEADERS or
EXTRA_DIST, as appropriate.
2002-08-01 17:13:58 +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 d3ae1b5078 make dist fix 2002-07-31 15:08:56 +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 d00ed9619f give dstring_adjust a prototype and fix up some whitespace 2002-07-29 19:52:19 +00:00
Bill Currie edf55349b3 fix dependencies on dstring.h 2002-07-29 19:48:23 +00:00
Bill Currie d04eeb3ba2 get -wgl working again 2002-07-27 06:43:28 +00:00
Ragnvald Maartmann-Moe IV 587de27849 Another step towards QSG2 compliance. 2002-07-25 14:43:36 +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 f14815a57f change msurface_t's extents from short to unsigned short so >> expressions
involving it go faster
2002-07-24 15:58:52 +00:00
Ragnvald Maartmann-Moe IV 85c7e43aef Split lightmaps off from surface drawing. 2002-07-23 19:57:47 +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