|
From: knittl <kn...@us...> - 2009-07-09 16:57:41
|
Module: performous
Branch: master
Commit: da6e8941fb0385233dbd9f7b04f3fe31fe9edf6a
Author: knittl <knittl@kbook.(none)>
Date: Thu Jul 9 18:56:20 2009 +0200
updated doxygen
---
game/audio.hh | 6 ++++--
game/configuration.hh | 19 ++++++++++---------
game/screen_songs.hh | 2 +-
game/theme.hh | 2 +-
4 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/game/audio.hh b/game/audio.hh
index ba3d2af..d13784b 100644
--- a/game/audio.hh
+++ b/game/audio.hh
@@ -115,14 +115,16 @@ class Audio {
void open(std::string const& pdev, std::size_t rate, std::size_t frames);
/// if audio is currently playing
bool isOpen() const { return m_playback; }
- /** Play a song from the beginning
+ /** Play a song beginning at startPos (defaults to 0)
* @param filename the track filename
* @param preview if the song preview is to play
* @param fadeTime time to fade
+ * @param startPos starting position
*/
void playMusic(std::string const& filename, bool preview = false, double fadeTime = 0.1, double startPos = 0.0);
- /** Play a preview of the song, starting at 30 seconds
+ /** Play a preview of the song, starting at startPos
* @param filename the track filename
+ * @param startPos starting position
*/
void playPreview(std::string const& filename, double startPos) { playMusic(filename, true, 1.0, startPos); }
/// get pause status
diff --git a/game/configuration.hh b/game/configuration.hh
index 8e0640c..ef8b5bf 100644
--- a/game/configuration.hh
+++ b/game/configuration.hh
@@ -15,9 +15,9 @@ namespace xmlpp { struct Element; } // Forward declaration for libxml++ stuff
/// configuration option
class ConfigItem {
public:
- typedef std::vector<std::string> StringList;
+ typedef std::vector<std::string> StringList; ///< a list of strings
ConfigItem() {}
- void update(xmlpp::Element& elem, int mode); //< Load XML config file, elem = Entry, mode = 0 for schema, 1 for system config and 2 for user config
+ void update(xmlpp::Element& elem, int mode); ///< Load XML config file, elem = Entry, mode = 0 for schema, 1 for system config and 2 for user config
ConfigItem& operator++() { return incdec(1); } ///< increments config value
ConfigItem& operator--() { return incdec(-1); } ///< decrements config value
bool is_default() const; ///< Is the current value the same as the default value
@@ -29,9 +29,9 @@ class ConfigItem {
StringList& sl(); ///< Access stringlist item
void reset() { m_value = m_defaultValue; } ///< Reset to factory default
std::string getValue() const; ///< Get a human-readable representation of the current value
- std::string const& getShortDesc() const { return m_shortDesc; }
- std::string const& getLongDesc() const { return m_longDesc; }
-
+ std::string const& getShortDesc() const { return m_shortDesc; } ///< get the short description for this ConfigItem
+ std::string const& getLongDesc() const { return m_longDesc; } ///< get the long description for this ConfigItem
+
private:
template <typename T> void updateNumeric(xmlpp::Element& elem, int mode); ///< Used internally for loading XML
void verifyType(std::string const& t) const; ///< throws std::logic_error if t != type
@@ -57,11 +57,12 @@ void readConfig();
/** Write modified config options to user's config XML **/
void writeConfig();
+/// struct for entries in menu
struct MenuEntry {
- std::string name;
- std::string shortDesc;
- std::string longDesc;
- std::vector<std::string> items;
+ std::string name; ///< name of the menu entry
+ std::string shortDesc; ///< a short description
+ std::string longDesc; ///< a longer description
+ std::vector<std::string> items; ///< selectable options
};
typedef std::vector<MenuEntry> ConfigMenu;
diff --git a/game/screen_songs.hh b/game/screen_songs.hh
index e3acd6f..c640fb0 100644
--- a/game/screen_songs.hh
+++ b/game/screen_songs.hh
@@ -23,7 +23,7 @@ class ScreenSongs : public Screen {
void exit();
void manageEvent(SDL_Event event);
void draw();
- void drawJukebox();
+ void drawJukebox(); ///< draw the songbrowser in jukebox mode (fullscreen, full previews, ...)
private:
Audio& m_audio;
diff --git a/game/theme.hh b/game/theme.hh
index 0a372e6..eaf038f 100644
--- a/game/theme.hh
+++ b/game/theme.hh
@@ -9,7 +9,7 @@
class Theme: boost::noncopyable {
protected:
Theme();
- Theme(const std::string path);
+ Theme(const std::string path); ///< creates theme from path
public:
/// background image for theme
Surface bg;
|