Folder restructure

This commit is contained in:
Peter Slattery 2019-10-30 07:28:02 -07:00
parent e998d86dd9
commit e9e89b8f3d
80 changed files with 4554 additions and 468 deletions

3
clear_build.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
rm build/foldhaus.*
rm build/win32_foldhaus.*

BIN
custom_4coder.dll Normal file

Binary file not shown.

BIN
custom_4coder.pdb Normal file

Binary file not shown.

BIN
data/Anonymous Pro.ttf Normal file

Binary file not shown.

BIN
data/CircularStd-Book.otf Normal file

Binary file not shown.

BIN
data/Gotham-Light.otf Normal file

Binary file not shown.

5
data/leaderboard.data Normal file
View File

@ -0,0 +1,5 @@
Peter : 10000
Andrew : 2500
Kim : 2000
Felicia : 1000
Skye : 200

BIN
data/main.exe Normal file

Binary file not shown.

338
data/radia_old.fold Normal file
View File

@ -0,0 +1,338 @@
{
neighbors: [16, 14, 12, 13, 15];
ip: 192.168.1.200;
x: 0;
y: 0.525731086730957;
z: 0.8506507873535156;
id: 0;
};
{
neighbors: [20, 17, 12, 18, 19];
ip: 192.168.1.201;
x: 0;
y: -0.525731086730957;
z: 0.8506507873535156;
id: 1;
};
{
neighbors: [24, 22, 21, 23, 25];
ip: 192.168.1.202;
x: 0;
y: -0.525731086730957;
z: -0.8506507873535156;
id: 2;
};
{
neighbors: [28, 27, 21, 26, 29];
ip: 192.168.1.203;
x: 0;
y: 0.525731086730957;
z: -0.8506507873535156;
id: 3;
};
{
neighbors: [31, 13, 17, 32, 30];
ip: 192.168.1.204;
x: 0.8506507873535156;
y: 0;
z: 0.525731086730957;
id: 4;
};
{
neighbors: [14, 34, 33, 35, 18];
ip: 192.168.1.205;
x: -0.8506507873535156;
y: 0;
z: 0.525731086730957;
id: 5;
};
{
neighbors: [36, 26, 22, 37, 33];
ip: 192.168.1.206;
x: -0.8506507873535156;
y: 0;
z: -0.525731086730957;
id: 6;
};
{
neighbors: [30, 39, 23, 27, 38];
ip: 192.168.1.207;
x: 0.8506507873535156;
y: 0;
z: -0.525731086730957;
id: 7;
};
{
neighbors: [38, 28, 40, 15, 31];
ip: 192.168.1.208;
x: 0.525731086730957;
y: 0.8506507873535156;
z: 0;
id: 8;
};
{
neighbors: [36, 34, 16, 40, 29];
ip: 192.168.1.209;
x: -0.525731086730957;
y: 0.8506507873535156;
z: 0;
id: 9;
};
{
neighbors: [35, 37, 24, 41, 19];
ip: 192.168.1.210;
x: -0.525731086730957;
y: -0.8506507873535156;
z: 0;
id: 10;
};
{
neighbors: [32, 20, 41, 25, 39];
ip: 192.168.1.211;
x: 0.525731086730957;
y: -0.8506507873535156;
z: 0;
id: 11;
};
{
neighbors: [0, 14, 18, 1, 17, 13];
ip: 192.168.1.212;
x: 0;
y: 0;
z: 1;
id: 12;
};
{
neighbors: [4, 31, 15, 0, 12, 17];
ip: 192.168.1.213;
x: 0.5;
y: 0.30901700258255005;
z: 0.80901700258255;
id: 13;
};
{
neighbors: [0, 16, 34, 5, 18, 12];
ip: 192.168.1.214;
x: -0.5;
y: 0.30901700258255005;
z: 0.80901700258255;
id: 14;
};
{
neighbors: [8, 40, 16, 0, 13, 31];
ip: 192.168.1.215;
x: 0.30901700258255005;
y: 0.80901700258255;
z: 0.5;
id: 15;
};
{
neighbors: [9, 34, 14, 0, 15, 40];
ip: 192.168.1.216;
x: -0.30901700258255005;
y: 0.80901700258255;
z: 0.5;
id: 16;
};
{
neighbors: [4, 13, 12, 1, 20, 32];
ip: 192.168.1.217;
x: 0.5;
y: -0.30901700258255005;
z: 0.80901700258255;
id: 17;
};
{
neighbors: [5, 35, 19, 1, 12, 14];
ip: 192.168.1.218;
x: -0.5;
y: -0.30901700258255005;
z: 0.80901700258255;
id: 18;
};
{
neighbors: [1, 18, 35, 10, 41, 20];
ip: 192.168.1.219;
x: -0.30901700258255005;
y: -0.80901700258255;
z: 0.5;
id: 19;
};
{
neighbors: [11, 32, 17, 1, 19, 41];
ip: 192.168.1.220;
x: 0.30901700258255005;
y: -0.80901700258255;
z: 0.5;
id: 20;
};
{
neighbors: [3, 27, 23, 2, 22, 26];
ip: 192.168.1.221;
x: 0;
y: 0;
z: -1;
id: 21;
};
{
neighbors: [6, 26, 21, 2, 24, 37];
ip: 192.168.1.222;
x: -0.5;
y: -0.30901700258255005;
z: -0.80901700258255;
id: 22;
};
{
neighbors: [7, 39, 25, 2, 21, 27];
ip: 192.168.1.223;
x: 0.5;
y: -0.30901700258255005;
z: -0.80901700258255;
id: 23;
};
{
neighbors: [10, 37, 22, 2, 25, 41];
ip: 192.168.1.224;
x: -0.30901700258255005;
y: -0.80901700258255;
z: -0.5;
id: 24;
};
{
neighbors: [11, 41, 24, 2, 23, 39];
ip: 192.168.1.225;
x: 0.30901700258255005;
y: -0.80901700258255;
z: -0.5;
id: 25;
};
{
neighbors: [3, 21, 22, 6, 36, 29];
ip: 192.168.1.226;
x: -0.5;
y: 0.30901700258255005;
z: -0.80901700258255;
id: 26;
};
{
neighbors: [3, 28, 38, 7, 23, 21];
ip: 192.168.1.227;
x: 0.5;
y: 0.30901700258255005;
z: -0.80901700258255;
id: 27;
};
{
neighbors: [8, 38, 27, 3, 29, 40];
ip: 192.168.1.228;
x: 0.30901700258255005;
y: 0.80901700258255;
z: -0.5;
id: 28;
};
{
neighbors: [9, 40, 28, 3, 26, 36];
ip: 192.168.1.229;
x: -0.30901700258255005;
y: 0.80901700258255;
z: -0.5;
id: 29;
};
{
neighbors: [7, 38, 31, 4, 32, 39];
ip: 192.168.1.230;
x: 1;
y: 0;
z: 0;
id: 30;
};
{
neighbors: [8, 15, 13, 4, 30, 38];
ip: 192.168.1.231;
x: 0.80901700258255;
y: 0.5;
z: 0.30901700258255005;
id: 31;
};
{
neighbors: [11, 39, 30, 4, 17, 20];
ip: 192.168.1.232;
x: 0.80901700258255;
y: -0.5;
z: 0.30901700258255005;
id: 32;
};
{
neighbors: [5, 34, 36, 6, 37, 35];
ip: 192.168.1.233;
x: -1;
y: 0;
z: 0;
id: 33;
};
{
neighbors: [5, 14, 16, 9, 36, 33];
ip: 192.168.1.234;
x: -0.80901700258255;
y: 0.5;
z: 0.30901700258255005;
id: 34;
};
{
neighbors: [5, 33, 37, 10, 19, 18];
ip: 192.168.1.235;
x: -0.80901700258255;
y: -0.5;
z: 0.30901700258255005;
id: 35;
};
{
neighbors: [9, 29, 26, 6, 33, 34];
ip: 192.168.1.236;
x: -0.80901700258255;
y: 0.5;
z: -0.30901700258255005;
id: 36;
};
{
neighbors: [10, 35, 33, 6, 22, 24];
ip: 192.168.1.237;
x: -0.80901700258255;
y: -0.5;
z: -0.30901700258255005;
id: 37;
};
{
neighbors: [8, 31, 30, 7, 27, 28];
ip: 192.168.1.238;
x: 0.80901700258255;
y: 0.5;
z: -0.30901700258255005;
id: 38;
};
{
neighbors: [11, 25, 23, 7, 30, 32];
ip: 192.168.1.239;
x: 0.80901700258255;
y: -0.5;
z: -0.30901700258255005;
id: 39;
};
{
neighbors: [8, 28, 29, 9, 16, 15];
ip: 192.168.1.240;
x: 0;
y: 1;
z: 0;
id: 40;
};
{
neighbors: [11, 20, 19, 10, 24, 25];
ip: 192.168.1.241;
x: 0;
y: -1;
z: 0;
id: 41;
};
EOF

408
data/radialumia.fold Normal file
View File

