The correct music track is now played when loading a game in IHNM. The save/load mechanism in IHNM seems to be working correctly now (although it needs testing), however there are still some graphical glitches with the save/load dialogs. Also, moved some unfinished code for returning to the chapter selection screen to a more appropriate place

svn-id: r27542
This commit is contained in:
Filippos Karapetis 2007-06-19 02:42:59 +00:00
parent 3c424d98cd
commit 8bc226b0e5
4 changed files with 23 additions and 6 deletions

View file

@ -195,6 +195,8 @@ void SagaEngine::save(const char *fileName, const char *saveName) {
out->writeSint32LE(_scene->currentChapterNumber());
// Protagonist
out->writeSint32LE(_scene->currentProtag());
out->writeSint32LE(_scene->getCurrentMusicTrack());
out->writeSint32LE(_scene->getCurrentMusicRepeat());
}
// Inset scene
@ -270,6 +272,10 @@ void SagaEngine::load(const char *fileName) {
_scene->setProtag(in->readSint32LE());
if (_scene->currentChapterNumber())
_scene->changeScene(-2, 0, kTransitionFade, _scene->currentChapterNumber());
_scene->setCurrentMusicTrack(in->readSint32LE());
_scene->setCurrentMusicRepeat(in->readSint32LE());
_music->stop();
_music->play(_music->_songTable[_scene->getCurrentMusicTrack()], _scene->getCurrentMusicRepeat() ? MUSIC_LOOP : MUSIC_NORMAL);
}
// Inset scene