- Code: Select all
1ChangeState( GAME_STATE_LOSTALIFE );1 lines; 0 keywds; 0 nums; 3 ops; 0 strs; 0 coms Syntactic Coloring v0.4 - Dan East
the game crashes inside LostALifeImpl.cpp:
- Code: Select all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17void 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());
}17 lines; 6 keywds; 1 nums; 121 ops; 13 strs; 1 coms Syntactic Coloring v0.4 - Dan East
I am trying to find why it is happening. The backdrop file exists at the specified directory ("graphics/lostalife.tga"). Any ideas?
Thanks
