aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
authorStrangerke2016-01-29 07:10:32 +0100
committerStrangerke2016-01-29 07:10:32 +0100
commitdbf3e29b2d66c3b223c9e976af2a18fd91247bfe (patch)
tree4aebd39d24bcd7d7acfdc053103a02a94e93000d /engines/access
parent202cb1210ad0e29bcb2da406c2f23b847242fd2b (diff)
downloadscummvm-rg350-dbf3e29b2d66c3b223c9e976af2a18fd91247bfe.tar.gz
scummvm-rg350-dbf3e29b2d66c3b223c9e976af2a18fd91247bfe.tar.bz2
scummvm-rg350-dbf3e29b2d66c3b223c9e976af2a18fd91247bfe.zip
ACCESS: Fix some uninitialized variables
Diffstat (limited to 'engines/access')
-rw-r--r--engines/access/animation.cpp7
-rw-r--r--engines/access/bubble_box.cpp3
-rw-r--r--engines/access/martian/martian_game.cpp2
3 files changed, 11 insertions, 1 deletions
diff --git a/engines/access/animation.cpp b/engines/access/animation.cpp
index 259396f37e..22de0fcb60 100644
--- a/engines/access/animation.cpp
+++ b/engines/access/animation.cpp
@@ -57,8 +57,13 @@ Animation::Animation(AccessEngine *vm, Common::SeekableReadStream *stream) : Man
// WORKAROUND: In Amazon floppy English, there's an animation associated with
// the librarian that isn't used, and has junk data. Luckily, it's animation
// type is also invalid, so if the _type isn't in range, exit immediately
- if (_type < 0 || _type > 7)
+ if (_type < 0 || _type > 7) {
+ _scaling = -1;
+ _frameNumber = -1;
+ _initialTicks = _countdownTicks = 0;
+ _loopCount = _currentLoopCount = 0;
return;
+ }
_scaling = stream->readSByte();
stream->readByte(); // unk
diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp
index 831ba507a1..ef32e96f59 100644
--- a/engines/access/bubble_box.cpp
+++ b/engines/access/bubble_box.cpp
@@ -46,6 +46,9 @@ BubbleBox::BubbleBox(AccessEngine *vm, Access::BoxType type, int x, int y, int w
}
_btnUpPos = Common::Rect(0, 0, 0, 0);
_btnDownPos = Common::Rect(0, 0, 0, 0);
+ _startItem = _startBox = 0;
+ _charCol = 0;
+ _rowOff = 0;
}
void BubbleBox::load(Common::SeekableReadStream *stream) {
diff --git a/engines/access/martian/martian_game.cpp b/engines/access/martian/martian_game.cpp
index 4e858568fe..00ee6c9776 100644
--- a/engines/access/martian/martian_game.cpp
+++ b/engines/access/martian/martian_game.cpp
@@ -36,6 +36,8 @@ MartianEngine::MartianEngine(OSystem *syst, const AccessGameDescription *gameDes
MartianEngine::~MartianEngine() {
_introObjects = _spec7Objects = nullptr;
+ _skipStart = false;
+ _creditsStream = nullptr;
}
void MartianEngine::initObjects() {