Prep work for #NOTES-less cache.
This commit should be runnable, but I still be careful.
This commit is contained in:
+15
-1
@@ -24,6 +24,11 @@
|
||||
#include "NoteDataUtil.h"
|
||||
#include "NotesLoaderSSC.h"
|
||||
#include "NotesLoaderSM.h"
|
||||
#include "NotesLoaderSMA.h"
|
||||
#include "NotesLoaderDWI.h"
|
||||
#include "NotesLoaderKSF.h"
|
||||
#include "NotesLoaderBMS.h"
|
||||
#include "NotesLoaderPMS.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -78,6 +83,11 @@ unsigned Steps::GetHash() const
|
||||
return m_iHash;
|
||||
}
|
||||
|
||||
bool Steps::IsNoteDataEmpty() const
|
||||
{
|
||||
return this->m_sNoteDataCompressed.empty();
|
||||
}
|
||||
|
||||
void Steps::SetNoteData( const NoteData& noteDataNew )
|
||||
{
|
||||
ASSERT( noteDataNew.GetNumTracks() == GAMEMAN->GetStepsTypeInfo(m_StepsType).iNumTracks );
|
||||
@@ -89,7 +99,6 @@ void Steps::SetNoteData( const NoteData& noteDataNew )
|
||||
|
||||
m_sNoteDataCompressed = RString();
|
||||
m_iHash = 0;
|
||||
m_sFilename = RString(); // We can no longer read from the file because it has changed in memory.
|
||||
}
|
||||
|
||||
void Steps::GetNoteData( NoteData& noteDataOut ) const
|
||||
@@ -250,6 +259,11 @@ void Steps::CalculateRadarValues( float fMusicLengthSeconds )
|
||||
}
|
||||
|
||||
void Steps::Decompress() const
|
||||
{
|
||||
const_cast<Steps *>(this)->Decompress();
|
||||
}
|
||||
|
||||
void Steps::Decompress()
|
||||
{
|
||||
if( m_bNoteDataIsFilled )
|
||||
return; // already decompressed
|
||||
|
||||
+13
@@ -49,6 +49,7 @@ public:
|
||||
|
||||
void Compress() const;
|
||||
void Decompress() const;
|
||||
void Decompress();
|
||||
/**
|
||||
* @brief Determine if these steps were created by the autogenerator.
|
||||
* @return true if they were, false otherwise.
|
||||
@@ -139,6 +140,18 @@ public:
|
||||
void SetSMNoteData( const RString ¬es_comp );
|
||||
void GetSMNoteData( RString ¬es_comp_out ) const;
|
||||
|
||||
/**
|
||||
* @brief Retrieve the NoteData from the original source.
|
||||
* @return true if successful, false for failure. */
|
||||
bool GetNoteDataFromSimfile();
|
||||
|
||||
/**
|
||||
* @brief Determine if we are missing any note data.
|
||||
*
|
||||
* This takes advantage of the fact that we usually compress our data.
|
||||
* @return true if our notedata is empty, false otherwise. */
|
||||
bool IsNoteDataEmpty() const;
|
||||
|
||||
void TidyUpData();
|
||||
void CalculateRadarValues( float fMusicLengthSeconds );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user