removed some resource loading spam. Closes #894

This commit is contained in:
oy 2011-12-10 18:23:29 +01:00
parent 99f04a7f87
commit 6e20c32859
3 changed files with 14 additions and 4 deletions

View file

@ -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;
}

View file

@ -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);

View file

@ -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;