diff options
Diffstat (limited to 'engines/fullpipe/sound.h')
-rw-r--r-- | engines/fullpipe/sound.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/engines/fullpipe/sound.h b/engines/fullpipe/sound.h index ea6987aae6..ca64832c04 100644 --- a/engines/fullpipe/sound.h +++ b/engines/fullpipe/sound.h @@ -32,11 +32,17 @@ class Sound : public MemoryObject { int _directSoundBuffer; int _directSoundBuffers[7]; byte *_soundData; + Audio::SoundHandle _handle; - public: +public: Sound(); - bool load(MfcArchive &file, NGIArchive *archive); + virtual ~Sound(); + + virtual bool load(MfcArchive &file, NGIArchive *archive); + virtual bool load(MfcArchive &file) { assert(0); return false; } // Disable base class void updateVolume(); + int getId() const { return _id; } + Audio::SoundHandle getHandle() const { return _handle; } void setPanAndVolumeByStaticAni(); }; @@ -48,11 +54,19 @@ class SoundList : public CObject { public: SoundList(); - bool load(MfcArchive &file, char *fname); + virtual bool load(MfcArchive &file, char *fname); + virtual bool load(MfcArchive &file) { assert(0); return false; } // Disable base class bool loadFile(const char *fname, char *libname); int getCount() { return _soundItemsCount; } Sound *getSoundByIndex(int idx) { return _soundItems[idx]; } + Sound *getSoundById(int id) { + for (int i = 0; i < _soundItemsCount; i++) { + if (_soundItems[i]->getId() == id) + return _soundItems[i]; + } + return NULL; + } }; } // End of namespace Fullpipe |