@ -0,0 +1,408 @@
led_strip_count 406
led_strip { 0, 0, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, 0.850651), (-0.309017, 0.809017, 0.500000), 144 }
led_strip { 0, 1, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, 0.850651), (-0.500000, 0.309017, 0.809017), 144 }
led_strip { 0, 2, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, 0.850651), (0.000000, 0.000000, 1.000000), 144 }
led_strip { 0, 3, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, 0.850651), (0.500000, 0.309017, 0.809017), 144 }
led_strip { 0, 4, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, 0.850651), (0.309017, 0.809017, 0.500000), 144 }
led_strip { 1, 25, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, 0.850651), (0.309017, -0.809017, 0.500000), 144 }
led_strip { 1, 26, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, 0.850651), (0.500000, -0.309017, 0.809017), 144 }
led_strip { 1, 27, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, 0.850651), (0.000000, 0.000000, 1.000000), 144 }
led_strip { 1, 28, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, 0.850651), (-0.500000, -0.309017, 0.809017), 144 }
led_strip { 1, 29, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, 0.850651), (-0.309017, -0.809017, 0.500000), 144 }
led_strip { 2, 50, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, -0.850651), (-0.309017, -0.809017, -0.500000), 144 }
led_strip { 2, 51, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, -0.850651), (-0.500000, -0.309017, -0.809017), 144 }
led_strip { 2, 52, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, -0.850651), (0.000000, 0.000000, -1.000000), 144 }
led_strip { 2, 53, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, -0.850651), (0.500000, -0.309017, -0.809017), 144 }
led_strip { 2, 54, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, -0.850651), (0.309017, -0.809017, -0.500000), 144 }
led_strip { 3, 75, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, -0.850651), (0.309017, 0.809017, -0.500000), 144 }
led_strip { 3, 76, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, -0.850651), (0.500000, 0.309017, -0.809017), 144 }
led_strip { 3, 77, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, -0.850651), (0.000000, 0.000000, -1.000000), 144 }
led_strip { 3, 78, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, -0.850651), (-0.500000, 0.309017, -0.809017), 144 }
led_strip { 3, 79, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, -0.850651), (-0.309017, 0.809017, -0.500000), 144 }
led_strip { 4, 100, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, 0.525731), (0.809017, 0.500000, 0.309017), 144 }
led_strip { 4, 101, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, 0.525731), (0.500000, 0.309017, 0.809017), 144 }
led_strip { 4, 102, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, 0.525731), (0.500000, -0.309017, 0.809017), 144 }
led_strip { 4, 103, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, 0.525731), (0.809017, -0.500000, 0.309017), 144 }
led_strip { 4, 104, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, 0.525731), (1.000000, 0.000000, 0.000000), 144 }
led_strip { 5, 125, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, 0.525731), (-0.500000, 0.309017, 0.809017), 144 }
led_strip { 5, 126, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, 0.525731), (-0.809017, 0.500000, 0.309017), 144 }
led_strip { 5, 127, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, 0.525731), (-1.000000, 0.000000, 0.000000), 144 }
led_strip { 5, 128, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, 0.525731), (-0.809017, -0.500000, 0.309017), 144 }
led_strip { 5, 129, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, 0.525731), (-0.500000, -0.309017, 0.809017), 144 }
led_strip { 6, 150, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, -0.525731), (-0.809017, 0.500000, -0.309017), 144 }
led_strip { 6, 151, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, -0.525731), (-0.500000, 0.309017, -0.809017), 144 }
led_strip { 6, 152, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, -0.525731), (-0.500000, -0.309017, -0.809017), 144 }
led_strip { 6, 153, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, -0.525731), (-0.809017, -0.500000, -0.309017), 144 }
led_strip { 6, 154, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, -0.525731), (-1.000000, 0.000000, 0.000000), 144 }
led_strip { 7, 175, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, -0.525731), (1.000000, 0.000000, 0.000000), 144 }
led_strip { 7, 176, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, -0.525731), (0.809017, -0.500000, -0.309017), 144 }
led_strip { 7, 177, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, -0.525731), (0.500000, -0.309017, -0.809017), 144 }
led_strip { 7, 178, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, -0.525731), (0.500000, 0.309017, -0.809017), 144 }
led_strip { 7, 179, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, -0.525731), (0.809017, 0.500000, -0.309017), 144 }
led_strip { 8, 200, 0, INTERPOLATE_POINTS, (0.525731, 0.850651, 0.000000), (0.809017, 0.500000, -0.309017), 144 }
led_strip { 8, 201, 0, INTERPOLATE_POINTS, (0.525731, 0.850651, 0.000000), (0.309017, 0.809017, -0.500000), 144 }
led_strip { 8, 202, 0, INTERPOLATE_POINTS, (0.525731, 0.850651, 0.000000), (0.000000, 1.000000, 0.000000), 144 }
led_strip { 8, 203, 0, INTERPOLATE_POINTS, (0.525731, 0.850651, 0.000000), (0.309017, 0.809017, 0.500000), 144 }
led_strip { 8, 204, 0, INTERPOLATE_POINTS, (0.525731, 0.850651, 0.000000), (0.809017, 0.500000, 0.309017), 144 }
led_strip { 9, 225, 0, INTERPOLATE_POINTS, (-0.525731, 0.850651, 0.000000), (-0.809017, 0.500000, -0.309017), 144 }
led_strip { 9, 226, 0, INTERPOLATE_POINTS, (-0.525731, 0.850651, 0.000000), (-0.809017, 0.500000, 0.309017), 144 }
led_strip { 9, 227, 0, INTERPOLATE_POINTS, (-0.525731, 0.850651, 0.000000), (-0.309017, 0.809017, 0.500000), 144 }
led_strip { 9, 228, 0, INTERPOLATE_POINTS, (-0.525731, 0.850651, 0.000000), (0.000000, 1.000000, 0.000000), 144 }
led_strip { 9, 229, 0, INTERPOLATE_POINTS, (-0.525731, 0.850651, 0.000000), (-0.309017, 0.809017, -0.500000), 144 }
led_strip { 10, 250, 0, INTERPOLATE_POINTS, (-0.525731, -0.850651, 0.000000), (-0.809017, -0.500000, 0.309017), 144 }
led_strip { 10, 251, 0, INTERPOLATE_POINTS, (-0.525731, -0.850651, 0.000000), (-0.809017, -0.500000, -0.309017), 144 }
led_strip { 10, 252, 0, INTERPOLATE_POINTS, (-0.525731, -0.850651, 0.000000), (-0.309017, -0.809017, -0.500000), 144 }
led_strip { 10, 253, 0, INTERPOLATE_POINTS, (-0.525731, -0.850651, 0.000000), (0.000000, -1.000000, 0.000000), 144 }
led_strip { 10, 254, 0, INTERPOLATE_POINTS, (-0.525731, -0.850651, 0.000000), (-0.309017, -0.809017, 0.500000), 144 }
led_strip { 11, 275, 0, INTERPOLATE_POINTS, (0.525731, -0.850651, 0.000000), (0.809017, -0.500000, 0.309017), 144 }
led_strip { 11, 276, 0, INTERPOLATE_POINTS, (0.525731, -0.850651, 0.000000), (0.309017, -0.809017, 0.500000), 144 }
led_strip { 11, 277, 0, INTERPOLATE_POINTS, (0.525731, -0.850651, 0.000000), (0.000000, -1.000000, 0.000000), 144 }
led_strip { 11, 278, 0, INTERPOLATE_POINTS, (0.525731, -0.850651, 0.000000), (0.309017, -0.809017, -0.500000), 144 }
led_strip { 11, 279, 0, INTERPOLATE_POINTS, (0.525731, -0.850651, 0.000000), (0.809017, -0.500000, -0.309017), 144 }
led_strip { 12, 300, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, 1.000000), (0.000000, 0.525731, 0.850651), 144 }
led_strip { 12, 301, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, 1.000000), (-0.500000, 0.309017, 0.809017), 144 }
led_strip { 12, 302, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, 1.000000), (-0.500000, -0.309017, 0.809017), 144 }
led_strip { 12, 303, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, 1.000000), (0.000000, -0.525731, 0.850651), 144 }
led_strip { 12, 304, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, 1.000000), (0.500000, -0.309017, 0.809017), 144 }
led_strip { 12, 305, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, 1.000000), (0.500000, 0.309017, 0.809017), 144 }
led_strip { 13, 325, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, 0.809017), (0.850651, 0.000000, 0.525731), 144 }
led_strip { 13, 326, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, 0.809017), (0.809017, 0.500000, 0.309017), 144 }
led_strip { 13, 327, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, 0.809017), (0.309017, 0.809017, 0.500000), 144 }
led_strip { 13, 328, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, 0.809017), (0.000000, 0.525731, 0.850651), 144 }
led_strip { 13, 329, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, 0.809017), (0.000000, 0.000000, 1.000000), 144 }
led_strip { 13, 330, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, 0.809017), (0.500000, -0.309017, 0.809017), 144 }
led_strip { 14, 350, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, 0.809017), (0.000000, 0.525731, 0.850651), 144 }
led_strip { 14, 351, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, 0.809017), (-0.309017, 0.809017, 0.500000), 144 }
led_strip { 14, 352, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, 0.809017), (-0.809017, 0.500000, 0.309017), 144 }
led_strip { 14, 353, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, 0.809017), (-0.850651, 0.000000, 0.525731), 144 }
led_strip { 14, 354, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, 0.809017), (-0.500000, -0.309017, 0.809017), 144 }
led_strip { 14, 355, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, 0.809017), (0.000000, 0.000000, 1.000000), 144 }
led_strip { 15, 375, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, 0.500000), (0.525731, 0.850651, 0.000000), 144 }
led_strip { 15, 376, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, 0.500000), (0.000000, 1.000000, 0.000000), 144 }
led_strip { 15, 377, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, 0.500000), (-0.309017, 0.809017, 0.500000), 144 }
led_strip { 15, 378, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, 0.500000), (0.000000, 0.525731, 0.850651), 144 }
led_strip { 15, 379, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, 0.500000), (0.500000, 0.309017, 0.809017), 144 }
led_strip { 15, 380, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, 0.500000), (0.809017, 0.500000, 0.309017), 144 }
led_strip { 16, 400, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, 0.500000), (-0.525731, 0.850651, 0.000000), 144 }
led_strip { 16, 401, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, 0.500000), (-0.809017, 0.500000, 0.309017), 144 }
led_strip { 16, 402, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, 0.500000), (-0.500000, 0.309017, 0.809017), 144 }
led_strip { 16, 403, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, 0.500000), (0.000000, 0.525731, 0.850651), 144 }
led_strip { 16, 404, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, 0.500000), (0.309017, 0.809017, 0.500000), 144 }
led_strip { 16, 405, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, 0.500000), (0.000000, 1.000000, 0.000000), 144 }
led_strip { 17, 425, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, 0.809017), (0.850651, 0.000000, 0.525731), 144 }
led_strip { 17, 426, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, 0.809017), (0.500000, 0.309017, 0.809017), 144 }
led_strip { 17, 427, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, 0.809017), (0.000000, 0.000000, 1.000000), 144 }
led_strip { 17, 428, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, 0.809017), (0.000000, -0.525731, 0.850651), 144 }
led_strip { 17, 429, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, 0.809017), (0.309017, -0.809017, 0.500000), 144 }
led_strip { 17, 430, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, 0.809017), (0.809017, -0.500000, 0.309017), 144 }
led_strip { 18, 450, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, 0.809017), (-0.850651, 0.000000, 0.525731), 144 }
led_strip { 18, 451, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, 0.809017), (-0.809017, -0.500000, 0.309017), 144 }
led_strip { 18, 452, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, 0.809017), (-0.309017, -0.809017, 0.500000), 144 }
led_strip { 18, 453, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, 0.809017), (0.000000, -0.525731, 0.850651), 144 }
led_strip { 18, 454, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, 0.809017), (0.000000, 0.000000, 1.000000), 144 }
led_strip { 18, 455, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, 0.809017), (-0.500000, 0.309017, 0.809017), 144 }
led_strip { 19, 475, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, 0.500000), (0.000000, -0.525731, 0.850651), 144 }
led_strip { 19, 476, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, 0.500000), (-0.500000, -0.309017, 0.809017), 144 }
led_strip { 19, 477, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, 0.500000), (-0.809017, -0.500000, 0.309017), 144 }
led_strip { 19, 478, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, 0.500000), (-0.525731, -0.850651, 0.000000), 144 }
led_strip { 19, 479, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, 0.500000), (0.000000, -1.000000, 0.000000), 144 }
led_strip { 19, 480, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, 0.500000), (0.309017, -0.809017, 0.500000), 144 }
led_strip { 20, 500, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, 0.500000), (0.525731, -0.850651, 0.000000), 144 }
led_strip { 20, 501, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, 0.500000), (0.809017, -0.500000, 0.309017), 144 }
led_strip { 20, 502, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, 0.500000), (0.500000, -0.309017, 0.809017), 144 }
led_strip { 20, 503, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, 0.500000), (0.000000, -0.525731, 0.850651), 144 }
led_strip { 20, 504, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, 0.500000), (-0.309017, -0.809017, 0.500000), 144 }
led_strip { 20, 505, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, 0.500000), (0.000000, -1.000000, 0.000000), 144 }
led_strip { 21, 525, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, -1.000000), (0.000000, 0.525731, -0.850651), 144 }
led_strip { 21, 526, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, -1.000000), (0.500000, 0.309017, -0.809017), 144 }
led_strip { 21, 527, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, -1.000000), (0.500000, -0.309017, -0.809017), 144 }
led_strip { 21, 528, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, -1.000000), (0.000000, -0.525731, -0.850651), 144 }
led_strip { 21, 529, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, -1.000000), (-0.500000, -0.309017, -0.809017), 144 }
led_strip { 21, 530, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, -1.000000), (-0.500000, 0.309017, -0.809017), 144 }
led_strip { 22, 550, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, -0.809017), (-0.850651, 0.000000, -0.525731), 144 }
led_strip { 22, 551, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, -0.809017), (-0.500000, 0.309017, -0.809017), 144 }
led_strip { 22, 552, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, -0.809017), (0.000000, 0.000000, -1.000000), 144 }
led_strip { 22, 553, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, -0.809017), (0.000000, -0.525731, -0.850651), 144 }
led_strip { 22, 554, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, -0.809017), (-0.309017, -0.809017, -0.500000), 144 }
led_strip { 22, 555, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, -0.809017), (-0.809017, -0.500000, -0.309017), 144 }
led_strip { 23, 575, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, -0.809017), (0.850651, 0.000000, -0.525731), 144 }
led_strip { 23, 576, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, -0.809017), (0.809017, -0.500000, -0.309017), 144 }
led_strip { 23, 577, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, -0.809017), (0.309017, -0.809017, -0.500000), 144 }
led_strip { 23, 578, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, -0.809017), (0.000000, -0.525731, -0.850651), 144 }
led_strip { 23, 579, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, -0.809017), (0.000000, 0.000000, -1.000000), 144 }
led_strip { 23, 580, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, -0.809017), (0.500000, 0.309017, -0.809017), 144 }
led_strip { 24, 600, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, -0.500000), (-0.525731, -0.850651, 0.000000), 144 }
led_strip { 24, 601, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, -0.500000), (-0.809017, -0.500000, -0.309017), 144 }
led_strip { 24, 602, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, -0.500000), (-0.500000, -0.309017, -0.809017), 144 }
led_strip { 24, 603, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, -0.500000), (0.000000, -0.525731, -0.850651), 144 }
led_strip { 24, 604, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, -0.500000), (0.309017, -0.809017, -0.500000), 144 }
led_strip { 24, 605, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, -0.500000), (0.000000, -1.000000, 0.000000), 144 }
led_strip { 25, 625, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, -0.500000), (0.525731, -0.850651, 0.000000), 144 }
led_strip { 25, 626, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, -0.500000), (0.000000, -1.000000, 0.000000), 144 }
led_strip { 25, 627, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, -0.500000), (-0.309017, -0.809017, -0.500000), 144 }
led_strip { 25, 628, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, -0.500000), (0.000000, -0.525731, -0.850651), 144 }
led_strip { 25, 629, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, -0.500000), (0.500000, -0.309017, -0.809017), 144 }
led_strip { 25, 630, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, -0.500000), (0.809017, -0.500000, -0.309017), 144 }
led_strip { 26, 650, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, -0.809017), (0.000000, 0.525731, -0.850651), 144 }
led_strip { 26, 651, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, -0.809017), (0.000000, 0.000000, -1.000000), 144 }
led_strip { 26, 652, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, -0.809017), (-0.500000, -0.309017, -0.809017), 144 }
led_strip { 26, 653, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, -0.809017), (-0.850651, 0.000000, -0.525731), 144 }
led_strip { 26, 654, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, -0.809017), (-0.809017, 0.500000, -0.309017), 144 }
led_strip { 26, 655, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, -0.809017), (-0.309017, 0.809017, -0.500000), 144 }
led_strip { 27, 675, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, -0.809017), (0.000000, 0.525731, -0.850651), 144 }
led_strip { 27, 676, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, -0.809017), (0.309017, 0.809017, -0.500000), 144 }
led_strip { 27, 677, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, -0.809017), (0.809017, 0.500000, -0.309017), 144 }
led_strip { 27, 678, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, -0.809017), (0.850651, 0.000000, -0.525731), 144 }
led_strip { 27, 679, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, -0.809017), (0.500000, -0.309017, -0.809017), 144 }
led_strip { 27, 680, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, -0.809017), (0.000000, 0.000000, -1.000000), 144 }
led_strip { 28, 700, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, -0.500000), (0.525731, 0.850651, 0.000000), 144 }
led_strip { 28, 701, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, -0.500000), (0.809017, 0.500000, -0.309017), 144 }
led_strip { 28, 702, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, -0.500000), (0.500000, 0.309017, -0.809017), 144 }
led_strip { 28, 703, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, -0.500000), (0.000000, 0.525731, -0.850651), 144 }
led_strip { 28, 704, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, -0.500000), (-0.309017, 0.809017, -0.500000), 144 }
led_strip { 28, 705, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, -0.500000), (0.000000, 1.000000, 0.000000), 144 }
led_strip { 29, 725, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, -0.500000), (-0.525731, 0.850651, 0.000000), 144 }
led_strip { 29, 726, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, -0.500000), (0.000000, 1.000000, 0.000000), 144 }
led_strip { 29, 727, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, -0.500000), (0.309017, 0.809017, -0.500000), 144 }
led_strip { 29, 728, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, -0.500000), (0.000000, 0.525731, -0.850651), 144 }
led_strip { 29, 729, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, -0.500000), (-0.500000, 0.309017, -0.809017), 144 }
led_strip { 29, 730, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, -0.500000), (-0.809017, 0.500000, -0.309017), 144 }
led_strip { 30, 750, 0, INTERPOLATE_POINTS, (1.000000, 0.000000, 0.000000), (0.850651, 0.000000, -0.525731), 144 }
led_strip { 30, 751, 0, INTERPOLATE_POINTS, (1.000000, 0.000000, 0.000000), (0.809017, 0.500000, -0.309017), 144 }
led_strip { 30, 752, 0, INTERPOLATE_POINTS, (1.000000, 0.000000, 0.000000), (0.809017, 0.500000, 0.309017), 144 }
led_strip { 30, 753, 0, INTERPOLATE_POINTS, (1.000000, 0.000000, 0.000000), (0.850651, 0.000000, 0.525731), 144 }
led_strip { 30, 754, 0, INTERPOLATE_POINTS, (1.000000, 0.000000, 0.000000), (0.809017, -0.500000, 0.309017), 144 }
led_strip { 30, 755, 0, INTERPOLATE_POINTS, (1.000000, 0.000000, 0.000000), (0.809017, -0.500000, -0.309017), 144 }
led_strip { 31, 775, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, 0.309017), (0.525731, 0.850651, 0.000000), 144 }
led_strip { 31, 776, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, 0.309017), (0.309017, 0.809017, 0.500000), 144 }
led_strip { 31, 777, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, 0.309017), (0.500000, 0.309017, 0.809017), 144 }
led_strip { 31, 778, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, 0.309017), (0.850651, 0.000000, 0.525731), 144 }
led_strip { 31, 779, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, 0.309017), (1.000000, 0.000000, 0.000000), 144 }
led_strip { 31, 780, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, 0.309017), (0.809017, 0.500000, -0.309017), 144 }
led_strip { 32, 800, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.309017), (0.525731, -0.850651, 0.000000), 144 }
led_strip { 32, 801, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.309017), (0.809017, -0.500000, -0.309017), 144 }
led_strip { 32, 802, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.309017), (1.000000, 0.000000, 0.000000), 144 }
led_strip { 32, 803, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.309017), (0.850651, 0.000000, 0.525731), 144 }
led_strip { 32, 804, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.309017), (0.500000, -0.309017, 0.809017), 144 }
led_strip { 32, 805, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.309017), (0.309017, -0.809017, 0.500000), 144 }
led_strip { 33, 825, 0, INTERPOLATE_POINTS, (-1.000000, 0.000000, 0.000000), (-0.850651, 0.000000, 0.525731), 144 }
led_strip { 33, 826, 0, INTERPOLATE_POINTS, (-1.000000, 0.000000, 0.000000), (-0.809017, 0.500000, 0.309017), 144 }
led_strip { 33, 827, 0, INTERPOLATE_POINTS, (-1.000000, 0.000000, 0.000000), (-0.809017, 0.500000, -0.309017), 144 } led_strip { 33, 829, 0, INTERPOLATE_POINTS, (-1.000000, 0.000000, 0.000000), (-0.809017, -0.500000, -0.309017), 144 }
led_strip { 33, 830, 0, INTERPOLATE_POINTS, (-1.000000, 0.000000, 0.000000), (-0.809017, -0.500000, 0.309017), 144 }
led_strip { 34, 850, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, 0.309017), (-0.850651, 0.000000, 0.525731), 144 }
led_strip { 34, 851, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, 0.309017), (-0.500000, 0.309017, 0.809017), 144 }
led_strip { 34, 852, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, 0.309017), (-0.309017, 0.809017, 0.500000), 144 }
led_strip { 34, 853, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, 0.309017), (-0.525731, 0.850651, 0.000000), 144 }
led_strip { 34, 854, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, 0.309017), (-0.809017, 0.500000, -0.309017), 144 }
led_strip { 34, 855, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, 0.309017), (-1.000000, 0.000000, 0.000000), 144 }
led_strip { 35, 875, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, 0.309017), (-0.850651, 0.000000, 0.525731), 144 }
led_strip { 35, 876, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, 0.309017), (-1.000000, 0.000000, 0.000000), 144 }
led_strip { 35, 877, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, 0.309017), (-0.809017, -0.500000, -0.309017), 144 }
led_strip { 35, 878, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, 0.309017), (-0.525731, -0.850651, 0.000000), 144 }
led_strip { 35, 879, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, 0.309017), (-0.309017, -0.809017, 0.500000), 144 } led_strip { 36, 900, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, -0.309017), (-0.525731, 0.850651, 0.000000), 144 }
led_strip { 36, 901, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, -0.309017), (-0.309017, 0.809017, -0.500000), 144 }
led_strip { 36, 902, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, -0.309017), (-0.500000, 0.309017, -0.809017), 144 }
led_strip { 36, 903, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, -0.309017), (-0.850651, 0.000000, -0.525731), 144 }
led_strip { 36, 904, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, -0.309017), (-1.000000, 0.000000, 0.000000), 144 }
led_strip { 36, 905, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, -0.309017), (-0.809017, 0.500000, 0.309017), 144 }
led_strip { 37, 925, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.309017), (-0.525731, -0.850651, 0.000000), 144 }
led_strip { 37, 926, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.309017), (-0.809017, -0.500000, 0.309017), 144 }
led_strip { 37, 927, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.309017), (-1.000000, 0.000000, 0.000000), 144 }
led_strip { 37, 928, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.309017), (-0.850651, 0.000000, -0.525731), 144 }
led_strip { 37, 929, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.309017), (-0.500000, -0.309017, -0.809017), 144 }
led_strip { 37, 930, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.309017), (-0.309017, -0.809017, -0.500000), 144 }
led_strip { 38, 950, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.309017), (0.525731, 0.850651, 0.000000), 144 }
led_strip { 38, 951, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.309017), (0.809017, 0.500000, 0.309017), 144 }
led_strip { 38, 952, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.309017), (1.000000, 0.000000, 0.000000), 144 }
led_strip { 38, 953, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.309017), (0.850651, 0.000000, -0.525731), 144 }
led_strip { 38, 954, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.309017), (0.500000, 0.309017, -0.809017), 144 }
led_strip { 38, 955, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.309017), (0.309017, 0.809017, -0.500000), 144 }
led_strip { 39, 975, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, -0.309017), (0.525731, -0.850651, 0.000000), 144 }
led_strip { 39, 976, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, -0.309017), (0.309017, -0.809017, -0.500000), 144 }
led_strip { 39, 977, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, -0.309017), (0.500000, -0.309017, -0.809017), 144 }
led_strip { 39, 978, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, -0.309017), (0.850651, 0.000000, -0.525731), 144 }
led_strip { 39, 979, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, -0.309017), (1.000000, 0.000000, 0.000000), 144 }
led_strip { 39, 980, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, -0.309017), (0.809017, -0.500000, 0.309017), 144 }
led_strip { 40, 1000, 0, INTERPOLATE_POINTS, (0.000000, 1.000000, 0.000000), (0.525731, 0.850651, 0.000000), 144 }
led_strip { 40, 1001, 0, INTERPOLATE_POINTS, (0.000000, 1.000000, 0.000000), (0.309017, 0.809017, -0.500000), 144 }
led_strip { 40, 1002, 0, INTERPOLATE_POINTS, (0.000000, 1.000000, 0.000000), (-0.309017, 0.809017, -0.500000), 144 }
led_strip { 40, 1003, 0, INTERPOLATE_POINTS, (0.000000, 1.000000, 0.000000), (-0.525731, 0.850651, 0.000000), 144 }
led_strip { 40, 1004, 0, INTERPOLATE_POINTS, (0.000000, 1.000000, 0.000000), (-0.309017, 0.809017, 0.500000), 144 }
led_strip { 40, 1005, 0, INTERPOLATE_POINTS, (0.000000, 1.000000, 0.000000), (0.309017, 0.809017, 0.500000), 144 }
led_strip { 41, 1025, 0, INTERPOLATE_POINTS, (0.000000, -1.000000, 0.000000), (0.525731, -0.850651, 0.000000), 144 }
led_strip { 41, 1026, 0, INTERPOLATE_POINTS, (0.000000, -1.000000, 0.000000), (0.309017, -0.809017, 0.500000), 144 }
led_strip { 41, 1027, 0, INTERPOLATE_POINTS, (0.000000, -1.000000, 0.000000), (-0.309017, -0.809017, 0.500000), 144 }
led_strip { 41, 1028, 0, INTERPOLATE_POINTS, (0.000000, -1.000000, 0.000000), (-0.525731, -0.850651, 0.000000), 144 }
led_strip { 41, 1029, 0, INTERPOLATE_POINTS, (0.000000, -1.000000, 0.000000), (-0.309017, -0.809017, -0.500000), 144 }
led_strip { 41, 1030, 0, INTERPOLATE_POINTS, (0.000000, -1.000000, 0.000000), (0.309017, -0.809017, -0.500000), 144 }
led_strip { 0, 5, 0, INTERPOLATE_POINTS, (-0.005654, 0.530914, 0.844235), (-0.005654, 0.662347, 1.056898), 144 }
led_strip { 0, 6, 0, INTERPOLATE_POINTS, (0.005654, 0.651981, 1.069729), (0.005654, 0.520548, 0.857067), 144 }
led_strip { 0, 7, 0, INTERPOLATE_POINTS, (-0.009149, 0.521766, 0.849889), (-0.009149, 0.653199, 1.062552), 144 }
led_strip { 0, 8, 0, INTERPOLATE_POINTS, (0.002160, 0.642832, 1.075384), (0.002160, 0.511399, 0.862721), 144 }
led_strip { 1, 30, 0, INTERPOLATE_POINTS, (0.005654, -0.530914, 0.844235), (0.005654, -0.662347, 1.056898), 144 }
led_strip { 1, 31, 0, INTERPOLATE_POINTS, (-0.005654, -0.651981, 1.069729), (-0.005654, -0.520548, 0.857067), 144 }
led_strip { 1, 32, 0, INTERPOLATE_POINTS, (0.009149, -0.521766, 0.849889), (0.009149, -0.653199, 1.062552), 144 }
led_strip { 1, 33, 0, INTERPOLATE_POINTS, (-0.002160, -0.642832, 1.075384), (-0.002160, -0.511399, 0.862721), 144 }
led_strip { 2, 55, 0, INTERPOLATE_POINTS, (-0.005654, -0.530914, -0.844235), (-0.005654, -0.662347, -1.056898), 144 }
led_strip { 2, 56, 0, INTERPOLATE_POINTS, (0.005654, -0.651981, -1.069729), (0.005654, -0.520548, -0.857067), 144 }
led_strip { 2, 57, 0, INTERPOLATE_POINTS, (-0.009149, -0.521766, -0.849889), (-0.009149, -0.653199, -1.062552), 144 }
led_strip { 2, 58, 0, INTERPOLATE_POINTS, (0.002160, -0.642832, -1.075384), (0.002160, -0.511399, -0.862721), 144 }
led_strip { 3, 80, 0, INTERPOLATE_POINTS, (0.005654, 0.530914, -0.844235), (0.005654, 0.662347, -1.056898), 144 }
led_strip { 3, 81, 0, INTERPOLATE_POINTS, (-0.005654, 0.651981, -1.069729), (-0.005654, 0.520548, -0.857067), 144 }
led_strip { 3, 82, 0, INTERPOLATE_POINTS, (0.009149, 0.521766, -0.849889), (0.009149, 0.653199, -1.062552), 144 }
led_strip { 3, 83, 0, INTERPOLATE_POINTS, (-0.002160, 0.642832, -1.075384), (-0.002160, 0.511399, -0.862721), 144 }
led_strip { 4, 105, 0, INTERPOLATE_POINTS, (0.849889, 0.009149, 0.521766), (1.062552, 0.009149, 0.653199), 144 }
led_strip { 4, 106, 0, INTERPOLATE_POINTS, (1.064075, -0.009149, 0.661129), (0.851413, -0.009149, 0.529696), 144 }
led_strip { 4, 107, 0, INTERPOLATE_POINTS, (0.844235, 0.005654, 0.530914), (1.056898, 0.005654, 0.662347), 144 }
led_strip { 4, 108, 0, INTERPOLATE_POINTS, (1.058421, -0.012643, 0.670278), (0.845758, -0.012643, 0.538845), 144 }
led_strip { 5, 130, 0, INTERPOLATE_POINTS, (-0.844235, 0.005654, 0.530914), (-1.056898, 0.005654, 0.662347), 144 }
led_strip { 5, 131, 0, INTERPOLATE_POINTS, (-1.069729, -0.005654, 0.651981), (-0.857067, -0.005654, 0.520548), 144 }
led_strip { 5, 132, 0, INTERPOLATE_POINTS, (-0.849889, 0.009149, 0.521766), (-1.062552, 0.009149, 0.653199), 144 }
led_strip { 5, 133, 0, INTERPOLATE_POINTS, (-1.075384, -0.002160, 0.642832), (-0.862721, -0.002160, 0.511399), 144 }
led_strip { 6, 155, 0, INTERPOLATE_POINTS, (-0.849889, 0.009149, -0.521766), (-1.062552, 0.009149, -0.653199), 144 }
led_strip { 6, 156, 0, INTERPOLATE_POINTS, (-1.064075, -0.009149, -0.661129), (-0.851413, -0.009149, -0.529696), 144 }
led_strip { 6, 157, 0, INTERPOLATE_POINTS, (-0.844235, 0.005654, -0.530914), (-1.056898, 0.005654, -0.662347), 144 }
led_strip { 6, 158, 0, INTERPOLATE_POINTS, (-1.058421, -0.012643, -0.670278), (-0.845758, -0.012643, -0.538845), 144 }
led_strip { 7, 180, 0, INTERPOLATE_POINTS, (0.853383, 0.000000, -0.516112), (1.066046, 0.000000, -0.647545), 144 }
led_strip { 7, 181, 0, INTERPOLATE_POINTS, (1.060581, 0.000000, -0.666783), (0.847918, 0.000000, -0.535351), 144 }
led_strip { 7, 182, 0, INTERPOLATE_POINTS, (0.849889, -0.009149, -0.521766), (1.062552, -0.009149, -0.653199), 144 }
led_strip { 7, 183, 0, INTERPOLATE_POINTS, (1.057086, -0.009149, -0.672437), (0.844424, -0.009149, -0.541005), 144 }
led_strip { 8, 205, 0, INTERPOLATE_POINTS, (0.530914, 0.844235, -0.005654), (0.662347, 1.056898, -0.005654), 144 }
led_strip { 8, 206, 0, INTERPOLATE_POINTS, (0.651981, 1.069729, 0.005654), (0.520548, 0.857067, 0.005654), 144 }
led_strip { 8, 207, 0, INTERPOLATE_POINTS, (0.521766, 0.849889, -0.009149), (0.653199, 1.062552, -0.009149), 144 }
led_strip { 8, 208, 0, INTERPOLATE_POINTS, (0.642832, 1.075384, 0.002160), (0.511399, 0.862721, 0.002160), 144 }
led_strip { 9, 230, 0, INTERPOLATE_POINTS, (-0.530914, 0.844235, -0.005654), (-0.662347, 1.056898, -0.005654), 144 }
led_strip { 9, 231, 0, INTERPOLATE_POINTS, (-0.651981, 1.069729, 0.005654), (-0.520548, 0.857067, 0.005654), 144 }
led_strip { 9, 232, 0, INTERPOLATE_POINTS, (-0.530914, 0.844235, 0.005654), (-0.662347, 1.056898, 0.005654), 144 }
led_strip { 9, 233, 0, INTERPOLATE_POINTS, (-0.651981, 1.069729, 0.016962), (-0.520548, 0.857067, 0.016962), 144 }
led_strip { 10, 255, 0, INTERPOLATE_POINTS, (-0.530914, -0.844235, 0.005654), (-0.662347, -1.056898, 0.005654), 144 }
led_strip { 10, 256, 0, INTERPOLATE_POINTS, (-0.651981, -1.069729, -0.005654), (-0.520548, -0.857067, -0.005654), 144 }
led_strip { 10, 257, 0, INTERPOLATE_POINTS, (-0.530914, -0.844235, -0.005654), (-0.662347, -1.056898, -0.005654), 144 }
led_strip { 10, 258, 0, INTERPOLATE_POINTS, (-0.651981, -1.069729, -0.016962), (-0.520548, -0.857067, -0.016962), 144 }
led_strip { 11, 280, 0, INTERPOLATE_POINTS, (0.530914, -0.844235, 0.005654), (0.662347, -1.056898, 0.005654), 144 }
led_strip { 11, 281, 0, INTERPOLATE_POINTS, (0.651981, -1.069729, -0.005654), (0.520548, -0.857067, -0.005654), 144 }
led_strip { 11, 282, 0, INTERPOLATE_POINTS, (0.521766, -0.849889, 0.009149), (0.653199, -1.062552, 0.009149), 144 }
led_strip { 11, 283, 0, INTERPOLATE_POINTS, (0.642832, -1.075384, -0.002160), (0.511399, -0.862721, -0.002160), 144 }
led_strip { 12, 306, 0, INTERPOLATE_POINTS, (0.000000, 0.009619, 0.997267), (0.000000, 0.009619, 1.247267), 144 }
led_strip { 12, 307, 0, INTERPOLATE_POINTS, (0.000000, -0.009619, 1.252733), (0.000000, -0.009619, 1.002733), 144 }
led_strip { 12, 308, 0, INTERPOLATE_POINTS, (-0.008090, 0.005000, 0.996910), (-0.008090, 0.005000, 1.246910), 144 }
led_strip { 12, 309, 0, INTERPOLATE_POINTS, (-0.008090, -0.014239, 1.252375), (-0.008090, -0.014239, 1.002375), 144 }
led_strip { 13, 331, 0, INTERPOLATE_POINTS, (0.506416, 0.303363, 0.803834), (0.631416, 0.380617, 1.006088), 144 }
led_strip { 13, 332, 0, INTERPOLATE_POINTS, (0.618584, 0.391925, 1.016455), (0.493584, 0.314671, 0.814200), 144 }
led_strip { 13, 333, 0, INTERPOLATE_POINTS, (0.505000, 0.312107, 0.800927), (0.630000, 0.389361, 1.003181), 144 }
led_strip { 13, 334, 0, INTERPOLATE_POINTS, (0.617168, 0.400670, 1.013548), (0.492168, 0.323415, 0.811293), 144 }
led_strip { 14, 356, 0, INTERPOLATE_POINTS, (-0.490851, 0.312982, 0.809779), (-0.615851, 0.390236, 1.012033), 144 }
led_strip { 14, 357, 0, INTERPOLATE_POINTS, (-0.634149, 0.382306, 1.010509), (-0.509149, 0.305052, 0.808255), 144 }
led_strip { 14, 358, 0, INTERPOLATE_POINTS, (-0.496910, 0.317107, 0.804017), (-0.621910, 0.394361, 1.006271), 144 }
led_strip { 14, 359, 0, INTERPOLATE_POINTS, (-0.640207, 0.386431, 1.004748), (-0.515207, 0.309177, 0.802493), 144 }
led_strip { 15, 381, 0, INTERPOLATE_POINTS, (0.312982, 0.809779, 0.490851), (0.390236, 1.012033, 0.615851), 144 }
led_strip { 15, 382, 0, INTERPOLATE_POINTS, (0.382306, 1.010509, 0.634149), (0.305052, 0.808255, 0.509149), 144 }
led_strip { 15, 383, 0, INTERPOLATE_POINTS, (0.304017, 0.812107, 0.491910), (0.381271, 1.014361, 0.616910), 144 }
led_strip { 15, 384, 0, INTERPOLATE_POINTS, (0.373341, 1.012838, 0.635207), (0.296086, 0.810584, 0.510207), 144 }
led_strip { 16, 406, 0, INTERPOLATE_POINTS, (-0.312982, 0.809779, 0.490851), (-0.390236, 1.012033, 0.615851), 144 }
led_strip { 16, 407, 0, INTERPOLATE_POINTS, (-0.382306, 1.010509, 0.634149), (-0.305052, 0.808255, 0.509149), 144 }
led_strip { 16, 408, 0, INTERPOLATE_POINTS, (-0.317107, 0.804017, 0.496910), (-0.394361, 1.006271, 0.621910), 144 }
led_strip { 16, 409, 0, INTERPOLATE_POINTS, (-0.386431, 1.004748, 0.640207), (-0.309177, 0.802493, 0.515207), 144 }
led_strip { 17, 431, 0, INTERPOLATE_POINTS, (0.506416, -0.303363, 0.803834), (0.631416, -0.380617, 1.006088), 144 }
led_strip { 17, 432, 0, INTERPOLATE_POINTS, (0.618584, -0.391925, 1.016455), (0.493584, -0.314671, 0.814200), 144 }
led_strip { 17, 433, 0, INTERPOLATE_POINTS, (0.500000, -0.299017, 0.809017), (0.625000, -0.376271, 1.011271), 144 }
led_strip { 17, 434, 0, INTERPOLATE_POINTS, (0.612168, -0.387580, 1.021638), (0.487168, -0.310325, 0.819384), 144 }
led_strip { 18, 456, 0, INTERPOLATE_POINTS, (-0.506416, -0.303363, 0.803834), (-0.631416, -0.380617, 1.006088), 144 }
led_strip { 18, 457, 0, INTERPOLATE_POINTS, (-0.618584, -0.391925, 1.016455), (-0.493584, -0.314671, 0.814200), 144 }
led_strip { 18, 458, 0, INTERPOLATE_POINTS, (-0.505000, -0.312107, 0.800927), (-0.630000, -0.389361, 1.003181), 144 }
led_strip { 18, 459, 0, INTERPOLATE_POINTS, (-0.617168, -0.400670, 1.013548), (-0.492168, -0.323415, 0.811293), 144 }
led_strip { 19, 481, 0, INTERPOLATE_POINTS, (-0.303363, -0.803834, 0.506416), (-0.380617, -1.006088, 0.631416), 144 }
led_strip { 19, 482, 0, INTERPOLATE_POINTS, (-0.391925, -1.016455, 0.618584), (-0.314671, -0.814200, 0.493584), 144 }
led_strip { 19, 483, 0, INTERPOLATE_POINTS, (-0.312107, -0.800927, 0.505000), (-0.389361, -1.003181, 0.630000), 144 }
led_strip { 19, 484, 0, INTERPOLATE_POINTS, (-0.400670, -1.013548, 0.617168), (-0.323415, -0.811293, 0.492168), 144 }
led_strip { 20, 506, 0, INTERPOLATE_POINTS, (0.312982, -0.809779, 0.490851), (0.390236, -1.012033, 0.615851), 144 }
led_strip { 20, 507, 0, INTERPOLATE_POINTS, (0.382306, -1.010509, 0.634149), (0.305052, -0.808255, 0.509149), 144 }
led_strip { 20, 508, 0, INTERPOLATE_POINTS, (0.317107, -0.804017, 0.496910), (0.394361, -1.006271, 0.621910), 144 }
led_strip { 20, 509, 0, INTERPOLATE_POINTS, (0.386431, -1.004748, 0.640207), (0.309177, -0.802493, 0.515207), 144 }
led_strip { 21, 531, 0, INTERPOLATE_POINTS, (0.000000, 0.009619, -0.997267), (0.000000, 0.009619, -1.247267), 144 }
led_strip { 21, 532, 0, INTERPOLATE_POINTS, (0.000000, -0.009619, -1.252733), (0.000000, -0.009619, -1.002733), 144 }
led_strip { 21, 533, 0, INTERPOLATE_POINTS, (0.008090, 0.005000, -0.996910), (0.008090, 0.005000, -1.246910), 144 }
led_strip { 21, 534, 0, INTERPOLATE_POINTS, (0.008090, -0.014239, -1.252375), (0.008090, -0.014239, -1.002375), 144 }
led_strip { 22, 556, 0, INTERPOLATE_POINTS, (-0.506416, -0.303363, -0.803834), (-0.631416, -0.380617, -1.006088), 144 }
led_strip { 22, 557, 0, INTERPOLATE_POINTS, (-0.618584, -0.391925, -1.016455), (-0.493584, -0.314671, -0.814200), 144 }
led_strip { 22, 558, 0, INTERPOLATE_POINTS, (-0.500000, -0.299017, -0.809017), (-0.625000, -0.376271, -1.011271), 144 }
led_strip { 22, 559, 0, INTERPOLATE_POINTS, (-0.612168, -0.387580, -1.021638), (-0.487168, -0.310325, -0.819384), 144 }
led_strip { 23, 581, 0, INTERPOLATE_POINTS, (0.506416, -0.303363, -0.803834), (0.631416, -0.380617, -1.006088), 144 }
led_strip { 23, 582, 0, INTERPOLATE_POINTS, (0.618584, -0.391925, -1.016455), (0.493584, -0.314671, -0.814200), 144 }
led_strip { 23, 583, 0, INTERPOLATE_POINTS, (0.505000, -0.312107, -0.800927), (0.630000, -0.389361, -1.003181), 144 }
led_strip { 23, 584, 0, INTERPOLATE_POINTS, (0.617168, -0.400670, -1.013548), (0.492168, -0.323415, -0.811293), 144 }
led_strip { 24, 606, 0, INTERPOLATE_POINTS, (-0.312982, -0.809779, -0.490851), (-0.390236, -1.012033, -0.615851), 144 }
led_strip { 24, 607, 0, INTERPOLATE_POINTS, (-0.382306, -1.010509, -0.634149), (-0.305052, -0.808255, -0.509149), 144 }
led_strip { 24, 608, 0, INTERPOLATE_POINTS, (-0.317107, -0.804017, -0.496910), (-0.394361, -1.006271, -0.621910), 144 }
led_strip { 24, 609, 0, INTERPOLATE_POINTS, (-0.386431, -1.004748, -0.640207), (-0.309177, -0.802493, -0.515207), 144 }
led_strip { 25, 631, 0, INTERPOLATE_POINTS, (0.312982, -0.809779, -0.490851), (0.390236, -1.012033, -0.615851), 144 }
led_strip { 25, 632, 0, INTERPOLATE_POINTS, (0.382306, -1.010509, -0.634149), (0.305052, -0.808255, -0.509149), 144 }
led_strip { 25, 633, 0, INTERPOLATE_POINTS, (0.304017, -0.812107, -0.491910), (0.381271, -1.014361, -0.616910), 144 }
led_strip { 25, 634, 0, INTERPOLATE_POINTS, (0.373341, -1.012838, -0.635207), (0.296086, -0.810584, -0.510207), 144 }
led_strip { 26, 656, 0, INTERPOLATE_POINTS, (-0.490851, 0.312982, -0.809779), (-0.615851, 0.390236, -1.012033), 144 }
led_strip { 26, 657, 0, INTERPOLATE_POINTS, (-0.634149, 0.382306, -1.010509), (-0.509149, 0.305052, -0.808255), 144 }
led_strip { 26, 658, 0, INTERPOLATE_POINTS, (-0.491910, 0.304017, -0.812107), (-0.616910, 0.381271, -1.014361), 144 }
led_strip { 26, 659, 0, INTERPOLATE_POINTS, (-0.635207, 0.373341, -1.012838), (-0.510207, 0.296086, -0.810584), 144 }
led_strip { 27, 681, 0, INTERPOLATE_POINTS, (0.490851, 0.312982, -0.809779), (0.615851, 0.390236, -1.012033), 144 }
led_strip { 27, 682, 0, INTERPOLATE_POINTS, (0.634149, 0.382306, -1.010509), (0.509149, 0.305052, -0.808255), 144 }
led_strip { 27, 683, 0, INTERPOLATE_POINTS, (0.496910, 0.317107, -0.804017), (0.621910, 0.394361, -1.006271), 144 }
led_strip { 27, 684, 0, INTERPOLATE_POINTS, (0.640207, 0.386431, -1.004748), (0.515207, 0.309177, -0.802493), 144 }
led_strip { 28, 706, 0, INTERPOLATE_POINTS, (0.312982, 0.809779, -0.490851), (0.390236, 1.012033, -0.615851), 144 }
led_strip { 28, 707, 0, INTERPOLATE_POINTS, (0.382306, 1.010509, -0.634149), (0.305052, 0.808255, -0.509149), 144 }
led_strip { 28, 708, 0, INTERPOLATE_POINTS, (0.317107, 0.804017, -0.496910), (0.394361, 1.006271, -0.621910), 144 }
led_strip { 28, 709, 0, INTERPOLATE_POINTS, (0.386431, 1.004748, -0.640207), (0.309177, 0.802493, -0.515207), 144 }
led_strip { 29, 731, 0, INTERPOLATE_POINTS, (-0.312982, 0.809779, -0.490851), (-0.390236, 1.012033, -0.615851), 144 }
led_strip { 29, 732, 0, INTERPOLATE_POINTS, (-0.382306, 1.010509, -0.634149), (-0.305052, 0.808255, -0.509149), 144 }
led_strip { 29, 733, 0, INTERPOLATE_POINTS, (-0.304017, 0.812107, -0.491910), (-0.381271, 1.014361, -0.616910), 144 }
led_strip { 29, 734, 0, INTERPOLATE_POINTS, (-0.373341, 1.012838, -0.635207), (-0.296086, 0.810584, -0.510207), 144 }
led_strip { 30, 756, 0, INTERPOLATE_POINTS, (0.997267, 0.000000, -0.009619), (1.247267, 0.000000, -0.009619), 144 }
led_strip { 30, 757, 0, INTERPOLATE_POINTS, (1.252733, 0.000000, 0.009619), (1.002733, 0.000000, 0.009619), 144 }
led_strip { 30, 758, 0, INTERPOLATE_POINTS, (0.996910, 0.008090, -0.005000), (1.246910, 0.008090, -0.005000), 144 }
led_strip { 30, 759, 0, INTERPOLATE_POINTS, (1.252375, 0.008090, 0.014239), (1.002375, 0.008090, 0.014239), 144 }
led_strip { 31, 781, 0, INTERPOLATE_POINTS, (0.803834, 0.506416, 0.303363), (1.006088, 0.631416, 0.380617), 144 }
led_strip { 31, 782, 0, INTERPOLATE_POINTS, (1.016455, 0.618584, 0.391925), (0.814200, 0.493584, 0.314671), 144 }
led_strip { 31, 783, 0, INTERPOLATE_POINTS, (0.800927, 0.505000, 0.312107), (1.003181, 0.630000, 0.389361), 144 }
led_strip { 31, 784, 0, INTERPOLATE_POINTS, (1.013548, 0.617168, 0.400670), (0.811293, 0.492168, 0.323415), 144 }
led_strip { 32, 806, 0, INTERPOLATE_POINTS, (0.803834, -0.506416, 0.303363), (1.006088, -0.631416, 0.380617), 144 }
led_strip { 32, 807, 0, INTERPOLATE_POINTS, (1.016455, -0.618584, 0.391925), (0.814200, -0.493584, 0.314671), 144 }
led_strip { 32, 808, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.299017), (1.011271, -0.625000, 0.376271), 144 }
led_strip { 32, 809, 0, INTERPOLATE_POINTS, (1.021638, -0.612168, 0.387580), (0.819384, -0.487168, 0.310325), 144 }
led_strip { 33, 831, 0, INTERPOLATE_POINTS, (-0.997267, 0.000000, 0.009619), (-1.247267, 0.000000, 0.009619), 144 }
led_strip { 33, 832, 0, INTERPOLATE_POINTS, (-1.252733, 0.000000, -0.009619), (-1.002733, 0.000000, -0.009619), 144 }
led_strip { 33, 833, 0, INTERPOLATE_POINTS, (-0.996910, 0.008090, 0.005000), (-1.246910, 0.008090, 0.005000), 144 }
led_strip { 33, 834, 0, INTERPOLATE_POINTS, (-1.252375, 0.008090, -0.014239), (-1.002375, 0.008090, -0.014239), 144 }
led_strip { 34, 856, 0, INTERPOLATE_POINTS, (-0.809779, 0.490851, 0.312982), (-1.012033, 0.615851, 0.390236), 144 }
led_strip { 34, 857, 0, INTERPOLATE_POINTS, (-1.010509, 0.634149, 0.382306), (-0.808255, 0.509149, 0.305052), 144 }
led_strip { 34, 858, 0, INTERPOLATE_POINTS, (-0.804017, 0.496910, 0.317107), (-1.006271, 0.621910, 0.394361), 144 }
led_strip { 34, 859, 0, INTERPOLATE_POINTS, (-1.004748, 0.640207, 0.386431), (-0.802493, 0.515207, 0.309177), 144 }
led_strip { 35, 881, 0, INTERPOLATE_POINTS, (-0.809779, -0.490851, 0.312982), (-1.012033, -0.615851, 0.390236), 144 }
led_strip { 35, 882, 0, INTERPOLATE_POINTS, (-1.010509, -0.634149, 0.382306), (-0.808255, -0.509149, 0.305052), 144 }
led_strip { 35, 883, 0, INTERPOLATE_POINTS, (-0.812107, -0.491910, 0.304017), (-1.014361, -0.616910, 0.381271), 144 }
led_strip { 35, 884, 0, INTERPOLATE_POINTS, (-1.012838, -0.635207, 0.373341), (-0.810584, -0.510207, 0.296086), 144 }
led_strip { 36, 906, 0, INTERPOLATE_POINTS, (-0.803834, 0.506416, -0.303363), (-1.006088, 0.631416, -0.380617), 144 }
led_strip { 36, 907, 0, INTERPOLATE_POINTS, (-1.016455, 0.618584, -0.391925), (-0.814200, 0.493584, -0.314671), 144 }
led_strip { 36, 908, 0, INTERPOLATE_POINTS, (-0.800927, 0.505000, -0.312107), (-1.003181, 0.630000, -0.389361), 144 }
led_strip { 36, 909, 0, INTERPOLATE_POINTS, (-1.013548, 0.617168, -0.400670), (-0.811293, 0.492168, -0.323415), 144 }
led_strip { 37, 931, 0, INTERPOLATE_POINTS, (-0.803834, -0.506416, -0.303363), (-1.006088, -0.631416, -0.380617), 144 }
led_strip { 37, 932, 0, INTERPOLATE_POINTS, (-1.016455, -0.618584, -0.391925), (-0.814200, -0.493584, -0.314671), 144 }
led_strip { 37, 933, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.299017), (-1.011271, -0.625000, -0.376271), 144 }
led_strip { 37, 934, 0, INTERPOLATE_POINTS, (-1.021638, -0.612168, -0.387580), (-0.819384, -0.487168, -0.310325), 144 }
led_strip { 38, 956, 0, INTERPOLATE_POINTS, (0.803834, 0.506416, -0.303363), (1.006088, 0.631416, -0.380617), 144 }
led_strip { 38, 957, 0, INTERPOLATE_POINTS, (1.016455, 0.618584, -0.391925), (0.814200, 0.493584, -0.314671), 144 }
led_strip { 38, 958, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.299017), (1.011271, 0.625000, -0.376271), 144 }
led_strip { 38, 959, 0, INTERPOLATE_POINTS, (1.021638, 0.612168, -0.387580), (0.819384, 0.487168, -0.310325), 144 }
led_strip { 39, 981, 0, INTERPOLATE_POINTS, (0.803834, -0.506416, -0.303363), (1.006088, -0.631416, -0.380617), 144 }
led_strip { 39, 982, 0, INTERPOLATE_POINTS, (1.016455, -0.618584, -0.391925), (0.814200, -0.493584, -0.314671), 144 }
led_strip { 39, 983, 0, INTERPOLATE_POINTS, (0.800927, -0.505000, -0.312107), (1.003181, -0.630000, -0.389361), 144 }
led_strip { 39, 984, 0, INTERPOLATE_POINTS, (1.013548, -0.617168, -0.400670), (0.811293, -0.492168, -0.323415), 144 }
led_strip { 40, 1006, 0, INTERPOLATE_POINTS, (0.009619, 0.997267, 0.000000), (0.009619, 1.247267, 0.000000), 144 }
led_strip { 40, 1007, 0, INTERPOLATE_POINTS, (-0.009619, 1.252733, 0.000000), (-0.009619, 1.002733, 0.000000), 144 }
led_strip { 40, 1008, 0, INTERPOLATE_POINTS, (0.005000, 0.996910, -0.008090), (0.005000, 1.246910, -0.008090), 144 }
led_strip { 40, 1009, 0, INTERPOLATE_POINTS, (-0.014239, 1.252375, -0.008090), (-0.014239, 1.002375, -0.008090), 144 }
led_strip { 41, 1031, 0, INTERPOLATE_POINTS, (0.009619, -0.997267, 0.000000), (0.009619, -1.247267, 0.000000), 144 }
led_strip { 41, 1032, 0, INTERPOLATE_POINTS, (-0.009619, -1.252733, 0.000000), (-0.009619, -1.002733, 0.000000), 144 }
led_strip { 41, 1033, 0, INTERPOLATE_POINTS, (0.005000, -0.996910, 0.008090), (0.005000, -1.246910, 0.008090), 144 }
led_strip { 41, 1034, 0, INTERPOLATE_POINTS, (-0.014239, -1.252375, 0.008090), (-0.014239, -1.002375, 0.008090), 144 }
END_OF_ASSEMBLY_FILE

BIN
data/radialumia.txt Normal file

Binary file not shown.

452
data/radialumia_burn.fold Normal file
View File

