vg_tex2d tex_ball_noise = { .path = "textures/bnoise.qoi" };
vg_tex2d tex_monofur = { .path = "textures/ascii.qoi", .flags = VG_TEXTURE_NO_MIP };
vg_tex2d tex_unkown = { .path = "textures/unkown.qoi" };
+vg_tex2d tex_buttons = { .path = "textures/buttons.qoi" };
-vg_tex2d *texture_list[] = { &tex_tile_detail, &tex_tile_data, &tex_wood, &tex_background, &tex_ball_noise, &tex_monofur, &tex_unkown };
+vg_tex2d *texture_list[] = { &tex_tile_detail, &tex_tile_data, &tex_wood, &tex_background, &tex_ball_noise, &tex_monofur, &tex_unkown, &tex_buttons };
// AUDIO
// ===========================================================================================================
UNIFORMS({ "uPv", "uColour", "uTexMain", "uStart", "uEnd", "uCurve" })
)
+SHADER_DEFINE( shader_buttons,
+ // VERTEX
+ "layout (location=0) in vec2 a_co;"
+ "uniform vec4 uOffset;" // Tile x/y, uv x/y
+ "uniform mat3 uPv;"
+ ""
+ "out vec2 aTexCoords;"
+ ""
+ "void main()"
+ "{"
+ // Vertex transform
+ "vec3 worldpos = vec3( a_co + uOffset.xy, 1.0 );"
+ "gl_Position = vec4( uPv * worldpos, 1.0 );"
+
+ // Create texture coords
+ "vec2 edge_safe_coords = a_co * 0.98 + 0.01;"
+ "aTexCoords = (edge_safe_coords + uOffset.zw) * 0.25;"
+ "}",
+
+ // FRAGMENT
+ "out vec4 FragColor;"
+ ""
+ "uniform sampler2D uTexMain;"
+ "uniform vec4 uColour;" // rgb, light amount
+ ""
+ "in vec2 aTexCoords;"
+ ""
+ "void main()"
+ "{"
+ "vec4 glyph = texture( uTexMain, aTexCoords.xy );"
+
+ "FragColor = vec4( uColour.rgb * (mix(glyph.r, glyph.g, uColour.a)+0.02)*2.6 + glyph.b * 0.4, glyph.a );"
+ "}"
+ ,
+ UNIFORMS({ "uPv", "uOffset", "uTexMain", "uColour" })
+)
+
void vg_register(void)
{
SHADER_INIT( shader_ball );
SHADER_INIT( shader_background );
SHADER_INIT( shader_wire );
+ SHADER_INIT( shader_buttons );
}
/*
static struct cmp_level cmp_levels_tutorials[] =
{
+ // r1
{
.serial_id = 0,
.title = "PRINCIPLE 1",
._unlock = 1,
.is_tutorial = 1
},
+ // r1
{
.serial_id = 1,
.title = "PRINCIPLE 2",
._unlock = 2,
.is_tutorial = 1,
},
+ // r1
{
.serial_id = 2,
.title = "PRINCIPLE 3",
._unlock = 12,
.is_tutorial = 1
},
+ // r1
{
.serial_id = 12,
.title = "PRINCIPLE 4",
static struct cmp_level cmp_levels_basic[] =
{
+ // r1
{
.serial_id = 3,
.title = "SUBDIVISION 1",
.map_name = "cmp_b01",
- .description = "Simple maths, branching required.",
+ .description = "Sometimes getting the desired amount takes\n"
+ "dividing up the input and recombining it.",
._linked = 4,
._unlock = 6
},
+ // r1
{
.serial_id = 4,
.title = "SUBDIVISION 2",
.map_name = "cmp_b02",
- .description = "Simple maths, except more.",
+ .description = "",
._linked = 5,
._unlock = 7
},
+ // r1
{
.serial_id = 5,
.title = "RESTRUCTURE",
.map_name = "cmp_b03",
- .description = "Not so simple swap",
+ .description = "It is possible to swap these values using\n"
+ "simple division and addition.",
._unlock = 8
},
._unlock = 15
},
+ // r2
{
.serial_id = 15,
.title = "PRINCIPLE 5",
.map_name = "cmp_b10",
.description =
- "The competent engineers among you may have already\n"
- "spotted and utilized these parts of the system\n"
+ "The eager engineers among you may have already spotted\n"
+ "and utilized these parts of the system\n"
"\n"
"We forgot to include the relevant principle tasks as\n"
"of your training package, you will now be tasked to\n"
"complete them",
- ._unlock = 16
+ ._unlock = 16,
+ .is_tutorial = 1
},
+ // r2
{
.serial_id = 16,
.title = "ROUTING PROBLEM",
"this results in no operation being performed, and no\n"
"state changes take place in the Twisty Turny(TM)\n",
- ._unlock = 18
+ ._unlock = 18,
+ .is_tutorial = 1
},
{
.serial_id = 18,