From 793ab14b870625d30909315743aa164e58739748 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sat, 10 Nov 2012 20:59:58 +0000 Subject: [PATCH] Trash data/ (reason: see last commit) --- data/constant.qc | 4 -- data/consts.qc | 15 ------- data/fields.qc | 48 --------------------- data/frames.qc | 56 ------------------------- data/functions.qc | 43 ------------------- data/include.qc | 5 --- data/include2.qc | 1 - data/numbers.qc | 22 ---------- data/parsing.qc | 77 ---------------------------------- data/parth.qc | 10 ----- data/proto.qc | 12 ------ data/test.qs | 103 ---------------------------------------------- data/typedef.qc | 11 ----- data/types.qc | 5 --- data/uninit.qc | 19 --------- data/vars.qc | 43 ------------------- data/vector.qc | 10 ----- 17 files changed, 484 deletions(-) delete mode 100644 data/constant.qc delete mode 100644 data/consts.qc delete mode 100644 data/fields.qc delete mode 100644 data/frames.qc delete mode 100644 data/functions.qc delete mode 100644 data/include.qc delete mode 100644 data/include2.qc delete mode 100644 data/numbers.qc delete mode 100644 data/parsing.qc delete mode 100644 data/parth.qc delete mode 100644 data/proto.qc delete mode 100644 data/test.qs delete mode 100644 data/typedef.qc delete mode 100644 data/types.qc delete mode 100644 data/uninit.qc delete mode 100644 data/vars.qc delete mode 100644 data/vector.qc diff --git a/data/constant.qc b/data/constant.qc deleted file mode 100644 index 61c85e1..0000000 --- a/data/constant.qc +++ /dev/null @@ -1,4 +0,0 @@ -float constant_1 = 1; -string constant_2 = "hello world"; -vector constant_3 = { -0, +0, 0 }; -entity constant_4 = 0 diff --git a/data/consts.qc b/data/consts.qc deleted file mode 100644 index ccfeca6..0000000 --- a/data/consts.qc +++ /dev/null @@ -1,15 +0,0 @@ -/* this is the WIP test for the parser... - * constantly adding stuff here to see if things break - */ -void(string) print = #1; -void(string,string) print2 = #1; -void(string,string,string) print3 = #1; -string(float) ftos = #2; - -float CONST_1 = 1; -float CONST_2 = CONST_1 + 1; - -void() main = { - print3("CONST_1 = ", ftos(CONST_1), "\n"); - print3("CONST_2 = ", ftos(CONST_2), "\n"); -}; diff --git a/data/fields.qc b/data/fields.qc deleted file mode 100644 index 82b19ec..0000000 --- a/data/fields.qc +++ /dev/null @@ -1,48 +0,0 @@ -/* this is the WIP test for the parser... - * constantly adding stuff here to see if things break - */ -void(string) print = #1; -void(string,string) print2 = #1; -void(string,string,string) print3 = #1; -string(float) ftos = #2; -entity() spawn = #3; -void(entity) kill = #4; - -.float mema; -.float memb; -.vector memv; - -.void() fun; - -void(entity a, .float f) printfield = { - print3("The field is ", ftos(a.f), "\n"); -}; - -void() funny = { - print("FUNNY\n"); -}; - -void() main = { - local entity pawn; - - pawn = spawn(); - - pawn.mema = 9; - pawn.memv = '1 2 3'; - pawn.memb = 10; - - print3("x = ", ftos(pawn.memv_x), "\n"); - print3("y = ", ftos(pawn.memv_y), "\n"); - print3("z = ", ftos(pawn.memv_z), "\n"); - print3("a = ", ftos(pawn.mema), "\n"); - print3("b = ", ftos(pawn.memb), "\n"); - pawn.memv_y += 3; - print3("x = ", ftos(pawn.memv_x), "\n"); - print3("y = ", ftos(pawn.memv_y), "\n"); - print3("z = ", ftos(pawn.memv_z), "\n"); - printfield(pawn, memv_z); - - pawn.fun = funny; - - pawn.fun(); -}; diff --git a/data/frames.qc b/data/frames.qc deleted file mode 100644 index ab19ad1..0000000 --- a/data/frames.qc +++ /dev/null @@ -1,56 +0,0 @@ -/* this is the WIP test for the parser... - * constantly adding stuff here to see if things break - */ -void(string) print = #1; -void(string,string) print2 = #1; -void(string,string,string) print3 = #1; -string(float) ftos = #2; -entity() spawn = #3; -void(entity) kill = #4; - -$frame stand1 stand2 standX -.float frame; -.float nextthink; -.void() think; - -entity self; -float time; - -// void() stand2; this is auto-prototyped -void() stand1 = [ 0, stand2 ] { - // expands to: - //self.frame = 0; - //self.nextthink = time + 0.1; - //self.think = stand2 - print("In stand 1...\n"); - print3("--> self.frame should be 0, is ", ftos(self.frame), "\n"); -}; - -void() stand2 = [ 1, stand1 ] { - print("In stand 2...\n"); - print3("--> self.frame should be 1, is ", ftos(self.frame), "\n"); -}; - -void() standm = { - local string bar; - bar = ftos(self); - print3("Foo ", ftos(self), "\n"); - self.frame = 0; - self.nextthink = time + 0.1; -}; - -void() main = { - self = spawn(); - - time = 10; - - print("Setting think\n"); - self.think = stand1; - - print("Running think\n"); - standm(); - print("Running from 'self'\n"); - self.think(); - self.think(); - self.think(); -}; diff --git a/data/functions.qc b/data/functions.qc deleted file mode 100644 index f4eb72c..0000000 --- a/data/functions.qc +++ /dev/null @@ -1,43 +0,0 @@ -/* this is the WIP test for the parser... - * constantly adding stuff here to see if things break - */ -void(string) print = #1; -void(string,string) print2 = #1; -void(string,string,string) print3 = #1; -string(float) ftos = #2; -entity() spawn = #3; -void(entity) kill = #4; - -.float vis; -.entity other; - -float(entity targ) visible = { - return targ.vis; -}; - -void() printworking = { - print("Working\n"); -}; - -void(void() callback) testcallback = { - callback(); -}; - -void(float) has1param = {}; - -void() main = { - local entity pawn, pawn2; - - pawn = spawn(); - pawn2 = spawn(); - - pawn.other = pawn2; - pawn.other.vis = 0; - - if (!visible(pawn.other)) - print("Yes\n"); - - testcallback(printworking); - - has1param(); -}; diff --git a/data/include.qc b/data/include.qc deleted file mode 100644 index b1e0568..0000000 --- a/data/include.qc +++ /dev/null @@ -1,5 +0,0 @@ -/* - * all of these includes should work. No matter what the spacing - * is, we rely on it. - */ -#include "test/include2.qc" diff --git a/data/include2.qc b/data/include2.qc deleted file mode 100644 index a75e2d3..0000000 --- a/data/include2.qc +++ /dev/null @@ -1 +0,0 @@ -float foo; diff --git a/data/numbers.qc b/data/numbers.qc deleted file mode 100644 index 6fac97a..0000000 --- a/data/numbers.qc +++ /dev/null @@ -1,22 +0,0 @@ -/* this is the WIP test for the parser... - * constantly adding stuff here to see if things break - */ -void(string) print = #1; -void(string,string) print2 = #1; -void(string,string,string) print3 = #1; -string(float) ftos = #2; - -void() main = { - float a, b, c; - a = 3 + 4 + 5; - b = (5 * 2) + 1; - c = 3 & 1; - c = 1 | 2; - a = 3 && 4; - b = 0 && 4; - c = 4 && 0; - a = 1 || 1; - b = 1 || 0; - c = 0 || 1; - a = 0 || 0; -}; diff --git a/data/parsing.qc b/data/parsing.qc deleted file mode 100644 index 105bb39..0000000 --- a/data/parsing.qc +++ /dev/null @@ -1,77 +0,0 @@ -/* this is the WIP test for the parser... - * constantly adding stuff here to see if things break - */ -void(string,...) print = #1; -string(float) ftos = #2; -entity() spawn = #3; -void(entity) kill = #4; - -.float mema; -.float memb; - -$framevalue 0 -$frame stand1 stand2 standX -$framerestore stand2 -$frame stand3 -$modelname foobar -$modelname foobar3 - -void(string a, ...) hasvaria = { -}; - -void() main = { - entity pawn; - vector vec; - float a; - - vec = '3 4 5'; - vec_z = 5; - - a = 5; - - if (a) { - print("a != 0\n"); - } else { - print("not a\n"); - } - - a = 19; - print("Hello, World\n"); - - pawn = spawn(); - pawn.mema = 3; - pawn.memb = 5; - print(ftos(pawn.mema), "\n"); - print(ftos(pawn.memb), "\n"); - - print("SECOND TEST\n"); - for (a = 0; a < 3; a = a + 1) { - print("LOOP ", ftos(a), "\n"); - } - - print("DO-WHILE test\n"); - a = 2; - do { - print("Foo\n"); - a = a - 1; - } while (a); - - float b; - a = 5; - print("a = ", ftos(a), "\n"); - b = a += 7; - print("adding\n"); - print("a = ", ftos(a), "\n"); - print("b = ", ftos(b), "\n"); - - print("memb = ", ftos(pawn.memb), "\n"); - pawn.memb += -1; - print("memb = ", ftos(pawn.memb), "\n"); - print("Frame stand3 is ", ftos($stand3), " wooh\n"); -}; - -float() exprtest = { - local float x; - x = 3; - return (x); /* parens */ -} diff --git a/data/parth.qc b/data/parth.qc deleted file mode 100644 index 396f25b..0000000 --- a/data/parth.qc +++ /dev/null @@ -1,10 +0,0 @@ -void test_parth() { - if (1) { } - if (2) { } - if (3) { } - if (4) { } - if (5) { } - if (6) { } - if (7) { } - if (8) { } -} diff --git a/data/proto.qc b/data/proto.qc deleted file mode 100644 index a57112c..0000000 --- a/data/proto.qc +++ /dev/null @@ -1,12 +0,0 @@ -void(string) print = #1; - -void() correct; -void(string) incorrect; - -void() correct = { - print("Hello\n"); -} - -void() incorrect = { - printf("The compiler should error about this function having a wrong type\n"); -} diff --git a/data/test.qs b/data/test.qs deleted file mode 100644 index 6ebdf2a..0000000 --- a/data/test.qs +++ /dev/null @@ -1,103 +0,0 @@ -; these are builtin functions -FUNCTION: makevectors, $1 -FUNCTION: setorigin, $2 -FUNCTION: setmodel, $3 -FUNCTION: setsize, $4 - -FUNCTION: break, $6 -FUNCTION: random, $7 -FUNCTION: sound, $8 -FUNCTION: normalize, $9 -FUNCTION: error, $10 -FUNCTION: objerror, $11 -FUNCTION: vlen, $12 -FUNCTION: vectoyaw, $13 -FUNCTION: spawn, $14 -FUNCTION: remove, $15 -FUNCTION: traceline, $16 - -FUNCTION: find, $18 -FUNCTION: precache_sound, $19 -FUNCTION: precache_model, $20 - -FUNCTION: findradius, $22 - -FUNCTION: dprint, $25 -FUNCTION: ftos, $26 -FUNCTION: vtos, $27 -FUNCTION: coredump, $28 -FUNCTION: traceon, $29 -FUNCTION: traceoff, $30 -FUNCTION: eprint, $31 -FUNCTION: walkmove, $32 - -FUNCTION: droptofloor, $34 -FUNCTION: lightstyle, $35 -FUNCTION: rint, $36 -FUNCTION: floor, $37 -FUNCTION: ceil, $38 - -FUNCTION: checkbottom, $40 -FUNCTION: pointcontents, $41 - -FUNCTION: fabs, $43 - -FUNCTION: cvar, $45 -FUNCTION: localcmd, $46 -FUNCTION: nextent, $47 -FUNCTION: particle, $48 -FUNCTION: ChangeYaw, $49 - -FUNCTION: vectoangles, $51 -FUNCTION: vectoangles2, $51 - -FUNCTION: sin, $60 -FUNCTION: cos, $61 -FUNCTION: sqrt, $62 -FUNCTION: changepitch, $63 -FUNCTION: tracetoss, $64 -FUNCTION: etos, $65 - -FUNCTION: precache_file, $68 -FUNCTION: makestatic, $69 - -FUNCTION: cvar_set, $72 - -FUNCTION: ambientsound, $74 -FUNCTION: precache_model2,$75 -FUNCTION: precache_sound2,$76 -FUNCTION: precache_file2, $77 - -FUNCTION: stof, $81 - -FUNCTION: tracebox, $90 -FUNCTION: randomvec, $91 -FUNCTION: getlight, $92 -FUNCTION: getlight2, $92 -FUNCTION: registercvar, $93 -FUNCTION: min, $94 -FUNCTION: max, $95 -FUNCTION: bound, $96 -FUNCTION: pow, $97 -FUNCTION: findfloat, $98 -FUNCTION: checkextension, $99 - -FUNCTION: test #0 - FLOAT: x, 100 - FLOAT: y, 200 - - FLOAT: r_mul - FLOAT: r_div - FLOAT: r_add - FLOAT: r_sub - - MUL_V x,y,r_mul - DIV_V x,y,r_div - ADD_V x,y,r_add - SUV_V x,y,r_sub - - STORE_V r_mul - CALL0 dprint - - STORE_V -END diff --git a/data/typedef.qc b/data/typedef.qc deleted file mode 100644 index f60bf77..0000000 --- a/data/typedef.qc +++ /dev/null @@ -1,11 +0,0 @@ -typedef float my_float; -typedef vector my_vector; -typedef string my_string; -typedef entity my_entity; -typedef void my_void; - -my_float type_float; -my_vector type_vector; -my_string type_string; -my_entity type_entity; -my_void type_void; diff --git a/data/types.qc b/data/types.qc deleted file mode 100644 index 814ce11..0000000 --- a/data/types.qc +++ /dev/null @@ -1,5 +0,0 @@ -float typef; -vector typev; -string types; -entity typee; -void typev; diff --git a/data/uninit.qc b/data/uninit.qc deleted file mode 100644 index d161d83..0000000 --- a/data/uninit.qc +++ /dev/null @@ -1,19 +0,0 @@ -void(string) print = #1; -void(float) ftos = #2; -void() main = { - local float uninit, unused, setonly; - local vector invec; - print("foo\n"); - - setonly = 3; - invec = '1 2 3'; - - if (0) - uninit = 3; - ftos(uninit); - ftos(invec_x); -}; - -void(float par) partest = { - ftos(par); -}; diff --git a/data/vars.qc b/data/vars.qc deleted file mode 100644 index 55b4ce2..0000000 --- a/data/vars.qc +++ /dev/null @@ -1,43 +0,0 @@ -/* this is the WIP test for the parser... - * constantly adding stuff here to see if things break - */ -void(string) print = #1; -void(string,string) print2 = #1; -void(string,string,string) print3 = #1; -string(float) ftos = #2; -entity() spawn = #3; -void(entity) kill = #4; - -float multi, decla, ration; -.vector memvec; - -.void(string x) printit; - -float(vector different_name, vector b) dot; - -float(vector a, vector b) dot = { - return a * b; -}; - -void(string x) myprintit = { - print3("-> ", x, "\n"); -}; - -void(vector par) vecpar = { - // vector-parameters need _x, _y, _z as well - print3("par_y should be 5... = ", ftos(par_y), "\n"); -}; - -void() main = { - local entity pawn; - local vector foovec; - print3("should be 1: ", ftos(dot('1 1 0', '1 0 0')), "\n"); - - foovec = '3 4 5'; - foovec_y = 9; - pawn = spawn(); - pawn.printit = myprintit; - pawn.printit("Hello"); - - vecpar('1 5 9'); -}; diff --git a/data/vector.qc b/data/vector.qc deleted file mode 100644 index 6fe0418..0000000 --- a/data/vector.qc +++ /dev/null @@ -1,10 +0,0 @@ -vector vec1 = {-0 +0 0 }; -vector vec2 = {.0 .0 .0 }; -vector vec3 = {-.0 +.0 +0.1 }; -vector vec4 = {1.1 2.2 3.3 }; -vector vec5 = {2. 3. 4. }; -vector vec6 = {-2. +3. -4. }; -/* - * These are just comments: Ideally there is still some broken things - * for the vector yet. which sort of sucks. - */ -- 2.39.2