Bill Currie
cf93f5f65e
oops, who let C++ into C? :)
2003-08-25 01:47:05 +00:00
Bill Currie
96202a5984
bah, forgot to -1 the instruction pointer for jumpb
2003-08-24 07:23:12 +00:00
Bill Currie
afb42f5ed0
fix the unsigned comparison opcodes
2003-08-24 05:53:15 +00:00
Bill Currie
253d19876c
no code to dump for a null function
2003-08-24 05:08:47 +00:00
Bill Currie
5d8bebfff8
implement class_get_class_method and (partially) class_pose_as
2003-08-24 03:44:12 +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
edb716ada0
oops, forgot to remove developer forcing
2003-08-23 06:21:35 +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
98beb38540
implement jumpb correctly
2003-08-22 19:48:36 +00:00
Bill Currie
cb6eba87ca
print the value even for unknown defs if the type is known
2003-08-22 17:32:55 +00:00
Bill Currie
a2300387de
fix a bunch of segfaults
2003-08-20 22:36:02 +00:00
Bill Currie
fe3b544528
handle "return 0" a bit better. assumes location is is always 0, but it
...
always has been (and always /should/ be anyway:)
2003-08-13 17:27:34 +00:00
Bill Currie
6f519c7e0f
don't bother doing the copy if the value to be returned is already in the
...
return slot
2003-08-13 17:07:05 +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
cbc6c40d33
get some single source instruction formats right and handle empty paths
...
properly
2003-08-05 17:27:47 +00:00
Bill Currie
59c26b5ce0
quick fix to handle .ent files starting with comments
2003-08-04 05:21:18 +00:00
Bill Currie
dd9ab1e050
get unsigned mostly working
2003-08-01 21:20:04 +00:00
Jeff Teunissen
f04d67f319
Nuke the old-style Object's dead built-in methods.
2003-08-01 16:42:02 +00:00
Bill Currie
cbd5c70320
oops, %O should be in hex
2003-07-31 01:57:29 +00:00
Bill Currie
72eca6a956
get the default right :P
2003-07-30 22:24:44 +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
Bill Currie
dcd143f197
missing/incorrect symbols fixed
2003-07-30 17:44:38 +00:00
Bill Currie
3886723467
fix some builtin method names due to the selector name fixes in qfcc
2003-07-27 19:57:40 +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
5481273639
start working on plist entity files
2003-07-17 18:27:00 +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
0cf0f710b7
remove some unneeded code
2003-07-09 15:34:58 +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
Brian Koropoff
0ba2481632
Applied taniwha's mem leak fix.
2003-05-15 21:59:19 +00:00
Bill Currie
dedb2fa6bf
get [super ...] working correctly
2003-05-15 05:58:31 +00:00
Brian Koropoff
72c21f60c9
Add support for GIB handles to the Rua interface.
2003-05-14 21:16:23 +00:00
Bill Currie
5f3573143a
the beginnings of a jihad against buffer overflows
2003-05-08 23:24:02 +00:00
Bill Currie
e16a211e1f
PR_SetString doesn't like null pointers, it seems. While fixing
...
PR_SetString would be a better fix, this is faster code.
2003-04-24 04:57:30 +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
eb099ae0d3
make qf gcc 3.3 clean
2003-04-17 00:01:48 +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
Bill Currie
9afc3cf8f6
copyright date fixes
2003-04-10 16:54:12 +00:00
Bill Currie
7f31f05684
alpha compile fixes
2003-04-08 05:33:49 +00:00
Bill Currie
8fc721a2bb
plug another overflow
2003-04-08 04:01:20 +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
72036d76b0
hmm, forgot a chunk :P
2003-04-07 20:15:38 +00:00
Bill Currie
7001f1d851
plist api (hope it works:)
2003-04-07 20:02:06 +00:00
Bill Currie
33c9ce0f7b
add hash table api
2003-04-07 16:38:34 +00:00
Bill Currie
a72d3f6844
fix a segfault causing typo :P
2003-04-06 01:04:37 +00:00
Bill Currie
58541b6855
support printing a couple more types (especially for edicts)
2003-03-26 18:45:44 +00:00
Bill Currie
fafc578440
correct a comment and ws
2003-03-25 17:40:02 +00:00
Bill Currie
548d3b68f8
pr_load.c:
...
PR_RelocateBuiltins must be called before PR_InitRuntime
pr_obj.c:
don't segfault on broken classes
2003-03-13 18:45:45 +00:00
Bill Currie
2858bc4922
d'oh
2003-03-12 22:38:02 +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
bfaef7747b
the first fielddef isn't always null (esp with qfcc), so check to see if it
...
needs printing too
2003-03-05 18:18:42 +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
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
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
b6a3bc8d1c
try to give line numbers in the traceback
2003-02-19 06:26:49 +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
Bill Currie
8a9cd78072
fix up a couple of error cases (and catch them!)
2003-01-29 20:32:44 +00:00
Bill Currie
1342533234
make the PF_Find search field error more informative
2003-01-20 21:28:36 +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
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
d78f34e795
fix some spelling errors
2002-11-20 21:21:22 +00:00
Bill Currie
06df342655
fix a stray ;
2002-11-15 14:56:57 +00:00
Bill Currie
d1199f23da
get categories working in the runtime :)
2002-11-14 20:42:48 +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
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
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
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
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
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
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
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
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
Jeff Teunissen
575689296a
Tidy up progs dump output, and do some whitespace.
2002-10-08 19:46:42 +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
bf53f43e13
make PR_break do a backtrace instead of crashing the server
2002-09-07 06:48:15 +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
Bill Currie
ec47e08e1c
go back to using QFile, quakeio.h and quakefs.h
2002-08-27 07:16:28 +00:00
Bill Currie
8c82a54ac7
fix a 0 byte allocation
2002-08-26 00:30:31 +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
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
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
Bill Currie
2b1fd8e8c0
fix the menu keybinding not working bug
2002-08-19 02:48:38 +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