AVALANCHE: Fix CID 1109677, 1109678, 1109694, 1109695

This commit is contained in:
Strangerke 2013-10-28 07:32:15 +01:00
parent 9961e0b83f
commit a6fbfd958d
4 changed files with 49 additions and 1 deletions

View File

@ -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;
}
}
}

View File

@ -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,

View File

@ -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() {

View File

@ -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();