35 PlayerNumber masterPlayerNumber;
45 void ResetPlayer(PlayerNumber pn);
46 void ResetPlayerOptions(PlayerNumber pn);
48 void ApplyGameCommand(
const std::string& sCommand,
49 PlayerNumber pn = PLAYER_INVALID);
52 void JoinPlayer(PlayerNumber pn);
53 void UnjoinPlayer(PlayerNumber pn);
54 auto JoinInput(PlayerNumber pn) -> bool;
55 auto JoinPlayers() -> bool;
56 void LoadProfiles(
bool bLoadEdits =
true);
57 void SavePlayerProfile();
58 auto HaveProfileToLoad() -> bool;
59 auto HaveProfileToSave() -> bool;
60 void AddStageToPlayer(PlayerNumber pn);
61 void LoadCurrentSettingsFromProfile(PlayerNumber pn);
68 [[nodiscard]]
auto GetDefaultSong()
const ->
Song*;
70 auto CanSafelyEnterGameplay(std::string& reason) -> bool;
71 void SetCompatibleStylesForPlayers();
72 void ForceOtherPlayersToCompatibleSteps(PlayerNumber main);
74 void Update(
float fDelta);
90 Style const* m_SeparatedStyles[NUM_PlayerNumber];
97 MultiPlayerStatus m_MultiPlayerStatus[NUM_MultiPlayer];
99 bool m_bPlayingMulti =
false;
100 int m_iNumMultiplayerNoteFields;
101 auto ChangePreferredDifficultyAndStepsType(PlayerNumber pn,
103 StepsType st) -> bool;
104 auto ChangePreferredDifficulty(PlayerNumber pn,
int dir) -> bool;
105 [[nodiscard]]
auto GetClosestShownDifficulty(PlayerNumber pn)
const
107 [[nodiscard]]
auto GetEasiestStepsDifficulty() const -> Difficulty;
108 [[nodiscard]] auto GetHardestStepsDifficulty() const -> Difficulty;
115 int m_iGameSeed, m_iStageSeed;
117 void SetNewStageSeed();
124 [[nodiscard]] auto GetCurrentGame() const -> const
Game*;
125 [[nodiscard]] auto GetCurrentStyle(PlayerNumber pn) const -> const
Style*;
126 void SetCurrentStyle(const
Style* style, PlayerNumber pn);
127 auto SetCompatibleStyle(StepsType stype, PlayerNumber pn) ->
bool;
129 [[nodiscard]] auto IsPlayerEnabled(PlayerNumber pn) const ->
bool;
130 [[nodiscard]] auto IsMultiPlayerEnabled(MultiPlayer mp) const ->
bool;
131 auto IsPlayerEnabled(const
PlayerState* pPlayerState) const ->
bool;
132 [[nodiscard]] auto GetNumPlayersEnabled() const ->
int;
138 [[nodiscard]] auto
IsHumanPlayer(PlayerNumber pn) const ->
bool;
139 [[nodiscard]] auto GetNumHumanPlayers() const ->
int;
140 [[nodiscard]] auto GetFirstHumanPlayer() const -> PlayerNumber;
141 [[nodiscard]] auto GetFirstDisabledPlayer() const -> PlayerNumber;
142 [[nodiscard]] auto IsCpuPlayer(PlayerNumber pn) const ->
bool;
143 [[nodiscard]] auto AnyPlayersAreCpu() const ->
bool;
166 m_sPreferredSongGroup;
167 bool m_bFailTypeWasExplicitlySet;
172 SortOrder m_PreferredSortOrder;
174 int m_iNumStagesOfThisSong;
176 bool m_bInNetGameplay = false;
189 std::
string sExpandedSectionName;
190 std::
string m_sLastSongGroup;
192 static auto GetNumStagesMultiplierForSong(const
Song* pSong) ->
int;
193 [[nodiscard]] auto GetNumStagesForCurrentSongAndStepsOrCourse() const
198 void CommitStageStats();
200 [[nodiscard]] auto GetCourseSongIndex() const ->
int;
201 [[nodiscard]] auto GetPlayerDisplayName(PlayerNumber pn) const
204 bool m_bLoadingNextSong;
205 [[nodiscard]] auto GetLoadingCourseSongIndex() const ->
int;
207 static auto GetEtternaVersion() -> std::
string {
return "0.74.4"; }
213 std::vector<float> timingscales = { 1.00F, 1.00F, 1.00F, 1.00F, 0.84F,
214 0.66F, 0.50F, 0.33F, 0.20F };
215 bool isplaylistcourse =
false;
216 [[nodiscard]]
auto IsPlaylistCourse() const ->
bool
218 return isplaylistcourse;
220 auto CountNotesSeparately() -> bool;
228 Song* m_pPreferredSong;
237 void GetAllUsedNoteSkins(std::vector<std::string>& out)
const;
239 static const float MUSIC_SECONDS_INVALID;
241 void ResetMusicStatistics();
243 void SetPaused(
bool p) { m_paused = p; }
244 [[nodiscard]]
auto GetPaused() const ->
bool {
return m_paused; }
245 void UpdateSongPosition(
float fPositionSeconds,
247 const RageTimer& timestamp = RageZeroTimer);
248 [[nodiscard]]
auto GetSongPercent(
float beat)
const -> float;
250 [[nodiscard]]
auto AllAreInDangerOrWorse() const ->
bool;
251 [[nodiscard]] auto OneIsHot() const ->
bool;
255 float m_DanceDuration;
272 void ResetToDefaultSongOptions(ModsLevel l);
273 void ApplyPreferredModifiers(PlayerNumber pn,
274 const std::string& sModifiers);
275 void ApplyStageModifiers(PlayerNumber pn,
const std::string& sModifiers);
277 auto CurrentOptionsDisqualifyPlayer(PlayerNumber pn) -> bool;
278 auto PlayerIsUsingModifier(PlayerNumber pn,
const std::string& sModifier)
281 auto GetPlayerFailType(
const PlayerState* pPlayerState)
const -> FailType;
283 [[nodiscard]]
auto GetNumSidesJoined() const ->
int;
289 auto GetNumCols(
int pn) ->
int;
297 bool m_bTemporaryEventMode;
298 [[nodiscard]] auto IsEventMode() const ->
bool;
308 auto GetEditLocalProfile() ->
Profile*;
312 [[nodiscard]]
auto GetGameplayMode() const -> GameplayMode
314 return m_gameplayMode;
316 void TogglePracticeModeSafe(
bool set);
317 void TogglePracticeMode(
bool set);
318 auto IsPracticeMode() -> bool;
321 bool m_bRestartedGameplay;
323 std::string ProgramHash{};
327 void updateDiscordPresence(
const std::string& largeImageText,
328 const std::string& details,
329 const std::string& state,
331 void updateDiscordPresenceMenu(
const std::string& largeImageText);
334 void PushSelf(lua_State* L);
340 float m_LastPositionSeconds;