2004-05-31 22:42:12 +00:00
|
|
|
/* Grade - Mark the player receives after clearing a song. */
|
2002-01-16 10:01:32 +00:00
|
|
|
|
2002-09-07 11:44:18 +00:00
|
|
|
#ifndef GRADE_H
|
|
|
|
|
#define GRADE_H
|
2002-01-16 10:01:32 +00:00
|
|
|
|
2004-03-03 00:13:45 +00:00
|
|
|
#include "RageUtil.h"
|
|
|
|
|
|
2004-01-20 03:32:48 +00:00
|
|
|
#define NUM_GRADE_TIERS 20
|
|
|
|
|
enum Grade
|
|
|
|
|
{
|
2005-03-31 06:14:28 +00:00
|
|
|
GRADE_TIER01, // = AAAA
|
|
|
|
|
GRADE_TIER02, // = AAA
|
|
|
|
|
GRADE_TIER03, // = AA
|
|
|
|
|
GRADE_TIER04, // = A
|
|
|
|
|
GRADE_TIER05, // = B
|
|
|
|
|
GRADE_TIER06, // = C
|
|
|
|
|
GRADE_TIER07, // = D
|
|
|
|
|
GRADE_TIER08,
|
|
|
|
|
GRADE_TIER09,
|
|
|
|
|
GRADE_TIER10,
|
|
|
|
|
GRADE_TIER11,
|
|
|
|
|
GRADE_TIER12,
|
|
|
|
|
GRADE_TIER13,
|
|
|
|
|
GRADE_TIER14,
|
|
|
|
|
GRADE_TIER15,
|
|
|
|
|
GRADE_TIER16,
|
|
|
|
|
GRADE_TIER17,
|
|
|
|
|
GRADE_TIER18,
|
|
|
|
|
GRADE_TIER19,
|
|
|
|
|
GRADE_TIER20,
|
2004-01-20 03:32:48 +00:00
|
|
|
GRADE_FAILED, // = E
|
2004-01-20 07:09:44 +00:00
|
|
|
NUM_GRADES,
|
|
|
|
|
GRADE_NO_DATA, // ~GRADE_INVALID
|
2004-01-20 03:32:48 +00:00
|
|
|
};
|
2002-02-02 05:11:12 +00:00
|
|
|
|
2004-03-16 04:10:40 +00:00
|
|
|
/* This is in the header so the test sets don't require Grade.cpp (through PrefsManager),
|
|
|
|
|
* since that pulls in ThemeManager. */
|
|
|
|
|
static inline CString GradeToString( Grade g )
|
|
|
|
|
{
|
|
|
|
|
// string is meant to be human readable
|
|
|
|
|
switch( g )
|
|
|
|
|
{
|
|
|
|
|
case GRADE_NO_DATA: return "NoData";
|
|
|
|
|
case GRADE_FAILED: return "Failed";
|
|
|
|
|
default:
|
|
|
|
|
return ssprintf("Tier%02d",g+1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2004-01-20 07:09:44 +00:00
|
|
|
CString GradeToOldString( Grade g ); // "AAA", "B", etc for backward compatibility
|
2004-02-16 09:23:34 +00:00
|
|
|
CString GradeToThemedString( Grade g );
|
2002-03-30 20:00:13 +00:00
|
|
|
Grade StringToGrade( const CString &s );
|
2004-02-22 07:09:34 +00:00
|
|
|
#define FOREACH_Grade( g ) FOREACH_ENUM( Grade, NUM_GRADES, g )
|
2005-03-12 10:49:41 +00:00
|
|
|
#define FOREACH_UsedGrade( g ) FOREACH_ENUM( Grade, THEME->GetMetricI("PlayerStageStats","NumGradeTiersUsed"), g )
|
2002-01-16 10:01:32 +00:00
|
|
|
|
|
|
|
|
#endif
|
2004-05-31 22:42:12 +00:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* (c) 2001-2004 Chris Danford
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
|
|
|
|
* whom the Software is furnished to do so, provided that the above
|
|
|
|
|
* copyright notice(s) and this permission notice appear in all copies of
|
|
|
|
|
* the Software and that both the above copyright notice(s) and this
|
|
|
|
|
* permission notice appear in supporting documentation.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
|
|
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
|
|
|
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
|
|
|
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
|
|
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
*/
|