aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/sound/sound_manager.cpp4
-rw-r--r--engines/titanic/support/direct_draw.cpp7
-rw-r--r--engines/titanic/support/direct_draw.h6
3 files changed, 6 insertions, 11 deletions
diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp
index ae806feb52..e23fb1d207 100644
--- a/engines/titanic/sound/sound_manager.cpp
+++ b/engines/titanic/sound/sound_manager.cpp
@@ -426,7 +426,7 @@ void QSoundManager::soundFreed(Audio::SoundHandle &handle) {
}
void QSoundManager::updateVolume(int channel, uint panRate) {
- uint volume = _channelsVolume[channel] * 327;
+ double volume = _channelsVolume[channel] * 327;
switch (_channelsMode[channel]) {
case 0:
@@ -451,7 +451,7 @@ void QSoundManager::updateVolume(int channel, uint panRate) {
volume = (_musicPercent * volume) / 100;
qsWaveMixSetPanRate(channel, 0, panRate);
- qsWaveMixSetVolume(channel, 0, volume);
+ qsWaveMixSetVolume(channel, 0, (uint)volume);
}
void QSoundManager::updateVolumes() {
diff --git a/engines/titanic/support/direct_draw.cpp b/engines/titanic/support/direct_draw.cpp
index 3cec9377bb..8e510861ae 100644
--- a/engines/titanic/support/direct_draw.cpp
+++ b/engines/titanic/support/direct_draw.cpp
@@ -28,9 +28,8 @@
namespace Titanic {
-DirectDraw::DirectDraw(TitanicEngine *vm) : _vm(vm),
- _windowed(false), _fieldC(0), _width(0), _height(0),
- _bpp(0), _numBackSurfaces(0), _field24(0) {
+DirectDraw::DirectDraw() : _windowed(false), _width(0), _height(0),
+ _bpp(0), _numBackSurfaces(0) {
}
void DirectDraw::setDisplayMode(int width, int height, int bpp, int refreshRate) {
@@ -55,7 +54,7 @@ DirectDrawSurface *DirectDraw::createSurfaceFromDesc(const DDSurfaceDesc &desc)
/*------------------------------------------------------------------------*/
-DirectDrawManager::DirectDrawManager(TitanicEngine *vm, bool windowed) : _directDraw(vm) {
+DirectDrawManager::DirectDrawManager(TitanicEngine *vm, bool windowed) {
_mainSurface = nullptr;
_backSurfaces[0] = _backSurfaces[1] = nullptr;
_directDraw._windowed = windowed;
diff --git a/engines/titanic/support/direct_draw.h b/engines/titanic/support/direct_draw.h
index 4b5596896a..a7e9cc8d93 100644
--- a/engines/titanic/support/direct_draw.h
+++ b/engines/titanic/support/direct_draw.h
@@ -32,18 +32,14 @@ namespace Titanic {
class TitanicEngine;
class DirectDraw {
-private:
- TitanicEngine *_vm;
public:
bool _windowed;
- int _fieldC;
int _width;
int _height;
int _bpp;
int _numBackSurfaces;
- int _field24;
public:
- DirectDraw(TitanicEngine *vm);
+ DirectDraw();
/**
* Sets a new display mode