add an accessor
This commit is contained in:
@@ -48,7 +48,7 @@ void Course::LoadFromCRSFile( CString sPath, vector<Song*> &apSongs )
|
|||||||
if( !arrayPossibleBanners.empty() )
|
if( !arrayPossibleBanners.empty() )
|
||||||
m_sBannerPath = arrayPossibleBanners[0];
|
m_sBannerPath = arrayPossibleBanners[0];
|
||||||
|
|
||||||
for( unsigned i=0; i<msd.m_iNumValues; i++ )
|
for( unsigned i=0; i<msd.GetNumValues(); i++ )
|
||||||
{
|
{
|
||||||
CString sValueName = msd.m_sParams[i][0];
|
CString sValueName = msd.m_sParams[i][0];
|
||||||
CString* sParams = msd.m_sParams[i];
|
CString* sParams = msd.m_sParams[i];
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ class MsdFile
|
|||||||
void AddParam( char *buf, int len );
|
void AddParam( char *buf, int len );
|
||||||
void AddValue();
|
void AddValue();
|
||||||
|
|
||||||
|
unsigned m_iNumValues; // tells how many values are valid
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MsdFile();
|
MsdFile();
|
||||||
|
|
||||||
@@ -33,8 +35,10 @@ public:
|
|||||||
|
|
||||||
CString m_sParams[MAX_VALUES][MAX_PARAMS_PER_VALUE];
|
CString m_sParams[MAX_VALUES][MAX_PARAMS_PER_VALUE];
|
||||||
|
|
||||||
unsigned m_iNumValues; // tells how many values are valid
|
/* #param:param:param:param; <- one whole value */
|
||||||
unsigned m_iNumParams[MAX_VALUES]; // tells how many params this value has
|
unsigned m_iNumParams[MAX_VALUES]; // tells how many params this value has
|
||||||
|
|
||||||
|
unsigned GetNumValues() const { return m_iNumValues; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out )
|
|||||||
if( !bResult )
|
if( !bResult )
|
||||||
RageException::Throw( "Error opening file '%s' for reading.", sPath.GetString() );
|
RageException::Throw( "Error opening file '%s' for reading.", sPath.GetString() );
|
||||||
|
|
||||||
for( unsigned i=0; i<msd.m_iNumValues; i++ )
|
for( unsigned i=0; i<msd.GetNumValues(); i++ )
|
||||||
{
|
{
|
||||||
int iNumParams = msd.m_iNumParams[i];
|
int iNumParams = msd.m_iNumParams[i];
|
||||||
CString* sParams = msd.m_sParams[i];
|
CString* sParams = msd.m_sParams[i];
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Notes &out )
|
|||||||
int iTickCount = -1; // this is the value we read for TICKCOUNT
|
int iTickCount = -1; // this is the value we read for TICKCOUNT
|
||||||
CString iStep; // this is the value we read for STEP
|
CString iStep; // this is the value we read for STEP
|
||||||
|
|
||||||
for( unsigned i=0; i<msd.m_iNumValues; i++ )
|
for( unsigned i=0; i<msd.GetNumValues(); i++ )
|
||||||
{
|
{
|
||||||
CString* sParams = msd.m_sParams[i];
|
CString* sParams = msd.m_sParams[i];
|
||||||
CString sValueName = sParams[0];
|
CString sValueName = sParams[0];
|
||||||
@@ -190,7 +190,7 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
|
|||||||
if( !bResult )
|
if( !bResult )
|
||||||
RageException::Throw( "Error opening file '%s'.", sPath.GetString() );
|
RageException::Throw( "Error opening file '%s'.", sPath.GetString() );
|
||||||
|
|
||||||
for( i=0; i < msd.m_iNumValues; i++ )
|
for( i=0; i < msd.GetNumValues(); i++ )
|
||||||
{
|
{
|
||||||
CString* sParams = msd.m_sParams[i];
|
CString* sParams = msd.m_sParams[i];
|
||||||
CString sValueName = sParams[0];
|
CString sValueName = sParams[0];
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
|
|||||||
if( !bResult )
|
if( !bResult )
|
||||||
RageException::Throw( "Error opening file '%s'.", sPath.GetString() );
|
RageException::Throw( "Error opening file '%s'.", sPath.GetString() );
|
||||||
|
|
||||||
for( unsigned i=0; i<msd.m_iNumValues; i++ )
|
for( unsigned i=0; i<msd.GetNumValues(); i++ )
|
||||||
{
|
{
|
||||||
int iNumParams = msd.m_iNumParams[i];
|
int iNumParams = msd.m_iNumParams[i];
|
||||||
CString* sParams = msd.m_sParams[i];
|
CString* sParams = msd.m_sParams[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user