diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-12-14 02:21:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-12-14 02:21:30 +0300 |
commit | 78afa659472cc4cfca37056088ed9cb9f79845eb (patch) | |
tree | 82396c65956514c58fdd696dc71e7400bb6d1379 /src | |
parent | ee1fc0b63cb7f27df85c43474497b805df6e31f5 (diff) | |
download | manaplus-78afa659472cc4cfca37056088ed9cb9f79845eb.tar.gz manaplus-78afa659472cc4cfca37056088ed9cb9f79845eb.tar.bz2 manaplus-78afa659472cc4cfca37056088ed9cb9f79845eb.tar.xz manaplus-78afa659472cc4cfca37056088ed9cb9f79845eb.zip |
Remove default parameters from soundmanager.
Diffstat (limited to 'src')
-rw-r--r-- | src/being/being.cpp | 5 | ||||
-rw-r--r-- | src/being/localplayer.cpp | 4 | ||||
-rw-r--r-- | src/effectmanager.cpp | 6 | ||||
-rw-r--r-- | src/game.cpp | 4 | ||||
-rw-r--r-- | src/notifymanager.cpp | 10 | ||||
-rw-r--r-- | src/soundmanager.h | 9 | ||||
-rw-r--r-- | src/statuseffect.cpp | 2 |
7 files changed, 21 insertions, 19 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 618989bd5..daf8cd542 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1946,8 +1946,9 @@ void Being::logic() restrict2 const int time2 = tick_time; if (time2 > mNextSound.time) { - soundManager.playSfx(sound->sound, mNextSound.x, mNextSound.y); - + soundManager.playSfx(sound->sound, + mNextSound.x, + mNextSound.y); mNextSound.sound = nullptr; mNextSound.time = time2 + sound->delay; } diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 3eb2a32af..53ab03d16 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -2126,9 +2126,9 @@ void LocalPlayer::updateMusic() const if (str != soundManager.getCurrentMusicFile()) { if (str.empty()) - soundManager.fadeOutMusic(); + soundManager.fadeOutMusic(1000); else - soundManager.fadeOutAndPlayMusic(str); + soundManager.fadeOutAndPlayMusic(str, 1000); } } } diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp index 79886293f..3f87bfece 100644 --- a/src/effectmanager.cpp +++ b/src/effectmanager.cpp @@ -137,7 +137,7 @@ bool EffectManager::trigger(const int id, being->controlAutoParticle(selfFX); } if (!effect.sfx.empty()) - soundManager.playSfx(effect.sfx); + soundManager.playSfx(effect.sfx, 0, 0); if (!effect.sprite.empty()) being->addEffect(effect.sprite); return rValue; @@ -168,7 +168,7 @@ Particle *EffectManager::triggerReturn(const int id, being->controlCustomParticle(rValue); } if (!effect.sfx.empty()) - soundManager.playSfx(effect.sfx); + soundManager.playSfx(effect.sfx, 0, 0); if (!effect.sprite.empty()) being->addEffect(effect.sprite); return rValue; @@ -203,7 +203,7 @@ bool EffectManager::trigger(const int id, mTimers.push_back(ParticleTimer(particle, endTime)); } if (!effect.sfx.empty()) - soundManager.playSfx(effect.sfx); + soundManager.playSfx(effect.sfx, 0, 0); return rValue; } } diff --git a/src/game.cpp b/src/game.cpp index 488651f15..caea1733b 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1150,9 +1150,9 @@ void Game::changeMap(const std::string &mapPath) if (newMusic != oldMusic) { if (newMusic.empty()) - soundManager.fadeOutMusic(); + soundManager.fadeOutMusic(1000); else - soundManager.fadeOutAndPlayMusic(newMusic); + soundManager.fadeOutAndPlayMusic(newMusic, 1000); } if (mCurrentMap != nullptr) diff --git a/src/notifymanager.cpp b/src/notifymanager.cpp index af07cbc4f..ce01c9989 100644 --- a/src/notifymanager.cpp +++ b/src/notifymanager.cpp @@ -88,7 +88,7 @@ namespace NotifyManager const NotificationInfo &info = notifications[message]; if (*info.text == 0) { - soundManager.playSfx(SoundDB::getSound(message)); + soundManager.playSfx(SoundDB::getSound(message), 0, 0); return; } @@ -131,7 +131,7 @@ namespace NotifyManager default: break; } - soundManager.playSfx(SoundDB::getSound(message)); + soundManager.playSfx(SoundDB::getSound(message), 0, 0); } void notify(const unsigned int message, const int num) @@ -151,7 +151,7 @@ namespace NotifyManager IgnoreRecord_false, TryRemoveColors_true); } - soundManager.playSfx(SoundDB::getSound(message)); + soundManager.playSfx(SoundDB::getSound(message), 0, 0); } void notify(const unsigned int message, const std::string &str) @@ -164,7 +164,7 @@ namespace NotifyManager const NotificationInfo &info = notifications[message]; if (*info.text == 0) { - soundManager.playSfx(SoundDB::getSound(message)); + soundManager.playSfx(SoundDB::getSound(message), 0, 0); return; } switch (info.flags) @@ -198,7 +198,7 @@ namespace NotifyManager default: break; } - soundManager.playSfx(SoundDB::getSound(message)); + soundManager.playSfx(SoundDB::getSound(message), 0, 0); } int getIndexBySound(const std::string &sound) diff --git a/src/soundmanager.h b/src/soundmanager.h index f4dca4cd1..beaa48085 100644 --- a/src/soundmanager.h +++ b/src/soundmanager.h @@ -89,7 +89,7 @@ class SoundManager final : public ConfigListener * * @param ms Duration of fade-out effect (ms) */ - void fadeOutMusic(const int ms = 1000); + void fadeOutMusic(const int ms); /** * Fades out a background music and play a new one. @@ -98,7 +98,7 @@ class SoundManager final : public ConfigListener * @param ms Duration of fade-out effect (ms) */ void fadeOutAndPlayMusic(const std::string &fileName, - const int ms = 1000); + const int ms); constexpr static int getMaxVolume() A_WARN_UNUSED { return MIX_MAX_VOLUME; } @@ -112,8 +112,9 @@ class SoundManager final : public ConfigListener * * @param path The resource path to the sound file. */ - void playSfx(const std::string &path, const int x = 0, - const int y = 0) const; + void playSfx(const std::string &path, + const int x, + const int y) const; /** * Plays an item for gui. diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp index 0ff4b2b6a..5892a95e5 100644 --- a/src/statuseffect.cpp +++ b/src/statuseffect.cpp @@ -59,7 +59,7 @@ StatusEffect::~StatusEffect() void StatusEffect::playSFX() const { if (!mSFXEffect.empty()) - soundManager.playSfx(mSFXEffect); + soundManager.playSfx(mSFXEffect, 0, 0); } void StatusEffect::deliverMessage() const |