Only store NotesPerMeasure and NpsPerMeasure values per-player if the steps type has different steps per player.
This commit is contained in:
+32
-20
@@ -412,21 +412,27 @@ void SetNpsPerMeasure(StepsTagInfo& info)
|
|||||||
{
|
{
|
||||||
if (info.from_cache || info.for_load_edit)
|
if (info.from_cache || info.for_load_edit)
|
||||||
{
|
{
|
||||||
std::vector<RString> values;
|
|
||||||
split((*info.params)[1], ",", values, true);
|
|
||||||
std::size_t measures_per_player = values.size() / NUM_PlayerNumber;
|
|
||||||
std::vector<std::vector<float>> npsPerMeasure;
|
|
||||||
npsPerMeasure.resize(NUM_PLAYERS);
|
|
||||||
|
|
||||||
FOREACH_PlayerNumber(pn)
|
std::vector<RString> valuesPerPlayer;
|
||||||
|
split((*info.params)[1], "|", valuesPerPlayer, true);
|
||||||
|
|
||||||
|
if(valuesPerPlayer.size() > NUM_PlayerNumber)
|
||||||
{
|
{
|
||||||
npsPerMeasure[pn].resize(measures_per_player, 0);
|
LOG->Warn("#NPSPERMEASURE has more sections (%zu) than possible number of players (%d)!", valuesPerPlayer.size(), NUM_PlayerNumber);
|
||||||
for(std::size_t i= 0; i < measures_per_player; ++i)
|
}
|
||||||
|
|
||||||
|
for(std::size_t pn = 0; pn < valuesPerPlayer.size() && pn < NUM_PlayerNumber; pn++)
|
||||||
{
|
{
|
||||||
npsPerMeasure[pn][i]= StringToFloat(values[pn * measures_per_player + i]);
|
std::vector<RString> values;
|
||||||
|
split(valuesPerPlayer[pn], ",", values, true);
|
||||||
|
std::vector<int> npsPerMeasure;
|
||||||
|
npsPerMeasure.resize(values.size());
|
||||||
|
for(std::size_t i = 0; i < values.size(); i++)
|
||||||
|
{
|
||||||
|
npsPerMeasure[i] = StringToFloat(values[i]);
|
||||||
}
|
}
|
||||||
|
info.steps->SetCachedNotesPerMeasure(npsPerMeasure, static_cast<PlayerNumber>(pn));
|
||||||
}
|
}
|
||||||
info.steps->SetCachedNpsPerMeasure(npsPerMeasure);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -439,21 +445,27 @@ void SetNotesPerMeasure(StepsTagInfo& info)
|
|||||||
{
|
{
|
||||||
if (info.from_cache || info.for_load_edit)
|
if (info.from_cache || info.for_load_edit)
|
||||||
{
|
{
|
||||||
std::vector<RString> values;
|
std::vector<RString> valuesPerPlayer;
|
||||||
split((*info.params)[1], ",", values, true);
|
split((*info.params)[1], "|", valuesPerPlayer, true);
|
||||||
std::size_t measures_per_player = values.size() / NUM_PlayerNumber;
|
|
||||||
std::vector<std::vector<int>> notesPerMeasure;
|
|
||||||
notesPerMeasure.resize(NUM_PLAYERS);
|
|
||||||
|
|
||||||
FOREACH_PlayerNumber(pn)
|
if(valuesPerPlayer.size() > NUM_PlayerNumber)
|
||||||
{
|
{
|
||||||
notesPerMeasure[pn].resize(measures_per_player, 0);
|
LOG->Warn("#NOTESPERMEASURE has more sections (%zu) than possible number of players (%d)!", valuesPerPlayer.size(), NUM_PlayerNumber);
|
||||||
for(std::size_t i= 0; i < measures_per_player; ++i)
|
|
||||||
|
}
|
||||||
|
|
||||||
|
for(std::size_t pn = 0; pn < valuesPerPlayer.size() && pn < NUM_PlayerNumber; pn++)
|
||||||
{
|
{
|
||||||
notesPerMeasure[pn][i]= StringToInt(values[pn * measures_per_player + i]);
|
std::vector<RString> values;
|
||||||
|
split(valuesPerPlayer[pn], ",", values, true);
|
||||||
|
std::vector<int> notesPerMeasure;
|
||||||
|
notesPerMeasure.resize(values.size());
|
||||||
|
for(std::size_t i = 0; i < values.size(); i++)
|
||||||
|
{
|
||||||
|
notesPerMeasure[i] = StringToInt(values[i]);
|
||||||
}
|
}
|
||||||
|
info.steps->SetCachedNotesPerMeasure(notesPerMeasure, static_cast<PlayerNumber>(pn));
|
||||||
}
|
}
|
||||||
info.steps->SetCachedNotesPerMeasure(notesPerMeasure);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
+17
-16
@@ -440,29 +440,30 @@ static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCa
|
|||||||
}
|
}
|
||||||
lines.push_back(ssprintf("#TECHCOUNTS:%s;", join(",", asTechCounts).c_str()));
|
lines.push_back(ssprintf("#TECHCOUNTS:%s;", join(",", asTechCounts).c_str()));
|
||||||
|
|
||||||
std::vector<RString> asNpsPerMeasure;
|
// NpsPerMeasure and NotesPerMeasure are stored differently from Radar Values and Tech Counts,
|
||||||
FOREACH_PlayerNumber(pn)
|
// because the number of measures is variable.
|
||||||
|
// For charts that have different steps per player, each set of values is separated
|
||||||
|
// with pipes "|".
|
||||||
|
// The vast majority of charts don't, so there's no reason to store duplicated data.
|
||||||
|
const std::vector<std::vector<float>> &allNpsPerMeasures = in.GetAllNpsPerMeasures();
|
||||||
|
std::vector<RString> npsPerMeasureStrings;
|
||||||
|
|
||||||
|
for(std::vector<float> npsPerMeasure : allNpsPerMeasures)
|
||||||
{
|
{
|
||||||
const std::vector<float> &npsPerMeasure = in.GetNpsPerMeasure(pn);
|
npsPerMeasureStrings.push_back(serialize(npsPerMeasure, ",", 3));
|
||||||
for(unsigned i = 0; i < npsPerMeasure.size(); i++)
|
|
||||||
{
|
|
||||||
asNpsPerMeasure.push_back(ssprintf("%.3f", npsPerMeasure[i]));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lines.push_back( ssprintf( "#NPSPERMEASURE:%s;", join(",",asNpsPerMeasure).c_str() ) );
|
lines.push_back( ssprintf( "#NPSPERMEASURE:%s;", join("|",npsPerMeasureStrings).c_str() ) );
|
||||||
|
|
||||||
std::vector<RString> asNotesPerMeasure;
|
const std::vector<std::vector<int>> &allNotesPerMeasures = in.GetAllNotesPerMeasures();
|
||||||
FOREACH_PlayerNumber(pn)
|
std::vector<RString> notesPerMeasureStrings;
|
||||||
|
|
||||||
|
for(std::vector<int> notesPerMeasure : allNotesPerMeasures)
|
||||||
{
|
{
|
||||||
const std::vector<int> ¬esPerMeasure = in.GetNotesPerMeasure(pn);
|
notesPerMeasureStrings.push_back(serialize(notesPerMeasure, ","));
|
||||||
for(unsigned i = 0; i < notesPerMeasure.size(); i++)
|
|
||||||
{
|
|
||||||
asNotesPerMeasure.push_back(ssprintf("%d", notesPerMeasure[i]));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lines.push_back( ssprintf( "#NOTESPERMEASURE:%s;", join(",",asNotesPerMeasure).c_str() ) );
|
lines.push_back( ssprintf( "#NOTESPERMEASURE:%s;", join("|",notesPerMeasureStrings).c_str() ) );
|
||||||
|
|
||||||
// NOTE(MV): #STEPFILENAME has to be at the end of the cache tags,
|
// NOTE(MV): #STEPFILENAME has to be at the end of the cache tags,
|
||||||
// because it's used in SSCLoader::LoadFromSimfile to determine when
|
// because it's used in SSCLoader::LoadFromSimfile to determine when
|
||||||
|
|||||||
@@ -721,6 +721,28 @@ RString join( const RString &sDelimitor, std::vector<RString>::const_iterator be
|
|||||||
return sRet;
|
return sRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RString serialize(const std::vector<float> & sSource, const RString &sDelimitor, int precision)
|
||||||
|
{
|
||||||
|
std::vector<RString> values;
|
||||||
|
RString precisionStr = ssprintf("%%.%df", precision);
|
||||||
|
for(float s : sSource)
|
||||||
|
{
|
||||||
|
values.push_back(ssprintf(precisionStr, s));
|
||||||
|
}
|
||||||
|
return join(sDelimitor, values);
|
||||||
|
}
|
||||||
|
|
||||||
|
RString serialize(const std::vector<int> & sSource, const RString &sDelimitor)
|
||||||
|
{
|
||||||
|
std::vector<RString> values;
|
||||||
|
for(int s : sSource)
|
||||||
|
{
|
||||||
|
values.push_back(ssprintf("%d", s));
|
||||||
|
}
|
||||||
|
return join(sDelimitor, values);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
RString SmEscape( const RString &sUnescaped, const std::vector<char> charsToEscape )
|
RString SmEscape( const RString &sUnescaped, const std::vector<char> charsToEscape )
|
||||||
{
|
{
|
||||||
return SmEscape(sUnescaped.c_str(), sUnescaped.size(), charsToEscape);
|
return SmEscape(sUnescaped.c_str(), sUnescaped.size(), charsToEscape);
|
||||||
|
|||||||
@@ -435,6 +435,10 @@ void split( const std::wstring &sSource, const std::wstring &sDelimitor, int &iB
|
|||||||
RString join( const RString &sDelimitor, const std::vector<RString>& sSource );
|
RString join( const RString &sDelimitor, const std::vector<RString>& sSource );
|
||||||
RString join( const RString &sDelimitor, std::vector<RString>::const_iterator begin, std::vector<RString>::const_iterator end );
|
RString join( const RString &sDelimitor, std::vector<RString>::const_iterator begin, std::vector<RString>::const_iterator end );
|
||||||
|
|
||||||
|
// Joins a vector of numbers to a serialized string of numbers separated by Delimitor.
|
||||||
|
RString serialize(const std::vector<float> & sSource, const RString &sDelimitor, int precision);
|
||||||
|
RString serialize(const std::vector<int> & sSource, const RString &sDelimitor);
|
||||||
|
|
||||||
// These methods escapes a string for saving in a .sm or .crs file
|
// These methods escapes a string for saving in a .sm or .crs file
|
||||||
RString SmEscape(const RString &sUnescaped, const std::vector<char> charsToEscape = {'\\', ':', ';'});
|
RString SmEscape(const RString &sUnescaped, const std::vector<char> charsToEscape = {'\\', ':', ';'});
|
||||||
RString SmEscape( const char *cUnescaped, int len, const std::vector<char> charsToEscape = {'\\', ':', ';'} );
|
RString SmEscape( const char *cUnescaped, int len, const std::vector<char> charsToEscape = {'\\', ':', ';'} );
|
||||||
|
|||||||
+77
-38
@@ -62,13 +62,7 @@ Steps::Steps(Song *song): m_StepsType(StepsType_Invalid), m_pSong(song),
|
|||||||
m_AreCachedNpsPerMeasureJustLoaded(false),
|
m_AreCachedNpsPerMeasureJustLoaded(false),
|
||||||
m_AreCachedNotesPerMeasureJustLoaded(false),
|
m_AreCachedNotesPerMeasureJustLoaded(false),
|
||||||
m_sCredit(""), displayBPMType(DISPLAY_BPM_ACTUAL),
|
m_sCredit(""), displayBPMType(DISPLAY_BPM_ACTUAL),
|
||||||
specifiedBPMMin(0), specifiedBPMMax(0) {
|
specifiedBPMMin(0), specifiedBPMMax(0) { }
|
||||||
m_CachedNpsPerMeasure.resize(NUM_PLAYERS);
|
|
||||||
m_CachedNotesPerMeasure.resize(NUM_PLAYERS);
|
|
||||||
FOREACH_PlayerNumber(pn) {
|
|
||||||
m_PeakNps[pn] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Steps::~Steps()
|
Steps::~Steps()
|
||||||
{
|
{
|
||||||
@@ -427,46 +421,47 @@ void Steps::CalculateMeasureInfo()
|
|||||||
NoteData tempNoteData;
|
NoteData tempNoteData;
|
||||||
this->GetNoteData( tempNoteData );
|
this->GetNoteData( tempNoteData );
|
||||||
|
|
||||||
MeasureInfo measureInfo[NUM_PLAYERS];
|
std::vector<MeasureInfo> measureInfoPerPlayer;
|
||||||
|
|
||||||
FOREACH_PlayerNumber(pn)
|
|
||||||
measureInfo[pn]
|
|
||||||
.Zero();
|
|
||||||
|
|
||||||
GAMESTATE->SetProcessedTimingData(this->GetTimingData());
|
GAMESTATE->SetProcessedTimingData(this->GetTimingData());
|
||||||
|
|
||||||
if( tempNoteData.IsComposite() )
|
if( tempNoteData.IsComposite() )
|
||||||
{
|
{
|
||||||
|
measureInfoPerPlayer.resize(NUM_PLAYERS);
|
||||||
std::vector<NoteData> vParts;
|
std::vector<NoteData> vParts;
|
||||||
NoteDataUtil::SplitCompositeNoteData( tempNoteData, vParts );
|
NoteDataUtil::SplitCompositeNoteData( tempNoteData, vParts );
|
||||||
for( std::size_t pn = 0; pn < std::min(vParts.size(), std::size_t(NUM_PLAYERS)); ++pn )
|
for( std::size_t pn = 0; pn < std::min(vParts.size(), std::size_t(NUM_PLAYERS)); ++pn )
|
||||||
{
|
{
|
||||||
MeasureInfo::CalculateMeasureInfo(vParts[pn], measureInfo[pn]);
|
MeasureInfo::CalculateMeasureInfo(vParts[pn], measureInfoPerPlayer[pn]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (GAMEMAN->GetStepsTypeInfo(this->m_StepsType).m_StepsTypeCategory == StepsTypeCategory_Couple)
|
else if (GAMEMAN->GetStepsTypeInfo(this->m_StepsType).m_StepsTypeCategory == StepsTypeCategory_Couple)
|
||||||
{
|
{
|
||||||
|
measureInfoPerPlayer.resize(NUM_PLAYERS);
|
||||||
NoteData p1 = tempNoteData;
|
NoteData p1 = tempNoteData;
|
||||||
// XXX: Assumption that couple will always have an even number of notes.
|
// XXX: Assumption that couple will always have an even number of notes.
|
||||||
const int tracks = tempNoteData.GetNumTracks() / 2;
|
const int tracks = tempNoteData.GetNumTracks() / 2;
|
||||||
p1.SetNumTracks(tracks);
|
p1.SetNumTracks(tracks);
|
||||||
MeasureInfo::CalculateMeasureInfo(tempNoteData, measureInfo[PLAYER_1]);
|
MeasureInfo::CalculateMeasureInfo(tempNoteData, measureInfoPerPlayer[PLAYER_1]);
|
||||||
NoteDataUtil::ShiftTracks(tempNoteData, tracks);
|
NoteDataUtil::ShiftTracks(tempNoteData, tracks);
|
||||||
tempNoteData.SetNumTracks(tracks);
|
tempNoteData.SetNumTracks(tracks);
|
||||||
MeasureInfo::CalculateMeasureInfo(tempNoteData, measureInfo[PLAYER_2]);
|
MeasureInfo::CalculateMeasureInfo(tempNoteData, measureInfoPerPlayer[PLAYER_2]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MeasureInfo::CalculateMeasureInfo(tempNoteData, measureInfo[0]);
|
measureInfoPerPlayer.resize(1);
|
||||||
std::fill_n( measureInfo + 1, NUM_PLAYERS-1, measureInfo[0] );
|
MeasureInfo::CalculateMeasureInfo(tempNoteData, measureInfoPerPlayer[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
FOREACH_PlayerNumber(pn)
|
m_CachedNotesPerMeasure.clear();
|
||||||
{
|
m_CachedNpsPerMeasure.clear();
|
||||||
m_CachedNpsPerMeasure[pn].assign(measureInfo[pn].npsPerMeasure.begin(), measureInfo[pn].npsPerMeasure.end());
|
m_PeakNps.clear();
|
||||||
|
|
||||||
m_CachedNotesPerMeasure[pn].assign(measureInfo[pn].notesPerMeasure.begin(), measureInfo[pn].notesPerMeasure.end());
|
for(MeasureInfo & mi : measureInfoPerPlayer)
|
||||||
m_PeakNps[pn] = measureInfo[pn].peakNps;
|
{
|
||||||
|
m_CachedNotesPerMeasure.push_back(mi.notesPerMeasure);
|
||||||
|
m_CachedNpsPerMeasure.push_back(mi.npsPerMeasure);
|
||||||
|
m_PeakNps.push_back(mi.peakNps);
|
||||||
}
|
}
|
||||||
|
|
||||||
GAMESTATE->SetProcessedTimingData(nullptr);
|
GAMESTATE->SetProcessedTimingData(nullptr);
|
||||||
@@ -762,39 +757,35 @@ void Steps::SetCachedTechCounts( const TechCounts ts[NUM_PLAYERS] )
|
|||||||
m_bAreCachedTechCountsValuesJustLoaded = true;
|
m_bAreCachedTechCountsValuesJustLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Steps::SetCachedNpsPerMeasure(std::vector<std::vector<float>>& npsPerMeasure)
|
void Steps::SetCachedNpsPerMeasure(std::vector<float>& npsPerMeasure, PlayerNumber pn)
|
||||||
{
|
{
|
||||||
DeAutogen();
|
DeAutogen();
|
||||||
if(npsPerMeasure.size() != NUM_PLAYERS)
|
|
||||||
|
if(m_CachedNpsPerMeasure.size() <= pn)
|
||||||
{
|
{
|
||||||
return;
|
m_CachedNpsPerMeasure.resize(pn + 1);
|
||||||
|
m_PeakNps.resize(pn + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
FOREACH_PlayerNumber(pn)
|
m_CachedNpsPerMeasure[pn].assign(npsPerMeasure.begin(), npsPerMeasure.end());
|
||||||
{
|
std::vector<float>::iterator peakNps = std::max_element(npsPerMeasure.begin(), npsPerMeasure.end());
|
||||||
m_CachedNpsPerMeasure[pn].assign(npsPerMeasure[pn].begin(), npsPerMeasure[pn].end());
|
if(peakNps != npsPerMeasure.end())
|
||||||
std::vector<float>::iterator peakNps = std::max_element(npsPerMeasure[pn].begin(), npsPerMeasure[pn].end());
|
|
||||||
if(peakNps != npsPerMeasure[pn].end())
|
|
||||||
{
|
{
|
||||||
m_PeakNps[pn] = *peakNps;
|
m_PeakNps[pn] = *peakNps;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
m_AreCachedNpsPerMeasureJustLoaded = true;
|
m_AreCachedNpsPerMeasureJustLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Steps::SetCachedNotesPerMeasure(std::vector<std::vector<int>>& notesPerMeasure)
|
void Steps::SetCachedNotesPerMeasure(std::vector<int>& notesPerMeasure, PlayerNumber pn)
|
||||||
{
|
{
|
||||||
DeAutogen();
|
DeAutogen();
|
||||||
|
|
||||||
if(notesPerMeasure.size() != NUM_PLAYERS)
|
if(m_CachedNotesPerMeasure.size() <= pn)
|
||||||
{
|
{
|
||||||
return;
|
m_CachedNotesPerMeasure.resize(pn + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
FOREACH_PlayerNumber(pn)
|
m_CachedNotesPerMeasure[pn].assign(notesPerMeasure.begin(), notesPerMeasure.end());
|
||||||
{
|
|
||||||
m_CachedNotesPerMeasure[pn].assign(notesPerMeasure[pn].begin(), notesPerMeasure[pn].end());
|
|
||||||
}
|
|
||||||
m_AreCachedNotesPerMeasureJustLoaded = true;
|
m_AreCachedNotesPerMeasureJustLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -883,6 +874,54 @@ std::vector<ColumnCue> Steps::GetColumnCues(float minDuration)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const std::vector<float> & Steps::GetNpsPerMeasure(PlayerNumber pn) const {
|
||||||
|
// CachedNpsPerMeasure will only have separate sets of values per-player if the
|
||||||
|
// steps type has different steps for each player (eg dance-couples, dance-routine).
|
||||||
|
// Otherwise, it will only store one copy of the values (which will be the case for like
|
||||||
|
// 99.9% of charts).
|
||||||
|
|
||||||
|
static const std::vector<float> EMPTY_VECTOR;
|
||||||
|
if(Real()->m_CachedNpsPerMeasure.size() == 0) {
|
||||||
|
return EMPTY_VECTOR;
|
||||||
|
}
|
||||||
|
else if(Real()->m_CachedNpsPerMeasure.size() <= pn) {
|
||||||
|
return Real()->m_CachedNpsPerMeasure[PLAYER_1];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return Real()->m_CachedNpsPerMeasure[pn];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::vector<int> & Steps::GetNotesPerMeasure(PlayerNumber pn) const {
|
||||||
|
// CachedNotesPerMeasure will only have separate sets of values per-player if the
|
||||||
|
// steps type has different steps for each player (eg dance-couples, dance-routine).
|
||||||
|
// Otherwise, it will only have one copy of the values (which will be the case for like
|
||||||
|
// 99.9% of charts).
|
||||||
|
static const std::vector<int> EMPTY_VECTOR;
|
||||||
|
if(Real()->m_CachedNotesPerMeasure.size() == 0) {
|
||||||
|
return EMPTY_VECTOR;
|
||||||
|
}
|
||||||
|
else if(Real()->m_CachedNotesPerMeasure.size() <= pn) {
|
||||||
|
return Real()->m_CachedNotesPerMeasure[PLAYER_1];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return Real()->m_CachedNotesPerMeasure[pn];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float Steps::GetPeakNps(PlayerNumber pn) const {
|
||||||
|
if(Real()->m_PeakNps.size() == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else if(Real()->m_PeakNps.size() <= pn) {
|
||||||
|
return Real()->m_PeakNps[PLAYER_1];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return Real()->m_PeakNps[pn];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// lua start
|
// lua start
|
||||||
#include "LuaBinding.h"
|
#include "LuaBinding.h"
|
||||||
/** @brief Allow Lua to have access to the Steps. */
|
/** @brief Allow Lua to have access to the Steps. */
|
||||||
|
|||||||
+9
-6
@@ -145,8 +145,8 @@ public:
|
|||||||
void SetMeter( int meter );
|
void SetMeter( int meter );
|
||||||
void SetCachedRadarValues( const RadarValues v[NUM_PLAYERS] );
|
void SetCachedRadarValues( const RadarValues v[NUM_PLAYERS] );
|
||||||
void SetCachedTechCounts(const TechCounts ts[NUM_PLAYERS]);
|
void SetCachedTechCounts(const TechCounts ts[NUM_PLAYERS]);
|
||||||
void SetCachedNpsPerMeasure(std::vector<std::vector<float>>& npsPerMeasure);
|
void SetCachedNpsPerMeasure(std::vector<float>& npsPerMeasure, PlayerNumber pn);
|
||||||
void SetCachedNotesPerMeasure(std::vector<std::vector<int>>& notesPerMeasure);
|
void SetCachedNotesPerMeasure(std::vector<int>& notesPerMeasure, PlayerNumber pn);
|
||||||
float PredictMeter() const;
|
float PredictMeter() const;
|
||||||
|
|
||||||
unsigned GetHash() const;
|
unsigned GetHash() const;
|
||||||
@@ -180,9 +180,12 @@ public:
|
|||||||
|
|
||||||
void CalculateMeasureInfo();
|
void CalculateMeasureInfo();
|
||||||
|
|
||||||
const std::vector<float> &GetNpsPerMeasure(PlayerNumber pn) const { return Real()->m_CachedNpsPerMeasure[pn]; }
|
const std::vector<std::vector<float>> & GetAllNpsPerMeasures() const { return Real()->m_CachedNpsPerMeasure; }
|
||||||
const std::vector<int> &GetNotesPerMeasure(PlayerNumber pn) const { return Real()->m_CachedNotesPerMeasure[pn]; }
|
const std::vector<float> &GetNpsPerMeasure(PlayerNumber pn) const;
|
||||||
float GetPeakNps(PlayerNumber pn) const { return Real()->m_PeakNps[pn]; }
|
const std::vector<std::vector<int>> & GetAllNotesPerMeasures() const { return Real()->m_CachedNotesPerMeasure; };
|
||||||
|
const std::vector<int> &GetNotesPerMeasure(PlayerNumber pn) const;
|
||||||
|
|
||||||
|
float GetPeakNps(PlayerNumber pn) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The TimingData used by the Steps.
|
* @brief The TimingData used by the Steps.
|
||||||
@@ -287,7 +290,7 @@ private:
|
|||||||
std::vector<std::vector<int>> m_CachedNotesPerMeasure;
|
std::vector<std::vector<int>> m_CachedNotesPerMeasure;
|
||||||
bool m_AreCachedNotesPerMeasureJustLoaded;
|
bool m_AreCachedNotesPerMeasureJustLoaded;
|
||||||
|
|
||||||
float m_PeakNps[NUM_PLAYERS];
|
std::vector<float> m_PeakNps;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user