Commit graph

49 commits

Author SHA1 Message Date
Bill Currie
ed3f98eab4 qwaq related compile fixes for the new function syntax rules. 2011-02-13 19:07:30 +09:00
Bill Currie
2617f9e3ed Update for the new syntax.
With this, qwaq will compile once I sort out the parameters for QC style
functions, and some non-executable warnings. However, as those are
compiler problems, this should be the final qwaq related commit.
2011-02-10 14:58:59 +09:00
Bill Currie
5864c198cc Property list tests are working. 2011-01-10 12:26:11 +09:00
Bill Currie
5fc4ef63f6 Rewrite ruamoko plist support to use handles.
The plist code was written long before I thought of resource handles, and
then it was forgotten. This is much nicer and safer than storing C
pointers in progs memory space (*shudder*).
2010-11-24 17:01:18 +09: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
4973a38cce speed up PF_VarString a little 2007-06-09 09:43:21 +00:00
Bill Currie
5ef382d2a7 Add a rua wrapper for scripts (seems, to work, too:). Also added generic resource handle support based on strref handling in pr_strings.c.
This is an imperfect revision of history.
2004-11-11 04:06:00 +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
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
b50d283b28 make sel_get_uid and class_get_instance_method work 2003-08-23 22:16:42 +00:00
Bill Currie
75c91e78c2 qwaq progs now take args :) 2002-11-12 02:56:10 +00:00
Bill Currie
c4811ccb52 seriously clean up qwaq. most of that stuff isn't needed any more 2002-05-31 06:16:10 +00:00
Bill Currie
191232a383 get qwaq working with the objective stuff and do a simple messaging test 2002-05-31 06:02:26 +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
cef918df83 get array initialisation worrking 2002-01-18 08:26:37 +00:00
Bill Currie
0bb01f310f don't crash when there are too many entities for update messages. just ignore
the excess.
2001-12-10 03:17:21 +00:00
Bill Currie
c60dc54697 Makefile:
update qfcc options
main.qc:
	go back to the original intent :)