@ -0,0 +1,452 @@
control_box_count 42
led_strip_count 240
control_box { 0, "192.168.1.200", (0.000000, 0.525731, 0.850651) }
control_box { 1, "192.168.1.201", (0.000000, -0.525731, 0.850651) }
control_box { 2, "192.168.1.202", (0.000000, -0.525731, -0.850651) }
control_box { 3, "192.168.1.203", (0.000000, 0.525731, -0.850651) }
control_box { 4, "192.168.1.204", (0.850651, 0.000000, 0.525731) }
control_box { 5, "192.168.1.205", (-0.850651, 0.000000, 0.525731) }
control_box { 6, "192.168.1.206", (-0.850651, 0.000000, -0.525731) }
control_box { 7, "192.168.1.207", (0.850651, 0.000000, -0.525731) }
control_box { 8, "192.168.1.208", (0.525731, 0.850651, 0.000000) }
control_box { 9, "192.168.1.209", (-0.525731, 0.850651, 0.000000) }
control_box { 10, "192.168.1.210", (-0.525731, -0.850651, 0.000000) }
control_box { 11, "192.168.1.211", (0.525731, -0.850651, 0.000000) }
control_box { 12, "192.168.1.212", (0.000000, 0.000000, 1.000000) }
control_box { 13, "192.168.1.213", (0.500000, 0.309017, 0.809017) }
control_box { 14, "192.168.1.214", (-0.500000, 0.309017, 0.809017) }
control_box { 15, "192.168.1.215", (0.309017, 0.809017, 0.500000) }
control_box { 16, "192.168.1.216", (-0.309017, 0.809017, 0.500000) }
control_box { 17, "192.168.1.217", (0.500000, -0.309017, 0.809017) }
control_box { 18, "192.168.1.218", (-0.500000, -0.309017, 0.809017) }
control_box { 19, "192.168.1.219", (-0.309017, -0.809017, 0.500000) }
control_box { 20, "192.168.1.220", (0.309017, -0.809017, 0.500000) }
control_box { 21, "192.168.1.221", (0.000000, 0.000000, -1.000000) }
control_box { 22, "192.168.1.222", (-0.500000, -0.309017, -0.809017) }
control_box { 23, "192.168.1.223", (0.500000, -0.309017, -0.809017) }
control_box { 24, "192.168.1.224", (-0.309017, -0.809017, -0.500000) }
control_box { 25, "192.168.1.225", (0.309017, -0.809017, -0.500000) }
control_box { 26, "192.168.1.226", (-0.500000, 0.309017, -0.809017) }
control_box { 27, "192.168.1.227", (0.500000, 0.309017, -0.809017) }
control_box { 28, "192.168.1.228", (0.309017, 0.809017, -0.500000) }
control_box { 29, "192.168.1.229", (-0.309017, 0.809017, -0.500000) }
control_box { 30, "192.168.1.230", (1.000000, 0.000000, 0.000000) }
control_box { 31, "192.168.1.231", (0.809017, 0.500000, 0.309017) }
control_box { 32, "192.168.1.232", (0.809017, -0.500000, 0.309017) }
control_box { 33, "192.168.1.233", (-1.000000, 0.000000, 0.000000) }
control_box { 34, "192.168.1.234", (-0.809017, 0.500000, 0.309017) }
control_box { 35, "192.168.1.235", (-0.809017, -0.500000, 0.309017) }
control_box { 36, "192.168.1.236", (-0.809017, 0.500000, -0.309017) }
control_box { 37, "192.168.1.237", (-0.809017, -0.500000, -0.309017) }
control_box { 38, "192.168.1.238", (0.809017, 0.500000, -0.309017) }
control_box { 39, "192.168.1.239", (0.809017, -0.500000, -0.309017) }
control_box { 40, "192.168.1.240", (0.000000, 1.000000, 0.000000) }
control_box { 41, "192.168.1.241", (0.000000, -1.000000, 0.000000) }
led_strip { 0, 0, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, 0.850651), (-0.309017, 0.809017, 0.500000), 144 }
led_strip { 0, 1, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, 0.850651), (-0.500000, 0.309017, 0.809017), 144 }
led_strip { 0, 2, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, 0.850651), (0.000000, 0.000000, 1.000000), 144 }
led_strip { 0, 3, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, 0.850651), (0.500000, 0.309017, 0.809017), 144 }
led_strip { 0, 4, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, 0.850651), (0.309017, 0.809017, 0.500000), 144 }
led_strip { 1, 25, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, 0.850651), (0.309017, -0.809017, 0.500000), 144 }
led_strip { 1, 26, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, 0.850651), (0.500000, -0.309017, 0.809017), 144 }
led_strip { 1, 27, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, 0.850651), (0.000000, 0.000000, 1.000000), 144 }
led_strip { 1, 28, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, 0.850651), (-0.500000, -0.309017, 0.809017), 144 }
led_strip { 1, 29, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, 0.850651), (-0.309017, -0.809017, 0.500000), 144 }
led_strip { 2, 50, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, -0.850651), (-0.309017, -0.809017, -0.500000), 144 }
led_strip { 2, 51, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, -0.850651), (-0.500000, -0.309017, -0.809017), 144 }
led_strip { 2, 52, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, -0.850651), (0.000000, 0.000000, -1.000000), 144 }
led_strip { 2, 53, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, -0.850651), (0.500000, -0.309017, -0.809017), 144 }
led_strip { 2, 54, 0, INTERPOLATE_POINTS, (0.000000, -0.525731, -0.850651), (0.309017, -0.809017, -0.500000), 144 }
led_strip { 3, 75, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, -0.850651), (0.309017, 0.809017, -0.500000), 144 }
led_strip { 3, 76, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, -0.850651), (0.500000, 0.309017, -0.809017), 144 }
led_strip { 3, 77, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, -0.850651), (0.000000, 0.000000, -1.000000), 144 }
led_strip { 3, 78, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, -0.850651), (-0.500000, 0.309017, -0.809017), 144 }
led_strip { 3, 79, 0, INTERPOLATE_POINTS, (0.000000, 0.525731, -0.850651), (-0.309017, 0.809017, -0.500000), 144 }
led_strip { 4, 100, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, 0.525731), (0.809017, 0.500000, 0.309017), 144 }
led_strip { 4, 101, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, 0.525731), (0.500000, 0.309017, 0.809017), 144 }
led_strip { 4, 102, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, 0.525731), (0.500000, -0.309017, 0.809017), 144 }
led_strip { 4, 103, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, 0.525731), (0.809017, -0.500000, 0.309017), 144 }
led_strip { 4, 104, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, 0.525731), (1.000000, 0.000000, 0.000000), 144 }
led_strip { 5, 125, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, 0.525731), (-0.500000, 0.309017, 0.809017), 144 }
led_strip { 5, 126, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, 0.525731), (-0.809017, 0.500000, 0.309017), 144 }
led_strip { 5, 127, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, 0.525731), (-1.000000, 0.000000, 0.000000), 144 }
led_strip { 5, 128, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, 0.525731), (-0.809017, -0.500000, 0.309017), 144 }
led_strip { 5, 129, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, 0.525731), (-0.500000, -0.309017, 0.809017), 144 }
led_strip { 6, 150, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, -0.525731), (-0.809017, 0.500000, -0.309017), 144 }
led_strip { 6, 151, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, -0.525731), (-0.500000, 0.309017, -0.809017), 144 }
led_strip { 6, 152, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, -0.525731), (-0.500000, -0.309017, -0.809017), 144 }
led_strip { 6, 153, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, -0.525731), (-0.809017, -0.500000, -0.309017), 144 }
led_strip { 6, 154, 0, INTERPOLATE_POINTS, (-0.850651, 0.000000, -0.525731), (-1.000000, 0.000000, 0.000000), 144 }
led_strip { 7, 175, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, -0.525731), (1.000000, 0.000000, 0.000000), 144 }
led_strip { 7, 176, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, -0.525731), (0.809017, -0.500000, -0.309017), 144 }
led_strip { 7, 177, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, -0.525731), (0.500000, -0.309017, -0.809017), 144 }
led_strip { 7, 178, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, -0.525731), (0.500000, 0.309017, -0.809017), 144 }
led_strip { 7, 179, 0, INTERPOLATE_POINTS, (0.850651, 0.000000, -0.525731), (0.809017, 0.500000, -0.309017), 144 }
led_strip { 8, 200, 0, INTERPOLATE_POINTS, (0.525731, 0.850651, 0.000000), (0.809017, 0.500000, -0.309017), 144 }
led_strip { 8, 201, 0, INTERPOLATE_POINTS, (0.525731, 0.850651, 0.000000), (0.309017, 0.809017, -0.500000), 144 }
led_strip { 8, 202, 0, INTERPOLATE_POINTS, (0.525731, 0.850651, 0.000000), (0.000000, 1.000000, 0.000000), 144 }
led_strip { 8, 203, 0, INTERPOLATE_POINTS, (0.525731, 0.850651, 0.000000), (0.309017, 0.809017, 0.500000), 144 }
led_strip { 8, 204, 0, INTERPOLATE_POINTS, (0.525731, 0.850651, 0.000000), (0.809017, 0.500000, 0.309017), 144 }
led_strip { 9, 225, 0, INTERPOLATE_POINTS, (-0.525731, 0.850651, 0.000000), (-0.809017, 0.500000, -0.309017), 144 }
led_strip { 9, 226, 0, INTERPOLATE_POINTS, (-0.525731, 0.850651, 0.000000), (-0.809017, 0.500000, 0.309017), 144 }
led_strip { 9, 227, 0, INTERPOLATE_POINTS, (-0.525731, 0.850651, 0.000000), (-0.309017, 0.809017, 0.500000), 144 }
led_strip { 9, 228, 0, INTERPOLATE_POINTS, (-0.525731, 0.850651, 0.000000), (0.000000, 1.000000, 0.000000), 144 }
led_strip { 9, 229, 0, INTERPOLATE_POINTS, (-0.525731, 0.850651, 0.000000), (-0.309017, 0.809017, -0.500000), 144 }
led_strip { 10, 250, 0, INTERPOLATE_POINTS, (-0.525731, -0.850651, 0.000000), (-0.809017, -0.500000, 0.309017), 144 }
led_strip { 10, 251, 0, INTERPOLATE_POINTS, (-0.525731, -0.850651, 0.000000), (-0.809017, -0.500000, -0.309017), 144 }
led_strip { 10, 252, 0, INTERPOLATE_POINTS, (-0.525731, -0.850651, 0.000000), (-0.309017, -0.809017, -0.500000), 144 }
led_strip { 10, 253, 0, INTERPOLATE_POINTS, (-0.525731, -0.850651, 0.000000), (0.000000, -1.000000, 0.000000), 144 }
led_strip { 10, 254, 0, INTERPOLATE_POINTS, (-0.525731, -0.850651, 0.000000), (-0.309017, -0.809017, 0.500000), 144 }
led_strip { 11, 275, 0, INTERPOLATE_POINTS, (0.525731, -0.850651, 0.000000), (0.809017, -0.500000, 0.309017), 144 }
led_strip { 11, 276, 0, INTERPOLATE_POINTS, (0.525731, -0.850651, 0.000000), (0.309017, -0.809017, 0.500000), 144 }
led_strip { 11, 277, 0, INTERPOLATE_POINTS, (0.525731, -0.850651, 0.000000), (0.000000, -1.000000, 0.000000), 144 }
led_strip { 11, 278, 0, INTERPOLATE_POINTS, (0.525731, -0.850651, 0.000000), (0.309017, -0.809017, -0.500000), 144 }
led_strip { 11, 279, 0, INTERPOLATE_POINTS, (0.525731, -0.850651, 0.000000), (0.809017, -0.500000, -0.309017), 144 }
led_strip { 12, 300, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, 1.000000), (0.000000, 0.525731, 0.850651), 144 }
led_strip { 12, 301, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, 1.000000), (-0.500000, 0.309017, 0.809017), 144 }
led_strip { 12, 302, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, 1.000000), (-0.500000, -0.309017, 0.809017), 144 }
led_strip { 12, 303, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, 1.000000), (0.000000, -0.525731, 0.850651), 144 }
led_strip { 12, 304, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, 1.000000), (0.500000, -0.309017, 0.809017), 144 }
led_strip { 12, 305, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, 1.000000), (0.500000, 0.309017, 0.809017), 144 }
led_strip { 13, 325, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, 0.809017), (0.850651, 0.000000, 0.525731), 144 }
led_strip { 13, 326, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, 0.809017), (0.809017, 0.500000, 0.309017), 144 }
led_strip { 13, 327, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, 0.809017), (0.309017, 0.809017, 0.500000), 144 }
led_strip { 13, 328, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, 0.809017), (0.000000, 0.525731, 0.850651), 144 }
led_strip { 13, 329, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, 0.809017), (0.000000, 0.000000, 1.000000), 144 }
led_strip { 13, 330, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, 0.809017), (0.500000, -0.309017, 0.809017), 144 }
led_strip { 14, 350, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, 0.809017), (0.000000, 0.525731, 0.850651), 144 }
led_strip { 14, 351, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, 0.809017), (-0.309017, 0.809017, 0.500000), 144 }
led_strip { 14, 352, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, 0.809017), (-0.809017, 0.500000, 0.309017), 144 }
led_strip { 14, 353, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, 0.809017), (-0.850651, 0.000000, 0.525731), 144 }
led_strip { 14, 354, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, 0.809017), (-0.500000, -0.309017, 0.809017), 144 }
led_strip { 14, 355, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, 0.809017), (0.000000, 0.000000, 1.000000), 144 }
led_strip { 15, 375, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, 0.500000), (0.525731, 0.850651, 0.000000), 144 }
led_strip { 15, 376, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, 0.500000), (0.000000, 1.000000, 0.000000), 144 }
led_strip { 15, 377, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, 0.500000), (-0.309017, 0.809017, 0.500000), 144 }
led_strip { 15, 378, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, 0.500000), (0.000000, 0.525731, 0.850651), 144 }
led_strip { 15, 379, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, 0.500000), (0.500000, 0.309017, 0.809017), 144 }
led_strip { 15, 380, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, 0.500000), (0.809017, 0.500000, 0.309017), 144 }
led_strip { 16, 400, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, 0.500000), (-0.525731, 0.850651, 0.000000), 144 }
led_strip { 16, 401, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, 0.500000), (-0.809017, 0.500000, 0.309017), 144 }
led_strip { 16, 402, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, 0.500000), (-0.500000, 0.309017, 0.809017), 144 }
led_strip { 16, 403, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, 0.500000), (0.000000, 0.525731, 0.850651), 144 }
led_strip { 16, 404, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, 0.500000), (0.309017, 0.809017, 0.500000), 144 }
led_strip { 16, 405, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, 0.500000), (0.000000, 1.000000, 0.000000), 144 }
led_strip { 17, 425, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, 0.809017), (0.850651, 0.000000, 0.525731), 144 }
led_strip { 17, 426, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, 0.809017), (0.500000, 0.309017, 0.809017), 144 }
led_strip { 17, 427, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, 0.809017), (0.000000, 0.000000, 1.000000), 144 }
led_strip { 17, 428, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, 0.809017), (0.000000, -0.525731, 0.850651), 144 }
led_strip { 17, 429, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, 0.809017), (0.309017, -0.809017, 0.500000), 144 }
led_strip { 17, 430, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, 0.809017), (0.809017, -0.500000, 0.309017), 144 }
led_strip { 18, 450, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, 0.809017), (-0.850651, 0.000000, 0.525731), 144 }
led_strip { 18, 451, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, 0.809017), (-0.809017, -0.500000, 0.309017), 144 }
led_strip { 18, 452, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, 0.809017), (-0.309017, -0.809017, 0.500000), 144 }
led_strip { 18, 453, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, 0.809017), (0.000000, -0.525731, 0.850651), 144 }
led_strip { 18, 454, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, 0.809017), (0.000000, 0.000000, 1.000000), 144 }
led_strip { 18, 455, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, 0.809017), (-0.500000, 0.309017, 0.809017), 144 }
led_strip { 19, 475, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, 0.500000), (0.000000, -0.525731, 0.850651), 144 }
led_strip { 19, 476, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, 0.500000), (-0.500000, -0.309017, 0.809017), 144 }
led_strip { 19, 477, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, 0.500000), (-0.809017, -0.500000, 0.309017), 144 }
led_strip { 19, 478, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, 0.500000), (-0.525731, -0.850651, 0.000000), 144 }
led_strip { 19, 479, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, 0.500000), (0.000000, -1.000000, 0.000000), 144 }
led_strip { 19, 480, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, 0.500000), (0.309017, -0.809017, 0.500000), 144 }
led_strip { 20, 500, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, 0.500000), (0.525731, -0.850651, 0.000000), 144 }
led_strip { 20, 501, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, 0.500000), (0.809017, -0.500000, 0.309017), 144 }
led_strip { 20, 502, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, 0.500000), (0.500000, -0.309017, 0.809017), 144 }
led_strip { 20, 503, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, 0.500000), (0.000000, -0.525731, 0.850651), 144 }
led_strip { 20, 504, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, 0.500000), (-0.309017, -0.809017, 0.500000), 144 }
led_strip { 20, 505, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, 0.500000), (0.000000, -1.000000, 0.000000), 144 }
led_strip { 21, 525, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, -1.000000), (0.000000, 0.525731, -0.850651), 144 }
led_strip { 21, 526, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, -1.000000), (0.500000, 0.309017, -0.809017), 144 }
led_strip { 21, 527, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, -1.000000), (0.500000, -0.309017, -0.809017), 144 }
led_strip { 21, 528, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, -1.000000), (0.000000, -0.525731, -0.850651), 144 }
led_strip { 21, 529, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, -1.000000), (-0.500000, -0.309017, -0.809017), 144 }
led_strip { 21, 530, 0, INTERPOLATE_POINTS, (0.000000, 0.000000, -1.000000), (-0.500000, 0.309017, -0.809017), 144 }
led_strip { 22, 550, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, -0.809017), (-0.850651, 0.000000, -0.525731), 144 }
led_strip { 22, 551, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, -0.809017), (-0.500000, 0.309017, -0.809017), 144 }
led_strip { 22, 552, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, -0.809017), (0.000000, 0.000000, -1.000000), 144 }
led_strip { 22, 553, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, -0.809017), (0.000000, -0.525731, -0.850651), 144 }
led_strip { 22, 554, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, -0.809017), (-0.309017, -0.809017, -0.500000), 144 }
led_strip { 22, 555, 0, INTERPOLATE_POINTS, (-0.500000, -0.309017, -0.809017), (-0.809017, -0.500000, -0.309017), 144 }
led_strip { 23, 575, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, -0.809017), (0.850651, 0.000000, -0.525731), 144 }
led_strip { 23, 576, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, -0.809017), (0.809017, -0.500000, -0.309017), 144 }
led_strip { 23, 577, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, -0.809017), (0.309017, -0.809017, -0.500000), 144 }
led_strip { 23, 578, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, -0.809017), (0.000000, -0.525731, -0.850651), 144 }
led_strip { 23, 579, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, -0.809017), (0.000000, 0.000000, -1.000000), 144 }
led_strip { 23, 580, 0, INTERPOLATE_POINTS, (0.500000, -0.309017, -0.809017), (0.500000, 0.309017, -0.809017), 144 }
led_strip { 24, 600, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, -0.500000), (-0.525731, -0.850651, 0.000000), 144 }
led_strip { 24, 601, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, -0.500000), (-0.809017, -0.500000, -0.309017), 144 }
led_strip { 24, 602, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, -0.500000), (-0.500000, -0.309017, -0.809017), 144 }
led_strip { 24, 603, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, -0.500000), (0.000000, -0.525731, -0.850651), 144 }
led_strip { 24, 604, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, -0.500000), (0.309017, -0.809017, -0.500000), 144 }
led_strip { 24, 605, 0, INTERPOLATE_POINTS, (-0.309017, -0.809017, -0.500000), (0.000000, -1.000000, 0.000000), 144 }
led_strip { 25, 625, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, -0.500000), (0.525731, -0.850651, 0.000000), 144 }
led_strip { 25, 626, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, -0.500000), (0.000000, -1.000000, 0.000000), 144 }
led_strip { 25, 627, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, -0.500000), (-0.309017, -0.809017, -0.500000), 144 }
led_strip { 25, 628, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, -0.500000), (0.000000, -0.525731, -0.850651), 144 }
led_strip { 25, 629, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, -0.500000), (0.500000, -0.309017, -0.809017), 144 }
led_strip { 25, 630, 0, INTERPOLATE_POINTS, (0.309017, -0.809017, -0.500000), (0.809017, -0.500000, -0.309017), 144 }
led_strip { 26, 650, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, -0.809017), (0.000000, 0.525731, -0.850651), 144 }
led_strip { 26, 651, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, -0.809017), (0.000000, 0.000000, -1.000000), 144 }
led_strip { 26, 652, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, -0.809017), (-0.500000, -0.309017, -0.809017), 144 }
led_strip { 26, 653, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, -0.809017), (-0.850651, 0.000000, -0.525731), 144 }
led_strip { 26, 654, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, -0.809017), (-0.809017, 0.500000, -0.309017), 144 }
led_strip { 26, 655, 0, INTERPOLATE_POINTS, (-0.500000, 0.309017, -0.809017), (-0.309017, 0.809017, -0.500000), 144 }
led_strip { 27, 675, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, -0.809017), (0.000000, 0.525731, -0.850651), 144 }
led_strip { 27, 676, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, -0.809017), (0.309017, 0.809017, -0.500000), 144 }
led_strip { 27, 677, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, -0.809017), (0.809017, 0.500000, -0.309017), 144 }
led_strip { 27, 678, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, -0.809017), (0.850651, 0.000000, -0.525731), 144 }
led_strip { 27, 679, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, -0.809017), (0.500000, -0.309017, -0.809017), 144 }
led_strip { 27, 680, 0, INTERPOLATE_POINTS, (0.500000, 0.309017, -0.809017), (0.000000, 0.000000, -1.000000), 144 }
led_strip { 28, 700, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, -0.500000), (0.525731, 0.850651, 0.000000), 144 }
led_strip { 28, 701, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, -0.500000), (0.809017, 0.500000, -0.309017), 144 }
led_strip { 28, 702, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, -0.500000), (0.500000, 0.309017, -0.809017), 144 }
led_strip { 28, 703, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, -0.500000), (0.000000, 0.525731, -0.850651), 144 }
led_strip { 28, 704, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, -0.500000), (-0.309017, 0.809017, -0.500000), 144 }
led_strip { 28, 705, 0, INTERPOLATE_POINTS, (0.309017, 0.809017, -0.500000), (0.000000, 1.000000, 0.000000), 144 }
led_strip { 29, 725, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, -0.500000), (-0.525731, 0.850651, 0.000000), 144 }
led_strip { 29, 726, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, -0.500000), (0.000000, 1.000000, 0.000000), 144 }
led_strip { 29, 727, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, -0.500000), (0.309017, 0.809017, -0.500000), 144 }
led_strip { 29, 728, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, -0.500000), (0.000000, 0.525731, -0.850651), 144 }
led_strip { 29, 729, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, -0.500000), (-0.500000, 0.309017, -0.809017), 144 }
led_strip { 29, 730, 0, INTERPOLATE_POINTS, (-0.309017, 0.809017, -0.500000), (-0.809017, 0.500000, -0.309017), 144 }
led_strip { 30, 750, 0, INTERPOLATE_POINTS, (1.000000, 0.000000, 0.000000), (0.850651, 0.000000, -0.525731), 144 }
led_strip { 30, 751, 0, INTERPOLATE_POINTS, (1.000000, 0.000000, 0.000000), (0.809017, 0.500000, -0.309017), 144 }
led_strip { 30, 752, 0, INTERPOLATE_POINTS, (1.000000, 0.000000, 0.000000), (0.809017, 0.500000, 0.309017), 144 }
led_strip { 30, 753, 0, INTERPOLATE_POINTS, (1.000000, 0.000000, 0.000000), (0.850651, 0.000000, 0.525731), 144 }
led_strip { 30, 754, 0, INTERPOLATE_POINTS, (1.000000, 0.000000, 0.000000), (0.809017, -0.500000, 0.309017), 144 }
led_strip { 30, 755, 0, INTERPOLATE_POINTS, (1.000000, 0.000000, 0.000000), (0.809017, -0.500000, -0.309017), 144 }
led_strip { 31, 775, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, 0.309017), (0.525731, 0.850651, 0.000000), 144 }
led_strip { 31, 776, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, 0.309017), (0.309017, 0.809017, 0.500000), 144 }
led_strip { 31, 777, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, 0.309017), (0.500000, 0.309017, 0.809017), 144 }
led_strip { 31, 778, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, 0.309017), (0.850651, 0.000000, 0.525731), 144 }
led_strip { 31, 779, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, 0.309017), (1.000000, 0.000000, 0.000000), 144 }
led_strip { 31, 780, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, 0.309017), (0.809017, 0.500000, -0.309017), 144 }
led_strip { 32, 800, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.309017), (0.525731, -0.850651, 0.000000), 144 }
led_strip { 32, 801, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.309017), (0.809017, -0.500000, -0.309017), 144 }
led_strip { 32, 802, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.309017), (1.000000, 0.000000, 0.000000), 144 }
led_strip { 32, 803, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.309017), (0.850651, 0.000000, 0.525731), 144 }
led_strip { 32, 804, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.309017), (0.500000, -0.309017, 0.809017), 144 }
led_strip { 32, 805, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.309017), (0.309017, -0.809017, 0.500000), 144 }
led_strip { 33, 825, 0, INTERPOLATE_POINTS, (-1.000000, 0.000000, 0.000000), (-0.850651, 0.000000, 0.525731), 144 }
led_strip { 33, 826, 0, INTERPOLATE_POINTS, (-1.000000, 0.000000, 0.000000), (-0.809017, 0.500000, 0.309017), 144 }
led_strip { 33, 827, 0, INTERPOLATE_POINTS, (-1.000000, 0.000000, 0.000000), (-0.809017, 0.500000, -0.309017), 144 } led_strip { 33, 829, 0, INTERPOLATE_POINTS, (-1.000000, 0.000000, 0.000000), (-0.809017, -0.500000, -0.309017), 144 }
led_strip { 33, 830, 0, INTERPOLATE_POINTS, (-1.000000, 0.000000, 0.000000), (-0.809017, -0.500000, 0.309017), 144 }
led_strip { 34, 850, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, 0.309017), (-0.850651, 0.000000, 0.525731), 144 }
led_strip { 34, 851, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, 0.309017), (-0.500000, 0.309017, 0.809017), 144 }
led_strip { 34, 852, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, 0.309017), (-0.309017, 0.809017, 0.500000), 144 }
led_strip { 34, 853, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, 0.309017), (-0.525731, 0.850651, 0.000000), 144 }
led_strip { 34, 854, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, 0.309017), (-0.809017, 0.500000, -0.309017), 144 }
led_strip { 34, 855, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, 0.309017), (-1.000000, 0.000000, 0.000000), 144 }
led_strip { 35, 875, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, 0.309017), (-0.850651, 0.000000, 0.525731), 144 }
led_strip { 35, 876, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, 0.309017), (-1.000000, 0.000000, 0.000000), 144 }
led_strip { 35, 877, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, 0.309017), (-0.809017, -0.500000, -0.309017), 144 }
led_strip { 35, 878, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, 0.309017), (-0.525731, -0.850651, 0.000000), 144 }
led_strip { 35, 879, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, 0.309017), (-0.309017, -0.809017, 0.500000), 144 } led_strip { 36, 900, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, -0.309017), (-0.525731, 0.850651, 0.000000), 144 }
led_strip { 36, 901, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, -0.309017), (-0.309017, 0.809017, -0.500000), 144 }
led_strip { 36, 902, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, -0.309017), (-0.500000, 0.309017, -0.809017), 144 }
led_strip { 36, 903, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, -0.309017), (-0.850651, 0.000000, -0.525731), 144 }
led_strip { 36, 904, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, -0.309017), (-1.000000, 0.000000, 0.000000), 144 }
led_strip { 36, 905, 0, INTERPOLATE_POINTS, (-0.809017, 0.500000, -0.309017), (-0.809017, 0.500000, 0.309017), 144 }
led_strip { 37, 925, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.309017), (-0.525731, -0.850651, 0.000000), 144 }
led_strip { 37, 926, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.309017), (-0.809017, -0.500000, 0.309017), 144 }
led_strip { 37, 927, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.309017), (-1.000000, 0.000000, 0.000000), 144 }
led_strip { 37, 928, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.309017), (-0.850651, 0.000000, -0.525731), 144 }
led_strip { 37, 929, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.309017), (-0.500000, -0.309017, -0.809017), 144 }
led_strip { 37, 930, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.309017), (-0.309017, -0.809017, -0.500000), 144 }
led_strip { 38, 950, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.309017), (0.525731, 0.850651, 0.000000), 144 }
led_strip { 38, 951, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.309017), (0.809017, 0.500000, 0.309017), 144 }
led_strip { 38, 952, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.309017), (1.000000, 0.000000, 0.000000), 144 }
led_strip { 38, 953, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.309017), (0.850651, 0.000000, -0.525731), 144 }
led_strip { 38, 954, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.309017), (0.500000, 0.309017, -0.809017), 144 }
led_strip { 38, 955, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.309017), (0.309017, 0.809017, -0.500000), 144 }
led_strip { 39, 975, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, -0.309017), (0.525731, -0.850651, 0.000000), 144 }
led_strip { 39, 976, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, -0.309017), (0.309017, -0.809017, -0.500000), 144 }
led_strip { 39, 977, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, -0.309017), (0.500000, -0.309017, -0.809017), 144 }
led_strip { 39, 978, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, -0.309017), (0.850651, 0.000000, -0.525731), 144 }
led_strip { 39, 979, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, -0.309017), (1.000000, 0.000000, 0.000000), 144 }
led_strip { 39, 980, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, -0.309017), (0.809017, -0.500000, 0.309017), 144 }
led_strip { 40, 1000, 0, INTERPOLATE_POINTS, (0.000000, 1.000000, 0.000000), (0.525731, 0.850651, 0.000000), 144 }
led_strip { 40, 1001, 0, INTERPOLATE_POINTS, (0.000000, 1.000000, 0.000000), (0.309017, 0.809017, -0.500000), 144 }
led_strip { 40, 1002, 0, INTERPOLATE_POINTS, (0.000000, 1.000000, 0.000000), (-0.309017, 0.809017, -0.500000), 144 }
led_strip { 40, 1003, 0, INTERPOLATE_POINTS, (0.000000, 1.000000, 0.000000), (-0.525731, 0.850651, 0.000000), 144 }
led_strip { 40, 1004, 0, INTERPOLATE_POINTS, (0.000000, 1.000000, 0.000000), (-0.309017, 0.809017, 0.500000), 144 }
led_strip { 40, 1005, 0, INTERPOLATE_POINTS, (0.000000, 1.000000, 0.000000), (0.309017, 0.809017, 0.500000), 144 }
led_strip { 41, 1025, 0, INTERPOLATE_POINTS, (0.000000, -1.000000, 0.000000), (0.525731, -0.850651, 0.000000), 144 }
led_strip { 41, 1026, 0, INTERPOLATE_POINTS, (0.000000, -1.000000, 0.000000), (0.309017, -0.809017, 0.500000), 144 }
led_strip { 41, 1027, 0, INTERPOLATE_POINTS, (0.000000, -1.000000, 0.000000), (-0.309017, -0.809017, 0.500000), 144 }
led_strip { 41, 1028, 0, INTERPOLATE_POINTS, (0.000000, -1.000000, 0.000000), (-0.525731, -0.850651, 0.000000), 144 }
led_strip { 41, 1029, 0, INTERPOLATE_POINTS, (0.000000, -1.000000, 0.000000), (-0.309017, -0.809017, -0.500000), 144 }
led_strip { 41, 1030, 0, INTERPOLATE_POINTS, (0.000000, -1.000000, 0.000000), (0.309017, -0.809017, -0.500000), 144 }
led_strip { 0, 5, 0, INTERPOLATE_POINTS, (-0.005654, 0.530914, 0.844235), (-0.005654, 0.662347, 1.056898), 144 }
led_strip { 0, 6, 0, INTERPOLATE_POINTS, (0.005654, 0.651981, 1.069729), (0.005654, 0.520548, 0.857067), 144 }
led_strip { 0, 7, 0, INTERPOLATE_POINTS, (-0.009149, 0.521766, 0.849889), (-0.009149, 0.653199, 1.062552), 144 }
led_strip { 0, 8, 0, INTERPOLATE_POINTS, (0.002160, 0.642832, 1.075384), (0.002160, 0.511399, 0.862721), 144 }
led_strip { 1, 30, 0, INTERPOLATE_POINTS, (0.005654, -0.530914, 0.844235), (0.005654, -0.662347, 1.056898), 144 }
led_strip { 1, 31, 0, INTERPOLATE_POINTS, (-0.005654, -0.651981, 1.069729), (-0.005654, -0.520548, 0.857067), 144 }
led_strip { 1, 32, 0, INTERPOLATE_POINTS, (0.009149, -0.521766, 0.849889), (0.009149, -0.653199, 1.062552), 144 }
led_strip { 1, 33, 0, INTERPOLATE_POINTS, (-0.002160, -0.642832, 1.075384), (-0.002160, -0.511399, 0.862721), 144 }
led_strip { 2, 55, 0, INTERPOLATE_POINTS, (-0.005654, -0.530914, -0.844235), (-0.005654, -0.662347, -1.056898), 144 }
led_strip { 2, 56, 0, INTERPOLATE_POINTS, (0.005654, -0.651981, -1.069729), (0.005654, -0.520548, -0.857067), 144 }
led_strip { 2, 57, 0, INTERPOLATE_POINTS, (-0.009149, -0.521766, -0.849889), (-0.009149, -0.653199, -1.062552), 144 }
led_strip { 2, 58, 0, INTERPOLATE_POINTS, (0.002160, -0.642832, -1.075384), (0.002160, -0.511399, -0.862721), 144 }
led_strip { 3, 80, 0, INTERPOLATE_POINTS, (0.005654, 0.530914, -0.844235), (0.005654, 0.662347, -1.056898), 144 }
led_strip { 3, 81, 0, INTERPOLATE_POINTS, (-0.005654, 0.651981, -1.069729), (-0.005654, 0.520548, -0.857067), 144 }
led_strip { 3, 82, 0, INTERPOLATE_POINTS, (0.009149, 0.521766, -0.849889), (0.009149, 0.653199, -1.062552), 144 }
led_strip { 3, 83, 0, INTERPOLATE_POINTS, (-0.002160, 0.642832, -1.075384), (-0.002160, 0.511399, -0.862721), 144 }
led_strip { 4, 105, 0, INTERPOLATE_POINTS, (0.849889, 0.009149, 0.521766), (1.062552, 0.009149, 0.653199), 144 }
led_strip { 4, 106, 0, INTERPOLATE_POINTS, (1.064075, -0.009149, 0.661129), (0.851413, -0.009149, 0.529696), 144 }
led_strip { 4, 107, 0, INTERPOLATE_POINTS, (0.844235, 0.005654, 0.530914), (1.056898, 0.005654, 0.662347), 144 }
led_strip { 4, 108, 0, INTERPOLATE_POINTS, (1.058421, -0.012643, 0.670278), (0.845758, -0.012643, 0.538845), 144 }
led_strip { 5, 130, 0, INTERPOLATE_POINTS, (-0.844235, 0.005654, 0.530914), (-1.056898, 0.005654, 0.662347), 144 }
led_strip { 5, 131, 0, INTERPOLATE_POINTS, (-1.069729, -0.005654, 0.651981), (-0.857067, -0.005654, 0.520548), 144 }
led_strip { 5, 132, 0, INTERPOLATE_POINTS, (-0.849889, 0.009149, 0.521766), (-1.062552, 0.009149, 0.653199), 144 }
led_strip { 5, 133, 0, INTERPOLATE_POINTS, (-1.075384, -0.002160, 0.642832), (-0.862721, -0.002160, 0.511399), 144 }
led_strip { 6, 155, 0, INTERPOLATE_POINTS, (-0.849889, 0.009149, -0.521766), (-1.062552, 0.009149, -0.653199), 144 }
led_strip { 6, 156, 0, INTERPOLATE_POINTS, (-1.064075, -0.009149, -0.661129), (-0.851413, -0.009149, -0.529696), 144 }
led_strip { 6, 157, 0, INTERPOLATE_POINTS, (-0.844235, 0.005654, -0.530914), (-1.056898, 0.005654, -0.662347), 144 }
led_strip { 6, 158, 0, INTERPOLATE_POINTS, (-1.058421, -0.012643, -0.670278), (-0.845758, -0.012643, -0.538845), 144 }
led_strip { 7, 180, 0, INTERPOLATE_POINTS, (0.853383, 0.000000, -0.516112), (1.066046, 0.000000, -0.647545), 144 }
led_strip { 7, 181, 0, INTERPOLATE_POINTS, (1.060581, 0.000000, -0.666783), (0.847918, 0.000000, -0.535351), 144 }
led_strip { 7, 182, 0, INTERPOLATE_POINTS, (0.849889, -0.009149, -0.521766), (1.062552, -0.009149, -0.653199), 144 }
led_strip { 7, 183, 0, INTERPOLATE_POINTS, (1.057086, -0.009149, -0.672437), (0.844424, -0.009149, -0.541005), 144 }
led_strip { 8, 205, 0, INTERPOLATE_POINTS, (0.530914, 0.844235, -0.005654), (0.662347, 1.056898, -0.005654), 144 }
led_strip { 8, 206, 0, INTERPOLATE_POINTS, (0.651981, 1.069729, 0.005654), (0.520548, 0.857067, 0.005654), 144 }
led_strip { 8, 207, 0, INTERPOLATE_POINTS, (0.521766, 0.849889, -0.009149), (0.653199, 1.062552, -0.009149), 144 }
led_strip { 8, 208, 0, INTERPOLATE_POINTS, (0.642832, 1.075384, 0.002160), (0.511399, 0.862721, 0.002160), 144 }
led_strip { 9, 230, 0, INTERPOLATE_POINTS, (-0.530914, 0.844235, -0.005654), (-0.662347, 1.056898, -0.005654), 144 }
led_strip { 9, 231, 0, INTERPOLATE_POINTS, (-0.651981, 1.069729, 0.005654), (-0.520548, 0.857067, 0.005654), 144 }
led_strip { 9, 232, 0, INTERPOLATE_POINTS, (-0.530914, 0.844235, 0.005654), (-0.662347, 1.056898, 0.005654), 144 }
led_strip { 9, 233, 0, INTERPOLATE_POINTS, (-0.651981, 1.069729, 0.016962), (-0.520548, 0.857067, 0.016962), 144 }
led_strip { 10, 255, 0, INTERPOLATE_POINTS, (-0.530914, -0.844235, 0.005654), (-0.662347, -1.056898, 0.005654), 144 }
led_strip { 10, 256, 0, INTERPOLATE_POINTS, (-0.651981, -1.069729, -0.005654), (-0.520548, -0.857067, -0.005654), 144 }
led_strip { 10, 257, 0, INTERPOLATE_POINTS, (-0.530914, -0.844235, -0.005654), (-0.662347, -1.056898, -0.005654), 144 }
led_strip { 10, 258, 0, INTERPOLATE_POINTS, (-0.651981, -1.069729, -0.016962), (-0.520548, -0.857067, -0.016962), 144 }
led_strip { 11, 280, 0, INTERPOLATE_POINTS, (0.530914, -0.844235, 0.005654), (0.662347, -1.056898, 0.005654), 144 }
led_strip { 11, 281, 0, INTERPOLATE_POINTS, (0.651981, -1.069729, -0.005654), (0.520548, -0.857067, -0.005654), 144 }
led_strip { 11, 282, 0, INTERPOLATE_POINTS, (0.521766, -0.849889, 0.009149), (0.653199, -1.062552, 0.009149), 144 }
led_strip { 11, 283, 0, INTERPOLATE_POINTS, (0.642832, -1.075384, -0.002160), (0.511399, -0.862721, -0.002160), 144 }
led_strip { 12, 306, 0, INTERPOLATE_POINTS, (0.000000, 0.009619, 0.997267), (0.000000, 0.009619, 1.247267), 144 }
led_strip { 12, 307, 0, INTERPOLATE_POINTS, (0.000000, -0.009619, 1.252733), (0.000000, -0.009619, 1.002733), 144 }
led_strip { 12, 308, 0, INTERPOLATE_POINTS, (-0.008090, 0.005000, 0.996910), (-0.008090, 0.005000, 1.246910), 144 }
led_strip { 12, 309, 0, INTERPOLATE_POINTS, (-0.008090, -0.014239, 1.252375), (-0.008090, -0.014239, 1.002375), 144 }
led_strip { 13, 331, 0, INTERPOLATE_POINTS, (0.506416, 0.303363, 0.803834), (0.631416, 0.380617, 1.006088), 144 }
led_strip { 13, 332, 0, INTERPOLATE_POINTS, (0.618584, 0.391925, 1.016455), (0.493584, 0.314671, 0.814200), 144 }
led_strip { 13, 333, 0, INTERPOLATE_POINTS, (0.505000, 0.312107, 0.800927), (0.630000, 0.389361, 1.003181), 144 }
led_strip { 13, 334, 0, INTERPOLATE_POINTS, (0.617168, 0.400670, 1.013548), (0.492168, 0.323415, 0.811293), 144 }
led_strip { 14, 356, 0, INTERPOLATE_POINTS, (-0.490851, 0.312982, 0.809779), (-0.615851, 0.390236, 1.012033), 144 }
led_strip { 14, 357, 0, INTERPOLATE_POINTS, (-0.634149, 0.382306, 1.010509), (-0.509149, 0.305052, 0.808255), 144 }
led_strip { 14, 358, 0, INTERPOLATE_POINTS, (-0.496910, 0.317107, 0.804017), (-0.621910, 0.394361, 1.006271), 144 }
led_strip { 14, 359, 0, INTERPOLATE_POINTS, (-0.640207, 0.386431, 1.004748), (-0.515207, 0.309177, 0.802493), 144 }
led_strip { 15, 381, 0, INTERPOLATE_POINTS, (0.312982, 0.809779, 0.490851), (0.390236, 1.012033, 0.615851), 144 }
led_strip { 15, 382, 0, INTERPOLATE_POINTS, (0.382306, 1.010509, 0.634149), (0.305052, 0.808255, 0.509149), 144 }
led_strip { 15, 383, 0, INTERPOLATE_POINTS, (0.304017, 0.812107, 0.491910), (0.381271, 1.014361, 0.616910), 144 }
led_strip { 15, 384, 0, INTERPOLATE_POINTS, (0.373341, 1.012838, 0.635207), (0.296086, 0.810584, 0.510207), 144 }
led_strip { 16, 406, 0, INTERPOLATE_POINTS, (-0.312982, 0.809779, 0.490851), (-0.390236, 1.012033, 0.615851), 144 }
led_strip { 16, 407, 0, INTERPOLATE_POINTS, (-0.382306, 1.010509, 0.634149), (-0.305052, 0.808255, 0.509149), 144 }
led_strip { 16, 408, 0, INTERPOLATE_POINTS, (-0.317107, 0.804017, 0.496910), (-0.394361, 1.006271, 0.621910), 144 }
led_strip { 16, 409, 0, INTERPOLATE_POINTS, (-0.386431, 1.004748, 0.640207), (-0.309177, 0.802493, 0.515207), 144 }
led_strip { 17, 431, 0, INTERPOLATE_POINTS, (0.506416, -0.303363, 0.803834), (0.631416, -0.380617, 1.006088), 144 }
led_strip { 17, 432, 0, INTERPOLATE_POINTS, (0.618584, -0.391925, 1.016455), (0.493584, -0.314671, 0.814200), 144 }
led_strip { 17, 433, 0, INTERPOLATE_POINTS, (0.500000, -0.299017, 0.809017), (0.625000, -0.376271, 1.011271), 144 }
led_strip { 17, 434, 0, INTERPOLATE_POINTS, (0.612168, -0.387580, 1.021638), (0.487168, -0.310325, 0.819384), 144 }
led_strip { 18, 456, 0, INTERPOLATE_POINTS, (-0.506416, -0.303363, 0.803834), (-0.631416, -0.380617, 1.006088), 144 }
led_strip { 18, 457, 0, INTERPOLATE_POINTS, (-0.618584, -0.391925, 1.016455), (-0.493584, -0.314671, 0.814200), 144 }
led_strip { 18, 458, 0, INTERPOLATE_POINTS, (-0.505000, -0.312107, 0.800927), (-0.630000, -0.389361, 1.003181), 144 }
led_strip { 18, 459, 0, INTERPOLATE_POINTS, (-0.617168, -0.400670, 1.013548), (-0.492168, -0.323415, 0.811293), 144 }
led_strip { 19, 481, 0, INTERPOLATE_POINTS, (-0.303363, -0.803834, 0.506416), (-0.380617, -1.006088, 0.631416), 144 }
led_strip { 19, 482, 0, INTERPOLATE_POINTS, (-0.391925, -1.016455, 0.618584), (-0.314671, -0.814200, 0.493584), 144 }
led_strip { 19, 483, 0, INTERPOLATE_POINTS, (-0.312107, -0.800927, 0.505000), (-0.389361, -1.003181, 0.630000), 144 }
led_strip { 19, 484, 0, INTERPOLATE_POINTS, (-0.400670, -1.013548, 0.617168), (-0.323415, -0.811293, 0.492168), 144 }
led_strip { 20, 506, 0, INTERPOLATE_POINTS, (0.312982, -0.809779, 0.490851), (0.390236, -1.012033, 0.615851), 144 }
led_strip { 20, 507, 0, INTERPOLATE_POINTS, (0.382306, -1.010509, 0.634149), (0.305052, -0.808255, 0.509149), 144 }
led_strip { 20, 508, 0, INTERPOLATE_POINTS, (0.317107, -0.804017, 0.496910), (0.394361, -1.006271, 0.621910), 144 }
led_strip { 20, 509, 0, INTERPOLATE_POINTS, (0.386431, -1.004748, 0.640207), (0.309177, -0.802493, 0.515207), 144 }
led_strip { 21, 531, 0, INTERPOLATE_POINTS, (0.000000, 0.009619, -0.997267), (0.000000, 0.009619, -1.247267), 144 }
led_strip { 21, 532, 0, INTERPOLATE_POINTS, (0.000000, -0.009619, -1.252733), (0.000000, -0.009619, -1.002733), 144 }
led_strip { 21, 533, 0, INTERPOLATE_POINTS, (0.008090, 0.005000, -0.996910), (0.008090, 0.005000, -1.246910), 144 }
led_strip { 21, 534, 0, INTERPOLATE_POINTS, (0.008090, -0.014239, -1.252375), (0.008090, -0.014239, -1.002375), 144 }
led_strip { 22, 556, 0, INTERPOLATE_POINTS, (-0.506416, -0.303363, -0.803834), (-0.631416, -0.380617, -1.006088), 144 }
led_strip { 22, 557, 0, INTERPOLATE_POINTS, (-0.618584, -0.391925, -1.016455), (-0.493584, -0.314671, -0.814200), 144 }
led_strip { 22, 558, 0, INTERPOLATE_POINTS, (-0.500000, -0.299017, -0.809017), (-0.625000, -0.376271, -1.011271), 144 }
led_strip { 22, 559, 0, INTERPOLATE_POINTS, (-0.612168, -0.387580, -1.021638), (-0.487168, -0.310325, -0.819384), 144 }
led_strip { 23, 581, 0, INTERPOLATE_POINTS, (0.506416, -0.303363, -0.803834), (0.631416, -0.380617, -1.006088), 144 }
led_strip { 23, 582, 0, INTERPOLATE_POINTS, (0.618584, -0.391925, -1.016455), (0.493584, -0.314671, -0.814200), 144 }
led_strip { 23, 583, 0, INTERPOLATE_POINTS, (0.505000, -0.312107, -0.800927), (0.630000, -0.389361, -1.003181), 144 }
led_strip { 23, 584, 0, INTERPOLATE_POINTS, (0.617168, -0.400670, -1.013548), (0.492168, -0.323415, -0.811293), 144 }
led_strip { 24, 606, 0, INTERPOLATE_POINTS, (-0.312982, -0.809779, -0.490851), (-0.390236, -1.012033, -0.615851), 144 }
led_strip { 24, 607, 0, INTERPOLATE_POINTS, (-0.382306, -1.010509, -0.634149), (-0.305052, -0.808255, -0.509149), 144 }
led_strip { 24, 608, 0, INTERPOLATE_POINTS, (-0.317107, -0.804017, -0.496910), (-0.394361, -1.006271, -0.621910), 144 }
led_strip { 24, 609, 0, INTERPOLATE_POINTS, (-0.386431, -1.004748, -0.640207), (-0.309177, -0.802493, -0.515207), 144 }
led_strip { 25, 631, 0, INTERPOLATE_POINTS, (0.312982, -0.809779, -0.490851), (0.390236, -1.012033, -0.615851), 144 }
led_strip { 25, 632, 0, INTERPOLATE_POINTS, (0.382306, -1.010509, -0.634149), (0.305052, -0.808255, -0.509149), 144 }
led_strip { 25, 633, 0, INTERPOLATE_POINTS, (0.304017, -0.812107, -0.491910), (0.381271, -1.014361, -0.616910), 144 }
led_strip { 25, 634, 0, INTERPOLATE_POINTS, (0.373341, -1.012838, -0.635207), (0.296086, -0.810584, -0.510207), 144 }
led_strip { 26, 656, 0, INTERPOLATE_POINTS, (-0.490851, 0.312982, -0.809779), (-0.615851, 0.390236, -1.012033), 144 }
led_strip { 26, 657, 0, INTERPOLATE_POINTS, (-0.634149, 0.382306, -1.010509), (-0.509149, 0.305052, -0.808255), 144 }
led_strip { 26, 658, 0, INTERPOLATE_POINTS, (-0.491910, 0.304017, -0.812107), (-0.616910, 0.381271, -1.014361), 144 }
led_strip { 26, 659, 0, INTERPOLATE_POINTS, (-0.635207, 0.373341, -1.012838), (-0.510207, 0.296086, -0.810584), 144 }
led_strip { 27, 681, 0, INTERPOLATE_POINTS, (0.490851, 0.312982, -0.809779), (0.615851, 0.390236, -1.012033), 144 }
led_strip { 27, 682, 0, INTERPOLATE_POINTS, (0.634149, 0.382306, -1.010509), (0.509149, 0.305052, -0.808255), 144 }
led_strip { 27, 683, 0, INTERPOLATE_POINTS, (0.496910, 0.317107, -0.804017), (0.621910, 0.394361, -1.006271), 144 }
led_strip { 27, 684, 0, INTERPOLATE_POINTS, (0.640207, 0.386431, -1.004748), (0.515207, 0.309177, -0.802493), 144 }
led_strip { 28, 706, 0, INTERPOLATE_POINTS, (0.312982, 0.809779, -0.490851), (0.390236, 1.012033, -0.615851), 144 }
led_strip { 28, 707, 0, INTERPOLATE_POINTS, (0.382306, 1.010509, -0.634149), (0.305052, 0.808255, -0.509149), 144 }
led_strip { 28, 708, 0, INTERPOLATE_POINTS, (0.317107, 0.804017, -0.496910), (0.394361, 1.006271, -0.621910), 144 }
led_strip { 28, 709, 0, INTERPOLATE_POINTS, (0.386431, 1.004748, -0.640207), (0.309177, 0.802493, -0.515207), 144 }
led_strip { 29, 731, 0, INTERPOLATE_POINTS, (-0.312982, 0.809779, -0.490851), (-0.390236, 1.012033, -0.615851), 144 }
led_strip { 29, 732, 0, INTERPOLATE_POINTS, (-0.382306, 1.010509, -0.634149), (-0.305052, 0.808255, -0.509149), 144 }
led_strip { 29, 733, 0, INTERPOLATE_POINTS, (-0.304017, 0.812107, -0.491910), (-0.381271, 1.014361, -0.616910), 144 }
led_strip { 29, 734, 0, INTERPOLATE_POINTS, (-0.373341, 1.012838, -0.635207), (-0.296086, 0.810584, -0.510207), 144 }
led_strip { 30, 756, 0, INTERPOLATE_POINTS, (0.997267, 0.000000, -0.009619), (1.247267, 0.000000, -0.009619), 144 }
led_strip { 30, 757, 0, INTERPOLATE_POINTS, (1.252733, 0.000000, 0.009619), (1.002733, 0.000000, 0.009619), 144 }
led_strip { 30, 758, 0, INTERPOLATE_POINTS, (0.996910, 0.008090, -0.005000), (1.246910, 0.008090, -0.005000), 144 }
led_strip { 30, 759, 0, INTERPOLATE_POINTS, (1.252375, 0.008090, 0.014239), (1.002375, 0.008090, 0.014239), 144 }
led_strip { 31, 781, 0, INTERPOLATE_POINTS, (0.803834, 0.506416, 0.303363), (1.006088, 0.631416, 0.380617), 144 }
led_strip { 31, 782, 0, INTERPOLATE_POINTS, (1.016455, 0.618584, 0.391925), (0.814200, 0.493584, 0.314671), 144 }
led_strip { 31, 783, 0, INTERPOLATE_POINTS, (0.800927, 0.505000, 0.312107), (1.003181, 0.630000, 0.389361), 144 }
led_strip { 31, 784, 0, INTERPOLATE_POINTS, (1.013548, 0.617168, 0.400670), (0.811293, 0.492168, 0.323415), 144 }
led_strip { 32, 806, 0, INTERPOLATE_POINTS, (0.803834, -0.506416, 0.303363), (1.006088, -0.631416, 0.380617), 144 }
led_strip { 32, 807, 0, INTERPOLATE_POINTS, (1.016455, -0.618584, 0.391925), (0.814200, -0.493584, 0.314671), 144 }
led_strip { 32, 808, 0, INTERPOLATE_POINTS, (0.809017, -0.500000, 0.299017), (1.011271, -0.625000, 0.376271), 144 }
led_strip { 32, 809, 0, INTERPOLATE_POINTS, (1.021638, -0.612168, 0.387580), (0.819384, -0.487168, 0.310325), 144 }
led_strip { 33, 831, 0, INTERPOLATE_POINTS, (-0.997267, 0.000000, 0.009619), (-1.247267, 0.000000, 0.009619), 144 }
led_strip { 33, 832, 0, INTERPOLATE_POINTS, (-1.252733, 0.000000, -0.009619), (-1.002733, 0.000000, -0.009619), 144 }
led_strip { 33, 833, 0, INTERPOLATE_POINTS, (-0.996910, 0.008090, 0.005000), (-1.246910, 0.008090, 0.005000), 144 }
led_strip { 33, 834, 0, INTERPOLATE_POINTS, (-1.252375, 0.008090, -0.014239), (-1.002375, 0.008090, -0.014239), 144 }
led_strip { 34, 856, 0, INTERPOLATE_POINTS, (-0.809779, 0.490851, 0.312982), (-1.012033, 0.615851, 0.390236), 144 }
led_strip { 34, 857, 0, INTERPOLATE_POINTS, (-1.010509, 0.634149, 0.382306), (-0.808255, 0.509149, 0.305052), 144 }
led_strip { 34, 858, 0, INTERPOLATE_POINTS, (-0.804017, 0.496910, 0.317107), (-1.006271, 0.621910, 0.394361), 144 }
led_strip { 34, 859, 0, INTERPOLATE_POINTS, (-1.004748, 0.640207, 0.386431), (-0.802493, 0.515207, 0.309177), 144 }
led_strip { 35, 881, 0, INTERPOLATE_POINTS, (-0.809779, -0.490851, 0.312982), (-1.012033, -0.615851, 0.390236), 144 }
led_strip { 35, 882, 0, INTERPOLATE_POINTS, (-1.010509, -0.634149, 0.382306), (-0.808255, -0.509149, 0.305052), 144 }
led_strip { 35, 883, 0, INTERPOLATE_POINTS, (-0.812107, -0.491910, 0.304017), (-1.014361, -0.616910, 0.381271), 144 }
led_strip { 35, 884, 0, INTERPOLATE_POINTS, (-1.012838, -0.635207, 0.373341), (-0.810584, -0.510207, 0.296086), 144 }
led_strip { 36, 906, 0, INTERPOLATE_POINTS, (-0.803834, 0.506416, -0.303363), (-1.006088, 0.631416, -0.380617), 144 }
led_strip { 36, 907, 0, INTERPOLATE_POINTS, (-1.016455, 0.618584, -0.391925), (-0.814200, 0.493584, -0.314671), 144 }
led_strip { 36, 908, 0, INTERPOLATE_POINTS, (-0.800927, 0.505000, -0.312107), (-1.003181, 0.630000, -0.389361), 144 }
led_strip { 36, 909, 0, INTERPOLATE_POINTS, (-1.013548, 0.617168, -0.400670), (-0.811293, 0.492168, -0.323415), 144 }
led_strip { 37, 931, 0, INTERPOLATE_POINTS, (-0.803834, -0.506416, -0.303363), (-1.006088, -0.631416, -0.380617), 144 }
led_strip { 37, 932, 0, INTERPOLATE_POINTS, (-1.016455, -0.618584, -0.391925), (-0.814200, -0.493584, -0.314671), 144 }
led_strip { 37, 933, 0, INTERPOLATE_POINTS, (-0.809017, -0.500000, -0.299017), (-1.011271, -0.625000, -0.376271), 144 }
led_strip { 37, 934, 0, INTERPOLATE_POINTS, (-1.021638, -0.612168, -0.387580), (-0.819384, -0.487168, -0.310325), 144 }
led_strip { 38, 956, 0, INTERPOLATE_POINTS, (0.803834, 0.506416, -0.303363), (1.006088, 0.631416, -0.380617), 144 }
led_strip { 38, 957, 0, INTERPOLATE_POINTS, (1.016455, 0.618584, -0.391925), (0.814200, 0.493584, -0.314671), 144 }
led_strip { 38, 958, 0, INTERPOLATE_POINTS, (0.809017, 0.500000, -0.299017), (1.011271, 0.625000, -0.376271), 144 }
led_strip { 38, 959, 0, INTERPOLATE_POINTS, (1.021638, 0.612168, -0.387580), (0.819384, 0.487168, -0.310325), 144 }
led_strip { 39, 981, 0, INTERPOLATE_POINTS, (0.803834, -0.506416, -0.303363), (1.006088, -0.631416, -0.380617), 144 }
led_strip { 39, 982, 0, INTERPOLATE_POINTS, (1.016455, -0.618584, -0.391925), (0.814200, -0.493584, -0.314671), 144 }
led_strip { 39, 983, 0, INTERPOLATE_POINTS, (0.800927, -0.505000, -0.312107), (1.003181, -0.630000, -0.389361), 144 }
led_strip { 39, 984, 0, INTERPOLATE_POINTS, (1.013548, -0.617168, -0.400670), (0.811293, -0.492168, -0.323415), 144 }
led_strip { 40, 1006, 0, INTERPOLATE_POINTS, (0.009619, 0.997267, 0.000000), (0.009619, 1.247267, 0.000000), 144 }
led_strip { 40, 1007, 0, INTERPOLATE_POINTS, (-0.009619, 1.252733, 0.000000), (-0.009619, 1.002733, 0.000000), 144 }
led_strip { 40, 1008, 0, INTERPOLATE_POINTS, (0.005000, 0.996910, -0.008090), (0.005000, 1.246910, -0.008090), 144 }
led_strip { 40, 1009, 0, INTERPOLATE_POINTS, (-0.014239, 1.252375, -0.008090), (-0.014239, 1.002375, -0.008090), 144 }
led_strip { 41, 1031, 0, INTERPOLATE_POINTS, (0.009619, -0.997267, 0.000000), (0.009619, -1.247267, 0.000000), 144 }
led_strip { 41, 1032, 0, INTERPOLATE_POINTS, (-0.009619, -1.252733, 0.000000), (-0.009619, -1.002733, 0.000000), 144 }
led_strip { 41, 1033, 0, INTERPOLATE_POINTS, (0.005000, -0.996910, 0.008090), (0.005000, -1.246910, 0.008090), 144 }
led_strip { 41, 1034, 0, INTERPOLATE_POINTS, (-0.014239, -1.252375, 0.008090), (-0.014239, -1.002375, 0.008090), 144 }
END_OF_ASSEMBLY_FILE

