aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-01-03 07:56:24 +0000
committerTorbjörn Andersson2007-01-03 07:56:24 +0000
commit85b780baf1ffbb1a3b77b8a6b7916a45364a74c4 (patch)
treee96f5ab7d273f7cc0a97aaabdd3d46dfa386bc84 /engines/sword2
parent6496482de5884b71fa3d263725c4f0ab41ef32d3 (diff)
downloadscummvm-rg350-85b780baf1ffbb1a3b77b8a6b7916a45364a74c4.tar.gz
scummvm-rg350-85b780baf1ffbb1a3b77b8a6b7916a45364a74c4.tar.bz2
scummvm-rg350-85b780baf1ffbb1a3b77b8a6b7916a45364a74c4.zip
Use FRAMES_PER_SECOND, not getFramesPerSecond(), to calculate the number of
frames before a sound effect is triggered. This is not dependent on _gameSpeed. svn-id: r24971
Diffstat (limited to 'engines/sword2')
-rw-r--r--engines/sword2/sound.cpp2
-rw-r--r--engines/sword2/sword2.cpp2
-rw-r--r--engines/sword2/sword2.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/engines/sword2/sound.cpp b/engines/sword2/sound.cpp
index 5beff2772d..d8b6b99cea 100644
--- a/engines/sword2/sound.cpp
+++ b/engines/sword2/sound.cpp
@@ -219,7 +219,7 @@ void Sound::queueFx(int32 res, int32 type, int32 delay, int32 volume, int32 pan)
// effects, however, it's the average number of
// seconds between playing the sound, so we
// have to multiply by the frame rate.
- delay *= _vm->getFramesPerSecond();
+ delay *= FRAMES_PER_SECOND;
}
volume = (volume * Audio::Mixer::kMaxChannelVolume) / 16;
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 544c55e00a..adaeef1ba5 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -42,8 +42,6 @@
#include "sword2/screen.h"
#include "sword2/sound.h"
-#define FRAMES_PER_SECOND 12
-
namespace Sword2 {
struct GameSettings {
diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h
index 4e7de99833..3acdce0eeb 100644
--- a/engines/sword2/sword2.h
+++ b/engines/sword2/sword2.h
@@ -22,6 +22,8 @@
#ifndef SWORD2_H
#define SWORD2_H
+#define FRAMES_PER_SECOND 12
+
// Enable this to make it possible to clear the mouse cursor luggage by
// right-clicking. The original didn't do this, but it feels natural to me.
// However, I'm afraid that it'll interfer badly with parts of the game, so