fix num of states check

This commit is contained in:
Chris Danford
2003-09-27 21:49:02 +00:00
parent 9c9c56ba61
commit b1188a971d
+3 -2
View File
@@ -24,9 +24,10 @@
bool DifficultyIcon::Load( CString sPath )
{
Sprite::Load( sPath );
if( GetNumStates() != 5 || GetNumStates() != 10 )
int iStates = GetNumStates();
if( iStates != 5 && iStates != 10 )
if( DISPLAY->IsWindowed() )
HOOKS->MessageBoxOK( ssprintf("The difficulty icon graphic '%s' must have 5 or 10 frames.", sPath.c_str()) );
HOOKS->MessageBoxOK( ssprintf("The difficulty icon graphic '%s' must have 5 or 10 frames. It has %d states.", sPath.c_str(), iStates) );
StopAnimating();
return true;
}