support loading of course edits

This commit is contained in:
Chris Danford
2005-07-31 05:41:32 +00:00
parent e5c1f09fa0
commit a2c439a17a
16 changed files with 814 additions and 552 deletions
+3 -3
View File
@@ -12,7 +12,7 @@
#include "song.h"
#include "Steps.h"
#define MAX_EDIT_SIZE_BYTES 20*1024 // 20 KB
const int MAX_EDIT_STEPS_SIZE_BYTES = 30*1024; // 30KB
void SMLoader::LoadFromSMTokens(
CString sStepsType,
@@ -464,10 +464,10 @@ bool SMLoader::LoadFromDir( CString sPath, Song &out )
bool SMLoader::LoadEdit( CString sEditFilePath, ProfileSlot slot )
{
LOG->Trace( "Song::LoadEdit(%s)", sEditFilePath.c_str() );
LOG->Trace( "SMLoader::LoadEdit(%s)", sEditFilePath.c_str() );
int iBytes = FILEMAN->GetFileSizeInBytes( sEditFilePath );
if( iBytes > MAX_EDIT_SIZE_BYTES )
if( iBytes > MAX_EDIT_STEPS_SIZE_BYTES )
{
LOG->Warn( "The edit '%s' is unreasonably large. It won't be loaded.", sEditFilePath.c_str() );
return false;