From 00e71f9858a0d2abe4368cba026317e72c94f399 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 21 Feb 2011 02:24:42 -0600 Subject: [PATCH] cleanup, some doxygening --- src/ScoreDisplayAliveTime.h | 9 +++++---- src/ScoreDisplayBattle.h | 4 +--- src/ScoreDisplayCalories.h | 4 +--- src/ScoreDisplayNormal.cpp | 2 -- src/ScoreDisplayNormal.h | 3 +-- src/ScoreDisplayOni.h | 3 +-- src/ScoreDisplayPercentage.cpp | 8 +++----- src/ScoreDisplayPercentage.h | 3 +-- src/ScoreDisplayRave.h | 4 +--- src/ScoreKeeper.h | 17 ++++++----------- src/ScoreKeeperGuitar.h | 7 +++---- src/ScoreKeeperNormal.h | 1 + src/ScoreKeeperShared.h | 1 + src/ScreenGameplay.h | 5 +++-- src/ScreenGameplayLesson.h | 3 +-- 15 files changed, 29 insertions(+), 45 deletions(-) diff --git a/src/ScoreDisplayAliveTime.h b/src/ScoreDisplayAliveTime.h index dc3cf8e91d..554873fa4f 100644 --- a/src/ScoreDisplayAliveTime.h +++ b/src/ScoreDisplayAliveTime.h @@ -1,13 +1,14 @@ -/* ScoreDisplayAliveTime - Display a constantly updating figure of time the player is alive. */ -// TODO: Merge this with ScoreDisplayOni - #ifndef ScoreDisplayAliveTime_H #define ScoreDisplayAliveTime_H #include "BitmapText.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 { public: diff --git a/src/ScoreDisplayBattle.h b/src/ScoreDisplayBattle.h index c100c93af6..2813e788bf 100644 --- a/src/ScoreDisplayBattle.h +++ b/src/ScoreDisplayBattle.h @@ -1,5 +1,3 @@ -/* ScoreDisplayRave - ScoreDisplay implementation for PLAY_MODE_BATTLE. */ - #ifndef SCORE_DISPLAY_BATTLE_H #define SCORE_DISPLAY_BATTLE_H @@ -8,7 +6,7 @@ #include "Sprite.h" #include "RageTexturePreloader.h" - +/** @brief ScoreDisplay implementation for PLAY_MODE_BATTLE. */ class ScoreDisplayBattle : public ScoreDisplay { public: diff --git a/src/ScoreDisplayCalories.h b/src/ScoreDisplayCalories.h index 1c5eae9c2b..938b5dddde 100644 --- a/src/ScoreDisplayCalories.h +++ b/src/ScoreDisplayCalories.h @@ -1,12 +1,10 @@ -/* ScoreDisplayCalories - Shows calorie score during gameplay and some menus. */ - #ifndef ScoreDisplayCalories_H #define ScoreDisplayCalories_H #include "RollingNumbers.h" #include "PlayerNumber.h" - +/** @brief Shows calorie score during gameplay and some menus. */ class ScoreDisplayCalories : public RollingNumbers { public: diff --git a/src/ScoreDisplayNormal.cpp b/src/ScoreDisplayNormal.cpp index a078425e7d..69c159d924 100644 --- a/src/ScoreDisplayNormal.cpp +++ b/src/ScoreDisplayNormal.cpp @@ -9,7 +9,6 @@ #include "CommonMetrics.h" #include "ActorUtil.h" - ScoreDisplayNormal::ScoreDisplayNormal() { LOG->Trace( "ScoreDisplayNormal::ScoreDisplayNormal()" ); @@ -21,7 +20,6 @@ ScoreDisplayNormal::ScoreDisplayNormal() ActorUtil::LoadAllCommandsAndSetXY( m_sprFrame, sType ); this->AddChild( m_sprFrame ); - // init the text m_text.LoadFromFont( THEME->GetPathF("ScoreDisplayNormal","Text") ); m_text.Load( "RollingNumbers" ); diff --git a/src/ScoreDisplayNormal.h b/src/ScoreDisplayNormal.h index efc2fbddf5..072557445f 100644 --- a/src/ScoreDisplayNormal.h +++ b/src/ScoreDisplayNormal.h @@ -1,5 +1,3 @@ -/* ScoreDisplayNormal - Shows point score during gameplay and some menus. */ - #ifndef SCORE_DISPLAY_NORMAL_H #define SCORE_DISPLAY_NORMAL_H @@ -7,6 +5,7 @@ #include "RollingNumbers.h" #include "AutoActor.h" +/** @brief Shows point score during gameplay and some menus. */ class ScoreDisplayNormal : public ScoreDisplay { public: diff --git a/src/ScoreDisplayOni.h b/src/ScoreDisplayOni.h index d461a4f417..5ae4c71da2 100644 --- a/src/ScoreDisplayOni.h +++ b/src/ScoreDisplayOni.h @@ -1,5 +1,3 @@ -/* ScoreDisplayOni - Shows time into course. */ - #ifndef SCORE_DISPLAY_ONI_H #define SCORE_DISPLAY_ONI_H @@ -7,6 +5,7 @@ #include "BitmapText.h" #include "Sprite.h" +/** @brief Shows time into course. */ class ScoreDisplayOni : public ScoreDisplay { public: diff --git a/src/ScoreDisplayPercentage.cpp b/src/ScoreDisplayPercentage.cpp index 4743aaf4f8..954e229950 100644 --- a/src/ScoreDisplayPercentage.cpp +++ b/src/ScoreDisplayPercentage.cpp @@ -7,6 +7,7 @@ ScoreDisplayPercentage::ScoreDisplayPercentage() { + // todo: allow ScoreDisplayPercentage to have its own frame? -aj m_sprFrame.Load( THEME->GetPathG("ScoreDisplayNormal","frame") ); this->AddChild( m_sprFrame ); @@ -18,11 +19,8 @@ void ScoreDisplayPercentage::Init( const PlayerState* pPlayerState, const Player { ScoreDisplay::Init( pPlayerState, pPlayerStageStats ); - m_Percent.Load( - pPlayerState, - pPlayerStageStats, - "ScoreDisplayPercentage Percent", - true ); + m_Percent.Load( pPlayerState, pPlayerStageStats, + "ScoreDisplayPercentage Percent", true ); } /* diff --git a/src/ScoreDisplayPercentage.h b/src/ScoreDisplayPercentage.h index d7830eb2b1..86b49180fd 100644 --- a/src/ScoreDisplayPercentage.h +++ b/src/ScoreDisplayPercentage.h @@ -1,5 +1,3 @@ -/* ScoreDisplayPercentage - ScoreDisplay implementation for a percentage display. */ - #ifndef SCORE_DISPLAY_PERCENTAGE_H #define SCORE_DISPLAY_PERCENTAGE_H @@ -7,6 +5,7 @@ #include "PercentageDisplay.h" #include "AutoActor.h" +/** @brief ScoreDisplay implementation for a percentage display. */ class ScoreDisplayPercentage: public ScoreDisplay { public: diff --git a/src/ScoreDisplayRave.h b/src/ScoreDisplayRave.h index 84577c10f5..dc0b79238e 100644 --- a/src/ScoreDisplayRave.h +++ b/src/ScoreDisplayRave.h @@ -1,5 +1,3 @@ -/* ScoreDisplayRave - ScoreDisplay implementation for PLAY_MODE_RAVE. */ - #ifndef SCORE_DISPLAY_RAVE_H #define SCORE_DISPLAY_RAVE_H @@ -9,7 +7,7 @@ #include "BitmapText.h" #include "AutoActor.h" - +/** @brief ScoreDisplay implementation for PLAY_MODE_RAVE. */ class ScoreDisplayRave : public ScoreDisplay { public: diff --git a/src/ScoreKeeper.h b/src/ScoreKeeper.h index 3accf2e6fa..1734513361 100644 --- a/src/ScoreKeeper.h +++ b/src/ScoreKeeper.h @@ -1,15 +1,9 @@ -/** @brief ScoreKeeper - Abstract class to handle scorekeeping, stat-taking, etc. */ - #ifndef SCORE_KEEPER_H #define SCORE_KEEPER_H -/* - * 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 count per-tap. - * - * Results are injected directly into the PlayerStageStats. - */ +/* 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 + * count per-tap. Results are injected directly into the PlayerStageStats. */ #include "GameConstantsAndTypes.h" @@ -22,6 +16,7 @@ class PlayerStageStats; struct TapNote; struct AttackArray; +/** @brief Abstract class to handle scorekeeping, stat-taking, etc. */ class ScoreKeeper { public: @@ -31,7 +26,7 @@ protected: PlayerState *m_pPlayerState; 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 * only one. */ /* (not yet) */ @@ -48,7 +43,7 @@ public: virtual void DrawPrimitives() { } 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) // HandleTap* is called before HandleTapRow* diff --git a/src/ScoreKeeperGuitar.h b/src/ScoreKeeperGuitar.h index 49eac216a5..0a7d4813e8 100644 --- a/src/ScoreKeeperGuitar.h +++ b/src/ScoreKeeperGuitar.h @@ -1,11 +1,9 @@ -/* ScoreKeeperGuitar - */ - #ifndef ScoreKeeperGuitar_H #define ScoreKeeperGuitar_H #include "ScoreKeeperNormal.h" - +/** @brief ScoreKeeper implementation for the guitar gametype. */ class ScoreKeeperGuitar : public ScoreKeeperNormal { public: @@ -15,7 +13,8 @@ public: void HandleHoldActiveSeconds( float fMusicSecondsHeld ); virtual void AddTapRowScore( TapNoteScore score, const NoteData &nd, int iRow ); 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 diff --git a/src/ScoreKeeperNormal.h b/src/ScoreKeeperNormal.h index 32c2efa82c..902ab38f12 100644 --- a/src/ScoreKeeperNormal.h +++ b/src/ScoreKeeperNormal.h @@ -13,6 +13,7 @@ struct RadarValues; AutoScreenMessage( SM_PlayToasty ); +/** @brief The default ScoreKeeper implementation. */ class ScoreKeeperNormal: public ScoreKeeper { void AddScoreInternal( TapNoteScore score ); diff --git a/src/ScoreKeeperShared.h b/src/ScoreKeeperShared.h index f34fb19874..6295513a0a 100644 --- a/src/ScoreKeeperShared.h +++ b/src/ScoreKeeperShared.h @@ -4,6 +4,7 @@ #include "ScoreKeeperNormal.h" #include "PlayerNumber.h" +/** @brief ScoreKeeper for Routine mode. */ class ScoreKeeperShared : public ScoreKeeperNormal { public: diff --git a/src/ScreenGameplay.h b/src/ScreenGameplay.h index 80d2af4b3b..5e428f18fb 100644 --- a/src/ScreenGameplay.h +++ b/src/ScreenGameplay.h @@ -110,7 +110,7 @@ public: ScoreDisplay *m_pSecondaryScoreDisplay; /** @brief The primary ScoreKeeper for keeping track of the score. */ 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; /** @brief The current PlayerOptions that are activated. */ BitmapText *m_ptextPlayerOptions; @@ -127,7 +127,7 @@ public: * This is mainly used in PLAY_MODE_BATTLE. */ Inventory *m_pInventory; - StepsDisplay *m_pStepsDisplay; + StepsDisplay *m_pStepsDisplay; AutoActor m_sprOniGameOver; }; @@ -172,6 +172,7 @@ protected: virtual bool UseSongBackgroundAndForeground() const { return true; } ThemeMetric PLAYER_TYPE; + ThemeMetric SCORE_DISPLAY_TYPE; ThemeMetric PLAYER_INIT_COMMAND; LocalizedString GIVE_UP_START_TEXT; LocalizedString GIVE_UP_BACK_TEXT; diff --git a/src/ScreenGameplayLesson.h b/src/ScreenGameplayLesson.h index fdf3fcc56d..674138bb90 100644 --- a/src/ScreenGameplayLesson.h +++ b/src/ScreenGameplayLesson.h @@ -1,11 +1,10 @@ -/* ScreenGameplayLesson - Shows some explanation pages, then allows 3 tries to pass a song. */ - #ifndef ScreenGameplayLesson_H #define ScreenGameplayLesson_H #include "ScreenGameplayNormal.h" class CourseEntry; +/** @brief Shows some explanation pages, then allows 3 tries to pass a song. */ class ScreenGameplayLesson : public ScreenGameplayNormal { public: