aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/sound.h
diff options
context:
space:
mode:
authorPaul Gilbert2011-06-22 23:40:25 +1000
committerPaul Gilbert2011-06-23 20:11:51 +1000
commit97137e6b27a6d64fc2ba45c0c6d1a07d027ee27c (patch)
tree5e24ba02d5830a6234abb5c413308bafe437f20f /engines/tsage/sound.h
parentc4a5fa85069e2363e4e0e11f84d333b5fbd39caf (diff)
downloadscummvm-rg350-97137e6b27a6d64fc2ba45c0c6d1a07d027ee27c.tar.gz
scummvm-rg350-97137e6b27a6d64fc2ba45c0c6d1a07d027ee27c.tar.bz2
scummvm-rg350-97137e6b27a6d64fc2ba45c0c6d1a07d027ee27c.zip
TSAGE: Added saving/restoring of playing sounds to savegames
Diffstat (limited to 'engines/tsage/sound.h')
-rw-r--r--engines/tsage/sound.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h
index 9a8cfb3cfc..4647e3c564 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -123,7 +123,6 @@ struct VoiceStructEntryType0 {
int _channelNum3;
int _priority3;
int _field1A;
- int _field1B;
};
struct VoiceStructEntryType1 {
@@ -166,7 +165,7 @@ private:
public:
bool __sndmgrReady;
int _ourSndResVersion, _ourDrvResVersion;
- Common::List<Sound *> _playList;
+ SynchronizedList<Sound *> _playList;
Common::List<SoundDriver *> _installedDrivers;
VoiceTypeStruct *_voiceTypeStructPtrs[SOUND_ARR_SIZE];
uint32 _groupsAvail;
@@ -174,9 +173,8 @@ public:
int _newVolume;
Common::Mutex _serverDisabledMutex;
Common::Mutex _serverSuspendedMutex;
- int _suspendedCount;
bool _driversDetected;
- Common::List<Sound *> _soundList;
+ SynchronizedList<Sound *> _soundList;
Common::List<SoundDriverEntry> _availableDrivers;
bool _needToRethink;
// Misc flags
@@ -255,7 +253,6 @@ class Sound: public EventHandler {
private:
void _prime(int soundResID, bool dontQueue);
void _unPrime();
- void orientAfterRestore();
public:
bool _stoppedAsynchronously;
int _soundResID;
@@ -276,7 +273,8 @@ public:
int _fadeTicks;
int _fadeCounter;
bool _stopAfterFadeFlag;
- uint _timer;
+ uint32 _timer;
+ uint32 _newTimeIndex;
int _loopTimer;
int _chProgram[SOUND_ARR_SIZE];
int _chModulation[SOUND_ARR_SIZE];
@@ -306,6 +304,9 @@ public:
Sound();
~Sound();
+ void synchronize(Serializer &s);
+ void orientAfterRestore();
+
void play(int soundResID);
void stop();
void prime(int soundResID);