diff options
author | Strangerke | 2013-10-28 07:32:15 +0100 |
---|---|---|
committer | Strangerke | 2013-10-28 07:49:38 +0100 |
commit | a6fbfd958d372c63669f6fdc82bff39b3f151c09 (patch) | |
tree | f78f1e564a803ec6d5bc809ef5dbeb7ea95fdcaa /engines/avalanche | |
parent | 9961e0b83f3dd6bbae77657c7d049f69b936323d (diff) | |
download | scummvm-rg350-a6fbfd958d372c63669f6fdc82bff39b3f151c09.tar.gz scummvm-rg350-a6fbfd958d372c63669f6fdc82bff39b3f151c09.tar.bz2 scummvm-rg350-a6fbfd958d372c63669f6fdc82bff39b3f151c09.zip |
AVALANCHE: Fix CID 1109677, 1109678, 1109694, 1109695
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/animation.cpp | 38 | ||||
-rw-r--r-- | engines/avalanche/animation.h | 3 | ||||
-rw-r--r-- | engines/avalanche/menu.cpp | 8 | ||||
-rw-r--r-- | engines/avalanche/menu.h | 1 |
4 files changed, 49 insertions, 1 deletions
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp index ef30faa87c..4ddeedce94 100644 --- a/engines/avalanche/animation.cpp +++ b/engines/avalanche/animation.cpp @@ -48,6 +48,35 @@ const int32 Animation::kCatacombMap[8][8] = { AnimationType::AnimationType(Animation *anim) { _anim = anim; + + _yLength = 0; + for (int i = 0; i < 24; i++) { + _mani[i] = nullptr; + _sil[i] = nullptr; + } + _frameNum = 0; + _seq = 0; + _characterId = 0; + _count = 0; + _facingDir = kDirNone; + _stepNum = 0; + _x = 0; + _y = 0; + _moveX = 0; + _moveY = 0; + _quick = false; + _visible = false; + _homing = false; + _doCheck = false; + _homingX = 0; + _homingY = 0; + _speedX = 0; + _speedY = 0; + _vanishIfStill = false; + _callEachStepFl = false; + _eachStepProc = Animation::kProcNone; + _fgBubbleCol = kColorWhite; + _bgBubbleCol = kColorBlack; } /** @@ -370,6 +399,13 @@ Animation::Animation(AvalancheEngine *vm) { for (int16 i = 0; i < kSpriteNumbMax; i++) { _sprites[i] = new AnimationType(this); } + + _direction = kDirNone; + _oldDirection = kDirNone; + _arrowTriggered = false; + _geidaSpin = 0; + _geidaTime = 0; + _sayWhat = 0; } Animation::~Animation() { @@ -1202,6 +1238,8 @@ void Animation::animLink() { case kProcGeida : geidaProcs(i); break; + default: + break; } } } diff --git a/engines/avalanche/animation.h b/engines/avalanche/animation.h index 33f6ab02a6..3223615985 100644 --- a/engines/avalanche/animation.h +++ b/engines/avalanche/animation.h @@ -97,7 +97,8 @@ public: static const byte kSpriteNumbMax = 5; // current max no. of sprites enum Proc { - kProcFollowAvvyY = 1, + kProcNone = 0, + kProcFollowAvvyY, kProcBackAndForth, kProcFaceAvvy, kProcArrow, diff --git a/engines/avalanche/menu.cpp b/engines/avalanche/menu.cpp index a3b61b4af1..7c37b79bc8 100644 --- a/engines/avalanche/menu.cpp +++ b/engines/avalanche/menu.cpp @@ -207,6 +207,11 @@ void MenuItem::parseKey(char c) { _menu->_vm->_sound->blip(); } +MenuBar::MenuBar() { + _menuNum = 0; + _menu = nullptr; +} + void MenuBar::init(Menu *menu) { _menu = menu; _menuNum = 0; @@ -261,6 +266,9 @@ Menu::Menu(AvalancheEngine *vm) { _vm = vm; _activeMenuItem.init(this); _menuBar.init(this); + + _menuActive = false; + _lastPerson = kPeopleNone; } void Menu::findWhatYouCanDoWithIt() { diff --git a/engines/avalanche/menu.h b/engines/avalanche/menu.h index a7ec8bf2db..b7674fbb9d 100644 --- a/engines/avalanche/menu.h +++ b/engines/avalanche/menu.h @@ -102,6 +102,7 @@ public: HeadType _menuItems[8]; byte _menuNum; + MenuBar(); void init(Menu *menu); void createMenuItem(char trig, Common::String title, char altTrig, MenuFunc setupFunc, MenuFunc chooseFunc); void draw(); |