diff options
author | Strangerke | 2014-05-28 07:18:14 +0200 |
---|---|---|
committer | Strangerke | 2014-05-28 07:19:18 +0200 |
commit | 0eb5a7f0b27cdf49c4815fb02b9ee76959154be8 (patch) | |
tree | a0bd5aaa2caef434cf506fa38ee0e3e4623283f0 | |
parent | 1ea4b36c3b6f959048cab0c6a5567fefcc390cc3 (diff) | |
download | scummvm-rg350-0eb5a7f0b27cdf49c4815fb02b9ee76959154be8.tar.gz scummvm-rg350-0eb5a7f0b27cdf49c4815fb02b9ee76959154be8.tar.bz2 scummvm-rg350-0eb5a7f0b27cdf49c4815fb02b9ee76959154be8.zip |
MADS: Fix some more missing initializations
-rw-r--r-- | engines/mads/nebular/sound_nebular.cpp | 7 | ||||
-rw-r--r-- | engines/mads/player.cpp | 8 | ||||
-rw-r--r-- | engines/mads/rails.cpp | 2 | ||||
-rw-r--r-- | engines/mads/scene_data.cpp | 1 | ||||
-rw-r--r-- | engines/mads/screen.cpp | 1 |
5 files changed, 19 insertions, 0 deletions
diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp index 577ed26d13..90f7cf0212 100644 --- a/engines/mads/nebular/sound_nebular.cpp +++ b/engines/mads/nebular/sound_nebular.cpp @@ -185,6 +185,13 @@ ASound::ASound(Audio::Mixer *mixer, const Common::String &filename, int dataOffs _samplesPerCallback = getRate() / CALLBACKS_PER_SECOND; _samplesPerCallbackRemainder = getRate() % CALLBACKS_PER_SECOND; + for (int i = 0; i < 11; ++i) { + _channelData[i]._field0 = 0; + _channelData[i]._freqMask = 0; + _channelData[i]._freqBase = 0; + _channelData[i]._field6 = 0; + } + AdlibChannel::_channelsEnabled = false; // Store passed parameters, and setup OPL diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp index aaef9dffdf..ed585cf636 100644 --- a/engines/mads/player.cpp +++ b/engines/mads/player.cpp @@ -72,6 +72,14 @@ Player::Player(MADSEngine *vm) _frameListIndex = 0; _stopWalkerIndex = 0; _totalDistance = 0; + _distAccum = 0; + _pixelAccum = 0; + _deltaDistance = 0; + _xDirection = 0; + _yDirection = 0; + _moving = false; + _walkOffScreen = 0; + _walkOffScreenSceneId = -1; Common::fill(&_stopWalkerList[0], &_stopWalkerList[12], 0); Common::fill(&_stopWalkerTrigger[0], &_stopWalkerTrigger[12], 0); diff --git a/engines/mads/rails.cpp b/engines/mads/rails.cpp index 7ae0d92265..7f8a56d21b 100644 --- a/engines/mads/rails.cpp +++ b/engines/mads/rails.cpp @@ -43,6 +43,8 @@ void WalkNode::load(Common::SeekableReadStream *f) { Rails::Rails() { _depthSurface = nullptr; _routeLength = 0; + _depthStyle = 0; + _next = 0; } void Rails::load(const WalkNodeList &nodes, DepthSurface *depthSurface, int depthStyle) { diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp index 5656ac4069..6697041677 100644 --- a/engines/mads/scene_data.cpp +++ b/engines/mads/scene_data.cpp @@ -47,6 +47,7 @@ KernelMessage::KernelMessage() { _actionDetails._verbId = VERB_NONE; _actionDetails._objectNameId = 0; _actionDetails._indirectObjectId = 0; + _textDisplayIndex = 0; } /*------------------------------------------------------------------------*/ diff --git a/engines/mads/screen.cpp b/engines/mads/screen.cpp index dacd20a348..bcc41a167d 100644 --- a/engines/mads/screen.cpp +++ b/engines/mads/screen.cpp @@ -247,6 +247,7 @@ ScreenObject::ScreenObject() { _category = CAT_NONE; _descId = 0; _layer = 0; + _active = false; } /*------------------------------------------------------------------------*/ |