Skip to content

Commit

Permalink
calc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Dec 27, 2016
1 parent ebb91de commit c8a7c79
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
Binary file modified extern/MinaCalc/MinaCalc.lib
Binary file not shown.
34 changes: 20 additions & 14 deletions src/MinaCalc.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#define PRINTF(a,b)
#include "global.h"
#include "GameState.h"
#include "RageUtil.h"
Expand Down Expand Up @@ -61,30 +62,33 @@ class Hand {
player skill level for which the player's stamina begins to wane. Experience in both
gameplay and algorithm testing has shown the appropriate value to be around 0.8. The
multiplier is scaled to the proportionate difference in player skill. */
vector<float> StamAdjust(float x);
vector<float> StamAdjust(float x, vector<float> diff);

/* For a given player skill level x, invokes the function used by wife scoring to
assert the average of the distribution of point gain for each interval and then
tallies up the result to produce an average total number of points achieved by this
hand. */
float CalcInternal(float x, bool stam);
float CalcInternal(float x, bool stam, bool nps);

vector<float> ohjumpscale;
vector<float> rollscale;
vector<float> hsscale;
vector<float> jumpscale;

vector<int> v_itvpoints; // Point allotment for each interval

private:
const bool SmoothDifficulty = false; // Do we moving average the difficulty intervals?
vector<float> v_itvdiff; // Calculated difficulty for each interval
const bool SmoothDifficulty = true; // Do we moving average the difficulty intervals?
vector<float> v_itvNPSdiff; // Calculated difficulty for each interval
vector<float> v_itvMSdiff; // Calculated difficulty for each interval
float timingscale; // Timingscale for use in the point proportion function
float finalscaler = 2.564f; // multiplier to standardize baselines
float finalscaler = 2.564f*1.05f * 1.07f * 1.03f; // multiplier to standardize baselines

// Stamina Model params
const float ceil = 1.15f; // stamina multiplier max
const float mag = 225.f; // multiplier generation scaler
const float fscale = 2000; // how fast the floor rises (it's lava)
const float prop = 0.8f; // proportion of player difficulty at which stamina tax begins
// Stamina Model params
const float ceil = 1.1f; // stamina multiplier max
const float mag = 200.f; // multiplier generation scaler
const float fscale = 1800.f; // how fast the floor rises (it's lava)
const float prop = 0.80f; // proportion of player difficulty at which stamina tax begins
};

class Calc {
Expand Down Expand Up @@ -126,16 +130,17 @@ class Calc {
until the percentage obtained is greater than or equal to the scoregoal variable. The output
accuracy resolution can be set by either reducing the initial increment or by increasing the
starting iteration. */
float Chisel(float pskill, float res, int iter, bool stam, bool jack);
float Chisel(float pskill, float res, int iter, bool stam, bool jack, bool nps);

vector<float> OHJumpDownscaler(NoteData & nd, int t1, int t2);
vector<float> HSDownscaler(NoteData & nd);
vector<float> JumpDownscaler(NoteData & nd);
vector<float> RollDownscaler(Finger f1, Finger f2);
private:
vector<vector<int>> nervIntervals;

// Const calc params
const bool SmoothPatterns = false; // Do we moving average the pattern modifier intervals?

const bool SmoothPatterns = true; // Do we moving average the pattern modifier intervals?
const float IntervalSpan = 0.5f; // Intervals of time we slice the chart at

Hand* left = new Hand;
Expand All @@ -148,4 +153,5 @@ class Calc {
};

MINACALC_API vector<float> MinaSDCalc(NoteData& nd, vector<float>& etaner, float musicrate, float goal, float timingscale, bool negbpms);
MINACALC_API MinaSD MinaSDCalc(NoteData& nd, vector<float>& etaner, float goal, float timingscale, bool negbpms);
MINACALC_API MinaSD MinaSDCalc(NoteData& nd, vector<float>& etaner, float goal, float timingscale, bool negbpms);
MINACALC_API float GetCalcVersion();
4 changes: 2 additions & 2 deletions src/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2118,7 +2118,7 @@ void Profile::ResetSSRs(bool OnlyOld) {
HighScoresForASteps& zz = j->second;
vector<HighScore>& hsv = zz.hsl.vHighScores;
for (size_t i = 0; i < hsv.size(); i++) {
if (OnlyOld && hsv[i].GetSSRCalcVersion() == 1.1f)
if (OnlyOld && hsv[i].GetSSRCalcVersion() == GetCalcVersion())
continue;

hsv[i].SetSSR(0.f);
Expand Down Expand Up @@ -2148,7 +2148,7 @@ void Profile::RecalculateSSRs(bool OnlyOld) {
if (wifescore == 0.f || hsv[i].GetGrade() == Grade_Failed)
hsv[i].SetSSR(0.f);
else {
if (OnlyOld && hsv[i].GetSSRCalcVersion() == 1.1f)
if (OnlyOld && hsv[i].GetSSRCalcVersion() == GetCalcVersion())
continue;

Song* psong = id.ToSong();
Expand Down

0 comments on commit c8a7c79

Please sign in to comment.