Commit graph

5258 commits

Author SHA1 Message Date
Bill Currie
0ddb5eb822 report all bad builtins rather than just the first 2004-01-05 08:52:20 +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
211908e741 implement a couple more obj functions 2004-01-05 01:41:20 +00:00
Daniel Anderson
d9db1a0c04 Treat cs_server clients like non-client entities for GIB "frag" event 2004-01-05 00:48:41 +00:00
Daniel Anderson
85beae40f0 Added the missing null terminator for a reliable message send. 2004-01-05 00:25:58 +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
538d669887 micro-tidy while pondering how to rework this whole mess 2004-01-04 03:24:37 +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
Ragnvald Maartmann-Moe IV
043c1ce466 Check for %s_luma as well as %s_glow. Also a bit of whitespace. 2004-01-04 01:20:20 +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
Bill Currie
40b8974c33 better external skin handling from Grievre 2003-12-28 05:25:06 +00:00
Ragnvald Maartmann-Moe IV
9dbb8335f6 Fix loading of some sky textures. 2003-12-23 22:24:48 +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
9f76665963 luma tweak (redundant code removal) from Grievre 2003-12-23 07:22:04 +00:00
Bill Currie
c917233165 make sure outputbuf's mem gets initialized (oops:) 2003-12-22 23:40:20 +00:00
Bill Currie
5eff81b005 dstrings now have individual memory management functions 2003-12-22 23:35:22 +00:00
Bill Currie
e53967b346 --disable-static now works (thanks for the heads-up, raorn) 2003-12-22 20:51:08 +00:00
Bill Currie
069ee8657f fix a typo that prevented the asm lib getting the correct flags 2003-12-22 19:59:33 +00:00
Bill Currie
0307618b15 use the passed "size" parameter rather than qfs_filesize: no telling
/where/ the progs really came from :)
2003-12-22 19:58:46 +00:00
Ragnvald Maartmann-Moe IV
5f76017d2a Update ALSA sound target to support 1.0.
Breaks 0.9 support, but 1.0 is in 2.6.0. So either update, or revert to older
snd_alsa.c & alsa_funcs_list.h.
2003-12-22 01:07:49 +00:00
Ragnvald Maartmann-Moe IV
12d3a137a1 Luma texture support for brush models (From Fuh, by way of Grievre). 2003-12-21 08:02:03 +00:00
Bill Currie
35d690c701 give an error message instead of segging for the following code:
@class foo;
@interface bar : foo
@end
2003-12-19 04:59:34 +00:00
Bill Currie
fade4419f7 clients now need to link in the server console plugin when static 2003-12-19 04:50:42 +00:00
Bill Currie
9e3f33f318 don't need to see these :) 2003-12-19 04:25:07 +00:00
Bill Currie
7d82daa127 dedicated server needs/wants the text (server) console plugin, not the
console plugin (ie, when static)
2003-12-19 03:41:58 +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
Bill Currie
e56e566bca eek, had the entity center-point calculation wrong. thanks, grievre 2003-12-09 04:29:12 +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
c3e7832d85 correct gamma test thanks to Grievre 2003-12-07 04:21:58 +00:00
Bill Currie
09143b7fb1 more whitespace 2003-12-06 22:49:18 +00:00
Bill Currie
53e382d3f8 fix an incorrect parameter bug found by Grievre 2003-12-06 05:06:27 +00:00
Bill Currie
4d3ca27227 white space 2003-12-05 22:33:11 +00:00
Bill Currie
a726e33bf1 mask off non-light bits from effects in CL_NewDlight as EF_FLAG1 etc
shouldn't affect light effects.
2003-12-02 23:42:09 +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
82975dfe1f send the correct number of bytes 2003-11-25 03:22:51 +00:00
Bill Currie
cb7ecd9f26 make certain Cmd_ExecuteString calls the command system with an active cbuf 2003-11-25 02:47:05 +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
5a49e9fea4 fixed an uninitialized variable. took reordering operations a bit to do so 2003-11-21 20:04:16 +00:00
Bill Currie
ce745c8078 better command output redirection handling: maplist over rcon should show
all (or most, there are limits still) of the maps on a server with many
maps.

move the optional progs funcs into sv_funcs_t and add UserInfoChanged,
ChatMessage and LocalinfoChanged callback support.

clean up PF_setinfo (and SV_SetInfo_f and SV_Localinfo_f) using shared code
where possible und to use the UserInfoChanged and LocalinfoChanged
callbacks.

add chat message callback to SV_Say. if it returns zero, normal chat
handling is done, otherwise it's assumed to have been handled by the progs.

provide a hook for unkown user commands. non-zero return means it's been
handled.
2003-11-21 06:09:21 +00:00
Bill Currie
886b766295 whitespace 2003-11-21 05:01:50 +00:00
Bill Currie
98da304558 this should fix the scores in deathmatch (thanks, xi) 2003-11-21 04:53:41 +00:00
Bill Currie
ad56a249f0 wonder what I was smoking... 2003-11-20 21:12:15 +00:00
Bill Currie
7ea30f3f87 use the new pr load hook for resolving the globals 2003-11-20 08:02:32 +00:00