20
data/shrumen_lumen.fold Normal file
View File

@ -0,0 +1,20 @@
led_strip_count 16
led_strip { 0, 1, 0, INTERPOLATE_POINTS, (0.0, 0.75, 0.0), (1.0, 0.75, 0.0), 90 }
led_strip { 0, 2, 0, INTERPOLATE_POINTS, (0.0, 0.75, 0.0), (0.66, 0.75, 0.33), 90 }
led_strip { 0, 3, 0, INTERPOLATE_POINTS, (0.0, 0.75, 0.0), (0.33, 0.75, 0.66), 90 }
led_strip { 0, 4, 0, INTERPOLATE_POINTS, (0.0, 0.75, 0.0), (0.0, 0.75, 1.0), 90 }
led_strip { 0, 5, 0, INTERPOLATE_POINTS, (0.0, 0.75, 0.0), (-0.33, 0.75, 0.66), 90 }
led_strip { 0, 6, 0, INTERPOLATE_POINTS, (0.0, 0.75, 0.0), (-0.66, 0.75, 0.33), 90 }
led_strip { 0, 7, 0, INTERPOLATE_POINTS, (0.0, 0.75, 0.0), (-1.0, 0.75, 0.0), 90 }
led_strip { 0, 8, 0, INTERPOLATE_POINTS, (0.0, 0.75, 0.0), (-0.66, 0.75, -0.33), 90 }
led_strip { 0, 9, 0, INTERPOLATE_POINTS, (0.0, 0.75, 0.0), (-0.33, 0.75, -0.66), 90 }
led_strip { 0, 10, 0, INTERPOLATE_POINTS, (0.0, 0.75, 0.0), (0.0, 0.75, -1.0), 90 }
led_strip { 0, 11, 0, INTERPOLATE_POINTS, (0.0, 0.75, 0.0), (0.33, 0.75, -0.66), 90 }
led_strip { 0, 12, 0, INTERPOLATE_POINTS, (0.0, 0.75, 0.0), (0.66, 0.75, -0.33), 90 }
led_strip { 0, 41, 0, INTERPOLATE_POINTS, (0.05, -0.75, 0.0), (0.05, 0.0, 0.0), 170 }
led_strip { 0, 42, 0, INTERPOLATE_POINTS, (0.05, 0.0, 0.0), (0.05, 0.75, 0.0), 130 }
led_strip { 0, 43, 0, INTERPOLATE_POINTS, (-0.05, -0.75, 0.0), (-0.05, 0.0, 0.0), 170 }
led_strip { 0, 44, 0, INTERPOLATE_POINTS, (-0.05, 0.0, 0.0), (-0.05, 0.75, 0.0), 130 }
END_OF_ASSEMBLY_FILE

BIN
data/splash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

14
data/test_assembly.fold Normal file
View File

@ -0,0 +1,14 @@
control_box_count 4
led_strip_count 4
control_box { 0, "192.168.0.1", (1, 1, 1) }
control_box { 1, "192.168.0.2", (-1, 1, 1) }
control_box { 2, "192.168.0.3", (-1, 1, -1) }
control_box { 3, "192.168.0.4", (1, 1, -1) }
led_strip { 0, 1, 0, INTERPOLATE_POINTS, (1.0, 1.0, 1.0), (-1.0, 1.0, 1.0), 144 }
led_strip { 1, 2, 0, INTERPOLATE_POINTS, (-1.0, 1.0, 1.0), (-1.0, 1.0, -1.0), 144 }
led_strip { 2, 3, 0, INTERPOLATE_POINTS, (-1.0, 1.0, -1.0), (1.0, 1.0, -1.0), 144 }
led_strip { 3, 4, 0, INTERPOLATE_POINTS, (1.0, 1.0, -1.0), (1.0, 1.0, 1.0), 144 }
END_OF_ASSEMBLY_FILE

View File

@ -1,89 +0,0 @@
internal void
InitializeInputCommandRegistry (input_command_registry* CommandRegistry,
s32 Size,
memory_arena* Storage)
{
CommandRegistry->Commands = PushArray(Storage, input_command, Size);
CommandRegistry->Size = Size;
CommandRegistry->Used = 0;
}
internal input_command*
FindExistingCommand (input_command_registry* CommandRegistry, key_code Key, key_code Mdfr)
{
input_command* Result = 0;
for (s32 Cmd = 0; Cmd < CommandRegistry->Used; Cmd++)
{
input_command* Command = CommandRegistry->Commands + Cmd;
if (Command->Key == Key && Command->Mdfr == Mdfr)
{
Result = Command;
break;
}
}
return Result;
}
internal void
RegisterKeyPressCommand (input_command_registry* CommandRegistry,
key_code Key,
b32 Held,
key_code Mdfr,
input_command_proc* Proc)
{
input_command* Command = FindExistingCommand(CommandRegistry, Key, Mdfr);
if (!Command)
{
Assert(CommandRegistry->Size > CommandRegistry->Used);
Assert(Mdfr == KeyCode_Invalid || Mdfr == KeyCode_LeftShift || Mdfr == KeyCode_RightShift ||
Mdfr == KeyCode_LeftCtrl || Mdfr == KeyCode_RightCtrl || Mdfr == KeyCode_Alt);
Command = CommandRegistry->Commands + CommandRegistry->Used++;
}
Command->Key = Key;
Command->Held = Held;
Command->Mdfr = Mdfr;
Command->Proc = Proc;
}
internal void
RegisterMouseWheelCommand (input_command_registry* CommandRegistry,
input_command_proc* Proc)
{
CommandRegistry->MouseWheelCommand = Proc;
}
internal void
ExecuteAllRegisteredCommands (input_command_registry* CommandRegistry,
input Input,
app_state* State)
{
if (Input.New->MouseScroll != 0)
{
CommandRegistry->MouseWheelCommand(State, Input);
}
for (s32 i = 0; i < CommandRegistry->Used; i++)
{
input_command Command = CommandRegistry->Commands[i];
if (Command.Held)
{
if (KeyDown(Input, Command.Key) &&
(Command.Mdfr == KeyCode_Invalid || KeyDown(Input, Command.Mdfr)))
{
Command.Proc(State, Input);
}
}
else
{
if (KeyTransitionedDown(Input, Command.Key) &&
(Command.Mdfr == KeyCode_Invalid || KeyDown(Input, Command.Mdfr)))
{
Command.Proc(State, Input);
}
}
}
}

View File

@ -1,68 +0,0 @@
FOLDHAUS_INPUT_COMMAND_PROC(CameraMouseControl)
{
if (State->NodeInteraction.NodeOffset >= 0) { return; }
if (KeyTransitionedDown(Input, KeyCode_MouseLeftButton))
{
State->Camera_StartDragPos = V4(State->Camera.Position, 1);
}
if (KeyTransitionedUp(Input, KeyCode_MouseLeftButton))
{
State->Camera_StartDragPos = V4(State->Camera.Position, 1);
}
else
{
if (!State->DrawUniverseOutputDisplay)
{
v2 DeltaPos = v2{
(r32)(Input.New->MouseX - Input.MouseDownX),
(r32)(Input.New->MouseY - Input.MouseDownY)
};
m44 XRotation = GetXRotation(-DeltaPos.y * State->PixelsToWorldScale);
m44 YRotation = GetYRotation(DeltaPos.x * State->PixelsToWorldScale);
m44 Combined = XRotation * YRotation;
State->Camera.Position = V3(Combined * State->Camera_StartDragPos);
}
else
{
v2 DeltaPos = v2{
(r32)(Input.New->MouseX - Input.Old->MouseX),
(r32)(Input.New->MouseY - Input.Old->MouseY)
};
State->UniverseOutputDisplayOffset += DeltaPos;
}
}
}
FOLDHAUS_INPUT_COMMAND_PROC(CameraMouseZoom)
{
if (State->DrawUniverseOutputDisplay)
{
r32 DeltaZoom = (r32)(Input.New->MouseScroll) / 120;
State->UniverseOutputDisplayZoom = GSClamp(0.1f, State->UniverseOutputDisplayZoom + DeltaZoom, 4.f);
}
}
FOLDHAUS_INPUT_COMMAND_PROC(ToggleUniverseDebugView)
{
State->DrawUniverseOutputDisplay = !State->DrawUniverseOutputDisplay;
}
FOLDHAUS_INPUT_COMMAND_PROC(OpenNodeLister)
{
State->InterfaceShowNodeList = true;
State->NodeListMenuPosition = v2{(r32)Input.New->MouseX, (r32)Input.New->MouseY};
SetTextInputDestinationToString(&State->ActiveTextEntry, &State->GeneralPurposeSearchString);
State->ActiveCommands = &State->NodeListerCommandRegistry;
}
FOLDHAUS_INPUT_COMMAND_PROC(ToggleNodeDisplay)
{
State->NodeRenderSettings.Display = !State->NodeRenderSettings.Display;
}

27
generated_old.cpp Normal file
View File

@ -0,0 +1,27 @@
node_struct_member MemberList_multiply_data[] = {
{ MemberType_r32, "A", (u64)&(((multiply_data*)0)->A), IsInputMember},
{ MemberType_r32, "B", (u64)&(((multiply_data*)0)->B), IsInputMember},
{ MemberType_r32, "Result", (u64)&(((multiply_data*)0)->Result), IsOutputMember},
};
enum node_type
{
NodeType_MultiplyNodeProc,
};
node_specification NodeSpecifications[] = {
{ NodeType_MultiplyNodeProc, "Multiply", 8, MemberList_multiply_data, 3, 2, 1},
};
s32 NodeSpecificationsCount = 1;
internal void
CallNodeProc (interface_node* Node, u8* Data)
{
switch (Node->Type)
{
case NodeType_MultiplyNodeProc:
{
MultiplyNodeProc((multiply_data*)Data);
} break;
}
}

View File

26
meta/build.bat Normal file
View File

@ -0,0 +1,26 @@
@echo off
set ProjectDevRoot=C:\projects
set ProjectName=foldhaus
set ProjectDevPath=%ProjectDevRoot%\%ProjectName%
pushd %ProjectDevPath%
IF NOT EXIST .\build\ mkdir .\build
C:\programs\ctime\ctime.exe -begin %ProjectDevPath%\build\win32_gs_meta_build_time.ctm
set CommonCompilerFlags=-nologo -DDEBUG=1 -DPLATFORM_WINDOWS -FC -WX -W4 -Z7 -Oi -GR- -EHsc -EHa- -MTd -fp:fast -fp:except-
set CommonCompilerFlags=-wd4127 -wd4702 -wd4101 -wd4505 -wd4100 -wd4189 -wd4244 -wd4201 -wd4996 -I%CommonLibs% -O2 %CommonCompilerFlags%
set CommonLinkerFlags= -opt:ref
pushd build
del *.pdb > NUL 2> NUL
REM cl %CommonCompilerFlags% ..\meta\main_meta.cpp /link %CommonLinkerFlags% user32.lib winmm.lib gdi32.lib -incremental:no
cl %CommonCompilerFlags% ..\meta\foldhaus_meta.cpp /link %CommonLinkerFlags%
C:\programs\ctime\ctime.exe -end C:\projects\foldhaus\build\win32_gs_meta_build_time.ctm %LastError%
C:\programs\ctime\ctime.exe -stats C:\projects\foldhaus\build\win32_gs_meta_build_time.ctm
popd

749
meta/foldhaus_meta.cpp Normal file
View File

