diff options
author | Paul Gilbert | 2016-08-31 19:46:57 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-31 19:46:57 -0400 |
commit | 15ebf3a12aae014f5b6e3cd0125eab4e421aa46b (patch) | |
tree | 97ef61b903b602027d042faf1460d01068024c12 | |
parent | 1fe8b6382519456ea26f1023576193c3c4e41b88 (diff) | |
download | scummvm-rg350-15ebf3a12aae014f5b6e3cd0125eab4e421aa46b.tar.gz scummvm-rg350-15ebf3a12aae014f5b6e3cd0125eab4e421aa46b.tar.bz2 scummvm-rg350-15ebf3a12aae014f5b6e3cd0125eab4e421aa46b.zip |
TITANIC: Fixes to warnings, and removal of some unneeded fields
-rw-r--r-- | engines/titanic/sound/sound_manager.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/support/direct_draw.cpp | 7 | ||||
-rw-r--r-- | engines/titanic/support/direct_draw.h | 6 |
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 |