|
wavelength 1.0.0
|
Log of the gameplay events of one session, written as text to a file or a memory card when the session ends. More...
#include <stats.h>
Classes | |
| class | Event |
| One recorded event. More... | |
| class | GemHitEvent |
| A gem caught by a player. More... | |
| class | GemMissEvent |
| A button press that caught no gem. More... | |
| class | GemPassEvent |
| A gem that passed without a press. More... | |
| class | ChangeTrackEvent |
| A player moving to another track. More... | |
| class | CaptureTrackEvent |
| A phrase captured by a player. More... | |
| class | CompleteStageEvent |
| The end of a section. More... | |
| class | AxeEvent |
| The start or end of a guitar freestyle. More... | |
| class | ScratchEvent |
| The start or end of a scratch. More... | |
| class | CatchPowerupEvent |
| A power-up caught by a player. More... | |
| class | DeployPowerupEvent |
| A power-up deployed by a player. More... | |
| class | LoseSoloGameEvent |
| A lost solo song. More... | |
| class | WinSoloGameEvent |
| A won solo song. More... | |
| class | EndMultiGameEvent |
| The end of a multiplayer song. More... | |
| class | PlayerAbortedEvent |
| A player who left the song. More... | |
| class | JuiceEvent |
| A new value of the juice meter. More... | |
| class | StatsMemcardUser |
| Receiver of the result of saving the log to a memory card. More... | |
Public Member Functions | |
| Stats () | |
| Construct an inactive log. | |
| ~Stats () | |
| Release the log. | |
| void | Begin (int nNumTracks, int nNumBars) |
| Start the log of a song. | |
| void | End () |
| End the session, write the log, and release the events. | |
| void | GemHit (int nTrack, int nGemTick, int nButtonTick, float fSlopMs) |
| Record a caught gem. | |
| void | GemMiss (int nTrack, int nGemTick, int nButtonTick, float fSlopMs) |
| Record a press that missed the nearest gem. | |
| void | GemMiss (int nTrack, int nButtonTick) |
| Record a press with no gem near it. | |
| void | GemPass (int nTrack, int nTick) |
| Record a gem that passed without a press on a track that has a player. | |
| void | SetTrackPlayer (int nTrack, int nPlayer) |
| Record which player plays a track. | |
| void | ChangeTrack (int nPlayer, int nTrack, int nTick) |
| Record a player moving to another track. | |
| void | CaptureTrack (int nTrack, int nTick, int nNumBars) |
| Record a captured phrase. | |
| void | CompleteStage (int nTick) |
| Record the end of a section. | |
| void | AxeBegin (int nTrack, int nTick) |
| Record the start of a guitar freestyle. | |
| void | AxeEnd (int nTrack, int nTick) |
| Record the end of a guitar freestyle. | |
| void | ScratchBegin (int nTrack, int nTick) |
| Record the start of a scratch. | |
| void | ScratchEnd (int nTrack, int nTick) |
| Record the end of a scratch. | |
| void | DeployPowerup (int nPlayer, int nTick, int nType) |
| Record a deployed power-up. | |
| void | CatchPowerup (int nPlayer, int nTick, int nType) |
| Record a caught power-up. | |
| void | LoseSoloGame (int nTick, int nScore, float fProgress) |
| Record a lost solo song. | |
| void | WinSoloGame (int nScore, int nFullMixBars, int nBestStreak, float fEnergized) |
| Record a won solo song. | |
| void | EndMultiGame (int nScore0, int nScore1, int nScore2, int nScore3) |
| Record the end of a multiplayer song. | |
| void | PlayerAborted (int nPlayer, int nTick) |
| Record a player who left the song. | |
| void | Juice (float fValue, int nTick) |
| Record a new value of the juice meter. | |
Static Public Member Functions | |
| static Stats * | shared () |
| Report the single instance, constructing it on first use. | |
Log of the gameplay events of one session, written as text to a file or a memory card when the session ends.
The class is not polymorphic. The RTTI of the nested classes records the name. The one instance is the function-local static of shared(), and TheStats addresses it. The constructor clears mActive and mLogName, and no routine of the class sets either of them.
| Stats::Stats | ( | ) |
Construct an inactive log.
| Stats::~Stats | ( | ) |
Release the log.
|
static |
Report the single instance, constructing it on first use.
|
inline |
Start the log of a song.
The body is empty.
| nNumTracks | The number of tracks. |
| nNumBars | The length of the song in bars. |
| void Stats::End | ( | ) |
End the session, write the log, and release the events.
| void Stats::GemHit | ( | int | nTrack, |
| int | nGemTick, | ||
| int | nButtonTick, | ||
| float | fSlopMs ) |
Record a caught gem.
| nTrack | The track. |
| nGemTick | The tick of the gem. |
| nButtonTick | The tick of the button press. |
| fSlopMs | The distance of the press from the gem. |
| void Stats::GemMiss | ( | int | nTrack, |
| int | nGemTick, | ||
| int | nButtonTick, | ||
| float | fSlopMs ) |
Record a press that missed the nearest gem.
| nTrack | The track. |
| nGemTick | The tick of the nearest gem. |
| nButtonTick | The tick of the button press. |
| fSlopMs | The distance of the press from the nearest gem. |
| void Stats::GemMiss | ( | int | nTrack, |
| int | nButtonTick ) |
Record a press with no gem near it.
| nTrack | The track. |
| nButtonTick | The tick of the button press. |
| void Stats::GemPass | ( | int | nTrack, |
| int | nTick ) |
Record a gem that passed without a press on a track that has a player.
| nTrack | The track. |
| nTick | The tick of the gem. |
| void Stats::SetTrackPlayer | ( | int | nTrack, |
| int | nPlayer ) |
Record which player plays a track.
| nTrack | The track index. |
| nPlayer | The player index, or -1 for none. |
| void Stats::ChangeTrack | ( | int | nPlayer, |
| int | nTrack, | ||
| int | nTick ) |
Record a player moving to another track.
| nPlayer | The player's index. |
| nTrack | The index of the new track. |
| nTick | The song tick. |
| void Stats::CaptureTrack | ( | int | nTrack, |
| int | nTick, | ||
| int | nNumBars ) |
Record a captured phrase.
| nTrack | The track. |
| nTick | The song tick. |
| nNumBars | The bars the capture clears. |
| void Stats::CompleteStage | ( | int | nTick | ) |
Record the end of a section.
| nTick | The song tick. |
| void Stats::AxeBegin | ( | int | nTrack, |
| int | nTick ) |
Record the start of a guitar freestyle.
| nTrack | The track. |
| nTick | The song tick. |
| void Stats::AxeEnd | ( | int | nTrack, |
| int | nTick ) |
Record the end of a guitar freestyle.
| nTrack | The track. |
| nTick | The song tick. |
| void Stats::ScratchBegin | ( | int | nTrack, |
| int | nTick ) |
Record the start of a scratch.
| nTrack | The track index. |
| nTick | The song tick. |
| void Stats::ScratchEnd | ( | int | nTrack, |
| int | nTick ) |
Record the end of a scratch.
| nTrack | The track index. |
| nTick | The song tick. |
| void Stats::DeployPowerup | ( | int | nPlayer, |
| int | nTick, | ||
| int | nType ) |
Record a deployed power-up.
| nPlayer | The player. |
| nTick | The song tick. |
| nType | The kind of power-up. |
| void Stats::CatchPowerup | ( | int | nPlayer, |
| int | nTick, | ||
| int | nType ) |
Record a caught power-up.
| nPlayer | The player. |
| nTick | The song tick. |
| nType | The kind of power-up. |
| void Stats::LoseSoloGame | ( | int | nTick, |
| int | nScore, | ||
| float | fProgress ) |
Record a lost solo song.
| nTick | The song tick of the loss. |
| nScore | The score. |
| fProgress | The fraction of the song played. |
| void Stats::WinSoloGame | ( | int | nScore, |
| int | nFullMixBars, | ||
| int | nBestStreak, | ||
| float | fEnergized ) |
Record a won solo song.
| nScore | The score. |
| nFullMixBars | The bars played with every track captured. |
| nBestStreak | The longest streak. |
| fEnergized | The fraction of the possible capture bars captured. |
| void Stats::EndMultiGame | ( | int | nScore0, |
| int | nScore1, | ||
| int | nScore2, | ||
| int | nScore3 ) |
Record the end of a multiplayer song.
| nScore0 | The score of the first player. |
| nScore1 | The score of the second player. |
| nScore2 | The score of the third player. |
| nScore3 | The score of the fourth player. |
| void Stats::PlayerAborted | ( | int | nPlayer, |
| int | nTick ) |
Record a player who left the song.
| nPlayer | The player. |
| nTick | The song tick. |
| void Stats::Juice | ( | float | fValue, |
| int | nTick ) |
Record a new value of the juice meter.
| fValue | The juice. |
| nTick | The song tick. |