fix GradeDisplay

This commit is contained in:
Glenn Maynard
2003-03-31 18:29:25 +00:00
parent f28b149ad0
commit 4529d61eef
+6 -2
View File
@@ -38,7 +38,7 @@ bool GradeDisplay::Load( RageTextureID ID )
Sprite::Load( ID ); Sprite::Load( ID );
Sprite::StopAnimating(); Sprite::StopAnimating();
if( Sprite::GetNumStates() != 8 || Sprite::GetNumStates() != 16 ) if( Sprite::GetNumStates() != 8 && Sprite::GetNumStates() != 16 )
RageException::Throw( "The grade graphic '%s' must have either 8 or 16 frames.", ID.filename.GetString() ); RageException::Throw( "The grade graphic '%s' must have either 8 or 16 frames.", ID.filename.GetString() );
return true; return true;
} }
@@ -107,8 +107,12 @@ void GradeDisplay::SetGrade( PlayerNumber pn, Grade g )
m_bDoScrolling = false; m_bDoScrolling = false;
StopUsingCustomCoords(); StopUsingCustomCoords();
if(g != GRADE_NO_DATA)
{
SetState( GetFrameNo(pn,g) ); SetState( GetFrameNo(pn,g) );
Sprite::SetDiffuse( RageColor(1,1,1,g==GRADE_NO_DATA ? 0 : 1) ); SetDiffuse( RageColor(1,1,1,1.0f) );
} else
SetDiffuse( RageColor(1,1,1,0) );
} }
void GradeDisplay::Spin() void GradeDisplay::Spin()