wavelength 1.0.0
Loading...
Searching...
No Matches
Stats Class Reference

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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ Stats()

Stats::Stats ( )

Construct an inactive log.

Ghidra address:
NTSC-U/C: 0x0013bf70
Ghidra address:
PAL: 0x0013d840

◆ ~Stats()

Stats::~Stats ( )

Release the log.

Ghidra address:
NTSC-U/C: 0x0013c030
Ghidra address:
PAL: 0x0013d900

Member Function Documentation

◆ shared()

Stats * Stats::shared ( )
static

Report the single instance, constructing it on first use.

Returns
The instance.
Ghidra address:
NTSC-U/C: 0x0013c120
Ghidra address:
PAL: 0x0013d9f0

◆ Begin()

void Stats::Begin ( int nNumTracks,
int nNumBars )
inline

Start the log of a song.

The body is empty.

Parameters
nNumTracksThe number of tracks.
nNumBarsThe length of the song in bars.
Ghidra address:
NTSC-U/C: 0x0013c178
Ghidra address:
PAL: 0x0013da48

◆ End()

void Stats::End ( )

End the session, write the log, and release the events.

Ghidra address:
NTSC-U/C: 0x0013c180
Ghidra address:
PAL: 0x0013da50

◆ GemHit()

void Stats::GemHit ( int nTrack,
int nGemTick,
int nButtonTick,
float fSlopMs )

Record a caught gem.

Parameters
nTrackThe track.
nGemTickThe tick of the gem.
nButtonTickThe tick of the button press.
fSlopMsThe distance of the press from the gem.
Ghidra address:
NTSC-U/C: 0x0013c338
Ghidra address:
PAL: 0x0013dc08

◆ GemMiss() [1/2]

void Stats::GemMiss ( int nTrack,
int nGemTick,
int nButtonTick,
float fSlopMs )

Record a press that missed the nearest gem.

Parameters
nTrackThe track.
nGemTickThe tick of the nearest gem.
nButtonTickThe tick of the button press.
fSlopMsThe distance of the press from the nearest gem.
Ghidra address:
NTSC-U/C: 0x0013c508
Ghidra address:
PAL: 0x0013ddd8

◆ GemMiss() [2/2]

void Stats::GemMiss ( int nTrack,
int nButtonTick )

Record a press with no gem near it.

Parameters
nTrackThe track.
nButtonTickThe tick of the button press.
Ghidra address:
NTSC-U/C: 0x0013c6d8
Ghidra address:
PAL: 0x0013dfa8

◆ GemPass()

void Stats::GemPass ( int nTrack,
int nTick )

Record a gem that passed without a press on a track that has a player.

Parameters
nTrackThe track.
nTickThe tick of the gem.
Ghidra address:
NTSC-U/C: 0x0013c890
Ghidra address:
PAL: 0x0013e160

◆ SetTrackPlayer()

void Stats::SetTrackPlayer ( int nTrack,
int nPlayer )

Record which player plays a track.

Parameters
nTrackThe track index.
nPlayerThe player index, or -1 for none.
Ghidra address:
NTSC-U/C: 0x0013ca50
Ghidra address:
PAL: 0x0013e320

◆ ChangeTrack()

void Stats::ChangeTrack ( int nPlayer,
int nTrack,
int nTick )

Record a player moving to another track.

Parameters
nPlayerThe player's index.
nTrackThe index of the new track.
nTickThe song tick.
Ghidra address:
NTSC-U/C: 0x0013ca70
Ghidra address:
PAL: 0x0013e340

◆ CaptureTrack()

void Stats::CaptureTrack ( int nTrack,
int nTick,
int nNumBars )

Record a captured phrase.

Parameters
nTrackThe track.
nTickThe song tick.
nNumBarsThe bars the capture clears.
Ghidra address:
NTSC-U/C: 0x0013cc40
Ghidra address:
PAL: 0x0013e510

◆ CompleteStage()

void Stats::CompleteStage ( int nTick)

Record the end of a section.

