rearrange def_t a little and add def_next (leaving next free for other
uses)
pr_def.c:
use def_next instead of next to link /all/ of the named defs
qfcc.c:
ditto
define PROG_ID_VERSION as 6 and redefine PROG_VERSION as 0x00fff001
(0.fff.001) for the new qc features.
pr_edict.c:
support version 6 and version 0.fff.001 progs
qfcc.h:
add version field to options_t
add min_version field to opcode_t
pr_opcode.c:
set the minumum version of each opcode (gee, that table is getting ugly)
filter out opcodes with too high a min_version when initializing the opcode
hash tables.
qfcc.c:
update help output.
accept --id to limit code generation to id compatable (ver 6) progs.
default progs generation to 0.fff.001
Detect assignments to initialized globals and give an error, unless the --cow
(copy on write) option is given, and then allocate a new global for the var,
clear its initialized flag.
Relocate all globals.
termporary variables sit in one pool of memory (at the end of the globals)
thus drasticly reducing globals requirements. This works because the whole
lot is declared to be in the function's local variable space which is copied
to the locals stack in the progs engine.
to get the opcode from the table record rather than the location within the
table (ewww). gives a nice speed boost /and/ makes the opcode table easier to
maintain.
WARNING: this fixes a scope bug in qcc and thus you WILL get different (but
now correct) code for the following:
float foo;
void () bar =
{
local float foo;
foo = 0;
}
ie, the local foo will, as is correct, now be a separate var to the global
foo.
remove includes of qdefs.h and compat.h
pr_comp.h:
merge pr_comp.h from quake and qfcc, removing the copy in qfcc
cmdlib.[ch]:
nuke the endian code.
qendian.c:
initialise the LittleLong etc pointers at compile time rather than run
time
com.c (both nq and qw):
nuke the LittleLong etc init code
everything else:
fix up after the qtypes.h cleanup