X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=fishladder_resources.h;h=030a050645ec1d9066c1aef8acf4eea1a912affe;hb=7756287016b03ba7eb76b0a57cebe28952a4ce41;hp=d1f2210fe8b08d0362a676427627a3372507e7af;hpb=ec1dd5de4848534241c8bea3841ef36fe047915b;p=fishladder.git diff --git a/fishladder_resources.h b/fishladder_resources.h index d1f2210..030a050 100644 --- a/fishladder_resources.h +++ b/fishladder_resources.h @@ -255,24 +255,10 @@ sfx_system audio_system_ui = .name = "UI" }; -ui_colourset ui_fl_colours = { - .main = 0xff807373, - .hover = 0xff918484, - .active = 0xffad9f9e -}; - -ui_colourset ui_fl_colours_inactive = { - .main = 0xff655958, - .hover = 0xff655958, - .active = 0xff655958 -}; - static void resource_load_main(void) { // Textures // UI vg_tex2d_init( texture_list, vg_list_size( texture_list ) ); - ui_global_ctx.colours_main = &ui_fl_colours; - gui_reset_colours(); // Audio sfx_set_init( &audio_tile_mod, NULL ); @@ -419,6 +405,7 @@ SHADER_DEFINE( shader_tile_main, "uniform float uForeground;" "uniform vec2 uMousePos;" "uniform vec4 uColour;" + "uniform vec3 uShadowing;" "" "in vec4 aTexCoords;" "in vec2 aWorldCoords;" @@ -426,15 +413,15 @@ SHADER_DEFINE( shader_tile_main, "void main()" "{" //"vec3 shadowing_colour = vec3( 0.93, 0.88536, 0.8184 ) * 0.97;" - "vec3 shadowing_colour = vec3( 0.8, 0.8, 0.8 );" + //"vec3 shadowing_colour = vec3( 0.8, 0.8, 0.8 );" "vec4 glyph = texture( uTexGlyphs, aTexCoords.xy );" "vec4 wood = texture( uTexWood, aTexCoords.zw );" "vec4 wood_secondary = texture( uTexWood, aTexCoords.zw + 0.25 );" - "vec3 wood_comp = mix( wood_secondary.rgb * shadowing_colour, wood.rgb, clamp( glyph.b * 2.0 - 1.0, 0.0, 1.0 ) );" + "vec3 wood_comp = mix( wood_secondary.rgb * uShadowing, wood.rgb, clamp( glyph.b*2.0-1.0, 0.0, 1.0 ) );" //"vec3 shadows = mix( vec3( 0.85, 0.7344, 0.561 ), vec3(1.0,1.0,1.0), glyph.r );" - "vec3 shadows = mix( shadowing_colour, vec3(1.0,1.0,1.0), glyph.r );" + "vec3 shadows = mix( uShadowing, vec3(1.0,1.0,1.0), glyph.r );" "vec4 output_regular = vec4( wood_comp * shadows, mix( glyph.a, glyph.b, uForeground ) );" @@ -444,7 +431,8 @@ SHADER_DEFINE( shader_tile_main, "FragColor = mix( output_regular, output_ghost, uGhost ) * uColour;" "}" , - UNIFORMS({ "uPv", "uOffset", "uTexGlyphs", "uTexWood", "uSubTransform", "uGhost", "uMousePos", "uColour", "uForeground", "uVisibility" }) + UNIFORMS({ "uPv", "uOffset", "uTexGlyphs", "uTexWood", "uSubTransform", "uGhost", "uMousePos", + "uColour", "uForeground", "uVisibility", "uShadowing" }) ) SHADER_DEFINE( shader_background, @@ -710,6 +698,19 @@ struct cmp_level int _unlock, _linked; // When completed, unlock this level struct cmp_level *unlock, *linked; + + struct world_string + { + enum placement + { + k_placement_top, + k_placement_bottom + } + placement; + + const char *str; + } + strings[2]; int serial_id; int is_tutorial; @@ -985,6 +986,24 @@ static struct cmp_level cmp_levels_computer[] = .title = "3 BIT ADDITION", .map_name = "cmp_add3b", .description = "", + .strings = + { + { + .placement = k_placement_top, + //.str ="\t\t\t\t\t\t\t\t\t| NUMBER A | | NUMBER B |\n" + .str ="" +"\t\t\t\t\t\t\t\t\t\x80\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x82 \x80\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x82\n" +"\t\t\t\t\t\t\t\t\t\x83 4 2 1 \x84 add \x83 4 2 1 \x84\n" +"\t\t\t\t\t\t\t\t\t\x83 \x84 \x83 \x84" + }, + { + .placement = k_placement_bottom, + .str = +"\t\t\t\x83 \x84\n" +"\t\t\t\x83 8 4 2 1 \x84 result a+b\n" +"\t\t\t\x85\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x87\x86" + } + }, ._unlock = 25 },