diff options
| author | oy <Tom_Adams@web.de> | 2011-12-10 18:23:29 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-12-10 18:23:29 +0100 |
| commit | 6e20c32859ee4518f398a12b65586463ddeecaab (patch) | |
| tree | 8b5627b8e63d25f2dba61cf4a85ae5270a547bbc /src | |
| parent | 99f04a7f87fb7f6b12f3865e255e9a3bd7ac9e9e (diff) | |
| download | zcatch-6e20c32859ee4518f398a12b65586463ddeecaab.tar.gz zcatch-6e20c32859ee4518f398a12b65586463ddeecaab.zip | |
removed some resource loading spam. Closes #894
Diffstat (limited to 'src')
| -rw-r--r-- | src/engine/client/graphics.cpp | 2 | ||||
| -rw-r--r-- | src/game/client/components/countryflags.cpp | 8 | ||||
| -rw-r--r-- | src/game/client/components/skins.cpp | 8 |
3 files changed, 14 insertions, 4 deletions
diff --git a/src/engine/client/graphics.cpp b/src/engine/client/graphics.cpp index a6b1a47a..617162ae 100644 --- a/src/engine/client/graphics.cpp +++ b/src/engine/client/graphics.cpp @@ -381,6 +381,8 @@ int CGraphics_OpenGL::LoadTexture(const char *pFilename, int StorageType, int St ID = LoadTextureRaw(Img.m_Width, Img.m_Height, Img.m_Format, Img.m_pData, StoreFormat, Flags); mem_free(Img.m_pData); + if(ID != m_InvalidTexture && g_Config.m_Debug) + dbg_msg("graphics/texture", "loaded %s", pFilename); return ID; } diff --git a/src/game/client/components/countryflags.cpp b/src/game/client/components/countryflags.cpp index 6daf3c2e..c2af9a59 100644 --- a/src/game/client/components/countryflags.cpp +++ b/src/game/client/components/countryflags.cpp @@ -6,6 +6,7 @@ #include <engine/console.h> #include <engine/graphics.h> #include <engine/storage.h> +#include <engine/shared/config.h> #include <engine/shared/linereader.h> #include "countryflags.h" @@ -72,8 +73,11 @@ void CCountryFlags::LoadCountryflagsIndexfile() str_copy(CountryFlag.m_aCountryCodeString, aOrigin, sizeof(CountryFlag.m_aCountryCodeString)); CountryFlag.m_Texture = Graphics()->LoadTextureRaw(Info.m_Width, Info.m_Height, Info.m_Format, Info.m_pData, Info.m_Format, 0); mem_free(Info.m_pData); - str_format(aBuf, sizeof(aBuf), "loaded country flag '%s'", aOrigin); - Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "countryflags", aBuf); + if(g_Config.m_Debug) + { + str_format(aBuf, sizeof(aBuf), "loaded country flag '%s'", aOrigin); + Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "countryflags", aBuf); + } m_aCountryFlags.add(CountryFlag); } io_close(File); diff --git a/src/game/client/components/skins.cpp b/src/game/client/components/skins.cpp index dd38e9ea..babf49bb 100644 --- a/src/game/client/components/skins.cpp +++ b/src/game/client/components/skins.cpp @@ -7,6 +7,7 @@ #include <engine/graphics.h> #include <engine/storage.h> +#include <engine/shared/config.h> #include "skins.h" @@ -103,8 +104,11 @@ int CSkins::SkinScan(const char *pName, int IsDir, int DirType, void *pUser) // set skin data str_copy(Skin.m_aName, pName, min((int)sizeof(Skin.m_aName),l-3)); - str_format(aBuf, sizeof(aBuf), "load skin %s", Skin.m_aName); - pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "game", aBuf); + if(g_Config.m_Debug) + { + str_format(aBuf, sizeof(aBuf), "load skin %s", Skin.m_aName); + pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "game", aBuf); + } pSelf->m_aSkins.add(Skin); return 0; |