More doxygen.

This commit is contained in:
Jason Felds
2011-02-12 19:28:44 -05:00
parent 9c48788515
commit e4f990d49a
+246 -120
View File
@@ -6,49 +6,66 @@
#include "EnumHelper.h"
// Note definitions
// Use 1-35 instead of 1-13. -aj
/* 35 is used because we have to be mindful of Profile data.
* See Profile::InitGeneralData() for how MAX_METER is used. -aj */
/** @brief Define the mininum difficulty value allowed. */
const int MIN_METER = 1;
/**
* @brief Define the maximum difficulty value allowed.
*
* 35 is used rather than 13 due to a variety of Profile data.
* For more examples, see Profile::InitGeneralData(). -aj
*/
const int MAX_METER = 35;
// Credits
/** @brief The maximum number of credits for coin mode. */
const int MAX_NUM_CREDITS = 20;
/* This is just cached song data. Not all of it may actually be displayed
/**
* @brief The various radar categories available.
*
* This is just cached song data. Not all of it may actually be displayed
* in the radar. */
enum RadarCategory
{
RadarCategory_Stream = 0,
RadarCategory_Voltage,
RadarCategory_Air,
RadarCategory_Freeze,
RadarCategory_Chaos,
RadarCategory_TapsAndHolds,
RadarCategory_Jumps,
RadarCategory_Holds,
RadarCategory_Mines,
RadarCategory_Hands,
RadarCategory_Rolls,
RadarCategory_Lifts,
NUM_RadarCategory, // leave this at the end
RadarCategory_Stream = 0, /**< How much stream is in the song? */
RadarCategory_Voltage, /**< How much voltage is in the song? */
RadarCategory_Air, /**< How much air is in the song? */
RadarCategory_Freeze, /**< How much freeze (holds) is in the song? */
RadarCategory_Chaos, /**< How much chaos is in the song? */
RadarCategory_TapsAndHolds, /**< How many taps and holds are in the song? */
RadarCategory_Jumps, /**< How many jumps are in the song? */
RadarCategory_Holds, /**< How many holds are in the song? */
RadarCategory_Mines, /**< How many mines are in the song? */
RadarCategory_Hands, /**< How many hands are in the song? */
RadarCategory_Rolls, /**< How many rolls are in the song? */
RadarCategory_Lifts, /**< How many lifts are in the song? */
NUM_RadarCategory, /**< The number of radar categories. */
RadarCategory_Invalid
};
/**
* @brief Turn the radar category into a proper string.
* @param cat the radar category.
* @return the string version of the radar category.
*/
const RString& RadarCategoryToString( RadarCategory cat );
/**
* @brief Turn the radar category into a proper localized string.
* @param cat the radar category.
* @return the localized string version of the radar category.
*/
const RString& RadarCategoryToLocalizedString( RadarCategory cat );
LuaDeclareType( RadarCategory );
/** @brief The different game categories available to play. */
enum StepsTypeCategory
{
StepsTypeCategory_Single,
StepsTypeCategory_Double,
StepsTypeCategory_Couple,
StepsTypeCategory_Routine,
StepsTypeCategory_Single, /**< One person plays on one side. */
StepsTypeCategory_Double, /**< One person plays on both sides. */
StepsTypeCategory_Couple, /**< Two players play on their own side. */
StepsTypeCategory_Routine, /**< Two players share both sides together. */
};
/** @brief The different steps types for playing. */
enum StepsType
{
StepsType_dance_single = 0,
@@ -89,23 +106,43 @@ enum StepsType
};
LuaDeclareType( StepsType );
// Play mode stuff
/** @brief The various play modes available. */
enum PlayMode
{
PLAY_MODE_REGULAR,
PLAY_MODE_NONSTOP,
PLAY_MODE_ONI,
PLAY_MODE_ENDLESS,
PLAY_MODE_BATTLE, // manually launched attacks
PLAY_MODE_RAVE, // automatically launched attacks
PLAY_MODE_REGULAR, /**< The normal game mode, often with a set number of stages. */
PLAY_MODE_NONSTOP, /**< Play a set of songs without stopping. */
PLAY_MODE_ONI, /**< Similar to Nonstop, only there is also the danger of lives or a clock. */
PLAY_MODE_ENDLESS, /**< Keep playing until you get a game over. */
PLAY_MODE_BATTLE, /**< Choose when to send attacks to your opponent. */
PLAY_MODE_RAVE, /**< Have attacks launched during play automatically. */
NUM_PlayMode,
PlayMode_Invalid
};
/**
* @brief Turn the play mode into a proper string.
* @param pm the play mode.
* @return the string version of the play mode.
*/
const RString& PlayModeToString( PlayMode pm );
/**
* @brief Turn the play mode into a proper localized string.
* @param pm the play mode.
* @return the localized string version of the play mode.
*/
const RString& PlayModeToLocalizedString( PlayMode pm );
/**
* @brief Turn the string into the proper play mode.
* @param s the string.
* @return the play mode based on the string.
*/
PlayMode StringToPlayMode( const RString& s );
LuaDeclareType( PlayMode );
/**
* @brief The list of ways to sort songs and courses.
*
* All song sorts should be listed before course sorts.
*/
enum SortOrder
{
// song sorts
@@ -139,48 +176,100 @@ enum SortOrder
NUM_SortOrder,
SortOrder_Invalid
};
/** @brief Only allow certain sort modes to be selectable. */
const SortOrder MAX_SELECTABLE_SORT = (SortOrder)(SORT_ROULETTE-1);
/**
* @brief Turn the sort order into a proper string.
* @param so the sort order.
* @return the string version of the sort order.
*/
const RString& SortOrderToString( SortOrder so );
/**
* @brief Turn the sort order into a proper localized string.
* @param so the sort order.
* @return the localized string version of the sort order.
*/
const RString& SortOrderToLocalizedString( SortOrder so );
/**
* @brief Turn the string into the proper sort order.
* @param s the string.
* @return the sort order based on the string.
*/
SortOrder StringToSortOrder( const RString& str );
LuaDeclareType( SortOrder );
// IsSongSort is only used for saving sort order to the profile. -aj
/**
* @brief Determine if the sort order in question is for songs or not.
*
* This function is mainly used for saving sort order to the profile. -aj
*/
inline bool IsSongSort( SortOrder so ) { return so >= SORT_PREFERRED && so <= SORT_DOUBLE_CHALLENGE_METER; }
// Scoring stuff
/** @brief The list of tap note scores available during play. */
enum TapNoteScore {
TNS_None,
TNS_HitMine,
TNS_AvoidMine,
TNS_CheckpointMiss,
TNS_Miss,
TNS_W5,
TNS_W4,
TNS_W3,
TNS_W2,
TNS_W1,
TNS_CheckpointHit,
NUM_TapNoteScore,
TNS_None, /**< There is no score involved with this one. */
TNS_HitMine, /**< A mine was hit successfully. */
TNS_AvoidMine, /**< A mine was avoided successfully. */
TNS_CheckpointMiss, /**< A checkpoint was missed during a hold. */
TNS_Miss, /**< A note was missed entirely. */
TNS_W5, /**< A note was almost missed, but not quite. */
TNS_W4, /**< A note was hit either a bit early or a bit late. */
TNS_W3, /**< A note was hit with decent accuracy, but not the best. */
TNS_W2, /**< A note was hit off by just a miniscule amount. This used to be the best rating. */
TNS_W1, /**< A note was hit perfectly. */
TNS_CheckpointHit, /**< A checkpoint was held during a hold. */
NUM_TapNoteScore, /**< The number of Tap Note Scores available. */
TapNoteScore_Invalid,
};
/**
* @brief Turn the tap note score into a proper string.
* @param tns the tap note score.
* @return the string version of the tap note score.
*/
const RString& TapNoteScoreToString( TapNoteScore tns );
/**
* @brief Turn the tap note score into a proper localized string.
* @param tns the tap note score.
* @return the localized string version of the tap note score.
*/
const RString& TapNoteScoreToLocalizedString( TapNoteScore tns );
/**
* @brief Turn the string into the proper tap note score.
* @param str the string.
* @return the tap note score based on the string.
*/
TapNoteScore StringToTapNoteScore( const RString& str );
LuaDeclareType( TapNoteScore );
/** @brief The list of hold note scores available during play. */
enum HoldNoteScore
{
HNS_None, // HoldNote not scored yet
HNS_LetGo, // HoldNote has passed, missed it
HNS_Held, // HoldNote has passed, successfully held all the way
NUM_HoldNoteScore,
HNS_None, /**< The HoldNote was not scored yet. */
HNS_LetGo, /**< The HoldNote has passed, but the player missed it. */
HNS_Held, /**< The HoldNote has passed, and was successfully held all the way. */
NUM_HoldNoteScore, /**< The number of hold note scores. */
HoldNoteScore_Invalid,
};
/**
* @brief Turn the hold note score into a proper string.
* @param hns the hold note score.
* @return the string version of the hold note score.
*/
const RString& HoldNoteScoreToString( HoldNoteScore hns );
/**
* @brief Turn the hold note score into a proper localized string.
* @param hns the hold note score.
* @return the localized string version of the hold note score.
*/
const RString& HoldNoteScoreToLocalizedString( HoldNoteScore hns );
/**
* @brief Turn the string into the proper hold note score.
* @param str the string.
* @return the hold note score based on the string.
*/
HoldNoteScore StringToHoldNoteScore( const RString& str );
LuaDeclareType( HoldNoteScore );
/** @brief The list of timing windows to deal with when playing. */
enum TimingWindow
{
TW_W1,
@@ -196,6 +285,7 @@ enum TimingWindow
};
const RString& TimingWindowToString( TimingWindow tw );
/** @brief The list of score events that can take place while playing. */
enum ScoreEvent
{
SE_CheckpointHit,
@@ -213,6 +303,7 @@ enum ScoreEvent
};
const RString& ScoreEventToString( ScoreEvent se );
/** @brief The list of game button types available for all game modes. */
enum GameButtonType
{
GameButtonType_Step,
@@ -221,6 +312,7 @@ enum GameButtonType
GameButtonType_INVALID
};
/** @brief The list of judge types for the tap note scores. */
enum TapNoteScoreJudgeType
{
TapNoteScoreJudgeType_MinimumScore,
@@ -232,7 +324,7 @@ const RString& TapNoteScoreJudgeTypeToString( TapNoteScoreJudgeType jt );
LuaDeclareType( TapNoteScoreJudgeType );
// Profile and MemCard stuff
/** @brief The profile slots available. This is mainly for Profiles and Memory Cards. */
enum ProfileSlot
{
ProfileSlot_Player1,
@@ -244,7 +336,7 @@ enum ProfileSlot
const RString& ProfileSlotToString( ProfileSlot ps );
LuaDeclareType( ProfileSlot );
/** @brief The states of the memory card during play. */
enum MemoryCardState
{
MemoryCardState_Ready,
@@ -260,14 +352,14 @@ enum MemoryCardState
const RString& MemoryCardStateToString( MemoryCardState mcs );
LuaDeclareType( MemoryCardState );
// Ranking stuff
/** @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. // doesn't count extra stage!
NUM_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 );
@@ -282,7 +374,7 @@ RankingCategory AverageMeterToRankingCategory( int iAverageMeter );
extern const RString GROUP_ALL;
//
/** @brief The different types of players in the game. */
enum PlayerController
{
PC_HUMAN,
@@ -295,22 +387,24 @@ enum PlayerController
const RString& PlayerControllerToString( PlayerController pc );
LuaDeclareType( PlayerController );
/** @brief The different health bar states. */
enum HealthState
{
HealthState_Hot,
HealthState_Alive,
HealthState_Danger,
HealthState_Dead,
HealthState_Hot, /**< The health bar is very full. */
HealthState_Alive, /**< The health bar is at a decent size. */
HealthState_Danger, /**< The health bar is about to run out. */
HealthState_Dead, /**< The health bar is drained completely. */
NUM_HealthState,
HealthState_Invalid
};
LuaDeclareType( HealthState );
/** @brief The different stage results during battle. */
enum StageResult
{
RESULT_WIN,
RESULT_LOSE,
RESULT_DRAW
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. */
};
@@ -328,11 +422,12 @@ const int ITEM_NONE = -1;
// Coin stuff
/** @brief The different coin modes to determine how one can play. */
enum CoinMode
{
CoinMode_Home,
CoinMode_Pay,
CoinMode_Free,
CoinMode_Home, /**< The full range of options are available. */
CoinMode_Pay, /**< Coins must be inserted before a game can begin. */
CoinMode_Free, /**< It costs no money to play, but otherwise is similar to Pay mode. */
NUM_CoinMode,
CoinMode_Invalid
};
@@ -340,12 +435,12 @@ const RString& CoinModeToString( CoinMode cm );
LuaDeclareType( CoinMode );
// Premium
/** @brief The different types of premiums available to take advantage of. */
enum Premium
{
Premium_Off,
Premium_DoubleFor1Credit,
Premium_2PlayersFor1Credit,
Premium_Off, /**< It will cost one credit per side of the machine. */
Premium_DoubleFor1Credit, /**< It will cost one credit per player of the machine. */
Premium_2PlayersFor1Credit, /**< One credit gives one or both players full access. */
NUM_Premium,
Premium_Invalid
};
@@ -354,7 +449,7 @@ const RString& PremiumToLocalizedString( Premium p );
LuaDeclareType( Premium );
// Award stuff
/** @brief The various stage awards that can be given based on excellent play. */
enum StageAward
{
StageAward_FullComboW3,
@@ -375,7 +470,7 @@ const RString& StageAwardToLocalizedString( StageAward pma );
StageAward StringToStageAward( const RString& pma );
LuaDeclareType( StageAward );
/** @brief The various peak combo awards should such a combo be attained during play. */
enum PeakComboAward
{
PeakComboAward_1000,
@@ -396,23 +491,47 @@ const RString& PeakComboAwardToLocalizedString( PeakComboAward pma );
PeakComboAward StringToPeakComboAward( const RString& pma );
LuaDeclareType( PeakComboAward );
/** @brief The list of BPMs to display */
struct DisplayBpms
{
/**
* @brief Add a BPM to the list.
* @param f the BPM to add.
*/
void Add( float f );
/**
* @brief Retrieve the minimum BPM of the set.
* @return the minimum BPM.
*/
float GetMin() const;
/**
* @brief Retrieve the maximum BPM of the set.
* @return the maximum BPM.
*/
float GetMax() const;
/**
* @brief Determine if the BPM is really constant.
* @return Whether the BPM is constant or not.
*/
bool BpmIsConstant() const;
/**
* @brief Determine if the BPM is meant to be a secret.
* @return Whether the BPM is a secret or not.
*/
bool IsSecret() const;
/**
* @brief The list of the BPMs for the song or course.
*/
vector<float> vfBpms;
};
/** @brief The various style types available. */
enum StyleType
{
StyleType_OnePlayerOneSide, // e.g. single
StyleType_TwoPlayersTwoSides, // e.g. versus
StyleType_OnePlayerTwoSides, // e.g. double
StyleType_TwoPlayersSharedSides, // e.g. routine
StyleType_OnePlayerOneSide, /**< Single style */
StyleType_TwoPlayersTwoSides, /**< Versus style */
StyleType_OnePlayerTwoSides, /**< Double style */
StyleType_TwoPlayersSharedSides, /**< Routine style */
NUM_StyleType,
StyleType_Invalid
};
@@ -420,7 +539,7 @@ const RString& StyleTypeToString( StyleType s );
StyleType StringToStyleType( const RString& s );
LuaDeclareType( StyleType );
/** @brief The different goal types, mainly meant for fitness modes. */
enum GoalType
{
GoalType_Calories,
@@ -433,7 +552,7 @@ const RString& GoalTypeToString( GoalType gt );
GoalType StringToGoalType( const RString& s );
LuaDeclareType( GoalType );
/** @brief The different types of Edit modes available. */
enum EditMode
{
EditMode_Practice,
@@ -447,22 +566,24 @@ const RString& EditModeToString( EditMode em );
EditMode StringToEditMode( const RString& s );
LuaDeclareType( EditMode );
/*
original options from ScreenEz2SelectMusic:
(if no confirm type is mentioned, there is none.)
0 = play music as you select; SampleMusicPreviewMode_Normal
1 = no music plays, select 1x to play preview music, select again to confirm
2 = no music plays at all (SampleMusicPreviewMode_ScreenMusic + redir to silent)
3 = play music as select, 2x to confirm (SampleMusicPreviewMode_Normal + [SSMusic] TwoPartConfirmsOnly)
4 = screen music plays; SampleMusicPreviewMode_ScreenMusic
*/
/**
* @brief The different types of sample music previews available.
*
* These were originally from the deleted screen ScreenEz2SelectMusic.
* (if no confirm type is mentioned, there is none.)
*
* 0 = play music as you select; SampleMusicPreviewMode_Normal
* 1 = no music plays, select 1x to play preview music, select again to confirm
* 2 = no music plays at all (SampleMusicPreviewMode_ScreenMusic + redir to silent)
* 3 = play music as select, 2x to confirm (SampleMusicPreviewMode_Normal + [SSMusic] TwoPartConfirmsOnly)
* 4 = screen music plays; SampleMusicPreviewMode_ScreenMusic
*/
enum SampleMusicPreviewMode
{
SampleMusicPreviewMode_Normal,
SampleMusicPreviewMode_StartToPreview,
SampleMusicPreviewMode_ScreenMusic,
SampleMusicPreviewMode_LastSong, // continue playing the last song
SampleMusicPreviewMode_Normal, /**< Music is played as the song is highlighted. */
SampleMusicPreviewMode_StartToPreview,
SampleMusicPreviewMode_ScreenMusic, /**< No music plays. Select it once to preview the music, then once more to select the song. */
SampleMusicPreviewMode_LastSong, /**< continue playing the last song */
NUM_SampleMusicPreviewMode,
SampleMusicPreviewMode_Invalid,
};
@@ -470,31 +591,36 @@ const RString& SampleMusicPreviewModeToString( SampleMusicPreviewMode );
SampleMusicPreviewMode StringToSampleMusicPreviewMode( const RString& s );
LuaDeclareType( SampleMusicPreviewMode );
enum Stage // Shared stage values (not per-player) that are shown in StageDisplay
/**
* @brief The different kinds of Stages available.
*
* These are shared stage values shown in StageDisplay. These are not per-player.
*/
enum Stage
{
Stage_1st,
Stage_2nd,
Stage_3rd,
Stage_4th,
Stage_5th,
Stage_6th,
Stage_Next, // after Stage_6th but not Final. This won't normally happen because 7 stages is the max in the UI.
Stage_Final,
Stage_Extra1,
Stage_Extra2,
Stage_Nonstop,
Stage_Oni,
Stage_Endless,
Stage_Event,
Stage_Demo,
NUM_Stage,
Stage_1st, /**< The first stage. */
Stage_2nd, /**< The second stage. */
Stage_3rd, /**< The third stage. */
Stage_4th, /**< The fourth stage. */
Stage_5th, /**< The fifth stage. */
Stage_6th, /**< The sixth stage. */
Stage_Next, /**< Somewhere between the sixth and final stage. This won't normally happen because 7 stages is the max in the UI. */
Stage_Final, /**< The last stage. */
Stage_Extra1, /**< The first bonus stage, AKA the extra stage. */
Stage_Extra2, /**< The last bonus stage, AKA the encore extra stage. */
Stage_Nonstop, /**< Playing a nonstop course. */
Stage_Oni, /**< Playing an oni or survival course. */
Stage_Endless, /**< Playing an endless course. */
Stage_Event, /**< Playing in event mode. */
Stage_Demo, /**< Playing the demonstration. */
NUM_Stage, /**< The number of stage types. */
Stage_Invalid,
};
const RString& StageToString( Stage s );
LuaDeclareType( Stage );
const RString& StageToLocalizedString( Stage i );
/** @brief The different possibilities of earning an extra stage. */
enum EarnedExtraStage
{
EarnedExtraStage_No,
@@ -506,7 +632,7 @@ enum EarnedExtraStage
const RString& EarnedExtraStageToString( EarnedExtraStage s );
LuaDeclareType( EarnedExtraStage );
/** @brief The different results of loading a profile. */
enum ProfileLoadResult
{
ProfileLoadResult_Success,
@@ -514,7 +640,7 @@ enum ProfileLoadResult
ProfileLoadResult_FailedTampered
};
/** @brief The different statuses for multiplayer. */
enum MultiPlayerStatus
{
MultiPlayerStatus_Joined,
@@ -526,13 +652,13 @@ enum MultiPlayerStatus
};
const RString& MultiPlayerStatusToString( MultiPlayerStatus i );
/** @brief The different course types. */
enum CourseType
{
COURSE_TYPE_NONSTOP, // if life meter type is BAR
COURSE_TYPE_ONI, // if life meter type is BATTERY
COURSE_TYPE_ENDLESS, // if set to REPEAT
COURSE_TYPE_SURVIVAL, // if life meter type is TIME
COURSE_TYPE_NONSTOP, /**< The life meter type is set to BAR. */
COURSE_TYPE_ONI, /**< The life meter type is set to BATTERY. */
COURSE_TYPE_ENDLESS, /**< The life meter type is set to REPEAT. */
COURSE_TYPE_SURVIVAL, /**< The life meter type is set to TIME. */
NUM_CourseType,
CourseType_Invalid
};