diff options
author | Strangerke | 2014-03-19 19:45:51 +0100 |
---|---|---|
committer | Strangerke | 2014-03-19 19:45:51 +0100 |
commit | 1a18d1a50e379070e70585336b61ed7a26aa652c (patch) | |
tree | b118e0d5d0df75d2a5021eabca3dbd633bfc3c82 | |
parent | bd0f37fe656337c1ea2bae2cd3c67b3ba8092844 (diff) | |
download | scummvm-rg350-1a18d1a50e379070e70585336b61ed7a26aa652c.tar.gz scummvm-rg350-1a18d1a50e379070e70585336b61ed7a26aa652c.tar.bz2 scummvm-rg350-1a18d1a50e379070e70585336b61ed7a26aa652c.zip |
NEVERHOOD: Fix some uninitialized variables
-rw-r--r-- | engines/neverhood/modules/module1000.cpp | 2 | ||||
-rw-r--r-- | engines/neverhood/modules/module1300.cpp | 4 | ||||
-rw-r--r-- | engines/neverhood/modules/module2700.cpp | 2 | ||||
-rw-r--r-- | engines/neverhood/modules/module2900.cpp | 3 |
4 files changed, 6 insertions, 5 deletions
diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp index a3b5bc67b5..b19ba05b32 100644 --- a/engines/neverhood/modules/module1000.cpp +++ b/engines/neverhood/modules/module1000.cpp @@ -228,7 +228,7 @@ uint32 Scene1001::handleMessage(int messageNum, const MessageParam ¶m, Entit } Scene1002::Scene1002(NeverhoodEngine *vm, Module *parentModule, int which) - : Scene(vm, parentModule), _isKlaymenFloor(false), _isClimbingLadder(false) { + : Scene(vm, parentModule), _isKlaymenFloor(false), _isClimbingLadder(false), _asKlaymenPeekHand(nullptr) { NRect tempClipRect; Sprite *tempSprite; diff --git a/engines/neverhood/modules/module1300.cpp b/engines/neverhood/modules/module1300.cpp index d806019e6c..60ff0411a6 100644 --- a/engines/neverhood/modules/module1300.cpp +++ b/engines/neverhood/modules/module1300.cpp @@ -603,7 +603,7 @@ uint32 Scene1305::handleMessage(int messageNum, const MessageParam ¶m, Entit } Scene1306::Scene1306(NeverhoodEngine *vm, Module *parentModule, int which) - : Scene(vm, parentModule) { + : Scene(vm, parentModule), _asKey(nullptr) { if (getGlobalVar(V_HAS_FINAL_KEY) && getGlobalVar(V_KEY3_LOCATION) == 0) setGlobalVar(V_KEY3_LOCATION, 4); @@ -683,7 +683,6 @@ Scene1306::Scene1306(NeverhoodEngine *vm, Module *parentModule, int which) clearRectList(); sendMessage(_asElevator, NM_KLAYMEN_OPEN_DOOR, 0); } - } Scene1306::~Scene1306() { @@ -942,6 +941,7 @@ Scene1308::Scene1308(NeverhoodEngine *vm, Module *parentModule, int which) _sprite2 = insertStaticSprite(0x40043120, 995); _sprite3 = insertStaticSprite(0x43003100, 995); _sprite4 = NULL; + _sprite5 = nullptr; if (which < 0) { // Restoring game diff --git a/engines/neverhood/modules/module2700.cpp b/engines/neverhood/modules/module2700.cpp index 9399981cfd..2a112435fc 100644 --- a/engines/neverhood/modules/module2700.cpp +++ b/engines/neverhood/modules/module2700.cpp @@ -84,7 +84,7 @@ static const uint32 kScene2725StaticSprites[] = { }; Module2700::Module2700(NeverhoodEngine *vm, Module *parentModule, int which) - : Module(vm, parentModule), _soundIndex(0), _radioMusicInitialized(false) { + : Module(vm, parentModule), _soundIndex(0), _radioMusicInitialized(false), _musicFileHash(0) { _vm->_soundMan->addMusic(0x42212411, 0x04020210); _vm->_soundMan->startMusic(0x04020210, 24, 2); diff --git a/engines/neverhood/modules/module2900.cpp b/engines/neverhood/modules/module2900.cpp index 3bf98eca35..69186514a2 100644 --- a/engines/neverhood/modules/module2900.cpp +++ b/engines/neverhood/modules/module2900.cpp @@ -34,11 +34,12 @@ namespace Neverhood { Module2900::Module2900(NeverhoodEngine *vm, Module *parentModule, int which) : Module(vm, parentModule) { + _teleporterModuleResult = -1; + if (which >= 0) setGlobalVar(V_TELEPORTER_WHICH, which); createScene(0, 0); - } void Module2900::createScene(int sceneNum, int which) { |