From 01c32f7287481e6784619167d5de344fe8209c12 Mon Sep 17 00:00:00 2001 From: Sylvain Dupont Date: Sun, 30 Jan 2011 00:44:51 +0000 Subject: TOON: More Drew visibility fixes In the castle, Drew disappeared if you clicked twice on the closed door. svn-id: r55649 --- engines/toon/character.cpp | 7 ++++++- engines/toon/script_func.cpp | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index dd057cca4a..f1f246e549 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -91,6 +91,11 @@ void Character::setFacing(int32 facing) { if (facing == _facing) return; + if (!_visible) { + _facing = facing; + return; + } + if (_blockingWalk) { _flags |= 2; @@ -340,7 +345,7 @@ void Character::stopSpecialAnim() { _animFlags = 0; _flags &= ~1; _flags &= ~4; - + if (needStandingAnim) { playStandingAnim(); } diff --git a/engines/toon/script_func.cpp b/engines/toon/script_func.cpp index bea5b0b17f..2e727f2ab5 100644 --- a/engines/toon/script_func.cpp +++ b/engines/toon/script_func.cpp @@ -453,7 +453,6 @@ int32 ScriptFunc::sys_Cmd_Set_Actor_RGB_Modifiers(EMCState *state) { } int32 ScriptFunc::sys_Cmd_Init_Conversation_AP(EMCState *state) { - debugC(0, 0xfff, "init_conversation_ap %d %d %d %d", stackPos(0), stackPos(1), stackPos(2), stackPos(3)); _vm->initCharacter(stackPos(0), stackPos(1), stackPos(2), stackPos(3)); return 0; } @@ -464,7 +463,13 @@ int32 ScriptFunc::sys_Cmd_Actor_Talks(EMCState *state) { } int32 ScriptFunc::sys_Cmd_Say_Lines(EMCState *state) { - //_vm->sayLines(2, 1440); + + // WORKAROUND: In the scene 4 (Castle), if you click twice on the closed door, Drew disappears + // the script makes him disappear for the custom animation and not reappear. + if (_vm->state()->_currentScene == 4 && stackPos(1) == 562) { + _vm->getDrew()->setVisible(true); + } + _vm->sayLines(stackPos(0), stackPos(1)); return 0; } -- cgit v1.2.3