Parameters
nTickThe song tick.
Ghidra address:
NTSC-U/C: 0x0013ce00
Ghidra address:
PAL: 0x0013e6d0

◆ AxeBegin()

void Stats::AxeBegin ( int nTrack,
int nTick )

Record the start of a guitar freestyle.

Parameters
nTrackThe track.
nTickThe song tick.
Ghidra address:
NTSC-U/C: 0x0013cf90
Ghidra address:
PAL: 0x0013e860

◆ AxeEnd()

void Stats::AxeEnd ( int nTrack,
int nTick )

Record the end of a guitar freestyle.

Parameters
nTrackThe track.
nTickThe song tick.
Ghidra address:
NTSC-U/C: 0x0013d148
Ghidra address:
PAL: 0x0013ea18

◆ ScratchBegin()

void Stats::ScratchBegin ( int nTrack,
int nTick )

Record the start of a scratch.

Parameters
nTrackThe track index.
nTickThe song tick.
Ghidra address:
NTSC-U/C: 0x0013d300
Ghidra address:
PAL: 0x0013ebd0

◆ ScratchEnd()

void Stats::ScratchEnd ( int nTrack,
int nTick )

Record the end of a scratch.

Parameters
nTrackThe track index.
nTickThe song tick.
Ghidra address:
NTSC-U/C: 0x0013d4b8
Ghidra address:
PAL: 0x0013ed88

◆ DeployPowerup()

void Stats::DeployPowerup ( int nPlayer,
int nTick,
int nType )

Record a deployed power-up.

Parameters
nPlayerThe player.
nTickThe song tick.
nTypeThe kind of power-up.
Ghidra address:
NTSC-U/C: 0x0013d670
Ghidra address:
PAL: 0x0013ef40

◆ CatchPowerup()

void Stats::CatchPowerup ( int nPlayer,
int nTick,
int nType )

Record a caught power-up.

Parameters
nPlayerThe player.
nTickThe song tick.
nTypeThe kind of power-up.
Ghidra address:
NTSC-U/C: 0x0013d818
Ghidra address:
PAL: 0x0013f0e8

◆ LoseSoloGame()

void Stats::LoseSoloGame ( int nTick,
int nScore,
float fProgress )

Record a lost solo song.

Parameters
nTickThe song tick of the loss.
nScoreThe score.
fProgressThe fraction of the song played.
Ghidra address:
NTSC-U/C: 0x0013d9c0
Ghidra address:
PAL: 0x0013f290

◆ WinSoloGame()

void Stats::WinSoloGame ( int nScore,
int nFullMixBars,
int nBestStreak,
float fEnergized )

Record a won solo song.

Parameters
nScoreThe score.
nFullMixBarsThe bars played with every track captured.
nBestStreakThe longest streak.
fEnergizedThe fraction of the possible capture bars captured.
Ghidra address:
NTSC-U/C: 0x0013db68
Ghidra address:
PAL: 0x0013f438

◆ EndMultiGame()

void Stats::EndMultiGame ( int nScore0,
int nScore1,
int nScore2,
int nScore3 )

Record the end of a multiplayer song.

Parameters
nScore0The score of the first player.
nScore1The score of the second player.
nScore2The score of the third player.
nScore3The score of the fourth player.
Ghidra address:
NTSC-U/C: 0x0013dd20
Ghidra address:
PAL: 0x0013f5f0

◆ PlayerAborted()

void Stats::PlayerAborted ( int nPlayer,
int nTick )

Record a player who left the song.

Parameters
nPlayerThe player.
nTickThe song tick.
Ghidra address:
NTSC-U/C: 0x0013ded8
Ghidra address:
PAL: 0x0013f7a8

◆ Juice()

void Stats::Juice ( float fValue,
int nTick )

Record a new value of the juice meter.

Parameters
fValueThe juice.
nTickThe song tick.
Ghidra address:
NTSC-U/C: 0x0013e070
Ghidra address:
PAL: 0x0013f940

The documentation for this class was generated from the following file: