Skip to content

Commit e76366b

Browse files
experiment with new notedata string format and tackle the hilarity that is song load
1 parent 735348d commit e76366b

12 files changed

+678
-43
lines changed

src/CMakeData-data.cmake

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ list(APPEND SM_DATA_NOTELOAD_SRC
4949
"NotesLoaderSM.cpp"
5050
"NotesLoaderSMA.cpp"
5151
"NotesLoaderSSC.cpp"
52+
"NotesLoaderETT.cpp"
5253
)
5354

5455
list(APPEND SM_DATA_NOTELOAD_HPP
@@ -60,6 +61,7 @@ list(APPEND SM_DATA_NOTELOAD_HPP
6061
"NotesLoaderSM.h"
6162
"NotesLoaderSMA.h"
6263
"NotesLoaderSSC.h"
64+
"NotesLoaderETT.h"
6365
)
6466

6567
source_group("Data Structures\\\\Notes Loaders" FILES ${SM_DATA_NOTELOAD_SRC} ${SM_DATA_NOTELOAD_HPP})
@@ -69,13 +71,15 @@ list(APPEND SM_DATA_NOTEWRITE_SRC
6971
"NotesWriterJson.cpp"
7072
"NotesWriterSM.cpp"
7173
"NotesWriterSSC.cpp"
74+
"NotesWriterETT.cpp"
7275
)
7376

7477
list(APPEND SM_DATA_NOTEWRITE_HPP
7578
"NotesWriterDWI.h"
7679
"NotesWriterJson.h"
7780
"NotesWriterSM.h"
7881
"NotesWriterSSC.h"
82+
"NotesWriterETT.h"
7983
)
8084

8185
source_group("Data Structures\\\\Notes Writers" FILES ${SM_DATA_NOTEWRITE_SRC} ${SM_DATA_NOTEWRITE_HPP})

src/NoteDataUtil.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,6 @@ void NoteDataUtil::GetETTNoteDataString(const NoteData &in, RString &sRet) {
519519
// Get note data
520520
vector<NoteData> parts;
521521
float fLastBeat = -1.f;
522-
LOG->Warn("sdasdfas23dff");
523522
SplitCompositeNoteData(in, parts);
524523

525524
FOREACH(NoteData, parts, nd) {

src/NotesLoaderETT.cpp

Whitespace-only changes.

src/NotesLoaderETT.h

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#ifndef NotesLoaderETT_H
2+
#define NotesLoaderETT_H
3+
4+
5+
#endif

src/NotesLoaderSM.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ void SMLoader::ParseBPMs( vector< pair<float, float> > &out, const RString &line
404404
continue;
405405
}
406406

407-
out.push_back( make_pair(fBeat, fNewBPM) );
407+
out.emplace_back( make_pair(fBeat, fNewBPM) );
408408
}
409409
}
410410

@@ -434,7 +434,7 @@ void SMLoader::ParseStops( vector< pair<float, float> > &out, const RString line
434434
continue;
435435
}
436436

437-
out.push_back( make_pair(fFreezeBeat, fFreezeSeconds) );
437+
out.emplace_back( make_pair(fFreezeBeat, fFreezeSeconds) );
438438
}
439439
}
440440

@@ -797,12 +797,12 @@ void SMLoader::ProcessSpeeds( TimingData &out, const RString &line, const int ro
797797

798798
if( vs2[0] == 0 && vs2.size() == 2 ) // First one always seems to have 2.
799799
{
800-
vs2.push_back("0");
800+
vs2.emplace_back("0");
801801
}
802802

803803
if( vs2.size() == 3 ) // use beats by default.
804804
{
805-
vs2.push_back("0");
805+
vs2.emplace_back("0");
806806
}
807807

808808
if( vs2.size() < 4 )
@@ -1286,7 +1286,7 @@ void SMLoader::TidyUpData( Song &song, bool bFromCache )
12861286
if( !IsAFile( song.GetBackgroundPath() ) )
12871287
break;
12881288

1289-
bg.push_back( BackgroundChange(lastBeat,song.m_sBackgroundFile) );
1289+
bg.emplace_back( BackgroundChange(lastBeat,song.m_sBackgroundFile) );
12901290
} while(0);
12911291
}
12921292
if (bFromCache)

0 commit comments

Comments
 (0)