aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/resource.h
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-04 14:53:12 +0000
committerFilippos Karapetis2010-06-04 14:53:12 +0000
commitfdc9bbcbf5cee1b5e0cca6838ff30b0133b882fa (patch)
tree588680d1a45aec64357e4c85d6258d1a9f2dc4ed /engines/sci/resource.h
parent9906030312842ae3f3537824c36697c2f5eb60bf (diff)
downloadscummvm-rg350-fdc9bbcbf5cee1b5e0cca6838ff30b0133b882fa.tar.gz
scummvm-rg350-fdc9bbcbf5cee1b5e0cca6838ff30b0133b882fa.tar.bz2
scummvm-rg350-fdc9bbcbf5cee1b5e0cca6838ff30b0133b882fa.zip
Simplified the channel monitoring code inside the SoundResource class
svn-id: r49429
Diffstat (limited to 'engines/sci/resource.h')
-rw-r--r--engines/sci/resource.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index 6d9da3c200..bc08154fed 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -512,7 +512,7 @@ public:
Track *getDigitalTrack();
int getChannelFilterMask(int hardwareMask, bool wantsRhythm);
byte getInitialVoiceCount(byte channel);
- bool isChannelUsed(byte channel) { return _usedChannels[channel]; }
+ bool isChannelUsed(byte channel) const { return _channelsUsed & (1 << channel); }
private:
SciVersion _soundVersion;
@@ -520,7 +520,9 @@ private:
Track *_tracks;
Resource *_innerResource;
ResourceManager *_resMan;
- bool _usedChannels[16];
+ uint16 _channelsUsed;
+
+ void setChannelUsed(byte channel) { _channelsUsed |= (1 << channel); }
};
} // End of namespace Sci