Skip to content

Commit

Permalink
give lua access to notedata numcols from steps objects
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Nov 24, 2018
1 parent a721e49 commit 86e7401
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Steps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ Steps::GetCNPSVector(NoteData& nd, vector<int> nerv, vector<float> etaner, int c
int curinterval = 0;

for (size_t i = 0; i < nerv.size(); ++i) {
curinterval = static_cast<int>(etaner[i]);
curinterval = static_cast<int>(etaner[i] / rate);
if (curinterval > lastinterval) {
doot[lastinterval] = chordnotecounter;
chordnotecounter = 0;
Expand Down Expand Up @@ -925,7 +925,11 @@ class LunaSteps : public Luna<Steps>
p->GetTimingData()->UnsetEtaner();
return 1;
}

static int GetNumColumns(T* p, lua_State* L)
{
lua_pushnumber(L, p->GetNoteData().GetNumTracks());
return 1;
}
LunaSteps()
{
ADD_METHOD(GetAuthorCredit);
Expand Down Expand Up @@ -955,6 +959,7 @@ class LunaSteps : public Luna<Steps>
ADD_METHOD(GetDisplayBPMType);
ADD_METHOD(GetRelevantSkillsetsByMSDRank);
ADD_METHOD(GetCDGraphVectors);
ADD_METHOD(GetNumColumns);
}
};

Expand Down

0 comments on commit 86e7401

Please sign in to comment.