MOHAWK: Fix uninitialized memory accesses in the Myst stacks

This commit is contained in:
Bastien Bouclet 2016-02-07 14:50:28 +01:00
parent 01bfd37919
commit 22882f54e1
4 changed files with 10 additions and 0 deletions

View File

@ -37,6 +37,7 @@ namespace MystStacks {
Credits::Credits(MohawkEngine_Myst *vm) : MystScriptParser(vm) {
setupOpcodes();
_curImage = 0;
}
Credits::~Credits() {

View File

@ -40,6 +40,9 @@ Mechanical::Mechanical(MohawkEngine_Myst *vm) :
setupOpcodes();
_elevatorGoingMiddle = false;
_elevatorPosition = 0;
_crystalLit = 0;
_mystStaircaseState = false;
_fortressPosition = 0;

View File

@ -41,6 +41,10 @@ Selenitic::Selenitic(MohawkEngine_Myst *vm) :
setupOpcodes();
_mazeRunnerPosition = 288;
_mazeRunnerDirection = 8;
_mazeRunnerDoorOpened = false;
_soundReceiverDirection = 0;
_soundReceiverStartTime = 0;
}
Selenitic::~Selenitic() {

View File

@ -50,6 +50,8 @@ Stoneship::Stoneship(MohawkEngine_Myst *vm) :
_chestDrawersOpen = 0;
_chestAchenarBottomDrawerClosed = 1;
_brotherDoorOpen = 0;
// Drop key
if (_state.trapdoorKeyState == 1)
_state.trapdoorKeyState = 2;