2009-09-03 20:59:17 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
2009-09-03 21:20:13 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2009-09-03 20:59:17 +00:00
|
|
|
*/
|
|
|
|
|
2009-09-04 20:08:33 +00:00
|
|
|
#include "teenagent/scene.h"
|
|
|
|
#include "teenagent/teenagent.h"
|
|
|
|
#include "teenagent/resources.h"
|
|
|
|
#include "teenagent/dialog.h"
|
2009-09-03 20:59:17 +00:00
|
|
|
|
2009-09-04 20:08:33 +00:00
|
|
|
namespace TeenAgent {
|
2009-09-03 20:59:17 +00:00
|
|
|
|
|
|
|
#define CHECK_FLAG(addr, v) (res->dseg.get_byte(addr) == (v))
|
|
|
|
#define SET_FLAG(addr, v) (res->dseg.set_byte((addr), (v)))
|
|
|
|
#define GET_FLAG(addr) (res->dseg.get_byte(addr))
|
|
|
|
|
|
|
|
void TeenAgentEngine::rejectMessage() {
|
|
|
|
Resources * res = Resources::instance();
|
|
|
|
//random reject message:
|
|
|
|
uint i = random.getRandomNumber(3);
|
|
|
|
//debug(0, "reject message: %s", (const char *)res->dseg.ptr(res->dseg.get_word(0x339e + 2 * i)));
|
|
|
|
scene->displayMessage((const char *)res->dseg.ptr(res->dseg.get_word(0x339e + 2 * i)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool TeenAgentEngine::processCallback(uint16 addr) {
|
|
|
|
if (addr == 0)
|
|
|
|
return false;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
Resources * res = Resources::instance();
|
|
|
|
debug(0, "processCallback(%04x)", addr);
|
|
|
|
byte * code = res->cseg.ptr(addr);
|
|
|
|
|
|
|
|
//try trivial callbacks first
|
|
|
|
if (code[0] == 0xbb && code[3] == 0xe8 && code[6] == 0xc3) {
|
|
|
|
//call display_message, r
|
|
|
|
uint16 msg = READ_LE_UINT16(code + 1);
|
|
|
|
uint16 func = 6 + addr + READ_LE_UINT16(code + 4);
|
|
|
|
debug(0, "call %04x", func);
|
|
|
|
//debug(0, "trivial callback, showing message %s", (const char *)res->dseg.ptr(addr));
|
2009-09-15 08:54:06 +00:00
|
|
|
switch (func) {
|
|
|
|
case 0x11c5:
|
2009-09-03 20:59:17 +00:00
|
|
|
Dialog::show(scene, msg);
|
|
|
|
return true;
|
|
|
|
case 0xa055:
|
|
|
|
displayMessage((const char *)res->dseg.ptr(msg));
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
if (code[0] == 0xe8 && code[3] == 0xc3) {
|
|
|
|
uint func = 3 + addr + READ_LE_UINT16(code + 1);
|
|
|
|
debug(0, "call %04x and return", func);
|
|
|
|
if (func == 0xa4d6) {
|
|
|
|
rejectMessage();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
if (code[0] == 0xc7 && code[1] == 0x06 && code[2] == 0xf3 && code[3] == 0xb4 &&
|
|
|
|
code[6] == 0xb8 && code[9] == 0xbb && code[12] == 0xbf &&
|
|
|
|
code[22] == 0xe8 && code[25] == 0xc3) {
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(code[4], Common::Point(
|
2009-09-15 08:54:06 +00:00
|
|
|
(READ_LE_UINT16(code + 7) + READ_LE_UINT16(code + 13) + 1) / 2 ,
|
|
|
|
READ_LE_UINT16(code + 10)));
|
|
|
|
scene->setOrientation(code[21]);
|
|
|
|
return true;
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
switch (addr) {
|
|
|
|
|
2009-09-13 10:50:29 +00:00
|
|
|
case 0x024c: //intro
|
2009-09-13 12:48:57 +00:00
|
|
|
hideActor();
|
2009-09-14 22:23:35 +00:00
|
|
|
|
2009-09-13 10:50:29 +00:00
|
|
|
loadScene(41, 139, 156, 3);
|
|
|
|
playSound(41, 12);
|
|
|
|
playAnimation(912, 1);
|
|
|
|
setOns(0, 108);
|
|
|
|
playSound(62, 8);
|
|
|
|
playSound(58, 40);
|
|
|
|
playAnimation(913, 1);
|
|
|
|
setOns(1, 109);
|
2009-09-14 21:06:08 +00:00
|
|
|
setLan(2, 1);
|
2009-09-14 22:23:35 +00:00
|
|
|
Dialog::show(scene, 0x748e, 914, 915, 0xe7, 0xd7, 2, 1);
|
2009-09-13 10:50:29 +00:00
|
|
|
displayCredits(0xe3c2);
|
|
|
|
loadScene(42, 139, 156, 3);
|
|
|
|
playSound(15, 20);
|
|
|
|
playAnimation(916, 1);
|
|
|
|
playSound(40, 18);
|
|
|
|
playSound(40, 22);
|
2009-09-15 08:54:06 +00:00
|
|
|
for (byte i = 27; i < 37; i += 2)
|
2009-09-13 10:50:29 +00:00
|
|
|
playSound(40, i);
|
|
|
|
playSound(29, 44);
|
|
|
|
playAnimation(918, 0, true);
|
|
|
|
playAnimation(917, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
displayCredits(0xe3e6);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-13 10:50:29 +00:00
|
|
|
loadScene(40, 139, 156, 3);
|
|
|
|
playMusic(3);
|
|
|
|
Dialog::show(scene, 0x750d, 920, 924, 0xe7, 0xeb); //as i told you, our organization...
|
|
|
|
playSound(26, 50);
|
|
|
|
playAnimation(925, 0, true);
|
|
|
|
playAnimation(926, 1, true);
|
|
|
|
waitAnimation();
|
2009-09-15 08:54:06 +00:00
|
|
|
Dialog::show(scene, 0x78a6, 920, 927, 0xeb, 0xeb);
|
2009-09-13 10:50:29 +00:00
|
|
|
displayCredits(0xe3ff);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-13 10:50:29 +00:00
|
|
|
loadScene(39, 139, 156, 3);
|
|
|
|
playMusic(11);
|
|
|
|
playSound(81, 2);
|
|
|
|
playSound(81, 8);
|
|
|
|
playSound(81, 11);
|
|
|
|
playSound(81, 14);
|
|
|
|
playSound(81, 16);
|
|
|
|
playSound(81, 18);
|
|
|
|
playSound(81, 20);
|
|
|
|
playSound(81, 21);
|
|
|
|
playAnimation(928, 1);
|
|
|
|
setOns(0, 112);
|
|
|
|
Dialog::show(scene, 0x78e1, 929, 0, 0xd1); //he's coming
|
2009-09-13 12:48:57 +00:00
|
|
|
showActor();
|
2009-09-13 10:50:29 +00:00
|
|
|
moveTo(319, 150, 1, true);
|
|
|
|
moveTo(63, 150, 1);
|
|
|
|
displayMessage(0x5da8); //fixme: with delay!
|
|
|
|
playAnimation(851, 0);
|
|
|
|
playSound(24, 11);
|
|
|
|
playActorAnimation(931);
|
|
|
|
displayCredits(0xe42f);
|
|
|
|
|
|
|
|
playMusic(3);
|
|
|
|
loadScene(40, 50, 186, 1);
|
|
|
|
setOns(0, 113);
|
|
|
|
Dialog::show(scene, 0x78f1, 919, 0, 0xe7);
|
|
|
|
moveTo(196, 186, 1);
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x7958, 0, 920, 0xd1, 0xe7);
|
2009-09-13 10:50:29 +00:00
|
|
|
playActorAnimation(932);
|
2009-09-14 21:06:08 +00:00
|
|
|
Dialog::show(scene, 0x7e07, 920, 0, 0xe7);
|
2009-09-13 10:50:29 +00:00
|
|
|
playActorAnimation(932);
|
2009-09-14 21:06:08 +00:00
|
|
|
Dialog::show(scene, 0x7e1a, 920, 0, 0xe7);
|
2009-09-13 10:50:29 +00:00
|
|
|
playActorAnimation(932);
|
2009-09-14 21:06:08 +00:00
|
|
|
Dialog::show(scene, 0x7e2c, 922, 0, 0xe7);
|
2009-09-13 10:50:29 +00:00
|
|
|
playActorAnimation(933);
|
2009-09-14 21:06:08 +00:00
|
|
|
Dialog::show(scene, 0x7e70, 920, 0, 0xe7);
|
2009-09-13 10:50:29 +00:00
|
|
|
moveTo(174, 186, 1);
|
|
|
|
playAnimation(851, 0, true);
|
|
|
|
playActorAnimation(934, true);
|
|
|
|
waitAnimation();
|
|
|
|
loadScene(10, 136, 153);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-13 10:50:29 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4021:
|
|
|
|
//pulling out mysterious object
|
|
|
|
if (CHECK_FLAG(0xdbe1, 1)) {
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(844);
|
|
|
|
playActorAnimation(846);
|
|
|
|
playActorAnimation(845);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5696);
|
|
|
|
} else {
|
|
|
|
displayMessage(0x570f);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4094: //climbing to the pole near mudpool
|
|
|
|
if (CHECK_FLAG(0xDBE4, 1)) {
|
|
|
|
displayMessage(0x57b2);
|
|
|
|
return true;
|
|
|
|
} else {
|
2009-09-30 16:16:53 +00:00
|
|
|
for (byte i = 11; i <= 27; i += 4)
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(76, i);
|
|
|
|
|
|
|
|
playSound(56, 35);
|
|
|
|
playSound(19, 59);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(864);
|
2009-09-15 22:35:19 +00:00
|
|
|
playAnimation(865, 1);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(866);
|
2009-09-03 20:59:17 +00:00
|
|
|
//InventoryObject *obj = inventory->selectedObject();
|
|
|
|
//if (obj != NULL && obj->id == 0x55) {
|
|
|
|
|
2009-09-15 08:54:06 +00:00
|
|
|
//implement pause and using real object:
|
2009-09-03 20:59:17 +00:00
|
|
|
if (inventory->has(0x55)) {
|
|
|
|
playSound(5, 4);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(5, 19);
|
|
|
|
playSound(64, 11);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(867);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->remove(0x55);
|
|
|
|
inventory->add(0x56);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(86, 195, 1, true);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(868);
|
2009-09-03 20:59:17 +00:00
|
|
|
SET_FLAG(0xDBE4, 1);
|
|
|
|
} else {
|
2009-09-15 22:35:19 +00:00
|
|
|
processCallback(0x4173);
|
2009-09-03 20:59:17 +00:00
|
|
|
Dialog::pop(scene, 0xDB72);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
2009-09-15 22:35:19 +00:00
|
|
|
case 0x4173:
|
|
|
|
//fail!
|
|
|
|
moveTo(86, 195, 1, true);
|
|
|
|
playActorAnimation(868);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x419c: //getting the bird
|
|
|
|
setOns(0, 0);
|
|
|
|
playSound(56, 10);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(875);
|
2009-09-03 20:59:17 +00:00
|
|
|
disableObject(6);
|
|
|
|
inventory->add(0x5c);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
case 0x41ce:
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(197, 159, 4);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(0, 0);
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(71, 8);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(833);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(225, 159, 4);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(0x4e);
|
|
|
|
disableObject(3);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4267:
|
|
|
|
playSound(23, 8);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(24, 13);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(841);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 0x61);
|
|
|
|
setOns(2, 0);
|
|
|
|
playSound(63, 12);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(5, 26);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(842);
|
2009-09-15 22:35:19 +00:00
|
|
|
hideActor();
|
2009-09-03 20:59:17 +00:00
|
|
|
//shown in different positions
|
|
|
|
displayMessage(0x5656);
|
|
|
|
displayMessage(0x567a);
|
|
|
|
displayMessage(0x5682);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(843);
|
2009-09-15 22:35:19 +00:00
|
|
|
showActor();
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(223, 149, 0, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
disableObject(7);
|
|
|
|
disableObject(1);
|
|
|
|
inventory->add(0x51);
|
|
|
|
displayMessage(0x5646);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4388:
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(80, 4);
|
|
|
|
playActorAnimation(961);
|
|
|
|
loadScene(8, 155, 199, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x43b5: //HQ, first trial - prison
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(70, 6);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(962);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(7, 30, 184, 2);
|
|
|
|
if (res->dseg.get_byte(0xDBDF) < 2) {
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(134, 167, 2);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x54f7);
|
|
|
|
setLan(1, 0);
|
2009-09-13 09:53:14 +00:00
|
|
|
playAnimation(812, 0, true);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(811);
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x6117, 0, 813, 0xd1, 0xec, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(6, Common::Point(230, 184));
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x626a, 0, 814, 0xd1, 0xec, 0, 1);
|
2009-09-27 13:48:51 +00:00
|
|
|
playSound(4, 14);
|
2009-09-13 09:53:14 +00:00
|
|
|
playAnimation(815, 0);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 0);
|
|
|
|
|
|
|
|
Dialog::show(scene, 0x62dc);
|
|
|
|
|
|
|
|
SET_FLAG(0xDBDF, 1);
|
2009-09-08 14:26:14 +00:00
|
|
|
playMusic(5);
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x4482:
|
|
|
|
if (CHECK_FLAG(0xDBDF, 0)) {
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(968);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5511);
|
|
|
|
} else {
|
|
|
|
playSound(80);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(968);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(6, Common::Point(280, 186));
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x44fc: //pull out spring from bed
|
|
|
|
playSound(53, 25);
|
2009-09-13 12:58:35 +00:00
|
|
|
playSound(24, 27);
|
|
|
|
playSound(5, 36);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(839);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(278, scene->getPosition().y, 0, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(0x50);
|
|
|
|
disableObject(1);
|
|
|
|
return true;
|
|
|
|
|
2009-09-15 08:54:06 +00:00
|
|
|
case 0x44cb:
|
2009-09-03 20:59:17 +00:00
|
|
|
if (CHECK_FLAG(0xDBE5, 1)) {
|
|
|
|
scene->displayMessage((const char *)res->dseg.ptr(0x57c0));
|
|
|
|
} else {
|
2009-09-13 12:58:35 +00:00
|
|
|
playSound(49, 14);
|
|
|
|
playSound(5, 21);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(869);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(0x58);
|
|
|
|
SET_FLAG(0xDBE5, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4539: //prison cell: use crates
|
|
|
|
if (CHECK_FLAG(0xdbdd, 2)) {
|
|
|
|
//finished the meal - trap
|
|
|
|
displayMessage(0x55c0);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(306, 196, 2);
|
2009-09-03 20:59:17 +00:00
|
|
|
//playAnimation(825, 1); //very long empty animation. what for?
|
|
|
|
setLan(1, 0);
|
|
|
|
playSound(71, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(823);
|
2009-09-03 20:59:17 +00:00
|
|
|
|
2009-09-15 22:35:19 +00:00
|
|
|
loadScene(5, scene->getPosition());
|
2009-09-15 08:54:06 +00:00
|
|
|
playSound(74, 1);
|
|
|
|
playSound(74, 3);
|
|
|
|
playSound(74, 6);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(826);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(6, scene->getPosition());
|
|
|
|
setOns(3, 0x5b);
|
|
|
|
displayMessage(0x55db);
|
|
|
|
SET_FLAG(0xdbdd, 3);
|
2009-09-26 15:04:09 +00:00
|
|
|
scene->getObject(4)->setName("body");
|
2009-09-03 20:59:17 +00:00
|
|
|
} else {
|
|
|
|
if (Dialog::pop(scene, 0xdb5c) != 0x636b) //not 'im getting hungry'
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(52, 8);
|
|
|
|
playAnimation(820, 1);
|
|
|
|
setOns(3, 0x59);
|
|
|
|
//some moving animation is missing here
|
|
|
|
displayMessage(0x551f);
|
|
|
|
enableObject(4);
|
|
|
|
SET_FLAG(0xdbdc, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4662:
|
|
|
|
if (CHECK_FLAG(0xDBDD, 3)) {
|
2009-09-13 14:12:39 +00:00
|
|
|
if (CHECK_FLAG(0xDBDE, 1)) {
|
|
|
|
displayMessage(0x5608);
|
|
|
|
} else {
|
|
|
|
moveTo(280, 179, 2);
|
|
|
|
playSound(49, 7);
|
|
|
|
playSound(5, 17);
|
|
|
|
playActorAnimation(827);
|
|
|
|
inventory->add(0x4d);
|
|
|
|
SET_FLAG(0xDBDE, 1);
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5905);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
case 0x46af: //prison cell: use live cable
|
2009-09-03 20:59:17 +00:00
|
|
|
if (CHECK_FLAG(0xdbdc, 1)) {
|
|
|
|
displayMessage(0x555d);
|
|
|
|
setOns(2, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(821);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(2, 0x5a);
|
|
|
|
setOns(3, 0);
|
|
|
|
playSound(22, 2);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(822);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5577);
|
|
|
|
disableObject(5);
|
|
|
|
SET_FLAG(0xdbdd, 1);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5528);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-13 12:58:35 +00:00
|
|
|
case 0x4705: //prison: getting lamp bulb
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(144, 185, 4);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(56, 15);
|
|
|
|
setOns(0, 86); //hiding lamp
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(816, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
playAnimation(817, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
setOns(0, 87);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(34, 1);
|
2009-09-13 12:58:35 +00:00
|
|
|
playSound(5, 15);
|
|
|
|
playActorAnimation(818, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
playAnimation(819, 1, true);
|
|
|
|
waitAnimation();
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(160, 188, 1, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(2, 88);
|
|
|
|
|
|
|
|
disableObject(6);
|
|
|
|
enableObject(5);
|
|
|
|
inventory->add(0x4c);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4794: //prison cell door
|
|
|
|
if (res->dseg.get_byte(0xDBDF) >= 2) {
|
|
|
|
loadScene(5, 287, 143);
|
|
|
|
} else {
|
|
|
|
displayMessage(0x592f);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x47bc: //prison: examining trash can
|
2009-09-13 12:58:35 +00:00
|
|
|
playSound(79, 5);
|
|
|
|
playSound(1, 14);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(966);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5955);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x47db: //prison: use switch
|
|
|
|
if (CHECK_FLAG(0xDBDF, 1)) {
|
|
|
|
playSound(71, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(823);
|
2009-09-03 20:59:17 +00:00
|
|
|
if (CHECK_FLAG(0xDBDD, 0)) {
|
|
|
|
displayMessage(0x4d80);
|
|
|
|
} else {
|
|
|
|
playSound(74, 1);
|
|
|
|
playAnimation(824, 1);
|
|
|
|
if (CHECK_FLAG(0xDBDD, 1)) {
|
|
|
|
displayMessage(0x559a);
|
|
|
|
SET_FLAG(0xDBDD, 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
displayMessage(0x52f6);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
case 0x4871:
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(965);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5511);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4893: //taking pills
|
|
|
|
if (CHECK_FLAG(0xDBE6, 1)) {
|
|
|
|
SET_FLAG(0xDBE6, 2);
|
|
|
|
setOns(1, 0x67);
|
|
|
|
playSound(5, 9);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(872);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(0x5a);
|
|
|
|
disableObject(7);
|
|
|
|
} else {
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(964);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5511);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4918: //talking with barmen
|
|
|
|
if (CHECK_FLAG(0xDBE7, 1)) {
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(140, 152, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
if (CHECK_FLAG(0xDBE8, 1)) {
|
|
|
|
Dialog::show(scene, 0x6f20);
|
|
|
|
displayMessage(0x5883, 0xef);
|
|
|
|
//reloadLan();
|
|
|
|
setLan(1, 0);
|
2009-09-15 22:35:19 +00:00
|
|
|
playAnimation(882, 0);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(75, 10);
|
|
|
|
setOns(2, 0);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(75, 10);
|
|
|
|
playSound(24, 15);
|
|
|
|
playAnimation(883, 0);
|
2009-09-03 20:59:17 +00:00
|
|
|
disableObject(1);
|
|
|
|
disableObject(2);
|
|
|
|
SET_FLAG(0xDBE9, 1);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5855);
|
|
|
|
} else {
|
|
|
|
if (CHECK_FLAG(0xDBDF, 3)) {
|
|
|
|
if (CHECK_FLAG(0xDBE3, 1)) {
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x6BD6, 0, 857, 0xd1, 0xef, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
} else {
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x69B5, 0, 857, 0xd1, 0xef, 0, 1); //taking mug
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(859, true);
|
2009-09-15 22:35:19 +00:00
|
|
|
playAnimation(858, 0, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
waitAnimation();
|
|
|
|
playSound(75, 6);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(860);
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x69C2, 0, 857, 0xd1, 0xef, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(0x55);
|
|
|
|
SET_FLAG(0xDBE3, 1);
|
|
|
|
SET_FLAG(0xDBF0, 0);
|
|
|
|
}
|
|
|
|
} else {
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::pop(scene, 0xDB68, 0, 857, 0xd1, 0xef, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4f14: //use the hollow
|
2009-09-15 08:54:06 +00:00
|
|
|
displayMessage(CHECK_FLAG(0xDBA1, 1) ? 0x370f : 0x36c2);
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
case 0x4a64:
|
2009-09-03 20:59:17 +00:00
|
|
|
if (CHECK_FLAG(0xDBF0, 1)) {
|
|
|
|
displayMessage(0x5e25);
|
|
|
|
} else {
|
|
|
|
loadScene(5, 35, 162);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
case 0x4bf5:
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(959);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(8, 40, 152, 3);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x483a:
|
|
|
|
Dialog::pop(scene, 0xdb82);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4844:
|
|
|
|
playSound(80, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(963);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(5, 166, 158);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
case 0x48ea:
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(0, 0);
|
|
|
|
playSound(5, 9);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(836);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(0x4f);
|
|
|
|
disableObject(12);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
case 0x4a8c:
|
2009-09-03 20:59:17 +00:00
|
|
|
if (CHECK_FLAG(0xDBE9, 1)) {
|
|
|
|
playSound(89, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(958);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(9, 240, 182, 4);
|
|
|
|
} else if (CHECK_FLAG(0xDBE9, 1)) {
|
|
|
|
displayMessage(0x5894);
|
|
|
|
} else {
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::pop(scene, 0xDB8A, 0, 857, 0xd1, 0xef, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4af4: //taking the crumbs
|
|
|
|
setOns(0, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(861);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(49);
|
|
|
|
inventory->add(0x57);
|
|
|
|
disableObject(6);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4b35:
|
|
|
|
playSound(15, 7);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(884);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(55, 1);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(24, 12);
|
|
|
|
playAnimation(885, 0);
|
|
|
|
Dialog::show(scene, 0x67e5, 886, 0, 0xd0, 0xd1, 1, 0);
|
2009-09-03 20:59:17 +00:00
|
|
|
playMusic(3);
|
|
|
|
loadScene(40, 198, 186, 1);
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x7f20, 0, 920, 0xd1, 0xe7);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->clear();
|
|
|
|
inventory->add(0x1d);
|
2009-09-15 22:35:19 +00:00
|
|
|
displayCredits(0xe45c);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(1, 198, 186);
|
2009-09-15 22:35:19 +00:00
|
|
|
hideActor();
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(956, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
Dialog::show(scene, 0x8bc4);
|
|
|
|
waitAnimation();
|
|
|
|
loadScene(15, 157, 199, 1);
|
|
|
|
playMusic(6);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x4c3e: //get the grenade
|
|
|
|
playSound(32, 24);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(862);
|
2009-09-03 20:59:17 +00:00
|
|
|
reloadLan();
|
|
|
|
playAnimation(863, 1);
|
|
|
|
inventory->add(0x54);
|
|
|
|
disableObject(1);
|
|
|
|
SET_FLAG(0xDBE2, 2);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x4c70:
|
|
|
|
if (CHECK_FLAG(0xDBE2, 0)) {
|
|
|
|
if (CHECK_FLAG(0xDBDA, 1)) { //papers are shown
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::pop(scene, 0xDB4C, 0, 809, 0xd1, 0xd0, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
} else {
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::pop(scene, 0xDB40, 0, 809, 0xd1, 0xd0, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
displayMessage(0x5722);
|
2009-09-15 22:35:19 +00:00
|
|
|
displayMessage(0x572a);
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4c1c:
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(960);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5511);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4cac:
|
|
|
|
if (CHECK_FLAG(0xdbda, 1)) { //papers are shown
|
|
|
|
loadScene(5, 124, 199);
|
|
|
|
} else {
|
2009-10-18 10:46:42 +00:00
|
|
|
Dialog::show(scene, 0x5FE9, 0, 809, 0xd1, 0xd0, 0, 1);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(269, 175, 4);
|
2009-10-18 10:46:42 +00:00
|
|
|
Dialog::pop(scene, 0xDB56, 0, 809, 0xd1, 0xd0, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
2009-09-15 08:54:06 +00:00
|
|
|
case 0x4cf1: { //talking with mansion guard
|
2009-09-03 20:59:17 +00:00
|
|
|
SET_FLAG(0xda96, 1);
|
2009-09-05 17:15:28 +00:00
|
|
|
if (Dialog::pop(scene, 0xdaa6, 529) != 0x1b4)
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
2009-09-05 17:15:28 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
Common::Point p = scene->getPosition();
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(159, 189, 0);
|
2009-11-07 12:01:45 +00:00
|
|
|
waitLanAnimationFrame(1, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
playSound(5, 2);
|
|
|
|
playSound(5, 19);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(550, true);
|
2009-09-05 17:15:28 +00:00
|
|
|
playAnimation(551, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
|
|
|
|
moveTo(p, 2);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(0x13);
|
|
|
|
playAnimation(529, 1);
|
|
|
|
Dialog::pop(scene, 0xdaa6);
|
2009-09-15 08:54:06 +00:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x4d94: //talking with fatso
|
|
|
|
Dialog::show(scene, 0x33bd);
|
|
|
|
displayMessage(0x49ae);
|
|
|
|
playSound(5, 3);
|
|
|
|
playAnimation(667, 1);
|
|
|
|
playAnimation(668, 1);
|
|
|
|
setOns(2, 50);
|
|
|
|
Dialog::show(scene, 0x36c7);
|
|
|
|
setOns(3, 0);
|
|
|
|
SET_FLAG(0xDBEC, 0);
|
|
|
|
reloadLan();
|
|
|
|
playSound(82, 19);
|
|
|
|
playAnimation(668, 1);
|
|
|
|
Dialog::show(scene, 0x3779);
|
|
|
|
enableObject(15);
|
|
|
|
disableObject(8);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4e61:
|
|
|
|
loadScene(14, 280, 198);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x4ee5:
|
|
|
|
setOns(2, 0);
|
|
|
|
playSound(5, 12);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(676);
|
2009-09-05 20:58:25 +00:00
|
|
|
displayMessage(0x4ab0);
|
|
|
|
disableObject(15);
|
|
|
|
inventory->add(51);
|
|
|
|
return true;
|
2009-09-03 20:59:17 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0x4d56:
|
|
|
|
inventory->add(16);
|
|
|
|
disableObject(2);
|
|
|
|
setOns(0, 0);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(5, 12);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(547);
|
2009-09-05 17:15:28 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0x4eb9://Pick up wrapper
|
|
|
|
playSound(5, 12);
|
|
|
|
playSound(5, 18);
|
|
|
|
inventory->add(0x12);
|
|
|
|
setOns(1, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(549);
|
2009-09-05 17:15:28 +00:00
|
|
|
disableObject(13);
|
|
|
|
return true;
|
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x4f25:
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(967);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x3542);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x4f32: //use tree near the mansion
|
2009-09-03 20:59:17 +00:00
|
|
|
if (CHECK_FLAG(0xDBA1, 1)) {
|
2009-09-05 20:58:25 +00:00
|
|
|
if (CHECK_FLAG(0xDBA2, 1)) {
|
|
|
|
displayMessage(0x3766);
|
|
|
|
} else {
|
|
|
|
playSound(26, 13);
|
|
|
|
playSound(26, 15);
|
|
|
|
playSound(26, 23);
|
|
|
|
playSound(26, 25);
|
|
|
|
playSound(26, 32);
|
|
|
|
playSound(26, 34);
|
|
|
|
playSound(26, 36);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(590);
|
2009-09-05 20:58:25 +00:00
|
|
|
moveTo(204, 178, 3, true);
|
|
|
|
playSound(59, 1);
|
|
|
|
playSound(60, 16);
|
|
|
|
displayMessage(0x372e);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(591);
|
2009-09-05 20:58:25 +00:00
|
|
|
SET_FLAG(0xDBA2, 1);
|
|
|
|
processCallback(0x9d45);
|
|
|
|
}
|
2009-09-03 20:59:17 +00:00
|
|
|
} else {
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(49);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(56, 8);
|
|
|
|
playSound(56, 12);
|
|
|
|
playSound(49, 10);
|
2009-09-15 08:54:06 +00:00
|
|
|
//there's some black magic here! investigate!
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(587);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x4652);
|
|
|
|
displayMessage(0x3668);
|
|
|
|
}
|
2009-09-05 20:58:25 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x500d: //picking up wild plant
|
|
|
|
if (CHECK_FLAG(0xDB9E, 1)) {
|
|
|
|
displayMessage(0x35E8); //there are no more
|
|
|
|
} else {
|
|
|
|
SET_FLAG(0xDB9E, 1);
|
|
|
|
setOns(2, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(552);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(2, 0x12);
|
|
|
|
inventory->add(0x14);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5104:
|
|
|
|
loadScene(11, 319, 198, 4); //orientation: left
|
2009-09-15 08:54:06 +00:00
|
|
|
if (CHECK_FLAG(0xDB9C, 1))
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
|
|
|
|
2009-09-15 08:54:06 +00:00
|
|
|
SET_FLAG(0xDB9C, 1); //guard's drinking, boo!
|
2009-09-03 20:59:17 +00:00
|
|
|
playAnimation(544, 1);
|
|
|
|
displayMessage(0x3563);
|
|
|
|
playSound(17);
|
|
|
|
setOns(0, 16);
|
|
|
|
enableObject(2);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(545, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
Dialog::show(scene, 0x0917);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(546);
|
2009-09-05 20:58:25 +00:00
|
|
|
SET_FLAG(0xDA96, 1);
|
|
|
|
SET_FLAG(0xDA97, 0);
|
2009-09-05 17:15:28 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0x51f0:
|
|
|
|
setOns(0, 0);
|
|
|
|
playSound(5, 11);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(637);
|
2009-09-05 17:15:28 +00:00
|
|
|
disableObject(7);
|
|
|
|
inventory->add(49);
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5217:
|
2009-09-15 08:54:06 +00:00
|
|
|
displayMessage(CHECK_FLAG(0xDB9F, 1) ? 0x402e : 0x34e1);
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5237:
|
|
|
|
if (!CHECK_FLAG(0xDB9F, 1)) {
|
|
|
|
displayMessage(0x34e1);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else if (CHECK_FLAG(0xDBA0, 1))
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x3E31);
|
|
|
|
else {
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(173, 138, 2);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(28, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(583);
|
|
|
|
playActorAnimation(584);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
debug(0, "FIXME: darken whole screen");
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(72, 18);
|
|
|
|
playSound(73, 39);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(585);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 15:04:37 +00:00
|
|
|
loadScene(11, 194, 160, 2);
|
|
|
|
playSound(28, 2);
|
|
|
|
moveTo(138, 163, 3);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x3650);
|
|
|
|
SET_FLAG(0xDBA0, 1);
|
2009-09-05 20:58:25 +00:00
|
|
|
processCallback(0x9d45); //another mansion try
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x55a8: {
|
2009-09-15 08:54:06 +00:00
|
|
|
uint16 d = Dialog::pop(scene, 0xdb08);
|
|
|
|
if (d == 0x2c5d) {
|
|
|
|
setOns(0, 0);
|
2009-11-07 12:01:45 +00:00
|
|
|
waitLanAnimationFrame(1, 0x23);
|
2009-09-15 08:54:06 +00:00
|
|
|
playSound(52, 9);
|
|
|
|
playSound(52, 11);
|
|
|
|
playSound(52, 13);
|
|
|
|
playSound(53, 32);
|
2009-11-07 12:01:45 +00:00
|
|
|
playAnimation(570, 0);
|
2009-09-15 08:54:06 +00:00
|
|
|
displayMessage(0x551f);
|
|
|
|
disableObject(5);
|
|
|
|
SET_FLAG(0xDBB0, 1);
|
|
|
|
} else if (d != 0x2c9b) {
|
2009-11-07 12:01:45 +00:00
|
|
|
waitLanAnimationFrame(1, 0x23);
|
2009-09-15 08:54:06 +00:00
|
|
|
playSound(52, 9);
|
|
|
|
playSound(52, 11);
|
|
|
|
playSound(52, 13);
|
2009-11-07 12:01:45 +00:00
|
|
|
playAnimation(569, 0);
|
2009-09-15 08:54:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5663:
|
2009-09-15 08:54:06 +00:00
|
|
|
displayMessage(CHECK_FLAG(0xDBB0, 1) ? 0x41b1 : 0x417e);
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x569c:
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(67, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(983);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5955);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x56b7:
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(66, 5);
|
|
|
|
playSound(67, 11);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(984);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5955);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5728:
|
|
|
|
inventory->add(0x0d);
|
|
|
|
disableObject(14);
|
|
|
|
setOns(0, 0);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(5, 10);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(566);
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5793:
|
|
|
|
if (!CHECK_FLAG(0xDB94, 1)) {
|
|
|
|
displayMessage(0x3e63);
|
|
|
|
} else if (CHECK_FLAG(0xDB95, 1)) {
|
|
|
|
displayMessage(0x3e75);
|
|
|
|
} else {
|
|
|
|
SET_FLAG(0xDB95, 1);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(188, 179, 0);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(7, 16);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(519);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(168, 179, 2);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(3);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5d88:
|
|
|
|
if (CHECK_FLAG(0xDBA5, 1)) { //dry laundry
|
|
|
|
SET_FLAG(0xDBA5, 2);
|
2009-11-07 12:01:45 +00:00
|
|
|
Dialog::show(scene, 0x1F4F, 0, 523, 0xd0, 0xe5, 0, 1);
|
|
|
|
waitLanAnimationFrame(1, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
playAnimation(604, 1);
|
|
|
|
|
|
|
|
loadScene(21, scene->getPosition());
|
|
|
|
setOns(0, 0);
|
|
|
|
disableObject(4);
|
|
|
|
enableObject(12);
|
|
|
|
playSound(46);
|
|
|
|
playAnimation(606, 1);
|
|
|
|
loadScene(23, scene->getPosition());
|
|
|
|
playAnimation(605, 1);
|
2009-11-07 12:01:45 +00:00
|
|
|
Dialog::show(scene, 0x2002, 0, 523, 0xd0, 0xe5, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
} else {
|
|
|
|
uint16 d = Dialog::pop(scene, 0xdada);
|
|
|
|
if (d == 0x1913)
|
|
|
|
displayMessage(0x34d5); //+orientation = 3
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5ff3: //get duster
|
|
|
|
if (CHECK_FLAG(0xDB9A, 0)) {
|
|
|
|
Dialog::pop(scene, 0xdaf6);
|
|
|
|
} else {
|
|
|
|
Dialog::show(scene, 0x1e1e);
|
|
|
|
inventory->add(12);
|
|
|
|
disableObject(12);
|
|
|
|
setOns(0, 0);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(5, 6);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(541);
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
|
|
|
return true;
|
2009-09-05 17:15:28 +00:00
|
|
|
|
|
|
|
case 0x6205:
|
|
|
|
if (CHECK_FLAG(0xDBA4, 1))
|
|
|
|
displayMessage(0x450e);
|
2009-09-15 08:54:06 +00:00
|
|
|
else
|
2009-09-05 17:15:28 +00:00
|
|
|
processCallback(0x61fe);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x6217:
|
|
|
|
if (CHECK_FLAG(0xDBA4, 1))
|
|
|
|
displayMessage(0x44d6);
|
2009-09-15 08:54:06 +00:00
|
|
|
else
|
2009-09-05 17:15:28 +00:00
|
|
|
processCallback(0x61fe);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0x62c1:
|
|
|
|
if (CHECK_FLAG(0xDBA4, 1))
|
|
|
|
return false;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
processCallback(0x61fe);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x63bc:
|
|
|
|
playMusic(6);
|
|
|
|
loadScene(25, 151, 156, 2);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x646e:
|
|
|
|
case 0x6475:
|
|
|
|
Dialog::show(scene, 0x32C1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x6507:
|
|
|
|
if (CHECK_FLAG(0xDB96, 1)) {
|
|
|
|
rejectMessage();
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x47e7);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
case 0x65c3:
|
2009-09-03 20:59:17 +00:00
|
|
|
if (CHECK_FLAG(0xDBA9, 1)) {
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(635);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(5, 0);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(63, 11);
|
|
|
|
playSound(15, 20);
|
|
|
|
playSound(32, 31);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(636);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(47);
|
|
|
|
inventory->add(48);
|
2009-09-05 20:58:25 +00:00
|
|
|
moveTo(scene->getPosition().x - 1, 139, 1, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x3b83);
|
|
|
|
SET_FLAG(0xDBA9, 2);
|
|
|
|
SET_FLAG(0xDBA8, 0);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x4808);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x7866:
|
|
|
|
if (CHECK_FLAG(0xdbdd, 3)) {
|
|
|
|
displayMessage(0x55ff);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-03 20:59:17 +00:00
|
|
|
return false;
|
|
|
|
|
|
|
|
case 0x7878: {
|
|
|
|
byte v = res->dseg.get_byte(0xDBDB) + 1;
|
|
|
|
if (v <= 6)
|
|
|
|
SET_FLAG(0xDBDB, v);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
switch (v) {
|
|
|
|
case 1:
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5411);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
case 2:
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5463);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
case 3:
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5475);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
case 4:
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5484);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
case 5:
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x54c4);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
default:
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x54d5);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x78a9:
|
|
|
|
if (CHECK_FLAG(0xDBE6, 1)) {
|
|
|
|
displayMessage(0x5827);
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x78bb:
|
|
|
|
if (CHECK_FLAG(0xDBE8, 1)) {
|
|
|
|
displayMessage(0x58b0);
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x78ce:
|
|
|
|
if (!CHECK_FLAG(0xDBA1, 1)) {
|
|
|
|
displayMessage(0x3694);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-03 20:59:17 +00:00
|
|
|
return false;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x792b: //left click on ann
|
|
|
|
moveTo(245, 198, 1);
|
2009-09-15 08:54:06 +00:00
|
|
|
if (CHECK_FLAG(0xDBAF, 1))
|
2009-09-03 20:59:17 +00:00
|
|
|
return false;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
Dialog::show(scene, 0x2193);
|
|
|
|
SET_FLAG(0xDBAF, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0x79c3:
|
|
|
|
if (CHECK_FLAG(0xDBA4, 1))
|
|
|
|
return false;
|
|
|
|
processCallback(0x61fe);
|
|
|
|
return true;
|
2009-09-03 20:59:17 +00:00
|
|
|
|
|
|
|
case 0x7b26: //cutting the fence
|
|
|
|
setOns(0, 0);
|
|
|
|
playSound(5, 2);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(51, 11);
|
|
|
|
playSound(51, 23);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(837);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(51, 3);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(51, 19);
|
|
|
|
playSound(23, 26);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(838);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(0, 0x60);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(281, scene->getPosition().y, 0, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
disableObject(4);
|
|
|
|
SET_FLAG(0xDBE1, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x7b89: //digging mysterious object
|
|
|
|
if (CHECK_FLAG(0xDBE1, 1)) {
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(844);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 0);
|
|
|
|
playSound(5, 5);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(26, 19);
|
|
|
|
playSound(24, 25);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(847);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(5, 11);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(848);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 0x64);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(845);
|
2009-09-03 20:59:17 +00:00
|
|
|
disableObject(3);
|
|
|
|
inventory->add(0x52);
|
|
|
|
inventory->remove(0x51);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x56da);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x7bfd:
|
|
|
|
playSound(76, 18);
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(76, 22);
|
|
|
|
playSound(76, 26);
|
|
|
|
playSound(76, 30);
|
|
|
|
playSound(76, 34);
|
|
|
|
playSound(76, 47);
|
|
|
|
playSound(76, 51);
|
|
|
|
playSound(76, 55);
|
|
|
|
playSound(76, 59);
|
|
|
|
playSound(76, 63);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(873);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(240, 163, 4);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5837);
|
2009-11-07 12:01:45 +00:00
|
|
|
waitLanAnimationFrame(1, 0x22);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(77, 2);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(77, 12);
|
|
|
|
playSound(77, 16);
|
|
|
|
playSound(77, 20);
|
|
|
|
playSound(77, 34);
|
|
|
|
playSound(78, 41);
|
|
|
|
playSound(78, 51);
|
|
|
|
playSound(56, 63);
|
|
|
|
playSound(24, 67);
|
|
|
|
playSound(23, 76);
|
2009-09-03 20:59:17 +00:00
|
|
|
setLan(1, 0);
|
|
|
|
playAnimation(874, 1);
|
|
|
|
setOns(0, 0x68);
|
|
|
|
inventory->remove(0x5b);
|
|
|
|
enableObject(6);
|
|
|
|
disableObject(1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x7ce5: //put spring on the solid ground
|
|
|
|
playSound(5, 2);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(19, 11);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(840);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 0x61);
|
|
|
|
inventory->remove(0x50);
|
|
|
|
disableObject(2);
|
|
|
|
enableObject(7);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x7d1a: //captain's key + door
|
|
|
|
if (res->dseg.get_byte(0xDBDF) <= 1) {
|
|
|
|
playSound(5, 2);
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(57, 12);
|
|
|
|
playSound(70, 19);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(828);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(262, 160, 1, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
disableObject(4);
|
|
|
|
disableObject(3);
|
|
|
|
setOns(0, 0);
|
|
|
|
setOns(1, 85);
|
|
|
|
setOns(2, 0);
|
|
|
|
setOns(3, 0);
|
|
|
|
loadScene(5, scene->getPosition());
|
|
|
|
setOns(0, 92);
|
|
|
|
playAnimation(829, 1);
|
|
|
|
setOns(0, 0);
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x63a5, 830, 0, 0xec, 0xd1, 1, 0);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(7, 130, 195);
|
|
|
|
playMusic(4);
|
|
|
|
setLan(1, 1);
|
|
|
|
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x6406, 0, 832, 0xd1, 0xec, 0, 1);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
//playAnimation(831, 1);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
SET_FLAG(0xDBDF, 2);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
} else
|
|
|
|
displayMessage(0x52f6);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x7e02: //tickling the captain
|
|
|
|
if (CHECK_FLAG(0xdbe0, 1)) {
|
|
|
|
displayMessage(0x5632);
|
|
|
|
} else {
|
|
|
|
playSound(5, 6);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(27, 49);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(834, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
playAnimation(835, 1, true);
|
|
|
|
waitAnimation();
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(0, 94);
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x65e9, 0, 832, 0xd1, 0xec, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
enableObject(12);
|
|
|
|
SET_FLAG(0xdbe0, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x7e4f: //giving magazine to captain
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x66c0, 0, 856, 0xd1, 0xec, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(5, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(852, true);
|
|
|
|
playActorAnimation(853, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5742);
|
|
|
|
displayMessage(0x5757);
|
|
|
|
displayMessage(0x5770);
|
|
|
|
displayMessage(0x5782);
|
|
|
|
displayMessage(0x5799);
|
|
|
|
playAnimation(856, 1);
|
|
|
|
playSound(5, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
//playActorAnimation(854);
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x66fe, 0, 856, 0xd1, 0xec, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
playAnimation(855, 1);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(30, 181, 0);
|
2009-09-03 20:59:17 +00:00
|
|
|
disableObject(1);
|
|
|
|
setLan(1, 0);
|
|
|
|
SET_FLAG(0xDBDF, 3);
|
|
|
|
SET_FLAG(0xDBF0, 1);
|
|
|
|
loadScene(8, 155, 199);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x7fbd: //using bird & bartender
|
|
|
|
playSound(5, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(876);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 0);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(26, 7);
|
|
|
|
playSound(79, 15);
|
|
|
|
playAnimation(877, 1);
|
|
|
|
playAnimation(880, 1, true);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
Dialog::show(scene, 0x6f0e, 857);
|
|
|
|
setOns(2, 0x6a);
|
|
|
|
reloadLan();
|
2009-09-15 22:35:19 +00:00
|
|
|
playAnimation(878, 0);
|
2009-11-07 09:52:05 +00:00
|
|
|
//playAnimation(879, 0); //background bartender animation
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->remove(0x5c);
|
|
|
|
enableObject(1);
|
|
|
|
SET_FLAG(0xDBE7, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x8047:
|
|
|
|
playSound(32, 5);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(5, 17);
|
|
|
|
playSound(52, 23);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(881);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(2, 0x6b);
|
|
|
|
inventory->remove(0x56);
|
|
|
|
inventory->add(0x55);
|
|
|
|
SET_FLAG(0xDBE8, 1);
|
|
|
|
return true;
|
|
|
|
|
2009-09-15 08:54:06 +00:00
|
|
|
case 0x808b:
|
2009-09-03 20:59:17 +00:00
|
|
|
if (CHECK_FLAG(0xDBDA, 1)) {
|
|
|
|
//alredy shown
|
|
|
|
displayMessage(0x53F2);
|
|
|
|
} else {
|
|
|
|
displayMessage(0x53DD);
|
2009-09-05 17:15:28 +00:00
|
|
|
playSound(5, 2);
|
|
|
|
playSound(5, 18);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(810);
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x60BF, 0, 809, 0xd1, 0xd0);
|
2009-09-03 20:59:17 +00:00
|
|
|
SET_FLAG(0xDBDA, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x80c3: //show kaleydoscope to the guard
|
2009-09-15 22:35:19 +00:00
|
|
|
Dialog::show(scene, 0x6811, 0, 809, 0xd1, 0xd0, 0, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(5, 3);
|
2009-09-15 22:35:19 +00:00
|
|
|
playSound(5, 30);
|
|
|
|
playSound(26, 14);
|
|
|
|
hideActor();
|
|
|
|
playAnimation(849, 0);
|
|
|
|
showActor();
|
|
|
|
playAnimation(851, 0);
|
|
|
|
playAnimation(850, 0);
|
2009-09-03 20:59:17 +00:00
|
|
|
reloadLan();
|
|
|
|
inventory->add(0x53);
|
|
|
|
inventory->remove(0x52);
|
|
|
|
enableObject(1);
|
|
|
|
SET_FLAG(0xDBE2, 1);
|
|
|
|
return true;
|
|
|
|
|
2009-09-15 08:54:06 +00:00
|
|
|
//Shore
|
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5348:
|
|
|
|
if (CHECK_FLAG(0xdb99, 1)) { //got broken paddle from boat
|
|
|
|
displayMessage(0x351f);
|
|
|
|
} else {
|
|
|
|
SET_FLAG(0xDB99, 1);
|
|
|
|
playSound(57, 6);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(536);
|
2009-09-03 20:59:17 +00:00
|
|
|
Dialog::show(scene, 0x30c3);
|
|
|
|
inventory->add(0x8);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x53a1:
|
|
|
|
if (CHECK_FLAG(0xdbb2, 1)) { //spoken to man in well
|
|
|
|
displayMessage(0x411d);
|
|
|
|
} else {
|
2009-09-15 08:54:06 +00:00
|
|
|
SET_FLAG(0xDBB2, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x408a);
|
|
|
|
displayMessage(0x4091);
|
|
|
|
displayMessage(0x4098);
|
|
|
|
displayMessage(0x40a7);
|
|
|
|
displayMessage(0x40b6);
|
|
|
|
displayMessage(0x40ce);
|
|
|
|
displayMessage(0x40e8);
|
|
|
|
displayMessage(0x410f);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5458: {
|
|
|
|
setOns(2, 0);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(34, 7);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(535);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(11);
|
|
|
|
disableObject(1);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
byte * scene_15_ons = scene->getOns(15); //patch ons for the scene 15
|
|
|
|
scene_15_ons[0] = 0;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
byte f = GET_FLAG(0xDB98) + 1;
|
|
|
|
SET_FLAG(0xDB98, f);
|
|
|
|
if (f >= 2) {
|
|
|
|
//disable object boat for scene 15!!
|
2009-09-27 05:17:00 +00:00
|
|
|
disableObject(1, 15);
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
}
|
|
|
|
return true;
|
2009-09-03 20:59:17 +00:00
|
|
|
|
|
|
|
case 0x54b3: {
|
|
|
|
setOns(1, 0);
|
|
|
|
setOns(3, 0);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(33, 6);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(534);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(10);
|
|
|
|
disableObject(2);
|
|
|
|
setOns(1, 10);
|
|
|
|
|
|
|
|
byte * scene_15_ons = scene->getOns(15); //patch ons for the scene 15
|
|
|
|
scene_15_ons[1] = 0;
|
|
|
|
byte f = GET_FLAG(0xDB98) + 1;
|
|
|
|
SET_FLAG(0xDB98, f);
|
|
|
|
if (f >= 2) {
|
|
|
|
//disable object boat for scene 15!!
|
2009-09-27 05:17:00 +00:00
|
|
|
disableObject(1, 15);
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5502:
|
|
|
|
setOns(0, 0);
|
|
|
|
loadScene(15, 115, 180, 1);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(568);
|
2009-09-03 20:59:17 +00:00
|
|
|
playMusic(6);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x5561://Enter lakeside house
|
2009-09-05 15:04:37 +00:00
|
|
|
processCallback(0x557e);
|
2009-11-07 12:01:45 +00:00
|
|
|
loadScene(19, 223, 199, 1);
|
2009-09-05 15:04:37 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 15:04:37 +00:00
|
|
|
case 0x557e:
|
|
|
|
//scaled moveTo
|
|
|
|
if (scene->getPosition().y <= 149)
|
|
|
|
moveTo(94, 115, 4);
|
2009-09-15 08:54:06 +00:00
|
|
|
else
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(51, 149, 4);
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x563b:
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(5, 10);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(561);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(26);
|
|
|
|
disableObject(6);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x56f6:
|
|
|
|
playSound(32, 7);
|
|
|
|
setOns(1, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(626);
|
2009-09-05 20:58:25 +00:00
|
|
|
disableObject(12);
|
|
|
|
inventory->add(45);
|
|
|
|
displayMessage(0x3b04);
|
|
|
|
return true;
|
2009-09-03 20:59:17 +00:00
|
|
|
|
|
|
|
case 0x5756://Open car door
|
|
|
|
playSound(11, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(514);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(4, 8);
|
|
|
|
setOns(2, 5);
|
|
|
|
enableObject(14);
|
|
|
|
enableObject(15);
|
|
|
|
enableObject(16);
|
|
|
|
disableObject(1);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x5805://Enter basketball house
|
|
|
|
playSound(70, 6);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(513);
|
2009-09-05 15:04:37 +00:00
|
|
|
loadScene(22, 51, 180, 2);
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x5832://Ring doorbell
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(509);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5dce);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x58a2:
|
|
|
|
Dialog::pop(scene, 0xdaba);
|
2009-09-26 15:04:09 +00:00
|
|
|
scene->getObject(13)->setName((const char *)res->dseg.ptr(0x92e5));
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x58b7://Get comb from car
|
|
|
|
disableObject(14);
|
2009-09-15 08:54:06 +00:00
|
|
|
setOns(4, 0);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(5, 7);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(521);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(4, 0);
|
|
|
|
inventory->add(0x6);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x58df://Pull trunk lever in car
|
|
|
|
SET_FLAG(0xDB94, 1);
|
|
|
|
playSound(6, 1);
|
|
|
|
setOns(3, 6);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(515);
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x593e://Enter annes house
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(89, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(980);
|
2009-09-05 15:04:37 +00:00
|
|
|
loadScene(23, 76, 199, 1);
|
2009-09-15 08:54:06 +00:00
|
|
|
if (CHECK_FLAG(0xDBEE, 1))
|
2009-09-08 14:26:14 +00:00
|
|
|
playMusic(7);
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5994:
|
|
|
|
processCallback(0x599b);
|
|
|
|
processCallback(0x5a21);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x599b:
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5a21:
|
|
|
|
loadScene(24, 230, 170, 1);
|
|
|
|
playSound(52, 3);
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(52, 7);
|
|
|
|
playSound(52, 11);
|
|
|
|
playSound(52, 14);
|
|
|
|
playSound(52, 18);
|
|
|
|
playSound(52, 21);
|
|
|
|
playSound(52, 25);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(601);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(230, 179, 3);
|
2009-09-03 20:59:17 +00:00
|
|
|
if (!CHECK_FLAG(0xDBA4, 1))
|
|
|
|
displayMessage(0x37ea); //it's kinda dark here
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x5a8b:
|
|
|
|
if (!CHECK_FLAG(0xDBAD, 1)) {
|
|
|
|
playSound(43, 4); //grrrrrr
|
|
|
|
setLan(1, 0);
|
|
|
|
playAnimation(656, 1);
|
|
|
|
setLan(1, 0xff);
|
|
|
|
displayMessage(0x3c16);
|
|
|
|
} else if (!CHECK_FLAG(0xDBA3, 1)) {//Dog has bone
|
|
|
|
playSound(28, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(596);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 30);
|
|
|
|
SET_FLAG(0xDBA3, 1);
|
|
|
|
enableObject(8);
|
|
|
|
} else {
|
|
|
|
setOns(1, 0);
|
|
|
|
playSound(4, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(597);
|
2009-09-03 20:59:17 +00:00
|
|
|
SET_FLAG(0xDBA3, 0);
|
|
|
|
disableObject(8);
|
|
|
|
displayMessage(0x37b8);
|
|
|
|
setOns(1, 32, 24);
|
|
|
|
enableObject(4, 24);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x5b3a://Click on dog
|
|
|
|
Dialog::pop(scene, 0xDB14);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x5b59: //picking up the rope
|
|
|
|
Dialog::show(scene, 0x2cbd);
|
|
|
|
Dialog::show(scene, 0x2dc2);
|
|
|
|
moveRel(0, -12, 0);
|
|
|
|
playSound(34, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(607);
|
2009-09-05 20:58:25 +00:00
|
|
|
setOns(0, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(608);
|
|
|
|
playActorAnimation(609);
|
|
|
|
playActorAnimation(610);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(5, 25);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(611);
|
2009-09-05 20:58:25 +00:00
|
|
|
moveTo(16, scene->getPosition().y, 4);
|
|
|
|
inventory->add(38);
|
|
|
|
disableObject(12);
|
|
|
|
return true;
|
2009-09-03 20:59:17 +00:00
|
|
|
|
|
|
|
case 0x5be1://Talk to grandpa
|
|
|
|
Dialog::pop(scene, 0xDAC4);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5c0d: //grandpa - drawers
|
|
|
|
if (CHECK_FLAG(0xDBA7, 1)) {
|
|
|
|
displayMessage(0x3bac);
|
|
|
|
} else {
|
|
|
|
if (!CHECK_FLAG(0xDB92, 1))
|
|
|
|
Dialog::show(scene, 0x15a0); //can I search your drawers?
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(66);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(631);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(47);
|
|
|
|
SET_FLAG(0xDBA7, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5c84:
|
|
|
|
if (CHECK_FLAG(0xDB92, 1)) {
|
|
|
|
inventory->add(2);
|
|
|
|
disableObject(7);
|
|
|
|
playSound(32);
|
|
|
|
setOns(0, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(520);
|
2009-09-03 20:59:17 +00:00
|
|
|
} else {
|
|
|
|
Dialog::pop(scene, 0xDACE);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5cf0://Exit basketball house
|
|
|
|
playSound(88, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(981);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(20, 161, 165);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5d24: //getting the fan
|
|
|
|
if (CHECK_FLAG(0xDB92, 1)) {
|
|
|
|
setLan(2, 0);
|
|
|
|
playSound(32);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(508);
|
2009-09-03 20:59:17 +00:00
|
|
|
disableObject(13);
|
|
|
|
inventory->add(7);
|
|
|
|
} else {
|
|
|
|
Dialog::pop(scene, 0xDAD4);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5e4d: //right click on ann
|
|
|
|
if (!CHECK_FLAG(0xDB97, 0)) {
|
|
|
|
displayMessage(0x3d59);
|
|
|
|
} else {
|
|
|
|
moveTo(245, 198, 1);
|
2009-11-07 12:01:45 +00:00
|
|
|
Dialog::show(scene, 0x21d7, 0, 524, 0xd0, 0xe5, 0, 1);
|
|
|
|
waitLanAnimationFrame(2, 1);
|
2009-09-03 20:59:17 +00:00
|
|
|
SET_FLAG(0xDB97, 1);
|
2009-09-15 08:54:06 +00:00
|
|
|
for (byte i = 10; i <= 20; i += 2)
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(13, i);
|
2009-09-03 20:59:17 +00:00
|
|
|
playAnimation(528, 1);
|
|
|
|
playMusic(7);
|
|
|
|
SET_FLAG(0xDBEE, 1);
|
2009-09-15 08:54:06 +00:00
|
|
|
for (byte i = 3; i <= 17; i += 2)
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(56, i);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(525);
|
2009-09-15 08:54:06 +00:00
|
|
|
for (byte i = 1; i <= 13; i += 2)
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(56, i);
|
|
|
|
playSound(40, 15);
|
|
|
|
playSound(40, 18);
|
|
|
|
playSound(40, 22);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(526);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(54, 1);
|
|
|
|
playSound(55, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(527);
|
2009-11-07 12:01:45 +00:00
|
|
|
Dialog::show(scene, 0x2219, 0, 524, 0xd0, 0xe5, 0, 1);
|
2009-09-26 15:04:09 +00:00
|
|
|
scene->getObject(2)->setName((const char *)res->dseg.ptr(0x9820));
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
2009-09-08 14:26:14 +00:00
|
|
|
case 0x5f73: //exiting ann's house
|
|
|
|
if (CHECK_FLAG(0xDBEE, 1))
|
|
|
|
playMusic(6);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(21, 161, 165);
|
|
|
|
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x5fba:
|
|
|
|
if (CHECK_FLAG(0xDBB1, 1)) {
|
|
|
|
displayMessage(0x4380);
|
|
|
|
} else {
|
|
|
|
Dialog::pop(scene, 0xDAFC);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0x607f:
|
|
|
|
processCallback(0x60b5);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x6083:
|
|
|
|
if (CHECK_FLAG(0xDBA4, 1)) {
|
|
|
|
setOns(0, 0);
|
|
|
|
playSound(56, 10);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(599);
|
2009-09-05 17:15:28 +00:00
|
|
|
inventory->add(37);
|
|
|
|
disableObject(2);
|
|
|
|
} else
|
|
|
|
processCallback(0x60b5);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 08:16:35 +00:00
|
|
|
case 0x60b5:
|
|
|
|
if (CHECK_FLAG(0xDBAE, 1)) {
|
|
|
|
processCallback(0x60d9);
|
2009-09-05 17:15:28 +00:00
|
|
|
Dialog::show(scene, 0x2fdd);
|
2009-09-05 08:16:35 +00:00
|
|
|
} else {
|
2009-09-05 17:15:28 +00:00
|
|
|
Dialog::show(scene, 0x2e41);
|
2009-09-05 08:16:35 +00:00
|
|
|
processCallback(0x60d9);
|
2009-09-05 17:15:28 +00:00
|
|
|
Dialog::show(scene, 0x2e6d);
|
2009-09-05 08:16:35 +00:00
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 08:16:35 +00:00
|
|
|
case 0x60d9: {
|
2009-09-15 08:54:06 +00:00
|
|
|
Object *obj = scene->getObject(3);
|
|
|
|
moveTo(obj);
|
|
|
|
processCallback(0x612b);
|
|
|
|
moveTo(48, 190, 3);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0x612b:
|
|
|
|
playSound(52, 10);
|
|
|
|
playSound(52, 14);
|
|
|
|
playSound(52, 18);
|
|
|
|
playSound(52, 21);
|
|
|
|
playSound(52, 25);
|
|
|
|
playSound(52, 28);
|
|
|
|
playSound(52, 32);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(600);
|
2009-09-05 17:15:28 +00:00
|
|
|
loadScene(21, 297, 178, 3);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 22:41:15 +00:00
|
|
|
case 0x6176:
|
|
|
|
if (CHECK_FLAG(0xDBA4, 1)) {
|
|
|
|
displayMessage(0x3801);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
playSound(71, 6);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(598);
|
2009-09-05 17:15:28 +00:00
|
|
|
loadScene(24, scene->getPosition());
|
2009-09-03 22:41:15 +00:00
|
|
|
setOns(2, 0);
|
2009-09-05 17:15:28 +00:00
|
|
|
setLan(1, 0);
|
2009-09-03 22:41:15 +00:00
|
|
|
playAnimation(660, 1);
|
|
|
|
disableObject(1);
|
|
|
|
SET_FLAG(0xDBA4, 1);
|
|
|
|
loadScene(24, scene->getPosition());
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 22:41:15 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0x61e9:
|
|
|
|
if (CHECK_FLAG(0xDBA4, 1)) {
|
|
|
|
Dialog::pop(scene, 0xdb1e);
|
|
|
|
} else
|
|
|
|
processCallback(0x61fe);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0x6229: //shelves in cellar
|
|
|
|
if (CHECK_FLAG(0xDBA4, 1)) {
|
|
|
|
Common::Point p = scene->getPosition();
|
|
|
|
byte v = GET_FLAG(0xDBB4);
|
2009-09-15 08:54:06 +00:00
|
|
|
switch (v) {
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0:
|
|
|
|
displayMessage(0x4532);
|
|
|
|
moveRel(-34, 0, 1);
|
|
|
|
displayMessage(0x4555);
|
|
|
|
moveRel(20, 0, 1);
|
|
|
|
displayMessage(0x4568);
|
|
|
|
moveRel(20, 0, 1);
|
|
|
|
displayMessage(0x457b);
|
|
|
|
moveRel(20, 0, 1);
|
|
|
|
displayMessage(0x458e);
|
|
|
|
moveTo(p, 3);
|
|
|
|
SET_FLAG(0xDBB4, 1);
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
displayMessage(0x45b8);
|
|
|
|
displayMessage(0x45da);
|
|
|
|
SET_FLAG(0xDBB4, 2);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
displayMessage(0x4603);
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-05 17:15:28 +00:00
|
|
|
processCallback(0x61fe);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x6480: //dive mask
|
2009-09-03 20:59:17 +00:00
|
|
|
if (CHECK_FLAG(0xDB96, 1)) {
|
|
|
|
setOns(3, 36);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(56, 7);
|
|
|
|
playSound(5, 15);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(613);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(39);
|
|
|
|
disableObject(5);
|
|
|
|
displayMessage(0x387c);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x3eb2);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x64c4: //flippers
|
2009-09-03 20:59:17 +00:00
|
|
|
if (CHECK_FLAG(0xDB96, 1)) {
|
|
|
|
setOns(2, 35);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(63, 8);
|
|
|
|
playSound(24, 10);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(612);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(40);
|
|
|
|
disableObject(6);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x3eb2);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x7907://Describe car lever
|
|
|
|
if (CHECK_FLAG(0xdb94, 1)) {//Already pulled lever?
|
|
|
|
displayMessage(0x3e4f);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-03 20:59:17 +00:00
|
|
|
return false;
|
|
|
|
|
|
|
|
case 0x62d0://Get bone from under rock
|
|
|
|
playSound(26, 6);
|
|
|
|
setOns(0, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(594);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(0, 29);
|
|
|
|
displayMessage(0x463c);
|
|
|
|
disableObject(1);
|
|
|
|
inventory->add(36);
|
|
|
|
playSound(5, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(595);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x3790);
|
|
|
|
return true;
|
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0x6351:
|
|
|
|
if (CHECK_FLAG(0xdaca, 1)) { //cave bush is cut down
|
|
|
|
playMusic(8);
|
2009-09-05 20:58:25 +00:00
|
|
|
loadScene(26, 319, 169, 4);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
|
|
|
displayMessage(0x3bd2);
|
2009-09-05 20:58:25 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x63ea:
|
|
|
|
playSound(5, 10);
|
|
|
|
setOns(0, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(640);
|
2009-09-05 20:58:25 +00:00
|
|
|
inventory->add(50);
|
|
|
|
disableObject(6);
|
|
|
|
return true;
|
2009-09-05 17:15:28 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x6411://Kick hen
|
|
|
|
if (CHECK_FLAG(0xdb93, 1)) { //already kicked hen
|
|
|
|
displayMessage(0x3e08);
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
SET_FLAG(0xdb93, 1);
|
|
|
|
playSound(30, 26);
|
|
|
|
displayMessage(0x3dc6);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(500, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
playAnimation(501, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
setOns(0, 1);
|
|
|
|
enableObject(14);
|
|
|
|
displayMessage(0x3df4);
|
|
|
|
return true;
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0x6592: //Rake
|
|
|
|
setOns(1, 0);
|
|
|
|
playSound(18, 10);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(553);
|
2009-09-05 17:15:28 +00:00
|
|
|
inventory->add(0x15);
|
2009-09-15 08:54:06 +00:00
|
|
|
displayMessage(0x3605);
|
2009-09-05 17:15:28 +00:00
|
|
|
disableObject(11);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x66b5:
|
2009-09-05 23:01:03 +00:00
|
|
|
playSound(89, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(969);
|
2009-09-05 23:01:03 +00:00
|
|
|
loadScene(33, 319, 181, 4);
|
2009-09-05 17:15:28 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x6519://Sickle
|
|
|
|
setOns(4, 0);
|
|
|
|
playSound(5, 11);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(625);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(0x2c);
|
|
|
|
disableObject(8);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x655b://Get needle from haystack
|
|
|
|
if (CHECK_FLAG(0xdabb, 1)) { //already have needle
|
|
|
|
displayMessage(0x356a);
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
SET_FLAG(0xdabb, 1);
|
|
|
|
playSound(49, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(548);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(0x11);
|
|
|
|
displayMessage(0x35b2);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
case 0x663c://Feather
|
|
|
|
setOns(0, 0);
|
|
|
|
playSound(5, 9);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(511);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(1);
|
|
|
|
disableObject(15);
|
2009-09-15 08:54:06 +00:00
|
|
|
return true;
|
2009-09-03 20:59:17 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x667c:
|
|
|
|
playSound(70, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(972);
|
2009-09-05 20:58:25 +00:00
|
|
|
loadScene(29, 160, 199, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x66a9:
|
|
|
|
displayMessage(0x4a7e);
|
|
|
|
disableObject(4);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x66e2:
|
|
|
|
playSound(88, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(970);
|
2009-09-05 23:01:03 +00:00
|
|
|
loadScene(35, 160, 199, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x70bb:
|
|
|
|
Dialog::pop(scene, 0xdb24, 709);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x71ae:
|
|
|
|
if (CHECK_FLAG(0xDBCD, 1)) {
|
|
|
|
if (CHECK_FLAG(0xDBCE, 1)) {
|
|
|
|
displayMessage(0x4f9b);
|
|
|
|
} else {
|
|
|
|
displayMessage(0x4fb1);
|
|
|
|
playSound(32, 6);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(717);
|
2009-09-05 23:01:03 +00:00
|
|
|
inventory->add(66);
|
|
|
|
SET_FLAG(0xDBCE, 1);
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
Dialog::show(scene, 0x3c9d);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x70c8:
|
|
|
|
if (!processCallback(0x70e0))
|
|
|
|
return true;
|
|
|
|
moveTo(81, 160, 4);
|
|
|
|
displayMessage(0x5cac);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x70e0:
|
|
|
|
if (!CHECK_FLAG(0xDBCC, 1)) {
|
|
|
|
displayMessage(0x4ece);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x70ef:
|
|
|
|
if (!processCallback(0x70e0))
|
|
|
|
return true;
|
|
|
|
displayMessage(0x5046);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x70f9:
|
|
|
|
if (inventory->has(68)) {
|
|
|
|
inventory->remove(68);
|
|
|
|
loadScene(29, 40, 176, 2);
|
|
|
|
displayMessage(0x500a);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-05 23:01:03 +00:00
|
|
|
loadScene(29, 40, 176, 2);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x712c:
|
|
|
|
if (!processCallback(0x70e0))
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
if (CHECK_FLAG(0xDBCF, 1)) {
|
|
|
|
playSound(89, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(719);
|
2009-09-05 23:01:03 +00:00
|
|
|
setOns(4, 67);
|
|
|
|
++ *res->dseg.ptr(READ_LE_UINT16(res->dseg.ptr(0x6746 + (scene->getId() - 1) * 2)));
|
|
|
|
disableObject(5);
|
|
|
|
enableObject(12);
|
|
|
|
} else {
|
|
|
|
playSound(89, 4);
|
|
|
|
playSound(89, 4);
|
|
|
|
playSound(87, 45);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(718);
|
2009-09-05 23:01:03 +00:00
|
|
|
displayMessage(0x4fcb); //fixme: move it to animation
|
|
|
|
displayMessage(0x4fe2);
|
|
|
|
SET_FLAG(0xDBCF, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x71eb:
|
|
|
|
setOns(2, 0);
|
|
|
|
playSound(32, 7);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(710);
|
2009-09-05 23:01:03 +00:00
|
|
|
inventory->add(62);
|
|
|
|
disableObject(7);
|
|
|
|
enableObject(8);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x7244:
|
|
|
|
if (!processCallback(0x70e0))
|
|
|
|
return true;
|
|
|
|
displayMessage(0x5c60);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x7255:
|
|
|
|
if (CHECK_FLAG(0xDBD0, 1)) {
|
2009-09-07 22:52:51 +00:00
|
|
|
setOns(4, 69);
|
2009-09-05 23:01:03 +00:00
|
|
|
playSound(32, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(725);
|
2009-09-05 23:01:03 +00:00
|
|
|
disableObject(12);
|
|
|
|
inventory->add(69);
|
|
|
|
} else {
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(721);
|
2009-09-05 23:01:03 +00:00
|
|
|
displayMessage(0x505e);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x721c:
|
|
|
|
setOns(3, 0);
|
|
|
|
playSound(32, 7);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(715);
|
2009-09-05 23:01:03 +00:00
|
|
|
inventory->add(63);
|
|
|
|
disableObject(9);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x7336:
|
|
|
|
setOns(1, 0);
|
|
|
|
playSound(5, 42);
|
|
|
|
displayMessage(0x4d02);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(697);
|
2009-09-05 23:01:03 +00:00
|
|
|
inventory->add(56);
|
|
|
|
disableObject(1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x73a3:
|
|
|
|
if (CHECK_FLAG(0xdbc5, 1)) {
|
|
|
|
SET_FLAG(0xdbc5, 0);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
//call 73e6
|
|
|
|
playSound(71, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(700);
|
2009-09-05 23:01:03 +00:00
|
|
|
|
|
|
|
} else {
|
|
|
|
SET_FLAG(0xdbc5, 1);
|
|
|
|
|
|
|
|
//call 73e6
|
|
|
|
playSound(71, 3);
|
2009-09-15 08:54:06 +00:00
|
|
|
playActorAnimation(700);
|
|
|
|
|
|
|
|
playAnimation(CHECK_FLAG(0xDBC6, 0) ? 701 : 702, 1);
|
2009-09-05 23:01:03 +00:00
|
|
|
|
|
|
|
if (CHECK_FLAG(0xDBC6, 1)) {
|
|
|
|
displayMessage(0x4da6);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x7381:
|
|
|
|
playSound(5, 12);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(704);
|
2009-09-05 23:01:03 +00:00
|
|
|
disableObject(2);
|
|
|
|
inventory->add(58);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x7408:
|
|
|
|
if (CHECK_FLAG(0xDBC4, 1)) {
|
|
|
|
displayMessage(0x4d2a);
|
|
|
|
} else {
|
|
|
|
setOns(0, 0);
|
|
|
|
playSound(26, 17);
|
|
|
|
playSound(26, 23);
|
|
|
|
playSound(26, 30);
|
|
|
|
playSound(26, 37);
|
|
|
|
playSound(26, 43);
|
|
|
|
playSound(52, 34);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(698);
|
2009-09-05 23:01:03 +00:00
|
|
|
setOns(0, 52);
|
|
|
|
setOns(2, 61);
|
|
|
|
Dialog::show(scene, 0x38b6);
|
|
|
|
enableObject(11);
|
|
|
|
SET_FLAG(0xDBC4, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x7476:
|
|
|
|
if (CHECK_FLAG(0xDBC9, 1)) {
|
|
|
|
displayMessage(0x4dbb);
|
|
|
|
} else {
|
|
|
|
SET_FLAG(0xDBC9, 1);
|
|
|
|
Dialog::show(scene, 0x3aca);
|
|
|
|
playSound(61, 5);
|
|
|
|
playSound(5, 14);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(705);
|
2009-09-05 23:01:03 +00:00
|
|
|
displayMessage(0x4dd3);
|
|
|
|
inventory->add(59);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x74d1:
|
|
|
|
setOns(2, 0);
|
|
|
|
playSound(5, 12);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(699);
|
2009-09-05 23:01:03 +00:00
|
|
|
inventory->add(57);
|
|
|
|
disableObject(11);
|
|
|
|
return true;
|
2009-09-07 22:52:51 +00:00
|
|
|
|
|
|
|
case 0x7513:
|
|
|
|
if (CHECK_FLAG(0xDBD7, 1)) {
|
|
|
|
if (CHECK_FLAG(0xDBD8, 1)) {
|
|
|
|
playSound(88, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(979);
|
2009-09-07 22:52:51 +00:00
|
|
|
loadScene(37, 51, 183);
|
|
|
|
Dialog::show(scene, 0x54ea, 768, 769);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(770, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
playAnimation(771, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
Dialog::show(scene, 0x5523, 768, 769);
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(56, 12);
|
|
|
|
playSound(23, 20);
|
|
|
|
playSound(75, 25);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(772);
|
2009-09-07 22:52:51 +00:00
|
|
|
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(774, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
playAnimation(773, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
setOns(0, 74);
|
|
|
|
Dialog::show(scene, 0x5556, 775);
|
|
|
|
playAnimation(776, 1);
|
|
|
|
Dialog::show(scene, 0x55f7, 777, 778);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(779, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
playAnimation(780, 1, true);
|
|
|
|
waitAnimation();
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
for (byte i = 1; i <= 6; ++i)
|
2009-09-07 22:52:51 +00:00
|
|
|
playSound(58, i);
|
|
|
|
playSound(58, 10);
|
|
|
|
playSound(2, 7);
|
|
|
|
playSound(55, 11);
|
|
|
|
playSound(54, 15);
|
|
|
|
playAnimation(781, 2, true);
|
|
|
|
playAnimation(782, 3, true);
|
|
|
|
waitAnimation();
|
|
|
|
setOns(1, 75);
|
|
|
|
setOns(2, 76);
|
2009-09-15 08:54:06 +00:00
|
|
|
for (byte i = 1; i <= 6; ++i)
|
2009-09-07 22:52:51 +00:00
|
|
|
playSound(58, i);
|
|
|
|
playSound(58, 9);
|
|
|
|
playSound(2, 7);
|
|
|
|
playSound(2, 15);
|
|
|
|
playSound(55, 10);
|
|
|
|
|
|
|
|
playAnimation(783, 2, true);
|
|
|
|
playAnimation(784, 3, true);
|
|
|
|
waitAnimation();
|
|
|
|
|
|
|
|
setOns(1, 77);
|
|
|
|
setOns(2, 78);
|
|
|
|
|
|
|
|
playAnimation(785, 2, true);
|
|
|
|
playAnimation(786, 3, true);
|
|
|
|
waitAnimation();
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
moveTo(112, 183, 2);
|
|
|
|
setOns(3, 79);
|
|
|
|
setOns(0, 0);
|
|
|
|
|
|
|
|
playAnimation(787, 2, true);
|
|
|
|
playAnimation(788, 3, true);
|
|
|
|
waitAnimation();
|
|
|
|
|
|
|
|
playSound(32, 2);
|
|
|
|
playSound(24, 7);
|
|
|
|
|
|
|
|
playAnimation(789, 2, true);
|
|
|
|
playAnimation(790, 3, true);
|
|
|
|
waitAnimation();
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
setOns(0, 80);
|
|
|
|
Dialog::show(scene, 0x5665);
|
|
|
|
playAnimation(792, 3);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
moveTo(40, 171, 4);
|
|
|
|
setOns(3, 81, 35);
|
|
|
|
enableObject(12, 35);
|
|
|
|
|
|
|
|
loadScene(31, 298, 177, 4);
|
|
|
|
SET_FLAG(0xDBD9, 1);
|
|
|
|
} else {
|
|
|
|
displayMessage(0x52fe);
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-07 22:52:51 +00:00
|
|
|
displayMessage(0x52cb);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x783d:
|
|
|
|
Dialog::pop(scene, 0xdb36, 797);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x7ad0:
|
|
|
|
case 0x7ad7:
|
|
|
|
return !processCallback(0x70e0);
|
|
|
|
|
|
|
|
case 0x7ade:
|
|
|
|
if (CHECK_FLAG(0xdbcd, 1)) {
|
|
|
|
displayMessage(0x4f69);
|
2009-09-07 22:52:51 +00:00
|
|
|
return true;
|
2009-09-05 23:01:03 +00:00
|
|
|
} else
|
|
|
|
return false;
|
2009-09-05 20:58:25 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x7f23://Use grenade on captains drawer
|
|
|
|
if (CHECK_FLAG(0xDBDF, 3)) {
|
|
|
|
playSound(5, 3);
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(58, 11);
|
|
|
|
playSound(46, 56);
|
|
|
|
playSound(46, 85);
|
|
|
|
playSound(46, 117);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(870);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(54, 15);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(871);
|
2009-09-03 20:59:17 +00:00
|
|
|
SET_FLAG(0xDBE6, 1);
|
|
|
|
setOns(1, 0x66);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(224, 194, 0, true);
|
2009-10-31 18:49:47 +00:00
|
|
|
displayCutsceneMessage(0x57df, 30423);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->remove(0x59);
|
|
|
|
} else {
|
|
|
|
displayMessage(0x5de2);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
case 0x505c: {
|
|
|
|
//suspicious stuff
|
|
|
|
Common::Point p = scene->getPosition();
|
|
|
|
if (p.x != 203 && p.y != 171)
|
|
|
|
moveTo(203, 169, 2);
|
|
|
|
else
|
|
|
|
moveTo(203, 169, 1);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x509a:
|
2009-09-05 15:04:37 +00:00
|
|
|
processCallback(0x505c);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 0);
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(5, 10);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(543);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->add(15);
|
|
|
|
disableObject(9);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x7802:
|
|
|
|
if (CHECK_FLAG(0xDBD7, 1)) {
|
2009-09-15 08:54:06 +00:00
|
|
|
if (CHECK_FLAG(0xDBD8, 1))
|
2009-09-07 22:52:51 +00:00
|
|
|
displayMessage(0x52f6);
|
|
|
|
else {
|
|
|
|
playSound(71, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(796);
|
2009-09-07 22:52:51 +00:00
|
|
|
setLan(1, 0);
|
|
|
|
SET_FLAG(0xDBD8, 1);
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-07 22:52:51 +00:00
|
|
|
displayMessage(0x52cb);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x78e0:
|
2009-09-05 15:04:37 +00:00
|
|
|
processCallback(0x50c5);
|
|
|
|
return false;
|
|
|
|
|
|
|
|
case 0x78e7:
|
|
|
|
processCallback(0x557e);
|
|
|
|
return false;
|
|
|
|
|
|
|
|
case 0x78ee:
|
|
|
|
processCallback(0x557e);
|
2009-09-03 20:59:17 +00:00
|
|
|
return false;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 15:04:37 +00:00
|
|
|
case 0x78f5:
|
|
|
|
if (CHECK_FLAG(0xDB95, 1)) {
|
|
|
|
displayMessage(0x3575);
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x7919:
|
|
|
|
if (!CHECK_FLAG(0xDBA5, 1))
|
|
|
|
return false;
|
|
|
|
displayMessage(0x3E98);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x7950:
|
|
|
|
if (!CHECK_FLAG(0xDBB1, 1))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
displayMessage(0x3DAF);
|
|
|
|
return true;
|
2009-09-05 17:15:28 +00:00
|
|
|
|
|
|
|
case 0x7975:
|
|
|
|
if (CHECK_FLAG(0xDBA4, 1))
|
|
|
|
return false;
|
|
|
|
displayMessage(0x3832);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x7987:
|
|
|
|
case 0x7996:
|
|
|
|
case 0x79a5:
|
|
|
|
case 0x79b4:
|
|
|
|
if (CHECK_FLAG(0xDBA4, 1))
|
|
|
|
return false;
|
|
|
|
return processCallback(0x61fe);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x7af0:
|
|
|
|
if (!processCallback(0x70e0))
|
|
|
|
return true;
|
|
|
|
return false;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x8117:
|
|
|
|
Dialog::show(scene, 0x0a41, 529);
|
|
|
|
playSound(5, 2);
|
|
|
|
playSound(5, 44);
|
|
|
|
playAnimation(642, 1, true);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(641, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
waitAnimation();
|
|
|
|
Dialog::show(scene, 0x0aff, 529);
|
|
|
|
Dialog::show(scene, 0x0ba0, 529);
|
|
|
|
moveRel(0, 1, 0);
|
|
|
|
Dialog::show(scene, 0x0c10, 529);
|
|
|
|
inventory->remove(50);
|
|
|
|
processCallback(0x9d45);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x8174:
|
|
|
|
setOns(0, 0);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(5, 2);
|
|
|
|
playSound(5, 5);
|
|
|
|
playSound(5, 9);
|
|
|
|
playSound(14, 19);
|
|
|
|
playSound(5, 50);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(542);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 15);
|
|
|
|
disableObject(3);
|
|
|
|
enableObject(9);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x81c2:
|
|
|
|
playSound(56, 11);
|
|
|
|
playSound(36, 13);
|
|
|
|
playSound(48, 22);
|
|
|
|
playSound(56, 57);
|
|
|
|
playSound(36, 59);
|
|
|
|
playSound(48, 68);
|
|
|
|
playSound(54, 120);
|
|
|
|
playSound(56, 141);
|
|
|
|
playSound(56, 144);
|
|
|
|
playSound(56, 147);
|
|
|
|
playAnimation(589, 1, true);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(588, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
waitAnimation();
|
|
|
|
displayMessage(0x367f);
|
|
|
|
inventory->remove(34);
|
|
|
|
SET_FLAG(0xDBA1, 1);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x823d: //grappling hook on the wall
|
|
|
|
playSound(5, 3);
|
2009-09-15 08:54:06 +00:00
|
|
|
for (byte i = 16; i <= 28; i += 2)
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(65, i);
|
|
|
|
playSound(47, 33);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(620);
|
2009-09-15 08:54:06 +00:00
|
|
|
for (byte i = 3; i <= 18; i += 3)
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(56, i);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(621, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(623, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
playSound(35);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(622, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(624, 1, true);
|
|
|
|
displayMessage(0x3afd);
|
|
|
|
inventory->remove(43);
|
|
|
|
processCallback(0x9d45);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x8312: //hedgehog + plastic apple
|
|
|
|
Dialog::show(scene, 0x3000);
|
|
|
|
setLan(1, 0);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(5, 24);
|
|
|
|
playSound(26, 32);
|
|
|
|
playSound(5, 42);
|
|
|
|
playSound(15, 77);
|
|
|
|
playSound(15, 79);
|
|
|
|
playSound(15, 82);
|
|
|
|
playSound(22, 91);
|
|
|
|
playSound(22, 102);
|
|
|
|
playSound(26, 114);
|
|
|
|
playSound(24, 124);
|
2009-11-07 12:01:45 +00:00
|
|
|
waitLanAnimationFrame(1, 0x1a);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(562, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(563, 1, true);
|
|
|
|
waitAnimation();
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
disableObject(6);
|
|
|
|
displayMessage(0x363f);
|
|
|
|
inventory->remove(27);
|
|
|
|
inventory->add(28);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x839f:
|
|
|
|
inventory->remove(32);
|
|
|
|
playSound(37, 14);
|
|
|
|
playSound(16, 17);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(564, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(565, 2, true);
|
|
|
|
waitAnimation();
|
|
|
|
setOns(0, 24);
|
|
|
|
playSound(39, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(582);
|
2009-09-05 20:58:25 +00:00
|
|
|
moveTo(63, 195, 1);
|
|
|
|
playAnimation(571, 1);
|
|
|
|
playAnimation(572, 1);
|
|
|
|
playAnimation(573, 1);
|
2009-09-15 08:54:06 +00:00
|
|
|
for (byte i = 1; i <= 7; i += 2)
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(40, i);
|
|
|
|
playAnimation(574, 1);
|
|
|
|
setLan(1, 0);
|
|
|
|
playAnimation(575, 1);
|
|
|
|
playAnimation(576, 1);
|
|
|
|
playAnimation(577, 1);
|
|
|
|
playAnimation(578, 1);
|
|
|
|
playAnimation(579, 1);
|
|
|
|
playAnimation(580, 1);
|
|
|
|
playSound(55, 18);
|
|
|
|
playAnimation(581, 1);
|
|
|
|
disableObject(2);
|
|
|
|
SET_FLAG(0xDB9F, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x84c7:
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(20, 9);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(530);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(16, 236, 95, 1);
|
|
|
|
setOns(0, 9);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(531);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(36, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(532);
|
|
|
|
playActorAnimation(533);
|
2009-09-05 20:58:25 +00:00
|
|
|
moveTo(236, 95, 1, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
playMusic(9);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x8538://Sharpen sickle on well
|
2009-09-05 20:58:25 +00:00
|
|
|
moveTo(236, 190, 0);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(2, 0);
|
|
|
|
//TODO: Remove handle sprite
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(5, 4);
|
|
|
|
playSound(14, 14);
|
|
|
|
playSound(14, 33);
|
|
|
|
playSound(5, 43);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(643);
|
2009-09-05 20:58:25 +00:00
|
|
|
setOns(2, 43);
|
|
|
|
moveTo(236, 179, 3);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->remove(0x2c);
|
|
|
|
inventory->add(0x2e);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x85eb:
|
|
|
|
if (CHECK_FLAG(0xDBB0, 1)) {
|
|
|
|
enableObject(6);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(25, 10);
|
|
|
|
playSound(25, 14);
|
|
|
|
playSound(25, 18);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(559);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 23);
|
|
|
|
SET_FLAG(0xDBB0, 2);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x3d86);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x863d:
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(12, 4);
|
|
|
|
playSound(50, 20);
|
|
|
|
playSound(50, 29);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(554);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->remove(19);
|
|
|
|
inventory->add(22);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x8665:
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(5, 3);
|
|
|
|
for (byte i = 12; i <= 24; i += 2)
|
|
|
|
playSound(56, i);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(567);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->remove(12);
|
|
|
|
inventory->add(33);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x86a9: //correcting height of the pole with spanner
|
|
|
|
if (CHECK_FLAG(0xDB92, 1)) {
|
|
|
|
displayMessage(0x3d40);
|
|
|
|
} else {
|
|
|
|
SET_FLAG(0xDB92, 1);
|
2009-11-07 12:01:45 +00:00
|
|
|
Dialog::show(scene, 0x0fcd, 0, 502, 0xd0, 0xe5, 0, 1);
|
|
|
|
waitLanAnimationFrame(1, 7);
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(5, 16);
|
|
|
|
playSound(1, 25);
|
|
|
|
playSound(1, 29);
|
|
|
|
playSound(1, 34);
|
2009-09-03 20:59:17 +00:00
|
|
|
playAnimation(506, 1);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(504);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(0, 0);
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(24, 2);
|
|
|
|
playSound(22, 24);
|
|
|
|
playSound(1, 28);
|
|
|
|
playSound(1, 32);
|
|
|
|
playSound(1, 37);
|
|
|
|
playSound(5, 43);
|
|
|
|
playSound(61, 70);
|
|
|
|
playSound(61, 91);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(505);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x3cfb);
|
|
|
|
playAnimation(507, 1);
|
|
|
|
setOns(0, 4);
|
2009-09-27 05:17:00 +00:00
|
|
|
{
|
|
|
|
Object *obj = scene->getObject(3);
|
|
|
|
obj->rect.top += 20;
|
|
|
|
obj->rect.bottom += 20;
|
|
|
|
obj->rect.save();
|
|
|
|
}
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(10);
|
|
|
|
playAnimation(503, 1);
|
|
|
|
setLan(1, 0, 22);
|
2009-09-27 05:17:00 +00:00
|
|
|
disableObject(1, 22);
|
|
|
|
disableObject(13, 20);
|
2009-09-03 20:59:17 +00:00
|
|
|
setLan(1, 0);
|
|
|
|
disableObject(1);
|
|
|
|
disableObject(2);
|
|
|
|
disableObject(14);
|
|
|
|
disableObject(15);
|
|
|
|
disableObject(16);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(162, 164, 2);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x3d01, 0xe5);
|
|
|
|
displayMessage(0x3d20, 0xd8);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(162, 191, 2);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 0);
|
|
|
|
setOns(2, 0);
|
|
|
|
setOns(3, 0);
|
|
|
|
setOns(4, 0);
|
|
|
|
scene->getWalkbox(0)->rect.clear();
|
2009-09-26 15:04:09 +00:00
|
|
|
scene->getWalkbox(0)->save();
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(62);
|
|
|
|
//patch lan, 1
|
|
|
|
displayMessage(0x3d3a);
|
2009-09-27 05:17:00 +00:00
|
|
|
{
|
|
|
|
Object *obj = scene->getObject(7);
|
|
|
|
obj->actor_rect.left = 228;
|
|
|
|
obj->actor_rect.top = 171;
|
|
|
|
obj->actor_rect.save();
|
|
|
|
}
|
|
|
|
{
|
|
|
|
Object *obj = scene->getObject(8);
|
|
|
|
obj->actor_rect.left = 290;
|
|
|
|
obj->actor_rect.top = 171;
|
|
|
|
obj->actor_rect.save();
|
|
|
|
}
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x88c9: //give flower to old lady
|
|
|
|
if (CHECK_FLAG(0xDB9A, 1))
|
|
|
|
return processCallback(0x890b);
|
|
|
|
|
|
|
|
inventory->remove(10);
|
|
|
|
SET_FLAG(0xDB9A, 1);
|
|
|
|
processCallback(0x88DE);
|
|
|
|
return true;
|
2009-09-05 20:58:25 +00:00
|
|
|
|
|
|
|
case 0x88de:
|
|
|
|
playSound(5);
|
|
|
|
Dialog::show(scene, 0x1B5F, 523);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(537);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(538, 1);
|
|
|
|
Dialog::show(scene, 0x1BE0, 523);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x890b:
|
|
|
|
Dialog::pop(scene, 0xDAF0);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x8918://give flower to old lady
|
|
|
|
if (CHECK_FLAG(0xDB9A, 1))
|
|
|
|
return processCallback(0x890B);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->remove(11);
|
|
|
|
SET_FLAG(0xDB9A, 1);
|
|
|
|
processCallback(0x88DE);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x892d:
|
|
|
|
if (CHECK_FLAG(0xDB9B, 1))
|
|
|
|
return processCallback(0x89aa);
|
|
|
|
|
|
|
|
processCallback(0x8942);
|
|
|
|
inventory->remove(10);
|
|
|
|
SET_FLAG(0xDB9B, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x8942:
|
|
|
|
Dialog::show(scene, 0x2293);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(5, 10);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(540, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(539, 1, true);
|
|
|
|
waitAnimation();
|
2009-09-03 20:59:17 +00:00
|
|
|
Dialog::show(scene, 0x24b1);
|
|
|
|
Dialog::show(scene, 0x24d7);
|
|
|
|
Dialog::show(scene, 0x2514);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(scene->getPosition().x, scene->getPosition().y + 1, 0);
|
2009-09-03 20:59:17 +00:00
|
|
|
Dialog::show(scene, 0x2570);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x89aa:
|
|
|
|
Dialog::pop(scene, 0xdb02);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x89b7:
|
2009-09-15 08:54:06 +00:00
|
|
|
if (CHECK_FLAG(0xDB9B, 1))
|
2009-09-03 20:59:17 +00:00
|
|
|
return processCallback(0x89aa);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
processCallback(0x8942);
|
|
|
|
inventory->remove(11);
|
|
|
|
SET_FLAG(0xDB9B, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x89cc:
|
|
|
|
inventory->remove(23);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(5, 6);
|
2009-09-03 20:59:17 +00:00
|
|
|
Dialog::show(scene, 0x2634);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(555, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(556, 1, true);
|
|
|
|
waitAnimation();
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(557, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(558, 1, true);
|
2009-09-15 08:54:06 +00:00
|
|
|
waitAnimation();
|
2009-09-03 20:59:17 +00:00
|
|
|
Dialog::show(scene, 0x2971);
|
|
|
|
inventory->add(24);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x8a22:
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(45, 16);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(560);
|
2009-09-03 20:59:17 +00:00
|
|
|
inventory->remove(26);
|
|
|
|
inventory->add(27);
|
|
|
|
Dialog::show(scene, 0x1ecd);
|
|
|
|
Dialog::show(scene, 0x1f09);
|
|
|
|
SET_FLAG(0xDBB1, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x8a6f: //banknote + ann
|
|
|
|
if (CHECK_FLAG(0xDBB5, 1)) {
|
|
|
|
Dialog::show(scene, 0x2992);
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(5, 20);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(671, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(670, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
playAnimation(672, 1);
|
|
|
|
Dialog::show(scene, 0x2a00, 672);
|
|
|
|
//fixme: skipped some text
|
|
|
|
playSound(83, 12);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(673);
|
2009-09-05 20:58:25 +00:00
|
|
|
loadScene(11, scene->getPosition());
|
|
|
|
playSound(24, 31);
|
|
|
|
playSound(24, 48);
|
|
|
|
playSound(79, 50);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(674, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(675, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
loadScene(28, 0, 167, 2);
|
|
|
|
moveTo(66, 167, 2);
|
|
|
|
displayMessage(0x4a6f);
|
|
|
|
inventory->clear();
|
|
|
|
inventory->add(29);
|
2009-09-08 14:26:14 +00:00
|
|
|
playMusic(10);
|
2009-09-05 20:58:25 +00:00
|
|
|
} else
|
|
|
|
displayMessage(0x4a29);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x8b82: //use fan on laundry
|
|
|
|
setOns(0, 0);
|
|
|
|
playSound(5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(602);
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x464a);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(603);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(0, 27);
|
|
|
|
SET_FLAG(0xDBA5, 1);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x8bfc://Give bone to dog
|
|
|
|
displayMessage(0x3c31);
|
|
|
|
playSound(5, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(657, true);
|
2009-09-03 20:59:17 +00:00
|
|
|
playAnimation(658, 1, true);
|
|
|
|
waitAnimation();
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
playAnimation(659, 1);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x3c3d);
|
|
|
|
inventory->remove(36);
|
|
|
|
SET_FLAG(0xDBAD, 1);
|
|
|
|
//TODO:Adjust Walkboxes
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x8c6e://Use car jack on rock
|
|
|
|
playSound(5, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(592);
|
2009-09-03 20:59:17 +00:00
|
|
|
playSound(1, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(593);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(0, 28);
|
|
|
|
disableObject(35);
|
|
|
|
enableObject(1);
|
|
|
|
inventory->remove(35);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x8cc8://Cut bush with sickle
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(5, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(644);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(1, 45);
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(56, 2);
|
|
|
|
playSound(26, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(645);
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(56, 1);
|
|
|
|
playSound(56, 6);
|
|
|
|
playSound(26, 3);
|
|
|
|
playSound(26, 8);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(646);
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(5, 21);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(647);
|
2009-09-03 20:59:17 +00:00
|
|
|
SET_FLAG(0xdaca, 1);
|
|
|
|
inventory->remove(0x2e);
|
|
|
|
disableObject(2);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x8d57:
|
|
|
|
playSound(5, 2);
|
|
|
|
playSound(15, 12);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(638);
|
2009-09-05 20:58:25 +00:00
|
|
|
inventory->remove(48);
|
|
|
|
//fixme: add time challenge here!
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
/*
|
|
|
|
inventory->add(48);
|
|
|
|
playSound(24, 26);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(650, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(651, 2, true);
|
|
|
|
waitAnimation();
|
|
|
|
*/
|
|
|
|
playSound(5, 2);
|
|
|
|
playSound(52, 13);
|
|
|
|
setOns(1, 46);
|
|
|
|
inventory->remove(49);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
//third part
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(649);
|
2009-09-05 20:58:25 +00:00
|
|
|
setOns(1, 47);
|
|
|
|
for (byte i = 1; i <= 37; i += 4)
|
|
|
|
playSound(68, i);
|
|
|
|
playAnimation(639, 2);
|
|
|
|
setOns(0, 42);
|
|
|
|
enableObject(6);
|
|
|
|
disableObject(5);
|
|
|
|
SET_FLAG(0xDBAB, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x8f1d:
|
|
|
|
Dialog::show(scene, 0x2dd6);
|
|
|
|
setLan(3, 0);
|
|
|
|
setLan(4, 0);
|
2009-09-05 20:58:25 +00:00
|
|
|
displayMessage(0x34c7);
|
2009-09-15 08:54:06 +00:00
|
|
|
for (uint i = 16; i <= 30; i += 2)
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(56, i);
|
|
|
|
playSound(2, 64);
|
|
|
|
playSound(3, 74);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(516, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(517, 2, true);
|
|
|
|
playAnimation(518, 3, true);
|
|
|
|
waitAnimation();
|
2009-09-03 20:59:17 +00:00
|
|
|
disableObject(2);
|
|
|
|
disableObject(3);
|
|
|
|
inventory->remove(2);
|
|
|
|
SET_FLAG(0xDB96, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x8fc8:
|
|
|
|
displayMessage(0x3b2f);
|
2009-11-07 12:01:45 +00:00
|
|
|
waitLanAnimationFrame(2, 4);
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(5, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(627, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(629, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
playSound(41, 10);
|
|
|
|
playSound(41, 47);
|
|
|
|
playSound(55, 52);
|
|
|
|
if (CHECK_FLAG(0xDBA8, 1)) {
|
|
|
|
setLan(2, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(628, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(634, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
disableObject(4);
|
|
|
|
displayMessage(0x3b6c);
|
|
|
|
SET_FLAG(0xDBA9, 1);
|
|
|
|
} else {
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(628, true);
|
2009-09-05 20:58:25 +00:00
|
|
|
playAnimation(630, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
displayMessage(0x3b59);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
case 0x9054: //mouse hole
|
|
|
|
if (CHECK_FLAG(0xDBAB, 1)) {
|
|
|
|
displayMessage(0x3c0b);
|
|
|
|
} else {
|
2009-09-05 15:04:37 +00:00
|
|
|
playSound(5, 11);
|
|
|
|
playSound(49, 21);
|
|
|
|
moveTo(scene->getPosition().x, 99, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(632);
|
2009-09-03 20:59:17 +00:00
|
|
|
setOns(5, 40);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(239, 139, 0, true);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(633);
|
2009-09-03 20:59:17 +00:00
|
|
|
SET_FLAG(0xDBA8, 1);
|
|
|
|
inventory->remove(47);
|
|
|
|
if (!CHECK_FLAG(0xDBAA, 1)) {
|
|
|
|
SET_FLAG(0xDBAA, 1);
|
|
|
|
displayMessage(0x3b8b);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x933d:
|
|
|
|
if (!processCallback(0x70e0))
|
|
|
|
return true;
|
|
|
|
|
|
|
|
if (CHECK_FLAG(0xdbcd, 1)) {
|
|
|
|
displayMessage(0x4f3d);
|
|
|
|
return true;
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
setOns(1, 0);
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(5, 33);
|
|
|
|
playSound(24, 13);
|
|
|
|
playSound(24, 19);
|
|
|
|
playSound(24, 23);
|
|
|
|
playSound(24, 26);
|
|
|
|
playSound(24, 29);
|
|
|
|
playSound(23, 21);
|
|
|
|
playSound(74, 25);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(716);
|
2009-09-05 23:01:03 +00:00
|
|
|
setOns(1, 66);
|
|
|
|
SET_FLAG(0xDBCD, 1);
|
2009-09-07 22:52:51 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x93af: //sheet + hot plate
|
|
|
|
if (!processCallback(0x70e0))
|
|
|
|
return true;
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(86, 11);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(720);
|
2009-09-07 22:52:51 +00:00
|
|
|
inventory->add(68);
|
|
|
|
inventory->remove(55);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x93d5: //burning sheet + plate
|
|
|
|
setOns(4, 0);
|
|
|
|
playSound(87, 7);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(722);
|
2009-09-07 22:52:51 +00:00
|
|
|
playSound(5, 3);
|
|
|
|
playSound(88, 12);
|
|
|
|
playSound(87, 24);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(723);
|
2009-09-07 22:52:51 +00:00
|
|
|
displayMessage(0x502b);
|
|
|
|
playSound(89, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(724);
|
2009-09-07 22:52:51 +00:00
|
|
|
setOns(4, 68);
|
|
|
|
displayMessage(0x503e);
|
|
|
|
inventory->remove(68);
|
|
|
|
SET_FLAG(0xDBD0, 1);
|
2009-09-05 23:01:03 +00:00
|
|
|
return true;
|
2009-09-03 20:59:17 +00:00
|
|
|
|
|
|
|
case 0x98fa://Right click to open toolbox
|
|
|
|
inventory->remove(3);
|
|
|
|
inventory->add(4);
|
|
|
|
inventory->add(35);
|
|
|
|
inventory->activate(false);
|
|
|
|
inventory->resetSelectedObject();
|
|
|
|
displayMessage(0x3468);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x9910:
|
|
|
|
inventory->remove(4);
|
|
|
|
inventory->add(5);
|
|
|
|
inventory->activate(false);
|
|
|
|
inventory->resetSelectedObject();
|
|
|
|
displayMessage(0x3490);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
2009-09-15 08:54:06 +00:00
|
|
|
//very last part of the game:
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x671d:
|
|
|
|
moveTo(153, 163, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(973);
|
2009-09-05 23:01:03 +00:00
|
|
|
if (CHECK_FLAG(0xDBC1, 0)) {
|
|
|
|
SET_FLAG(0xDBC1, random.getRandomNumber(5) + 1);
|
|
|
|
}
|
|
|
|
loadScene(30, 18, 159, 2);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x67a6:
|
|
|
|
loadScene(29, 149, 163, 1);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(974);
|
2009-09-06 09:40:14 +00:00
|
|
|
moveTo(160, 188, 0);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x6805:
|
|
|
|
processCallback(0x6849);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(694);
|
2009-09-06 09:40:14 +00:00
|
|
|
playSound(15, 8);
|
|
|
|
playAnimation(693, 1);
|
|
|
|
setOns(6, 0);
|
|
|
|
displayMessage(0x4cc7);
|
|
|
|
inventory->add(54);
|
|
|
|
disableObject(4);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
case 0x6849: {
|
|
|
|
Common::Point p = scene->getPosition();
|
|
|
|
if (p.x == 208 && p.y == 151) {
|
|
|
|
moveRel(0, 0, 2);
|
|
|
|
} else
|
|
|
|
moveTo(208, 151, 1);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x687a: //using the book
|
|
|
|
if (CHECK_FLAG(0xDBC2, 1)) {
|
|
|
|
displayMessage(0x4ca0);
|
|
|
|
} else {
|
|
|
|
playSound(49, 5);
|
|
|
|
playSound(49, 17);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(691);
|
2009-09-06 09:40:14 +00:00
|
|
|
if (!processCallback(0x68e6)) {
|
|
|
|
if (!CHECK_FLAG(0xDBC0, 1)) {
|
|
|
|
displayMessage(0x4c61);
|
|
|
|
SET_FLAG(0xDBC0, 1);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
playSound(15, 8); //secret compartment
|
|
|
|
playAnimation(692, 1);
|
|
|
|
setOns(6, 59);
|
|
|
|
enableObject(4);
|
|
|
|
displayMessage(0x4c84);
|
|
|
|
SET_FLAG(0xDBC2, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
2009-09-15 08:54:06 +00:00
|
|
|
case 0x68e6: { //checking drawers
|
|
|
|
uint16 v = GET_FLAG(0xDBC1) - 1;
|
|
|
|
uint bx = 0xDBB7;
|
|
|
|
if (GET_FLAG(bx + v) != 1)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
uint16 sum = 0;
|
|
|
|
for (uint i = 0; i < 6; ++i) {
|
|
|
|
sum += GET_FLAG(bx + i);
|
2009-09-06 09:40:14 +00:00
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
return sum == 1;
|
|
|
|
}
|
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x6918:
|
|
|
|
if (inventory->has(55)) {
|
|
|
|
displayMessage(0x4cd9);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (!CHECK_FLAG(0xDBC3, 1)) {
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(695);
|
2009-09-06 09:40:14 +00:00
|
|
|
Dialog::show(scene, 0x386a);
|
|
|
|
SET_FLAG(0xDBC3, 1);
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
playSound(5, 11);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(696);
|
2009-09-06 09:40:14 +00:00
|
|
|
inventory->add(55);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x6962:
|
|
|
|
if (CHECK_FLAG(0xDBB7, 1)) {
|
|
|
|
setOns(0, 0);
|
|
|
|
playSound(67, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(678);
|
2009-09-06 09:40:14 +00:00
|
|
|
SET_FLAG(0xDBB7, 0);
|
|
|
|
} else if (CHECK_FLAG(0xDBB8, 1)) {
|
|
|
|
processCallback(0x6b86);
|
|
|
|
} else {
|
|
|
|
playSound(66, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(677);
|
2009-09-06 09:40:14 +00:00
|
|
|
setOns(0, 53);
|
|
|
|
SET_FLAG(0xDBB7, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x69b8:
|
|
|
|
if (CHECK_FLAG(0xDBB8, 1)) {
|
|
|
|
setOns(1, 0);
|
|
|
|
playSound(67, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(680);
|
2009-09-06 09:40:14 +00:00
|
|
|
SET_FLAG(0xDBB8, 0);
|
|
|
|
} else if (CHECK_FLAG(0xDBB8, 1)) {
|
|
|
|
processCallback(0x6b86);
|
|
|
|
} else if (CHECK_FLAG(0xDBB9, 1)) {
|
|
|
|
processCallback(0x6b86);
|
|
|
|
} else {
|
|
|
|
playSound(66, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(679);
|
2009-09-06 09:40:14 +00:00
|
|
|
setOns(1, 54);
|
|
|
|
SET_FLAG(0xDBB8, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x6a1b:
|
|
|
|
if (CHECK_FLAG(0xDBB9, 1)) {
|
|
|
|
setOns(2, 0);
|
|
|
|
playSound(67, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(682);
|
2009-09-06 09:40:14 +00:00
|
|
|
SET_FLAG(0xDBB9, 0);
|
|
|
|
} else if (CHECK_FLAG(0xDBB8, 1)) {
|
|
|
|
processCallback(0x6b86);
|
|
|
|
} else {
|
|
|
|
playSound(67, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(681);
|
2009-09-06 09:40:14 +00:00
|
|
|
setOns(2, 55);
|
|
|
|
SET_FLAG(0xDBB9, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x6a73:
|
|
|
|
if (CHECK_FLAG(0xDBBA, 1)) {
|
|
|
|
setOns(3, 0);
|
|
|
|
playSound(67, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(684);
|
2009-09-06 09:40:14 +00:00
|
|
|
SET_FLAG(0xDBBA, 0);
|
|
|
|
} else if (!CHECK_FLAG(0xDBBB, 1)) {
|
|
|
|
playSound(66, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(683);
|
2009-09-06 09:40:14 +00:00
|
|
|
setOns(3, 56);
|
|
|
|
SET_FLAG(0xDBBA, 1);
|
|
|
|
} else
|
|
|
|
processCallback(0x6b86);
|
|
|
|
return true;
|
2009-09-03 20:59:17 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x6acb:
|
|
|
|
if (CHECK_FLAG(0xDBBB, 1)) {
|
|
|
|
setOns(4, 0);
|
|
|
|
playSound(67, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(686);
|
2009-09-06 09:40:14 +00:00
|
|
|
SET_FLAG(0xDBBB, 0);
|
|
|
|
} else if (CHECK_FLAG(0xDBBA, 1)) {
|
|
|
|
processCallback(0x6b86);
|
|
|
|
} else if (CHECK_FLAG(0xDBBC, 1)) {
|
|
|
|
processCallback(0x6b86);
|
|
|
|
} else {
|
|
|
|
playSound(66, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(685);
|
2009-09-06 09:40:14 +00:00
|
|
|
setOns(4, 57);
|
|
|
|
SET_FLAG(0xDBBB, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x6b2e:
|
|
|
|
if (CHECK_FLAG(0xdbbc, 1)) {
|
|
|
|
setOns(5, 0);
|
|
|
|
playSound(67, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(688);
|
2009-09-06 09:40:14 +00:00
|
|
|
SET_FLAG(0xdbbc, 0);
|
|
|
|
} else if (CHECK_FLAG(0xdbbc, 1)) {
|
|
|
|
processCallback(0x6b86);
|
|
|
|
} else {
|
|
|
|
playSound(66, 6);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(687);
|
2009-09-06 09:40:14 +00:00
|
|
|
setOns(5, 58);
|
|
|
|
SET_FLAG(0xDBBC, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x6b86:
|
|
|
|
if (CHECK_FLAG(0xDBBD, 1)) {
|
|
|
|
displayMessage(0x4b39);
|
|
|
|
} else {
|
|
|
|
displayMessage(0x4acd);
|
|
|
|
displayMessage(0x4b0d);
|
|
|
|
SET_FLAG(0xDBBD, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-03 20:59:17 +00:00
|
|
|
|
|
|
|
case 0x6be1: //handle to the bathroom
|
2009-09-07 22:52:51 +00:00
|
|
|
if (CHECK_FLAG(0xDBD9, 1)) {
|
2009-09-03 20:59:17 +00:00
|
|
|
displayMessage(0x5326); //i'd better catch johnny
|
|
|
|
} else {
|
|
|
|
playSound(88);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(808);
|
2009-09-03 20:59:17 +00:00
|
|
|
loadScene(36, 41, 195);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x6bad:
|
2009-09-05 23:01:03 +00:00
|
|
|
playSound(80, 4);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(971);
|
2009-09-05 23:01:03 +00:00
|
|
|
loadScene(32, 139, 199, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x6c45:
|
|
|
|
playSound(89, 6);
|
2009-09-15 08:54:06 +00:00
|
|
|
playActorAnimation(CHECK_FLAG(0xDBEF, 1) ? 985 : 806);
|
2009-09-05 23:01:03 +00:00
|
|
|
loadScene(34, 40, 133, 2);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x6c83:
|
|
|
|
Dialog::pop(scene, 0xdb2e);
|
2009-09-26 15:04:09 +00:00
|
|
|
scene->getObject(1)->setName((const char *)res->dseg.ptr(0xaa94));
|
2009-09-05 23:01:03 +00:00
|
|
|
SET_FLAG(0xDBD1, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x6c9d: //getting jar
|
|
|
|
setOns(0, 71);
|
|
|
|
playSound(32, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(732);
|
2009-09-07 22:52:51 +00:00
|
|
|
disableObject(2);
|
|
|
|
inventory->add(72);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-10-31 18:53:30 +00:00
|
|
|
case 0x6cc4: //secret diary
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(754);
|
2009-10-31 18:53:30 +00:00
|
|
|
displayCutsceneMessage(0x517b, 30430);
|
2009-09-07 22:52:51 +00:00
|
|
|
|
|
|
|
playMusic(3);
|
|
|
|
loadScene(11, scene->getPosition());
|
|
|
|
playAnimation(750, 2);
|
|
|
|
Dialog::show(scene, 0x4f50, 751, 529);
|
|
|
|
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(752, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
playAnimation(753, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
Dialog::show(scene, 0x5168, 751, 529);
|
|
|
|
|
|
|
|
loadScene(30, scene->getPosition());
|
|
|
|
Dialog::show(scene, 0x5168, 733, 734);
|
|
|
|
|
|
|
|
playSound(75, 13);
|
|
|
|
playSound(32, 22);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(735, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
playAnimation(736, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
Dialog::show(scene, 0x46cf, 737, 738);
|
|
|
|
|
|
|
|
playSound(32, 1);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(739, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
playAnimation(740, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
Dialog::show(scene, 0x4772, 733, 734);
|
|
|
|
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(742, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
playAnimation(741, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
Dialog::show(scene, 0x481c, 733, 743);
|
|
|
|
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(744, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
playAnimation(745, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
Dialog::show(scene, 0x4873, 733, 734);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(746, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
playAnimation(747, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
Dialog::show(scene, 0x4da5, 734);
|
|
|
|
Dialog::show(scene, 0x4eb9, 748);
|
|
|
|
Dialog::show(scene, 0x4f15, 749);
|
|
|
|
Dialog::show(scene, 0x4f2f, 748);
|
|
|
|
|
|
|
|
playMusic(10);
|
|
|
|
loadScene(32, scene->getPosition());
|
|
|
|
playSound(26, 10);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(755);
|
2009-09-07 22:52:51 +00:00
|
|
|
moveRel(0, 0, 3);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
Dialog::show(scene, 0x51bf);
|
|
|
|
loadScene(31, scene->getPosition());
|
|
|
|
Dialog::show(scene, 0x539f, 763, 764);
|
|
|
|
loadScene(32, scene->getPosition());
|
|
|
|
Dialog::show(scene, 0x52c3);
|
|
|
|
disableObject(3);
|
|
|
|
enableObject(7);
|
|
|
|
|
|
|
|
SET_FLAG(0xDBD5, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x6f20:
|
|
|
|
if (CHECK_FLAG(0xDBD5, 1)) {
|
|
|
|
displayMessage(0x51a7);
|
|
|
|
} else {
|
|
|
|
rejectMessage();
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x6f75: //hiding in left corner
|
|
|
|
moveRel(0, 0, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(756);
|
2009-09-07 22:52:51 +00:00
|
|
|
playAnimation(758, 1);
|
|
|
|
Dialog::show(scene, 0x52e6, 759);
|
|
|
|
playSound(40, 5);
|
|
|
|
playSound(52, 13);
|
|
|
|
playSound(52, 17);
|
|
|
|
playSound(52, 21);
|
|
|
|
playAnimation(760, 1);
|
|
|
|
setOns(1, 72);
|
|
|
|
setOns(2, 73);
|
|
|
|
loadScene(31, scene->getPosition());
|
|
|
|
playSound(58, 5);
|
|
|
|
playSound(58, 8);
|
|
|
|
playSound(58, 10);
|
|
|
|
playSound(58, 12);
|
|
|
|
playSound(58, 14);
|
|
|
|
playAnimation(765, 1);
|
|
|
|
Dialog::show(scene, 0x5443, 766);
|
|
|
|
loadScene(31, scene->getPosition());
|
|
|
|
Dialog::show(scene, 0x5358, 761);
|
|
|
|
playAnimation(762, 1);
|
|
|
|
loadScene(32, scene->getPosition());
|
|
|
|
setOns(2, 0);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(757);
|
2009-09-07 22:52:51 +00:00
|
|
|
moveRel(0, 0, 1);
|
|
|
|
displayMessage(0x51e7);
|
|
|
|
enableObject(8);
|
|
|
|
disableObject(7);
|
|
|
|
|
|
|
|
SET_FLAG(0xDBD5, 0);
|
|
|
|
return true;
|
2009-09-05 23:01:03 +00:00
|
|
|
|
|
|
|
case 0x6f4d:
|
|
|
|
if (CHECK_FLAG(0xDBD5, 1)) {
|
|
|
|
displayMessage(0x51bb);
|
|
|
|
} else {
|
|
|
|
loadScene(31, 139, 172, 3);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x6f32:
|
|
|
|
if (CHECK_FLAG(0xDBD5, 1)) {
|
|
|
|
displayMessage(0x51a7);
|
|
|
|
} else {
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(977);
|
2009-09-05 23:01:03 +00:00
|
|
|
displayMessage(0x5511);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x7096:
|
|
|
|
playSound(32, 5);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(767);
|
2009-09-07 22:52:51 +00:00
|
|
|
setOns(1, 0);
|
|
|
|
inventory->add(73);
|
|
|
|
disableObject(8);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x7291:
|
|
|
|
playSound(89, 3);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(975);
|
2009-09-05 23:01:03 +00:00
|
|
|
loadScene(31, 298, 177, 4);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x72c2:
|
|
|
|
if (CHECK_FLAG(0xDBD6, 2)) {
|
|
|
|
displayMessage(0x522c);
|
|
|
|
} else {
|
|
|
|
playSound(79, 6);
|
|
|
|
playSound(84, 9);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(801);
|
2009-09-06 09:40:14 +00:00
|
|
|
if (CHECK_FLAG(0xDBD6, 1)) {
|
|
|
|
displayMessage(0x538d);
|
|
|
|
SET_FLAG(0xDBD6, 2);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-06 09:40:14 +00:00
|
|
|
displayMessage(0x5372);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x7309:
|
|
|
|
playSound(66, 5);
|
|
|
|
playSound(67, 11);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(976);
|
2009-09-05 23:01:03 +00:00
|
|
|
displayMessage(0x5955);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x79e4:
|
|
|
|
processCallback(0x6849);
|
|
|
|
return false;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x79eb: //color of the book
|
|
|
|
displayMessage(res->dseg.get_word(0x5f3c + GET_FLAG(0xDBC1) * 2 - 2));
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x79fd:
|
|
|
|
if (CHECK_FLAG(0xDBB7, 1)) {
|
|
|
|
displayMessage(0x4b6c);
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
|
|
|
|
|
|
|
case 0x7a0f:
|
|
|
|
if (CHECK_FLAG(0xDBB8, 1)) {
|
|
|
|
if (!CHECK_FLAG(0xDBBF, 1)) {
|
|
|
|
displayMessage(0x4c32);
|
|
|
|
playSound(5, 11);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(690);
|
2009-09-06 09:40:14 +00:00
|
|
|
inventory->add(53);
|
|
|
|
SET_FLAG(0xDBBF, 1);
|
|
|
|
}
|
|
|
|
displayMessage(0x4b87);
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
|
|
|
|
|
|
|
case 0x7a49:
|
|
|
|
if (CHECK_FLAG(0xDBB9, 1)) {
|
|
|
|
displayMessage(0x4ba1);
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
|
|
|
|
|
|
|
case 0x7a5b:
|
|
|
|
if (CHECK_FLAG(0xDBBA, 1)) {
|
|
|
|
displayMessage(0x4bbc);
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
|
|
|
|
|
|
|
case 0x7a6d:
|
|
|
|
if (CHECK_FLAG(0xDBBB, 1)) {
|
|
|
|
displayMessage(0x4bd8);
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
|
|
|
|
|
|
|
case 0x7a7f:
|
|
|
|
if (CHECK_FLAG(0xDBBC, 1)) {
|
|
|
|
if (!CHECK_FLAG(0xDBBE, 1)) {
|
|
|
|
displayMessage(0x4c0f); //there's dictaphone inside!
|
|
|
|
playSound(5, 12);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(689);
|
2009-09-06 09:40:14 +00:00
|
|
|
inventory->add(52);
|
|
|
|
SET_FLAG(0xDBBE, 1);
|
|
|
|
}
|
|
|
|
displayMessage(0x4bf4);
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
case 0x7b09: {
|
|
|
|
byte v = GET_FLAG(0xDBD6);
|
|
|
|
switch (v) {
|
|
|
|
case 1:
|
|
|
|
displayMessage(0x51f8);
|
|
|
|
return true;
|
|
|
|
case 2:
|
|
|
|
displayMessage(0x538d);
|
|
|
|
return true;
|
|
|
|
default:
|
|
|
|
return false;
|
2009-09-05 23:01:03 +00:00
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
}
|
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x9166:
|
|
|
|
if (CHECK_FLAG(0xDBD1, 1)) {
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
displayMessage(0x50a6);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
case 0x9175:
|
|
|
|
if (CHECK_FLAG(0xDBD2, 0) || CHECK_FLAG(0xDBD3, 0) || CHECK_FLAG(0xDBD4, 0))
|
|
|
|
return true;
|
2009-11-07 12:01:45 +00:00
|
|
|
|
|
|
|
waitLanAnimationFrame(1, 1);
|
2009-09-07 22:52:51 +00:00
|
|
|
playSound(89, 2);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(731);
|
2009-09-07 22:52:51 +00:00
|
|
|
setOns(0, 70);
|
|
|
|
setLan(1, 0);
|
|
|
|
disableObject(1);
|
|
|
|
enableObject(2);
|
|
|
|
enableObject(3);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x90bc: //handle on the hole
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(6, 9);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(807);
|
2009-09-07 22:52:51 +00:00
|
|
|
setOns(0, 83);
|
|
|
|
inventory->remove(73);
|
|
|
|
disableObject(2);
|
|
|
|
enableObject(3);
|
|
|
|
SET_FLAG(0xDBEF, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x90fc: //dictaphone on robot
|
2009-09-15 08:54:06 +00:00
|
|
|
if (!processCallback(0x9166))
|
2009-09-07 22:52:51 +00:00
|
|
|
return true;
|
|
|
|
|
|
|
|
if (CHECK_FLAG(0xDBD2, 1)) {
|
|
|
|
displayMessage(0x50c3);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!CHECK_FLAG(0xDBCB, 1)) {
|
|
|
|
displayMessage(0x5101);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
displayMessage(0x50e1);
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(5, 39);
|
|
|
|
|
|
|
|
displayMessage(0x5124); //fixme: async! delay 35? position 40388
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(728);
|
2009-09-07 22:52:51 +00:00
|
|
|
Dialog::show(scene, 0x3d17);
|
|
|
|
SET_FLAG(0xDBD2, 1);
|
|
|
|
processCallback(0x9175);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x91cb: //use socks on robot
|
2009-09-15 08:54:06 +00:00
|
|
|
if (!processCallback(0x9166))
|
2009-09-07 22:52:51 +00:00
|
|
|
return true;
|
|
|
|
|
|
|
|
if (CHECK_FLAG(0xDBD3, 1)) {
|
|
|
|
displayMessage(0x50c3);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
displayMessage(0x5138);
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(5, 23);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(729);
|
2009-09-07 22:52:51 +00:00
|
|
|
Dialog::show(scene, 0x3d70);
|
|
|
|
SET_FLAG(0xDBD3, 1);
|
|
|
|
processCallback(0x9175);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x9209: //photo on robot
|
2009-09-15 08:54:06 +00:00
|
|
|
if (!processCallback(0x9166))
|
2009-09-07 22:52:51 +00:00
|
|
|
return true;
|
|
|
|
|
|
|
|
if (CHECK_FLAG(0xDBD4, 1)) {
|
|
|
|
displayMessage(0x50c3);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
displayMessage(0x5161);
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(5, 25);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(730);
|
2009-09-07 22:52:51 +00:00
|
|
|
Dialog::show(scene, 0x3dd6);
|
|
|
|
SET_FLAG(0xDBD4, 1);
|
|
|
|
processCallback(0x9175);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x924e:
|
|
|
|
setOns(2, 64);
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(52, 10);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(711);
|
2009-09-07 22:52:51 +00:00
|
|
|
moveRel(0, 0, 4);
|
|
|
|
Dialog::show(scene, 0x3b21);
|
|
|
|
moveTo(300, 190, 4);
|
|
|
|
inventory->remove(64);
|
|
|
|
disableObject(8);
|
|
|
|
playAnimation(712, 1);
|
|
|
|
setOns(2, 0);
|
|
|
|
playSound(15, 26);
|
|
|
|
playSound(15, 28);
|
|
|
|
playSound(16, 37);
|
|
|
|
playAnimation(713, 1);
|
|
|
|
Dialog::show(scene, 0x3c0d);
|
|
|
|
playSound(85, 2);
|
|
|
|
playAnimation(714, 1);
|
|
|
|
setLan(1, 0);
|
|
|
|
disableObject(1);
|
2009-09-27 05:17:00 +00:00
|
|
|
{
|
|
|
|
Object *obj = scene->getObject(2);
|
|
|
|
obj->actor_rect = Rect(81, 160, 81, 160);
|
|
|
|
obj->actor_orientation = 4;
|
|
|
|
obj->save();
|
|
|
|
}
|
|
|
|
{
|
|
|
|
Object *obj = scene->getObject(3);
|
|
|
|
obj->actor_rect = Rect(63, 168, 63, 168);
|
|
|
|
obj->actor_orientation = 4;
|
|
|
|
obj->save();
|
|
|
|
}
|
|
|
|
{
|
|
|
|
Object *obj = scene->getObject(10);
|
|
|
|
obj->actor_rect = Rect(105, 160, 105, 160);
|
|
|
|
obj->actor_orientation = 1;
|
|
|
|
obj->save();
|
|
|
|
}
|
2009-09-07 22:52:51 +00:00
|
|
|
SET_FLAG(0xDBCC, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-06 09:40:14 +00:00
|
|
|
case 0x9472:
|
|
|
|
playSound(5, 4);
|
|
|
|
playSound(19, 14);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(793);
|
2009-09-06 09:40:14 +00:00
|
|
|
displayMessage(0x5218);
|
|
|
|
inventory->remove(60);
|
|
|
|
SET_FLAG(0xDBD6, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x9449: //meat + stew
|
|
|
|
playSound(5, 4);
|
|
|
|
playSound(63, 12);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(726);
|
2009-09-07 22:52:51 +00:00
|
|
|
displayMessage(0x508a);
|
|
|
|
inventory->remove(69);
|
|
|
|
inventory->add(70);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
|
|
|
case 0x949b:
|
2009-09-06 09:40:14 +00:00
|
|
|
if (CHECK_FLAG(0xDBD6, 2)) {
|
|
|
|
playSound(5, 4);
|
|
|
|
playSound(5, 25);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(802);
|
2009-09-06 09:40:14 +00:00
|
|
|
displayMessage(0x5272);
|
|
|
|
inventory->remove(62);
|
|
|
|
inventory->add(74);
|
|
|
|
inventory->add(65);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-06 09:40:14 +00:00
|
|
|
displayMessage(0x524f);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x94d4:
|
|
|
|
if (inventory->has(70)) {
|
|
|
|
setOns(0, 0);
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(5, 18);
|
|
|
|
playSound(13, 12);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(803);
|
2009-09-05 23:01:03 +00:00
|
|
|
disableObject(7);
|
|
|
|
inventory->remove(70);
|
|
|
|
inventory->add(71);
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-05 23:01:03 +00:00
|
|
|
displayMessage(0x53ad);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 23:01:03 +00:00
|
|
|
case 0x951b:
|
|
|
|
playSound(5, 4);
|
|
|
|
playSound(5, 22);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(804);
|
2009-09-05 23:01:03 +00:00
|
|
|
displayMessage(0x528b);
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x9537: //using remote on VCR
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(5, 16);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(703);
|
2009-09-07 22:52:51 +00:00
|
|
|
if (CHECK_FLAG(0xDBC8, 1)) {
|
|
|
|
if (CHECK_FLAG(0xDBC6, 0)) {
|
|
|
|
if (CHECK_FLAG(0xDBC5, 1)) { //tv on
|
2009-09-15 08:54:06 +00:00
|
|
|
if (!CHECK_FLAG(0xDBC7, 1))
|
2009-09-07 22:52:51 +00:00
|
|
|
displayMessage(0x4d93); //the tape started
|
|
|
|
playAnimation(702, 1); //fixme: we need some overlay animation support
|
|
|
|
SET_FLAG(0xDBC6, 1);
|
|
|
|
if (!CHECK_FLAG(0xDBC7, 1)) {
|
|
|
|
Dialog::show(scene, 0x392c, 702);
|
|
|
|
SET_FLAG(0xDBC7, 1);
|
|
|
|
}
|
|
|
|
reloadLan();
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-07 22:52:51 +00:00
|
|
|
displayMessage(0x4d5b);
|
|
|
|
} else {
|
|
|
|
SET_FLAG(0xDBC6, 0);
|
|
|
|
if (CHECK_FLAG(0xDBC5, 1)) { //tv on
|
|
|
|
playAnimation(701, 1);
|
2009-09-15 08:54:06 +00:00
|
|
|
displayMessage(0x4da6); //much better!
|
2009-09-07 22:52:51 +00:00
|
|
|
}
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-07 22:52:51 +00:00
|
|
|
displayMessage(0x4D80); //nothing happened
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x95eb: //polaroid + tv
|
|
|
|
if (CHECK_FLAG(0xDBC6, 1)) {
|
|
|
|
if (CHECK_FLAG(0xDBCA, 1)) {
|
|
|
|
displayMessage(0x4de6);
|
|
|
|
} else {
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(5, 24);
|
|
|
|
playSound(90, 18);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(707);
|
2009-09-07 22:52:51 +00:00
|
|
|
inventory->add(61);
|
|
|
|
SET_FLAG(0xDBCA, 1);
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-07 22:52:51 +00:00
|
|
|
displayMessage(0x4ea5);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x962f: //polaroid + tv
|
|
|
|
if (CHECK_FLAG(0xDBC6, 1)) {
|
|
|
|
if (CHECK_FLAG(0xDBCB, 1)) {
|
|
|
|
displayMessage(0x4e32);
|
|
|
|
} else {
|
|
|
|
displayMessage(0x4e05);
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(5, 27);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(708);
|
2009-09-07 22:52:51 +00:00
|
|
|
SET_FLAG(0xDBCB, 1);
|
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-07 22:52:51 +00:00
|
|
|
displayMessage(0x4ea5);
|
|
|
|
return true;
|
|
|
|
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x95c8:
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(91, 12);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(706);
|
2009-09-07 22:52:51 +00:00
|
|
|
inventory->remove(54);
|
|
|
|
SET_FLAG(0xDBC8, 1);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x9673:
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(24, 10);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(798);
|
2009-09-07 22:52:51 +00:00
|
|
|
playSound(63, 11);
|
|
|
|
playSound(19, 20);
|
|
|
|
playAnimation(799, 1);
|
|
|
|
moveTo(50, 170, 1);
|
|
|
|
playAnimation(800, 1);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(805);
|
2009-09-07 22:52:51 +00:00
|
|
|
moveTo(50, 170, 3);
|
|
|
|
displayMessage(0x5349);
|
|
|
|
//moveTo(105, 157, 0, true);
|
|
|
|
playMusic(3);
|
|
|
|
loadScene(11, 105, 157, 0);
|
|
|
|
Dialog::show(scene, 0x8409, 938);
|
|
|
|
|
|
|
|
playAnimation(939, 1, true);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(942, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
waitAnimation();
|
|
|
|
|
|
|
|
playAnimation(939, 1, true);
|
|
|
|
playAnimation(935, 1, true);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(943, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
waitAnimation();
|
|
|
|
|
|
|
|
playAnimation(940, 1, true);
|
|
|
|
playAnimation(936, 1, true);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(944, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
waitAnimation();
|
|
|
|
|
|
|
|
playAnimation(941, 1, true);
|
|
|
|
playAnimation(937, 1, true);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(945, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
waitAnimation();
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
playAnimation(945, 1);
|
|
|
|
Dialog::show(scene, 0x844f);
|
|
|
|
playAnimation(946, 1);
|
|
|
|
Dialog::show(scene, 0x87c7);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
playSound(24, 7);
|
|
|
|
playAnimation(948, 1, true);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(947, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
waitAnimation();
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
loadScene(40, 198, 186, 1);
|
|
|
|
Dialog::show(scene, 0x8890);
|
|
|
|
Dialog::show(scene, 0x8a2f);
|
|
|
|
playAnimation(923, 1);
|
|
|
|
Dialog::show(scene, 0x8aa7);
|
|
|
|
|
|
|
|
moveTo(237, 186, 0);
|
|
|
|
moveTo(237, 177, 0);
|
|
|
|
moveTo(192, 177, 0);
|
|
|
|
playAnimation(949, 1);
|
|
|
|
Dialog::show(scene, 0x8af6, 950);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
playSound(32, 5);
|
|
|
|
playSound(40, 14);
|
|
|
|
|
|
|
|
playAnimation(951, 1, true);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(952, true);
|
2009-09-07 22:52:51 +00:00
|
|
|
waitAnimation();
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
playMusic(11);
|
|
|
|
loadScene(39, 192, 177, 0);
|
|
|
|
Dialog::show(scene, 0x8b4d, 953);
|
|
|
|
playSound(5, 15);
|
|
|
|
playAnimation(954, 1);
|
|
|
|
Dialog::show(scene, 0x8b7a, 955);
|
|
|
|
playMusic(2);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
displayMessage("THE END");
|
|
|
|
debug(0, "FIXME: THE END + CREDITS");
|
2009-09-15 20:21:18 +00:00
|
|
|
scene->push(SceneEvent(SceneEvent::kQuit));
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
return true;
|
2009-09-05 20:58:25 +00:00
|
|
|
|
2009-09-15 08:54:06 +00:00
|
|
|
case 0x9921: {
|
|
|
|
int id = scene->getId();
|
|
|
|
Common::Point p = scene->getPosition();
|
|
|
|
if (id != 15) {
|
|
|
|
displayMessage(id == 16 ? 0x38ce : 0x38a7);
|
|
|
|
} else {
|
|
|
|
moveTo(156, 180, 3);
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(38, 16);
|
|
|
|
playSound(38, 22);
|
|
|
|
playActorAnimation(614);
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(44, 10);
|
|
|
|
playSound(20, 26);
|
|
|
|
playActorAnimation(615);
|
|
|
|
loadScene(17, p);
|
|
|
|
playSound(64, 7);
|
|
|
|
playSound(64, 21);
|
|
|
|
playSound(64, 42);
|
|
|
|
playSound(64, 63);
|
|
|
|
playActorAnimation(617);
|
|
|
|
//another time challenge!
|
|
|
|
if (true) {
|
2009-09-05 20:58:25 +00:00
|
|
|
playSound(64, 7);
|
2009-09-15 08:54:06 +00:00
|
|
|
playActorAnimation(618);
|
|
|
|
disableObject(5);
|
|
|
|
setOns(0, 0);
|
|
|
|
playSound(31);
|
|
|
|
playActorAnimation(619);
|
|
|
|
inventory->add(42);
|
|
|
|
displayMessage(0x3989);
|
2009-09-05 20:58:25 +00:00
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
loadScene(id, p);
|
2009-09-05 20:58:25 +00:00
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
case 0x9aca:
|
|
|
|
if (scene->getId() == 13) {
|
|
|
|
moveTo(172, 181, 1);
|
|
|
|
playSound(26, 19);
|
2009-09-15 08:54:06 +00:00
|
|
|
for (uint i = 0; i < 8; ++i)
|
2009-09-05 17:15:28 +00:00
|
|
|
playSound(26, 30 + i * 11);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(661);
|
2009-10-31 18:49:47 +00:00
|
|
|
displayCutsceneMessage(0x3c80, 30484);
|
2009-09-05 17:15:28 +00:00
|
|
|
playSound(56, 10);
|
|
|
|
playSound(56, 21);
|
|
|
|
|
|
|
|
playSound(8, 48);
|
2009-09-15 08:54:06 +00:00
|
|
|
for (uint i = 0; i < 7; ++i)
|
2009-09-05 17:15:28 +00:00
|
|
|
playSound(26, 117 + i * 11);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 17:15:28 +00:00
|
|
|
moveRel(-20, 0, 0, true);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(662, true);
|
2009-09-05 17:15:28 +00:00
|
|
|
playAnimation(663, 2, true);
|
|
|
|
waitAnimation();
|
|
|
|
setOns(1, 49);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-10-31 18:49:47 +00:00
|
|
|
displayCutsceneMessage(0x3c9a, 30453);
|
2009-09-05 17:15:28 +00:00
|
|
|
moveTo(162, 184, 0, true);
|
|
|
|
playSound(26, 6);
|
|
|
|
playSound(26, 17);
|
|
|
|
playSound(56, 10);
|
|
|
|
playSound(56, 21);
|
|
|
|
playSound(19, 27);
|
|
|
|
playSound(24, 38);
|
|
|
|
playSound(23, 44);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(664);
|
2009-09-05 17:15:28 +00:00
|
|
|
playAnimation(665, 2);
|
|
|
|
displayMessage(0x3cbc);
|
|
|
|
displayMessage(0x3cea);
|
|
|
|
inventory->remove(37);
|
|
|
|
processCallback(0x9d45); //another mansion try
|
2009-09-15 08:54:06 +00:00
|
|
|
} else
|
2009-09-05 17:15:28 +00:00
|
|
|
displayMessage(0x3c58);
|
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 20:58:25 +00:00
|
|
|
case 0x9c6d:
|
|
|
|
displayMessage(0x49d1);
|
|
|
|
SET_FLAG(0xDBB5, 1);
|
|
|
|
return false;
|
2009-09-03 20:59:17 +00:00
|
|
|
|
2009-09-07 22:52:51 +00:00
|
|
|
case 0x9c79: //use pills
|
2009-09-03 20:59:17 +00:00
|
|
|
if (scene->getId() != 36) {
|
|
|
|
displayMessage(0x52a9);
|
|
|
|
} else if (CHECK_FLAG(0xDBF1, 1)) {
|
|
|
|
displayMessage(0x52F6);
|
|
|
|
} else {
|
|
|
|
SET_FLAG(0xDBF1, 1);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(102, 195, 2);
|
|
|
|
playSound(5, 3);
|
|
|
|
playSound(75, 12);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(794);
|
2009-09-07 22:52:51 +00:00
|
|
|
setLan(1, 0);
|
2009-09-03 20:59:17 +00:00
|
|
|
//scene->getWalkbox(0)->rect.left = 0;
|
|
|
|
//scene->getWalkbox(0)->rect.top = 0;
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(151, 197, 2);
|
2009-09-09 20:42:44 +00:00
|
|
|
playActorAnimation(795);
|
2009-09-05 15:04:37 +00:00
|
|
|
moveTo(186, 198, 2, true);
|
|
|
|
moveTo(220, 198, 4);
|
2009-09-07 22:52:51 +00:00
|
|
|
//scene->getWalkbox(0)->rect.top = 200;
|
|
|
|
setLan(1, 0xff);
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-05 15:04:37 +00:00
|
|
|
Dialog::show(scene, 0x58a9);
|
2009-09-03 20:59:17 +00:00
|
|
|
|
2009-09-27 05:17:00 +00:00
|
|
|
Object *obj = scene->getObject(1);
|
2009-09-07 22:52:51 +00:00
|
|
|
obj->actor_rect = Rect(270, 193, 270, 193);
|
2009-09-03 20:59:17 +00:00
|
|
|
obj->actor_orientation = 2;
|
2009-09-27 05:17:00 +00:00
|
|
|
obj->save();
|
2009-09-03 20:59:17 +00:00
|
|
|
|
|
|
|
obj = scene->getObject(3);
|
2009-09-07 22:52:51 +00:00
|
|
|
obj->actor_rect = Rect(254, 193, 254, 193);
|
2009-09-03 20:59:17 +00:00
|
|
|
obj->actor_orientation = 1;
|
2009-09-27 05:17:00 +00:00
|
|
|
obj->save();
|
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
SET_FLAG(0xDBD7, 1);
|
|
|
|
}
|
|
|
|
return true;
|
2009-09-05 20:58:25 +00:00
|
|
|
|
2009-09-15 08:54:06 +00:00
|
|
|
case 0x9d45: {
|
|
|
|
byte tries = ++ *(res->dseg.ptr(0xDBEA));
|
|
|
|
debug(0, "another mansion try: %u", tries);
|
|
|
|
if (tries >= 7)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
uint16 ptr = res->dseg.get_word((tries - 2) * 2 + 0x6035);
|
|
|
|
byte id = scene->getId();
|
|
|
|
|
|
|
|
playMusic(11);
|
2009-10-31 18:49:47 +00:00
|
|
|
displayCutsceneMessage(0x580a, 30484);
|
2009-09-15 08:54:06 +00:00
|
|
|
processCallback(ptr);
|
|
|
|
playMusic(6);
|
|
|
|
if (scene->getId() == 11 && CHECK_FLAG(0xDBEC, 1))
|
2009-09-05 20:58:25 +00:00
|
|
|
return true;
|
2009-09-15 08:54:06 +00:00
|
|
|
//some effect
|
|
|
|
loadScene(id, scene->getPosition());
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x9d90:
|
|
|
|
loadScene(34, scene->getPosition());
|
|
|
|
Dialog::show(scene, 0x6f60, 987, 986);
|
|
|
|
playActorAnimation(990, true);
|
|
|
|
playAnimation(991, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x9de5:
|
|
|
|
loadScene(30, scene->getPosition());
|
|
|
|
playAnimation(887, 1, true);
|
|
|
|
playAnimation(888, 2, true);
|
|
|
|
waitAnimation();
|
|
|
|
Dialog::show(scene, 0x6fb8);
|
|
|
|
playSound(26, 3);
|
|
|
|
playAnimation(891, 1, true);
|
|
|
|
playAnimation(892, 2, true);
|
|
|
|
waitAnimation();
|
|
|
|
Dialog::show(scene, 0x6ff0);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x9e54:
|
|
|
|
loadScene(32, scene->getPosition());
|
|
|
|
playAnimation(894, 1, true);
|
|
|
|
playAnimation(893, 2, true);
|
|
|
|
waitAnimation();
|
|
|
|
Dialog::show(scene, 0x706e);
|
|
|
|
playSound(75, 9);
|
|
|
|
playAnimation(898, 1, true);
|
|
|
|
playAnimation(897, 2, true);
|
|
|
|
Dialog::show(scene, 0x7096);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x9ec3:
|
|
|
|
loadScene(29, scene->getPosition());
|
|
|
|
playActorAnimation(901, true);
|
|
|
|
playAnimation(900, 1, true);
|
|
|
|
waitAnimation();
|
|
|
|
Dialog::show(scene, 0x7161, 902, 903);
|
|
|
|
for (byte i = 3; i <= 9; i += 2)
|
|
|
|
playSound(56, i);
|
|
|
|
|
|
|
|
playActorAnimation(905, true);
|
|
|
|
playAnimation(904, 1, true);
|
|
|
|
Dialog::show(scene, 0x71c6, 902, 903);
|
|
|
|
return true;
|
|
|
|
|
|
|
|
case 0x9f3e:
|
|
|
|
loadScene(35, scene->getPosition());
|
|
|
|
playAnimation(907, 1, true);
|
|
|
|
playAnimation(906, 2, true);
|
|
|
|
waitAnimation();
|
|
|
|
//Dialog::show(scene, 0x7243, 908, 909);
|
|
|
|
Dialog::show(scene, 0x7243);
|
|
|
|
//Dialog::show(scene, 0x7318, 908, 910); //fixme: implement better synchronization
|
|
|
|
Dialog::show(scene, 0x7318);
|
|
|
|
loadScene(11, scene->getPosition());
|
|
|
|
setOns(3, 51);
|
|
|
|
playAnimation(911, 1);
|
|
|
|
playAnimation(899, 1);
|
|
|
|
enableObject(8);
|
|
|
|
setLan(2, 8);
|
|
|
|
SET_FLAG(0xDBEC, 1);
|
|
|
|
return true;
|
2009-09-03 20:59:17 +00:00
|
|
|
}
|
2009-09-15 08:54:06 +00:00
|
|
|
|
2009-09-03 20:59:17 +00:00
|
|
|
//error("invalid callback %04x called", addr);
|
2009-09-07 22:53:42 +00:00
|
|
|
warning("invalid callback %04x called", addr);
|
2009-09-03 20:59:17 +00:00
|
|
|
return true;
|
|
|
|
}
|
2009-09-04 20:08:33 +00:00
|
|
|
|
|
|
|
} // End of namespace TeenAgent
|