2001-11-02 03:03:01 +00:00
Bill Currie
922895ed99 comment out unused var 2001-10-02 19:33:31 +00:00
Bill Currie
e71cbaf5ef fix for -- 2001-08-20 22:16:07 +00:00
Bill Currie
c2d3d8f3ab temp def expressions and ?:
seems to work :)
2001-08-11 21:15:24 +00:00
Adam Olsen
caeb31e6ca start of the support for chained function calls. Actually, they
should work fine now, there's just some extra temp vars we want to
remove before we can consider it "done" :)
2001-08-10 20:35:42 +00:00
Adam Olsen
6414897dae got a few new operators for qc :)
<< >> % which all act like their C counterparts
+= -= *= /= &= ^= |= <<= >>= %= which just expand into the obvious,
also like the C versions.
2001-08-10 16:17:00 +00:00
Bill Currie
2774260898 test ^ 2001-08-09 16:39:08 +00:00
Bill Currie
081d8f3c47 ^ and ~ operators for qc (^ from Rhamphoryncus) and clean up the punctuation
line in qc-lex.l (why didn't I think to do that in the first place?!?)
2001-08-09 16:34:46 +00:00
Bill Currie
89da47335b tests, tests, tests 2001-07-27 20:56:16 +00:00
Bill Currie
c553917c53 various tests 2001-07-25 21:48:20 +00:00
Bill Currie
638cd005b0 return type testing 2001-07-25 02:28:04 +00:00
Bill Currie
07fbe47294 tests for if (simple expression) 2001-07-24 22:29:16 +00:00
Bill Currie
c248372e20 Initial integer type support. qfcc /is/ partially broken when it comes to
integer constants and float function args/return values.

pr_comp.h:
	o  add the integer opcodes to pr_opcode_e
pr_edict.c:
	o  add "quaternion" and "integer" to type_name[]
	o  support quatnernion and integers types when printing values
	o  support the integer opcodes when bounds checking
pr_exec.c
	o  enable the integer opcodes
pr_opcode:
	o  add the integer opcodes to the opcode table
	o  logical operators all result in an integer rather than a value
expr.h:
	o  rename int_val to integer_val
qfcc.h:
	o  kill another magic number
expr.c:
	o  move the opcode to string conversion out of type_mismatch and into
	   get_op_string
	o  rename int_val to integer_val
	o  general integer type support.
	o  generate an internal comipiler error for null opcodes rather than
	   segging.
pr_imm.c:
	o  rename int_val to integer_val
	o  support integer constants, converting to float when needed.
pr_lex.c:
	o  magic number death and support quaternions and integers in type_size[]
qc-lex.l
	o  rename int_val to integer_val
	o  support quaternion and integer type keywords
qc-parse.y:
	o  rename int_val to integer_val
	o  use binary_expr instead of new_binary_expr for local initialized
	   variables
builtins.c:
	o  rename int_val to integer_val
	o  fix most (all?) of the INT related FIXMEs
defs.qc:
	o  use integer instead of float where it makes sense
main.c:
	o  read_result is now integer rather than float
main.qc:
	o  float -> integer where appropriate
	o  new test for int const to float arg
2001-07-23 01:31:22 +00:00
Bill Currie
1fca85ee0a kill some unneeded tests 2001-07-20 23:18:03 +00:00
Bill Currie
edcc313501 debug info for local variables is now used. only works when tracing atm:/ 2001-07-19 07:27:14 +00:00
Bill Currie
3eedd3d8fc more tests 2001-07-18 19:04:47 +00:00
Bill Currie
9d50fea8e5 more tests 2001-07-18 06:37:59 +00:00
Bill Currie
9fa7ecd14d line number tests for while 2001-07-15 01:49:24 +00:00
Bill Currie
7fce7e53ff more test (need to find a way to do automated tests, I think) 2001-07-12 23:11:40 +00:00
Bill Currie
ecff96258f cmd.[ch]:
api change: Cmd_Args () now takes a parameter inidcating which arg to
	start at for grabbing the un-parsed command line
qw/source/sv_ccmds.c:
	implement kk's tell command and user name matching (though # is used for
	the wildcard and it's still case sensitive)
everything else:
	adjust for the new Cmd_Args protype
2001-07-10 18:25:54 +00:00
Bill Currie
f6575ca262 more testing 2001-07-07 02:38:40 +00:00
Bill Currie
dfdff6cc59 more testing and add traceon/traceoff to the builtins 2001-06-27 22:56:52 +00:00
Bill Currie
b285ab003d more tests 2001-06-27 21:15:15 +00:00
Bill Currie
a35c049744 main.c:
give instruction address in opcode dump
main.qc:
	more test code
2001-06-27 05:46:53 +00:00
Bill Currie
e61884fefb add a test for initialized locals 2001-06-08 22:54:34 +00:00
Bill Currie
ef99ad24b0 const merge testing. qfcc is currently borked in that dept. 2001-06-08 00:14:11 +00:00
Bill Currie
e349ed3013 implement file io for qwaq (and cat in qc }:> ) 2001-06-06 20:05:08 +00:00
Bill Currie
3d566d47e3 more testing 2001-06-06 00:38:24 +00:00
Bill Currie
1e6d69e2be main.c:
allow dumping to work with entities
main.qc:
	more tests
2001-06-05 23:53:55 +00:00
Bill Currie
e339e82c01 hash.h is now const correct as is a lot of qfcc 2001-06-04 04:52:14 +00:00
Bill Currie
275e74161b string comparison operators 2001-06-04 03:36:35 +00:00
Bill Currie
09118bc01e pr_comp.h:
add OP_ADD_S. WARNING!!! this /will/ move.
progs.h:
	add prototype for PR_PrintStatement
pr_edict.c:
	add OP_ADD_S support in the progs checker
pr_exec.c:
	implement OP_ADD_S
tools/qfcc/include/.gitignore:
	add config.h.in
qfcc.h:
	nuke PR_NameImmediate and change PR_ParseImmediate's prototype (see
	pr_imm.c)
pr_comp.c:
	add ADD_S, adjust for PR_ParseImmediate's prototype, make
	PR_ParseExpression work with non-sequential opcodes (slow, will work on
	that next). Fix up initialised global parsing.
pr_imm.c:
	nuke PR_NameImmediate. didn't work well and wasn't such a good idea anyway.
	PR_ParseImmediate now accepts a def_t * arg. if null, will allocate a
	new global def, otherwise it will initialize the def passed in.
qwaq/main.c:
	sports some debugging code (dumps info about the progs it's running)
qwaq/main.qc:
	better ADD_S testing
2001-06-03 17:36:49 +00:00
Bill Currie
8a23ae0a48 stand alone qc interpreter. So I'm on some serious qwaq :) (actuallly, its
main purpose is language extention testing)
2001-06-01 21:57:59 +00:00