Skip to content

Commit

Permalink
kill ranking categories and stageawards
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Dec 6, 2018
1 parent b556b43 commit 11335f9
Show file tree
Hide file tree
Showing 18 changed files with 9 additions and 651 deletions.
39 changes: 2 additions & 37 deletions src/GameConstantsAndTypes.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "global.h"
#include "global.h"
#include "EnumHelper.h"
#include "Foreach.h"
#include "GameConstantsAndTypes.h"
Expand Down Expand Up @@ -75,29 +75,6 @@ LuaFunction(PlayModeToLocalizedString,
PlayModeToLocalizedString(Enum::Check<PlayMode>(L, 1)));
LuaXType(PlayMode);

RankingCategory
AverageMeterToRankingCategory(int iAverageMeter)
{
if (iAverageMeter <= 3)
return RANKING_A;
else if (iAverageMeter <= 6)
return RANKING_B;
else if (iAverageMeter <= 9)
return RANKING_C;
else
return RANKING_D;
}

static const char* RankingCategoryNames[] = {
"a",
"b",
"c",
"d",
};
XToString(RankingCategory);
StringToX(RankingCategory);
LuaXType(RankingCategory);

static const char* PlayerControllerNames[] = {
"Human",
"Autoplay",
Expand All @@ -118,13 +95,7 @@ static const char* HealthStateNames[] = {
XToString(HealthState);
LuaXType(HealthState);

static const char* StageResultNames[] = {
"Win",
"Lose",
"Draw",
};
XToString(StageResult);
LuaXType(StageResult);


static const char* SortOrderNames[] = {
"Preferred", "Group", "Title", "BPM", "Popularity",
Expand Down Expand Up @@ -304,12 +275,6 @@ static const char* StageAwardNames[] = {
"SingleDigitW2", "OneW2", "FullComboW1", "80PercentW3",
"90PercentW3", "100PercentW3",
};
XToString(StageAward);
XToLocalizedString(StageAward);
StringToX(StageAward);
LuaFunction(StageAwardToLocalizedString,
StageAwardToLocalizedString(Enum::Check<StageAward>(L, 1)));
LuaXType(StageAward);

void DisplayBpms::Add( float f )
{
Expand Down
62 changes: 1 addition & 61 deletions src/GameConstantsAndTypes.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* GameConstantsAndTypes - Things used in many places that don't change often.
/* GameConstantsAndTypes - Things used in many places that don't change often.
*/

#ifndef GAME_CONSTANTS_AND_TYPES_H
Expand Down Expand Up @@ -373,33 +373,13 @@ const RString&
ProfileSlotToString(ProfileSlot ps);
LuaDeclareType(ProfileSlot);

/** @brief The different ranking categories based on difficulty meter average.
*/
enum RankingCategory
{
RANKING_A, /**< 1-3 meter per song avg. */
RANKING_B, /**< 4-6 meter per song avg. */
RANKING_C, /**< 7-9 meter per song avg. */
RANKING_D, /**< 10+ meter per song avg, not counting extra stages. */
NUM_RankingCategory, /**< The number of ranking categories. */
RankingCategory_Invalid
};
const RString&
RankingCategoryToString(RankingCategory rc);
RankingCategory
StringToRankingCategory(const RString& rc);
LuaDeclareType(RankingCategory);

extern const vector<RString> RANKING_TO_FILL_IN_MARKER;
inline bool
IsRankingToFillIn(const RString& sName)
{
return !sName.empty() && sName[0] == '#';
}

RankingCategory
AverageMeterToRankingCategory(int iAverageMeter);

// Group stuff
extern const RString GROUP_ALL;

Expand Down Expand Up @@ -429,46 +409,6 @@ enum HealthState
};
LuaDeclareType(HealthState);

/** @brief The different stage results during battle. */
enum StageResult
{
RESULT_WIN, /**< The player has won the battle. */
RESULT_LOSE, /**< The player has lost the battle. */
RESULT_DRAW, /**< The player has tied with the competitor. */
NUM_StageResult,
StageResult_Invalid
};
LuaDeclareType(StageResult);

/** @brief The various stage awards that can be given based on excellent play.
*/
enum StageAward
{
StageAward_FullComboW3, /**< A full great combo (or equivalent) was earned.
*/
StageAward_SingleDigitW3, /**< A single digit great combo (or equivalent)
was earned. */
StageAward_OneW3, /**< Only one great (or equivalent) was earned. */
StageAward_FullComboW2, /**< A full excellent combo (or equivalent) was
earned. */
StageAward_SingleDigitW2, /**< A single digit excellent combo (or
equivalent) was earned. */
StageAward_OneW2, /**< Only one excellent (or equivalent) was earned. */
StageAward_FullComboW1, /**< All fantastics (or equivalent) were earned. */
StageAward_80PercentW3,
StageAward_90PercentW3,
StageAward_100PercentW3,
NUM_StageAward,
StageAward_Invalid,
};
const RString&
StageAwardToString(StageAward pma);
const RString&
StageAwardToLocalizedString(StageAward pma);
StageAward
StringToStageAward(const RString& pma);
LuaDeclareType(StageAward);

/** @brief The list of BPMs to display */
struct DisplayBpms
{
Expand Down
Loading

0 comments on commit 11335f9

Please sign in to comment.