Started to add bit-patterns to be used with verbosity setting so that

only certain debug messages can be enabled.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8472 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-04-27 12:47:47 +00:00
parent 559edb6178
commit 74f3baec20
2 changed files with 9 additions and 3 deletions

View File

@ -284,6 +284,12 @@ enum AnimType {ANIMS_NONE = 0,
*/
namespace UserConfigParams
{
/** Some constants to bitmask to enable various messages to be printed. */
enum { LOG_MEMORY = 0x0001,
LOG_GUI = 0x0002,
LOG_ADDONS = 0x0004,
LOG_MISC = 0x0008};
// ---- Audio
PARAM_PREFIX GroupUserConfigParam m_audio_group
PARAM_DEFAULT( GroupUserConfigParam("Audio", "Audio Settings") );

View File

@ -176,7 +176,7 @@ void Track::cleanup()
// remove temporary materials loaded by the material manager
material_manager->popTempMaterial();
if(UserConfigParams::m_verbosity>=3)
if(UserConfigParams::m_verbosity&UserConfigParams::LOG_MEMORY)
printf("[memory] Number of meshes in cache after cleaning up '%s': %d.\n",
getIdent().c_str(),
irr_driver->getSceneManager()->getMeshCache()->getMeshCount());
@ -941,7 +941,7 @@ void Track::createWater(const XMLNode &node)
void Track::loadTrackModel(World* parent, unsigned int mode_id)
{
assert(m_all_cached_meshes.size()==0);
if(UserConfigParams::m_verbosity>=3)
if(UserConfigParams::m_verbosity&UserConfigParams::LOG_MEMORY)
printf("[memory] Number of meshes in cache before loading '%s': %d.\n",
getIdent().c_str(),
irr_driver->getSceneManager()->getMeshCache()->getMeshCount());
@ -1255,7 +1255,7 @@ void Track::loadTrackModel(World* parent, unsigned int mode_id)
printf("Lap counting will not work, and start positions might be incorrect.\n");
}
if(UserConfigParams::m_verbosity>=3)
if(UserConfigParams::m_verbosity&UserConfigParams::LOG_MEMORY)
printf("[memory] Number of meshes in cache after loading '%s': %d.\n",
getIdent().c_str(),
irr_driver->getSceneManager()->getMeshCache()->getMeshCount());