diff --git a/tools/qwaq/main.c b/tools/qwaq/main.c index cc97fc1f2..3b436f25c 100644 --- a/tools/qwaq/main.c +++ b/tools/qwaq/main.c @@ -59,7 +59,6 @@ main () func_t main_func; VFile *f; int len; - int i; Cvar_Init_Hash (); Cmd_Init_Hash (); @@ -111,34 +110,7 @@ main () PR_InitRuntime (&progs); *progs.edicts = PR_InitEdicts (&progs, MAX_EDICTS); - for (i = 0; i < progs.progs->numstatements; i++) { - PR_PrintStatement (&progs, &progs.pr_statements[i]); - } - printf ("\n"); - for (i = 0; i < progs.progs->numfunctions; i++) { - dfunction_t *func = &progs.pr_functions[i]; - int j; - printf ("%d %d %d %d %d %s %s %d", func->first_statement, func->parm_start, func->numparms, func->locals, func->profile, PR_GetString (&progs, func->s_name), PR_GetString (&progs, func->s_file), func->numparms); - for (j = 0; j < func->numparms; j++) - printf (" %d", func->parm_size[j]); - printf ("\n"); - } - printf ("\n"); - for (i = 0; i < progs.progs->numglobaldefs; i++) { - ddef_t *def = &progs.pr_globaldefs[i]; - - printf ("%s %d %d %s\n", pr_type_name[def->type & ~DEF_SAVEGLOBAL], (def->type & DEF_SAVEGLOBAL) != 0, def->ofs, PR_GetString (&progs, def->s_name)); - } - printf ("\n"); -#if 0 - for (i = 0; i < progs.progs->numfielddefs; i++) { - ddef_t *def = &progs.pr_fielddefs[i]; - - printf ("%s %d %d %s\n", pr_type_name[def->type & ~DEF_SAVEGLOBAL], (def->type & DEF_SAVEGLOBAL) != 0, def->ofs, PR_GetString (&progs, def->s_name)); - } - printf ("\n"); -#endif read_result = (int*)PR_GetGlobalPointer (&progs, "read_result"); main_func = PR_GetFunctionIndex (&progs, "main"); PR_ExecuteProgram (&progs, main_func); diff --git a/tools/qwaq/main.qc b/tools/qwaq/main.qc index 67077e338..b172c77e0 100644 --- a/tools/qwaq/main.qc +++ b/tools/qwaq/main.qc @@ -1,63 +1,6 @@ -#define NIT_TESLA 32768 //The *real* bug zapper! -#define NIT_SECURITY_CAMERA 65536 //CH Security Camera -#define NIT_TELEPORTER 131072 //CH Teleporter -#define PC_ENGINEER_TF_ITEMS NIT_TESLA | NIT_SECURITY_CAMERA | NIT_TELEPORTER - -struct foo_struct = { - integer result; - string buffer; -}; - -void (foo_struct bar) eek; -float (float a, float b) boing; - -string [6] dot = { - "gfx/menudot0.lpm", - "gfx/menudot1.lpm", - "gfx/menudot2.lpm", - "gfx/menudot3.lpm", - "gfx/menudot4.lpm", - "gfx/menudot5.lpm", -}; - -void (string fmt, ...) test_argv = +integer () main = { -traceon (); - local vector v; - local integer i; - local string f = fmt; - - for (i = 0; i < @argc; i++) - v = @argv[i]; -traceoff (); -}; - -float () main = -{ - local float messed_or; - local integer handle; - local string buffer; - - test_argv ("hi there", 1, "123", '1', '1 2 3'); - messed_or = PC_ENGINEER_TF_ITEMS; - handle = open ("main.qc", 0); - if (handle == -1) { - print (strerror (errno ()) + "\n"); - return 1; - } - do { - buffer = read (handle, 1024); - if (read_result == -1) { - print (strerror (errno ()) + "\n"); - return 1; - } - print (buffer); - } while (read_result == 1024); - close (handle); - for (handle = 0; handle < 6; handle++) - print (dot[handle] + "\n"); - - local id ffoo = [[Foo alloc] init]; - [ffoo run]; + local id foo = [[Foo alloc] init]; + [foo run]; return 0; };