stuff
[carveJwlIkooP6JGAAIwe30JlM.git] / world_sfd.h
index a83fe0a92359c4b8cb9cb885fb30b9dc360474d2..3f94c4ed86fae271a5948d20c521179ccf395c65 100644 (file)
@@ -60,16 +60,18 @@ VG_STATIC void sfd_encode( u32 row, const char *str )
 
    for( int i=0; i<world.sfd.w; i++ )
    {
+      u32 idx = (world.sfd.w*row_h + i) * 2;
+
       if( end )
       {
-         world.sfd.buffer[world.sfd.w*row_h + i] = 0.0f;
+         world.sfd.buffer[idx] = 0.0f;
       }
       else
       {
          if( !str[i] )
             end = 1;
 
-         world.sfd.buffer[world.sfd.w*row_h + i] = sfd_encode_glyph( str[i] );
+         world.sfd.buffer[idx] = sfd_encode_glyph( str[i] );
       }
    }
 }
@@ -99,6 +101,7 @@ VG_STATIC void sfd_update(void)
    }
 }
 
+VG_STATIC void bind_terrain_noise(void);
 VG_STATIC void sfd_render( m4x4f projection, v3f camera, m4x3f transform )
 {
    mesh_bind( &world.sfd.mesh_display );
@@ -107,7 +110,7 @@ VG_STATIC void sfd_render( m4x4f projection, v3f camera, m4x3f transform )
    shader_scoretext_uTexGarbage(0);
    shader_scoretext_uTexGradients(1);
    shader_link_standard_ub( _shader_scoretext.id, 2 );
-   bind_terrain_textures();
+   bind_terrain_noise();
    vg_tex2d_bind( &tex_scoretext, 1 );
 
    shader_scoretext_uPv( projection );
@@ -128,7 +131,8 @@ VG_STATIC void sfd_render( m4x4f projection, v3f camera, m4x3f transform )
    shader_vblend_uTexGarbage(0);
    shader_vblend_uTexGradients(1);
    shader_link_standard_ub( _shader_vblend.id, 2 );
-   bind_terrain_textures();
+   bind_terrain_noise();
+   vg_tex2d_bind( &tex_scoretext, 1 );
 
    shader_vblend_uPv( projection );
    shader_vblend_uMdl( transform );