get qwaq working with the objective stuff and do a simple messaging test

This commit is contained in:
Bill Currie 2002-05-31 06:02:26 +00:00
parent ea3c6995fd
commit 191232a383
6 changed files with 24 additions and 6 deletions

View file

@ -21,7 +21,7 @@ all: $(EXE) $(EXE).dat
$(EXE): $(OBJ) $(LIBS)
$(CC) $(LDFLAGS) -o $@ $^ ../../d.o/libs/gamecode/engine/.libs/libQFgamecode.a -lQFutil -lz -lm
$(EXE).dat: progs.src *.qc
$(EXE).dat: progs.src *.qc ../../cs-code/object.r *.r
qfcc --warn=error --code=debug
clean:

View file

@ -174,9 +174,6 @@ bi_printf (progs_t *pr)
void
BI_Init (progs_t *progs)
{
progs->builtins = 0;
progs->numbuiltins = 0;
PR_AddBuiltin (progs, "print", bi_print, 1);
PR_AddBuiltin (progs, "GarbageCollect", bi_GarbageCollect, 2);
PR_AddBuiltin (progs, "errno", bi_errno, 3);

View file

@ -81,6 +81,7 @@ main ()
COM_Filesystem_Init_Cvars ();
COM_Filesystem_Init ();
PR_Init ();
PR_Obj_Progs_Init (&progs);
BI_Init (&progs);
progs.edicts = &edicts;
@ -107,6 +108,7 @@ main ()
PR_LoadDebug (&progs);
PR_Check_Opcodes (&progs);
PR_RelocateBuiltins (&progs);
PR_InitRuntime (&progs);
*progs.edicts = PR_InitEdicts (&progs, MAX_EDICTS);
for (i = 0; i < progs.progs->numstatements; i++) {

View file

@ -3,12 +3,12 @@
#define NIT_TELEPORTER 131072 //CH Teleporter
#define PC_ENGINEER_TF_ITEMS NIT_TESLA | NIT_SECURITY_CAMERA | NIT_TELEPORTER
struct foo = {
struct foo_struct = {
integer result;
string buffer;
};
void (foo bar) eek;
void (foo_struct bar) eek;
float (float a, float b) boing;
string [6] dot = {
@ -56,5 +56,8 @@ float () main =
close (handle);
for (handle = 0; handle < 6; handle++)
print (dot[handle] + "\n");
local id ffoo = [[Foo alloc] init];
[ffoo run];
return 0;
};

View file

@ -2,4 +2,6 @@ qwaq.dat
defs.qc
../../cs-code/object.r
test.r
main.qc

14
tools/qwaq/test.r Normal file
View file

@ -0,0 +1,14 @@
@interface Foo : Object
-run;
@end
@implementation Foo
-run
{
print ("Hello world\n");
printf ("%i\n", self);
}
@end