Skip to content

Commit

Permalink
Sort steps by type and difficulty first before saving to cache and dw…
Browse files Browse the repository at this point in the history
…i/sm files
  • Loading branch information
sillybear committed Jul 25, 2017
1 parent 23495bd commit 852f27c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/NotesWriterDWI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "RageFile.h"
#include "NoteDataUtil.h"
#include "RageFile.h"
#include "StepsUtil.h"

static void write_tag( RageFile& f, CString const &format, CString const &value)
{
Expand Down Expand Up @@ -415,7 +416,9 @@ bool NotesWriterDWI::Write( CString sPath, const Song &out )
write_tag( f, "#FREEZE:%s;", join(",", stopLines) );
}

const vector<Steps*>& vpSteps = out.GetAllSteps();
vector<Steps*> vpSteps = out.GetAllSteps();
StepsUtil::SortStepsByTypeAndDifficulty( vpSteps );

for( unsigned i=0; i<vpSteps.size(); i++ )
{
const Steps* pSteps = vpSteps[i];
Expand Down
5 changes: 4 additions & 1 deletion src/NotesWriterSM.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "global.h"
#include "NotesWriterSM.h"
#include "StepsUtil.h"
#include "Steps.h"
#include "RageUtil.h"
#include "GameManager.h"
Expand Down Expand Up @@ -284,7 +285,9 @@ bool NotesWriterSM::Write(CString sPath, const Song &out, bool bSavingCache )
//
// Save all Steps for this file
//
const vector<Steps*>& vpSteps = out.GetAllSteps();
vector<Steps*> vpSteps = out.GetAllSteps();
StepsUtil::SortStepsByTypeAndDifficulty( vpSteps );

for( i=0; i<vpSteps.size(); i++ )
{
const Steps* pSteps = vpSteps[i];
Expand Down

0 comments on commit 852f27c

Please sign in to comment.