Etterna 0.74.4
Loading...
Searching...
No Matches
StageStats.h
1#ifndef StageStats_H
2#define StageStats_H
3
4#include "PlayerNumber.h"
5#include "PlayerStageStats.h"
6class Song;
7class Style;
8struct lua_State;
9
15{
16 public:
17 StageStats();
18 void Init();
19
23 void AssertValid(PlayerNumber pn) const;
24
28 void AssertValid(MultiPlayer pn) const;
29
30 void AddStats(const StageStats& other); // accumulate
31
32 [[nodiscard]] auto Failed() const -> bool;
33
34 [[nodiscard]] auto GetAverageMeter(PlayerNumber pn) const -> int;
35
36 Stage m_Stage;
37 int m_iStageIndex;
38 std::vector<Song*> m_vpPlayedSongs;
39 std::vector<Song*> m_vpPossibleSongs;
40
45
48
49 // Total number of seconds between first beat and last beat for every song.
50 [[nodiscard]] auto GetTotalPossibleStepsSeconds() const -> float;
51
52 PlayerStageStats m_player;
53 PlayerStageStats m_multiPlayer[NUM_MultiPlayer];
54
55 void FinalizeScores();
56 std::string mostrecentscorekey;
57
58 // Show that this StageStats was a live play or is merely a reproduction
59 // using a Replay
60 bool m_bLivePlay = false;
61
62 [[nodiscard]] auto GetMinimumMissCombo() const -> unsigned int;
63
64 // Lua
65 void PushSelf(lua_State* L);
66
67 private:
68 // TODO(Sam): Implement the copy and assignment operators on our own.
69};
70
71#endif
Contains statistics for one stage of play - either one song, or a whole course.
Definition PlayerStageStats.h:19
Holds all music metadata and steps for one song.
Definition Song.h:65
Contains statistics for one stage of play.
Definition StageStats.h:15
void AssertValid(PlayerNumber pn) const
Ensure that the Player is valid.
Definition StageStats.cpp:319
float m_fMusicRate
How fast was the music going compared to normal?
Definition StageStats.h:47
bool m_bGaveUp
Was the gameplay exited by the Player giving up?
Definition StageStats.h:42
bool m_bUsedAutoplay
Did the Player use Autoplay at any point during gameplay?
Definition StageStats.h:44
Definition Style.h:22