cleanup, some doxygening

This commit is contained in:
AJ Kelly
2011-02-21 02:24:42 -06:00
parent 3324d20305
commit 00e71f9858
15 changed files with 29 additions and 45 deletions
+5 -4
View File
@@ -1,13 +1,14 @@
/* ScoreDisplayAliveTime - Display a constantly updating figure of time the player is alive. */
// TODO: Merge this with ScoreDisplayOni
#ifndef ScoreDisplayAliveTime_H #ifndef ScoreDisplayAliveTime_H
#define ScoreDisplayAliveTime_H #define ScoreDisplayAliveTime_H
#include "BitmapText.h" #include "BitmapText.h"
#include "PlayerNumber.h" #include "PlayerNumber.h"
/**
* @brief Display a constantly updating figure of time the player is alive.
*
* TODO: Merge this with ScoreDisplayOni
*/
class ScoreDisplayAliveTime : public BitmapText class ScoreDisplayAliveTime : public BitmapText
{ {
public: public:
+1 -3
View File
@@ -1,5 +1,3 @@
/* ScoreDisplayRave - ScoreDisplay implementation for PLAY_MODE_BATTLE. */
#ifndef SCORE_DISPLAY_BATTLE_H #ifndef SCORE_DISPLAY_BATTLE_H
#define SCORE_DISPLAY_BATTLE_H #define SCORE_DISPLAY_BATTLE_H
@@ -8,7 +6,7 @@
#include "Sprite.h" #include "Sprite.h"
#include "RageTexturePreloader.h" #include "RageTexturePreloader.h"
/** @brief ScoreDisplay implementation for PLAY_MODE_BATTLE. */
class ScoreDisplayBattle : public ScoreDisplay class ScoreDisplayBattle : public ScoreDisplay
{ {
public: public:
+1 -3
View File
@@ -1,12 +1,10 @@
/* ScoreDisplayCalories - Shows calorie score during gameplay and some menus. */
#ifndef ScoreDisplayCalories_H #ifndef ScoreDisplayCalories_H
#define ScoreDisplayCalories_H #define ScoreDisplayCalories_H
#include "RollingNumbers.h" #include "RollingNumbers.h"
#include "PlayerNumber.h" #include "PlayerNumber.h"
/** @brief Shows calorie score during gameplay and some menus. */
class ScoreDisplayCalories : public RollingNumbers class ScoreDisplayCalories : public RollingNumbers
{ {
public: public:
-2
View File
@@ -9,7 +9,6 @@
#include "CommonMetrics.h" #include "CommonMetrics.h"
#include "ActorUtil.h" #include "ActorUtil.h"
ScoreDisplayNormal::ScoreDisplayNormal() ScoreDisplayNormal::ScoreDisplayNormal()
{ {
LOG->Trace( "ScoreDisplayNormal::ScoreDisplayNormal()" ); LOG->Trace( "ScoreDisplayNormal::ScoreDisplayNormal()" );
@@ -21,7 +20,6 @@ ScoreDisplayNormal::ScoreDisplayNormal()
ActorUtil::LoadAllCommandsAndSetXY( m_sprFrame, sType ); ActorUtil::LoadAllCommandsAndSetXY( m_sprFrame, sType );
this->AddChild( m_sprFrame ); this->AddChild( m_sprFrame );
// init the text // init the text
m_text.LoadFromFont( THEME->GetPathF("ScoreDisplayNormal","Text") ); m_text.LoadFromFont( THEME->GetPathF("ScoreDisplayNormal","Text") );
m_text.Load( "RollingNumbers" ); m_text.Load( "RollingNumbers" );
+1 -2
View File
@@ -1,5 +1,3 @@
/* ScoreDisplayNormal - Shows point score during gameplay and some menus. */
#ifndef SCORE_DISPLAY_NORMAL_H #ifndef SCORE_DISPLAY_NORMAL_H
#define SCORE_DISPLAY_NORMAL_H #define SCORE_DISPLAY_NORMAL_H
@@ -7,6 +5,7 @@
#include "RollingNumbers.h" #include "RollingNumbers.h"
#include "AutoActor.h" #include "AutoActor.h"
/** @brief Shows point score during gameplay and some menus. */
class ScoreDisplayNormal : public ScoreDisplay class ScoreDisplayNormal : public ScoreDisplay
{ {
public: public:
+1 -2
View File
@@ -1,5 +1,3 @@
/* ScoreDisplayOni - Shows time into course. */
#ifndef SCORE_DISPLAY_ONI_H #ifndef SCORE_DISPLAY_ONI_H
#define SCORE_DISPLAY_ONI_H #define SCORE_DISPLAY_ONI_H
@@ -7,6 +5,7 @@
#include "BitmapText.h" #include "BitmapText.h"
#include "Sprite.h" #include "Sprite.h"
/** @brief Shows time into course. */
class ScoreDisplayOni : public ScoreDisplay class ScoreDisplayOni : public ScoreDisplay
{ {
public: public:
+3 -5
View File
@@ -7,6 +7,7 @@
ScoreDisplayPercentage::ScoreDisplayPercentage() ScoreDisplayPercentage::ScoreDisplayPercentage()
{ {
// todo: allow ScoreDisplayPercentage to have its own frame? -aj
m_sprFrame.Load( THEME->GetPathG("ScoreDisplayNormal","frame") ); m_sprFrame.Load( THEME->GetPathG("ScoreDisplayNormal","frame") );
this->AddChild( m_sprFrame ); this->AddChild( m_sprFrame );
@@ -18,11 +19,8 @@ void ScoreDisplayPercentage::Init( const PlayerState* pPlayerState, const Player
{ {
ScoreDisplay::Init( pPlayerState, pPlayerStageStats ); ScoreDisplay::Init( pPlayerState, pPlayerStageStats );
m_Percent.Load( m_Percent.Load( pPlayerState, pPlayerStageStats,
pPlayerState, "ScoreDisplayPercentage Percent", true );
pPlayerStageStats,
"ScoreDisplayPercentage Percent",
true );
} }
/* /*
+1 -2
View File
@@ -1,5 +1,3 @@
/* ScoreDisplayPercentage - ScoreDisplay implementation for a percentage display. */
#ifndef SCORE_DISPLAY_PERCENTAGE_H #ifndef SCORE_DISPLAY_PERCENTAGE_H
#define SCORE_DISPLAY_PERCENTAGE_H #define SCORE_DISPLAY_PERCENTAGE_H
@@ -7,6 +5,7 @@
#include "PercentageDisplay.h" #include "PercentageDisplay.h"
#include "AutoActor.h" #include "AutoActor.h"
/** @brief ScoreDisplay implementation for a percentage display. */
class ScoreDisplayPercentage: public ScoreDisplay class ScoreDisplayPercentage: public ScoreDisplay
{ {
public: public:
+1 -3
View File
@@ -1,5 +1,3 @@
/* ScoreDisplayRave - ScoreDisplay implementation for PLAY_MODE_RAVE. */
#ifndef SCORE_DISPLAY_RAVE_H #ifndef SCORE_DISPLAY_RAVE_H
#define SCORE_DISPLAY_RAVE_H #define SCORE_DISPLAY_RAVE_H
@@ -9,7 +7,7 @@
#include "BitmapText.h" #include "BitmapText.h"
#include "AutoActor.h" #include "AutoActor.h"
/** @brief ScoreDisplay implementation for PLAY_MODE_RAVE. */
class ScoreDisplayRave : public ScoreDisplay class ScoreDisplayRave : public ScoreDisplay
{ {
public: public:
+6 -11
View File
@@ -1,15 +1,9 @@
/** @brief ScoreKeeper - Abstract class to handle scorekeeping, stat-taking, etc. */
#ifndef SCORE_KEEPER_H #ifndef SCORE_KEEPER_H
#define SCORE_KEEPER_H #define SCORE_KEEPER_H
/* /* Stat handling is in here because that can differ between games, too; for
* Stat handling is in here because that can differ between games, too; for * example, some games count double taps as a single note in scoring and some
* example, some games count double taps as a single note in scoring and * count per-tap. Results are injected directly into the PlayerStageStats. */
* some count per-tap.
*
* Results are injected directly into the PlayerStageStats.
*/
#include "GameConstantsAndTypes.h" #include "GameConstantsAndTypes.h"
@@ -22,6 +16,7 @@ class PlayerStageStats;
struct TapNote; struct TapNote;
struct AttackArray; struct AttackArray;
/** @brief Abstract class to handle scorekeeping, stat-taking, etc. */
class ScoreKeeper class ScoreKeeper
{ {
public: public:
@@ -31,7 +26,7 @@ protected:
PlayerState *m_pPlayerState; PlayerState *m_pPlayerState;
PlayerStageStats *m_pPlayerStageStats; PlayerStageStats *m_pPlayerStageStats;
/* Common toggles that this class handles directly: */ // Common toggles that this class handles directly:
/* If true, doubles count as 2+ in stat counts; if false, doubles count as /* If true, doubles count as 2+ in stat counts; if false, doubles count as
* only one. */ /* (not yet) */ * only one. */ /* (not yet) */
@@ -48,7 +43,7 @@ public:
virtual void DrawPrimitives() { } virtual void DrawPrimitives() { }
virtual void Update( float fDelta ) { } virtual void Update( float fDelta ) { }
/* Note that pNoteData will include any transformations due to modifiers. */ // Note that pNoteData will include any transformations due to modifiers.
virtual void OnNextSong( int iSongInCourseIndex, const Steps* pSteps, const NoteData* pNoteData ) { }; // before a song plays (called multiple times if course) virtual void OnNextSong( int iSongInCourseIndex, const Steps* pSteps, const NoteData* pNoteData ) { }; // before a song plays (called multiple times if course)
// HandleTap* is called before HandleTapRow* // HandleTap* is called before HandleTapRow*
+3 -4
View File
@@ -1,11 +1,9 @@
/* ScoreKeeperGuitar - */
#ifndef ScoreKeeperGuitar_H #ifndef ScoreKeeperGuitar_H
#define ScoreKeeperGuitar_H #define ScoreKeeperGuitar_H
#include "ScoreKeeperNormal.h" #include "ScoreKeeperNormal.h"
/** @brief ScoreKeeper implementation for the guitar gametype. */
class ScoreKeeperGuitar : public ScoreKeeperNormal class ScoreKeeperGuitar : public ScoreKeeperNormal
{ {
public: public:
@@ -15,7 +13,8 @@ public:
void HandleHoldActiveSeconds( float fMusicSecondsHeld ); void HandleHoldActiveSeconds( float fMusicSecondsHeld );
virtual void AddTapRowScore( TapNoteScore score, const NoteData &nd, int iRow ); virtual void AddTapRowScore( TapNoteScore score, const NoteData &nd, int iRow );
protected: protected:
float m_fMusicSecondsHeldRemainder; // seconds from a hold note that have not yet been counted toward CurScore /** @brief seconds from a hold note that have not yet been counted toward CurScore. */
float m_fMusicSecondsHeldRemainder;
}; };
#endif #endif
+1
View File
@@ -13,6 +13,7 @@ struct RadarValues;
AutoScreenMessage( SM_PlayToasty ); AutoScreenMessage( SM_PlayToasty );
/** @brief The default ScoreKeeper implementation. */
class ScoreKeeperNormal: public ScoreKeeper class ScoreKeeperNormal: public ScoreKeeper
{ {
void AddScoreInternal( TapNoteScore score ); void AddScoreInternal( TapNoteScore score );
+1
View File
@@ -4,6 +4,7 @@
#include "ScoreKeeperNormal.h" #include "ScoreKeeperNormal.h"
#include "PlayerNumber.h" #include "PlayerNumber.h"
/** @brief ScoreKeeper for Routine mode. */
class ScoreKeeperShared : public ScoreKeeperNormal class ScoreKeeperShared : public ScoreKeeperNormal
{ {
public: public:
+3 -2
View File
@@ -110,7 +110,7 @@ public:
ScoreDisplay *m_pSecondaryScoreDisplay; ScoreDisplay *m_pSecondaryScoreDisplay;
/** @brief The primary ScoreKeeper for keeping track of the score. */ /** @brief The primary ScoreKeeper for keeping track of the score. */
ScoreKeeper *m_pPrimaryScoreKeeper; ScoreKeeper *m_pPrimaryScoreKeeper;
/** @brief The secondary ScoreKeeper for keeping track of the score. */ /** @brief The secondary ScoreKeeper. Only used in PLAY_MODE_RAVE. */
ScoreKeeper *m_pSecondaryScoreKeeper; ScoreKeeper *m_pSecondaryScoreKeeper;
/** @brief The current PlayerOptions that are activated. */ /** @brief The current PlayerOptions that are activated. */
BitmapText *m_ptextPlayerOptions; BitmapText *m_ptextPlayerOptions;
@@ -127,7 +127,7 @@ public:
* This is mainly used in PLAY_MODE_BATTLE. */ * This is mainly used in PLAY_MODE_BATTLE. */
Inventory *m_pInventory; Inventory *m_pInventory;
StepsDisplay *m_pStepsDisplay; StepsDisplay *m_pStepsDisplay;
AutoActor m_sprOniGameOver; AutoActor m_sprOniGameOver;
}; };
@@ -172,6 +172,7 @@ protected:
virtual bool UseSongBackgroundAndForeground() const { return true; } virtual bool UseSongBackgroundAndForeground() const { return true; }
ThemeMetric<RString> PLAYER_TYPE; ThemeMetric<RString> PLAYER_TYPE;
ThemeMetric<RString> SCORE_DISPLAY_TYPE;
ThemeMetric<apActorCommands> PLAYER_INIT_COMMAND; ThemeMetric<apActorCommands> PLAYER_INIT_COMMAND;
LocalizedString GIVE_UP_START_TEXT; LocalizedString GIVE_UP_START_TEXT;
LocalizedString GIVE_UP_BACK_TEXT; LocalizedString GIVE_UP_BACK_TEXT;
+1 -2
View File
@@ -1,11 +1,10 @@
/* ScreenGameplayLesson - Shows some explanation pages, then allows 3 tries to pass a song. */
#ifndef ScreenGameplayLesson_H #ifndef ScreenGameplayLesson_H
#define ScreenGameplayLesson_H #define ScreenGameplayLesson_H
#include "ScreenGameplayNormal.h" #include "ScreenGameplayNormal.h"
class CourseEntry; class CourseEntry;
/** @brief Shows some explanation pages, then allows 3 tries to pass a song. */
class ScreenGameplayLesson : public ScreenGameplayNormal class ScreenGameplayLesson : public ScreenGameplayNormal
{ {
public: public: