about summary refs log tree commit diff
path: root/src/game/client/components/menus.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2009-06-07 14:36:54 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2009-06-07 14:36:54 +0000
commitcdc5f26900dc10e10679ba76a30f195e8b3f5505 (patch)
tree415b28219072589b09031c145d34def8e0f8956b /src/game/client/components/menus.cpp
parent4bb1df318905f491740f4298c69cda317fb53fcb (diff)
downloadzcatch-cdc5f26900dc10e10679ba76a30f195e8b3f5505.tar.gz
zcatch-cdc5f26900dc10e10679ba76a30f195e8b3f5505.zip
new font rendering system using freetype2. only compiles under linux for now
Diffstat (limited to 'src/game/client/components/menus.cpp')
-rw-r--r--src/game/client/components/menus.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp
index 54c587ef..53b57e2c 100644
--- a/src/game/client/components/menus.cpp
+++ b/src/game/client/components/menus.cpp
@@ -13,10 +13,6 @@
 
 #include <engine/e_client_interface.h>
 
-extern "C" {
-	#include <engine/client/ec_font.h>
-}
-
 #include <game/version.hpp>
 #include <game/generated/g_protocol.hpp>
 
@@ -603,6 +599,15 @@ int MENUS::render_menubar(RECT r)
 
 void MENUS::render_loading(float percent)
 {
+	static int64 last_load_render = 0;
+
+	// make sure that we don't render for each little thing we load
+	// because that will slow down loading if we have vsync
+	if(time_get()-last_load_render < time_freq()/60)
+		return;
+		
+	last_load_render = time_get();
+	
 	// need up date this here to get correct
 	vec3 rgb = hsl_to_rgb(vec3(config.ui_color_hue/255.0f, config.ui_color_sat/255.0f, config.ui_color_lht/255.0f));
 	gui_color = vec4(rgb.r, rgb.g, rgb.b, config.ui_color_alpha/255.0f);
@@ -994,6 +999,8 @@ void MENUS::on_statechange(int new_state, int old_state)
 	}
 }
 
+extern "C" void font_debug_render();
+
 void MENUS::on_render()
 {
 	if(client_state() != CLIENTSTATE_ONLINE && client_state() != CLIENTSTATE_DEMOPLAYBACK)