aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-09-20 04:13:37 +0000
committerTorbjörn Andersson2007-09-20 04:13:37 +0000
commit828158a82a08f3ed769196c76a303f340fda133f (patch)
tree91e4b039590f7991b50c62f01b57422e33410832 /engines
parent4c4d4e7b15901a9610b08048c32a1254f367e8aa (diff)
downloadscummvm-rg350-828158a82a08f3ed769196c76a303f340fda133f.tar.gz
scummvm-rg350-828158a82a08f3ed769196c76a303f340fda133f.tar.bz2
scummvm-rg350-828158a82a08f3ed769196c76a303f340fda133f.zip
I'm probably being overly paranoid, but I'm nervous about initializing an array
of boolean with memset(). Maybe it's perfectly fine and healthy, but using a loop is consistent with how we do it in killSounds() anyway. svn-id: r28979
Diffstat (limited to 'engines')
-rw-r--r--engines/lure/sound.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/lure/sound.cpp b/engines/lure/sound.cpp
index 89939f9182..855f142266 100644
--- a/engines/lure/sound.cpp
+++ b/engines/lure/sound.cpp
@@ -35,6 +35,7 @@ DECLARE_SINGLETON(Lure::SoundManager);
namespace Lure {
SoundManager::SoundManager() {
+ int index;
_descs = Disk::getReference().getEntry(SOUND_DESC_RESOURCE_ID);
_numDescs = _descs->size() / sizeof(SoundDescResource);
_soundData = NULL;
@@ -42,7 +43,8 @@ SoundManager::SoundManager() {
int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI);
_nativeMT32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32"));
- memset(_channelsInUse, false, NUM_CHANNELS_OUTER);
+ for (index = 0; index < NUM_CHANNELS_OUTER; ++index)
+ _channelsInUse[index] = false;
_driver = MidiDriver::createMidi(midiDriver);
int statusCode = _driver->open();
@@ -54,7 +56,7 @@ SoundManager::SoundManager() {
if (_nativeMT32)
_driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
- for (int index = 0; index < NUM_CHANNELS_INNER; ++index) {
+ for (index = 0; index < NUM_CHANNELS_INNER; ++index) {
_channelsInner[index].midiChannel = _driver->allocateChannel();
_channelsInner[index].volume = DEFAULT_VOLUME;
}