no message

This commit is contained in:
Chris Danford
2002-05-01 19:14:55 +00:00
parent e11b92ccc3
commit 6f1c1e4619
83 changed files with 1620 additions and 578 deletions
+9 -9
View File
@@ -16,7 +16,7 @@
#include "FontManager.h"
#include "Font.h"
#include "RageUtil.h"
#include "RageHelper.h"
#include "RageLog.h"
#include "ErrorCatcher/ErrorCatcher.h"
FontManager* FONT = NULL;
@@ -38,7 +38,7 @@ FontManager::~FontManager()
while( pos != NULL ) // iterate over all k/v pairs in map
{
m_mapPathToFont.GetNextAssoc( pos, sFontFilePath, pFont );
HELPER.Log( "FONT LEAK: '%s', RefCount = %d.", sFontFilePath, pFont->m_iRefCount );
LOG->WriteLine( "FONT LEAK: '%s', RefCount = %d.", sFontFilePath, pFont->m_iRefCount );
SAFE_DELETE( pFont );
}
@@ -53,7 +53,7 @@ Font* FontManager::LoadFont( CString sFontFilePath )
{
sFontFilePath.MakeLower();
// HELPER.Log( "FontManager::LoadFont(%s).", sFontFilePath );
// LOG->WriteLine( "FontManager::LoadFont(%s).", sFontFilePath );
// Convert the path to lowercase so that we don't load duplicates.
@@ -65,7 +65,7 @@ Font* FontManager::LoadFont( CString sFontFilePath )
if( m_mapPathToFont.Lookup( sFontFilePath, pFont ) ) // if the texture already exists in the map
{
HELPER.Log( ssprintf("FontManager: The Font '%s' now has %d references.", sFontFilePath, pFont->m_iRefCount) );
LOG->WriteLine( ssprintf("FontManager: The Font '%s' now has %d references.", sFontFilePath, pFont->m_iRefCount) );
pFont->m_iRefCount++;
}
else // the texture is not already loaded
@@ -75,7 +75,7 @@ Font* FontManager::LoadFont( CString sFontFilePath )
pFont = (Font*) new Font( sFontFilePath );
HELPER.Log( "FontManager: Loading '%s' from disk.", sFontFilePath);
LOG->WriteLine( "FontManager: Loading '%s' from disk.", sFontFilePath);
m_mapPathToFont.SetAt( sFontFilePath, pFont );
}
@@ -100,11 +100,11 @@ void FontManager::UnloadFont( CString sFontFilePath )
{
sFontFilePath.MakeLower();
// HELPER.Log( "FontManager::UnloadTexture(%s).", sFontFilePath );
// LOG->WriteLine( "FontManager::UnloadTexture(%s).", sFontFilePath );
if( sFontFilePath == "" )
{
HELPER.Log( "FontManager::UnloadTexture(): tried to Unload a blank" );
LOG->WriteLine( "FontManager::UnloadTexture(): tried to Unload a blank" );
return;
}
@@ -115,13 +115,13 @@ void FontManager::UnloadFont( CString sFontFilePath )
pFont->m_iRefCount--;
if( pFont->m_iRefCount == 0 ) // there are no more references to this texture
{
HELPER.Log( ssprintf("FontManager: '%s' will be deleted. It has %d references.", sFontFilePath, pFont->m_iRefCount) );
LOG->WriteLine( ssprintf("FontManager: '%s' will be deleted. It has %d references.", sFontFilePath, pFont->m_iRefCount) );
SAFE_DELETE( pFont ); // free the texture
m_mapPathToFont.RemoveKey( sFontFilePath ); // and remove the key in the map
}
else
{
HELPER.Log( ssprintf("FontManager: '%s' will not be deleted. It still has %d references.", sFontFilePath, pFont->m_iRefCount) );
LOG->WriteLine( ssprintf("FontManager: '%s' will not be deleted. It still has %d references.", sFontFilePath, pFont->m_iRefCount) );
}
}