resonance 1.0.1
Loading...
Searching...
No Matches
gamestats.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
27class GameStats {
28 // GrooveWorld::MarkStatsFlag() at 0x00195378 writes mRemixEdited directly.
29 friend class GrooveWorld;
30
31public:
42
51 virtual ~GameStats();
52
62 void Reset(int nPlayers);
63
70 int GetScore(int nPlayer);
71
78 void SetScore(int nPlayer, int nScore);
79
85 float GetProgress();
86
92 void SetProgress(float flProgress);
93
100 float GetRatio(int nPlayer);
101
108 void SetRatio(int nPlayer, float flRatio);
109
116 int GetTally(int nPlayer);
117
124 void SetTally(int nPlayer, int nTally);
125
133
141
150
151private:
152 // Not written by the constructor.
153 float mProgress; // +0x0c
154 // Zeroed by the constructor and Reset(), and not read by a recovered routine.
155 int mUnreadCounter; // +0x10
156
157public:
168
169private:
170 std::vector<int> mScores; // +0x18
171 std::vector<float> mRatios; // +0x24
172 std::vector<int> mTallies; // +0x30
173};
void SetRatio(int nPlayer, float flRatio)
int mPlayerCount
The number of players the session records.
Definition gamestats.h:132
int GetTally(int nPlayer)
void SetTally(int nPlayer, int nTally)
int GetScore(int nPlayer)
int mRemixEdited
Non-zero once the jam's phrases or remix effects changed.
Definition gamestats.h:167
int mCheated
Non-zero when a cheat ran during the solo game, copied from Gamer::mCheated.
Definition gamestats.h:149
float GetRatio(int nPlayer)
virtual ~GameStats()
Release the three vectors.
int mCompleted
Non-zero when the solo song was completed.
Definition gamestats.h:140
friend class GrooveWorld
Definition gamestats.h:29
void Reset(int nPlayers)
Clear the tally for a new game and give each player a zero entry in every vector.
void SetProgress(float flProgress)
GameStats()
Start with every counter clear and all three vectors empty.
void SetScore(int nPlayer, int nScore)
float GetProgress()