use Checkpoint
This commit is contained in:
@@ -87,7 +87,7 @@ BitmapText::~BitmapText()
|
|||||||
|
|
||||||
bool BitmapText::LoadFromFont( CString sFontFilePath )
|
bool BitmapText::LoadFromFont( CString sFontFilePath )
|
||||||
{
|
{
|
||||||
LOG->Trace( "BitmapText::LoadFromFontName(%s)", sFontFilePath.GetString() );
|
Checkpoint( ssprintf("BitmapText::LoadFromFontName(%s)", sFontFilePath.GetString()) );
|
||||||
|
|
||||||
if( m_pFont ) {
|
if( m_pFont ) {
|
||||||
FONT->UnloadFont( m_pFont );
|
FONT->UnloadFont( m_pFont );
|
||||||
@@ -105,7 +105,7 @@ bool BitmapText::LoadFromFont( CString sFontFilePath )
|
|||||||
|
|
||||||
bool BitmapText::LoadFromTextureAndChars( CString sTexturePath, CString sChars )
|
bool BitmapText::LoadFromTextureAndChars( CString sTexturePath, CString sChars )
|
||||||
{
|
{
|
||||||
LOG->Trace( "BitmapText::LoadFromTextureAndChars(\"%s\",\"%s\")", sTexturePath.GetString(), sChars.GetString() );
|
Checkpoint( ssprintf("BitmapText::LoadFromTextureAndChars(\"%s\",\"%s\")", sTexturePath.GetString(), sChars.GetString()) );
|
||||||
|
|
||||||
if( m_pFont ) {
|
if( m_pFont ) {
|
||||||
FONT->UnloadFont( m_pFont );
|
FONT->UnloadFont( m_pFont );
|
||||||
|
|||||||
@@ -745,7 +745,7 @@ void Font::Load(const CString &sFontOrTextureFilePath, CString sChars)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* The font is not already loaded. Figure out what we have. */
|
/* The font is not already loaded. Figure out what we have. */
|
||||||
LOG->Trace( "FontManager::LoadFont(\"%s\",\"%s\").", sFontOrTextureFilePath.GetString(), Chars.GetString() );
|
Checkpoint( ssprintf("Font::Load(\"%s\",\"%s\").", sFontOrTextureFilePath.GetString(), Chars.GetString()) );
|
||||||
|
|
||||||
path = sFontOrTextureFilePath;
|
path = sFontOrTextureFilePath;
|
||||||
Chars = sChars;
|
Chars = sChars;
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ Font* FontManager::LoadFont( const CString &sFontOrTextureFilePath, CString sCha
|
|||||||
|
|
||||||
void FontManager::UnloadFont( Font *fp )
|
void FontManager::UnloadFont( Font *fp )
|
||||||
{
|
{
|
||||||
LOG->Trace( "FontManager::UnloadFont(%s).", fp->path.GetString() );
|
Checkpoint( ssprintf("FontManager::UnloadFont(%s).", fp->path.GetString()) );
|
||||||
|
|
||||||
for( std::map<CString, Font*>::iterator i = m_mapPathToFont.begin();
|
for( std::map<CString, Font*>::iterator i = m_mapPathToFont.begin();
|
||||||
i != m_mapPathToFont.end(); ++i)
|
i != m_mapPathToFont.end(); ++i)
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ void RageTextureManager::Update( float fDeltaTime )
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
RageTexture* RageTextureManager::LoadTexture( RageTextureID ID )
|
RageTexture* RageTextureManager::LoadTexture( RageTextureID ID )
|
||||||
{
|
{
|
||||||
LOG->Trace( "RageTextureManager::LoadTexture(%s).", ID.filename.GetString() );
|
Checkpoint( ssprintf( "RageTextureManager::LoadTexture(%s).", ID.filename.GetString() ) );
|
||||||
|
|
||||||
/* We could have two copies of the same bitmap if there are equivalent but
|
/* We could have two copies of the same bitmap if there are equivalent but
|
||||||
* different paths, e.g. "Bitmaps\me.bmp" and "..\Rage PC Edition\Bitmaps\me.bmp". */
|
* different paths, e.g. "Bitmaps\me.bmp" and "..\Rage PC Edition\Bitmaps\me.bmp". */
|
||||||
@@ -67,6 +67,7 @@ RageTexture* RageTextureManager::LoadTexture( RageTextureID ID )
|
|||||||
{
|
{
|
||||||
/* Found the texture. Just increase the refcount and return it. */
|
/* Found the texture. Just increase the refcount and return it. */
|
||||||
p->second->m_iRefCount++;
|
p->second->m_iRefCount++;
|
||||||
|
LOG->UnmapLog( "LoadTexture" );
|
||||||
return p->second;
|
return p->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,10 +82,9 @@ RageTexture* RageTextureManager::LoadTexture( RageTextureID ID )
|
|||||||
else
|
else
|
||||||
pTexture = new RageBitmapTexture( ID );
|
pTexture = new RageBitmapTexture( ID );
|
||||||
|
|
||||||
LOG->Trace( "RageTextureManager: Loaded '%s'.", ID.filename.GetString() );
|
|
||||||
|
|
||||||
m_mapPathToTexture[ID] = pTexture;
|
m_mapPathToTexture[ID] = pTexture;
|
||||||
|
|
||||||
|
LOG->UnmapLog( "LoadTexture" );
|
||||||
return pTexture;
|
return pTexture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user