From 5ce77e005824fc26856439743bd19d7377353eda Mon Sep 17 00:00:00 2001 From: Barinade Date: Sat, 15 Oct 2022 14:29:50 -0500 Subject: [PATCH] remove playerai --- src/Etterna/Actor/Gameplay/Player.cpp | 1 - src/Etterna/Actor/Gameplay/PlayerReplay.cpp | 1 - src/Etterna/Models/CMakeLists.txt | 2 -- src/Etterna/Models/Misc/PlayerAI.cpp | 19 ------------------ src/Etterna/Models/Misc/PlayerAI.h | 20 ------------------- src/Etterna/Models/Misc/StageStats.cpp | 1 - .../Screen/Gameplay/ScreenGameplay.cpp | 13 ++++++------ .../Screen/Gameplay/ScreenGameplayReplay.cpp | 1 - .../Screen/Others/ScreenEvaluation.cpp | 2 +- .../Screen/Others/ScreenSelectMusic.cpp | 11 +++++----- 10 files changed, 12 insertions(+), 59 deletions(-) delete mode 100644 src/Etterna/Models/Misc/PlayerAI.cpp delete mode 100644 src/Etterna/Models/Misc/PlayerAI.h diff --git a/src/Etterna/Actor/Gameplay/Player.cpp b/src/Etterna/Actor/Gameplay/Player.cpp index 49d76fccc9..30db1f8d7a 100644 --- a/src/Etterna/Actor/Gameplay/Player.cpp +++ b/src/Etterna/Actor/Gameplay/Player.cpp @@ -15,7 +15,6 @@ #include "Etterna/Models/NoteData/NoteDataWithScoring.h" #include "NoteField.h" #include "Player.h" -#include "Etterna/Models/Misc/PlayerAI.h" #include "Etterna/Models/Misc/PlayerState.h" #include "Etterna/Singletons/PrefsManager.h" #include "Etterna/Models/Misc/Profile.h" diff --git a/src/Etterna/Actor/Gameplay/PlayerReplay.cpp b/src/Etterna/Actor/Gameplay/PlayerReplay.cpp index 6e2dca2e17..4bfe6f018a 100644 --- a/src/Etterna/Actor/Gameplay/PlayerReplay.cpp +++ b/src/Etterna/Actor/Gameplay/PlayerReplay.cpp @@ -1,5 +1,4 @@ #include "Etterna/Globals/global.h" -#include "Etterna/Models/Misc/PlayerAI.h" #include "Etterna/Models/Misc/PlayerState.h" #include "ArrowEffects.h" #include "NoteField.h" diff --git a/src/Etterna/Models/CMakeLists.txt b/src/Etterna/Models/CMakeLists.txt index e838635ef0..99e04ca146 100644 --- a/src/Etterna/Models/CMakeLists.txt +++ b/src/Etterna/Models/CMakeLists.txt @@ -129,7 +129,6 @@ list(APPEND REST_SRC "Misc/ModsGroup.cpp" "Misc/NoteTypes.cpp" "Misc/OptionRowHandler.cpp" - "Misc/PlayerAI.cpp" "Misc/PlayerInfo.cpp" "Misc/PlayerNumber.cpp" "Misc/PlayerOptions.cpp" @@ -179,7 +178,6 @@ list(APPEND REST_HPP "Misc/ModsGroup.h" "Misc/NoteTypes.h" "Misc/OptionRowHandler.h" - "Misc/PlayerAI.h" "Misc/PlayerInfo.h" "Misc/PlayerNumber.h" "Misc/PlayerOptions.h" diff --git a/src/Etterna/Models/Misc/PlayerAI.cpp b/src/Etterna/Models/Misc/PlayerAI.cpp deleted file mode 100644 index cad25f99dc..0000000000 --- a/src/Etterna/Models/Misc/PlayerAI.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "Etterna/Globals/global.h" -#include "Etterna/Singletons/GameState.h" -#include "Etterna/Actor/Gameplay/Player.h" -#include "PlayerAI.h" -#include "PlayerState.h" -#include "RageUtil/Utils/RageUtil.h" -#include "RadarValues.h" -#include "PlayerStageStats.h" -#include "Etterna/Models/StepsAndStyles/Style.h" -#include "Etterna/Actor/Gameplay/LifeMeterBar.h" -#include "Etterna/Models/NoteData/NoteDataUtil.h" -#include "Etterna/Models/Misc/GameConstantsAndTypes.h" -#include "Core/Services/Locator.hpp" - -#include -#include -#include - - diff --git a/src/Etterna/Models/Misc/PlayerAI.h b/src/Etterna/Models/Misc/PlayerAI.h deleted file mode 100644 index d15d89e496..0000000000 --- a/src/Etterna/Models/Misc/PlayerAI.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef PlayerAI_H -#define PlayerAI_H - -#include "GameConstantsAndTypes.h" -#include "Etterna/Models/HighScore/HighScore.h" -#include "PlayerStageStats.h" -#include "Etterna/Actor/Gameplay/Player.h" - -class NoteData; -class PlayerState; -class TimingData; - -class PlayerAI -{ - - - -}; - -#endif diff --git a/src/Etterna/Models/Misc/StageStats.cpp b/src/Etterna/Models/Misc/StageStats.cpp index 0f1dbbf755..ceafed4d19 100644 --- a/src/Etterna/Models/Misc/StageStats.cpp +++ b/src/Etterna/Models/Misc/StageStats.cpp @@ -8,7 +8,6 @@ #include "Etterna/Singletons/ProfileManager.h" #include "StageStats.h" #include "Etterna/Models/StepsAndStyles/Style.h" -#include "PlayerAI.h" #include "Etterna/Singletons/NetworkSyncManager.h" #include "AdjustSync.h" #include "Etterna/Singletons/ScoreManager.h" diff --git a/src/Etterna/Screen/Gameplay/ScreenGameplay.cpp b/src/Etterna/Screen/Gameplay/ScreenGameplay.cpp index 715732e5c4..51bef1f881 100644 --- a/src/Etterna/Screen/Gameplay/ScreenGameplay.cpp +++ b/src/Etterna/Screen/Gameplay/ScreenGameplay.cpp @@ -18,7 +18,6 @@ #include "Etterna/Models/NoteData/NoteDataUtil.h" #include "Etterna/Models/NoteData/NoteDataWithScoring.h" #include "Etterna/Actor/Gameplay/Player.h" -#include "Etterna/Models/Misc/PlayerAI.h" #include "Etterna/Models/Misc/PlayerState.h" #include "Etterna/Singletons/PrefsManager.h" #include "Etterna/Models/Misc/Profile.h" @@ -42,7 +41,7 @@ #include "Etterna/Singletons/DownloadManager.h" #include "Etterna/Singletons/ScoreManager.h" #include "Etterna/Models/Misc/PlayerInfo.h" -#include "Etterna/Models/Songs/SongOptions.h" +#include "Etterna/Models/Songs/SongOptions.h" #include "Etterna/Singletons/ReplayManager.h" #include @@ -461,14 +460,14 @@ ScreenGameplay::SetupNoteDataFromRow(Steps* pSteps, int row) m_vPlayerInfo.m_SoundEffectControl.Load( sType, m_vPlayerInfo.GetPlayerState(), &m_vPlayerInfo.m_NoteData); } -} - +} + void ScreenGameplay::ReloadPlayer() { m_vPlayerInfo.m_pPlayer->Reload(); -} - +} + void ScreenGameplay::LoadPlayer() { @@ -1322,7 +1321,7 @@ ScreenGameplay::Input(const InputEventPlus& input) -> bool bHoldingGiveUp |= (input.MenuI == GAME_BUTTON_START); } - // Exiting gameplay by holding Start (Forced Fail) + // Exiting gameplay by holding Start (Forced Fail) // Never allow holding start in Practice Mode if (bHoldingGiveUp && !GAMESTATE->IsPracticeMode() && PREFSMAN->m_AllowStartToGiveUp) { diff --git a/src/Etterna/Screen/Gameplay/ScreenGameplayReplay.cpp b/src/Etterna/Screen/Gameplay/ScreenGameplayReplay.cpp index 3da499ed1c..cd96de3fb5 100644 --- a/src/Etterna/Screen/Gameplay/ScreenGameplayReplay.cpp +++ b/src/Etterna/Screen/Gameplay/ScreenGameplayReplay.cpp @@ -10,7 +10,6 @@ #include "Etterna/Models/StepsAndStyles/Style.h" #include "Etterna/Models/Misc/GameConstantsAndTypes.h" #include "Etterna/Models/Misc/GamePreferences.h" -#include "Etterna/Models/Misc/PlayerAI.h" #include "Etterna/Models/Misc/PlayerInfo.h" #include "Etterna/Models/Misc/PlayerStageStats.h" #include "Etterna/Models/NoteData/NoteData.h" diff --git a/src/Etterna/Screen/Others/ScreenEvaluation.cpp b/src/Etterna/Screen/Others/ScreenEvaluation.cpp index 31111cd69d..6663e5f335 100644 --- a/src/Etterna/Screen/Others/ScreenEvaluation.cpp +++ b/src/Etterna/Screen/Others/ScreenEvaluation.cpp @@ -23,9 +23,9 @@ #include "Etterna/Models/StepsAndStyles/Steps.h" #include "Etterna/Singletons/ThemeManager.h" #include "Etterna/Models/Misc/GamePreferences.h" -#include "Etterna/Models/Misc/PlayerAI.h" #include "Etterna/Models/NoteData/NoteData.h" #include "Etterna/Singletons/ReplayManager.h" +#include "Etterna/Actor/Gameplay/Player.h" #include "Etterna/Globals/rngthing.h" #define CHEER_DELAY_SECONDS THEME->GetMetricF(m_sName, "CheerDelaySeconds") diff --git a/src/Etterna/Screen/Others/ScreenSelectMusic.cpp b/src/Etterna/Screen/Others/ScreenSelectMusic.cpp index 20e0668de8..b7ee388fc9 100644 --- a/src/Etterna/Screen/Others/ScreenSelectMusic.cpp +++ b/src/Etterna/Screen/Others/ScreenSelectMusic.cpp @@ -32,11 +32,10 @@ #include "Etterna/Singletons/NetworkSyncManager.h" #include "Etterna/Singletons/FilterManager.h" #include "Etterna/Models/Misc/GamePreferences.h" -#include "Etterna/Models/Misc/PlayerAI.h" #include "Etterna/Models/Misc/PlayerOptions.h" #include "Etterna/Models/NoteData/NoteData.h" #include "Etterna/Actor/Gameplay/Player.h" -#include "Etterna/Models/NoteData/NoteDataUtil.h" +#include "Etterna/Models/NoteData/NoteDataUtil.h" #include "Etterna/Singletons/ReplayManager.h" #include @@ -181,8 +180,8 @@ ScreenSelectMusic::Init() THEME->GetPathS(m_sName, "difficulty harder"), false, &SoundParams); m_soundOptionsChange.Load(THEME->GetPathS(m_sName, "options")); m_soundLocked.Load(THEME->GetPathS(m_sName, "locked")); - - REPLAYS->UnsetActiveReplay(); + + REPLAYS->UnsetActiveReplay(); this->SortByDrawOrder(); } @@ -903,7 +902,7 @@ ScreenSelectMusic::ChangeSteps(PlayerNumber pn, int dir) if (!GAMESTATE->ChangePreferredDifficulty(pn, dir)) return; } - + AfterStepsOrTrailChange(); const auto fBalance = GameSoundManager::GetPlayerBalance(pn); @@ -1230,7 +1229,7 @@ ScreenSelectMusic::MenuBack(const InputEventPlus& /* input */) void ScreenSelectMusic::AfterStepsOrTrailChange() -{ +{ // this used to be based on a list of given PlayerNumbers const auto pn = PLAYER_1; ASSERT(GAMESTATE->IsHumanPlayer(pn));