fix up MsdFile; get rid of arbitrary limits

This commit is contained in:
Glenn Maynard
2003-01-14 22:44:30 +00:00
parent e4f9a339af
commit 4f1455d30e
7 changed files with 67 additions and 71 deletions
+5 -8
View File
@@ -50,8 +50,8 @@ void Course::LoadFromCRSFile( CString sPath, vector<Song*> &apSongs )
for( unsigned i=0; i<msd.GetNumValues(); i++ )
{
CString sValueName = msd.m_sParams[i][0];
CString* sParams = msd.m_sParams[i];
CString sValueName = msd.GetParam(i, 0);
const MsdFile::value_t &sParams = msd.GetValue(i);
// handle the data
if( 0 == stricmp(sValueName, "COURSE") )
@@ -59,20 +59,17 @@ void Course::LoadFromCRSFile( CString sPath, vector<Song*> &apSongs )
else if( 0 == stricmp(sValueName, "REPEAT") )
{
sParams[1].MakeLower();
if( sParams[1].Find("yes") != -1 )
CString str = sParams[1];
str.MakeLower();
if( str.Find("yes") != -1 )
m_bRepeat = true;
}
else if( 0 == stricmp(sValueName, "LIVES") )
{
m_iLives = atoi( sParams[1] );
}
else if( 0 == stricmp(sValueName, "EXTRA") )
{
m_iExtra = atoi( sParams[1] );
}
else if( 0 == stricmp(sValueName, "SONG") )
{