reading/writing fixes

This commit is contained in:
Glenn Maynard
2003-10-26 03:17:45 +00:00
parent 18c9d38f50
commit a77521c2b6
+17
View File
@@ -282,6 +282,7 @@ void Course::LoadFromCRSFile( CString sPath )
}
new_entry.attacks = attacks;
attacks.clear();
m_entries.push_back( new_entry );
}
@@ -320,6 +321,22 @@ void Course::Save()
{
const CourseEntry& entry = m_entries[i];
for( unsigned j = 0; j < entry.attacks.size(); ++j )
{
if( j == 0 )
fprintf( fp, "#MODS:\n" );
const Attack &a = entry.attacks[j];
fprintf( fp, " TIME=%.2f:LEN=%.2f:MODS=%s",
a.fStartSecond, a.fSecsRemaining, a.sModifier.c_str() );
if( j+1 < entry.attacks.size() )
fprintf( fp, ":" );
else
fprintf( fp, ";" );
fprintf( fp, "\n" );
}
switch( entry.type )
{
case COURSE_ENTRY_FIXED: