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
This commit is contained in:
Torbjörn Andersson 2007-01-03 07:56:24 +00:00
parent 6496482de5
commit 85b780baf1
3 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -42,8 +42,6 @@
#include "sword2/screen.h"
#include "sword2/sound.h"
#define FRAMES_PER_SECOND 12
namespace Sword2 {
struct GameSettings {

View File

@ -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