about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-01-06 22:18:19 +0100
committeroy <Tom_Adams@web.de>2011-01-06 22:18:19 +0100
commitf8b1edca646b14f5c7cbae71a2cd20d42c1fd705 (patch)
tree2e23cd0a0a7e0adc820f7020d2897bacdf9e29b0 /src
parent7487a22956680c601e57b9a0edd93eda1e33e287 (diff)
downloadzcatch-f8b1edca646b14f5c7cbae71a2cd20d42c1fd705.tar.gz
zcatch-f8b1edca646b14f5c7cbae71a2cd20d42c1fd705.zip
show error message for all content that could not be loaded. Closes #257
Diffstat (limited to 'src')
-rw-r--r--src/engine/client/graphics.cpp2
-rw-r--r--src/engine/client/sound.cpp2
-rw-r--r--src/game/client/gameclient.cpp22
3 files changed, 14 insertions, 12 deletions
diff --git a/src/engine/client/graphics.cpp b/src/engine/client/graphics.cpp
index 82248f05..045d15d0 100644
--- a/src/engine/client/graphics.cpp
+++ b/src/engine/client/graphics.cpp
@@ -389,7 +389,7 @@ int CGraphics_OpenGL::LoadPNG(CImageInfo *pImg, const char *pFilename, int Stora
 		io_close(File);
 	else
 	{
-		dbg_msg("game/png", "failed to open file. filename='%s'", aCompleteFilename);
+		dbg_msg("game/png", "failed to open file. filename='%s'", pFilename);
 		return 0;
 	}
 	
diff --git a/src/engine/client/sound.cpp b/src/engine/client/sound.cpp
index 7396b444..01012a60 100644
--- a/src/engine/client/sound.cpp
+++ b/src/engine/client/sound.cpp
@@ -329,7 +329,7 @@ int CSound::LoadWV(const char *pFilename)
 	ms_File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL);
 	if(!ms_File)
 	{
-		dbg_msg("sound/wv", "failed to open %s", pFilename);
+		dbg_msg("sound/wv", "failed to open file. filename='%s'", pFilename);
 		return -1;
 	}
 
diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp
index be791284..84ca77b1 100644
--- a/src/game/client/gameclient.cpp
+++ b/src/game/client/gameclient.cpp
@@ -222,8 +222,6 @@ void CGameClient::OnConsoleInit()
 
 void CGameClient::OnInit()
 {
-	//m_pServerBrowser = Kernel()->RequestInterface<IServerBrowser>();
-	
 	// set the language
 	g_Localization.Load(g_Config.m_ClLanguagefile, Storage(), Console());
 	
@@ -238,15 +236,17 @@ void CGameClient::OnInit()
 	int64 Start = time_get();
 	
 	// load default font	
-	static CFont *pDefaultFont;
-	//default_font = gfx_font_load("data/fonts/sazanami-gothic.ttf");
-
+	static CFont *pDefaultFont = 0;
 	char aFilename[512];
 	IOHANDLE File = Storage()->OpenFile("fonts/DejaVuSans.ttf", IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
 	if(File)
+	{
 		io_close(File);
-	pDefaultFont = TextRender()->LoadFont(aFilename);
-	TextRender()->SetDefaultFont(pDefaultFont);
+		pDefaultFont = TextRender()->LoadFont(aFilename);
+		TextRender()->SetDefaultFont(pDefaultFont);
+	}
+	if(!pDefaultFont)
+		Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "gameclient", "failed to load font. filename='fonts/DejaVuSans.ttf'");
 
 	g_Config.m_ClThreadsoundloading = 0;
 
@@ -264,8 +264,10 @@ void CGameClient::OnInit()
 		gs_LoadCurrent++;
 	}
 
+	// load skins
 	::gs_Skins.Init();
-	
+	if(!::gs_Skins.Num())
+		Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "gameclient", "failed to load skins. folder='skins/'");
 	
 	// TODO: Refactor: fix threaded loading of sounds again
 	// load sounds
@@ -277,8 +279,8 @@ void CGameClient::OnInit()
 				g_GameClient.m_pMenus->RenderLoading(gs_LoadCurrent/(float)gs_LoadTotal);
 			for(int i = 0; i < g_pData->m_aSounds[s].m_NumSounds; i++)
 			{
-				int id = Sound()->LoadWV(g_pData->m_aSounds[s].m_aSounds[i].m_pFilename);
-				g_pData->m_aSounds[s].m_aSounds[i].m_Id = id;
+				int Id = Sound()->LoadWV(g_pData->m_aSounds[s].m_aSounds[i].m_pFilename);
+				g_pData->m_aSounds[s].m_aSounds[i].m_Id = Id;
 			}
 
 			if(DoRender)