Skip to content

Commit

Permalink
finish moving to new templated thing for cc_ms_any
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jun 4, 2020
1 parent 8912831 commit ac267b2
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/Etterna/Globals/MinaCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1251,8 +1251,8 @@ struct CalcWindow
}

// return type T
inline T get_now() const { return _itv_vals[max_moving_window_size - 1] }
inline T get_last() const { return _itv_vals[max_moving_window_size - 2] }
inline T get_now() const { return _itv_vals[max_moving_window_size - 1]; }
inline T get_last() const { return _itv_vals[max_moving_window_size - 2]; }

// return type T
inline T get_total_for_window(const int& window)
Expand Down Expand Up @@ -2040,7 +2040,7 @@ struct metaHandInfo
}

inline void operator()(const metaHandInfo& last,
const CalcWindow<float>& _mw_cc_ms_any,
CalcWindow<float>& _mw_cc_ms_any,
const float& now,
const col_type& ct,
const unsigned& notes)
Expand All @@ -2056,6 +2056,8 @@ struct metaHandInfo
col_time[col_right] = last.col_time[col_right];
col_time_no_jumps[col_left] = last.col_time_no_jumps[col_left];
col_time_no_jumps[col_right] = last.col_time_no_jumps[col_right];



// update this hand's cc type for this row
set_cc_type();
Expand All @@ -2076,7 +2078,11 @@ struct metaHandInfo

// we will need to update time for one or both cols
update_col_times(now);
set_timings(last.col_time, last.col_time_no_jumps);
set_timings(last.col_time, last.col_time_no_jumps);

// keep track of these ms values here so we aren't doing it in
// potentially 5 different pattern mods
_mw_cc_ms_any(cc_ms_any);
}
};

Expand Down Expand Up @@ -3822,8 +3828,6 @@ struct ChaosMod
CalcWindow<float> _u;
CalcWindow<float> _wot;
CalcWindow<float> _m8;
CalcWindow<float> _hekk;

float pmod = min_mod;

#pragma region generic functions
Expand Down Expand Up @@ -3908,10 +3912,10 @@ struct ChaosMod
vector<float> doot[],
const int& i)
{
_hekk(_m8.get_mean_of_window(6));
_m8(_wot.get_mean_of_window(max_moving_window_size));

float zmod = _hekk.get_mean_of_window(window);
pmod = base + _m8.get_mean_of_window(6);
float zmod = _m8.get_mean_of_window(window);
pmod = base + _wot.get_mean_of_window(max_moving_window_size);
pmod = CalcClamp(pmod, min_mod, max_mod);
doot[_pmod][i] = pmod;
}
Expand Down

0 comments on commit ac267b2

Please sign in to comment.