Skip to content

Commit

Permalink
actually load v1s in v2 folder
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 19, 2020
1 parent 393da39 commit 780cc58
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/Etterna/Models/Misc/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,13 @@ HighScore::WriteInputData(const vector<float>& oop)
bool
HighScore::LoadReplayData()
{ // see dir definition comments at the top -mina
if (LoadReplayDataFull())
if (LoadReplayDataFull(FULL_REPLAY_DIR))
return true;
return LoadReplayDataBasic();
return LoadReplayDataBasic(BASIC_REPLAY_DIR);
}

bool
HighScore::LoadReplayDataBasic()
HighScore::LoadReplayDataBasic(string dir)
{
// already exists
if (m_Impl->vNoteRowVector.size() > 4 && m_Impl->vOffsetVector.size() > 4)
Expand All @@ -473,7 +473,7 @@ HighScore::LoadReplayDataBasic()
string profiledir;
vector<int> vNoteRowVector;
vector<float> vOffsetVector;
string path = BASIC_REPLAY_DIR + m_Impl->ScoreKey;
string path = dir + m_Impl->ScoreKey;

std::ifstream fileStream(path, ios::binary);
string line;
Expand Down Expand Up @@ -540,7 +540,7 @@ HighScore::LoadReplayDataBasic()
}

bool
HighScore::LoadReplayDataFull()
HighScore::LoadReplayDataFull(string dir)
{
if (m_Impl->vNoteRowVector.size() > 4 && m_Impl->vOffsetVector.size() > 4 &&
m_Impl->vTrackVector.size() > 4) {
Expand All @@ -554,7 +554,7 @@ HighScore::LoadReplayDataFull()
vector<int> vTrackVector;
vector<TapNoteType> vTapNoteTypeVector;
vector<HoldReplayResult> vHoldReplayDataVector;
string path = FULL_REPLAY_DIR + m_Impl->ScoreKey;
string path = dir + m_Impl->ScoreKey;

std::ifstream fileStream(path, ios::binary);
string line;
Expand Down
4 changes: 2 additions & 2 deletions src/Etterna/Models/Misc/HighScore.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ struct HighScore
bool WriteReplayData();
bool WriteInputData(const vector<float>& oop);
bool LoadReplayData();
bool LoadReplayDataBasic();
bool LoadReplayDataFull();
bool LoadReplayDataBasic(string dir);
bool LoadReplayDataFull(string dir);
virtual bool HasReplayData();
void UnloadReplayData();
void ResetSkillsets();
Expand Down

0 comments on commit 780cc58

Please sign in to comment.