]> de.git.xonotic.org Git - xonotic/gmqcc.git/blob - tests/vector-init.qc
moving -Olocal-temps to -O4 until the issues are solved
[xonotic/gmqcc.git] / tests / vector-init.qc
1 void   print(...)    = #1;
2 string ftos (float)  = #2;
3 string vtos (vector) = #5;
4
5 void main() {
6     vector v;
7
8     //v_x = 0;
9     //v_y = 0;
10     //v_z = 0;
11 #ifdef INIT_BY_VECTOR
12     v = '3 4 5';
13 #elifdef INIT_BY_COMPONENTS
14     v_x = 3;
15     v_y = 4;
16     v_z = 5;
17 #elifdef INIT_PARTS
18     v_z = 5;
19 #endif
20
21     print(ftos(v_y), "\n");
22     print(ftos(v_x), "\n");
23     print(ftos(v_z), "\n");
24     print(vtos(v), "\n");
25 }