diff --git a/src/BPMDisplay.cpp b/src/BPMDisplay.cpp index 370e10197e..b079cf9f93 100644 --- a/src/BPMDisplay.cpp +++ b/src/BPMDisplay.cpp @@ -289,6 +289,7 @@ void SongBPMDisplay::Update( float fDeltaTime ) REGISTER_ACTOR_CLASS( SongBPMDisplay ) #include "LuaBinding.h" +/** @brief Allow Lua to have access to the BPMDisplay. */ class LunaBPMDisplay: public Luna { public: diff --git a/src/BPMDisplay.h b/src/BPMDisplay.h index 3da9ae07e0..d6fb4f5e71 100644 --- a/src/BPMDisplay.h +++ b/src/BPMDisplay.h @@ -1,4 +1,4 @@ -/* BPMDisplay - displays a BPM or a range of BPMs. */ +/** @brief BPMDisplay - displays a BPM or a range of BPMs. */ #ifndef BPM_DISPLAY_H #define BPM_DISPLAY_H @@ -11,55 +11,109 @@ class Song; class Course; struct DisplayBpms; +/** @brief Display the BPM/range of them as requested. */ class BPMDisplay : public BitmapText { public: + /** @brief Set up the BPM Display with default values. */ BPMDisplay(); + /** @brief Copy the BPMDisplay to another. */ virtual BPMDisplay *Copy() const; + /** @brief Load the various metrics needed. */ void Load(); + /** + * @brief Update the display as required. + * @param fDeltaTime the changed time. + */ virtual void Update( float fDeltaTime ); void LoadFromNode( const XNode *pNode ); - + /** + * @brief Use the BPM[s] from a song. + * @param pSong the song in question. + */ void SetBpmFromSong( const Song* pSong ); + /** + * @brief Use the BPM[s] from a course. + * @param pCourse the course in question. + */ void SetBpmFromCourse( const Course* pCourse ); + /** + * @brief Use a specified, constant BPM. + * @param fBPM the constant BPM. + */ void SetConstantBpm( float fBPM ); + /** + * @brief Have the BPMDisplay cycle between various BPMs. + */ void CycleRandomly(); + /** @brief Don't use a BPM at all. */ void NoBPM(); + /** @brief Have the BPMDisplay use various BPMs. */ void SetVarious(); + /** @brief Have the GameState determine which BPMs to display. */ void SetFromGameState(); // Lua virtual void PushSelf( lua_State *L ); protected: + /** + * @brief Retrieve the active BPM on display. + * @return the active BPM on display. + */ float GetActiveBPM() const; + /** + * @brief Set the range to be used for the display. + * @param bpms the set of BPMs to be used. + */ void SetBPMRange( const DisplayBpms &bpms ); + /** @brief The commands to use when there is no BPM. */ ThemeMetric SET_NO_BPM_COMMAND; + /** @brief The commands to use when there is a normal BPM. */ ThemeMetric SET_NORMAL_COMMAND; + /** @brief The commands to use when the BPM can change between 2 or more values. */ ThemeMetric SET_CHANGING_COMMAND; + /** @brief The commands to use when the BPM is random. */ ThemeMetric SET_RANDOM_COMMAND; + /** @brief The commands to use if it is an extra stage. */ ThemeMetric SET_EXTRA_COMMAND; + /** @brief A flag to determine if the BPMs cycle from low to high or just display both. */ ThemeMetric CYCLE; + /** @brief A flag to determine if QUESTIONMARKS_TEXT is shown. */ ThemeMetric SHOW_QMARKS; + /** @brief How often the random BPMs cycle themselves. */ ThemeMetric RANDOM_CYCLE_SPEED; + /** @brief The text used to separate the low and high BPMs. */ ThemeMetric SEPARATOR; + /** @brief The text used when there is no BPM. */ ThemeMetric NO_BPM_TEXT; + /** @brief The text used when there are various BPMs for the song. */ ThemeMetric VARIOUS_TEXT; + /** @brief The text used when it is a random BPM. */ ThemeMetric RANDOM_TEXT; + /** @brief The text used as one possible option for random BPM. */ ThemeMetric QUESTIONMARKS_TEXT; - float m_fBPMFrom, m_fBPMTo; + /** @brief The lowest valued BPM. */ + float m_fBPMFrom; + /** @brief The highest valued BPM. */ + float m_fBPMTo; + /** @brief The current BPM index used. */ int m_iCurrentBPM; + /** @brief The list of BPMs. */ vector m_BPMS; float m_fPercentInState; + /** @brief How long it takes to cycle the various BPMs. */ float m_fCycleTime; }; #endif -/* - * (c) 2001-2002 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2002 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/GameConstantsAndTypes.h b/src/GameConstantsAndTypes.h index 5199c603ab..9bd115b913 100644 --- a/src/GameConstantsAndTypes.h +++ b/src/GameConstantsAndTypes.h @@ -192,7 +192,7 @@ const RString& SortOrderToString( SortOrder so ); const RString& SortOrderToLocalizedString( SortOrder so ); /** * @brief Turn the string into the proper sort order. - * @param s the string. + * @param str the string. * @return the sort order based on the string. */ SortOrder StringToSortOrder( const RString& str ); diff --git a/src/GameplayAssist.h b/src/GameplayAssist.h index a982e75edd..5f153c3dc4 100644 --- a/src/GameplayAssist.h +++ b/src/GameplayAssist.h @@ -1,4 +1,4 @@ -/* GameplayAssist - Encapsulate playing of handclap and metronome. */ +/** @brief GameplayAssist - Encapsulate playing of handclap and metronome. */ #ifndef GameplayAssist_H #define GameplayAssist_H @@ -6,24 +6,34 @@ #include "RageSound.h" class NoteData; - +/** @brief The handclaps and metronomes ready to assist the player. */ class GameplayAssist { public: + /** @brief Load the sounds. */ void Init(); + /** + * @brief Play the sounds in question for the particular chart. + * @param nd the note data used for playing the ticks. */ void PlayTicks( const NoteData &nd ); + /** @brief Stop playing the sounds. */ void StopPlaying(); private: + /** @brief the sound made when a note is to be hit. */ RageSound m_soundAssistClap; + /** @brief the sound made when crossing a new measure. */ RageSound m_soundAssistMetronomeMeasure; + /** @brief the sound made when crossing a new beat. */ RageSound m_soundAssistMetronomeBeat; }; #endif -/* - * (c) 2003-2006 Chris Danford +/** + * @file + * @author Chris Danford (c) 2003-2006 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/HighScore.cpp b/src/HighScore.cpp index 4d1e170bd8..420127f6bd 100644 --- a/src/HighScore.cpp +++ b/src/HighScore.cpp @@ -411,6 +411,7 @@ void Screenshot::LoadFromNode( const XNode* pNode ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the HighScore. */ class LunaHighScore: public Luna { public: @@ -457,6 +458,7 @@ public: LUA_REGISTER_CLASS( HighScore ) +/** @brief Allow Lua to have access to the HighScoreList. */ class LunaHighScoreList: public Luna { public: diff --git a/src/HighScore.h b/src/HighScore.h index 791fdf12a5..ba493e4d10 100644 --- a/src/HighScore.h +++ b/src/HighScore.h @@ -1,4 +1,4 @@ -/* HighScore - Player scoring data that persists between sessions. */ +/** @brief HighScore - Player scoring data that persists between sessions. */ #ifndef HIGH_SCORE_H #define HIGH_SCORE_H @@ -13,17 +13,37 @@ struct RadarValues; struct lua_State; struct HighScoreImpl; +/** @brief The high score that is earned by a player. */ struct HighScore { HighScore(); + /** + * @brief Retrieve the name of the player that set the high score. + * @return the name of the player. */ RString GetName() const; + /** + * @brief Retrieve the grade earned from this score. + * @return the grade. + */ Grade GetGrade() const; + /** + * @brief Retrieve the score earned. + * @return the score. */ int GetScore() const; + /** + * @brief Determine if any judgments were tallied during this run. + * @return true if no judgments were recorded, false otherwise. */ bool IsEmpty() const; float GetPercentDP() const; + /** + * @brief Determine how many seconds the player had left in Survival mode. + * @return the number of seconds left. */ float GetSurviveSeconds() const; float GetSurvivalSeconds() const; + /** + * @brief Get the modifiers used for this run. + * @return the modifiers. */ RString GetModifiers() const; DateTime GetDateTime() const; RString GetPlayerGuid() const; @@ -33,6 +53,9 @@ struct HighScore int GetHoldNoteScore( HoldNoteScore tns ) const; const RadarValues &GetRadarValues() const; float GetLifeRemainingSeconds() const; + /** + * @brief Determine if this score was from a situation that would cause disqualification. + * @return true if the score would be disqualified, false otherwise. */ bool GetDisqualified() const; void SetName( const RString &sName ); @@ -70,6 +93,7 @@ private: HiddenPtr m_Impl; }; +/** @brief The list of high scores */ struct HighScoreList { public: @@ -110,10 +134,14 @@ private: }; +/** @brief the picture taken of the high score. */ struct Screenshot { - RString sFileName; // no directory part - just the file name - RString sMD5; // MD5 hash of the screenshot file + /** @brief the filename of the screen shot. There is no directory part. */ + RString sFileName; + /** @brief The MD5 hash of the screen shot file above. */ + RString sMD5; + /** @brief The actual high score in question. */ HighScore highScore; XNode* CreateNode() const; @@ -122,8 +150,10 @@ struct Screenshot #endif -/* - * (c) 2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/NotesLoaderDWI.cpp b/src/NotesLoaderDWI.cpp index 59781ba774..6b67d636f8 100644 --- a/src/NotesLoaderDWI.cpp +++ b/src/NotesLoaderDWI.cpp @@ -37,8 +37,8 @@ enum * @brief Turn the individual character to the proper note. * @param c The character in question. * @param i The player. - * @param col1Out The first result based on the character. - * @param col2Out The second result based on the character. + * @param note1Out The first result based on the character. + * @param note2Out The second result based on the character. * @param sPath the path to the file. */ static void DWIcharToNote( char c, GameController i, int ¬e1Out, int ¬e2Out, const RString &sPath ) diff --git a/src/Quad.h b/src/Quad.h index ac8d89af43..e3e03012d3 100644 --- a/src/Quad.h +++ b/src/Quad.h @@ -1,23 +1,31 @@ -/* Quad - A rectangle shaped actor with color. */ +/** @brief Quad - A rectangle shaped actor with color. */ #ifndef QUAD_H #define QUAD_H #include "Sprite.h" - +/** @brief the Rectangular Actor with color. */ class Quad : public Sprite { public: + /** @brief Initialize the quad. */ Quad(); + /** + * @brief Load the quad from the specified node. + * @param pNode the node to load the quad from. + */ void LoadFromNode( const XNode* pNode ); + /** @brief Copy the quad. */ virtual Quad *Copy() const; }; #endif -/* - * (c) 2002-2003 Chris Danford +/** + * @file + * @author Chris Danford (c) 2002-2003 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a