add an accessor

This commit is contained in:
Glenn Maynard
2003-01-14 22:10:04 +00:00
parent 70e386192b
commit e4f9a339af
5 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ void Course::LoadFromCRSFile( CString sPath, vector<Song*> &apSongs )
if( !arrayPossibleBanners.empty() )
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* sParams = msd.m_sParams[i];
+5 -1
View File
@@ -21,6 +21,8 @@ class MsdFile
void AddParam( char *buf, int len );
void AddValue();
unsigned m_iNumValues; // tells how many values are valid
public:
MsdFile();
@@ -33,8 +35,10 @@ public:
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 GetNumValues() const { return m_iNumValues; }
};
#endif
+1 -1
View File
@@ -273,7 +273,7 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out )
if( !bResult )
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];
CString* sParams = msd.m_sParams[i];
+2 -2
View File
@@ -21,7 +21,7 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Notes &out )
int iTickCount = -1; // this is the value we read for TICKCOUNT
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 sValueName = sParams[0];
@@ -190,7 +190,7 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
if( !bResult )
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 sValueName = sParams[0];
+1 -1
View File
@@ -59,7 +59,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
if( !bResult )
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];
CString* sParams = msd.m_sParams[i];