From b424659fcdafa59e48ad884fd04ba87330874688 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Tue, 14 Jun 2011 21:47:22 -0400 Subject: [PATCH] Prepare for dynamic notedata loading. I wonder if this should include radar calculations. --- src/NotesLoaderSM.cpp | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/src/NotesLoaderSM.cpp b/src/NotesLoaderSM.cpp index 5dc4a4c649..d28588bdf6 100644 --- a/src/NotesLoaderSM.cpp +++ b/src/NotesLoaderSM.cpp @@ -668,19 +668,31 @@ bool SMLoader::LoadNotedataFromSimfile( const RString &path, Steps &out ) iNumParams ); continue; } - /* - Steps* pNewNotes = out.CreateSteps(); - LoadFromTokens( - sParams[1], - sParams[2], - sParams[3], - sParams[4], - sParams[5], - sParams[6], - *pNewNotes ); - out.AddSteps( pNewNotes ); - */ + RString stepsType = sParams[1]; + RString description = sParams[2]; + RString difficulty = sParams[3]; + Trim(stepsType); + Trim(description); + Trim(difficulty); + // Remember our old versions. + if (difficulty.CompareNoCase("smaniac") == 0) + { + difficulty = "Challenge"; + } + + if(!(out.m_StepsType == GAMEMAN->StringToStepsType( stepsType ) && + out.GetDescription() == description && + out.GetDifficulty() == StringToDifficulty(difficulty))) + { + continue; + } + + RString noteData = sParams[6]; + Trim( noteData ); + out.SetSMNoteData( noteData ); + + return true; } } return false;