menu upgrades
[carveJwlIkooP6JGAAIwe30JlM.git] / gui.h
diff --git a/gui.h b/gui.h
index 238d0fba76507c0c501f88b0f570e321039e5393..8013cb014da3e099f0e8d674a9ea5a2505cba09c 100644 (file)
--- a/gui.h
+++ b/gui.h
@@ -90,7 +90,7 @@ void gui_draw(void)
    camera_finalize( &ortho );
 
    gui.factive = vg_lerpf( gui.factive, gui.helper_count?1.0f:0.0f,
-                           vg.time_delta*2.0f );
+                           vg.time_frame_delta*2.0f );
 
    if( gui.factive > 0.01f ){
       /* draw bottom bar */
@@ -104,7 +104,7 @@ void gui_draw(void)
       render_fsquad1();
    }
 
-   f64 loc_t = (vg.time - gui.location_time) / 5.0;
+   f64 loc_t = (vg.time_real - gui.location_time) / 5.0;
    if( (loc_t < 1.0) && (gui.location_time != 0.0) ){
       /* yep this code is a mess, i dont care anymore */
       glEnable(GL_BLEND);
@@ -135,7 +135,8 @@ void gui_draw(void)
 
       font3d_bind( &gui.font, &ortho );
       shader_model_font_uColour( (v4f){1.2f,1.2f,1.2f,o} );
-      font3d_simple_draw( &gui.font, 2, gui.location, &ortho, mmdl );
+      font3d_simple_draw( &gui.font, 2, k_font_shader_default,
+                           gui.location, &ortho, mmdl );
    }
 
    font3d_bind( &gui.font, &ortho );
@@ -157,10 +158,12 @@ void gui_draw(void)
 
       shader_model_font_uColour( (v4f){1.0f,1.0f,1.0f,1.0f} );
 
-      struct font3d_render render;
-      font3d_begin( &gui.font, 2, &ortho, mmdl, &render );
-
-      render.u8pch = (u8*)helper->bindstr;
+      struct font3d_render render = {
+         .font = &gui.font,
+         .variant_id = 2,
+         .shader = k_font_shader_default
+      };
+      font3d_begin( helper->bindstr, &ortho, mmdl, &render );
       font3d_draw( &render );
 
       const char *make_smaller = "\x02\xaf\x03 ";
@@ -189,7 +192,7 @@ int gui_location_print_ccmd( int argc, const char *argv[] ){
       }
       if( !strcmp(gui.location,new_loc) ) return 0;
       vg_strncpy( new_loc, gui.location, 64, k_strncpy_always_add_null );
-      gui.location_time = vg.time;
+      gui.location_time = vg.time_real;
    }
    return 0;
 }