@ -0,0 +1,749 @@
#include "..\src\gs_language.h"
#include "..\src\foldhaus_memory.h"
#include "..\src\gs_string.h"
#include "gs_meta_error.h"
#include "gs_meta_lexer.h"
#include <windows.h>
#include <stdio.h>
error_list GlobalErrorList = {};
PLATFORM_ALLOC(StdAlloc)
{
platform_memory_result Result = {};
Result.Base = (u8*)malloc(Size);
Result.Size = Size;
Result.Error = 0;
return Result;
}
struct source_code_file
{
string Path;
s32 FileSize;
string Contents;
};
struct code_block_builder
{
memory_arena Data;
string String;
};
#define TYPE_TABLE_IDENTIFIER_MAX_LENGTH 128
#define TYPE_TABLE_BUFFER_MAX 64
struct type_table_buffer
{
u8* IdentifiersBackbuffer;
string* Identifiers;
s32* Sizes;
s32 Used;
s32 Max;
type_table_buffer* Next;
};
struct type_table
{
type_table_buffer* Head;
s32 TotalUsed;
s32 TotalMax;
};
internal void
AddTypeToTable (string Identifier, s32 Size, type_table* Table)
{
if (!Table->Head || Table->TotalUsed >= Table->TotalMax)
{
s32 NewHeadSize = sizeof(type_table_buffer) + ((sizeof(string) + TYPE_TABLE_IDENTIFIER_MAX_LENGTH + sizeof(s32)) * TYPE_TABLE_BUFFER_MAX);
u8* NewHeadBuffer = (u8*)malloc(NewHeadSize);
static_memory_arena Memory = CreateMemoryArena(NewHeadBuffer, NewHeadSize);
type_table_buffer* NewHead = PushStruct(&Memory, type_table_buffer);
NewHead->IdentifiersBackbuffer = PushArray(&Memory, u8, TYPE_TABLE_IDENTIFIER_MAX_LENGTH * TYPE_TABLE_BUFFER_MAX);
NewHead->Identifiers = PushArray(&Memory, string, TYPE_TABLE_BUFFER_MAX);
NewHead->Sizes = PushArray(&Memory, s32, TYPE_TABLE_BUFFER_MAX);
NewHead->Used = 0;
NewHead->Max = TYPE_TABLE_BUFFER_MAX;
NewHead->Next = 0;
// Init Strings
for (s32 i = 0; i < NewHead->Max; i++)
{
string* String = NewHead->Identifiers + i;
u8* Backbuffer = NewHead->IdentifiersBackbuffer + (TYPE_TABLE_IDENTIFIER_MAX_LENGTH * i);
InitializeString(String, (char*)Backbuffer, 0, TYPE_TABLE_IDENTIFIER_MAX_LENGTH);
}
if (Table->Head) { NewHead->Next = Table->Head; }
Table->Head = NewHead;
Table->TotalMax += NewHead->Max;
}
s32 TypeIndex = Table->Head->Used++;
string* DestIdentifier = Table->Head->Identifiers + TypeIndex;
CopyStringTo(Identifier, DestIdentifier);
Table->Head->Sizes[TypeIndex] = Size;
}
internal s32
GetSizeOfType (string Identifier, type_table* TypeTable)
{
s32 Result = -1;
type_table_buffer* Buffer = TypeTable->Head;
while (Buffer)
{
for (s32 i = 0; i < Buffer->Used; i++)
{
string StoredIdentifier = Buffer->Identifiers[i];
if (StringsEqual(StoredIdentifier, Identifier))
{
Result = Buffer->Sizes[i];
break;
}
}
if (Result > 0)
{
break;
}
else
{
Buffer = Buffer->Next;
}
}
return Result;
}
internal code_block_builder
InitCodeBlockBuilder()
{
code_block_builder Result = {};
InitMemoryArena(&Result.Data, 0, 0, StdAlloc);
return Result;
}
internal void
CodeBlockPrint (code_block_builder* Block, string Source)
{
char* NewCode = PushArray(&Block->Data, char, Source.Length);
GSMemCopy(Source.Memory, NewCode, Source.Length);
if (Block->String.Memory == 0)
{
Block->String.Memory = NewCode;
}
Block->String.Max += Source.Length;
Block->String.Length += Source.Length;
}
internal void
WriteMemoryRegionToFile (memory_region* Region, FILE* WriteFile)
{
if (Region->PreviousRegion)
{
WriteMemoryRegionToFile(Region->PreviousRegion, WriteFile);
}
fwrite(Region->Base, 1, Region->Used, WriteFile);
}
internal void
WriteCodeBlockToFile(code_block_builder CodeBlock, FILE* WriteFile)
{
memory_region* Region = CodeBlock.Data.CurrentRegion;
WriteMemoryRegionToFile (Region, WriteFile);
}
internal s32
GetFileSize (char* FileName)
{
s32 Result = 0;
FILE* ReadFile = fopen(FileName, "r");
if (ReadFile)
{
fseek(ReadFile, 0, SEEK_END);
size_t FileSize = ftell(ReadFile);
fseek(ReadFile, 0, SEEK_SET);
Result = (s32)FileSize;
fclose(ReadFile);
}
return Result;
}
internal s32
ReadEntireFileAndNullTerminate (char* Filename, char* Memory, s32 MemorySize)
{
s32 LengthRead = 0;
FILE* ReadFile = fopen(Filename, "r");
if (ReadFile)
{
fseek(ReadFile, 0, SEEK_END);
size_t FileSize = ftell(ReadFile);
fseek(ReadFile, 0, SEEK_SET);
if (FileSize <= MemorySize)
{
size_t ReadSize = fread(Memory, 1, FileSize, ReadFile);
Memory[FileSize] = 0;
LengthRead = (s32)ReadSize + 1;
}
fclose(ReadFile);
}
else
{
LogError(&GlobalErrorList, "Could Not Read File: %s", Filename);
}
return LengthRead;
}
internal void
EatToNextLine (tokenizer* Tokenizer)
{
while (AtValidPosition(*Tokenizer) && !IsNewline(*Tokenizer->At))
{
Tokenizer->At++;
}
}
struct seen_node_struct
{
string Name;
s32 MembersSize;
s32 MembersCount;
seen_node_struct* Next;
};
internal seen_node_struct*
FindSeenStructInList (seen_node_struct* SeenStructList, string Name)
{
seen_node_struct* Result = 0;
seen_node_struct* Iter = SeenStructList;
while(Iter)
{
if (StringsEqual(Name, Iter->Name))
{
Result = Iter;
break;
}
Iter = Iter->Next;
}
return Result;
}
internal void
ParseNodeStruct (token* NodeStruct, code_block_builder* NodeMembersBlock, seen_node_struct* SeenStruct, type_table* TypeTable)
{
token* OpenParen = NodeStruct->Next;
token* StructName = OpenParen->Next;
SeenStruct->Name = StructName->Text;
MakeStringBuffer(Buffer, 256);
PrintF(&Buffer, "node_struct_member MemberList_%.*s[] = {\n",
StructName->Text.Length, StructName->Text.Memory);
CodeBlockPrint(NodeMembersBlock, Buffer);
token* Token = StructName->Next;
while (Token->Type != Token_RightCurlyBracket)
{
if (Token->Type != Token_Identifier)
{
Token = Token->Next;
}
else
{
b32 IsInput = false;
b32 IsOutput = false;
if (StringsEqual(MakeStringLiteral("NODE_IN"), Token->Text) ||
StringsEqual(MakeStringLiteral("NODE_COLOR_BUFFER_IN"), Token->Text))
{
IsInput = true;
}
else if (StringsEqual(MakeStringLiteral("NODE_OUT"), Token->Text) ||
StringsEqual(MakeStringLiteral("NODE_COLOR_BUFFER_OUT"), Token->Text))
{
IsOutput = true;
}
else if (StringsEqual(MakeStringLiteral("NODE_COLOR_BUFFER_INOUT"), Token->Text))
{
IsInput = true;
IsOutput = true;
}
else
{
SeenStruct->MembersSize += GetSizeOfType(Token->Text, TypeTable);
Token = GetNextTokenOfType(Token, Token_Semicolon)->Next;
continue;
}
token* TypeToken = GetNextTokenOfType(Token, Token_Identifier);
token* NameToken = GetNextTokenOfType(TypeToken, Token_Identifier);
MakeStringBuffer(TypeBuffer, 64);
MakeStringBuffer(NameBuffer, 64);
CopyStringTo(TypeToken->Text, &TypeBuffer);
CopyStringTo(NameToken->Text, &NameBuffer);
if (StringsEqual(MakeStringLiteral("s32"), TypeToken->Text))
{
SeenStruct->MembersSize += sizeof(s32);
}
else if (StringsEqual(MakeStringLiteral("r32"), TypeToken->Text))
{
SeenStruct->MembersSize += sizeof(r32);
}
else if (StringsEqual(MakeStringLiteral("v4"), TypeToken->Text))
{
SeenStruct->MembersSize += sizeof(r32) * 4;
}
else if (StringsEqual(MakeStringLiteral("NODE_COLOR_BUFFER_INOUT"), Token->Text))
{
SeenStruct->MembersSize += sizeof(u32*) + sizeof(u32*) + sizeof(s32);
CopyStringTo(MakeStringLiteral("NODE_COLOR_BUFFER"), &TypeBuffer);
CopyStringTo(MakeStringLiteral("LEDs"), &NameBuffer);
}
else if (StringsEqual(MakeStringLiteral("NODE_COLOR_BUFFER_IN"), Token->Text) ||
StringsEqual(MakeStringLiteral("NODE_COLOR_BUFFER_OUT"), Token->Text))
{
SeenStruct->MembersSize += sizeof(u32*) + sizeof(u32*) + sizeof(s32);
CopyStringTo(MakeStringLiteral("NODE_COLOR_BUFFER"), &TypeBuffer);
CopyStringTo(TypeToken->Text, &NameBuffer);
ConcatString(MakeStringLiteral("LEDs"), &NameBuffer);
}
else
{
PrintF(&Buffer, "Invalid Type Specified for %.*s %.*s\n",
TypeToken->Text.Length, TypeToken->Text.Memory,
NameToken->Text.Length, NameToken->Text.Memory);
NullTerminate(&Buffer);
printf(Buffer.Memory);
return;
}
PrintF(&Buffer, "{ MemberType_%.*s, \"%.*s\", (u64)&((%.*s*)0)->%.*s, %s %s %s},\n",
TypeBuffer.Length, TypeBuffer.Memory,
NameBuffer.Length, NameBuffer.Memory,
StructName->Text.Length, StructName->Text.Memory,
NameBuffer.Length, NameBuffer.Memory,
(IsInput ? "IsInputMember" : ""),
(IsInput && IsOutput ? "|" : ""),
(IsOutput ? "IsOutputMember" : ""));
CodeBlockPrint(NodeMembersBlock, Buffer);
SeenStruct->MembersCount++;
Token = GetNextTokenOfType(Token, Token_Semicolon)->Next;
}
}
CodeBlockPrint(NodeMembersBlock, MakeStringLiteral("};\n\n"));
}
internal s32
GetTypedefSize (token* Token)
{
s32 Size = 0;
token* LookingAt = Token->Next;
if (StringsEqual(LookingAt->Text, MakeStringLiteral("unsigned")) ||
StringsEqual(LookingAt->Text, MakeStringLiteral("signed")))
{
LookingAt = LookingAt->Next;
}
s32 Level = 1;
if (StringsEqual(LookingAt->Text, MakeStringLiteral("short")))
{
Level = -1;
LookingAt = LookingAt->Next;
}
while (StringsEqual(LookingAt->Text, MakeStringLiteral("long")))
{
Level= 2.f;
LookingAt = LookingAt->Next;
}
if (StringsEqual(LookingAt->Text, MakeStringLiteral("char")))
{
Size = 1;
}
else if (StringsEqual(LookingAt->Text, MakeStringLiteral("int")))
{
switch (Level)
{
case -1: { Size = 2; } break;
case 1: { Size = 4; } break;
case 2: { Size = 8; } break;
InvalidDefaultCase;
}
}
else if (StringsEqual(LookingAt->Text, MakeStringLiteral("float")))
{
Size = 4;
}
else if (StringsEqual(LookingAt->Text, MakeStringLiteral("double")))
{
Size = 8;
}
else if (StringsEqual(LookingAt->Text, MakeStringLiteral("bool")))
{
Size = 1;
}
else if (StringsEqual(LookingAt->Text, MakeStringLiteral("void")))
{
LogError(&GlobalErrorList, "void type Not Handled");
}
return Size;
}
internal string
GetTypedefIdentifier (token* Token)
{
string Identifier = {};
token* PreviousToken = Token;
token* LookingAt = Token->Next;
while (LookingAt->Type != Token_Semicolon)
{
PreviousToken = LookingAt;
LookingAt = LookingAt->Next;
}
if (PreviousToken->Type == Token_Identifier)
{
Identifier = PreviousToken->Text;
}
return Identifier;
}
internal void
ParseTypedefs (token* Tokens, type_table* TypeTable)
{
string TypedefIdentifier = MakeStringLiteral("typedef");
string StructIdentifier = MakeStringLiteral("struct");
token* Token = Tokens;
while (Token)
{
if (StringsEqual(Token->Text, TypedefIdentifier))
{
if (!StringsEqual(Token->Next->Text, StructIdentifier))
{
s32 Size = GetTypedefSize(Token);
string Identifier = GetTypedefIdentifier(Token);
if (Size > 0) // NOTE(Peter): This is just to skip over typedefs of structs and function pointers
{
AddTypeToTable(Identifier, Size, TypeTable);
}
}
}
Token = Token->Next;
}
}
internal void
ParseNodeProc (token* NodeProc,
code_block_builder* NodeTypeBlock,
code_block_builder* NodeSpecificationsBlock,
code_block_builder* CallNodeProcBlock,
seen_node_struct* SeenStructs,
b32 IsPatternProc)
{
token* ProcName = GetNextTokenOfType(NodeProc, Token_Identifier);
token* ProcArg = GetNextTokenOfType(ProcName, Token_Identifier);
MakeStringBuffer(Buffer, 256);
// Types Enum
PrintF(&Buffer, "NodeType_%.*s,\n", ProcName->Text.Length, ProcName->Text.Memory);
CodeBlockPrint(NodeTypeBlock, Buffer);
// Node Specification
string ArgName = ProcArg->Text;
seen_node_struct* ArgStruct = FindSeenStructInList(SeenStructs, ArgName);
PrintF(&Buffer, "{ NodeType_%.*s, \"%.*s\", %d, MemberList_%.*s, %d, %d, %.*s},\n",
ProcName->Text.Length, ProcName->Text.Memory,
ProcName->Text.Length, ProcName->Text.Memory,
ProcName->Text.Length,
ProcArg->Text.Length, ProcArg->Text.Memory,
ArgStruct->MembersSize,
ArgStruct->MembersCount,
(IsPatternProc ? 4 : 5), (IsPatternProc ? "true" : "false"));
CodeBlockPrint(NodeSpecificationsBlock, Buffer);
// Call Node Proc
if (IsPatternProc)
{
LogError(&GlobalErrorList, "Node Proc is no longer supported");
}
else
{
PrintF(&Buffer, "case NodeType_%.*s: { %.*s((%.*s*)Data, DeltaTime); } break; \n",
ProcName->Text.Length, ProcName->Text.Memory,
ProcName->Text.Length, ProcName->Text.Memory,
ProcArg->Text.Length, ProcArg->Text.Memory);
CodeBlockPrint(CallNodeProcBlock, Buffer);
}
}
internal s32
PreprocessStructsAndProcs (string StructSearchString, string ProcSearchString, b32 FindingPatterns,
token* Tokens,
code_block_builder* NodeMembersBlock,
code_block_builder* NodeTypeBlock,
code_block_builder* NodeSpecificationsBlock,
code_block_builder* CallNodeProcBlock,
type_table* TypeTable)
{
// Node Structs
seen_node_struct* Structs = 0;
token_selection_spec NodeStructSpec = {};
NodeStructSpec.MatchText = true;
NodeStructSpec.Text = StructSearchString;
token* NodeStructToken = FindNextMatchingToken(Tokens, NodeStructSpec);
while (NodeStructToken)
{
seen_node_struct* SeenStruct = (seen_node_struct*)malloc(sizeof(seen_node_struct));
*SeenStruct = {};
if (Structs != 0)
{
SeenStruct->Next = Structs;
}
Structs = SeenStruct;
ParseNodeStruct(NodeStructToken, NodeMembersBlock, SeenStruct, TypeTable);
NodeStructToken = FindNextMatchingToken(NodeStructToken->Next, NodeStructSpec);
}
// Node Procs
token_selection_spec NodeProcSpec = {};
NodeProcSpec.MatchText = true;
NodeProcSpec.Text = ProcSearchString;
token* NodeProcToken = FindNextMatchingToken(Tokens, NodeProcSpec);
s32 NodeProcCount = 0;
while (NodeProcToken)
{
NodeProcCount++;
ParseNodeProc(NodeProcToken, NodeTypeBlock, NodeSpecificationsBlock, CallNodeProcBlock, Structs, FindingPatterns);
NodeProcToken = FindNextMatchingToken(NodeProcToken->Next, NodeProcSpec);
}
return NodeProcCount;
}
// Step 1: Get All Tokens, for every file
// Step 2: Identify all preprocessor directives
// Step 3: Apply Preprocessor Directives && Generate Code
// Step 4: Write out new files
// Step 5: Compile
int main(int ArgCount, char** ArgV)
{
if (ArgCount <= 1)
{
printf("Please supply at least one source directory to analyze.\n");
return 0;
}
type_table TypeTable = {};
memory_arena SourceFileArena = {};
InitMemoryArena(&SourceFileArena, 0, 0, StdAlloc);
code_block_builder NodeTypeBlock = InitCodeBlockBuilder();
CodeBlockPrint(&NodeTypeBlock, MakeStringLiteral("enum node_type\n{\nNodeType_OutputNode,\n"));
code_block_builder NodeMembersBlock = InitCodeBlockBuilder();
code_block_builder NodeSpecificationsBlock = InitCodeBlockBuilder();
CodeBlockPrint(&NodeSpecificationsBlock, MakeStringLiteral("node_specification NodeSpecifications[] = {\n"));
code_block_builder CallNodeProcBlock = InitCodeBlockBuilder();
CodeBlockPrint(&CallNodeProcBlock, MakeStringLiteral("internal void CallNodeProc(interface_node* Node, u8* Data, led* LEDs, s32 LEDsCount, r32 DeltaTime)\n{\n"));
CodeBlockPrint(&CallNodeProcBlock, MakeStringLiteral("switch (Node->Type)\n{\n"));
// Build Search Paths Array
s32 SearchPathsCount = 1; //ArgCount - 1;
string* SearchPaths = PushArray(&SourceFileArena, string, SearchPathsCount);
for (s32 InputPath = 0; InputPath < SearchPathsCount; InputPath++)
{
string* SearchPathString = SearchPaths + InputPath;
InitializeEmptyString(SearchPathString, PushArray(&SourceFileArena, char, MAX_PATH), MAX_PATH);
// NOTE(Peter): Adding one to skip the default argument which is the name of the application currently running
CopyCharArrayToString(ArgV[InputPath + 1], SearchPathString);
ConcatCharArrayToString("*", SearchPathString);
NullTerminate(SearchPathString);
}
// Total Source Files Count
s32 SourceFileCount = 0;
for (s32 SearchPath = 0; SearchPath < SearchPathsCount; SearchPath++)
{
string* SearchPathString = SearchPaths + SearchPath;
WIN32_FIND_DATA FindFileData;
HANDLE CurrentFile = FindFirstFile(SearchPathString->Memory, &FindFileData);
if (CurrentFile == INVALID_HANDLE_VALUE)
{
printf("Invalid File Handle\n");
return 0;
}
do {
if (FindFileData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY)
{
continue; // TODO(Peter): Recurse?
}
SourceFileCount++;
} while (FindNextFile(CurrentFile, &FindFileData));
}
// Allocate Source File Array
source_code_file* SourceFiles = PushArray(&SourceFileArena, source_code_file, SourceFileCount);
// Populate Source File Array
s32 SourceFilesUsed = 0;
for (s32 SearchPath = 0; SearchPath < SearchPathsCount; SearchPath++)
{
string* SearchPathString = SearchPaths + SearchPath;
WIN32_FIND_DATA FindFileData;
HANDLE CurrentFile = FindFirstFile(SearchPathString->Memory, &FindFileData);
do {
if (FindFileData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY)
{
continue; // TODO(Peter): Recurse?
}
string FileName = MakeString(FindFileData.cFileName);
string FileExtension = Substring(FileName, LastIndexOfChar(FileName, '.'));
if (StringsEqual(FileExtension, MakeStringLiteral("cpp")) ||
StringsEqual(FileExtension, MakeStringLiteral("h")))
{
source_code_file* File = SourceFiles + SourceFilesUsed++;
PushString(&File->Path, &SourceFileArena, SearchPathString->Length + CharArrayLength(FindFileData.cFileName));
CopyStringTo(Substring(*SearchPathString, 0, SearchPathString->Length - 2), &File->Path);
ConcatCharArrayToString(FindFileData.cFileName, &File->Path);
NullTerminate(&File->Path);
File->FileSize = FindFileData.nFileSizeLow;
ErrorAssert(FindFileData.nFileSizeHigh == 0, &GlobalErrorList, "File Too Big. Peter needs to handle this. File: %.*s", FileName.Length, FileName.Memory);
PushString(&File->Contents, &SourceFileArena, File->FileSize + 1);
File->Contents.Length = ReadEntireFileAndNullTerminate(File->Path.Memory, File->Contents.Memory, File->Contents.Max);
}
} while (FindNextFile(CurrentFile, &FindFileData));
}
// Tokenize All The Files
s32 TokensCount = 0;
token* Tokens = 0;
token** FileStartTokens = PushArray(&SourceFileArena, token*, SourceFilesUsed);
for (s32 SourceFileIdx = 0; SourceFileIdx < SourceFilesUsed; SourceFileIdx++)
{
source_code_file* File = SourceFiles + SourceFileIdx;
tokenizer Tokenizer = {};
Tokenizer.At = File->Contents.Memory;
Tokenizer.Memory = File->Contents.Memory;
Tokenizer.MemoryLength = File->Contents.Max;
token* LastToken = 0;
while(AtValidPosition(Tokenizer))
{
token* Token = PushStruct(&SourceFileArena, token);
if (Tokens == 0)
{
Tokens = Token;
}
TokensCount++;
*Token = GetNextToken(&Tokenizer);
Token->Next = 0;
if (LastToken) {
LastToken->Next = Token;
}
else
{
FileStartTokens[SourceFileIdx] = Token;
}
LastToken = Token;
}
}
for (s32 SourceFile = 0; SourceFile < SourceFilesUsed; SourceFile++)
{
ParseTypedefs (FileStartTokens[SourceFile], &TypeTable);
}
s32 NodeProcCount = 0;
for (s32 SourceFileIdx = 0; SourceFileIdx < SourceFilesUsed; SourceFileIdx++)
{
token* FileStartToken = FileStartTokens[SourceFileIdx];
NodeProcCount += PreprocessStructsAndProcs (MakeStringLiteral("NODE_STRUCT"),
MakeStringLiteral("NODE_PROC"),
false,
FileStartToken, &NodeMembersBlock, &NodeTypeBlock, &NodeSpecificationsBlock, &CallNodeProcBlock,
&TypeTable);
NodeProcCount += PreprocessStructsAndProcs (MakeStringLiteral("NODE_PATTERN_STRUCT"),
MakeStringLiteral("NODE_PATTERN_PROC"),
true,
FileStartToken, &NodeMembersBlock, &NodeTypeBlock, &NodeSpecificationsBlock, &CallNodeProcBlock,
&TypeTable);
}
MakeStringBuffer(Buffer, 256);
// Close Types Block - overwrite the last comma and '\' newline character with newlines.
CodeBlockPrint(&NodeTypeBlock, MakeStringLiteral("NodeType_Count,\n};\n\n"));
// Close Specifications Block
CodeBlockPrint(&NodeSpecificationsBlock, MakeStringLiteral("};\n"));
PrintF(&Buffer, "s32 NodeSpecificationsCount = %d;\n\n", NodeProcCount);
CodeBlockPrint(&NodeSpecificationsBlock, Buffer);
// Close Call Node Proc Block
CodeBlockPrint(&CallNodeProcBlock, MakeStringLiteral("}\n}\n"));
FILE* NodeGeneratedCPP = fopen("C:\\projects\\foldhaus\\src\\generated\\foldhaus_nodes_generated.cpp", "w");
if (NodeGeneratedCPP)
{
WriteCodeBlockToFile(NodeTypeBlock, NodeGeneratedCPP);
WriteCodeBlockToFile(NodeMembersBlock, NodeGeneratedCPP);
WriteCodeBlockToFile(NodeSpecificationsBlock, NodeGeneratedCPP);
WriteCodeBlockToFile(CallNodeProcBlock, NodeGeneratedCPP);
fclose(NodeGeneratedCPP);
}
PrintErrorList(GlobalErrorList);
return 0;
}

747
meta/gs_meta.cpp Normal file
View File

@ -0,0 +1,747 @@
#include "..\src\gs_language.h"
#include "..\src\gs_string.h"
#include "gs_meta_error.h"
#include "gs_meta_lexer.h"
#ifndef MAX_PATH
#define MAX_PATH 512
#endif // MAX_PATH
#define META_FILES_ARRAY_INCREMENT_SIZE 32
struct file_contents
{
u8* Backbuffer;
string Buffer;
};
#define TOKEN_BUFFER_SIZE 256
struct token_buffer
{
token* Tokens;
s32 Used;
s32 Max;
token_buffer* Next;
};
struct token_list
{
token_buffer* Head;
s32 TotalUsed;
s32 TotalMax;
};
struct token_list_iterator
{
token_list* List;
token_buffer* BufferAt;
token* At;
s32 AtTotalIndex;
};
enum basic_type
{
BasicType_Int8,
BasicType_Int16,
BasicType_Int32,
BasicType_Int64,
BasicType_UnsignedInt8,
BasicType_UnsignedInt16,
BasicType_UnsignedInt32,
BasicType_UnsignedInt64,
BasicType_Char,
BasicType_Float32,
BasicType_Float64,
BasicType_Void,
};
struct variable_definition_symbol
{
string Identifier;
basic_type Type;
b32 IsArray;
s32 Size;
};
struct struct_definition_symbol
{
string Identifier;
s32 MemberCount;
variable_definition_symbol* Members;
};
struct function_definition_symbol
{
string Identifier;
s32 ArgumentCount;
variable_definition_symbol* Arguments;
// TODO(Peter): An AST of the actual code that makes up the function?
};
enum symbol_type
{
SymbolType_Function,
SymbolType_Struct
};
struct symbol
{
symbol_type Type;
union
{
struct_definition_symbol StructDef;
function_definition_symbol FunctionDef;
};
};
enum parser_symbol_type
{
ParserSymbol_Invalid,
ParserSymbol_Unknown,
ParserSymbol_Auto,
ParserSymbol_Break,
ParserSymbol_Case,
ParserSymbol_Char,
ParserSymbol_Const,
ParserSymbol_Continue,
ParserSymbol_Default,
ParserSymbol_Do,
ParserSymbol_Double,
ParserSymbol_Else,
ParserSymbol_Enum,
ParserSymbol_Extern,
ParserSymbol_Float,
ParserSymbol_For,
ParserSymbol_Goto,
ParserSymbol_If,
ParserSymbol_Inline,
ParserSymbol_Int,
ParserSymbol_Long,
ParserSymbol_Register,
ParserSymbol_Restrict,
ParserSymbol_Return,
ParserSymbol_Short,
ParserSymbol_Signed,
ParserSymbol_Sizeof,
ParserSymbol_Static,
ParserSymbol_Struct,
ParserSymbol_Switch,
ParserSymbol_Typedef,
ParserSymbol_Union,
ParserSymbol_Unsigned,
ParserSymbol_Void,
ParserSymbol_Volatile,
ParserSymbol_While,
// Assignment Operators
ParserSymbol_AssignEquals,
ParserSymbol_PlusEquals,
ParserSymbol_MinusEquals,
ParserSymbol_TimesEquals,
ParserSymbol_DividedEquals,
ParserSymbol_ModEquals,
ParserSymbol_BitAndEquals,
ParserSymbol_BitOrEquals,
ParserSymbol_BitNotEquals,
ParserSymbol_BitShiftUpEquals,
ParserSymbol_BitShiftDownEquals,
// Increment/Decrement Operators
ParserSymbol_Increment,
ParserSymbol_Decrement,
};
struct parser_symbol_definition
{
parser_symbol_type Type;
string Text;
};
global_variable parser_symbol_definition ParserSymbolTable[] =
{
// Keywords
{ ParserSymbol_Auto, MakeStringLiteral("auto")},
{ ParserSymbol_Break, MakeStringLiteral("break")},
{ ParserSymbol_Case, MakeStringLiteral("case")},
{ ParserSymbol_Char, MakeStringLiteral("char")},
{ ParserSymbol_Const, MakeStringLiteral("const")},
{ ParserSymbol_Continue, MakeStringLiteral("continue")},
{ ParserSymbol_Default, MakeStringLiteral("default")},
{ ParserSymbol_Do, MakeStringLiteral("do")},
{ ParserSymbol_Double, MakeStringLiteral("double")},
{ ParserSymbol_Else, MakeStringLiteral("else")},
{ ParserSymbol_Enum, MakeStringLiteral("enum")},
{ ParserSymbol_Extern, MakeStringLiteral("extern")},
{ ParserSymbol_Float, MakeStringLiteral("float")},
{ ParserSymbol_For, MakeStringLiteral("for")},
{ ParserSymbol_Goto, MakeStringLiteral("goto")},
{ ParserSymbol_If, MakeStringLiteral("if")},
{ ParserSymbol_Inline, MakeStringLiteral("inline")},
{ ParserSymbol_Int, MakeStringLiteral("int")},
{ ParserSymbol_Long, MakeStringLiteral("long")},
{ ParserSymbol_Register, MakeStringLiteral("register")},
{ ParserSymbol_Restrict, MakeStringLiteral("restrict")},
{ ParserSymbol_Return, MakeStringLiteral("return")},
{ ParserSymbol_Short, MakeStringLiteral("short")},
{ ParserSymbol_Signed, MakeStringLiteral("signed")},
{ ParserSymbol_Sizeof, MakeStringLiteral("sizeof")},
{ ParserSymbol_Static, MakeStringLiteral("static")},
{ ParserSymbol_Struct, MakeStringLiteral("struct")},
{ ParserSymbol_Switch, MakeStringLiteral("switch")},
{ ParserSymbol_Typedef, MakeStringLiteral("typedef")},
{ ParserSymbol_Union, MakeStringLiteral("union")},
{ ParserSymbol_Unsigned, MakeStringLiteral("unsigned")},
{ ParserSymbol_Void, MakeStringLiteral("void")},
{ ParserSymbol_Volatile, MakeStringLiteral("volatile")},
{ ParserSymbol_While, MakeStringLiteral("while")},
// Assignment Operators
{ ParserSymbol_AssignEquals, MakeStringLiteral("=")},
{ ParserSymbol_PlusEquals, MakeStringLiteral("+=")},
{ ParserSymbol_MinusEquals, MakeStringLiteral("-=")},
{ ParserSymbol_TimesEquals, MakeStringLiteral("*=")},
{ ParserSymbol_DividedEquals, MakeStringLiteral("/=")},
{ ParserSymbol_ModEquals, MakeStringLiteral("%=")},
{ ParserSymbol_BitAndEquals, MakeStringLiteral("&=")},
{ ParserSymbol_BitOrEquals, MakeStringLiteral("|=")},
{ ParserSymbol_BitNotEquals, MakeStringLiteral("^=")},
{ ParserSymbol_BitShiftUpEquals, MakeStringLiteral("<<=")},
{ ParserSymbol_BitShiftDownEquals, MakeStringLiteral(">>=")},
// Increment/Decrement Operators
{ ParserSymbol_Increment, MakeStringLiteral("++")},
{ ParserSymbol_Decrement, MakeStringLiteral("--")},
/*
// Arithmetic Operators
{ ParserSymbol_, MakeStringLiteral("")},
{ ParserSymbol_, MakeStringLiteral("")},
{ ParserSymbol_, MakeStringLiteral("")},
{ ParserSymbol_, MakeStringLiteral("")},
{ ParserSymbol_, MakeStringLiteral("")},
{ ParserSymbol_, MakeStringLiteral("")},
{ ParserSymbol_, MakeStringLiteral("")},
{ ParserSymbol_, MakeStringLiteral("")},
{ ParserSymbol_, MakeStringLiteral("")},
{ ParserSymbol_, MakeStringLiteral("")},
{ ParserSymbol_, MakeStringLiteral("")},
*/
};
struct gs_meta_processor
{
error_list ErrorList;
u8* FileStringMemory;
s32 FileStringMemorySize;
string* Files;
file_contents* Contents;
token_list* FileTokens;
s32 FilesUsed;
s32 FilesMax;
};
internal gs_meta_processor
CreateMetaProcessor ()
{
gs_meta_processor Result = {};
return Result;
}
internal void
SetMetaFilesStringMemory (gs_meta_processor* Meta, s32 StartIndex, s32 EndIndex)
{
char* StringMemoryAt = (char*)(Meta->FileStringMemory + (MAX_PATH * StartIndex));
for (s32 i = StartIndex; i < EndIndex; i++)
{
string* String = Meta->Files + i;
InitializeString(String, StringMemoryAt, MAX_PATH);
StringMemoryAt += MAX_PATH;
}
}
internal b32
IsValidFileType(char* Filename)
{
string FileString = MakeString(Filename);
s32 IndexOfDot = LastIndexOfChar(FileString, '.');
string ExtensionString = Substring(FileString, IndexOfDot);
b32 Result = false;
if (StringsEqual(ExtensionString, MakeStringLiteral("cpp")) ||
StringsEqual(ExtensionString, MakeStringLiteral("h")))
{
Result = true;
}
return Result;
}
internal void
AddFile(gs_meta_processor* Meta, char* Filename)
{
if (!IsValidFileType(Filename))
{
LogError(&Meta->ErrorList, "AddFile: %s has an extension that cannot be processed.", Filename);
}
if(!Meta->Files)
{
Meta->FilesMax = META_FILES_ARRAY_INCREMENT_SIZE;
Meta->FilesUsed = 0;
Meta->Files = (string*)malloc(sizeof(string) * Meta->FilesMax);
Meta->FileStringMemorySize = Meta->FilesMax * MAX_PATH;
Meta->FileStringMemory = (u8*)malloc(Meta->FileStringMemorySize);
SetMetaFilesStringMemory(Meta, 0, Meta->FilesMax);
}
if (Meta->Files && Meta->FilesUsed >= Meta->FilesMax)
{
Meta->FilesMax += META_FILES_ARRAY_INCREMENT_SIZE;
Meta->Files = (string*)realloc(Meta->Files, sizeof(string) * Meta->FilesMax);
Meta->FileStringMemorySize = Meta->FilesMax * MAX_PATH;
Meta->FileStringMemory = (u8*)realloc(Meta->FileStringMemory, Meta->FileStringMemorySize);
SetMetaFilesStringMemory(Meta, Meta->FilesUsed, Meta->FilesMax);
}
string* File = Meta->Files + Meta->FilesUsed++;
File->Length = CharArrayLength(Filename);
GSMemCopy(Filename, File->Memory, File->Length);
NullTerminate(File);
}
internal void
LoadFileContents (file_contents* Contents, string* FileName, error_list* Errors)
{
FILE* ReadFile = fopen(FileName->Memory, "r");
if (ReadFile)
{
fseek(ReadFile, 0, SEEK_END);
size_t FileSize = ftell(ReadFile);
fseek(ReadFile, 0, SEEK_SET);
if (FileSize > 0)
{
Contents->Backbuffer = (u8*)malloc(FileSize + 1);
size_t ReadSize = fread(Contents->Backbuffer, 1, FileSize, ReadFile);
Contents->Backbuffer[FileSize] = 0;
InitializeString(&Contents->Buffer, (char*)Contents->Backbuffer, (s32)FileSize + 1);
Contents->Buffer.Length = (s32)FileSize + 1;
}
else
{
LogError(Errors, "LoadFileContents: File Size Was Zero for %s", FileName->Memory);
}
fclose(ReadFile);
}
else
{
LogError(Errors, "LoadFileContents: Could Not Read File %s", FileName->Memory);
}
}
internal void
LoadAllFiles (gs_meta_processor* Meta)
{
Meta->Contents = (file_contents*)malloc(sizeof(file_contents) * Meta->FilesUsed);
for (s32 FileIdx = 0; FileIdx < Meta->FilesUsed; FileIdx++)
{
file_contents* Contents = Meta->Contents + FileIdx;
string* FileName = Meta->Files + FileIdx;
LoadFileContents(Contents, FileName, &Meta->ErrorList);
}
}
internal token*
PushTokenOnList(token_list* List)
{
token* Result = 0;
if (!List->Head)
{
s32 NewBufferSize = sizeof(token_buffer) + (sizeof(token) * TOKEN_BUFFER_SIZE);
u8* NewBufferContents = (u8*)malloc(NewBufferSize);
List->Head = (token_buffer*)NewBufferContents;
List->Head->Used = 0;
List->Head->Max = TOKEN_BUFFER_SIZE;
List->Head->Tokens = (token*)(NewBufferContents + sizeof(token_buffer));
List->TotalUsed = List->Head->Used;
List->TotalMax = List->Head->Max;
}
else if (List->TotalUsed >= List->TotalMax)
{
s32 NewBufferSize = sizeof(token_buffer) + (sizeof(token) * TOKEN_BUFFER_SIZE);
u8* NewBufferContents = (u8*)malloc(NewBufferSize);
token_buffer* NewBuffer = (token_buffer*)NewBufferContents;
NewBuffer->Tokens = (token*)(NewBufferContents + sizeof(token_buffer));
NewBuffer->Next = NewBuffer;
List->Head = NewBuffer;
List->TotalUsed += List->Head->Used;
List->TotalMax += List->Head->Max;
}
Result = List->Head->Tokens + List->Head->Used++;
List->TotalUsed++;
return Result;
}
internal void
LexFile (file_contents* Contents, token_list* TokensList)
{
tokenizer FileTokenizer = {};
FileTokenizer.Memory = Contents->Buffer.Memory;
FileTokenizer.MemoryLength = Contents->Buffer.Length;
FileTokenizer.At = FileTokenizer.Memory;
while (AtValidPosition(FileTokenizer))
{
token* Token = PushTokenOnList(TokensList);
*Token = GetNextToken(&FileTokenizer);
}
}
internal void
LexAllFiles (gs_meta_processor* Meta)
{
LoadAllFiles(Meta);
Meta->FileTokens = (token_list*)malloc(sizeof(token_list) * Meta->FilesUsed);
for (s32 SourceFile = 0; SourceFile < Meta->FilesUsed; SourceFile++)
{
Meta->FileTokens[SourceFile] = {};
token_list* FileTokenList = Meta->FileTokens + SourceFile;
file_contents* FileContents = Meta->Contents + SourceFile;
LexFile (FileContents, FileTokenList);
}
}
internal token_list_iterator
GetTokenIterator(token_list* List)
{
token_list_iterator Result = {};
Result.List = List;
Result.BufferAt = List->Head;
Result.At = List->Head->Tokens;
Result.AtTotalIndex = 0;
return Result;
}
internal b32
IsValid (token_list_iterator Iterator)
{
b32 Result = false;
if (Iterator.At && Iterator.AtTotalIndex < Iterator.List->TotalUsed)
{
Result = true;
}
return Result;
}
internal void
Advance (token_list_iterator* Iterator)
{
if ((Iterator->At - Iterator->BufferAt->Tokens) >= Iterator->BufferAt->Used)
{
Iterator->BufferAt = Iterator->BufferAt->Next;
if (Iterator->BufferAt)
{
Iterator->At = Iterator->BufferAt->Tokens;
Iterator->AtTotalIndex++;
}
else
{
Iterator->At = 0;
}
}
else
{
Iterator->At++;
Iterator->AtTotalIndex++;
}
}
internal parser_symbol_type
GetSymbolType (string Text, parser_symbol_type Fallback)
{
parser_symbol_type Result = Fallback;
for (s32 i = 0; i < (sizeof(ParserSymbolTable)/sizeof(ParserSymbolTable[0])); i++)
{
if (StringsEqual(Text, ParserSymbolTable[i].Text))
{
Result = ParserSymbolTable[i].Type;
break;
}
}
return Result;
}
internal void
ParseFile (token_list* TokenList, gs_meta_processor* Meta)
{
for (token_list_iterator TokenIter = GetTokenIterator(TokenList);
IsValid(TokenIter);
Advance(&TokenIter))
{
token* At = TokenIter.At;
parser_symbol_type SymbolType = GetSymbolType(At->Text, ParserSymbol_Unknown);
switch (SymbolType)
{
case SymbolType_Struct:
{
printf("Found Struct: %.*s\n", (At + 1)->Text.Length, (At + 1)->Text.Memory);
}break;
}
}
}
internal void
ParseAllFiles (gs_meta_processor* Meta)
{
for (s32 SourceFile = 0; SourceFile < Meta->FilesUsed; SourceFile++)
{
token_list* FileTokenList = Meta->FileTokens + SourceFile;
ParseFile(FileTokenList, Meta);
}
}
#if 0
#include <windows.h>
#define GS_PRINTF(v) OutputDebugStringA(v)
#include "gs_string.h"
static char DEBUGCharArray[256];
#define GS_DEBUG_PRINTF(format, ...) sprintf(DEBUGCharArray, format, __VA_ARGS__); OutputDebugStringA(DEBUGCharArray);
#include "gs_meta_lexer.h"
#include "gs_meta_parser.h"
#include "gs_meta_generator.h"
internal char*
ReadEntireFileAndNullTerminate (char* Filename)
{
char* Result = 0;
FILE* ReadFile = fopen(Filename, "r");
if (ReadFile)
{
fseek(ReadFile, 0, SEEK_END);
size_t FileSize = ftell(ReadFile);
fseek(ReadFile, 0, SEEK_SET);
Result = (char*)malloc(FileSize + 1);
size_t ReadSize = fread(Result, 1, FileSize, ReadFile);
Result[FileSize] = 0;
fclose(ReadFile);
}
else
{
GS_DEBUG_PRINTF("Failed to fopen file");
}
return Result;
}
int PrecompileFile (char* FileName)
{
char* SourceFileContents = ReadEntireFileAndNullTerminate(FileName);
if (!SourceFileContents)
{
GS_DEBUG_PRINTF("Failed to get source file contents");
return 0;
}
tokenizer Tokenizer = {};
Tokenizer.At = SourceFileContents;
s32 TokensGrowSize = 256;
s32 TokensMax = TokensGrowSize;
s32 TokensCount = 0;
token* Tokens = (token*)malloc(TokensGrowSize * sizeof(token));
token* Current = Tokens;
while (Tokenizer.At[0])
{
*Current = GetNextToken(&Tokenizer);
Current->Next = 0;
TokensCount++;
if (TokensCount >= TokensMax)
{
token* Addition = (token*)malloc(TokensGrowSize * sizeof(token));
TokensMax += TokensGrowSize;
token* Old = Current;
Current = Addition;
Old->Next = Current;
}
else if(Tokenizer.At[0])
{
token* Old = Current;
Current++;
Old->Next = Current;
}
}
Current = Tokens;
#if 0 // Print Tokens
if (Current)
{
do
{
GS_DEBUG_PRINTF("%s %.*s\n", TokenNames[(int)Current->Type], Current->TextLength, Current->Text);
Current = Current->Next;
}while(Current);
}
#endif
ast_node Ast = {};
Ast.Type = ASTNode_Program;
ast_node* CurrentNode = Ast.Children;
// Preprocessor Defines
// TODO(Peter): Actually preprocess the file
token* CurrentToken = Tokens;
/*while (CurrentToken)
{
CurrentToken = CurrentToken->Next;
}
*/
// Analyze File
CurrentToken = Tokens;
while (CurrentToken)
{
/*GS_DEBUG_PRINTF("%s %.*s\n", TokenNames[(int)CurrentToken->Type],
CurrentToken->TextLength, CurrentToken->Text);
*/
parse_result ParseResult = {};
ParseResult.Parsed = false;
if (CurrentToken->Type == Token_Identifier)
{
if (StringsEqual(CurrentToken->Text, "struct", 6))
{
ParseResult = ParseStructDeclaration(CurrentNode, CurrentToken);
CurrentToken = ParseResult.NextToken;
}
else if (IsFunction(CurrentToken))
{
ParseResult = ParseFunctionDeclaration(CurrentNode, CurrentToken);
CurrentToken = ParseResult.NextToken;
}
else
{
CurrentToken = CurrentToken->Next;
}
if (ParseResult.Parsed)
{
if (CurrentNode == 0)
{
Ast.Children = ParseResult.Node;
CurrentNode = Ast.Children;
}
else
{
CurrentNode->Next = ParseResult.Node;
CurrentNode = CurrentNode->Next;
}
}
}
else
{
CurrentToken = CurrentToken->Next;
}
}
string_partition StringPart = {};
{
memory_arena StringMemory = {};
InitMemoryArena(&StringMemory, (u8*)malloc(Megabytes(4)), Megabytes(4));
InitStringPartition(&StringPart, &StringMemory);
}
// Print Structs
ast_node* Node = Ast.Children;
while (Node)
{
switch (Node->Type)
{
case ASTNode_StructDeclaration:
{
string_buffer* CodeBuffer = GenerateStructCode(Node, &StringPart);
PrintStringBuffer(CodeBuffer);
}break;
case ASTNode_FunctionDeclaration:
{
string_buffer* CodeBuffer = GenerateFunctionDeclaration(Node, &StringPart);
PrintStringBuffer(CodeBuffer);
}break;
}
Node = Node->Next;
}
return 0;
}
int main(int ArgCount, char** ArgV)
{
if (ArgCount <= 1)
{
printf("Please supply at least one source directory to analyze.\n");
return 0;
}
TCHAR Win32FileNameBuffer[MAX_PATH];
char FullFilePath[MAX_PATH];
for (int i = 1; i < ArgCount; i++)
{
WIN32_FIND_DATA FindFileData;
StringCchCopy(Win32FileNameBuffer, MAX_PATH, ArgV[i]);
StringCchCat(Win32FileNameBuffer, MAX_PATH, TEXT("\\*"));
HANDLE CurrentFile = FindFirstFile(Win32FileNameBuffer, &FindFileData);
int FileIdx = 0;
do {
if (FindFileData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY) {
// TODO(Peter): Recurse?
continue;
}
printf("File %d: %s\n", FileIdx++, FindFileData.cFileName);
} while (FindNextFile(CurrentFile, &FindFileData));
}
}
#endif

