From 8cc38194b2200c845c42cfaa16d07e0abc1f2394 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 21:47:52 -0500 Subject: [PATCH] Some more doxygen. --- src/InputQueue.h | 3 +-- src/NotesWriterSM.h | 31 +++++++++++++++++++++++++++---- src/PrefsManager.h | 6 ++++-- src/ScreenNameEntry.h | 4 +--- src/ScreenTestSound.h | 7 +++++-- src/StageStats.h | 36 +++++++++++++++++++++++++++--------- 6 files changed, 65 insertions(+), 22 deletions(-) diff --git a/src/InputQueue.h b/src/InputQueue.h index 9cce2fb0ff..902eba46db 100644 --- a/src/InputQueue.h +++ b/src/InputQueue.h @@ -1,5 +1,3 @@ -/* InputQueue - Stores a list of the most recently pressed MenuInputs for each player. */ - #ifndef INPUT_QUEUE_H #define INPUT_QUEUE_H @@ -9,6 +7,7 @@ class InputEventPlus; class RageTimer; +/** @brief Stores a list of the most recently pressed MenuInputs for each player. */ class InputQueue { public: diff --git a/src/NotesWriterSM.h b/src/NotesWriterSM.h index 7427248425..7907bf7eed 100644 --- a/src/NotesWriterSM.h +++ b/src/NotesWriterSM.h @@ -1,22 +1,45 @@ -/* NotesWriterSM - Writes a Song to an .SM file. */ - #ifndef NOTES_WRITER_SM_H #define NOTES_WRITER_SM_H class Song; class Steps; +/** @brief Writes a Song to an .SM file. */ namespace NotesWriterSM { + /** + * @brief Write the song out to a file. + * @param sPath the path to write the file. + * @param out the Song to be written out. + * @return its success or failure. */ bool Write( RString sPath, const Song &out ); + /** + * @brief Get some contents about the edit file first. + * @param pSong the Song in question. + * @param pSteps the Steps in question. + * @param sOut unused? + */ void GetEditFileContents( const Song *pSong, const Steps *pSteps, RString &sOut ); + /** + * @brief Get the name of the edit file to use. + * @param pSong the Song in question. + * @param pSteps the Steps in question. + * @return the name of the edit file. */ RString GetEditFileName( const Song *pSong, const Steps *pSteps ); + /** + * @param Write the edit file to the machine for future use. + * @param pSong the Song in question. + * @param pSteps the Steps in question. + * @param sErrorOut any error messages that may have occurred. + * @return its success or failure. */ bool WriteEditFileToMachine( const Song *pSong, Steps *pSteps, RString &sErrorOut ); } #endif -/* - * (c) 2001-2004 Chris Danford, Glenn Maynard +/** + * @file + * @author Chris Danford, Glenn Maynard (c) 2001-2004 + * @seciton LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/PrefsManager.h b/src/PrefsManager.h index f9443ac9e5..ebec3fb8f5 100644 --- a/src/PrefsManager.h +++ b/src/PrefsManager.h @@ -1,5 +1,3 @@ -/* PrefsManager - Holds user-chosen preferences that are saved between sessions. */ - #ifndef PREFSMANAGER_H #define PREFSMANAGER_H @@ -7,6 +5,9 @@ class IniFile; +/** @brief How many songs can be played during a normal game max? + * + * This assumes no extra stages, no event mode, no course modes. */ const int MAX_SONGS_PER_PLAY = 7; enum MusicWheelUsesSections @@ -125,6 +126,7 @@ enum DefaultFailType DefaultFailType_Invalid }; +/** @brief Holds user-chosen preferences that are saved between sessions. */ class PrefsManager { public: diff --git a/src/ScreenNameEntry.h b/src/ScreenNameEntry.h index cef8e00436..e785b4056e 100644 --- a/src/ScreenNameEntry.h +++ b/src/ScreenNameEntry.h @@ -1,5 +1,3 @@ -/* ScreenNameEntry - Enter a name for a new high score. */ - #ifndef SCREEN_NAME_ENTRY_H #define SCREEN_NAME_ENTRY_H @@ -7,7 +5,7 @@ #include "BitmapText.h" #include "ReceptorArrowRow.h" #include "RageSound.h" - +/** @brief Enter a name for a new high score. */ class ScreenNameEntry : public ScreenWithMenuElements { public: diff --git a/src/ScreenTestSound.h b/src/ScreenTestSound.h index 46f1899f47..d9024a63b6 100644 --- a/src/ScreenTestSound.h +++ b/src/ScreenTestSound.h @@ -5,6 +5,7 @@ #include "BitmapText.h" #include "RageSound.h" +/** @brief The number of sounds allowed for testing. */ const int nsounds = 5; class ScreenTestSound : public Screen @@ -31,8 +32,10 @@ public: #endif -/* - * (c) 2003 Glenn Maynard +/** + * @file + * @author Glenn Maynard (c) 2003 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/StageStats.h b/src/StageStats.h index 6b4ae273a6..842c3bba54 100644 --- a/src/StageStats.h +++ b/src/StageStats.h @@ -1,5 +1,3 @@ -/* StageStats - Contains statistics for one stage of play - either one song, or a whole course. */ - #ifndef StageStats_H #define StageStats_H @@ -9,7 +7,10 @@ class Song; class Style; struct lua_State; - +/** + * @brief Contains statistics for one stage of play. + * + * This is either one song, or a whole course. */ class StageStats { public: @@ -34,13 +35,24 @@ public: vector m_vpPossibleSongs; EarnedExtraStage m_EarnedExtraStage; - bool m_bGaveUp; // exited gameplay by giving up - bool m_bUsedAutoplay; // used autoplay at any point during gameplay + /** @brief Was the gameplay exited by the Player giving up? */ + bool m_bGaveUp; + /** @brief Did the PLayer use Autoplay at any point during gameplay? */ + bool m_bUsedAutoplay; // TODO: These are updated in ScreenGameplay::Update based on fDelta. // They should be made more accurate. - float m_fGameplaySeconds; // how many seconds before gameplay ended. Updated by Gameplay, not scaled by music rate. - float m_fStepsSeconds; // this is <= fGameplaySeconds unless the song has steps past the end + /** + * @brief How many seconds were there before gameplay ended? + * + * This is updated by Gameplay, and not scaled by the music rate. */ + float m_fGameplaySeconds; + /** + * @brief How many seconds are we in a song? + * + * This is equivalent to m_fGameplaySeconds unless the song has steps past the end. */ + float m_fStepsSeconds; + /** @brief How fast was the music going compared to normal? */ float m_fMusicRate; // Total number of seconds between first beat and last beat for every song. @@ -50,6 +62,10 @@ public: PlayerStageStats m_multiPlayer[NUM_MultiPlayer]; void FinalizeScores( bool bSummary ); + /** + * @brief Determine if the PlayerNumber has a high score. + * @param pn the PlayerNumber in question. + * @return true if the PlayerNumber has a high score, false otherwise. */ bool PlayerHasHighScore( PlayerNumber pn ) const; int GetMinimumMissCombo() const; @@ -59,8 +75,10 @@ public: #endif -/* - * (c) 2001-2004 Chris Danford, Glenn Maynard +/** + * @file + * @author Chris Danford, Glenn Maynard (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a