diff options
author | Matthew Stewart | 2018-06-11 18:14:34 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | 688c98890929acf4fb6a43a115e28f250fb7d466 (patch) | |
tree | 157417594bf0a728f7dbb3316f38a731ff184822 /engines | |
parent | 487c3fda3252536fdd57e9db4020d23f20069aae (diff) | |
download | scummvm-rg350-688c98890929acf4fb6a43a115e28f250fb7d466.tar.gz scummvm-rg350-688c98890929acf4fb6a43a115e28f250fb7d466.tar.bz2 scummvm-rg350-688c98890929acf4fb6a43a115e28f250fb7d466.zip |
STARTREK: Fix some uninitialized variables
Diffstat (limited to 'engines')
-rw-r--r-- | engines/startrek/graphics.cpp | 3 | ||||
-rw-r--r-- | engines/startrek/object.h | 44 | ||||
-rw-r--r-- | engines/startrek/startrek.cpp | 2 |
3 files changed, 48 insertions, 1 deletions
diff --git a/engines/startrek/graphics.cpp b/engines/startrek/graphics.cpp index 145a156b1e..fc371545d1 100644 --- a/engines/startrek/graphics.cpp +++ b/engines/startrek/graphics.cpp @@ -51,6 +51,9 @@ Graphics::Graphics(StarTrekEngine *vm) : _vm(vm), _egaMode(false) { _palData = new byte[256 * 3]; _lutData = new byte[256 * 3]; + memset(_palData, 0, 256 * 3); + memset(_lutData, 0, 256 * 3); + _paletteFadeLevel = 0; _mouseLocked = false; _mouseToBeShown = false; diff --git a/engines/startrek/object.h b/engines/startrek/object.h index 6a7911636f..92597881ec 100644 --- a/engines/startrek/object.h +++ b/engines/startrek/object.h @@ -122,6 +122,50 @@ struct Actor { uint16 fielda2; uint16 fielda4; uint16 fielda6; + +public: + Actor() : + spriteDrawn(), + //animFilename[16], + animType(), + sprite(), + //bitmapFilename[10], + scale(), + animFile(), + numAnimFrames(), + animFrame(), + frameToStartNextAnim(), + pos(), + field60(), + field62(), + triggerActionWhenAnimFinished(), + finishedAnimActionParam(), + //animationString2[8](), + field70(), + field72(), + field74(), + field76(), + iwSrcPosition(), + iwDestPosition(), + granularPosX(), + granularPosY(), + speedX(), + speedY(), + + dest(), + field90(), + field92(), + + direction(), + field94(), + field96(), + //char animationString[10]; + + fielda2(), + fielda4(), + fielda6() + {} + }; } diff --git a/engines/startrek/startrek.cpp b/engines/startrek/startrek.cpp index c623c1b0a6..82ac94e673 100644 --- a/engines/startrek/startrek.cpp +++ b/engines/startrek/startrek.cpp @@ -1134,7 +1134,7 @@ bool StarTrekEngine::walkActiveObjectToHotspot() { int objectIndex; if (_awayMission.activeAction != ACTION_USE) objectIndex = OBJECT_KIRK; - else if (_awayMission.activeObject >= OBJECT_KIRK && _awayMission.activeObject <= OBJECT_REDSHIRT) + else if (_awayMission.activeObject <= OBJECT_REDSHIRT) objectIndex = _awayMission.activeObject; else if (_awayMission.activeObject >= ITEMS_START && _awayMission.activeObject <= ITEMS_END) { // FIXME: "<= ITEMS_END" doesn't make sense? if (_awayMission.activeObject == OBJECT_ISTRICOR) |