1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-16 16:09:42 +01:00

Parse extra headers from binary blob

Not just the ones that contain specific names.
This commit is contained in:
Misa 2020-06-30 15:35:50 -07:00 committed by Ethan Lee
parent 4c2f5ed032
commit 08fe655a5f

View file

@ -78,6 +78,14 @@ void musicclass::init()
TRACK_NAMES TRACK_NAMES
const std::vector<int> extra = musicReadBlob.getExtra();
for (size_t i = 0; i < extra.size(); i++)
{
const int& index = extra[i];
rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index));
musicTracks.push_back(MusicTrack( rw ));
}
bool ohCrap = musicReadBlob.unPackBinary("vvvvvvmusic.vvv"); bool ohCrap = musicReadBlob.unPackBinary("vvvvvvmusic.vvv");
SDL_assert(ohCrap && "Music not found!"); SDL_assert(ohCrap && "Music not found!");
} }
@ -89,6 +97,14 @@ void musicclass::init()
#undef FOREACH_TRACK #undef FOREACH_TRACK
const std::vector<int> extra = musicReadBlob.getExtra();
for (size_t i = 0; i < extra.size(); i++)
{
const int& index = extra[i];
rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index));
musicTracks.push_back(MusicTrack( rw ));
}
safeToProcessMusic= false; safeToProcessMusic= false;
m_doFadeInVol = false; m_doFadeInVol = false;
musicVolume = 128; musicVolume = 128;