diff options
author | Max Horn | 2005-10-21 23:04:58 +0000 |
---|---|---|
committer | Max Horn | 2005-10-21 23:04:58 +0000 |
commit | b5e63f5bfb76a4002be5a7c081b0f3fc6d61a231 (patch) | |
tree | c6a6f7a1d8d30c331a9ce4079b33853955d9dce7 /scumm | |
parent | ffc5e1718f69954d08802ee3a134861b859f76a5 (diff) | |
download | scummvm-rg350-b5e63f5bfb76a4002be5a7c081b0f3fc6d61a231.tar.gz scummvm-rg350-b5e63f5bfb76a4002be5a7c081b0f3fc6d61a231.tar.bz2 scummvm-rg350-b5e63f5bfb76a4002be5a7c081b0f3fc6d61a231.zip |
Turn class Sound into a Serializable
svn-id: r19225
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/saveload.cpp | 4 | ||||
-rw-r--r-- | scumm/sound.cpp | 5 | ||||
-rw-r--r-- | scumm/sound.h | 5 |
3 files changed, 6 insertions, 8 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index fd94c22b71..0cfb1650af 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -625,8 +625,6 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) { MKEND() }; - const SaveLoadEntry *soundEntries = _sound->getSaveLoadEntries(); - const SaveLoadEntry verbEntries[] = { MKLINE(VerbSlot, curRect.left, sleInt16, VER(8)), MKLINE(VerbSlot, curRect.top, sleInt16, VER(8)), @@ -957,7 +955,7 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) { // // Save/load sound data // - s->saveLoadEntries(_sound, soundEntries); + _sound->saveLoadWithSerializer(s); // diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 8273304cf4..d9022e44b9 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -25,7 +25,6 @@ #include "scumm/imuse.h" #include "scumm/imuse_digi/dimuse.h" #include "scumm/scumm.h" -#include "scumm/saveload.h" #include "scumm/sound.h" #include "scumm/util.h" @@ -1296,14 +1295,14 @@ void Sound::updateCD() { AudioCD.updateCD(); } -const SaveLoadEntry *Sound::getSaveLoadEntries() { +void Sound::saveLoadWithSerializer(Serializer *ser) { static const SaveLoadEntry soundEntries[] = { MKLINE(Sound, _currentCDSound, sleInt16, VER(35)), MKLINE(Sound, _currentMusic, sleInt16, VER(35)), MKEND() }; - return soundEntries; + ser->saveLoadEntries(this, soundEntries); } diff --git a/scumm/sound.h b/scumm/sound.h index 484edaf81c..7bc34cfab1 100644 --- a/scumm/sound.h +++ b/scumm/sound.h @@ -24,6 +24,7 @@ #include "common/scummsys.h" #include "sound/audiostream.h" #include "sound/mixer.h" +#include "scumm/saveload.h" namespace Common { class File; @@ -41,7 +42,7 @@ enum { kTalkSoundID = 10000 }; -class Sound { +class Sound : public Serializable { #ifdef PALMOS_MODE public: #else @@ -137,7 +138,7 @@ public: bool getHEMusicDetails(int id, int &musicOffs, int &musicSize); // Used by the save/load system: - const SaveLoadEntry *getSaveLoadEntries(); + void saveLoadWithSerializer(Serializer *ser); protected: ScummFile *openSfxFile(); |