turtle_dir[1] = pcell(term->pos)->state & FLAG_INPUT? 1: -1;
original_y = turtle_dir[1];
+ info_buffer[((turtle[1]*64)+turtle[0])*4] = 0;
+ v2i_add( turtle_dir, turtle, turtle );
+
for( int i = 0; i < 100; i ++ )
{
info_buffer[((turtle[1]*64)+turtle[0])*4] = 0;
(arr_base + (float)term->pos[1] + (float)(term->run_count-1)*0.2f) - run_offset:
(float)term->pos[1] + arr_base + run_offset;
- if( k & 0x1 )
+ v4f bar_colour;
+ int bar_draw = 0;
+
+ if( is_simulation_running() )
+ {
+ if( k == world.sim_run )
+ {
+ float a = fabsf(sinf( vg_time * 2.0f )) * 0.075f + 0.075f;
+
+ v4_copy( (v4f){ 1.0f, 1.0f, 1.0f, a }, bar_colour );
+ }
+ else
+ v4_copy( (v4f){ 0.0f, 0.0f, 0.0f, 0.13f }, bar_colour );
+
+ bar_draw = 1;
+ }
+ else if( 1 || k & 0x1 )
+ {
+ if( k & 0x1 )
+ v4_copy( (v4f){ 1.0f, 1.0f, 1.0f, 0.07f }, bar_colour );
+ else
+ v4_copy( (v4f){ 0.0f, 0.0f, 0.0f, 0.13f }, bar_colour );
+
+ bar_draw = 1;
+ }
+
+ if( bar_draw )
{
- glUniform4f( SHADER_UNIFORM( shader_tile_colour, "uColour" ), 1.0f, 1.0f, 1.0f, 0.1f );
+ glUniform4fv( SHADER_UNIFORM( shader_tile_colour, "uColour" ), 1, bar_colour );
glUniform3f( SHADER_UNIFORM( shader_tile_colour, "uOffset" ), (float)term->pos[0], y_position - 0.1f, 1.0f );
draw_mesh( 2, 2 );
}
static struct cmp_level cmp_levels_basic[] =
{
- // r1
+ // r2 GM
+ {
+ .serial_id = 6,
+ .title = "PATCH",
+ .map_name = "cmp_b04",
+ .description = "For some reason, the division module our\n"
+ "intern built for us is sending twice as many\n"
+ "yellows as needed. We need to send the\n"
+ "excess to be recycled!",
+
+ ._unlock = 7,
+ ._linked = 3
+ },
+ // r1 GM
{
.serial_id = 3,
.title = "SUBDIVISION 1",
"dividing up the input and recombining it.",
._linked = 4,
- ._unlock = 6
+ ._unlock = 5
},
- // r1
+ // r1 GM
{
.serial_id = 4,
.title = "SUBDIVISION 2",
.map_name = "cmp_b02",
.description = "",
- ._linked = 5,
._unlock = 7
},
- // r1
+ // r1 GM
{
.serial_id = 5,
.title = "RESTRUCTURE",
._unlock = 8
},
- {
- .serial_id = 6,
- .title = "SERIALIZE",
- .map_name = "cmp_b04",
- .description = "Merge and sort",
-
- ._unlock = 7
- },
+ // r2 GM
{
.serial_id = 7,
.title = "PATTERNS 1",
._linked = 8
},
+ // r2 GM
{
.serial_id = 8,
.title = "PATTERNS 2",
.map_name = "cmp_b06",
.description = "Replicate MORE",
- ._unlock = 9
- },
- {
- .serial_id = 9,
- .title = "MIGHTY CONSUMER",
- .map_name = "cmp_b07",
- .description = "Build a greedy system",
-
- ._linked = 10,
- ._unlock = 11
- },
- {
- .serial_id = 10,
- .title = "ENCRYPTED 1",
- .map_name = "cmp_b08",
- .description = "Some configurations may not be valid",
-
- ._unlock = 15
- },
- {
- .serial_id = 11,
- .title = "REVERSE",
- .map_name = "cmp_b09",
- .description = "Reverse the incoming order. Always length 4",
-
._unlock = 15
},
- // r2
+ // r2 GM
{
.serial_id = 15,
.title = "PRINCIPLE 5",
._unlock = 16,
.is_tutorial = 1
},
- // r2
+ // r2 GM
{
.serial_id = 16,
.title = "ROUTING PROBLEM",
"Things can get a little chaotic on tight boards, do your\n"
"best to utilize principle 5 to get the job done\n",
+ ._linked = 9
+ },
+ // r2 GM
+ {
+ .serial_id = 9,
+ .title = "MIGHTY CONSUMER",
+ .map_name = "cmp_b07",
+ .description = "Build a greedy system",
+
+ ._linked = 10,
+ ._unlock = 11
+ },
+ {
+ .serial_id = 10,
+ .title = "ENCRYPTED 1",
+ .map_name = "cmp_b08",
+ .description = "Some configurations may not be valid",
+
+ ._unlock = 17
+ },
+ // r2 GM
+ {
+ .serial_id = 11,
+ .title = "REVERSE",
+ .map_name = "cmp_b09",
+ .description = "Reverse the incoming order. Always length 4",
+
._unlock = 17
},
+ // r2 GM
{
.serial_id = 17,
.title = "PRINCIPLE 6",
.map_name = "cmp_b11",
.description =
- "While hovering over a simple tile peice, right click and\n"
- "drag to start creating a wire. These can be connected to\n"
- "the left, or right recieving pins of a Twisty Turny(TM).\n"
- "\n"
- "Once connected, the Twisty Turny(TM) will no longer\n"
- "'flip flop' as marbles run through them, but instead be\n"
- "et to left or right rotating only. As indicated by the\n"
- "status arrow beneath them\n"
- "\n"
- "When the left or right slot is triggered, the Twisty\n"
- "Turny(TM) will switch modes according to that input.\n"
+ "Usually the splitter piece will flip flop between left\n"
+ "and right, however it can be forced to only rotate in\n"
+ "one direction if trigger wires are attached.\n"
"\n"
- "Trigger wires apply instantaneously, however if both the\n"
- "left and right inputs are recieved at the same time,\n"
- "this results in no operation being performed, and no\n"
- "state changes take place in the Twisty Turny(TM)\n",
+ "Right click and drag from a regular block, and attach it\n"
+ "to a splitter. This creates a trigger.\n"
+ "The default state is left, and once a marble hits the\n"
+ "trigger it will switch to rotating that direction.",
._unlock = 18,
.is_tutorial = 1
},
+ // r2 GM
{
.serial_id = 18,
.title = "NOT GATE",