5#include "Etterna/Models/Lua/LuaBinding.h"
6#include "Etterna/Models/HighScore/Replay.h"
7#include "Etterna/Models/Misc/PlayerStageStats.h"
9#include <unordered_map>
17 bool replayUsedMirror =
false;
18 float replayRate = 1.F;
19 std::string replayModifiers{};
20 std::string oldModifiers{};
22 std::string oldNoteskin{};
23 FailType oldFailType = FailType_Immediate;
24 int replayRngSeed = 0;
30 replayModifiers = std::string();
31 replayUsedMirror =
false;
33 oldModifiers = std::string();
35 oldNoteskin = std::string();
36 oldFailType = FailType_Immediate;
50 void ReleaseReplay(
Replay* replay);
56 float timingScale = 1.F,
59 void UnsetActiveReplay();
66 void StoreActiveReplaySettings(
float replayRate,
67 std::string& replayModifiers,
68 bool replayUsedMirror,
71 void StoreOldSettings(
float oldRate,
72 std::string& oldModifiers,
74 std::string& oldNoteskin,
78 void ResetActiveReplaySettings();
80 static TapNoteScore GetTapNoteScoreForReplay(
float fNoteOffset,
81 float timingScale = 1.F);
83 auto CalculateRadarValuesForReplay(
Replay& replay,
87 auto RescoreReplay(
Replay& replay,
89 float timingScale = 1.F) -> bool;
91 auto GenerateLifeRecordForReplay(
Replay& replay,
float timingScale = 1.F)
92 -> std::map<float, float>;
94 auto GenerateComboListForReplay(
Replay& replay,
float timingScale = 1.F)
95 -> std::vector<PlayerStageStats::Combo_t>;
97 void EnableCustomScoringFunctions() {
98 customScoringFunctionsEnabled =
true;
100 void DisableCustomScoringFunctions() {
101 customScoringFunctionsEnabled =
false;
103 bool isCustomScoringFunctionsEnabled() {
104 return customScoringFunctionsEnabled;
116 float timingScale) -> float;
139 void SetTotalWifePointsCalcFunction(
const LuaReference& ref) {
140 m_totalWifePointsCalcFunc = ref;
143 m_mineScoringFunc = ref;
145 void SetHoldNoteScoringFunction(
const LuaReference& ref) {
146 m_holdNoteScoreScoringFunc = ref;
149 m_tapScoringFunc = ref;
151 void SetOffsetJudgingFunction(
const LuaReference& ref) {
152 m_offsetJudgingFunc = ref;
155 m_missWindowFunc = ref;
165 std::unordered_map<std::string, std::pair<unsigned, Replay*>>
175 bool customScoringFunctionsEnabled =
false;
179extern std::shared_ptr<ReplayManager> REPLAYS;
A self-cleaning Lua reference.
Definition LuaReference.h:10
Contains statistics for one stage of play - either one song, or a whole course.
Definition PlayerStageStats.h:19
Definition ReplayManager.h:43
auto CustomMissWindowFunction() -> float
Definition ReplayManager.cpp:725
auto CustomHoldNoteScoreScoringFunction(HoldNoteScore hns) -> float
Definition ReplayManager.cpp:571
auto CustomMineScoringFunction() -> float
Definition ReplayManager.cpp:618
auto CustomOffsetJudgingFunction(float fOffsetSeconds, float timingScale) -> TapNoteScore
Definition ReplayManager.cpp:694
auto CustomTapScoringFunction(float fOffsetSeconds, TapNoteScore tns, float timingScale) -> float
Definition ReplayManager.cpp:532
Replay * GetActiveReplay()
Returns the Replay being watched by the player. Never null.
Definition ReplayManager.cpp:140
void PushSelf(lua_State *L)
Lua.
auto CustomTotalWifePointsCalculation(TapNoteType tnt) -> float
Definition ReplayManager.cpp:651
Replay * InitReplayPlaybackForScore(HighScore *hs, float timingScale=1.F, int startRow=0)
Definition ReplayManager.cpp:115
Replay * GetReplay(const HighScore *hs)
Return the Replay for this HighScore. Never null.
Definition ReplayManager.cpp:17
The high score that is earned by a player.
Definition HighScore.h:18
Cached song statistics.
Definition RadarValues.h:14
Definition ReplayManager.h:16