mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 22:58:09 +00:00
Turn class Sound into a Serializable
svn-id: r19225
This commit is contained in:
parent
ffc5e1718f
commit
b5e63f5bfb
@ -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);
|
||||
|
||||
|
||||
//
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user