Skip to content

Commit

Permalink
add genericskillset, reset lazy_jacks, dont scale ms based ss | 510
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Sep 3, 2023
1 parent 6f655ce commit 0551a9a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Etterna/MinaCalc/MinaCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,10 @@ Calc::CalcMain(const std::vector<NoteInfo>& NoteInfo,
// for other keymodes
if (keycount != 4u) {
const auto scale = 4.F / static_cast<float>(keycount);
for (auto& v : iteration_skillet_values) {
v *= scale;
for (auto ss = 0; ss < NUM_Skillset; ss++) {
if (ss == Skill_JackSpeed || ss == Skill_Technical)
continue;
iteration_skillet_values[ss] *= scale;
}
}

Expand Down Expand Up @@ -947,7 +949,7 @@ MinaSDCalcDebug(
#endif
}

int mina_calc_version = 509;
int mina_calc_version = 510;
auto
GetCalcVersion() -> int
{
Expand Down
9 changes: 9 additions & 0 deletions src/Etterna/MinaCalc/SequencedBaseDiffCalc.h
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,12 @@ struct jack_col
last_note_sec = s_init;
start_note_sec = s_init;
}
inline void check_reset(const float& now) {
auto since_last = ms_from(now, last_note_sec);
if (since_last > guaranteed_reset_buffer_ms) {
reset();
}
}
inline void operator()(const float& now)
{
last_ms = ms_from(now, last_note_sec);
Expand Down Expand Up @@ -963,6 +969,9 @@ struct oversimplified_jacks
void operator()(const int& column,
const float& now)
{
for (auto& seq : sequencers) {
seq.check_reset(now);
}
sequencers.at(column)(now);
}

Expand Down
8 changes: 8 additions & 0 deletions src/Etterna/Models/NoteData/NoteDataStructures.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ enum Skillset
Skillset_Invalid,
};

// basically these are name shadows for the JS and HS skillsets
// since JS and HS dont really "work" for things like 7k
enum GenericSkillset
{
Skill_Chordstream = Skill_Jumpstream,
Skill_Bracketing = Skill_Handstream,
};

// we do actually want to register these with lua i guess
enum CalcPatternMod
{
Expand Down

0 comments on commit 0551a9a

Please sign in to comment.