98
meta/gs_meta_error.h Normal file
View File

@ -0,0 +1,98 @@
#define MAX_ERROR_LENGTH 256
struct error
{
char Backbuffer[MAX_ERROR_LENGTH];
string Buffer;
};
struct error_list_buffer
{
error* List;
s32 Used;
s32 Max;
error_list_buffer* Next;
};
struct error_list
{
error_list_buffer* Head;
s32 TotalUsed;
s32 TotalMax;
};
#define ERROR_LIST_GROW_SIZE 32
internal void
GrowErrorList (error_list* Errors)
{
Assert(Errors);
s32 ExtensionSize = sizeof(error_list_buffer) + (sizeof(error) * ERROR_LIST_GROW_SIZE);
u8* ExtensionMemory = (u8*)malloc(ExtensionSize);
error_list_buffer* Extension = (error_list_buffer*)ExtensionMemory;
Extension->Used = 0;
Extension->Max = ERROR_LIST_GROW_SIZE;
Extension->List = (error*)(ExtensionMemory + sizeof(error_list_buffer));
Extension->Next = Errors->Head;
Errors->Head = Extension;
Errors->TotalMax += ERROR_LIST_GROW_SIZE;
}
#define ErrorAssert(condition, list, format, ...) \
if (!(condition)) { LogError_((list), __FILE__, __LINE__, (format), __VA_ARGS__); }
#define LogError(list, format, ...) LogError_((list), __FILE__, __LINE__, (format), __VA_ARGS__)
internal void
LogError_ (error_list* Errors, char* File, s32 Line, char* Format, ...)
{
if (Errors->TotalUsed >= Errors->TotalMax)
{
GrowErrorList(Errors);
}
error* Error = (Errors->Head->List + Errors->Head->Used++);
Errors->TotalUsed++;
InitializeEmptyString(&Error->Buffer, Error->Backbuffer, MAX_ERROR_LENGTH);
va_list Args;
va_start(Args, Format);
PrintF(&Error->Buffer, "%s(%d): ", File, Line);
Error->Buffer.Length += PrintFArgsList(Error->Buffer.Memory + Error->Buffer.Length,
Error->Buffer.Max - Error->Buffer.Length,
Format, Args);
va_end(Args);
}
internal void
PrintErrorListBuffer (error_list_buffer* Buffer)
{
if (Buffer->Next)
{
PrintErrorListBuffer(Buffer->Next);
}
for (s32 i = 0; i < Buffer->Used; i++)
{
error* Error = Buffer->List + i;
NullTerminate(&Error->Buffer);
printf(Error->Backbuffer);
printf("\n");
}
}
internal void
PrintErrorList (error_list Errors)
{
if (Errors.Head)
{
PrintErrorListBuffer(Errors.Head);
}
}

164
meta/gs_meta_generator.h Normal file
View File

@ -0,0 +1,164 @@
#define CODE_SIZE 256
struct generated_code
{
s32 Used;
char* Code;
generated_code* Next;
};
internal void
InitGeneratedCode (generated_code* Code)
{
Code->Used = 0;
Code->Code = (char*)malloc(sizeof(char) * CODE_SIZE);
*(Code->Code + CODE_SIZE - 1) = 0;
Code->Next = 0;
}
// NOTE(Peter): This ONLY supports printing strings into the buffer at the moment
static void
PrintF_ (
generated_code* Dest,
char* Format,
va_list Args
)
{
if (!Dest->Code) {
InitGeneratedCode(Dest);
}
char* Src = Format;
char* Dst = Dest->Code + Dest->Used;
while (*Src && (Dst - Dest->Code) < CODE_SIZE)
{
if (*Src == '\\' && *(Src + 1) && *(Src + 1) == '%')
{
*Src++;
*Dst++ = *Src++;
}
else if (*Src == '%')
{
Src++;
if (*Src == 's')
{
Src++;
s32 StringLength = va_arg(Args, s32);
char* String = va_arg(Args, char*);
char* C = String;
while(*C && StringLength > 0 && (Dst - Dest->Code) < CODE_SIZE)
{
StringLength--;
*Dst++ = *C++;
}
}
else
{
InvalidCodePath;
}
}
else
{
*Dst++ = *Src++;
}
}
if (!*Dst && *Src)
{
Dest->Next = (generated_code*)malloc(sizeof(generated_code));
InitGeneratedCode(Dest->Next);
PrintF_(Dest->Next, Src, Args);
}
if (*Dst && !*Src) { *Dst = 0; }
Dest->Used = (s32)(Dst - Dest->Code);
}
static void
PrintF (
generated_code* Dest,
char* Format,
...)
{
va_list Args;
va_start(Args, Format);
PrintF_(Dest, Format, Args);
va_end(Args);
}
static void
PrintCode (generated_code* Code)
{
GS_PRINTF(Code->Code);
if (Code->Next) { PrintCode(Code->Next); }
}
static void
GenerateFieldCode (ast_field_declaration* Field, string_buffer* CodeBuffer, string_partition* Partition,
s32 IndentLevel, char* Terminator)
{
for (s32 i = 0; i < IndentLevel; i++)
{
PrintStringBufferFormat(CodeBuffer, Partition, " ");
}
PrintStringBufferFormat(CodeBuffer, Partition, "%s%s %s%s",
Field->TypeLength, Field->Type,
(Field->TypePointer ? 1 : 0), (Field->TypePointer ? "*" : ""),
Field->NameLength, Field->Name,
(Field->TypeArray ? 2 : 0), (Field->TypeArray ? "[]" : ""));
PrintStringBufferFormat(CodeBuffer, Partition, Terminator);
}
static string_buffer*
GenerateStructCode (ast_node* Struct, string_partition* StringPartition)
{
Assert(Struct->Type == ASTNode_StructDeclaration);
string_buffer* StructCodeBuffer = GetStringBuffer(StringPartition);
PrintStringBufferFormat(StructCodeBuffer, StringPartition, "struct %s\n{\n",
Struct->StructDeclaration.NameLength, Struct->StructDeclaration.Name);
ast_field_declaration* Member = Struct->StructDeclaration.Members;
while (Member)
{
GenerateFieldCode(Member, StructCodeBuffer, StringPartition, 1, ";\n");
Member = Member->Next;
}
PrintStringBufferFormat(StructCodeBuffer, StringPartition, "}\n\n");
return StructCodeBuffer;
}
static string_buffer*
GenerateFunctionDeclaration (ast_node* Function, string_partition* Partition)
{
Assert(Function->Type == ASTNode_FunctionDeclaration);
ast_function_declaration* FuncDecl = &Function->FunctionDeclaration;
string_buffer* FunctionDeclBuffer = GetStringBuffer(Partition);
PrintStringBufferFormat(FunctionDeclBuffer, Partition, "%s %s (",
FuncDecl->ReturnTypeLength, FuncDecl->ReturnType,
FuncDecl->NameLength, FuncDecl->Name);
ast_field_declaration* Param = FuncDecl->Arguments;
while (Param)
{
GenerateFieldCode(Param, FunctionDeclBuffer, Partition, 0, "");
if (Param->Next)
{
PrintStringBufferFormat(FunctionDeclBuffer, Partition, ", ");
}
Param = Param->Next;
}
PrintStringBufferFormat(FunctionDeclBuffer, Partition, ")\n");
return FunctionDeclBuffer;
}

212
meta/gs_meta_lexer.h Normal file
View File

@ -0,0 +1,212 @@
struct token_selection_spec
{
b32 MatchText;
string Text;
};
internal s32
EatPreprocessor (tokenizer* Tokenizer, token_type* Type)
{
s32 Length = 0;
// TODO(Peter): Make this actually separate out the different arguments?
while (Tokenizer->At[0] && !IsNewline(Tokenizer->At[0]))
{
++Tokenizer->At;
Length++;
}
return Length;
}
internal s32
EatString (tokenizer* Tokenizer)
{
s32 Length = 0;
while (Tokenizer->At[0] && Tokenizer->At[0] != '"')
{
if (Tokenizer->At[0] == '/')
{
++Tokenizer->At;
Length++;
}
++Tokenizer->At;
Length++;
}
++Tokenizer->At;
return Length;
}
internal s32
EatIdentifier (tokenizer* Tokenizer)
{
s32 Length = 0;
while (Tokenizer->At[0] &&
(IsAlpha(Tokenizer->At[0]) || IsNumericExtended(Tokenizer->At[0])))
{
++Tokenizer->At;
Length++;
}
return Length;
}
internal token
GetNextToken (tokenizer* Tokenizer)
{
token Result = {};
EatWhitespace(Tokenizer);
Result.Text = MakeString(Tokenizer->At, 1, 1);
char C = Tokenizer->At[0];
++Tokenizer->At;
if (C == 0) { Result.Type = Token_EndOfStream; }
else if (C == '(') { Result.Type = Token_LeftParen; }
else if (C == ')') { Result.Type = Token_RightParen; }
else if (C == '[') { Result.Type = Token_LeftSquareBracket; }
else if (C == ']') { Result.Type = Token_RightSquareBracket; }
else if (C == '{') { Result.Type = Token_LeftCurlyBracket; }
else if (C == '}') { Result.Type = Token_RightCurlyBracket; }
else if (C == ';') { Result.Type = Token_Semicolon; }
else if (C == ',') { Result.Type = Token_Comma; }
else if (C == '.') { Result.Type = Token_Period; }
else if (C == '-' && Tokenizer->At[0] && Tokenizer->At[0] == '>')
{
Result.Type = Token_PointerReference;
Result.Text.Length = 2;
++Tokenizer->At;
}
else if (C == '#')
{
Result.Text.Length += EatPreprocessor(Tokenizer, &Result.Type);
if (CharArraysEqual(Result.Text.Memory, Result.Text.Length, "#define", 7))
{ Result.Type = Token_PoundDefine; }
else if (CharArraysEqual(Result.Text.Memory, Result.Text.Length, "#undef", 6))
{ Result.Type = Token_PoundUndef; }
else if (CharArraysEqual(Result.Text.Memory, Result.Text.Length, "#include", 8))
{ Result.Type = Token_PoundInclude; }
else if (CharArraysEqual(Result.Text.Memory, Result.Text.Length, "#ifdef", 6))
{ Result.Type = Token_PoundIfDef; }
else if (CharArraysEqual(Result.Text.Memory, Result.Text.Length, "#ifndef", 7))
{ Result.Type = Token_PoundIfNDef; }
else if (CharArraysEqual(Result.Text.Memory, Result.Text.Length, "#if", 3))
{ Result.Type = Token_PoundIf; }
else if (CharArraysEqual(Result.Text.Memory, Result.Text.Length, "#elif", 5))
{ Result.Type = Token_PoundElif; }
else if (CharArraysEqual(Result.Text.Memory, Result.Text.Length, "#else", 5))
{ Result.Type = Token_PoundElse; }
else if (CharArraysEqual(Result.Text.Memory, Result.Text.Length, "#endif", 6))
{ Result.Type = Token_PoundEndif; }
else if (CharArraysEqual(Result.Text.Memory, Result.Text.Length, "#error", 6))
{ Result.Type = Token_PoundError; }
else if (CharArraysEqual(Result.Text.Memory, Result.Text.Length, "#pragma", 7))
{ Result.Type = Token_PoundPragma; }
}
else if (IsNumeric(C))
{
Result.Type = Token_Number;
char* Start = Tokenizer->At;
EatNumber(Tokenizer);
Result.Text.Length = Tokenizer->At - Start;
}
else if (C == '\'')
{
Result.Type = Token_Char;
Result.Text.Memory = Tokenizer->At;
if (Tokenizer->At[0] && Tokenizer->At[0] == '\\')
{
++Tokenizer->At;
}
++Tokenizer->At;
++Tokenizer->At;
}
else if (C == '"')
{
Result.Type = Token_String;
// replace the length added by the quote
Result.Text.Memory = Tokenizer->At;
Result.Text.Length = EatString(Tokenizer);
}
else if (C == '/' && Tokenizer->At[0] && Tokenizer->At[0] == '/')
{
Result.Type = Token_Comment;
char* Start = Tokenizer->At;
EatToNewLine(Tokenizer);
Result.Text.Length += 1 + (Tokenizer->At - Start);
}
else if (C == '/' && Tokenizer->At[0] && Tokenizer->At[0] == '*')
{
s32 CommentLength = 1;
while (Tokenizer->At[0] && Tokenizer->At[0] != '*' &&
Tokenizer->At[1] && Tokenizer->At[1] != '/')
{
++Tokenizer->At;
CommentLength++;
}
Result.Text.Length += CommentLength;
}
// NOTE(Peter): This is after comment parsing so that the division operator
// falls through the comment case
else if (IsOperator(C)) { Result.Type = Token_Operator; }
else
{
Result.Type = Token_Identifier;
Result.Text.Length += EatIdentifier(Tokenizer);
}
return Result;
}
internal token*
FindNextMatchingToken (token* Tokens, token_selection_spec Spec)
{
token* Result = 0;
token* Token = Tokens;
while (Token)
{
if (Token->Text.Memory)
{
b32 Matches = false;
if (Spec.MatchText && StringsEqual(Spec.Text, Token->Text))
{
Matches = true;
}
if (Matches)
{
Result = Token;
break;
}
}
Token = Token->Next;
}
return Result;
}
internal token*
GetNextTokenOfType (token* Tokens, token_type Type)
{
token* Result = 0;
token* Iter = Tokens->Next;
while((Iter != 0) && (Iter->Type != Type))
{
Iter = Iter->Next;
}
Result = Iter;
return Result;
}

337
meta/gs_meta_parser.h Normal file
View File

@ -0,0 +1,337 @@
enum ast_node_type
{
ASTNode_Invalid,
ASTNode_Program,
ASTNode_StructDeclaration,
ASTNode_FunctionDeclaration,
ASTNode_Count
};
struct ast_field_declaration
{
s32 NameLength;
char* Name;
s32 TypeLength;
char* Type;
b32 TypePointer;
b32 TypeArray;
ast_field_declaration* Next;
};
struct ast_struct_declaration
{
s32 NameLength;
char* Name;
s32 MembersCount;
ast_field_declaration* Members;
};
struct ast_function_declaration
{
s32 ReturnTypeLength;
char* ReturnType;
s32 NameLength;
char* Name;
ast_field_declaration* Arguments;
};
struct ast_node
{
ast_node_type Type;
ast_node* Children;
union
{
ast_struct_declaration StructDeclaration;
ast_function_declaration FunctionDeclaration;
};
ast_node* Next;
};
struct parse_field_decl_result
{
ast_field_declaration* Member;
token* NextToken;
};
internal parse_field_decl_result
ParseFieldDeclaration (//ast_field_declaration** Container, ast_field_declaration* PreviousMember,
token* StartToken, token_type TerminatorToken, token_type EnclosingToken)
{
parse_field_decl_result Result = {};
ast_field_declaration* Member = 0;
token* CurrentToken = StartToken;
if (StartToken->Type == Token_Identifier)
{
Member = (ast_field_declaration*)malloc(sizeof(ast_field_declaration));
Member->Next = 0;
Member->Type = CurrentToken->Text;
Member->TypeLength = CurrentToken->TextLength;
Member->TypePointer = false;
Member->TypeArray = false;
CurrentToken = CurrentToken->Next;
if (*CurrentToken->Text == '*')
{
Member->TypePointer = true;
CurrentToken = CurrentToken->Next;
}
Member->Name = CurrentToken->Text;
Member->NameLength = CurrentToken->TextLength;
CurrentToken = CurrentToken->Next;
if (CurrentToken->Type == Token_LeftSquareBracket)
{
CurrentToken = CurrentToken->Next;
if (CurrentToken->Type != Token_RightSquareBracket)
{
GS_DEBUG_PRINTF("ALERT: Skipping Array parameter that has a size");
while (CurrentToken->Type != Token_RightSquareBracket)
{
CurrentToken = CurrentToken->Next;
}
}
CurrentToken = CurrentToken->Next;
Member->TypeArray = true;
}
else if (CurrentToken->Type != TerminatorToken &&
CurrentToken->Type != EnclosingToken)
{
GS_DEBUG_PRINTF("Error: struct member %s %.*s not followed by its terminator type: %s or %s\n",
TokenNames[CurrentToken->Type], CurrentToken->TextLength, CurrentToken->Text,
TokenNames[(int)TerminatorToken], TokenNames[(int)EnclosingToken]);
}
}
else if (StartToken->Type == Token_Comment)
{
CurrentToken = StartToken->Next;
}
// NOTE(Peter): this is here because if the current token is the enclosing type,
// ie. the ')' in a parameter list, it isn't the responsibility of this function
// to deal with that.
if (CurrentToken->Type == TerminatorToken)
{
CurrentToken = CurrentToken->Next;
}
Result.Member = Member;
Result.NextToken = CurrentToken;
return Result;
}
struct parse_result
{
b32 Parsed;
ast_node* Node;
token* NextToken;
};
internal parse_result
ParseStructDeclaration (ast_node* PreviousNode, token* StartToken)
{
parse_result Result = {};
ast_node* Struct = 0;
token* CurrentToken = StartToken;
if (PreviousNode == 0)
{
Struct = (ast_node*)malloc(sizeof(ast_node));;
}
else
{
PreviousNode->Next = (ast_node*)malloc(sizeof(ast_node));
Struct = PreviousNode->Next;
}
Struct->Next = 0;
Struct->StructDeclaration.Members = 0;
Struct->Type = ASTNode_StructDeclaration;
CurrentToken = CurrentToken->Next;
// Name Before Declaration
if (CurrentToken->Type == Token_Identifier)
{
Struct->StructDeclaration.NameLength = CurrentToken->TextLength;
Struct->StructDeclaration.Name = CurrentToken->Text;
CurrentToken = CurrentToken->Next;
}
if (CurrentToken->Type == Token_LeftCurlyBracket)
{
CurrentToken = CurrentToken->Next;
ast_field_declaration* Member = 0;
while (CurrentToken->Type != Token_RightCurlyBracket)
{
parse_field_decl_result MemberResult = ParseFieldDeclaration(CurrentToken, Token_Semicolon, Token_RightCurlyBracket);
if (!Member)
{
Member = MemberResult.Member;
Member->Next = 0;
Struct->StructDeclaration.Members = Member;
}
else if (MemberResult.Member)
{
Member->Next = MemberResult.Member;
Member = Member->Next;
}
CurrentToken = MemberResult.NextToken;
}
// Advance Past the Right Bracket
CurrentToken = CurrentToken->Next;
}
else
{
GS_DEBUG_PRINTF("Error: struct <name> not followed by {");
}
// Name After Declaration
if (CurrentToken->Type == Token_Identifier)
{
Struct->StructDeclaration.NameLength = CurrentToken->TextLength;
Struct->StructDeclaration.Name = CurrentToken->Text;
CurrentToken = CurrentToken->Next;
}
if (CurrentToken->Type == Token_Semicolon)
{
CurrentToken = CurrentToken->Next;
}
else
{
GS_DEBUG_PRINTF("Error: struct declaration did not finish with a semicolon");
}
Result.Node = Struct;
Result.NextToken = CurrentToken;
Result.Parsed = true;
return Result;
}
internal b32
IsFunction (token* StartToken)
{
b32 Result = true;
token* Current = StartToken;
// TODO(Peter): check a type table to see if we can do this now.
// TODO(Peter): is there a way to defer this to later?
if (Current->Type != Token_Identifier) // Return Type
{
Result = false;
return Result;
}
Current = Current->Next;
if (Current->Type != Token_Identifier) // Function Name
{
Result = false;
return Result;
}
Current = Current->Next;
if (Current->Type != Token_LeftParen)
{
Result = false;
return Result;
}
Current = Current->Next;
while (Current && Current->Type != Token_RightParen)
{
Current = Current->Next;
}
if (Current->Type != Token_RightParen)
{
Result = false;
return Result;
}
return Result;
}
internal parse_result
ParseFunctionDeclaration (ast_node* PreviousNode, token* StartToken)
{
parse_result Result;
ast_node* Function = 0;
token* CurrentToken = StartToken;
if (PreviousNode == 0)
{
Function = (ast_node*)malloc(sizeof(ast_node));
}
else
{
PreviousNode->Next = (ast_node*)malloc(sizeof(ast_node));
Function = PreviousNode->Next;
}
Function->Next = 0;
Function->Type = ASTNode_FunctionDeclaration;
Function->FunctionDeclaration.Arguments = 0;
Function->FunctionDeclaration.ReturnTypeLength = CurrentToken->TextLength;
Function->FunctionDeclaration.ReturnType = CurrentToken->Text;
CurrentToken = CurrentToken->Next;
Function->FunctionDeclaration.NameLength = CurrentToken->TextLength;
Function->FunctionDeclaration.Name = CurrentToken->Text;
CurrentToken = CurrentToken->Next;
if (CurrentToken->Type == Token_LeftParen)
{
CurrentToken = CurrentToken->Next;
ast_field_declaration* Param = 0;
while (CurrentToken->Type != Token_RightParen)
{
parse_field_decl_result ParamResult = ParseFieldDeclaration(CurrentToken, Token_Comma, Token_RightParen);
if (!Param)
{
Param = ParamResult.Member;
Param->Next = 0;
}
else if (ParamResult.Member)
{
Param->Next = ParamResult.Member;
Param = Param->Next;
}
CurrentToken = ParamResult.NextToken;
}
CurrentToken = CurrentToken->Next;
}
else
{
GS_DEBUG_PRINTF("Error: Function declaration is not followed by left parenthesis");
InvalidCodePath;
}
Result.Node = Function;
Result.NextToken = CurrentToken;
Result.Parsed = true;
return Result;
}

42
meta/main_meta.cpp Normal file
View File

@ -0,0 +1,42 @@
#include "..\src\gs_language.h"
#include "..\src\foldhaus_memory.h"
#include "..\src\gs_string.h"
#include "gs_meta.cpp"
#include <windows.h>
#include <stdio.h>
int main (int ArgCount, char* Arg[])
{
gs_meta_processor Meta = CreateMetaProcessor();
AddFile(&Meta, "C:/projects/foldhaus/meta/meta_test.cpp");
LexAllFiles(&Meta);
ParseAllFiles(&Meta);
#if 0
identifier_table_entry* NodeStructEntry = AddDefineToIdentifierTable(&Meta, "NODE_STRUCT", "NODE_STRUCT(%name)", StructDefinition);
identifier_table_entr* NodeProcEntry = AddDefineToIdentifierTable(&Meta, "NODE_PROC", "NODE_PROC(%name, %data)", FunctionDefinition);
symbol_list NodeStructs = FindAllMatchingSymbols(Meta, NodeStructEntry);
for (s32 i = 0; i < NodeStructs.Length; i++)
{
struct_definition_symbol Struct = NodeStructs.List[i];
Struct.Size;
for (s32 m = 0; m < Struct.MembersCount; m++)
{
Struct.Members[m];
}
}
#endif
if (Meta.ErrorList.TotalUsed > 0)
{
PrintErrorList(Meta.ErrorList);
}
return 0;
}

21
meta/meta_test.cpp Normal file
View File

@ -0,0 +1,21 @@
typedef float r32;
struct test_struct
{
float Float;
int Int;
char* CharPointer;
};
struct nested_struct
{
float Hello;
test_struct NestedValue;
r32 TypedefedValue;
};
int main(char* Args, int ArgCount)
{
return 0;
}

3
msdev.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
remedybg build\remedy_win32_foldhaus.rdbg

@ -0,0 +1 @@
Subproject commit 74618e0c5b065fb2cb8b0e3cde2020dd784e5879

43
project.4coder Normal file
View File

@ -0,0 +1,43 @@
version(1);
project_name = "main.exe";
patterns = {
"*.c",
"*.cpp",
"*.h",
"*.m",
"*.bat",
"*.sh",
"*.4coder",
};
blacklist_patterns = {
".*",
};
load_paths_base = {
{ "src", .relative = true, .recursive = true, },
{ "meta", .relative = true, .recursive = true, },
};
load_paths = {
{ load_paths_base, .os = "win", },
{ load_paths_base, .os = "linux", },
{ load_paths_base, .os = "mac", },
};
command_list = {
{ .name = "build_application",
.out = "*app compilation*", .footer_panel = false, .save_dirty_files = true,
.cmd = { { "src\\build.bat" , .os = "win" },
{ "./build.sh", .os = "linux" },
{ "./build.sh", .os = "mac" }, }, },
{ .name = "build_meta",
.out = "*meta compilation*", .footer_panel = false, .save_dirty_files = true,
.cmd = { { "meta\\build.bat" , .os = "win" },
{ "./meta/build.sh", .os = "linux" },
{ "./meta/build.sh", .os = "mac" }, }, },
{ .name = "run_application",
.out = "*run*", .footer_panel = false, .save_dirty_files = false,
.cmd = { { "build\\win32_foldhaus.exe", .os = "win" },
{ "build/main.exe" , .os = "linux" },
{ "build/main.exe" , .os = "mac" }, }, },
};
fkey_command[1] = "build";
fkey_command[2] = "run";

View File

@ -336,6 +336,12 @@ UnloadAssembly (s32 AssemblyIndex, app_state* State, context Context)
////////////////////////////////////////////////////////////////////////
internal void
RegisterTextEntryCommands (input_command_registry* CommandRegistry)
{
}
RELOAD_STATIC_DATA(ReloadStaticData)
{
app_state* State = (app_state*)Context.MemoryBase;
@ -373,9 +379,15 @@ INITIALIZE_APPLICATION(InitializeApplication)
InitMemoryArena(&State->SACNMemory, 0, 0, Context.PlatformAlloc);
InitializeInputCommandRegistry(&State->InputCommandRegistry, 32, State->Permanent);
InitializeInputCommandRegistry(&State->NodeListerCommandRegistry, 32, State->Permanent);
InitializeInputCommandRegistry(&State->NodeListerCommandRegistry, 128, State->Permanent);
State->ActiveCommands = &State->InputCommandRegistry;
s32 CommandQueueSize = 32;
command_queue_entry* CommandQueueMemory = PushArray(State->Permanent,
command_queue_entry,
CommandQueueSize);
State->CommandQueue = InitializeCommandQueue(CommandQueueMemory, CommandQueueSize);
State->ActiveTextEntry.Buffer = MakeString(PushArray(State->Permanent, char, 256), 0, 256);
// TODO(Peter): put in InitializeInterface?
@ -494,11 +506,61 @@ UPDATE_AND_RENDER(UpdateAndRender)
// incorrect to clear the arena, and then access the memory later.
ClearArena(State->Transient);
if (State->ActiveCommands == &State->NodeListerCommandRegistry)
// NOTE(Peter): Input Handling
gui_mouse GuiMouse = {};
GuiMouse.Pos = Mouse.Pos;
GuiMouse.OldPos = Mouse.OldPos;
GuiMouse.DeltaPos = Mouse.DeltaPos;
GuiMouse.DownPos = Mouse.DownPos;
{
AppendInputToEntryString(&State->ActiveTextEntry, Input.New->StringInput, Input.New->StringInputUsed);
ActivateQueuedCommandRegistry(State);
// CommandQueue holds the list of commands, generated from the current InputCommandRegistry
// Every command entry in the queue should be executed.
// For every Input Event, attempt to add an entry to the CommandQueue if an appropriate command
// exists in ActiveCommands
RemoveNonPersistantCommandsFromQueueAndUpdatePersistentEvents(&State->CommandQueue);
for (s32 EventIdx = 0; EventIdx < InputQueue.QueueUsed; EventIdx++)
{
input_entry Event = InputQueue.Entries[EventIdx];
input_command* Command = FindExistingCommand(State->ActiveCommands, Event.Key, (key_code)0);
if (Command)
{
if (KeyTransitionedDown(Event))
{
PushCommandOnQueue(&State->CommandQueue, *Command, Event);
}
else if (Command->PersistsUntilReleased && KeyTransitionedUp(Event))
{
RemoveCommandFromQueue(&State->CommandQueue, *Command, Event);
}
}
if (Event.Key == KeyCode_MouseLeftButton)
{
GuiMouse.LeftButtonTransitionedDown = KeyTransitionedDown(Event);
GuiMouse.LeftButtonTransitionedUp = KeyTransitionedUp(Event);
}
else if (Event.Key == KeyCode_MouseMiddleButton)
{
GuiMouse.MiddleButtonTransitionedDown = KeyTransitionedDown(Event);
GuiMouse.MiddleButtonTransitionedUp = KeyTransitionedUp(Event);
}
else if (Event.Key == KeyCode_MouseRightButton)
{
GuiMouse.RightButtonTransitionedDown = KeyTransitionedDown(Event);
GuiMouse.RightButtonTransitionedUp = KeyTransitionedUp(Event);
}
}
// Execute all commands in CommandQueue
for (s32 CommandIdx = 0; CommandIdx < State->CommandQueue.Used; CommandIdx++)
{
command_queue_entry Entry = State->CommandQueue.Commands[CommandIdx];
Entry.Command.Proc(State, Entry.Event, Mouse);
}
}
ExecuteAllRegisteredCommands(State->ActiveCommands, Input, State);
if (State->LEDBufferList)
{
@ -700,13 +762,13 @@ UPDATE_AND_RENDER(UpdateAndRender)
panel_result TopBarPanel = EvaluatePanel(RenderBuffer,
v2{0, Context.WindowHeight - TopBarHeight},
v2{Context.WindowWidth, Context.WindowHeight},
0, State->Interface, Input);
0, State->Interface);
v2 ButtonDim = v2{200, (r32)NewLineYOffset(*State->Interface.Font) + 10};
v2 ButtonPos = v2{State->Interface.Margin.x, Context.WindowHeight - (ButtonDim.y + 10)};
button_result LoadAssemblyBtn = EvaluateButton(RenderBuffer, ButtonPos, ButtonPos + ButtonDim,
MakeStringLiteral("Load Assembly"),
State->Interface, Input);
State->Interface, GuiMouse);
string InterfaceString = MakeString(PushArray(State->Transient, char, 256), 256);
for (int i = 0; i < State->AssembliesUsed; i++)
@ -715,7 +777,7 @@ UPDATE_AND_RENDER(UpdateAndRender)
ButtonPos.x += ButtonDim.x + 10;
button_result UnloadAssemblyBtn = EvaluateButton(RenderBuffer, ButtonPos, ButtonPos + ButtonDim,
InterfaceString, State->Interface, Input);
InterfaceString, State->Interface, GuiMouse);
if (UnloadAssemblyBtn.Pressed)
{
@ -738,30 +800,25 @@ UPDATE_AND_RENDER(UpdateAndRender)
// Figuring Out Nodes
//////////////////////////////////////
v2 MousePos = v2{(r32)Input.New->MouseX, (r32)Input.New->MouseY};
v2 LastFrameMousePos = v2{(r32)Input.Old->MouseX, (r32)Input.Old->MouseY};
if (KeyTransitionedDown(Input, KeyCode_MouseLeftButton))
if (GuiMouse.LeftButtonTransitionedDown)
{
node_offset Node = GetNodeUnderPoint(State->NodeList, MousePos, State->NodeRenderSettings);
node_offset Node = GetNodeUnderPoint(State->NodeList, GuiMouse.Pos, State->NodeRenderSettings);
if (Node.Node)
{
State->NodeInteraction = GetNodeInteractionType(Node.Node, Node.Offset, MousePos, State->NodeRenderSettings);
State->NodeInteraction = GetNodeInteractionType(Node.Node, Node.Offset, GuiMouse.Pos, State->NodeRenderSettings);
}
}
else if (KeyTransitionedUp(Input, KeyCode_MouseLeftButton))
else if (GuiMouse.LeftButtonTransitionedUp)
{
if (IsDraggingNodePort(State->NodeInteraction))
{
TryConnectNodes(State->NodeInteraction, MousePos, State->NodeList, State->NodeRenderSettings);
TryConnectNodes(State->NodeInteraction, GuiMouse.Pos, State->NodeList, State->NodeRenderSettings);
State->NodeInteraction = NewEmptyNodeInteraction();
}
else if(IsDraggingNodeValue(State->NodeInteraction))
{
v2 MouseDelta = MousePos - LastFrameMousePos;
// This is just a click
if (Mag(MouseDelta) < 10)
if (Mag(Mouse.DeltaPos) < 10)
{
node_interaction Interaction = State->NodeInteraction;
interface_node* Node = GetNodeAtOffset(State->NodeList, Interaction.NodeOffset);
@ -788,11 +845,11 @@ UPDATE_AND_RENDER(UpdateAndRender)
}
UpdateDraggingNode(MousePos, State->NodeInteraction, State->NodeList,
UpdateDraggingNode(Mouse.Pos, State->NodeInteraction, State->NodeList,
State->NodeRenderSettings);
UpdateDraggingNodePort(MousePos, State->NodeInteraction, State->NodeList,
UpdateDraggingNodePort(Mouse.Pos, State->NodeInteraction, State->NodeList,
State->NodeRenderSettings, RenderBuffer);
UpdateDraggingNodeValue(MousePos, LastFrameMousePos, State->NodeInteraction, State->NodeList, State->NodeRenderSettings, State);
UpdateDraggingNodeValue(Mouse.Pos, Mouse.OldPos, State->NodeInteraction, State->NodeList, State->NodeRenderSettings, State);
ResetNodesUpdateState(State->NodeList);
@ -812,7 +869,7 @@ UPDATE_AND_RENDER(UpdateAndRender)
NodeListerGetNodeName,
&State->ActiveTextEntry.Buffer,
State->ActiveTextEntry.CursorPosition,
State->Font, State->Interface, Input);
State->Font, State->Interface, GuiMouse);
State->GeneralPurposeSearchHotItem = NodeListResult.HotItem;
}
}
@ -820,10 +877,9 @@ UPDATE_AND_RENDER(UpdateAndRender)
if (State->ColorPickerEditValue != 0)
{
b32 ShouldClose = EvaluateColorPicker(RenderBuffer, State->ColorPickerEditValue,
v2{200, 200}, State->Interface, Input);
v2{200, 200}, State->Interface, GuiMouse);
if (ShouldClose ||
KeyTransitionedDown(Input, KeyCode_Esc))
if (ShouldClose)
{
State->ColorPickerEditValue = 0;
}
@ -831,7 +887,7 @@ UPDATE_AND_RENDER(UpdateAndRender)
DrawDebugInterface(RenderBuffer, 25,
State->Interface, Context.WindowWidth, Context.WindowHeight - TopBarHeight,
Context.DeltaTime, State, State->Camera, Input, State->Transient);
Context.DeltaTime, State, State->Camera, GuiMouse, State->Transient);
}
EndDebugFrame(GlobalDebugServices);

