diff options
Diffstat (limited to 'engines/tsage/sound.cpp')
-rw-r--r-- | engines/tsage/sound.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp index b61e63236b..9df5a6666b 100644 --- a/engines/tsage/sound.cpp +++ b/engines/tsage/sound.cpp @@ -36,7 +36,7 @@ static SoundManager *_soundManager = NULL; SoundManager::SoundManager() { _soundManager = this; - __sndmgrReady = false; + _sndmgrReady = false; _ourSndResVersion = 0x102; _ourDrvResVersion = 0x10A; @@ -52,7 +52,7 @@ SoundManager::SoundManager() { } SoundManager::~SoundManager() { - if (__sndmgrReady) { + if (_sndmgrReady) { Common::StackLock slock(_serverDisabledMutex); g_vm->_mixer->stopAll(); @@ -83,7 +83,7 @@ SoundManager::~SoundManager() { } void SoundManager::postInit() { - if (!__sndmgrReady) { + if (!_sndmgrReady) { g_saver->addSaveNotifier(&SoundManager::saveNotifier); g_saver->addLoadNotifier(&SoundManager::loadNotifier); g_saver->addListener(this); @@ -94,7 +94,7 @@ void SoundManager::postInit() { // thread, and doesn't get too far ahead, I've left it to the AdlibSoundDriver class to // call the update method, rather than having it be called separately // g_system->getTimerManager()->installTimerProc(_sfUpdateCallback, 1000000 / SOUND_FREQUENCY, NULL, "tsageSoundUpdate"); - __sndmgrReady = true; + _sndmgrReady = true; } } @@ -136,7 +136,7 @@ void SoundManager::update() { } Common::List<SoundDriverEntry> &SoundManager::buildDriverList(bool detectFlag) { - assert(__sndmgrReady); + assert(_sndmgrReady); _availableDrivers.clear(); // Build up a list of available drivers. Currently we only implement an Adlib music @@ -549,7 +549,7 @@ void SoundManager::loadNotifier(bool postFlag) { void SoundManager::loadNotifierProc(bool postFlag) { if (!postFlag) { // Stop any currently playing sounds - if (__sndmgrReady) { + if (_sndmgrReady) { Common::StackLock slock(_serverDisabledMutex); for (Common::List<Sound *>::iterator i = _soundList.begin(); i != _soundList.end(); ) { @@ -569,7 +569,7 @@ void SoundManager::loadNotifierProc(bool postFlag) { void SoundManager::listenerSynchronize(Serializer &s) { s.validate("SoundManager"); - assert(__sndmgrReady && _driversDetected); + assert(_sndmgrReady && _driversDetected); if (s.getVersion() < 6) return; @@ -798,7 +798,7 @@ void SoundManager::_sfRethinkVoiceTypes() { continue; _sfUpdateVoiceStructs(); - Common::set_to(sound->_chWork, sound->_chWork + SOUND_ARR_SIZE, false); + Common::fill(sound->_chWork, sound->_chWork + SOUND_ARR_SIZE, false); for (;;) { // Scan for sub priority @@ -1485,7 +1485,7 @@ Sound::Sound() { memset(_chNumVoices, 0, SOUND_ARR_SIZE * sizeof(int)); memset(_chSubPriority, 0, SOUND_ARR_SIZE * sizeof(int)); memset(_chFlags, 0, SOUND_ARR_SIZE * sizeof(int)); - Common::set_to(_chWork, _chWork + SOUND_ARR_SIZE, false); + Common::fill(_chWork, _chWork + SOUND_ARR_SIZE, false); memset(_channelData, 0, SOUND_ARR_SIZE * sizeof(byte *)); memset(_trkChannel, 0, SOUND_ARR_SIZE * sizeof(int)); memset(_trkState, 0, SOUND_ARR_SIZE * sizeof(int)); @@ -2557,7 +2557,7 @@ AdlibSoundDriver::AdlibSoundDriver(): SoundDriver() { _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); - Common::set_to(_channelVoiced, _channelVoiced + ADLIB_CHANNEL_COUNT, false); + Common::fill(_channelVoiced, _channelVoiced + ADLIB_CHANNEL_COUNT, false); memset(_channelVolume, 0, ADLIB_CHANNEL_COUNT * sizeof(int)); memset(_v4405E, 0, ADLIB_CHANNEL_COUNT * sizeof(int)); memset(_v44067, 0, ADLIB_CHANNEL_COUNT * sizeof(int)); @@ -2565,7 +2565,7 @@ AdlibSoundDriver::AdlibSoundDriver(): SoundDriver() { memset(_v44079, 0, ADLIB_CHANNEL_COUNT * sizeof(int)); memset(_v44082, 0, ADLIB_CHANNEL_COUNT * sizeof(int)); _v44082[ADLIB_CHANNEL_COUNT] = 0x90; - Common::set_to(_pitchBlend, _pitchBlend + ADLIB_CHANNEL_COUNT, 0x2000); + Common::fill(_pitchBlend, _pitchBlend + ADLIB_CHANNEL_COUNT, 0x2000); memset(_v4409E, 0, ADLIB_CHANNEL_COUNT * sizeof(int)); _patchData = NULL; } |