When I use
the game crashes inside LostALifeImpl.cpp:
I am trying to find why it is happening. The backdrop file exists at the specified directory ("graphics/lostalife.tga"). Any ideas?
Thanks
- Code:
ChangeState( GAME_STATE_LOSTALIFE );
the game crashes inside LostALifeImpl.cpp:
- Code:
void LostALifeImpl::Initialize()
{
ScopedPtr< IniFile > ini( GetFactory()->NewIniFile( "ini/game.ini" ) );
CIString s;
ini->GetStringValue( "lostalife", "backdrop", s );
if (s != "") m_Backdrop.Reset( GetFactory()->NewSurface( s.c_str() ) );
// CRASHES HERE (m_Backdrop is null)
m_Backdrop->CopyTo( GetApi()->GetSecondary() );
ini->GetStringValue( "lostalife", "font", s );
if (s != "") m_Font.Reset( GetFactory()->NewFont( GetFactory()->NewSurface( s.c_str() ), "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) );
ini->GetStringValue( "lostalife", "text", s );
int texty = ini->GetIntValue( "lostalife", "texty" );
if (s != "") m_Font->Centre( s.c_str(), 120, texty );
while (GetApi()->Clicked());
}
I am trying to find why it is happening. The backdrop file exists at the specified directory ("graphics/lostalife.tga"). Any ideas?
Thanks