View File

@ -68,7 +68,13 @@ struct app_state
input_command_registry InputCommandRegistry;
input_command_registry NodeListerCommandRegistry;
// NOTE(Peter): stores the address of the command registry to be activated next frame.
// was having a problem where switching command registry's in the middle of the loop trying to
// execute commands was causing problems.
input_command_registry* NextCommandRegistry;
input_command_registry* ActiveCommands;
input_command_queue CommandQueue;
text_entry ActiveTextEntry;
streaming_acn SACN;

View File

@ -0,0 +1,149 @@
internal void
InitializeInputCommandRegistry (input_command_registry* CommandRegistry,
s32 Size,
memory_arena* Storage)
{
CommandRegistry->Commands = PushArray(Storage, input_command, Size);
CommandRegistry->Size = Size;
CommandRegistry->Used = 0;
}
internal input_command*
FindExistingCommand (input_command_registry* CommandRegistry, key_code Key, key_code Mdfr)
{
input_command* Result = 0;
for (s32 Cmd = 0; Cmd < CommandRegistry->Used; Cmd++)
{
input_command* Command = CommandRegistry->Commands + Cmd;
if (Command->Key == Key && Command->Mdfr == Mdfr)
{
Result = Command;
break;
}
}
return Result;
}
internal void
RegisterKeyPressCommand (input_command_registry* CommandRegistry,
key_code Key,
b32 PersistsUntilReleased,
key_code Mdfr,
input_command_proc* Proc)
{
input_command* Command = FindExistingCommand(CommandRegistry, Key, Mdfr);
if (!Command)
{
Assert(CommandRegistry->Size > CommandRegistry->Used);
Assert(Mdfr == KeyCode_Invalid || Mdfr == KeyCode_LeftShift || Mdfr == KeyCode_RightShift ||
Mdfr == KeyCode_LeftCtrl || Mdfr == KeyCode_RightCtrl || Mdfr == KeyCode_Alt);
Command = CommandRegistry->Commands + CommandRegistry->Used++;
}
Command->Key = Key;
Command->PersistsUntilReleased = PersistsUntilReleased;
Command->Mdfr = Mdfr;
Command->Proc = Proc;
}
internal void
RegisterMouseWheelCommand (input_command_registry* CommandRegistry,
input_command_proc* Proc)
{
CommandRegistry->MouseWheelCommand = Proc;
}
internal input_command_queue
InitializeCommandQueue(command_queue_entry* Memory, s32 MemorySize)
{
input_command_queue Result = {};
Result.Size = MemorySize;
Result.Used = 0;
Result.Commands = Memory;
return Result;
}
internal void
RemoveNonPersistantCommandsFromQueueAndUpdatePersistentEvents(input_command_queue* Queue)
{
s32 PersistantCommandsCount = 0;
for (s32 i = 0; i < Queue->Used; i++)
{
command_queue_entry* Entry = Queue->Commands + i;
if (Entry->Command.PersistsUntilReleased)
{
Entry->Event.State |= KeyState_WasDown;
// NOTE(Peter): If i == PersistantCommandsCount, then we don't need to copy the
// command anywhere
if (i != PersistantCommandsCount)
{
Queue->Commands[PersistantCommandsCount] = *Entry;
}
PersistantCommandsCount++;
}
}
Queue->Used = PersistantCommandsCount;
}
internal void
PushCommandOnQueue(input_command_queue* Queue, input_command Command, input_entry Event)
{
Assert(Queue->Used < Queue->Size);
command_queue_entry Entry = {};
Entry.Command = Command;
Entry.Event = Event;
Queue->Commands[Queue->Used++] = Entry;
}
internal void
RemoveCommandFromQueue(input_command_queue* Queue, input_command Command, input_entry Event)
{
s32 CommandIndex = 0;
for (CommandIndex = 0; CommandIndex < Queue->Used; CommandIndex++)
{
command_queue_entry* Entry = Queue->Commands + CommandIndex;
if(Entry->Event.Key == Event.Key)
{
break;
}
}
// NOTE(Peter): If we made it through the queue without finding an event, there wasn't one
// to remove. This happens when we've changed command registries as a result of an input command,
// and the command exists in the new registry.
// For example:
// clicking a mouse button triggers a command to switch registries
// the new registry tracks mouse drag (persist until release)
// when the mouse is released, the event fires, but there is no mouse down event to remove
// For this reason, I'm allowing the case where we try and remove a command where non exists
// I don't think this is a great solution but Im not super familiar with the codebase right now
// so leaving it as is. revisit if it becomes a problem.
if (CommandIndex < Queue->Used)
{
Queue->Used -= 1;
for (; CommandIndex < Queue->Used; CommandIndex++)
{
Queue->Commands[CommandIndex] = Queue->Commands[CommandIndex + 1];
}
}
}
internal void
QueueNextFrameCommandRegistry (input_command_registry* NewRegistry, app_state* State)
{
State->NextCommandRegistry = NewRegistry;
}
internal void
ActivateQueuedCommandRegistry (app_state* State)
{
if (State->NextCommandRegistry)
{
State->ActiveCommands = State->NextCommandRegistry;
State->NextCommandRegistry = 0;
}
}

View File

@ -7,7 +7,7 @@ ExecuteRegisteredCommands(Context, Input);
#endif // USAGE_CODE
#define FOLDHAUS_INPUT_COMMAND_PROC(name) void name(app_state* State, input Input)
#define FOLDHAUS_INPUT_COMMAND_PROC(name) void name(app_state* State, input_entry Event, mouse_state Mouse)
typedef FOLDHAUS_INPUT_COMMAND_PROC(input_command_proc);
// TODO(Peter): At the moment these are all key press commands. Need a way to differentiate between
@ -15,7 +15,7 @@ typedef FOLDHAUS_INPUT_COMMAND_PROC(input_command_proc);
struct input_command
{
key_code Key;
b32 Held;
b32 PersistsUntilReleased;
key_code Mdfr;
input_command_proc* Proc;
};
@ -28,3 +28,16 @@ struct input_command_registry
input_command_proc* MouseWheelCommand;
};
struct command_queue_entry
{
input_command Command;
input_entry Event;
};
struct input_command_queue
{
s32 Size;
s32 Used;
command_queue_entry* Commands;
};

View File

@ -1,5 +1,5 @@
internal void
DrawDebugInterface (render_command_buffer* RenderBuffer, r32 StartX, interface_config Interface, r32 WindowWidth, r32 WindowHeight, r32 DeltaTime, app_state* State, camera Camera, input Input, memory_arena* Transient)
DrawDebugInterface (render_command_buffer* RenderBuffer, r32 StartX, interface_config Interface, r32 WindowWidth, r32 WindowHeight, r32 DeltaTime, app_state* State, camera Camera, gui_mouse Mouse, memory_arena* Transient)
{
DEBUG_TRACK_SCOPE(DrawDebugInterface);
@ -20,8 +20,8 @@ DrawDebugInterface (render_command_buffer* RenderBuffer, r32 StartX, interface_c
r32 FramesPerSecond = 1.0f / DeltaTime;
string InputCommands = MakeStringLiteral("Default Input Registry - HI KALAN");
string NodeListerCommands = MakeStringLiteral("Node Lister Input Registry - HI KALAN");
string InputCommands = MakeStringLiteral("Default Input Registry - HELLO DAVID");
string NodeListerCommands = MakeStringLiteral("Node Lister Input Registry");
string ActiveInputRegistry = {};
if (State->ActiveCommands == &State->InputCommandRegistry)
{
@ -41,14 +41,14 @@ DrawDebugInterface (render_command_buffer* RenderBuffer, r32 StartX, interface_c
TopOfScreenLinePos.y -= ButtonDim.y + 10;
v2 ButtonPos = TopOfScreenLinePos;
button_result CameraBtn = EvaluateButton(RenderBuffer, ButtonPos, ButtonPos + ButtonDim,
MakeStringLiteral("Camera"), Interface, Input);
MakeStringLiteral("Camera"), Interface, Mouse);
ButtonPos.x += ButtonDim.x + 10;
button_result ScopeTimeBtn = EvaluateButton(RenderBuffer, ButtonPos, ButtonPos + ButtonDim,
MakeStringLiteral("Scope Time"), Interface, Input);
MakeStringLiteral("Scope Time"), Interface, Mouse);
ButtonPos.x += ButtonDim.x + 10;
button_result RenderSculptureBtn = EvaluateButton(RenderBuffer, ButtonPos, ButtonPos + ButtonDim,
MakeStringLiteral("Visualize"), Interface, Input);
MakeStringLiteral("Visualize"), Interface, Mouse);
ButtonPos.x += ButtonDim.x + 10;
@ -63,7 +63,7 @@ DrawDebugInterface (render_command_buffer* RenderBuffer, r32 StartX, interface_c
}
button_result SendSACNDataBtn = EvaluateButton(RenderBuffer, ButtonPos, ButtonPos + ButtonDim,
SACNButtonString, Interface, Input);
SACNButtonString, Interface, Mouse);
TopOfScreenLinePos.y -= NewLineYOffset(*Interface.Font) + 10;
@ -99,6 +99,16 @@ DrawDebugInterface (render_command_buffer* RenderBuffer, r32 StartX, interface_c
3, Camera.LookAt.z);
DrawString(RenderBuffer, DebugString, Interface.Font, Interface.FontSize, TopOfScreenLinePos, v4{1.0f, 1.0f, 1.0f, 1.0f});
TopOfScreenLinePos.y -= NewLineYOffset(*Interface.Font);
s32 MousePrecision = 0;
PrintF(&DebugString, "Mouse Pos: (%.*f, %.*f) Down: (%.*f, %.*f)",
MousePrecision, Mouse.Pos.x,
MousePrecision, Mouse.Pos.y,
MousePrecision, Mouse.DownPos.x,
MousePrecision, Mouse.DownPos.y);
DrawString(RenderBuffer, DebugString, Interface.Font, Interface.FontSize,
TopOfScreenLinePos, WhiteV4);
TopOfScreenLinePos.y -= NewLineYOffset(*Interface.Font);
}
if (GlobalDebugServices->Interface.ShowTrackedScopes)

View File

@ -0,0 +1,53 @@
FOLDHAUS_INPUT_COMMAND_PROC(CameraMouseControl)
{
if (State->NodeInteraction.NodeOffset >= 0) { return; }
if (KeyTransitionedDown(Event))
{
State->Camera_StartDragPos = V4(State->Camera.Position, 1);
}
if (!State->DrawUniverseOutputDisplay)
{
v2 TotalDeltaPos = Mouse.Pos - Mouse.DownPos;
m44 XRotation = GetXRotation(-TotalDeltaPos.y * State->PixelsToWorldScale);
m44 YRotation = GetYRotation(TotalDeltaPos.x * State->PixelsToWorldScale);
m44 Combined = XRotation * YRotation;
State->Camera.Position = V3(Combined * State->Camera_StartDragPos);
}
else
{
State->UniverseOutputDisplayOffset += Mouse.DeltaPos;
}
}
FOLDHAUS_INPUT_COMMAND_PROC(CameraMouseZoom)
{
if (State->DrawUniverseOutputDisplay)
{
r32 DeltaZoom = (r32)(Mouse.Scroll) / 120;
State->UniverseOutputDisplayZoom = GSClamp(0.1f, State->UniverseOutputDisplayZoom + DeltaZoom, 4.f);
}
}
FOLDHAUS_INPUT_COMMAND_PROC(ToggleUniverseDebugView)
{
State->DrawUniverseOutputDisplay = !State->DrawUniverseOutputDisplay;
}
FOLDHAUS_INPUT_COMMAND_PROC(OpenNodeLister)
{
State->InterfaceShowNodeList = true;
State->NodeListMenuPosition = Mouse.Pos;
SetTextInputDestinationToString(&State->ActiveTextEntry, &State->GeneralPurposeSearchString);
State->ActiveCommands = &State->NodeListerCommandRegistry;
}
FOLDHAUS_INPUT_COMMAND_PROC(ToggleNodeDisplay)
{
State->NodeRenderSettings.Display = !State->NodeRenderSettings.Display;
}

View File

@ -3,12 +3,15 @@
#include "foldhaus_memory.h"
#include "gs_string.h"
#include "gs_input.h"
#include "foldhaus_debug.h"
global_variable debug_services* GlobalDebugServices;
#include "gs_vector_matrix.h"
#include "gs_input.h"
#include "foldhaus_renderer.h"
typedef struct context context;
@ -19,7 +22,7 @@ typedef struct context context;
#define INITIALIZE_APPLICATION(name) void name(context Context)
typedef INITIALIZE_APPLICATION(initialize_application);
#define UPDATE_AND_RENDER(name) void name(context Context, input Input, render_command_buffer* RenderBuffer)
#define UPDATE_AND_RENDER(name) void name(context Context, input_queue InputQueue, mouse_state Mouse, render_command_buffer* RenderBuffer)
typedef UPDATE_AND_RENDER(update_and_render);
#define RELOAD_STATIC_DATA(name) void name(context Context, debug_services* DebugServices)

View File

@ -60,15 +60,14 @@ FOLDHAUS_INPUT_COMMAND_PROC(CloseSearchLister)
State->InterfaceShowNodeList = false;
// TODO(Peter): This also assumes we know where we came from. Probably need to implement
// push/pop functionality for the activecommands.
State->ActiveCommands = &State->InputCommandRegistry;
QueueNextFrameCommandRegistry(&State->InputCommandRegistry, State);
State->GeneralPurposeSearchHotItem = -1;
}
FOLDHAUS_INPUT_COMMAND_PROC(SelectAndCloseSearchLister)
{
s32 HotItem = State->GeneralPurposeSearchHotItem;
v2 MousePos = v2{(r32)Input.New->MouseX, (r32)Input.New->MouseY};
PushNodeOnListFromSpecification(State->NodeList, NodeSpecifications[HotItem],
MousePos, State->NodeRenderSettings, State->Permanent);
CloseSearchLister(State, Input);
}
Mouse.Pos, State->NodeRenderSettings, State->Permanent);
CloseSearchLister(State, Event, Mouse);
}

View File

@ -59,20 +59,6 @@ SetTextInputDestinationToFloat (text_entry* TextInput, r32* DestinationFloat)
}
}
internal void
AppendInputToEntryString (text_entry* EntryString, char* InputString, s32 InputStringLength)
{
if (InputStringLength > 0)
{
for (s32 i = 0; i < InputStringLength; i++)
{
InsertChar(&EntryString->Buffer, InputString[i], EntryString->CursorPosition);
EntryString->CursorPosition++;
}
}
PipeSearchStringToDestination(EntryString);
}
internal void
MoveCursorRight (text_entry* TextEntry)
{
@ -86,6 +72,21 @@ MoveCursorLeft (text_entry* TextEntry)
TextEntry->CursorPosition = GSMax(0, TextEntry->CursorPosition - 1);
}
FOLDHAUS_INPUT_COMMAND_PROC(TextEntryInsertChar)
{
char Char = CharacterFromKeyCode(Event.Key);
if (Event.Key >= KeyCode_A && Event.Key <= KeyCode_Z && (Event.Modifiers & Modifier_Shift) == 0)
{
Char += ('a' - 'A');
}
InsertChar(&State->ActiveTextEntry.Buffer, Char, State->ActiveTextEntry.CursorPosition);
State->ActiveTextEntry.CursorPosition++;
// TODO(Peter): Do we want to do this after every single character?
PipeSearchStringToDestination(&State->ActiveTextEntry);
}
FOLDHAUS_INPUT_COMMAND_PROC(RemoveCharacterFromEntryString)
{
RemoveCharacterAtCursor(&State->ActiveTextEntry);
@ -109,5 +110,11 @@ InitializeTextInputCommands (input_command_registry* Commands, memory_arena* Per
RegisterKeyPressCommand(Commands, KeyCode_Backspace, false, KeyCode_Invalid, RemoveCharacterFromEntryString);
RegisterKeyPressCommand(Commands, KeyCode_LeftArrow, false, KeyCode_Invalid, TextEntryMoveCursorLeft);
RegisterKeyPressCommand(Commands, KeyCode_RightArrow, false, KeyCode_Invalid, TextEntryMoveCursorRight);
for (s32 i = KeyCode_a; i < KeyCode_UpArrow; i++)
{
RegisterKeyPressCommand(Commands, (key_code)i, false, KeyCode_Invalid, TextEntryInsertChar);
}
}
}

88
src/gs_input.h Normal file
View File

@ -0,0 +1,88 @@
enum key_state_flags
{
KeyState_WasDown = 1 << 0,
KeyState_IsDown = 1 << 1,
};
#define KeyWasDown(event) ((event.State & KeyState_WasDown) > 0)
#define KeyIsDown(event) ((event.State & KeyState_IsDown) > 0)
struct input_entry
{
key_code Key;
b32 State;
b32 Modifiers;
};
struct input_queue
{
s32 QueueSize;
s32 QueueUsed;
input_entry* Entries;
};
struct mouse_state
{
s32 Scroll;
v2 Pos;
v2 OldPos;
v2 DeltaPos;
v2 DownPos;
};
internal input_queue
InitializeInputQueue (u8* Memory, s32 MemorySize)
{
input_queue Result = {};
s32 EntriesCount = MemorySize / sizeof(input_entry);
Result.QueueSize = EntriesCount;
Result.QueueUsed = 0;
Result.Entries = (input_entry*)Memory;
return Result;
}
internal void
ResetInputQueue (input_queue* Queue)
{
Queue->QueueUsed = 0;
}
internal void
AddInputEventEntry (input_queue* Queue, key_code Key,
b32 WasDown, b32 IsDown, b32 ShiftDown, b32 AltDown, b32 CtrlDown, b32 SysDown)
{
Assert(Queue->QueueUsed < Queue->QueueSize);
input_entry* Entry = Queue->Entries + Queue->QueueUsed++;
Entry->Key = Key;
Entry->State = (key_state_flags)0;
if (WasDown) { Entry->State |= KeyState_WasDown; }
if (IsDown) { Entry->State |= KeyState_IsDown; }
Entry->Modifiers = 0;
if (ShiftDown) { Entry->Modifiers |= Modifier_Shift; }
if (CtrlDown) { Entry->Modifiers |= Modifier_Ctrl; }
if (AltDown) { Entry->Modifiers |= Modifier_Alt; }
if (SysDown) { Entry->Modifiers |= Modifier_Sys; }
}
internal b32
KeyTransitionedDown (input_entry Entry)
{
return (!KeyWasDown(Entry) && KeyIsDown(Entry));
}
internal b32
KeyTransitionedUp (input_entry Entry)
{
return (KeyWasDown(Entry) && !KeyIsDown(Entry));
}
internal b32
KeyHeldDown (input_entry Entry)
{
return (KeyWasDown(Entry) && KeyIsDown(Entry));
}

View File

