More doxygen.

This commit is contained in:
Jason Felds
2011-02-13 14:32:36 -05:00
parent 2bb6240e84
commit 49859de9d7
8 changed files with 126 additions and 21 deletions
+1
View File
@@ -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<BPMDisplay>
{
public:
+59 -5
View File
@@ -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<apActorCommands> SET_NO_BPM_COMMAND;
/** @brief The commands to use when there is a normal BPM. */
ThemeMetric<apActorCommands> SET_NORMAL_COMMAND;
/** @brief The commands to use when the BPM can change between 2 or more values. */
ThemeMetric<apActorCommands> SET_CHANGING_COMMAND;
/** @brief The commands to use when the BPM is random. */
ThemeMetric<apActorCommands> SET_RANDOM_COMMAND;
/** @brief The commands to use if it is an extra stage. */
ThemeMetric<apActorCommands> SET_EXTRA_COMMAND;
/** @brief A flag to determine if the BPMs cycle from low to high or just display both. */
ThemeMetric<bool> CYCLE;
/** @brief A flag to determine if QUESTIONMARKS_TEXT is shown. */
ThemeMetric<bool> SHOW_QMARKS;
/** @brief How often the random BPMs cycle themselves. */
ThemeMetric<float> RANDOM_CYCLE_SPEED;
/** @brief The text used to separate the low and high BPMs. */
ThemeMetric<RString> SEPARATOR;
/** @brief The text used when there is no BPM. */
ThemeMetric<RString> NO_BPM_TEXT;
/** @brief The text used when there are various BPMs for the song. */
ThemeMetric<RString> VARIOUS_TEXT;
/** @brief The text used when it is a random BPM. */
ThemeMetric<RString> RANDOM_TEXT;
/** @brief The text used as one possible option for random BPM. */
ThemeMetric<RString> 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<float> 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
+1 -1
View File
@@ -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 );
+14 -4
View File
@@ -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
+2
View File
@@ -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<HighScore>
{
public:
@@ -457,6 +458,7 @@ public:
LUA_REGISTER_CLASS( HighScore )
/** @brief Allow Lua to have access to the HighScoreList. */
class LunaHighScoreList: public Luna<HighScoreList>
{
public:
+35 -5
View File
@@ -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<HighScoreImpl> 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
+2 -2
View File
@@ -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 &note1Out, int &note2Out, const RString &sPath )
+12 -4
View File
@@ -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