aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/player_v4a.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/player_v4a.h')
-rw-r--r--engines/scumm/player_v4a.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/scumm/player_v4a.h b/engines/scumm/player_v4a.h
index 5e83adbf67..a261235867 100644
--- a/engines/scumm/player_v4a.h
+++ b/engines/scumm/player_v4a.h
@@ -62,6 +62,30 @@ private:
Audio::SoundHandle _sfxHandle;
int _musicId;
+
+ struct SfxChan {
+ int id;
+ byte type;
+ } _sfxSlots[4];
+
+ int getSfxChan(int id) const {
+ for (int i = 0; i < ARRAYSIZE(_sfxSlots); ++i)
+ if (_sfxSlots[i].id == id)
+ return i;
+ return -1;
+ }
+
+ void setSfxSlot(int channel, int id, byte type = 0) {
+ _sfxSlots[channel].id = id;
+ _sfxSlots[channel].type = type;
+ }
+
+ void clearSfxSlots() {
+ for (int i = 0; i < ARRAYSIZE(_sfxSlots); ++i){
+ _sfxSlots[i].id = 0;
+ _sfxSlots[i].type = 0;
+ }
+ }
bool init();
};