TOLTECS: Store channel volume/panning information in saved games

This commit is contained in:
Filippos Karapetis 2012-09-10 23:19:43 +03:00
parent a9a579891e
commit c0a1d78e0e
3 changed files with 33 additions and 21 deletions

View file

@ -36,12 +36,11 @@
namespace Toltecs {
/* TODO:
- Save with F7; Load with F9
- Saving during an animation (AnimationPlayer) is not working correctly yet
- Maybe switch to SCUMM/Tinsel serialization approach?
*/
#define TOLTECS_SAVEGAME_VERSION 3
#define TOLTECS_SAVEGAME_VERSION 4
ToltecsEngine::kReadSaveHeaderError ToltecsEngine::readSaveHeader(Common::SeekableReadStream *in, bool loadThumbnail, SaveHeader &header) {
@ -141,8 +140,8 @@ void ToltecsEngine::savegame(const char *filename, const char *description) {
}
void ToltecsEngine::loadgame(const char *filename) {
Common::InSaveFile *in;
if (!(in = g_system->getSavefileManager()->openForLoading(filename))) {
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename);
if (!in) {
warning("Can't open file '%s', game not loaded", filename);
return;
}
@ -191,7 +190,7 @@ void ToltecsEngine::loadgame(const char *filename) {
_anim->loadState(in);
_screen->loadState(in);
if (header.version >= 2)
_sound->loadState(in);
_sound->loadState(in, header.version);
if (header.version >= 3)
_music->loadState(in);