about summary refs log tree commit diff
path: root/src/game/client/gameclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/gameclient.cpp')
-rw-r--r--src/game/client/gameclient.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp
index a90cdc49..70aee255 100644
--- a/src/game/client/gameclient.cpp
+++ b/src/game/client/gameclient.cpp
@@ -183,8 +183,39 @@ void GAMECLIENT::on_console_init()
 	suppress_events = false;
 }
 
+/*
+unsigned char utf8lut[] = {}
+
+static int utf8_decode(unsigned char **ptr)
+{
+	unsigned char first = **ptr;
+	if(first&0x80 == 0)
+	{
+		*ptr += 1;
+		return first;
+	}
+	
+	if(first&(0x80|0x40|0x20) == (0x80|0x40))
+	{
+		// two bytes
+	}
+
+	if(first&(0x80|0x40|0x20|0x10) == (0x80|0x40|0x20))
+	{
+		// three bytes
+	}
+}*/
+
+#include <stdio.h>
+
 void GAMECLIENT::on_init()
 {
+	/*const char *p = "Hello World åäö ようこそ - ガイド ";
+	for(; *p; )
+	{
+		dbg_msg("", "%d", utf8_decode(&p));
+	}*/
+	
 	// init all components
 	for(int i = 0; i < all.num; i++)
 		all.components[i]->on_init();
@@ -197,6 +228,7 @@ void GAMECLIENT::on_init()
 	
 	// load default font	
 	static FONT *default_font;
+	//default_font = gfx_font_load("data/fonts/sazanami-gothic.ttf");
 	default_font = gfx_font_load("data/fonts/vera.ttf");
 	gfx_text_set_default_font(default_font);