Files
itgmania212121/stepmania/src/Grade.cpp
T
Chris Danford 3ff91dffb0 NEW FEATURE: AutoSync status now shown during gameplay with icon
NEW FEATURE:  added autogen icon to select music
NEW FEATURE:  toggle for easter eggs in Machine Options
NEW FEATURE:  marvelous step timing togglable in Machine Options
NEW FEATURE:  Grade AAAA (all marvelous)
CHANGE:  Only show ScreenHowToPlay if at least one player chose easy
2003-01-11 08:55:21 +00:00

47 lines
1.2 KiB
C++

#include "stdafx.h"
/*
-----------------------------------------------------------------------------
Class: Grade
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Grade.h"
CString GradeToString( Grade g )
{
switch( g )
{
case GRADE_AAAA: return "AAAA";
case GRADE_AAA: return "AAA";
case GRADE_AA: return "AA";
case GRADE_A: return "A";
case GRADE_B: return "B";
case GRADE_C: return "C";
case GRADE_D: return "D";
case GRADE_E: return "E";
case GRADE_NO_DATA: return "N";
default: ASSERT( false ); return "N";
}
};
Grade StringToGrade( const CString &sGrade )
{
CString s = sGrade;
s.MakeUpper();
if ( s == "AAAA" ) return GRADE_AAAA;
else if( s == "AAA" ) return GRADE_AAA;
else if( s == "AA" ) return GRADE_AA;
else if( s == "A" ) return GRADE_A;
else if( s == "B" ) return GRADE_B;
else if( s == "C" ) return GRADE_C;
else if( s == "D" ) return GRADE_D;
else if( s == "E" ) return GRADE_E;
else if( s == "N" ) return GRADE_NO_DATA;
else ASSERT( false ); return GRADE_NO_DATA; // invalid grade string
};