@ -169,6 +169,133 @@ enum key_code
KeyCode_Count,
};
internal char
CharacterFromKeyCode (key_code Code)
{
char Result = 0;
switch (Code)
{
case KeyCode_Space: { Result = ' '; }break;
case KeyCode_Tab: { Result = '\t'; }break;
// Letters
case KeyCode_a: { Result = 'a'; }break;
case KeyCode_b: { Result = 'b'; }break;
case KeyCode_c: { Result = 'c'; }break;
case KeyCode_d: { Result = 'd'; }break;
case KeyCode_e: { Result = 'e'; }break;
case KeyCode_f: { Result = 'f'; }break;
case KeyCode_g: { Result = 'g'; }break;
case KeyCode_h: { Result = 'h'; }break;
case KeyCode_i: { Result = 'i'; }break;
case KeyCode_j: { Result = 'j'; }break;
case KeyCode_k: { Result = 'k'; }break;
case KeyCode_l: { Result = 'l'; }break;
case KeyCode_m: { Result = 'm'; }break;
case KeyCode_n: { Result = 'n'; }break;
case KeyCode_o: { Result = 'o'; }break;
case KeyCode_p: { Result = 'p'; }break;
case KeyCode_q: { Result = 'q'; }break;
case KeyCode_r: { Result = 'r'; }break;
case KeyCode_s: { Result = 's'; }break;
case KeyCode_t: { Result = 't'; }break;
case KeyCode_u: { Result = 'u'; }break;
case KeyCode_v: { Result = 'v'; }break;
case KeyCode_w: { Result = 'w'; }break;
case KeyCode_x: { Result = 'x'; }break;
case KeyCode_y: { Result = 'y'; }break;
case KeyCode_z: { Result = 'z'; }break;
case KeyCode_A: { Result = 'A'; }break;
case KeyCode_B: { Result = 'B'; }break;
case KeyCode_C: { Result = 'C'; }break;
case KeyCode_D: { Result = 'D'; }break;
case KeyCode_E: { Result = 'E'; }break;
case KeyCode_F: { Result = 'F'; }break;
case KeyCode_G: { Result = 'G'; }break;
case KeyCode_H: { Result = 'H'; }break;
case KeyCode_I: { Result = 'I'; }break;
case KeyCode_J: { Result = 'J'; }break;
case KeyCode_K: { Result = 'K'; }break;
case KeyCode_L: { Result = 'L'; }break;
case KeyCode_M: { Result = 'M'; }break;
case KeyCode_N: { Result = 'N'; }break;
case KeyCode_O: { Result = 'O'; }break;
case KeyCode_P: { Result = 'P'; }break;
case KeyCode_Q: { Result = 'Q'; }break;
case KeyCode_R: { Result = 'R'; }break;
case KeyCode_S: { Result = 'S'; }break;
case KeyCode_T: { Result = 'T'; }break;
case KeyCode_U: { Result = 'U'; }break;
case KeyCode_V: { Result = 'V'; }break;
case KeyCode_W: { Result = 'W'; }break;
case KeyCode_X: { Result = 'X'; }break;
case KeyCode_Y: { Result = 'Y'; }break;
case KeyCode_Z: { Result = 'Z'; }break;
// Numbers
case KeyCode_0: { Result = '0'; }break;
case KeyCode_1: { Result = '1'; }break;
case KeyCode_2: { Result = '2'; }break;
case KeyCode_3: { Result = '3'; }break;
case KeyCode_4: { Result = '4'; }break;
case KeyCode_5: { Result = '5'; }break;
case KeyCode_6: { Result = '6'; }break;
case KeyCode_7: { Result = '7'; }break;
case KeyCode_8: { Result = '8'; }break;
case KeyCode_9: { Result = '9'; }break;
case KeyCode_Num0: { Result = '0'; }break;
case KeyCode_Num1: { Result = '1'; }break;
case KeyCode_Num2: { Result = '2'; }break;
case KeyCode_Num3: { Result = '3'; }break;
case KeyCode_Num4: { Result = '4'; }break;
case KeyCode_Num5: { Result = '5'; }break;
case KeyCode_Num6: { Result = '6'; }break;
case KeyCode_Num7: { Result = '7'; }break;
case KeyCode_Num8: { Result = '8'; }break;
case KeyCode_Num9: { Result = '9'; }break;
// Symbols
case KeyCode_Bang: { Result = '!'; }break;
case KeyCode_At: { Result = '@'; }break;
case KeyCode_Pound: { Result = '#'; }break;
case KeyCode_Dollar: { Result = '$'; }break;
case KeyCode_Percent: { Result = '%'; }break;
case KeyCode_Carrot: { Result = '^'; }break;
case KeyCode_Ampersand: { Result = '&'; }break;
case KeyCode_Star: { Result = '*'; }break;
case KeyCode_LeftParen: { Result = '('; }break;
case KeyCode_RightParen: { Result = ')'; }break;
case KeyCode_Minus: { Result = '-'; }break;
case KeyCode_Plus: { Result = '+'; }break;
case KeyCode_Equals: { Result = '='; }break;
case KeyCode_Underscore: { Result = '_'; }break;
case KeyCode_LeftBrace: { Result = '['; }break;
case KeyCode_RightBrace: { Result = ']'; }break;
case KeyCode_LeftBracket: { Result = '{'; }break;
case KeyCode_RightBracket: { Result = '}'; }break;
case KeyCode_Colon: { Result = ':'; }break;
case KeyCode_SemiColon: { Result = ';'; }break;
case KeyCode_SingleQuote: { Result = '\''; }break;
case KeyCode_DoubleQuote: { Result = '"'; }break;
case KeyCode_ForwardSlash: { Result = '/'; }break;
case KeyCode_Backslash: { Result = '\\'; }break;
case KeyCode_Pipe: { Result = '|'; }break;
case KeyCode_Comma: { Result = ','; }break;
case KeyCode_Period: { Result = '.'; }break;
case KeyCode_QuestionMark: { Result = '?'; }break;
case KeyCode_LessThan: { Result = '<'; }break;
case KeyCode_GreaterThan: { Result = '>'; }break;
case KeyCode_Tilde: { Result = '~'; }break;
case KeyCode_BackQuote: { Result = '`'; }break;
}
Assert(Result != 0);
return Result;
}
enum modifier_flags
{
Modifier_Shift = 1 << 0,

View File

@ -300,110 +300,108 @@ LPARAM lParam
return EventResult.Result;
}
#define WIN32_SHOULD_TRANSLATE_TO_CHAR -1
static int
Win32GetKeyIndex (int Win32VirtualKey, bool NumpadValid, bool TranslateToChar)
static key_code
Win32GetKeyCode (int Win32VirtualKey, bool NumpadValid, bool TranslateToChar)
{
int Result = WIN32_SHOULD_TRANSLATE_TO_CHAR;
key_code Result = KeyCode_Invalid;
if (Win32VirtualKey == VK_ESCAPE) { Result = (int)KeyCode_Esc; }
if (Win32VirtualKey == VK_ESCAPE) { Result = KeyCode_Esc; }
if (!TranslateToChar)
{
if (Win32VirtualKey == VK_SPACE) { Result = (int)KeyCode_Space; }
if (Win32VirtualKey == VK_SPACE) { Result = KeyCode_Space; }
}
if (Win32VirtualKey == VK_CAPITAL) { Result = (int)KeyCode_CapsLock; }
else if (Win32VirtualKey == VK_TAB) { Result = (int)KeyCode_Tab; }
else if (Win32VirtualKey == VK_LSHIFT) { Result = (int)KeyCode_LeftShift; }
else if (Win32VirtualKey == VK_RSHIFT) { Result = (int)KeyCode_RightShift; }
else if (Win32VirtualKey == VK_LCONTROL) { Result = (int)KeyCode_LeftCtrl; }
else if (Win32VirtualKey == VK_RCONTROL) { Result = (int)KeyCode_RightCtrl; }
if (Win32VirtualKey == VK_CAPITAL) { Result = KeyCode_CapsLock; }
else if (Win32VirtualKey == VK_TAB) { Result = KeyCode_Tab; }
else if (Win32VirtualKey == VK_LSHIFT) { Result = KeyCode_LeftShift; }
else if (Win32VirtualKey == VK_RSHIFT) { Result = KeyCode_RightShift; }
else if (Win32VirtualKey == VK_LCONTROL) { Result = KeyCode_LeftCtrl; }
else if (Win32VirtualKey == VK_RCONTROL) { Result = KeyCode_RightCtrl; }
// TODO(Peter): support the function key?
//else if (Win32VirtualKey == VK_) { Result = (int)KeyCode_Fn; }
//else if (Win32VirtualKey == VK_) { Result = KeyCode_Fn; }
else if (Win32VirtualKey == VK_MENU) { Result = (int)KeyCode_Alt; }
else if (Win32VirtualKey == VK_PRIOR) { Result = (int)KeyCode_PageUp; }
else if (Win32VirtualKey == VK_NEXT) { Result = (int)KeyCode_PageDown; }
else if (Win32VirtualKey == VK_BACK) { Result = (int)KeyCode_Backspace; }
else if (Win32VirtualKey == VK_DELETE) { Result = (int)KeyCode_Delete; }
else if (Win32VirtualKey == VK_RETURN) { Result = (int)KeyCode_Enter; }
else if (Win32VirtualKey == VK_MENU) { Result = KeyCode_Alt; }
else if (Win32VirtualKey == VK_PRIOR) { Result = KeyCode_PageUp; }
else if (Win32VirtualKey == VK_NEXT) { Result = KeyCode_PageDown; }
else if (Win32VirtualKey == VK_BACK) { Result = KeyCode_Backspace; }
else if (Win32VirtualKey == VK_DELETE) { Result = KeyCode_Delete; }
else if (Win32VirtualKey == VK_RETURN) { Result = KeyCode_Enter; }
else if (Win32VirtualKey == VK_F1) { Result = (int)KeyCode_F1; }
else if (Win32VirtualKey == VK_F2) { Result = (int)KeyCode_F2; }
else if (Win32VirtualKey == VK_F3) { Result = (int)KeyCode_F3; }
else if (Win32VirtualKey == VK_F4) { Result = (int)KeyCode_F4; }
else if (Win32VirtualKey == VK_F5) { Result = (int)KeyCode_F5; }
else if (Win32VirtualKey == VK_F6) { Result = (int)KeyCode_F6; }
else if (Win32VirtualKey == VK_F7) { Result = (int)KeyCode_F7; }
else if (Win32VirtualKey == VK_F8) { Result = (int)KeyCode_F8; }
else if (Win32VirtualKey == VK_F9) { Result = (int)KeyCode_F9; }
else if (Win32VirtualKey == VK_F10) { Result = (int)KeyCode_F10; }
else if (Win32VirtualKey == VK_F11) { Result = (int)KeyCode_F11; }
else if (Win32VirtualKey == VK_F12) { Result = (int)KeyCode_F12; }
else if (Win32VirtualKey == VK_F1) { Result = KeyCode_F1; }
else if (Win32VirtualKey == VK_F2) { Result = KeyCode_F2; }
else if (Win32VirtualKey == VK_F3) { Result = KeyCode_F3; }
else if (Win32VirtualKey == VK_F4) { Result = KeyCode_F4; }
else if (Win32VirtualKey == VK_F5) { Result = KeyCode_F5; }
else if (Win32VirtualKey == VK_F6) { Result = KeyCode_F6; }
else if (Win32VirtualKey == VK_F7) { Result = KeyCode_F7; }
else if (Win32VirtualKey == VK_F8) { Result = KeyCode_F8; }
else if (Win32VirtualKey == VK_F9) { Result = KeyCode_F9; }
else if (Win32VirtualKey == VK_F10) { Result = KeyCode_F10; }
else if (Win32VirtualKey == VK_F11) { Result = KeyCode_F11; }
else if (Win32VirtualKey == VK_F12) { Result = KeyCode_F12; }
if (!TranslateToChar)
{
if (Win32VirtualKey == 0x30) { Result = (int)KeyCode_0; }
else if (Win32VirtualKey == 0x31) { Result = (int)KeyCode_1; }
else if (Win32VirtualKey == 0x32) { Result = (int)KeyCode_2; }
else if (Win32VirtualKey == 0x33) { Result = (int)KeyCode_3; }
else if (Win32VirtualKey == 0x34) { Result = (int)KeyCode_4; }
else if (Win32VirtualKey == 0x35) { Result = (int)KeyCode_5; }
else if (Win32VirtualKey == 0x36) { Result = (int)KeyCode_6; }
else if (Win32VirtualKey == 0x37) { Result = (int)KeyCode_7; }
else if (Win32VirtualKey == 0x38) { Result = (int)KeyCode_8; }
else if (Win32VirtualKey == 0x39) { Result = (int)KeyCode_9; }
if (Win32VirtualKey == 0x30) { Result = KeyCode_0; }
else if (Win32VirtualKey == 0x31) { Result = KeyCode_1; }
else if (Win32VirtualKey == 0x32) { Result = KeyCode_2; }
else if (Win32VirtualKey == 0x33) { Result = KeyCode_3; }
else if (Win32VirtualKey == 0x34) { Result = KeyCode_4; }
else if (Win32VirtualKey == 0x35) { Result = KeyCode_5; }
else if (Win32VirtualKey == 0x36) { Result = KeyCode_6; }
else if (Win32VirtualKey == 0x37) { Result = KeyCode_7; }
else if (Win32VirtualKey == 0x38) { Result = KeyCode_8; }
else if (Win32VirtualKey == 0x39) { Result = KeyCode_9; }
else if (Win32VirtualKey == 0x41) { Result = (int)KeyCode_A; }
else if (Win32VirtualKey == 0x42) { Result = (int)KeyCode_B; }
else if (Win32VirtualKey == 0x43) { Result = (int)KeyCode_C; }
else if (Win32VirtualKey == 0x44) { Result = (int)KeyCode_D; }
else if (Win32VirtualKey == 0x45) { Result = (int)KeyCode_E; }
else if (Win32VirtualKey == 0x46) { Result = (int)KeyCode_F; }
else if (Win32VirtualKey == 0x47) { Result = (int)KeyCode_G; }
else if (Win32VirtualKey == 0x48) { Result = (int)KeyCode_H; }
else if (Win32VirtualKey == 0x49) { Result = (int)KeyCode_I; }
else if (Win32VirtualKey == 0x4A) { Result = (int)KeyCode_J; }
else if (Win32VirtualKey == 0x4B) { Result = (int)KeyCode_K; }
else if (Win32VirtualKey == 0x4C) { Result = (int)KeyCode_L; }
else if (Win32VirtualKey == 0x4D) { Result = (int)KeyCode_M; }
else if (Win32VirtualKey == 0x4E) { Result = (int)KeyCode_N; }
else if (Win32VirtualKey == 0x4F) { Result = (int)KeyCode_O; }
else if (Win32VirtualKey == 0x50) { Result = (int)KeyCode_P; }
else if (Win32VirtualKey == 0x51) { Result = (int)KeyCode_Q; }
else if (Win32VirtualKey == 0x52) { Result = (int)KeyCode_R; }
else if (Win32VirtualKey == 0x53) { Result = (int)KeyCode_S; }
else if (Win32VirtualKey == 0x54) { Result = (int)KeyCode_T; }
else if (Win32VirtualKey == 0x55) { Result = (int)KeyCode_U; }
else if (Win32VirtualKey == 0x56) { Result = (int)KeyCode_V; }
else if (Win32VirtualKey == 0x57) { Result = (int)KeyCode_W; }
else if (Win32VirtualKey == 0x58) { Result = (int)KeyCode_X; }
else if (Win32VirtualKey == 0x59) { Result = (int)KeyCode_Y; }
else if (Win32VirtualKey == 0x5A) { Result = (int)KeyCode_Z; }
else if (Win32VirtualKey == 0x41) { Result = KeyCode_A; }
else if (Win32VirtualKey == 0x42) { Result = KeyCode_B; }
else if (Win32VirtualKey == 0x43) { Result = KeyCode_C; }
else if (Win32VirtualKey == 0x44) { Result = KeyCode_D; }
else if (Win32VirtualKey == 0x45) { Result = KeyCode_E; }
else if (Win32VirtualKey == 0x46) { Result = KeyCode_F; }
else if (Win32VirtualKey == 0x47) { Result = KeyCode_G; }
else if (Win32VirtualKey == 0x48) { Result = KeyCode_H; }
else if (Win32VirtualKey == 0x49) { Result = KeyCode_I; }
else if (Win32VirtualKey == 0x4A) { Result = KeyCode_J; }
else if (Win32VirtualKey == 0x4B) { Result = KeyCode_K; }
else if (Win32VirtualKey == 0x4C) { Result = KeyCode_L; }
else if (Win32VirtualKey == 0x4D) { Result = KeyCode_M; }
else if (Win32VirtualKey == 0x4E) { Result = KeyCode_N; }
else if (Win32VirtualKey == 0x4F) { Result = KeyCode_O; }
else if (Win32VirtualKey == 0x50) { Result = KeyCode_P; }
else if (Win32VirtualKey == 0x51) { Result = KeyCode_Q; }
else if (Win32VirtualKey == 0x52) { Result = KeyCode_R; }
else if (Win32VirtualKey == 0x53) { Result = KeyCode_S; }
else if (Win32VirtualKey == 0x54) { Result = KeyCode_T; }
else if (Win32VirtualKey == 0x55) { Result = KeyCode_U; }
else if (Win32VirtualKey == 0x56) { Result = KeyCode_V; }
else if (Win32VirtualKey == 0x57) { Result = KeyCode_W; }
else if (Win32VirtualKey == 0x58) { Result = KeyCode_X; }
else if (Win32VirtualKey == 0x59) { Result = KeyCode_Y; }
else if (Win32VirtualKey == 0x5A) { Result = KeyCode_Z; }
}
if (NumpadValid)
{
if (Win32VirtualKey == VK_NUMPAD0) { Result = (int)KeyCode_Num0; }
else if (Win32VirtualKey == VK_NUMPAD1) { Result = (int)KeyCode_Num1; }
else if (Win32VirtualKey == VK_NUMPAD2) { Result = (int)KeyCode_Num2; }
else if (Win32VirtualKey == VK_NUMPAD3) { Result = (int)KeyCode_Num3; }
else if (Win32VirtualKey == VK_NUMPAD4) { Result = (int)KeyCode_Num4; }
else if (Win32VirtualKey == VK_NUMPAD5) { Result = (int)KeyCode_Num5; }
else if (Win32VirtualKey == VK_NUMPAD6) { Result = (int)KeyCode_Num6; }
else if (Win32VirtualKey == VK_NUMPAD7) { Result = (int)KeyCode_Num7; }
else if (Win32VirtualKey == VK_NUMPAD8) { Result = (int)KeyCode_Num8; }
else if (Win32VirtualKey == VK_NUMPAD9) { Result = (int)KeyCode_Num9; }
if (Win32VirtualKey == VK_NUMPAD0) { Result = KeyCode_Num0; }
else if (Win32VirtualKey == VK_NUMPAD1) { Result = KeyCode_Num1; }
else if (Win32VirtualKey == VK_NUMPAD2) { Result = KeyCode_Num2; }
else if (Win32VirtualKey == VK_NUMPAD3) { Result = KeyCode_Num3; }
else if (Win32VirtualKey == VK_NUMPAD4) { Result = KeyCode_Num4; }
else if (Win32VirtualKey == VK_NUMPAD5) { Result = KeyCode_Num5; }
else if (Win32VirtualKey == VK_NUMPAD6) { Result = KeyCode_Num6; }
else if (Win32VirtualKey == VK_NUMPAD7) { Result = KeyCode_Num7; }
else if (Win32VirtualKey == VK_NUMPAD8) { Result = KeyCode_Num8; }
else if (Win32VirtualKey == VK_NUMPAD9) { Result = KeyCode_Num9; }
}
if (Win32VirtualKey == VK_UP) { Result = (int)KeyCode_UpArrow; }
else if (Win32VirtualKey == VK_DOWN) { Result = (int)KeyCode_DownArrow; }
else if (Win32VirtualKey == VK_LEFT) { Result = (int)KeyCode_LeftArrow; }
else if (Win32VirtualKey == VK_RIGHT) { Result = (int)KeyCode_RightArrow; }
if (Win32VirtualKey == VK_UP) { Result = KeyCode_UpArrow; }
else if (Win32VirtualKey == VK_DOWN) { Result = KeyCode_DownArrow; }
else if (Win32VirtualKey == VK_LEFT) { Result = KeyCode_LeftArrow; }
else if (Win32VirtualKey == VK_RIGHT) { Result = KeyCode_RightArrow; }
return Result;
}
@ -474,7 +472,7 @@ MSG Message)
{
int VirtualKey = (int)Message.wParam;
bool KeyDown = (Message.lParam & (1 << 31)) == 0;
int KeyIndex = Win32GetKeyIndex(VirtualKey, true, true);
int KeyIndex = Win32GetKeyCode(VirtualKey, true, true);
/*
if (KeyIndex >= 0)
{

View File

@ -1,3 +1,17 @@
struct gui_mouse
{
v2 Pos;
v2 OldPos;
v2 DeltaPos;
v2 DownPos;
b32 LeftButtonTransitionedDown;
b32 LeftButtonTransitionedUp;
b32 MiddleButtonTransitionedDown;
b32 MiddleButtonTransitionedUp;
b32 RightButtonTransitionedDown;
b32 RightButtonTransitionedUp;
};
internal v2
DrawCharacter (render_quad_batch_constructor* BatchConstructor, char C, bitmap_font Font, v2 Position, v4 Color, r32 FontScale)
{
@ -115,7 +129,7 @@ internal button_result
EvaluateButton (render_command_buffer* RenderBuffer,
v2 Min, v2 Max, v2 Margin, string Label,
v4 IdleBGColor, v4 HotBGColor, v4 IdleTextColor, v4 HotTextColor,
bitmap_font* Font, input Input)
bitmap_font* Font, gui_mouse Mouse)
{
button_result Result = {};
Result.Pressed = false;
@ -123,10 +137,9 @@ EvaluateButton (render_command_buffer* RenderBuffer,
v4 BGColor = IdleBGColor;
v4 TextColor = IdleTextColor;
v2 MousePos = v2{(r32)Input.New->MouseX, (r32)Input.New->MouseY};
if (PointIsInRange(MousePos, Min, Max))
if (PointIsInRange(Mouse.Pos, Min, Max))
{
if (KeyTransitionedDown(Input, KeyCode_MouseLeftButton))
if (Mouse.LeftButtonTransitionedDown)
{
Result.Pressed = true;
}
@ -145,18 +158,18 @@ EvaluateButton (render_command_buffer* RenderBuffer,
}
internal button_result
EvaluateButton (render_command_buffer* RenderBuffer, v2 Min, v2 Max, string Label, interface_config Config, input Input)
EvaluateButton (render_command_buffer* RenderBuffer, v2 Min, v2 Max, string Label, interface_config Config, gui_mouse Mouse)
{
button_result Result = EvaluateButton(RenderBuffer,
Min, Max, Config.Margin, Label,
Config.ButtonColor_Inactive, Config.ButtonColor_Active,
Config.TextColor, Config.TextColor,
Config.Font, Input);
Config.Font, Mouse);
return Result;
}
internal button_result
EvaluateSelectableButton (render_command_buffer* RenderBuffer, v2 Min, v2 Max, string Label, interface_config Config, input Input, b32 Selected)
EvaluateSelectableButton (render_command_buffer* RenderBuffer, v2 Min, v2 Max, string Label, interface_config Config, gui_mouse Mouse, b32 Selected)
{
v4 BGColor = Config.ButtonColor_Inactive;
if (Selected)
@ -168,7 +181,7 @@ EvaluateSelectableButton (render_command_buffer* RenderBuffer, v2 Min, v2 Max, s
Min, Max, Config.Margin, Label,
Config.ButtonColor_Inactive, Config.ButtonColor_Active,
Config.TextColor, Config.TextColor,
Config.Font, Input);
Config.Font, Mouse);
return Result;
}
@ -182,7 +195,7 @@ struct multi_option_label_result
internal multi_option_label_result
EvaluateMultiOptionLabel (render_command_buffer* RenderBuffer,
v2 Min, v2 Max, string Label, string Options[],
interface_config Config, input Input)
interface_config Config, gui_mouse Mouse)
{
multi_option_label_result Result = {};
Result.Pressed = false;
@ -196,7 +209,7 @@ EvaluateMultiOptionLabel (render_command_buffer* RenderBuffer,
for (s32 b = 0; b < sizeof(Options) / sizeof(Options[0]); b++)
{
button_result Button = EvaluateButton(RenderBuffer, ButtonPos, ButtonPos + ButtonDim,
Options[b], Config, Input);
Options[b], Config, Mouse);
if (Button.Pressed)
{
Result.Pressed = true;
@ -212,7 +225,7 @@ EvaluateMultiOptionLabel (render_command_buffer* RenderBuffer,
// to one of its options
internal multi_option_label_result
EvaluateMultiOptionButton (render_command_buffer* RenderBuffer, v2 Min, v2 Max, string Text, string Options[], b32 Selected,
interface_config Config, input Input)
interface_config Config, gui_mouse Mouse)
{
multi_option_label_result Result = {};
Result.Pressed = false;
@ -224,7 +237,7 @@ EvaluateMultiOptionButton (render_command_buffer* RenderBuffer, v2 Min, v2 Max,
v2 FirstButtonPos = Max - ((ButtonDim + Config.Margin) * OptionsCount);
v2 NewMax = v2{FirstButtonPos.x - Config.Margin.x, Max.y};
button_result MainButton = EvaluateSelectableButton(RenderBuffer, Min, NewMax, Text, Config, Input, Selected);
button_result MainButton = EvaluateSelectableButton(RenderBuffer, Min, NewMax, Text, Config, Mouse, Selected);
if (MainButton.Pressed)
{
Result.Pressed = true;
@ -236,7 +249,7 @@ EvaluateMultiOptionButton (render_command_buffer* RenderBuffer, v2 Min, v2 Max,
for (s32 b = 0; b < OptionsCount; b++)
{
button_result Button = EvaluateButton(RenderBuffer, ButtonPos, ButtonPos + ButtonDim,
Options[b], Config, Input);
Options[b], Config, Mouse);
if (Button.Pressed)
{
Result.Pressed = true;
@ -255,7 +268,7 @@ struct slider_result
};
internal slider_result
EvaluateSlider (render_command_buffer* RenderBuffer, v2 Min, v2 Max, string Label, r32 Percent, interface_config Config, input Input)
EvaluateSlider (render_command_buffer* RenderBuffer, v2 Min, v2 Max, string Label, r32 Percent, interface_config Config, gui_mouse Mouse)
{
slider_result Result = {};
@ -264,18 +277,16 @@ EvaluateSlider (render_command_buffer* RenderBuffer, v2 Min, v2 Max, string Labe
r32 DisplayPercent = Percent;
v2 MousePos = v2{(r32)Input.New->MouseX, (r32)Input.New->MouseY};
if (PointIsInRange(MousePos, Min, Max))
if (PointIsInRange(Mouse.Pos, Min, Max))
{
BGColor = Config.ButtonColor_Active;
}
if (KeyDown(Input, KeyCode_MouseLeftButton))
if (Mouse.LeftButtonTransitionedDown)
{
v2 MouseDownPos = v2{(r32)Input.MouseDownX, (r32)Input.MouseDownY};
if (PointIsInRange(MouseDownPos, Min, Max))
if (PointIsInRange(Mouse.DownPos, Min, Max))
{
r32 TempFillPercent = (MousePos.y - Min.y) / (Max.y - Min.y);
r32 TempFillPercent = (Mouse.Pos.y - Min.y) / (Max.y - Min.y);
DisplayPercent = GSClamp(0.0f, TempFillPercent, 1.0f);
}
@ -304,7 +315,7 @@ struct panel_result
};
internal panel_result
EvaluatePanel (render_command_buffer* RenderBuffer, v2 Min, v2 Max, s32 Depth, interface_config Config, input Input)
EvaluatePanel (render_command_buffer* RenderBuffer, v2 Min, v2 Max, s32 Depth, interface_config Config)
{
panel_result Result = {};
@ -320,9 +331,9 @@ EvaluatePanel (render_command_buffer* RenderBuffer, v2 Min, v2 Max, s32 Depth, i
}
internal panel_result
EvaluatePanel (render_command_buffer* RenderBuffer, v2 Min, v2 Max, string Label, s32 Depth, interface_config Config, input Input)
EvaluatePanel (render_command_buffer* RenderBuffer, v2 Min, v2 Max, string Label, s32 Depth, interface_config Config)
{
panel_result Result = EvaluatePanel(RenderBuffer, Min, Max, Depth, Config, Input);
panel_result Result = EvaluatePanel(RenderBuffer, Min, Max, Depth, Config);
v2 TextPos = v2{
Min.x + Config.Margin.x,
@ -335,11 +346,11 @@ EvaluatePanel (render_command_buffer* RenderBuffer, v2 Min, v2 Max, string Label
}
internal panel_result
EvaluatePanel(render_command_buffer* RenderBuffer, panel_result* ParentPanel, r32 Height, string Title, interface_config Config, input Input)
EvaluatePanel(render_command_buffer* RenderBuffer, panel_result* ParentPanel, r32 Height, string Title, interface_config Config)
{
v2 Min = v2{ParentPanel->ChildMin.x, ParentPanel->ChildMax.y - Height};
v2 Max = ParentPanel->ChildMax;
panel_result Result = EvaluatePanel(RenderBuffer, Min, Max, Title, ParentPanel->Depth + 1, Config, Input);
panel_result Result = EvaluatePanel(RenderBuffer, Min, Max, Title, ParentPanel->Depth + 1, Config);
ParentPanel->ChildMax.y = Min.y - Config.Margin.y;
@ -363,7 +374,7 @@ struct scroll_list_result
internal scroll_list_result
DrawOptionsList(render_command_buffer* RenderBuffer, v2 Min, v2 Max,
string* Options, s32 OptionsCount,
s32 Start, interface_config Config, input Input)
s32 Start, interface_config Config, gui_mouse Mouse)
{
scroll_list_result Result = {};
Result.IndexSelected = -1;
@ -384,7 +395,7 @@ DrawOptionsList(render_command_buffer* RenderBuffer, v2 Min, v2 Max,
{
button_result Button = EvaluateButton(RenderBuffer, ButtonMin, ButtonMax,
*OptionCursor,
Config, Input);
Config, Mouse);
if (Button.Pressed)
{
Result.IndexSelected = Start + i;
@ -399,10 +410,10 @@ DrawOptionsList(render_command_buffer* RenderBuffer, v2 Min, v2 Max,
string DownArrowString = MakeStringLiteral(" v ");
string UpArrowString = MakeStringLiteral(" ^ ");
button_result Down = EvaluateButton(RenderBuffer, Min, v2{Min.x + HalfWidthWithMargin, Min.y + OptionHeight},
DownArrowString, Config, Input);
DownArrowString, Config, Mouse);
button_result Up = EvaluateButton(RenderBuffer, v2{Min.x + HalfWidthWithMargin + Config.Margin.x, Min.y},
v2{Max.x, Min.y + OptionHeight},
UpArrowString, Config, Input);
UpArrowString, Config, Mouse);
if (Down.Pressed)
{
Result.StartIndex += 1;
@ -420,7 +431,7 @@ DrawOptionsList(render_command_buffer* RenderBuffer, v2 Min, v2 Max,
internal scroll_list_result
DrawSelectableOptionsList(render_command_buffer* RenderBuffer, v2 Min, v2 Max,
string* Options, s32 OptionsCount,
s32 Start, s32 Selected, interface_config Config, input Input)
s32 Start, s32 Selected, interface_config Config, gui_mouse Mouse)
{
scroll_list_result Result = {};
Result.IndexSelected = Selected;
@ -443,7 +454,7 @@ DrawSelectableOptionsList(render_command_buffer* RenderBuffer, v2 Min, v2 Max,
{
button_result Button = EvaluateSelectableButton(RenderBuffer, ButtonMin, ButtonMax,
*OptionCursor,
Config, Input, (Selected == Start + i));
Config, Mouse, (Selected == Start + i));
if (Button.Pressed)
{
s32 SelectedIndex = Start + i;
@ -469,10 +480,10 @@ DrawSelectableOptionsList(render_command_buffer* RenderBuffer, v2 Min, v2 Max,
string DownArrowString = MakeStringLiteral(" v ");
string UpArrowString = MakeStringLiteral(" ^ ");
button_result Down = EvaluateButton(RenderBuffer, Min, v2{Min.x + HalfWidthWithMargin, Min.y + OptionHeight},
DownArrowString, Config, Input);
DownArrowString, Config, Mouse);
button_result Up = EvaluateButton(RenderBuffer, v2{Min.x + HalfWidthWithMargin + Config.Margin.x, Min.y},
v2{Max.x, Min.y + OptionHeight},
UpArrowString, Config, Input);
UpArrowString, Config, Mouse);
if (Down.Pressed)
{
Result.StartIndex += 1;
@ -488,7 +499,7 @@ DrawSelectableOptionsList(render_command_buffer* RenderBuffer, v2 Min, v2 Max,
}
internal r32
EvaluateColorChannelSlider (render_command_buffer* RenderBuffer, v4 ChannelMask, v2 Min, v2 Max, r32 Current, input Input)
EvaluateColorChannelSlider (render_command_buffer* RenderBuffer, v4 ChannelMask, v2 Min, v2 Max, r32 Current, gui_mouse Mouse)
{
r32 Result = Current;
@ -502,12 +513,11 @@ EvaluateColorChannelSlider (render_command_buffer* RenderBuffer, v4 ChannelMask,
v2{0, 0}, v2{1, 0}, v2{1, 1}, v2{0, 1},
LeftColor, RightColor, RightColor, LeftColor);
if (KeyDown(Input, KeyCode_MouseLeftButton))
if (Mouse.LeftButtonTransitionedDown)
{
v2 MouseDownPos = v2{(r32)Input.MouseDownX, (r32)Input.MouseDownY};
if (PointIsInRange(MouseDownPos, Min, Max))
if (PointIsInRange(Mouse.DownPos, Min, Max))
{
Result = ((r32)Input.New->MouseX - Min.x) / (Max.x - Min.x);
Result = ((r32)Mouse.Pos.x - Min.x) / (Max.x - Min.x);
Result = GSClamp01(Result);
}
}
@ -522,13 +532,12 @@ EvaluateColorChannelSlider (render_command_buffer* RenderBuffer, v4 ChannelMask,
}
internal b32
EvaluateColorPicker (render_command_buffer* RenderBuffer, v4* Value, v2 PanelMin, interface_config Config, input Input)
EvaluateColorPicker (render_command_buffer* RenderBuffer, v4* Value, v2 PanelMin, interface_config Config, gui_mouse Mouse)
{
b32 ShouldClose = false;
v2 PanelMax = v2{400, 500};
if (KeyTransitionedDown(Input, KeyCode_MouseLeftButton) &&
!PointIsInRange(v2{(r32)Input.New->MouseX, (r32)Input.New->MouseY}, PanelMin, PanelMax))
if (Mouse.LeftButtonTransitionedDown && !PointIsInRange(Mouse.Pos, PanelMin, PanelMax))
{
ShouldClose = true;
}
@ -543,13 +552,13 @@ EvaluateColorPicker (render_command_buffer* RenderBuffer, v4* Value, v2 PanelMin
v2 SliderDim = v2{(PanelMax.x - PanelMin.x) - 20, 32};
// channel sliders
v2 SliderMin = TitleMin - v2{0, SliderDim.y + 10};
Value->r = EvaluateColorChannelSlider(RenderBuffer, RedV4, SliderMin, SliderMin + SliderDim, Value->r, Input);
Value->r = EvaluateColorChannelSlider(RenderBuffer, RedV4, SliderMin, SliderMin + SliderDim, Value->r, Mouse);
SliderMin.y -= SliderDim.y + 10;
Value->g = EvaluateColorChannelSlider(RenderBuffer, GreenV4, SliderMin, SliderMin + SliderDim, Value->g, Input);
Value->g = EvaluateColorChannelSlider(RenderBuffer, GreenV4, SliderMin, SliderMin + SliderDim, Value->g, Mouse);
SliderMin.y -= SliderDim.y + 10;
Value->b = EvaluateColorChannelSlider(RenderBuffer, BlueV4, SliderMin, SliderMin + SliderDim, Value->b, Input);
Value->b = EvaluateColorChannelSlider(RenderBuffer, BlueV4, SliderMin, SliderMin + SliderDim, Value->b, Mouse);
SliderMin.y -= SliderDim.y + 10;
Value->a = EvaluateColorChannelSlider(RenderBuffer, WhiteV4, SliderMin, SliderMin + SliderDim, Value->a, Input);
Value->a = EvaluateColorChannelSlider(RenderBuffer, WhiteV4, SliderMin, SliderMin + SliderDim, Value->a, Mouse);
// Output Color Display
SliderMin.y -= 100;
@ -572,7 +581,7 @@ internal search_lister_result
EvaluateSearchLister (render_command_buffer* RenderBuffer, v2 TopLeft, v2 Dimension, string Title,
s32 ListLength, u8* ListMemory, s32 HotItem, search_lister_get_list_item_at_offset* GetListItem,
string* SearchString, s32 SearchStringCursorPosition,
bitmap_font* Font, interface_config Config, input Input)
bitmap_font* Font, interface_config Config, gui_mouse Mouse)
{
Assert(GetListItem != 0);
@ -611,7 +620,7 @@ EvaluateSearchLister (render_command_buffer* RenderBuffer, v2 TopLeft, v2 Dimens
button_result Button = EvaluateButton(RenderBuffer, Min, Max, Config.Margin, ListItemString,
ButtonColor, ButtonColor, Config.TextColor, Config.TextColor,
Config.Font, Input);
Config.Font, Mouse);
if (Button.Pressed)
{
Result.SelectedItem = i;

78
src/todo.txt Normal file
View File

@ -0,0 +1,78 @@
TODO FOLDHAUS
Hardening
- memory visualization
- separate rendering thread
- cache led positions. Only update if they are moving
- input context changes
- - shift drag to 10x drag speed
- select nodes -> delete nodes
- remove node connections
Name
- Splash screen (like blender) (thisll be fun)
- - Image importer (stb image? or find a png > bmp converter for the image you have)
- - Display on startup
/Debug
x Make debug scope tracking thread safe - was throwing an error in stringsequal but that stopped.
x Keep an eye out.
Application
- More efficient HSV <-> RGB
- Save and load a session
- - Serialize Nodes
- Don't render if the window isn't visible
Development
- Fix your scope time tracker to account for threads.
- Nest scope times so you can see totals/dig in
- Log memory allocations
Interface
- fullscreen
- In world interface elements
- - Handles for Patterns
- - UI Popups
- - Value modifiers
- Scroll view
- Update the text system - use system fonts
Switch To Nodes
x basic node elements
- - evaluation step (one node at a time)
- - selector node (has a list of connections that it can switch between)
- serialize
- delete nodes
Structure
- motion
Renderer
- Mouse Picking - point at a led and see info about it
- Camera: pan
- Camera: zoom
- Camera: leds always face camera
Resource Management
- TODO: Need to figure out which textures are currently in graphics memory and which need to be resubmitted
- Icons
Animation
- timeline
- create clips that play
- clips can have parameters that drive them?
- clips should have prerequesites
- - channels active
- - patterns active in the channel
- - when a clip is playing, it should just take over the whole structure
Command Line
- select a channel/pattern
Optimization
- patterns are asking to be multithreaded
- probably want to convert as much color functions to use u32 Packed Colors
- - Probably want to think about this more. What about supporting different color depths
- for different output devices?

View File

@ -277,10 +277,6 @@ GET_FONT_INFO(Win32GetFontInfo)
return Result;
}
/*
u8* DestBuffer, s32 DestBufferWidth, s32 DestBufferHeight, u32 XOffset, u32 YOffset, char Codepoint, platform_font_info FontInfo, u32* OutWidth, u32* OutHeight
*/
DRAW_FONT_CODEPOINT(Win32DrawFontCodepoint)
{
SIZE CodepointSize = {};
@ -368,23 +364,50 @@ HandleWindowEvents (HWND WindowHandle, UINT Msg, WPARAM WParam, LPARAM LParam)
}
internal void
HandleWindowMessage (MSG Message, window* Window, input_frame* InputFrame)
HandleWindowMessage (MSG Message, window* Window, input_queue* InputQueue, mouse_state* Mouse)
{
switch (Message.message)
{
case WM_MOUSEWHEEL:
{
Win32UpdateInputFrameMouseWheelDelta(InputFrame, Message);
Mouse->Scroll = GET_WHEEL_DELTA_WPARAM(Message.wParam);
}break;
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
{
AddInputEventEntry(InputQueue, KeyCode_MouseLeftButton, false, true,
false, false, false, false);
Mouse->DownPos = Mouse->Pos;
}break;
case WM_MBUTTONDOWN:
case WM_MBUTTONUP:
{
AddInputEventEntry(InputQueue, KeyCode_MouseMiddleButton, false, true,
false, false, false, false);
}break;
case WM_RBUTTONDOWN:
{
AddInputEventEntry(InputQueue, KeyCode_MouseRightButton, false, true,
false, false, false, false);
}break;
case WM_LBUTTONUP:
{
AddInputEventEntry(InputQueue, KeyCode_MouseLeftButton, true, false,
false, false, false, false);
}break;
case WM_MBUTTONUP:
{
AddInputEventEntry(InputQueue, KeyCode_MouseMiddleButton, true, false,
false, false, false, false);
}break;
case WM_RBUTTONUP:
{
Win32UpdateInputFrameMouseState(InputFrame);
AddInputEventEntry(InputQueue, KeyCode_MouseRightButton, true, false,
false, false, false, false);
}break;
case WM_SYSKEYDOWN:
@ -393,26 +416,15 @@ HandleWindowMessage (MSG Message, window* Window, input_frame* InputFrame)
case WM_KEYUP:
{
int VirtualKey = (int)Message.wParam;
bool KeyDown = (Message.lParam & (1 << 31)) == 0;
int KeyIndex = Win32GetKeyIndex(VirtualKey, true, true);
if (KeyIndex == WIN32_SHOULD_TRANSLATE_TO_CHAR)
{
KeyIndex = Win32GetKeyIndex(VirtualKey, true, false);
InputFrame->KeysDown[KeyIndex] = KeyDown;
TranslateMessage(&Message);
DispatchMessage(&Message);
}
else
{
InputFrame->KeysDown[KeyIndex] = KeyDown;
}
}break;
case WM_CHAR:
{
char Char = (char)Message.wParam;
InputFrame->StringInput[InputFrame->StringInputUsed++] = Char;
key_code Key = Win32GetKeyCode(VirtualKey, true, false);
s32 KeyIndex = (int)Key;
b32 KeyWasDown = (Message.lParam & (1 << 30)) != 0;
b32 KeyIsDown = (Message.lParam & (1 << 31)) == 0;
// New Input Queue
// TODO(Peter): Come back and add state tracking for the modifier keys
AddInputEventEntry(InputQueue, Key, KeyWasDown, KeyIsDown, false, false, false, false);
}break;
default:
@ -480,8 +492,15 @@ INT NCmdShow
InitDebugServices(GlobalDebugServices, (u8*)malloc(Megabytes(8)), Megabytes(8), 1000, PerformanceCountFrequency);
GlobalDebugServices->GetWallClock = GetWallClock;
input Input;
InitializeInput(&Input);
mouse_state Mouse;
input_queue InputQueue;
{
s32 InputQueueMemorySize = sizeof(input_entry) * 32;
u8* InputQueueMemory = Win32Alloc(InputQueueMemorySize).Base;
InputQueue = InitializeInputQueue(InputQueueMemory, InputQueueMemorySize);
Mouse = {0, 0};
}
//
// Set up worker threads
@ -557,31 +576,28 @@ INT NCmdShow
{
DEBUG_TRACK_SCOPE(MainLoop);
SwapInputBuffers(&Input);
ResetInputQueue(&InputQueue);
if (HotLoadDLL(&DLLRefresh))
{
SetApplicationLinks(&Context, DLLRefresh, &WorkQueue);
Context.ReloadStaticData(Context, GlobalDebugServices);
}
MSG Message;
while (PeekMessageA(&Message, MainWindow.Handle, 0, 0, PM_REMOVE))
{
HandleWindowMessage(Message, &MainWindow, Input.New);
}
{ // Mouse Position
POINT MousePos;
GetCursorPos (&MousePos);
ScreenToClient(MainWindow.Handle, &MousePos);
Input.New->MouseX = MousePos.x;
Input.New->MouseY = MainWindow.Height - MousePos.y;
if (KeyTransitionedDown(Input, KeyCode_MouseLeftButton))
{
Input.MouseDownX = Input.New->MouseX;
Input.MouseDownY = Input.New->MouseY;
}
Mouse.Scroll = 0;
Mouse.OldPos = Mouse.Pos;
Mouse.Pos = v2{(r32)MousePos.x, (r32)MainWindow.Height - MousePos.y};
Mouse.DeltaPos = Mouse.Pos - Mouse.OldPos;
}
MSG Message;
while (PeekMessageA(&Message, MainWindow.Handle, 0, 0, PM_REMOVE))
{
HandleWindowMessage(Message, &MainWindow, &InputQueue, &Mouse);
}
// TODO(Peter): We shouldn't need to do this translation. the platform layer knows about win32_windows. We should just make that the interface
@ -590,7 +606,7 @@ INT NCmdShow
Context.WindowHeight = MainWindow.Height;
Context.DeltaTime = LastFrameSecondsElapsed;
Context.UpdateAndRender(Context, Input, &RenderBuffer);
Context.UpdateAndRender(Context, InputQueue, Mouse, &RenderBuffer);
RenderCommandBuffer(RenderBuffer);
ClearRenderBuffer(&RenderBuffer);

View File

@ -1,79 +0,0 @@
TODO FOLDHAUS
Hardening
- more robust windows input layer
- memory visualization
- separate rendering thread
- cache led positions. Only update if they are moving
- input context changes
- - shift drag to 10x drag speed
- select nodes -> delete nodes
- remove node connections
Name
- Splash screen (like blender) (thisll be fun)
- - Image importer (stb image? or find a png > bmp converter for the image you have)
- - Display on startup
/Debug
x Make debug scope tracking thread safe - was throwing an error in stringsequal but that stopped.
x Keep an eye out.
Application
- More efficient HSV <-> RGB
- Save and load a session
- - Serialize Nodes
- Don't render if the window isn't visible
Development
- Fix your scope time tracker to account for threads.
- Nest scope times so you can see totals/dig in
- Log memory allocations
Interface
- fullscreen
- In world interface elements
- - Handles for Patterns
- - UI Popups
- - Value modifiers
- Scroll view
- Update the text system - use system fonts
Switch To Nodes
x basic node elements
- - evaluation step (one node at a time)
- - selector node (has a list of connections that it can switch between)
- serialize
- delete nodes
Structure
- motion
Renderer
- Mouse Picking - point at a led and see info about it
- Camera: pan
- Camera: zoom
- Camera: leds always face camera
Resource Management
- TODO: Need to figure out which textures are currently in graphics memory and which need to be resubmitted
- Icons
Animation
- timeline
- create clips that play
- clips can have parameters that drive them?
- clips should have prerequesites
- - channels active
- - patterns active in the channel
- - when a clip is playing, it should just take over the whole structure
Command Line
- select a channel/pattern
Optimization
- patterns are asking to be multithreaded
- probably want to convert as much color functions to use u32 Packed Colors
- - Probably want to think about this more. What about supporting different color depths
- for different output devices?

BIN
vc140.pdb Normal file

Binary file not shown.

Binary file not shown.

BIN
working_data/splash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB