mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
get qwaq working with the objective stuff and do a simple messaging test
This commit is contained in:
parent
ea3c6995fd
commit
191232a383
6 changed files with 24 additions and 6 deletions
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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++) {
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -2,4 +2,6 @@ qwaq.dat
|
|||
|
||||
defs.qc
|
||||
|
||||
../../cs-code/object.r
|
||||
test.r
|
||||
main.qc
|
||||
|
|
14
tools/qwaq/test.r
Normal file
14
tools/qwaq/test.r
Normal file
|
@ -0,0 +1,14 @@
|
|||
@interface Foo : Object
|
||||
-run;
|
||||
@end
|
||||
|
||||
|
||||
@implementation Foo
|
||||
|
||||
-run
|
||||
{
|
||||
print ("Hello world\n");
|
||||
printf ("%i\n", self);
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in a new issue