|
resonance 1.0.1
|
Running tally a game session accumulates. More...
#include <gamestats.h>
Public Member Functions | |
| GameStats () | |
| Start with every counter clear and all three vectors empty. | |
| virtual | ~GameStats () |
| Release the three vectors. | |
| void | Reset (int nPlayers) |
| Clear the tally for a new game and give each player a zero entry in every vector. | |
| int | GetScore (int nPlayer) |
| void | SetScore (int nPlayer, int nScore) |
| float | GetProgress () |
| void | SetProgress (float flProgress) |
| float | GetRatio (int nPlayer) |
| void | SetRatio (int nPlayer, float flRatio) |
| int | GetTally (int nPlayer) |
| void | SetTally (int nPlayer, int nTally) |
Public Attributes | |
| int | mPlayerCount |
| The number of players the session records. | |
| int | mCompleted |
| Non-zero when the solo song was completed. | |
| int | mCheated |
| Non-zero when a cheat ran during the solo game, copied from Gamer::mCheated. | |
| int | mRemixEdited |
| Non-zero once the jam's phrases or remix effects changed. | |
Friends | |
| class | GrooveWorld |
Running tally a game session accumulates.
Its RTTI descriptor is at 0x0086f620. It has no base. The compiler places the vptr after the data at +0x3c, and the class is 0x40 bytes. Its vtable is at 0x007cd738 and has two entries, the compiler-generated type function and the destructor. The destructor is the only virtual the class declares.
The size, the vptr offset, and the three vectors all fall out of the constructor at 0x0010f150 and the destructor at 0x0010b648 together. The destructor releases the three vectors in reverse declaration order and frees the object under the tag GameStats, which is what confirms the class name against the descriptor independently.
GameManagerImpl embeds one at +0x28 and vends its address through vtable slot 19. The GrooveWorld constructor receives that address and stores it, so the world writes the tally while the manager owns it.
Reset() sizes the three per-player vectors, and Gamer fills them when a game ends. The metagame statistics screens read them back through the accessors, printing a score and a tally with d and a progress and a ratio, each scaled by 100, with %3d%%. GrooveWorld writes mRemixEdited directly, which a friend declaration models; a public member fits the image equally well.
| GameStats::GameStats | ( | ) |
Start with every counter clear and all three vectors empty.
The constructor does not write mCheated, mProgress, or mRemixEdited. A tally starts with three indeterminate fields.
|
virtual |
Release the three vectors.
The GameStats unit also emits an unreferenced, byte-identical copy at 0x0010fda0.
| void GameStats::Reset | ( | int | nPlayers | ) |
Clear the tally for a new game and give each player a zero entry in every vector.
The title is inferred.
| nPlayers | The number of players. |
| int GameStats::GetScore | ( | int | nPlayer | ) |
| nPlayer | The player's index. |
| void GameStats::SetScore | ( | int | nPlayer, |
| int | nScore ) |
| nPlayer | The player's index. |
| nScore | The player's final score. |
| float GameStats::GetProgress | ( | ) |
| void GameStats::SetProgress | ( | float | flProgress | ) |
| flProgress | The fraction of the song reached. |
| float GameStats::GetRatio | ( | int | nPlayer | ) |
| nPlayer | The player's index. |
| void GameStats::SetRatio | ( | int | nPlayer, |
| float | flRatio ) |
| nPlayer | The player's index. |
| flRatio | The player's Player::GetCaptureRatio() fraction. |
| int GameStats::GetTally | ( | int | nPlayer | ) |
| nPlayer | The player's index. |
| void GameStats::SetTally | ( | int | nPlayer, |
| int | nTally ) |
| nPlayer | The player's index. |
| nTally | The player's Player::GetBestStreak() count. |
|
friend |
| int GameStats::mPlayerCount |
The number of players the session records.
Public because MetMultiStatsScreen::EnterAndShow() reads it directly, and the image has no accessor. +0x00
| int GameStats::mCompleted |
Non-zero when the solo song was completed.
Public because Gamer writes it directly at 0x00111b9c, and the image has no accessor. +0x04
| int GameStats::mCheated |
Non-zero when a cheat ran during the solo game, copied from Gamer::mCheated.
MetRenderer shows the stage-finish screen only for a completed game with this clear. Public because Gamer writes it directly at 0x00111ba8, and the image has no accessor. Not written by the constructor. +0x08
| int GameStats::mRemixEdited |
Non-zero once the jam's phrases or remix effects changed.
Not written by the constructor.
GrooveWorld::MarkStatsFlag() sets it whenever PhraseMgr adds, installs, or clears a phrase and whenever JamEffectsMgr applies a statistics-counted effect. Public because MetRenderer::OnFreqEnded() reads it directly at 0x0036c138, where a non-zero value sends a finished jam to the end screen rather than MetRemixTypeScreen, and the image has no accessor. +0x14