Skip to content

Commit

Permalink
use ints instead of floats for calc version
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 29, 2017
1 parent de625f6 commit 809ad61
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Binary file modified extern/MinaCalc/MinaCalc.lib
Binary file not shown.
9 changes: 4 additions & 5 deletions src/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct HighScoreImpl
string ChartKey;

string ScoreKey;
float SSRCalcVersion;
int SSRCalcVersion;
Grade grade;
unsigned int iScore;
float fPercentDP;
Expand Down Expand Up @@ -211,7 +211,7 @@ HighScoreImpl::HighScoreImpl()
sName = "";
ChartKey = "";
ScoreKey = "";
SSRCalcVersion = 0.f;
SSRCalcVersion = 0;
grade = Grade_NoData;
iScore = 0;
fPercentDP = 0.f;
Expand Down Expand Up @@ -589,7 +589,7 @@ bool HighScore::IsEmpty() const

string HighScore::GetName() const { return m_Impl->sName; }
string HighScore::GetChartKey() const { return m_Impl->ChartKey; }
float HighScore::GetSSRCalcVersion() const { return m_Impl->SSRCalcVersion; }
int HighScore::GetSSRCalcVersion() const { return m_Impl->SSRCalcVersion; }
Grade HighScore::GetGrade() const { return m_Impl->grade; }
unsigned int HighScore::GetScore() const { return m_Impl->iScore; }
unsigned int HighScore::GetMaxCombo() const { return m_Impl->iMaxCombo; }
Expand Down Expand Up @@ -622,7 +622,7 @@ bool HighScore::GetDisqualified() const { return m_Impl->bDisqualified; }

void HighScore::SetName( const string &sName ) { m_Impl->sName = sName; }
void HighScore::SetChartKey( const string &ck) { m_Impl->ChartKey = ck; }
void HighScore::SetSSRCalcVersion(float cv) { m_Impl->SSRCalcVersion = cv; }
void HighScore::SetSSRCalcVersion(int cv) { m_Impl->SSRCalcVersion = cv; }
void HighScore::SetGrade( Grade g ) { m_Impl->grade = g; }
void HighScore::SetScore( unsigned int iScore ) { m_Impl->iScore = iScore; }
void HighScore::SetMaxCombo( unsigned int i ) { m_Impl->iMaxCombo = i; }
Expand Down Expand Up @@ -924,7 +924,6 @@ float HighScore::RescoreToWifeJudge(int x) {
p += (m_Impl->iHoldNoteScores[HNS_LetGo] + m_Impl->iHoldNoteScores[HNS_Missed]) * -6.f;
p += m_Impl->iTapNoteScores[TNS_HitMine] * -8.f;

//UnloadReplayData();
return p / static_cast<float>(m_Impl->vOffsetVector.size() * 2);
}

Expand Down
4 changes: 2 additions & 2 deletions src/HighScore.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct HighScore
* @return the name of the player. */
string GetName() const;
string GetChartKey() const;
float GetSSRCalcVersion() const;
int GetSSRCalcVersion() const;
/**
* @brief Retrieve the grade earned from this score.
* @return the grade.
Expand Down Expand Up @@ -81,7 +81,7 @@ struct HighScore
* @param sName the name of the Player. */
void SetName( const string &sName );
void SetChartKey( const string &ck );
void SetSSRCalcVersion(float cv);
void SetSSRCalcVersion(int cv);
void SetGrade( Grade g );
void SetScore( unsigned int iScore );
void SetPercentDP( float f );
Expand Down
2 changes: 1 addition & 1 deletion src/MinaCalc.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,5 @@ class Calc {

MINACALC_API vector<float> MinaSDCalc(const vector<NoteInfo>& NoteInfo, int numTracks, float musicrate, float goal, float timingscale, bool negbpms);
MINACALC_API MinaSD MinaSDCalc(const vector<NoteInfo>& NoteInfo, int numTracks, float goal, float timingscale, bool negbpms);
MINACALC_API float GetCalcVersion();
MINACALC_API int GetCalcVersion();
MINACALC_API string GenerateWeakValidationKey(const int* tns, const int* hns);

0 comments on commit 809ad61

Please sign in to comment.