Skip to content

Commit

Permalink
experiment with new notedata string format and tackle the hilarity th…
Browse files Browse the repository at this point in the history
…at is song load
  • Loading branch information
MinaciousGrace committed Jun 5, 2017
1 parent 735348d commit e76366b
Show file tree
Hide file tree
Showing 12 changed files with 678 additions and 43 deletions.
4 changes: 4 additions & 0 deletions src/CMakeData-data.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ list(APPEND SM_DATA_NOTELOAD_SRC
"NotesLoaderSM.cpp"
"NotesLoaderSMA.cpp"
"NotesLoaderSSC.cpp"
"NotesLoaderETT.cpp"
)

list(APPEND SM_DATA_NOTELOAD_HPP
Expand All @@ -60,6 +61,7 @@ list(APPEND SM_DATA_NOTELOAD_HPP
"NotesLoaderSM.h"
"NotesLoaderSMA.h"
"NotesLoaderSSC.h"
"NotesLoaderETT.h"
)

source_group("Data Structures\\\\Notes Loaders" FILES ${SM_DATA_NOTELOAD_SRC} ${SM_DATA_NOTELOAD_HPP})
Expand All @@ -69,13 +71,15 @@ list(APPEND SM_DATA_NOTEWRITE_SRC
"NotesWriterJson.cpp"
"NotesWriterSM.cpp"
"NotesWriterSSC.cpp"
"NotesWriterETT.cpp"
)

list(APPEND SM_DATA_NOTEWRITE_HPP
"NotesWriterDWI.h"
"NotesWriterJson.h"
"NotesWriterSM.h"
"NotesWriterSSC.h"
"NotesWriterETT.h"
)

source_group("Data Structures\\\\Notes Writers" FILES ${SM_DATA_NOTEWRITE_SRC} ${SM_DATA_NOTEWRITE_HPP})
Expand Down
1 change: 0 additions & 1 deletion src/NoteDataUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@ void NoteDataUtil::GetETTNoteDataString(const NoteData &in, RString &sRet) {
// Get note data
vector<NoteData> parts;
float fLastBeat = -1.f;
LOG->Warn("sdasdfas23dff");
SplitCompositeNoteData(in, parts);

FOREACH(NoteData, parts, nd) {
Expand Down
Empty file added src/NotesLoaderETT.cpp
Empty file.
5 changes: 5 additions & 0 deletions src/NotesLoaderETT.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifndef NotesLoaderETT_H
#define NotesLoaderETT_H


#endif
10 changes: 5 additions & 5 deletions src/NotesLoaderSM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ void SMLoader::ParseBPMs( vector< pair<float, float> > &out, const RString &line
continue;
}

out.push_back( make_pair(fBeat, fNewBPM) );
out.emplace_back( make_pair(fBeat, fNewBPM) );
}
}

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

out.push_back( make_pair(fFreezeBeat, fFreezeSeconds) );
out.emplace_back( make_pair(fFreezeBeat, fFreezeSeconds) );
}
}

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

if( vs2[0] == 0 && vs2.size() == 2 ) // First one always seems to have 2.
{
vs2.push_back("0");
vs2.emplace_back("0");
}

if( vs2.size() == 3 ) // use beats by default.
{
vs2.push_back("0");
vs2.emplace_back("0");
}

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

bg.push_back( BackgroundChange(lastBeat,song.m_sBackgroundFile) );
bg.emplace_back( BackgroundChange(lastBeat,song.m_sBackgroundFile) );
} while(0);
}
if (bFromCache)
Expand Down
Loading

0 comments on commit e76366b

Please sign in to comment.