#BGCHANGES1 -> #BGCHANGES2

This commit is contained in:
Chris Danford
2005-06-05 03:24:30 +00:00
parent afec93797f
commit 055dc00f50
+4 -3
View File
@@ -336,10 +336,11 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
else if( sValueName=="BGCHANGES" || sValueName=="ANIMATIONS" ) else if( sValueName=="BGCHANGES" || sValueName=="ANIMATIONS" )
{ {
BackgroundLayer iLayer = BACKGROUND_LAYER_1; BackgroundLayer iLayer = BACKGROUND_LAYER_1;
sscanf( sValueName, "BGCHANGES%d", &iLayer ); if( 1 == sscanf( sValueName, "BGCHANGES%d", &iLayer ) )
iLayer = (BackgroundLayer)(iLayer-1); iLayer = (BackgroundLayer)(iLayer-1); // #BGCHANGES2 = BACKGROUND_LAYER_2
if( iLayer < 0 && iLayer >= NUM_BackgroundLayer ) bool bValid = iLayer>=0 && iLayer<NUM_BackgroundLayer;
if( !bValid )
{ {
LOG->Warn( "The song file '%s' has a BGCHANGES tag '%s' that is out of range.", sPath.c_str(), sValueName.c_str() ); LOG->Warn( "The song file '%s' has a BGCHANGES tag '%s' that is out of range.", sPath.c_str(), sValueName.c_str() );
} }