don't try to load sound if transition path is xml

This commit is contained in:
Glenn Maynard
2005-03-27 05:16:51 +00:00
parent 9c6ca1381b
commit 4ba85f9844
+16 -13
View File
@@ -26,20 +26,23 @@ void Transition::Load( CString sBGAniDir )
m_State = waiting; m_State = waiting;
// load sound from file specified by ini, or use the first sound in the directory // load sound from file specified by ini, or use the first sound in the directory
IniFile ini; if( IsADirectory(sBGAniDir) )
ini.ReadFile( sBGAniDir+"BGAnimation.ini" ); {
IniFile ini;
ini.ReadFile( sBGAniDir+"/BGAnimation.ini" );
CString sSoundFileName; CString sSoundFileName;
if( ini.GetValue("BGAnimation","Sound",sSoundFileName) ) if( ini.GetValue("BGAnimation","Sound",sSoundFileName) )
{ {
FixSlashesInPlace( sSoundFileName ); FixSlashesInPlace( sSoundFileName );
CString sPath = sBGAniDir+sSoundFileName; CString sPath = sBGAniDir+sSoundFileName;
CollapsePath( sPath ); CollapsePath( sPath );
m_sound.Load( sPath ); m_sound.Load( sPath );
} }
else else
{ {
m_sound.Load( sBGAniDir ); m_sound.Load( sBGAniDir );
}
} }
} }