Skip to content

Commit 132e2c8

Browse files
add back basic debug output
1 parent 300de5b commit 132e2c8

File tree

2 files changed

+37
-33
lines changed

2 files changed

+37
-33
lines changed

src/Etterna/Globals/MinaCalc.cpp

+34-32
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Calc::CalcMain(const vector<NoteInfo>& NoteInfo,
192192
// processing
193193
if (!continue_calc) {
194194
std::cout << "skipping junk file" << std::endl;
195-
return gertrude_the_all_max_output;
195+
return dimples_the_all_zero_output;
196196
}
197197

198198
TotalMaxPoints();
@@ -378,33 +378,39 @@ Calc::InitializeHands(const vector<NoteInfo>& NoteInfo,
378378
r_hand.InitAdjDiff();
379379

380380
// post pattern mod smoothing for cj
381-
Smooth(base_adj_diff.at(left_hand).at(Skill_Chordjack), 1.f, numitv);
382-
Smooth(base_adj_diff.at(right_hand).at(Skill_Chordjack), 1.f, numitv);
381+
Smooth(base_adj_diff.at(left_hand).at(Skill_Chordjack), 1.F, numitv);
382+
Smooth(base_adj_diff.at(right_hand).at(Skill_Chordjack), 1.F, numitv);
383383

384-
//// debug info loop
385-
// if (debugmode) {
386-
// for (auto& hp : spoopy) {
387-
// auto& hand = hp.first;
384+
std::pair<Hand&, int> spoopy[2] = { { l_hand, 0 }, { r_hand, 1 } };
388385

389-
// // pattern mods and base msd never change, set degbug output
390-
// // for them now
386+
// debug info loop
387+
if (debugmode) {
388+
for (auto& hp : spoopy) {
389+
auto& hand = hp.first;
391390

392-
// // 3 = number of different debug types
393-
// hand.debugValues.resize(3);
394-
// hand.debugValues[0].resize(ModCount);
395-
// hand.debugValues[1].resize(NUM_CalcDiffValue);
396-
// hand.debugValues[2].resize(NUM_CalcDebugMisc);
391+
// pattern mods and base msd never change, set degbug output
392+
// for them now
397393

398-
// for (int i = 0; i < ModCount; ++i) {
399-
// hand.debugValues[0][i] = doot.at(hp.second).at(i);
400-
// }
394+
// 3 = number of different debug types
395+
hand.debugValues.resize(3);
396+
hand.debugValues[0].resize(NUM_CalcPatternMod);
397+
hand.debugValues[1].resize(NUM_CalcDiffValue);
398+
hand.debugValues[2].resize(NUM_CalcDebugMisc);
401399

402-
// // set everything but final adjusted output here
403-
// for (int i = 0; i < NUM_CalcDiffValue - 1; ++i) {
404-
// hand.debugValues[1][i] = hand.soap.at(hi).at(i];
405-
// }
406-
// }
407-
//}
400+
for (int j = 0; j < numitv; ++j) {
401+
for (int i = 0; i < NUM_CalcPatternMod; ++i) {
402+
hand.debugValues[0][i].push_back(
403+
doot.at(hp.second).at(i).at(j));
404+
}
405+
406+
// set everything but final adjusted output here
407+
for (int i = 0; i < NUM_CalcDiffValue - 1; ++i) {
408+
hand.debugValues[1][i].push_back(
409+
soap.at(hp.second).at(i).at(j));
410+
}
411+
}
412+
}
413+
}
408414
return true;
409415
}
410416

@@ -605,21 +611,13 @@ Hand::InitAdjDiff()
605611
switch (ss) {
606612
// do funky special case stuff here
607613
case Skill_Stream:
608-
adj_diff *=
609-
CalcClamp(fastsqrt(doot.at(hi).at(RanMan).at(i) - 0.125F),
610-
1.F,
611-
1.05F);
612614
break;
613615

614616
// test calculating stam for js/hs on max js/hs diff
615617
// we want hs to count against js so they are
616618
// mutually exclusive
617619
case Skill_Jumpstream:
618620
adj_diff /= max(doot.at(hi).at(HS).at(i), 1.F);
619-
adj_diff *=
620-
CalcClamp(fastsqrt(doot.at(hi).at(RanMan).at(i) - 0.125F),
621-
0.98F,
622-
1.06F);
623621
adj_diff /=
624622
fastsqrt(doot.at(hi).at(OHJumpMod).at(i) * 0.95F);
625623

@@ -669,7 +667,11 @@ Hand::InitAdjDiff()
669667
// using the final difficulty as the starting point and should only
670668
// be executed once per chisel
671669
void
672-
Hand::CalcInternal(float& gotpoints, float& x, int ss, bool stam, bool debug)
670+
Hand::CalcInternal(float& gotpoints,
671+
float& x,
672+
int ss,
673+
bool stam,
674+
bool /*debug*/)
673675
{
674676

675677
if (stam && ss != Skill_JackSpeed) {

src/Etterna/Globals/MinaCalc/UlbuAcolytes.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ enum hands
1515

1616
static const std::string calc_params_xml = "Save/calc params.xml";
1717
static const std::array<unsigned, num_hands> hand_col_ids = { 3, 12 };
18-
static const int max_intervals = 20000;
18+
19+
// should be able to handle 1hr 54min easily
20+
static const int max_intervals = 40000;
1921

2022
// holds pattern mods
2123
static thread_local std::array<

0 commit comments

Comments
 (0)