HADESCH: Fix decoder closing handling in catacombs

This commit is contained in:
Vladimir Serbinenko 2020-10-25 22:27:38 +01:00
parent 7852ca2b21
commit 9c9dd99f23

View File

@ -131,7 +131,7 @@ public:
_decoderPosition = 0;
renderDecoder();
if (!_philBangPlayed) {
_philBangPlayed = false;
_philBangPlayed = true;
room->playSound("SndBigBang", 22012);
}
return;
@ -150,6 +150,11 @@ public:
room->playAnim("AnimDecoderArrows", 149, PlayAnimParams::disappear().partial(1, 1));
return;
}
if (name == "DecoderDone") {
removeDecoder();
return;
}
}
bool handleClickWithItem(const Common::String &name, InventoryItem item) override {
@ -386,6 +391,19 @@ private:
room->enableHotzone("DecoderUp");
}
void removeDecoder() {
Common::SharedPtr<VideoRoom> room = g_vm->getVideoRoom();
Persistent *persistent = g_vm->getPersistent();
room->stopAnim("AnimDecoderScroll");
room->stopAnim("AnimDecoderSymbols");
room->selectFrame(
caVariantGet(persistent->_catacombDecoderSkullPosition, "SkullDecoder"), 450, 1);
room->stopAnim("AnimDecoderArrows");
room->disableHotzone("DecoderDone");
room->disableHotzone("DecoderDown");
room->disableHotzone("DecoderUp");
}
void handleExit(CatacombsPosition side) {
Common::SharedPtr<VideoRoom> room = g_vm->getVideoRoom();
Persistent *persistent = g_vm->getPersistent();