1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #include "teenagent/teenagent.h"
24 #include "teenagent/scene.h"
25 #include "teenagent/inventory.h"
26 #include "teenagent/resources.h"
27 #include "teenagent/dialog.h"
28 
29 #include "common/textconsole.h"
30 
31 namespace TeenAgent {
32 
33 #define CHECK_FLAG(addr, v) (res->dseg.get_byte(addr) == (v))
34 #define SET_FLAG(addr, v) (res->dseg.set_byte((addr), (v)))
35 #define GET_FLAG(addr) (res->dseg.get_byte(addr))
36 #define INC_FLAG(addr) (++*res->dseg.ptr(addr))
37 
fnIntro()38 void TeenAgentEngine::fnIntro() {
39 	hideActor();
40 
41 	loadScene(41, 139, 156, 3);
42 	playSound(41, 12);
43 	playAnimation(912, 1);
44 	setOns(0, 108);
45 	playSound(62, 8);
46 	playSound(58, 40);
47 	playAnimation(913, 1);
48 	setOns(1, 109);
49 	setLan(2, 1);
50 	dialog->show(192, scene, 914, 915, textColorGoldDriver, textColorBankGuard, 2, 1);
51 	displayCredits(dsAddr_introCredits1);
52 
53 	loadScene(42, 139, 156, 3);
54 	playSound(15, 20);
55 	playAnimation(916, 1);
56 	playSound(40, 18);
57 	playSound(40, 22);
58 	for (byte i = 27; i < 37; i += 2)
59 		playSound(40, i);
60 	playSound(29, 44);
61 	playAnimation(918, 0, true);
62 	playAnimation(917, 1, true);
63 	waitAnimation();
64 	displayCredits(dsAddr_introCredits2);
65 
66 	loadScene(40, 139, 156, 3);
67 	playMusic(3);
68 	dialog->show(193, scene, 920, 924, textColorRGBBoss, textColorFortuneTeller, 1, 2);
69 	playSound(26, 50);
70 	playAnimation(925, 0, true);
71 	playAnimation(926, 1, true);
72 	waitAnimation();
73 	dialog->show(194, scene, 927, 920, textColorFortuneTeller, textColorRGBBoss, 2, 1);
74 	displayCredits(dsAddr_introCredits3);
75 
76 	loadScene(39, 139, 156, 3);
77 	playMusic(11);
78 	playSound(81, 2);
79 	playSound(81, 8);
80 	playSound(81, 11);
81 	playSound(81, 14);
82 	playSound(81, 16);
83 	playSound(81, 18);
84 	playSound(81, 20);
85 	playSound(81, 21);
86 	playAnimation(928, 1);
87 	setOns(0, 112);
88 	dialog->showMono(195, scene, 929, textColorMark, 1);
89 	showActor();
90 	moveTo(319, 150, 1, true);
91 	moveTo(63, 150, 1);
92 	displayAsyncMessage(dsAddr_HeyWtmQMsg, 4, 62, 18, 36); // hey, what's the matter?
93 	playAnimation(851, 0, true);
94 	playActorAnimation(930, true);
95 	waitAnimation();
96 	playSound(24, 11);
97 	playActorAnimation(931);
98 
99 	displayCredits(dsAddr_introCredits4);
100 
101 	playMusic(3);
102 	loadScene(40, 50, 186, 1);
103 	setOns(0, 113);
104 	dialog->show(196, scene, 919, 0, textColorRGBBoss, textColorMark, 1, 0);
105 	moveTo(196, 186, 1);
106 	dialog->show(197, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
107 	playActorAnimation(932);
108 	dialog->show(198, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
109 	playActorAnimation(932);
110 	dialog->show(199, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
111 	playActorAnimation(932);
112 	dialog->show(200, scene, 0, 922, textColorMark, textColorRGBBoss, 0, 1);
113 	playActorAnimation(933);
114 	dialog->show(201, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
115 	moveTo(174, 186, 1);
116 	playAnimation(851, 0, true);
117 	playActorAnimation(934, true);
118 	waitAnimation();
119 	loadScene(10, 136, 153, 3);
120 }
121 
fnPoleClimbFail()122 void TeenAgentEngine::fnPoleClimbFail() {
123 	moveTo(86, 195, 1, true);
124 	playActorAnimation(868);
125 }
126 
fnGotAnchor()127 void TeenAgentEngine::fnGotAnchor() {
128 	SET_FLAG(dsAddr_timedCallbackState, 0);
129 	setTimerCallback(0, 0);
130 	scene->getActorAnimation()->free();
131 	playSound(64, 7);
132 	playActorAnimation(618);
133 	disableObject(5);
134 	setOns(0, 0);
135 	playSound(31, 1);
136 	playActorAnimation(619);
137 	fnGetOutOfLake();
138 	inventory->add(kInvItemAnchor);
139 	displayMessage(dsAddr_hookedAnchorMsg); // "I was really hooked on this anchor!"
140 }
141 
fnGetOutOfLake()142 void TeenAgentEngine::fnGetOutOfLake() {
143 	loadScene(15, 156, 180, 3);
144 	playSound(5, 5);
145 	playSound(38, 14);
146 	playSound(38, 20);
147 	playSound(5, 25);
148 	playActorAnimation(616);
149 }
150 
fnGuardDrinking()151 void TeenAgentEngine::fnGuardDrinking() {
152 	SET_FLAG(dsAddr_timedCallbackState, 0);
153 	setTimerCallback(0, 0);
154 	scene->getAnimation(0)->free();
155 	SET_FLAG(dsAddr_scaredGuardAlreadyFlag, 1);
156 
157 	displayAsyncMessage(dsAddr_BooMsg, 300, 130, 1, 5); // "Booo!"
158 	setOns(0, 16);
159 	enableObject(2);
160 
161 	playSound(17, 5);
162 	playAnimation(545, 0);
163 
164 	dialog->show(5, scene, 0, 546, textColorMark, textColorMansionGuard, 0, 1);
165 	SET_FLAG(dsAddr_spokenWithMansionGuardFlag, 1);
166 	SET_FLAG(dsAddr_haveNotSpokenWithMansionGuardFlag, 0);
167 }
168 
fnEgoDefaultPosition()169 void TeenAgentEngine::fnEgoDefaultPosition() {
170 	if (scene->getPosition().y <= 149)
171 		moveTo(94, 115, 4);
172 	else
173 		moveTo(51, 149, 4);
174 }
175 
fnEnterCave()176 void TeenAgentEngine::fnEnterCave() {
177 	loadScene(24, 230, 170, 1);
178 	playSound(52, 3);
179 	playSound(52, 7);
180 	playSound(52, 11);
181 	playSound(52, 14);
182 	playSound(52, 18);
183 	playSound(52, 21);
184 	playSound(52, 25);
185 	playActorAnimation(601);
186 	moveTo(230, 179, 3);
187 	if (!CHECK_FLAG(dsAddr_lightOnFlag, 1))
188 		displayMessage(dsAddr_kindaDarkMsg); // "It's kinda dark here"
189 }
190 
fnEgoScaredBySpider()191 void TeenAgentEngine::fnEgoScaredBySpider() {
192 	if (CHECK_FLAG(dsAddr_egoAlreadyScaredBySpiderFlag, 1)) {
193 		fnMoveToLadderAndLeaveCellar();
194 		dialog->showMark(75, scene);
195 	} else {
196 		dialog->showMark(73, scene);
197 		fnMoveToLadderAndLeaveCellar();
198 		wait(100);
199 		dialog->showMark(74, scene);
200 		SET_FLAG(dsAddr_egoAlreadyScaredBySpiderFlag, 1);
201 	}
202 }
203 
fnMoveToLadderAndLeaveCellar()204 void TeenAgentEngine::fnMoveToLadderAndLeaveCellar() {
205 	Object *objTemp = scene->getObject(3);
206 	moveTo(objTemp);
207 	fnLeaveCellar();
208 	moveTo(48, 190, 3);
209 }
210 
fnLeaveCellar()211 void TeenAgentEngine::fnLeaveCellar() {
212 	playSound(52, 10);
213 	playSound(52, 14);
214 	playSound(52, 18);
215 	playSound(52, 21);
216 	playSound(52, 25);
217 	playSound(52, 28);
218 	playSound(52, 32);
219 	playActorAnimation(600);
220 	loadScene(21, 297, 178, 3);
221 }
222 
fnPutRockInHole()223 void TeenAgentEngine::fnPutRockInHole() {
224 	if (CHECK_FLAG(dsAddr_timedCallbackState, 0)) {
225 		playSound(5, 2);
226 		playSound(15, 12);
227 		playActorAnimation(638);
228 		inventory->remove(kInvItemMouse);
229 		setTimerCallback(csAddr_mouseOutOfHoleTimeout, 100);
230 		SET_FLAG(dsAddr_timedCallbackState, 1);
231 	} else if (CHECK_FLAG(dsAddr_timedCallbackState, 1)) {
232 		playSound(5, 2);
233 		playSound(52, 13);
234 		playActorAnimation(648);
235 		setOns(1, 46);
236 		inventory->remove(kInvItemRock);
237 		setTimerCallback(csAddr_mouseOutOfHoleTimeout, 100);
238 		SET_FLAG(dsAddr_timedCallbackState, 2);
239 	} else if (CHECK_FLAG(dsAddr_timedCallbackState, 2)) {
240 		playActorAnimation(649);
241 		setOns(1, 47);
242 		wait(300);
243 		for (byte i = 1; i <= 37; i += 4)
244 			playSound(68, i);
245 		playAnimation(639, 2);
246 		setOns(0, 42);
247 		enableObject(6);
248 		disableObject(5);
249 		SET_FLAG(dsAddr_mouseGotGoldNuggetFlag, 1);
250 		SET_FLAG(dsAddr_timedCallbackState, 0);
251 		setTimerCallback(0, 0);
252 	}
253 }
254 
fnEgoBottomRightTurn()255 void TeenAgentEngine::fnEgoBottomRightTurn() {
256 	Common::Point p = scene->getPosition();
257 	if (p.x == 208 && p.y == 151)
258 		moveRel(0, 0, 2);
259 	else
260 		moveTo(208, 151, 1);
261 }
262 
fnCheckingDrawers()263 bool TeenAgentEngine::fnCheckingDrawers() {
264 	uint16 v = GET_FLAG(dsAddr_drawerPuzzleBookValue) - 1;
265 	if (GET_FLAG(dsAddr_blueDrawerOpenFlag + v) != 1)
266 		return false;
267 	else {
268 		uint16 sum = 0;
269 		for (uint i = 0; i < 6; ++i)
270 			sum += GET_FLAG(dsAddr_blueDrawerOpenFlag + i);
271 		if (sum != 1)
272 			return false;
273 		else
274 			return true;
275 	}
276 }
277 
fnDrawerOpenMessage()278 void TeenAgentEngine::fnDrawerOpenMessage() {
279 	if (CHECK_FLAG(dsAddr_drawerPuzzleHintGivenFlag, 1))
280 		displayMessage(dsAddr_drawerOpenMsg); // "I cannot open the drawer if the next one is open!"
281 	else {
282 		displayMessage(dsAddr_strangeDrawerMsg); // "Strange, but the drawer is stuck if the next drawer is open"
283 		displayMessage(dsAddr_notOrdinaryDrawersMsg); // "Maybe these are not just ordinary drawers!"
284 		SET_FLAG(dsAddr_drawerPuzzleHintGivenFlag, 1);
285 	}
286 }
287 
fnRobotSafeAlreadyUnlockedCheck()288 bool TeenAgentEngine::fnRobotSafeAlreadyUnlockedCheck() {
289 	if (CHECK_FLAG(dsAddr_MansionRobotSafeUnlockedFlag, 1)) {
290 		return true;
291 	} else {
292 		displayMessage(dsAddr_noReasonMsg); // "There's no reason to do it"
293 		return false;
294 	}
295 }
296 
fnRobotSafeUnlockCheck()297 void TeenAgentEngine::fnRobotSafeUnlockCheck() {
298 	if (CHECK_FLAG(dsAddr_MansionRobotSafeVoiceTestPassedFlag, 1) &&
299 	    CHECK_FLAG(dsAddr_MansionRobotSafeScentTestPassedFlag, 1) &&
300 	    CHECK_FLAG(dsAddr_MansionRobotSafeViewTestPassedFlag, 1)) {
301 		waitLanAnimationFrame(1, 1);
302 		playSound(89, 2);
303 		playActorAnimation(731);
304 		setOns(0, 70);
305 		setLan(1, 0);
306 		disableObject(1);
307 		enableObject(2);
308 		enableObject(3);
309 	}
310 }
311 
fnMansionIntrusionAttempt()312 bool TeenAgentEngine::fnMansionIntrusionAttempt() {
313 	wait(50);
314 	byte attempts = res->dseg.get_byte(dsAddr_mansionEntryCount) + 1;
315 	res->dseg.set_byte(dsAddr_mansionEntryCount, attempts);
316 	debugC(0, kDebugCallbacks, "mansion intrusion attempt #%u", attempts);
317 	if (attempts >= 7)
318 		return false;
319 	else {
320 		byte id = scene->getId();
321 
322 		playMusic(11);
323 		displayCutsceneMessage(dsAddr_cutsceneMsg2, 84, 95); // "Meanwhile in the mansion"
324 		switch (attempts) {
325 		case 2:
326 			fnSecondMansionIntrusion();
327 			break;
328 		case 3:
329 			fnThirdMansionIntrusion();
330 			break;
331 		case 4:
332 			fnFourthMansionIntrusion();
333 			break;
334 		case 5:
335 			fnFifthMansionIntrusion();
336 			break;
337 		case 6:
338 			fnSixthMansionIntrusion();
339 			break;
340 		default:
341 			error("mansion intrusion attempts out of range!");
342 			break;
343 		}
344 		playMusic(6);
345 		if (getFlag(dsAddr_johnNotyOutsideMansionDoorFlag) != 1 || attempts != 6)
346 			loadScene(id, scene->getPosition());
347 		return true;
348 	}
349 }
350 
fnSecondMansionIntrusion()351 void TeenAgentEngine::fnSecondMansionIntrusion() {
352 	hideActor();
353 	loadScene(34, scene->getPosition());
354 	playAnimation(986, 0, true);
355 	playAnimation(987, 1, true);
356 	waitAnimation();
357 	dialog->show(178, scene, 988, 989, textColorMansionGuard, textColorJohnNoty, 1, 2);
358 	playAnimation(990, 0, true);
359 	playAnimation(991, 1, true);
360 	waitAnimation();
361 	showActor();
362 }
363 
fnThirdMansionIntrusion()364 void TeenAgentEngine::fnThirdMansionIntrusion() {
365 	hideActor();
366 	loadScene(30, scene->getPosition());
367 	playAnimation(887, 1);
368 	playAnimation(888, 2, true, true, true);
369 	//waitAnimation();
370 	dialog->showMono(179, scene, 889, textColorMansionGuard, 2);
371 	playSound(26, 3);
372 	playAnimation(891, 1, true, true, true);
373 	playAnimation(892, 2);
374 	waitAnimation();
375 	dialog->show(180, scene, 890, 889, textColorJohnNoty, textColorMansionGuard, 3, 2);
376 	showActor();
377 }
378 
fnFourthMansionIntrusion()379 void TeenAgentEngine::fnFourthMansionIntrusion() {
380 	hideActor();
381 	loadScene(32, scene->getPosition());
382 	playAnimation(894, 1, true, true, true);
383 	playAnimation(893, 2, true);
384 	waitAnimation();
385 	dialog->showMono(181, scene, 895, textColorMansionGuard, 3);
386 	playSound(75, 9);
387 	playAnimation(898, 1, true);
388 	playAnimation(897, 2, true);
389 	dialog->show(182, scene, 896, 895, textColorJohnNoty, textColorMansionGuard, 2, 3);
390 	showActor();
391 }
392 
fnFifthMansionIntrusion()393 void TeenAgentEngine::fnFifthMansionIntrusion() {
394 	hideActor();
395 	loadScene(29, scene->getPosition());
396 	playActorAnimation(901, true);
397 	playAnimation(900, 1, true);
398 	waitAnimation();
399 	dialog->show(183, scene, 903, 902, textColorJohnNoty, textColorMansionGuard, 2, 3);
400 	for (byte i = 3; i <= 9; i += 2)
401 		playSound(56, i);
402 
403 	playActorAnimation(905, true);
404 	playAnimation(904, 1, true);
405 	dialog->show(184, scene, 903, 902, textColorJohnNoty, textColorMansionGuard, 2, 3);
406 	showActor();
407 }
408 
fnSixthMansionIntrusion()409 void TeenAgentEngine::fnSixthMansionIntrusion() {
410 	hideActor();
411 	loadScene(35, scene->getPosition());
412 	playAnimation(907, 2, true);
413 	playAnimation(906, 3, true);
414 	waitAnimation();
415 	dialog->show(185, scene, 908, 909, textColorMansionGuard, textColorJohnNoty, 2, 3);
416 	dialog->show(186, scene, 910, 908, textColorJohnNoty, textColorMansionGuard, 3, 2);
417 	loadScene(11, scene->getPosition());
418 	showActor();
419 	setOns(3, 51);
420 	playAnimation(911, 1);
421 	playAnimation(899, 1);
422 	setFlag(dsAddr_johnNotyOutsideMansionDoorFlag, 1);
423 	reloadLan();
424 	wait(200);
425 	enableObject(8);
426 	setLan(2, 8);
427 }
428 
fnTooDark()429 void TeenAgentEngine::fnTooDark() {
430 	displayMessage(dsAddr_TooDarkMsg); // "It's too dark to see clearly"
431 }
432 
fnIsCookGone()433 bool TeenAgentEngine::fnIsCookGone() {
434 	if (CHECK_FLAG(dsAddr_MansionCookGoneFlag, 1)) {
435 		return true;
436 	} else {
437 		displayMessage(dsAddr_cookAroundMsg); // "I can't do anything with this cook around"
438 		return false;
439 	}
440 }
441 
fnEgoSuspiciousPosition()442 void TeenAgentEngine::fnEgoSuspiciousPosition() {
443 	Common::Point p = scene->getPosition();
444 	if (p.x != 203 && p.y != 171)
445 		moveTo(203, 169, 2);
446 	else
447 		moveTo(203, 169, 1);
448 }
449 
fnGivingFlowerToOldLady()450 void TeenAgentEngine::fnGivingFlowerToOldLady() {
451 	playSound(5, 2);
452 	dialog->show(37, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
453 	playActorAnimation(537, true);
454 	playAnimation(538, 0, true);
455 	waitAnimation();
456 	wait(100);
457 	dialog->show(38, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
458 }
459 
fnGiveAnotherFlowerToOldLady()460 void TeenAgentEngine::fnGiveAnotherFlowerToOldLady() {
461 		dialog->pop(scene, dsAddr_dialogStackOldLady, 0, 523, textColorMark, textColorOldLady, 0, 1);
462 }
463 
fnGivingFlowerToAnne()464 void TeenAgentEngine::fnGivingFlowerToAnne() {
465 	dialog->show(53, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
466 	playSound(5, 10);
467 	playActorAnimation(540, true);
468 	playAnimation(539, 1, true);
469 	waitAnimation();
470 	wait(100);
471 	dialog->show(54, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
472 	wait(50);
473 	dialog->show(55, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
474 	dialog->show(56, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
475 	wait(50);
476 	moveRel(0, 1, 0);
477 	dialog->show(57, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
478 	moveRel(0, -1, 0);
479 	wait(50);
480 }
481 
fnGiveAnotherFlowerToAnne()482 void TeenAgentEngine::fnGiveAnotherFlowerToAnne() {
483 	dialog->pop(scene, dsAddr_dialogStackAnotherFlowerToAnne, 0, 524, textColorMark, textColorAnne, 0, 2);
484 }
485 
rejectMessage()486 void TeenAgentEngine::rejectMessage() {
487 	uint i = _rnd.getRandomNumber(3);
488 	switch (i) {
489 	case 0:
490 		displayMessage(dsAddr_rejectMsg0); // "I have no idea what to do with it"
491 		break;
492 	case 1:
493 		displayMessage(dsAddr_rejectMsg1); // "I can't imagine what I could do with this"
494 		break;
495 	case 2:
496 		displayMessage(dsAddr_rejectMsg2); // "I can't figure out what I should do with this"
497 		break;
498 	case 3:
499 		displayMessage(dsAddr_rejectMsg3); // "I can't find any reason to mess with it"
500 		break;
501 	default:
502 		error("rejectMessage() index out of range");
503 		break;
504 	}
505 }
506 
processCallback(uint16 addr)507 bool TeenAgentEngine::processCallback(uint16 addr) {
508 	if (addr == 0)
509 		return false;
510 
511 	debugC(0, kDebugCallbacks, "processCallback(%04x)", addr);
512 
513 	bool retVal = true;
514 	switch (addr) {
515 	case csAddr_intro: // intro
516 		fnIntro();
517 		break;
518 
519 	case 0x3fed:
520 		loadScene(3, Common::Point(305, 104));
521 		scene->setOrientation(4);
522 		break;
523 
524 	case 0x4007:
525 		loadScene(5, Common::Point(300, 131));
526 		scene->setOrientation(3);
527 		break;
528 
529 	case 0x4021:
530 		// pulling out mysterious object
531 		if (CHECK_FLAG(dsAddr_cutFenceFlag, 1)) {
532 			playActorAnimation(844);
533 			playActorAnimation(846);
534 			playActorAnimation(845);
535 			displayMessage(dsAddr_pullObjMsg1); // "I can't pull it out"
536 		} else {
537 			displayMessage(dsAddr_pullObjMsg2); // "I can't reach it"
538 		}
539 		break;
540 
541 	case 0x4048:
542 		displayMessage(dsAddr_dontWantToTouchMsg); // "I don't want to touch it - I might get hurt"
543 		break;
544 
545 	case 0x404f:
546 		displayMessage(dsAddr_notWantToSleepMsg); // "I don't want to sleep"
547 		break;
548 
549 	case 0x4056:
550 		// FIXME - This is the bird use callback in the first act at
551 		//         the mudpool. Current Code based on behaviour. Need to analyse cseg data.
552 		dialog->popMark(scene, dsAddr_dialogStackMudpoolBird);
553 		break;
554 
555 	case 0x4060:
556 		loadScene(2, Common::Point(28, 180));
557 		scene->setOrientation(2);
558 		break;
559 
560 	case 0x407a:
561 		loadScene(4, Common::Point(297, 128));
562 		scene->setOrientation(4);
563 		break;
564 
565 	case 0x4094: // climbing to the pole near mudpool
566 		if (CHECK_FLAG(dsAddr_gotMugOfMudFlag, 1)) {
567 			displayMessage(dsAddr_poleClimbDoneMsg); // "Never Again!"
568 		} else {
569 			for (byte i = 11; i <= 27; i += 4)
570 				playSound(76, i);
571 
572 			playSound(56, 35);
573 			playSound(19, 59);
574 			playActorAnimation(864);
575 			playAnimation(865, 1);
576 			playActorAnimation(866);
577 			//InventoryObject *obj = inventory->selectedObject();
578 			//if (obj != NULL && obj->id == kInvItemMug) {
579 
580 			// FIXME: implement pause in mudpool and using of Mug object, as per original interpreter
581 			if (inventory->has(kInvItemMug)) {
582 				playSound(5, 4);
583 				playSound(5, 19);
584 				playSound(64, 11);
585 				playActorAnimation(867);
586 				inventory->remove(kInvItemMug);
587 				inventory->add(kInvItemMugOfMud);
588 				moveTo(86, 195, 1, true);
589 				playActorAnimation(868);
590 				SET_FLAG(dsAddr_gotMugOfMudFlag, 1);
591 			} else {
592 				fnPoleClimbFail();
593 				dialog->popMark(scene, dsAddr_dialogStackFallIntoMudpool);
594 			}
595 		}
596 		break;
597 
598 	case csAddr_poleClimbFail:
599 		fnPoleClimbFail();
600 		break;
601 
602 	case 0x4195:
603 		displayMessage(dsAddr_preferWaterMsg); // "I prefer water"
604 		break;
605 
606 	case 0x419c: // getting the bird
607 		setOns(0, 0);
608 		playSound(56, 10);
609 		playActorAnimation(875);
610 		disableObject(6);
611 		inventory->add(kInvItemBird);
612 		break;
613 
614 	case 0x41c3:
615 		displayMessage(dsAddr_pullObjMsg2); // "I can't reach it"
616 		break;
617 
618 	case 0x41ca:
619 		rejectMessage();
620 		break;
621 
622 	case 0x41ce:
623 		moveTo(197, 159, 4);
624 		setOns(0, 0);
625 		playSound(71, 8);
626 		playActorAnimation(833);
627 		moveTo(225, 159, 4);
628 		inventory->add(kInvItemDelicatePlant);
629 		disableObject(3);
630 		break;
631 
632 	case 0x422c:
633 		displayMessage(dsAddr_tooWeakToClimbMsg); // "I'm too weak to climb it"
634 		break;
635 
636 	case 0x4233:
637 		loadScene(3, Common::Point(216, 199));
638 		scene->setOrientation(1);
639 		break;
640 
641 	case 0x424d:
642 		loadScene(5, Common::Point(18, 174));
643 		scene->setOrientation(2);
644 		break;
645 
646 	case 0x4267:
647 		hideActor();
648 		playSound(23, 8);
649 		playSound(24, 13);
650 		setOns(1, 0);
651 		playActorAnimation(841);
652 		setOns(1, 0x61);
653 		setOns(2, 0);
654 		playSound(63, 12);
655 		playSound(5, 26);
656 		playActorAnimation(842);
657 		wait(100);
658 		// shown in different positions
659 		displayMessage(dsAddr_fnMsg2, textColorMark, 16, 68); // "And how am I supposed to get back?"
660 		wait(50);
661 		displayMessage(dsAddr_fnMsg3, textColorMark, 92, 68); // "Great"
662 		wait(50);
663 		displayMessage(dsAddr_fnMsg4, textColorMark, 62, 68); // "Oh, yeah, right"
664 		wait(50);
665 		playActorAnimation(843);
666 		showActor();
667 		moveTo(223, 149, 0, true);
668 		disableObject(7);
669 		disableObject(1);
670 		inventory->add(kInvItemShovelAct1);
671 		displayMessage(dsAddr_fnMsg1); // "Piece of cake"
672 		break;
673 
674 	case 0x433a:
675 		loadScene(10, Common::Point(294, 183));
676 		scene->setOrientation(4);
677 		break;
678 
679 	case 0x4354:
680 		loadScene(4, Common::Point(300, 185));
681 		scene->setOrientation(4);
682 		break;
683 
684 	case 0x436e:
685 		loadScene(2, Common::Point(219, 199));
686 		scene->setOrientation(1);
687 		break;
688 
689 	case 0x4388:
690 		playSound(80, 4);
691 		playActorAnimation(961);
692 		loadScene(8, 155, 199, 1);
693 		break;
694 
695 	case 0x43b5: // HQ, first trial - prison
696 		playSound(70, 6);
697 		playActorAnimation(962);
698 		loadScene(7, 30, 184, 2);
699 		if (res->dseg.get_byte(dsAddr_FirstActTrialState) < 2) {
700 			wait(150);
701 			moveTo(134, 167, 2);
702 			displayMessage(dsAddr_firstTrialMsg); // "Sir, I'm Mark. A rookie"
703 			setLan(1, 0);
704 			playAnimation(812, 0, true);
705 			playActorAnimation(811);
706 
707 			dialog->show(148, scene, 0, 813, textColorMark, textColorCaptain, 0, 1);
708 			loadScene(6, 230, 184);
709 			playMusic(5);
710 			dialog->show(149, scene, 0, 814, textColorMark, textColorCaptain, 0, 1);
711 			playSound(4, 14);
712 			playAnimation(815, 0);
713 			setOns(1, 0);
714 
715 			dialog->showMono(150, scene, 0, textColorMark, 0);
716 
717 			SET_FLAG(dsAddr_FirstActTrialState, 1);
718 		}
719 		break;
720 
721 	case 0x4482:
722 		if (CHECK_FLAG(dsAddr_FirstActTrialState, 0)) {
723 			playActorAnimation(968);
724 			displayMessage(dsAddr_lockedMsg); // "It's Locked!"
725 		} else {
726 			playSound(80, 3);
727 			playSound(79, 4);
728 			playActorAnimation(968);
729 			loadScene(6, 280, 186, 4);
730 		}
731 		break;
732 
733 	case 0x44fc: // pull out spring from bed
734 		playSound(53, 25);
735 		playSound(24, 27);
736 		playSound(5, 36);
737 		playActorAnimation(839);
738 		moveTo(278, scene->getPosition().y, 0, true);
739 		inventory->add(kInvItemSpring);
740 		disableObject(1);
741 		break;
742 
743 	case 0x44cb:
744 		if (CHECK_FLAG(dsAddr_gotRopeAct1Flag, 1)) {
745 			displayMessage(dsAddr_vacMsg); // "What am I? A vacuum cleaner?!"
746 		} else {
747 			playSound(49, 14);
748 			playSound(5, 21);
749 			playActorAnimation(869);
750 			inventory->add(kInvItemRopeAct1);
751 			SET_FLAG(dsAddr_gotRopeAct1Flag, 1);
752 		}
753 		break;
754 
755 	case 0x4532:
756 		displayMessage(dsAddr_springPrickMsg); // "The springs would prick my back"
757 		break;
758 
759 	case 0x4539: // prison cell: use crates
760 		if (CHECK_FLAG(dsAddr_JailCableAndBowlState, 2)) {
761 			// finished the meal - trap
762 			displayMessage(dsAddr_mealFinishedMsg); // "Hey! I finished my meal."
763 			moveTo(306, 196, 2);
764 			wait(50);
765 			//playAnimation(825, 1); //very long empty animation. what for?
766 			wait(50);
767 			setLan(1, 0);
768 			playSound(71, 4);
769 			playActorAnimation(823);
770 
771 			loadScene(5, scene->getPosition());
772 			playSound(74, 1);
773 			playSound(74, 3);
774 			playSound(74, 6);
775 			playActorAnimation(826);
776 			loadScene(6, scene->getPosition());
777 			setOns(3, 0x5b);
778 			wait(50);
779 			displayMessage(dsAddr_bowlWeldedMsg); // "Wow. He got welded to the bowl"
780 			SET_FLAG(dsAddr_JailCableAndBowlState, 3);
781 			scene->getObject(4)->setName("body");
782 		} else {
783 			if (dialog->pop(scene, dsAddr_dialogStackJailDoorGrates, 0, 0, textColorMark, textColorMark, 0, 0) == 0x636b) { // 'im getting hungry'
784 				wait(100);
785 				playSound(52, 8);
786 				playSound(52, 13);
787 				playAnimation(820, 1);
788 				setOns(3, 0x59);
789 				wait(50);
790 				moveTo(scene->getPosition().x, scene->getPosition().y + 1, 3);
791 				wait(150);
792 				moveTo(scene->getPosition().x, scene->getPosition().y - 1, 2);
793 				wait(100);
794 				displayMessage(dsAddr_ThanksMsg); // "Thanks."
795 				enableObject(4);
796 				SET_FLAG(dsAddr_GotFoodBowlInJailFlag, 1);
797 			}
798 		}
799 		break;
800 
801 	case 0x4662:
802 		if (CHECK_FLAG(dsAddr_JailCableAndBowlState, 3)) {
803 			if (CHECK_FLAG(dsAddr_GotJailKeyFlag, 1)) {
804 				displayMessage(dsAddr_noPocketMsg); // "I don't want to touch his pockets again."
805 			} else {
806 				moveTo(280, 179, 2);
807 				playSound(49, 7);
808 				playSound(5, 17);
809 				playActorAnimation(827);
810 				inventory->add(kInvItemJailKey);
811 				SET_FLAG(dsAddr_GotJailKeyFlag, 1);
812 			}
813 		} else
814 			displayMessage(dsAddr_foodAliveMsg); // "No, thanks. This food seems still alive"
815 		break;
816 
817 	case 0x46af: // prison cell: use live cable
818 		if (CHECK_FLAG(dsAddr_GotFoodBowlInJailFlag, 1)) {
819 			displayMessage(dsAddr_ideaMsg); // "That gives me an idea"
820 			setOns(2, 0);
821 			playActorAnimation(821);
822 			setOns(2, 0x5a);
823 			setOns(3, 0);
824 			playSound(22, 2);
825 			playActorAnimation(822);
826 			displayMessage(dsAddr_checkWorksMsg); // "Now I got to check if it works"
827 			disableObject(5);
828 			SET_FLAG(dsAddr_JailCableAndBowlState, 1);
829 		} else
830 			displayMessage(dsAddr_unkUsageMsg); // "I don't have any idea what to do with it right now"
831 		break;
832 
833 	case 0x4705: // prison: getting lamp bulb
834 		wait(50);
835 		moveTo(144, 185, 4);
836 		playSound(56, 15);
837 		setOns(0, 86); // hiding lamp
838 		playActorAnimation(816, true);
839 		playAnimation(817, 0, true);
840 		waitAnimation();
841 		setOns(0, 87);
842 
843 		playSound(34, 1);
844 		playSound(5, 15);
845 		playActorAnimation(818, true);
846 		playAnimation(819, 0, true);
847 		waitAnimation();
848 
849 		moveTo(160, 188, 1, true);
850 		setOns(2, 88);
851 
852 		disableObject(6);
853 		enableObject(5);
854 		inventory->add(kInvItemBulb);
855 		break;
856 
857 	case 0x4794: // prison cell door
858 		if (res->dseg.get_byte(dsAddr_FirstActTrialState) >= 2) {
859 			loadScene(5, 287, 143);
860 		} else {
861 			displayMessage(dsAddr_doorClosedMsg); // "The door is closed. What a surprise."
862 		}
863 		break;
864 
865 	case 0x47bc: // prison: examining trash can
866 		playSound(79, 5);
867 		playSound(1, 14);
868 		playActorAnimation(966);
869 		displayMessage(dsAddr_emptyMsg); // "It's Empty"
870 		break;
871 
872 	case 0x47db: // prison: use switch
873 		if (CHECK_FLAG(dsAddr_FirstActTrialState, 1)) {
874 			playSound(71, 4);
875 			playActorAnimation(823);
876 			if (CHECK_FLAG(dsAddr_JailCableAndBowlState, 0)) {
877 				displayMessage(dsAddr_NotHappenMsg); // "Nothing happened"
878 			} else {
879 				playSound(74, 1);
880 				playAnimation(824, 1);
881 				if (CHECK_FLAG(dsAddr_JailCableAndBowlState, 1)) {
882 					wait(100);
883 					displayMessage(dsAddr_timeToCallMsg); // "I think it is time to call captain"
884 					SET_FLAG(dsAddr_JailCableAndBowlState, 2);
885 				}
886 			}
887 		} else {
888 			displayMessage(dsAddr_nahMsg); // "Nah"
889 		}
890 		break;
891 
892 	case 0x4836:
893 		rejectMessage();
894 		break;
895 
896 	case 0x4871:
897 		playActorAnimation(965);
898 		displayMessage(dsAddr_lockedMsg); // "It's Locked!"
899 		break;
900 
901 	case 0x487e:
902 		displayMessage(dsAddr_geographyClassMsg); // "I should have paid more attention in geography classes."
903 		break;
904 
905 	case 0x4885:
906 		displayMessage(dsAddr_dontNeedMessMsg); // "I don't need this mess"
907 		break;
908 
909 	case 0x488c:
910 		displayMessage(dsAddr_seenSofterRocksMsg); // "Thanks, but I've seen softer rocks"
911 		break;
912 
913 	case 0x4893: // taking pills
914 		if (CHECK_FLAG(dsAddr_captainDrawerState, 1)) {
915 			SET_FLAG(dsAddr_captainDrawerState, 2);
916 			setOns(1, 0x67);
917 			playSound(5, 9);
918 			playActorAnimation(872);
919 			inventory->add(kInvItemMedicine);
920 			disableObject(7);
921 		} else {
922 			playActorAnimation(964);
923 			displayMessage(dsAddr_lockedMsg); // "It's Locked!"
924 		}
925 		break;
926 
927 	case 0x48d4:
928 		displayMessage(dsAddr_tooBluntMsg); // "They are too blunt to be of any use"
929 		break;
930 
931 	case 0x48db:
932 		displayMessage(dsAddr_uselessModelsMsg); // "What's the use of the models?"
933 		break;
934 
935 	case 0x48e2:
936 	case 0x48e6:
937 		rejectMessage();
938 		break;
939 
940 	case 0x4911:
941 		displayMessage(dsAddr_barmanWillNoticeMsg); // "The barman will surely notice its disappearing"
942 		break;
943 
944 	case 0x4918: // talking with barmen
945 		if (CHECK_FLAG(dsAddr_birdOnBarRadioAntennaFlag, 1)) {
946 			moveTo(140, 152, 1);
947 			if (CHECK_FLAG(dsAddr_swappedBarmanMugFlag, 1)) {
948 				dialog->showMono(177, scene, 0, textColorMark, 0);
949 				displayMessage(dsAddr_yeahRightMsg, textColorBarman, 32, 67); // "Yeah right!"
950 				//reloadLan();
951 				setLan(1, 0);
952 				playAnimation(882, 0);
953 				playSound(75, 10);
954 				setOns(2, 0);
955 				playSound(75, 10);
956 				playSound(24, 15);
957 				playAnimation(883, 0);
958 				shakeScreen();
959 				disableObject(1);
960 				disableObject(2);
961 				SET_FLAG(dsAddr_barmanPassedOutFlag, 1);
962 			} else
963 				displayMessage(dsAddr_talkNotNowMsg); // "I've got no reason to talk to him right now."
964 		} else {
965 			if (CHECK_FLAG(dsAddr_FirstActTrialState, 3)) {
966 				if (CHECK_FLAG(dsAddr_spokeToBarmanAboutThirdTrialFlag, 1)) {
967 					dialog->show(168, scene, 0, 857, textColorMark, textColorBarman, 0, 1);
968 				} else {
969 					dialog->show(166, scene, 0, 857, textColorMark, textColorBarman, 0, 1); // taking mug
970 					playActorAnimation(859, true);
971 					playAnimation(858, 0, true);
972 					waitAnimation();
973 					playSound(75, 6);
974 					playActorAnimation(860);
975 					dialog->show(167, scene, 0, 857, textColorMark, textColorBarman, 0, 1);
976 					inventory->add(kInvItemMug);
977 					SET_FLAG(dsAddr_spokeToBarmanAboutThirdTrialFlag, 1);
978 					SET_FLAG(dsAddr_gotPasswordNeedSpeakBarmanFlag, 0);
979 				}
980 			} else {
981 				dialog->pop(scene, dsAddr_dialogStackBarman, 0, 857, textColorMark, textColorBarman, 0, 1);
982 			}
983 		}
984 		break;
985 
986 	case 0x4d7d:
987 	case 0x4d81:
988 		rejectMessage();
989 		break;
990 
991 	case 0x4d89:
992 		displayMessage(dsAddr_getRidOfGuardFirstMsg); // "If I want to get inside I must get rid of this guard first..."
993 		break;
994 
995 	case 0x4d90:
996 		rejectMessage();
997 		break;
998 
999 	case 0x4e47:
1000 		loadScene(13, Common::Point(9, 172));
1001 		scene->setOrientation(2);
1002 		break;
1003 
1004 	case 0x4e85:
1005 		loadScene(15, Common::Point(291, 162));
1006 		scene->setOrientation(4);
1007 		break;
1008 
1009 	case 0x4e9f:
1010 		loadScene(12, Common::Point(310, 152));
1011 		scene->setOrientation(4);
1012 		break;
1013 
1014 	case 0x4f14: // use the hollow
1015 		if (CHECK_FLAG(dsAddr_mansionTreeHollowEmptyFlag, 1))
1016 			displayMessage(dsAddr_totalEmptyMsg); // "I can see it's totally empty"
1017 		else
1018 			displayMessage(dsAddr_noHandsMsg); // "I'd better not put my hands in there..."
1019 		break;
1020 
1021 	case 0x4a64:
1022 		if (CHECK_FLAG(dsAddr_gotPasswordNeedSpeakBarmanFlag, 1))
1023 			displayMessage(dsAddr_firstBusinessMsg); // "First I've got some business to take care of"
1024 		else
1025 			loadScene(5, 35, 162);
1026 		break;
1027 
1028 	case 0x4bf5:
1029 		playActorAnimation(959);
1030 		loadScene(8, 40, 152, 3);
1031 		break;
1032 
1033 	case 0x4c18:
1034 		rejectMessage();
1035 		break;
1036 
1037 	case 0x4c29:
1038 		displayMessage(dsAddr_tooManyToSearchMsg); // "There are too many of them to search"
1039 		break;
1040 
1041 	case 0x4c30:
1042 	case 0x4c37:
1043 		displayMessage(dsAddr_captainWouldNotFitMsg); // "Captain surely wouldn't fit them. I must look elsewhere"
1044 		break;
1045 
1046 	case 0x483a:
1047 		dialog->popMark(scene, dsAddr_dialogStackInterrogateCaptain);
1048 		break;
1049 
1050 	case 0x4844:
1051 		playSound(80, 4);
1052 		playActorAnimation(963);
1053 		loadScene(5, 166, 158);
1054 		break;
1055 
1056 	case 0x48ea:
1057 		setOns(0, 0);
1058 		playSound(5, 9);
1059 		playActorAnimation(836);
1060 		inventory->add(kInvItemSwissArmyKnife);
1061 		disableObject(12);
1062 		break;
1063 
1064 	case 0x4a8c:
1065 		if (CHECK_FLAG(dsAddr_barmanPassedOutFlag, 1)) {
1066 			playSound(89, 5);
1067 			playActorAnimation(958);
1068 			loadScene(9, 240, 182, 4);
1069 		} else if (CHECK_FLAG(dsAddr_birdOnBarRadioAntennaFlag, 1)) {
1070 			displayMessage(dsAddr_barmanTooCloseMsg); // "The barman is too close"
1071 		} else {
1072 			dialog->pop(scene, dsAddr_dialogStackBarCellarDoor, 0, 857, textColorMark, textColorBarman, 0, 1);
1073 		}
1074 		break;
1075 
1076 	case 0x4aed:
1077 		displayMessage(dsAddr_tooBigMsg); // "It's too big and I doubt if I'll ever need it"
1078 		break;
1079 
1080 	case 0x4af4: // taking the crumbs
1081 		setOns(0, 0);
1082 		playSound(49, 6);
1083 		playSound(5, 13);
1084 		playActorAnimation(861);
1085 		inventory->add(kInvItemCrumbs);
1086 		disableObject(6);
1087 		break;
1088 
1089 	case 0x4b23:
1090 		rejectMessage();
1091 		break;
1092 
1093 	case 0x4b27:
1094 		displayMessage(dsAddr_tooMuchToDrinkMsg); // "It'd take too much time to drink it..."
1095 		break;
1096 
1097 	case 0x4b2e:
1098 		displayMessage(dsAddr_notThiefMsg); // "I'm not a thief. And it's empty, by the way."
1099 		break;
1100 
1101 	case 0x4b35:
1102 		playSound(15, 7);
1103 		playActorAnimation(884);
1104 		playSound(55, 1);
1105 		playSound(24, 12);
1106 		playAnimation(885, 0);
1107 		dialog->show(164, scene, 886, 0, textColorJohnNoty, textColorMark, 1, 0);
1108 		playMusic(3);
1109 		loadScene(40, 198, 186, 1);
1110 		dialog->show(202, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
1111 		inventory->clear();
1112 		inventory->add(kInvItemSuperGlue);
1113 		displayCredits(dsAddr_credits5);
1114 		loadScene(1, 198, 186);
1115 		hideActor();
1116 		playActorAnimation(956);
1117 		dialog->showMono(212, scene, 957, textColorMark, 1);
1118 		waitAnimation();
1119 		loadScene(15, 157, 199, 1);
1120 		playMusic(6);
1121 		break;
1122 
1123 	case 0x4c3e: // get the grenade
1124 		playSound(32, 24);
1125 		playActorAnimation(862);
1126 		reloadLan();
1127 		playAnimation(863, 1);
1128 		inventory->add(kInvItemGrenade);
1129 		disableObject(1);
1130 		SET_FLAG(dsAddr_act1GuardState, 2);
1131 		break;
1132 
1133 	case 0x4c70:
1134 		if (CHECK_FLAG(dsAddr_act1GuardState, 0)) {
1135 			if (CHECK_FLAG(dsAddr_ShownPassToGuardFlag, 1)) { // papers are shown
1136 				dialog->pop(scene, dsAddr_dialogStackCampGuardReadingNews, 0, 809, textColorMark, textColorCampGuard, 0, 1);
1137 			} else {
1138 				dialog->pop(scene, dsAddr_dialogStackCampGuardWantsDocuments, 0, 809, textColorMark, textColorCampGuard, 0, 1);
1139 			}
1140 		} else {
1141 			displayMessage(dsAddr_helloQMsg); // "Hello?"
1142 			wait(100);
1143 			displayMessage(dsAddr_totallyAddictedMsg); // "He's totally addicted"
1144 		}
1145 		break;
1146 
1147 	case 0x4c1c:
1148 		playActorAnimation(960);
1149 		displayMessage(dsAddr_lockedMsg); // "It's Locked!"
1150 		break;
1151 
1152 	case 0x4ca5:
1153 		displayMessage(dsAddr_chickenNeverMsg); // "Chickening? Me? Never!"
1154 		break;
1155 
1156 	case 0x4cac:
1157 		if (CHECK_FLAG(dsAddr_ShownPassToGuardFlag, 1)) { // papers are shown
1158 			loadScene(5, 124, 199);
1159 		} else {
1160 			dialog->show(144, scene, 0, 809, textColorMark, textColorCampGuard, 0, 1);
1161 			moveTo(269, 175, 4);
1162 			dialog->pop(scene, dsAddr_dialogStackCampGuardShowPass, 0, 809, textColorMark, textColorCampGuard, 0, 1);
1163 		}
1164 		break;
1165 
1166 	case 0x4cf1: // talking with mansion guard
1167 		SET_FLAG(dsAddr_spokenWithMansionGuardFlag, 1);
1168 		if (dialog->pop(scene, dsAddr_dialogStackPleadingToMansionGuard, 0, 529, textColorMark, textColorMansionGuard, 0, 1) == 0x01b4) { // 2nd try
1169 			Common::Point p = scene->getPosition();
1170 			moveTo(189, 159, 0);
1171 			//waitLanAnimationFrame(1, 1);
1172 
1173 			playSound(5, 2);
1174 			playSound(5, 19);
1175 			playActorAnimation(550, true);
1176 			playAnimation(551, 0, true);
1177 			waitAnimation();
1178 
1179 			moveTo(p, 2);
1180 			inventory->add(kInvItemChocCandy);
1181 			dialog->pop(scene, dsAddr_dialogStackPleadingToMansionGuard, 0, 529, textColorMark, textColorMansionGuard, 0, 1);
1182 		}
1183 		break;
1184 
1185 	case 0x4d94: // talking with fatso
1186 		dialog->show(87, scene, 0, 666, textColorMark, textColorJohnNoty, 0, 2);
1187 		displayAsyncMessage(dsAddr_BribeMsg, 120, 109, 1, 10, textColorJohnNoty); // FIXME: Original (x,y) was (100, 78), rather than (120, 109)?
1188 		playSound(5, 3);
1189 		playAnimation(667, 1);
1190 		playAnimation(668, 1);
1191 		setOns(2, 50);
1192 		dialog->show(88, scene, 0, 666, textColorMark, textColorJohnNoty, 0, 2);
1193 		setOns(3, 0);
1194 		setFlag(dsAddr_johnNotyOutsideMansionDoorFlag, 0);
1195 		reloadLan();
1196 		playSound(82, 19);
1197 		playAnimation(669, 1);
1198 		dialog->showMark(89, scene);
1199 		enableObject(15);
1200 		disableObject(8);
1201 		break;
1202 
1203 	case 0x4e61:
1204 		loadScene(14, 280, 198);
1205 		break;
1206 
1207 	case 0x4ee5:
1208 		setOns(2, 0);
1209 		playSound(5, 12);
1210 		playActorAnimation(676);
1211 		displayMessage(dsAddr_WimpMsg); // "I'm a pathetic little wimp"
1212 		disableObject(15);
1213 		inventory->add(kInvItemBanknote);
1214 		break;
1215 
1216 	case 0x4d56:
1217 		inventory->add(kInvItemWhisky);
1218 		disableObject(2);
1219 		setOns(0, 0);
1220 		playSound(5, 12);
1221 		playActorAnimation(547);
1222 		break;
1223 
1224 	case 0x4d85:
1225 		rejectMessage();
1226 		break;
1227 
1228 	case 0x4eb9: // Pick up wrapper
1229 		playSound(5, 12);
1230 		playSound(5, 18);
1231 		inventory->add(kInvItemWrapper);
1232 		setOns(1, 0);
1233 		playActorAnimation(549);
1234 		disableObject(13);
1235 		break;
1236 
1237 	case 0x4ee1:
1238 		rejectMessage();
1239 		break;
1240 
1241 	case 0x4f25:
1242 		playActorAnimation(967);
1243 		displayMessage(dsAddr_tooHardWoodMsg); // "This wood is too hard to break"
1244 		break;
1245 
1246 	case 0x4f32: // use tree near the mansion
1247 		if (CHECK_FLAG(dsAddr_mansionTreeHollowEmptyFlag, 1)) {
1248 			if (CHECK_FLAG(dsAddr_climbedMansionTreeAlreadyFlag, 1)) {
1249 				displayMessage(dsAddr_noChanceMsg); // "I won't take my chances a second time"
1250 			} else {
1251 				playSound(26, 13);
1252 				playSound(26, 15);
1253 				playSound(26, 23);
1254 				playSound(26, 25);
1255 				playSound(26, 32);
1256 				playSound(26, 34);
1257 				playSound(26, 36);
1258 				playActorAnimation(590);
1259 				moveTo(204, 178, 3, true);
1260 				playSound(59, 1);
1261 				playSound(60, 16);
1262 				playActorAnimation(591);
1263 				wait(50);
1264 				displayMessage(dsAddr_oneSmallStepMsg); // "One small step for man, one big pain in the head"
1265 				SET_FLAG(dsAddr_climbedMansionTreeAlreadyFlag, 1);
1266 				fnMansionIntrusionAttempt();
1267 			}
1268 		} else {
1269 			playActorAnimation(49);
1270 			playSound(56, 8);
1271 			playSound(56, 12);
1272 			playSound(49, 10);
1273 			displayAsyncMessage(dsAddr_laughterMsg, 219, 98, 16, 24); // "(laughter)"
1274 			playActorAnimation(587);
1275 			moveRel(0, 0, 2);
1276 			wait(100);
1277 			displayMessage(dsAddr_tickledMsg); // "Something tickled me!"
1278 		}
1279 		break;
1280 
1281 	case 0x500d: // picking up wild plant
1282 		if (CHECK_FLAG(dsAddr_gotPotatoAlreadyFlag, 1)) {
1283 			displayMessage(dsAddr_noPotatoMsg); // "There are no more potatoes"
1284 		} else {
1285 			SET_FLAG(dsAddr_gotPotatoAlreadyFlag, 1);
1286 			setOns(2, 0);
1287 			playSound(21, 9);
1288 			playSound(34, 21);
1289 			playSound(26, 30);
1290 			playActorAnimation(552);
1291 			setOns(2, 0x12);
1292 			inventory->add(kInvItemPotato);
1293 		}
1294 		break;
1295 
1296 	case 0x505f:
1297 		displayMessage(dsAddr_wallTooSmoothMsg); // "The wall surface is too smooth to climb"
1298 		break;
1299 
1300 	case 0x5066:
1301 		loadScene(11, Common::Point(183, 109));
1302 		scene->setOrientation(3);
1303 		break;
1304 
1305 	case 0x5080:
1306 		loadScene(13, Common::Point(290, 181));
1307 		scene->setOrientation(4);
1308 		break;
1309 
1310 	case 0x50f6:
1311 		displayMessage(dsAddr_tooMuchResinToClimbMsg); // "I could climb it if there wasn't so much resin"
1312 		break;
1313 
1314 	case 0x50fd:
1315 		displayMessage(dsAddr_onlyGreenRectMsg); // "The only green stuff that I like is that rectangular piece of paper with..."
1316 		break;
1317 
1318 	case 0x5104:
1319 		loadScene(11, 319, 198, 4);
1320 		if (!CHECK_FLAG(dsAddr_scaredGuardAlreadyFlag, 1)) {
1321 			// guard is drinking
1322 			SET_FLAG(dsAddr_timedCallbackState, 3);
1323 			setTimerCallback(csAddr_guardScareTimeout, 40);
1324 			playAnimation(544, 0, true, true); // ignore busy flag for this animation
1325 		}
1326 		break;
1327 
1328 	case csAddr_guardScareTimeout: // too late to scare guard, resetting
1329 		SET_FLAG(dsAddr_timedCallbackState, 0);
1330 		break;
1331 
1332 	case csAddr_guardDrinking:
1333 		fnGuardDrinking();
1334 		break;
1335 
1336 	case 0x51c8:
1337 		displayMessage(dsAddr_wallTooSmoothMsg); // "The wall surface is too smooth to climb"
1338 		break;
1339 
1340 	case 0x51cf:
1341 		loadScene(12, Common::Point(15, 189));
1342 		scene->setOrientation(2);
1343 		break;
1344 
1345 	case 0x51e9:
1346 		displayMessage(dsAddr_dontWannaTouchHedgehogMsg); // "I don't wanna touch it. Its spines could hurt my delicate hands"
1347 		break;
1348 
1349 	case 0x51f0:
1350 		setOns(0, 0);
1351 		playSound(5, 11);
1352 		playActorAnimation(637);
1353 		disableObject(7);
1354 		inventory->add(kInvItemRock);
1355 		break;
1356 
1357 	case 0x5217:
1358 		if (CHECK_FLAG(dsAddr_beesGoneFlag, 1))
1359 			displayMessage(dsAddr_notHungryMsg); // "Thanks, I'm not hungry"
1360 		else
1361 			displayMessage(dsAddr_avoidBeesMsg); // "I'm going to stay at least five meters away from these bees!"
1362 		break;
1363 
1364 	case 0x522c:
1365 		displayMessage(dsAddr_avoidBeesMsg); // "I'm going to stay at least five meters away from these bees!"
1366 		break;
1367 
1368 	case 0x5233:
1369 		rejectMessage();
1370 		break;
1371 
1372 	case 0x5237:
1373 		if (!CHECK_FLAG(dsAddr_beesGoneFlag, 1)) {
1374 			displayMessage(dsAddr_avoidBeesMsg); // "I'm going to stay at least five meters away from these bees!"
1375 		} else if (CHECK_FLAG(dsAddr_mansionTunnelDoneFlag, 1))
1376 			displayMessage(dsAddr_roadNowhereMsg); // "Nah. It's a road to nowhere"
1377 		else {
1378 			moveTo(173, 138, 2);
1379 			playSound(28, 5);
1380 			playActorAnimation(583);
1381 			playActorAnimation(584);
1382 
1383 			loadScene(0, 0, 0, 0); // clear background
1384 
1385 			playSound(72, 18);
1386 			playSound(73, 39);
1387 			playActorAnimation(585);
1388 
1389 			loadScene(11, 194, 160, 2);
1390 			playSound(28, 2);
1391 			playActorAnimation(586);
1392 			moveTo(138, 163, 3);
1393 			displayMessage(dsAddr_lifeBrutalMsg); // "Life is really brutal"
1394 			SET_FLAG(dsAddr_mansionTunnelDoneFlag, 1);
1395 			fnMansionIntrusionAttempt();
1396 		}
1397 		break;
1398 
1399 	case 0x5320:
1400 		loadScene(11, Common::Point(30, 124));
1401 		scene->setOrientation(2);
1402 		break;
1403 
1404 	case 0x533a:
1405 		displayMessage(dsAddr_noLongHandsMsg); // "I really don't have such long hands"
1406 		break;
1407 
1408 	case 0x5341:
1409 		displayMessage(dsAddr_tooFarToSwimMsg); // "It's too far to swim there"
1410 		break;
1411 
1412 	case 0x5403:
1413 		displayMessage(dsAddr_noBucketMsg); // "It's not a barrel-organ. And there's no bucket."
1414 		break;
1415 
1416 	case 0x540a:
1417 		loadScene(20, Common::Point(10, 185));
1418 		scene->setOrientation(2);
1419 		break;
1420 
1421 	case 0x5424:
1422 		loadScene(11, Common::Point(30, 170));
1423 		scene->setOrientation(2);
1424 		break;
1425 
1426 	case 0x543e:
1427 		loadScene(18, Common::Point(224, 199));
1428 		scene->setOrientation(4);
1429 		break;
1430 
1431 	case 0x5547:
1432 		loadScene(15, Common::Point(15, 172));
1433 		scene->setOrientation(2);
1434 		break;
1435 
1436 	case 0x55a8:
1437 		{
1438 			uint16 d = dialog->popMark(scene, dsAddr_dialogStackSquirrel);
1439 			if (d == 0x2c5d) { // 4th try - Throw Nut
1440 				waitLanAnimationFrame(1, 0x23);
1441 				setOns(0, 0);
1442 				playSound(52, 9);
1443 				playSound(52, 11);
1444 				playSound(52, 13);
1445 				playSound(53, 32);
1446 				playAnimation(570, 0);
1447 				wait(50);
1448 				displayMessage(dsAddr_ThanksMsg); // "Thanks."
1449 				disableObject(5);
1450 				SET_FLAG(dsAddr_squirrelNutState, 1);
1451 			} else if (d != 0x2c9b) { // 5th (last) try
1452 				waitLanAnimationFrame(1, 0x23);
1453 				playSound(52, 9);
1454 				playSound(52, 11);
1455 				playSound(52, 13);
1456 				playAnimation(569, 0);
1457 			}
1458 		}
1459 		break;
1460 
1461 	case 0x5663:
1462 		if (CHECK_FLAG(dsAddr_squirrelNutState, 1))
1463 			displayMessage(dsAddr_findNutMsg); // "I won't find the nut just like that. The grass is too dense"
1464 		else
1465 			displayMessage(dsAddr_hmmGrassMsg); // "Hmmm. Grass..."
1466 		break;
1467 
1468 	case 0x5674:
1469 		loadScene(18, Common::Point(94, 115));
1470 		scene->setOrientation(3);
1471 		break;
1472 
1473 	case 0x568e:
1474 		displayMessage(dsAddr_notHornyMsg); // "I'm not horny"
1475 		break;
1476 
1477 	case 0x5695:
1478 		displayMessage(dsAddr_dontNeedToOpenMsg); // "I don't need to open it"
1479 		break;
1480 
1481 	case 0x569c:
1482 		playSound(67, 5);
1483 		playActorAnimation(983);
1484 		displayMessage(dsAddr_emptyMsg); // "It's Empty"
1485 		break;
1486 
1487 	case 0x56b3:
1488 		rejectMessage();
1489 		break;
1490 
1491 	case 0x56b7:
1492 		playSound(66, 5);
1493 		playSound(67, 11);
1494 		playActorAnimation(984);
1495 		displayMessage(dsAddr_emptyMsg); // "It's Empty"
1496 		break;
1497 
1498 	case 0x56d6:
1499 		displayMessage(dsAddr_CantJumpMsg); // "No way I can jump so high, cause, err, white men can't jump"
1500 		break;
1501 
1502 	case 0x56dd:
1503 		displayMessage(dsAddr_dontNeedItMsg); // "I don't need it"
1504 		break;
1505 
1506 	case 0x56e4:
1507 		displayMessage(dsAddr_notSantaClausMsg); // "I'm not Santa Claus"
1508 		break;
1509 
1510 	case 0x56eb:
1511 		displayMessage(dsAddr_noPlasticImitationsMsg); // "I don't need plastic imitations"
1512 		break;
1513 
1514 	case 0x56f2:
1515 		rejectMessage();
1516 		break;
1517 
1518 	case 0x5721:
1519 		displayMessage(dsAddr_dontNeedItMsg); // "I don't need it"
1520 		break;
1521 
1522 	case 0x5728:
1523 		inventory->add(kInvItemChainsaw);
1524 		disableObject(14);
1525 		setOns(0, 0);
1526 		playSound(5, 10);
1527 		playActorAnimation(566);
1528 		break;
1529 
1530 	case 0x574f:
1531 		displayMessage(dsAddr_tooFragileMsg); // "It's too fragile to carry around"
1532 		break;
1533 
1534 	case 0x5793:
1535 		if (!CHECK_FLAG(dsAddr_alreadyPulledTrunkReleaseLeverFlag, 1)) {
1536 			displayMessage(dsAddr_shutTightMsg); // "It's shut tight"
1537 		} else if (CHECK_FLAG(dsAddr_carTrunkEmptyFlag, 1)) {
1538 			displayMessage(dsAddr_bootEmptyMsg); // "There's nothing else in the boot"
1539 		} else {
1540 			SET_FLAG(dsAddr_carTrunkEmptyFlag, 1);
1541 			moveTo(188, 179, 0);
1542 			playSound(7, 16);
1543 			playActorAnimation(519);
1544 			wait(150);
1545 			moveTo(168, 179, 2);
1546 			inventory->add(kInvItemToolboxFull);
1547 		}
1548 		break;
1549 
1550 	case 0x57fa:
1551 		displayMessage(dsAddr_dontNeedItMsg); // "I don't need it"
1552 		break;
1553 
1554 	case 0x5801:
1555 		rejectMessage();
1556 		break;
1557 
1558 	case 0x583f:
1559 	case 0x5846:
1560 		displayMessage(dsAddr_dontNeedToOpenMsg);
1561 		break;
1562 
1563 	case 0x584d:
1564 		displayMessage(dsAddr_pullObjMsg2);
1565 		break;
1566 
1567 	case 0x5854:
1568 		loadScene(15, Common::Point(157, 199));
1569 		scene->setOrientation(1);
1570 		break;
1571 
1572 	case 0x586e:
1573 		loadScene(21, Common::Point(24, 187));
1574 		scene->setOrientation(2);
1575 		break;
1576 
1577 	case 0x5888:
1578 		loadScene(27, Common::Point(108, 199));
1579 		scene->setOrientation(2);
1580 		break;
1581 
1582 	case 0x5903:
1583 		displayMessage(dsAddr_keepItOpenMsg); // "I'd like to keep it open"
1584 		break;
1585 
1586 	case 0x590a:
1587 		loadScene(20, Common::Point(304, 190));
1588 		scene->setOrientation(4);
1589 		break;
1590 
1591 	case 0x5924:
1592 		loadScene(25, Common::Point(298, 146));
1593 		scene->setOrientation(4);
1594 		break;
1595 
1596 	case 0x5978:
1597 		displayMessage(dsAddr_notTakingSocksMsg); // "I really don't want to walk around with someone else's socks"
1598 		break;
1599 
1600 	case 0x597f:
1601 	case 0x5986:
1602 	case 0x598d:
1603 		displayMessage(dsAddr_dontNeedToOpenMsg); // "I don't need to open it"
1604 		break;
1605 
1606 	case 0x5b44:
1607 		// FIXME - This is the doorbell use callback on House #2
1608 		// i.e. Granny and Anne's House. Need to analyse cseg data properly.
1609 		// Current code inferred from behaviour.
1610 		// FIXME - Add animation call for Ego pushing doorbell.
1611 		displayMessage(dsAddr_ItsOpenMsg);
1612 		break;
1613 
1614 	case 0x5c72:
1615 		displayMessage(dsAddr_notTiredMsg); // "Thanks, I'm not tired"
1616 		break;
1617 
1618 	case 0x5c79:
1619 		displayMessage(dsAddr_dontNeedToOpenMsg); // "I don't need to open it"
1620 		break;
1621 
1622 	case 0x5c80:
1623 		rejectMessage();
1624 		break;
1625 
1626 	case 0x5cdb:
1627 	case 0x5ce2:
1628 		displayMessage(dsAddr_dontNeedItMsg); // "I don't need it"
1629 		break;
1630 
1631 	case 0x5ce9:
1632 		displayMessage(dsAddr_tooBigMsg); // "It's too big and I doubt if I'll ever need it"
1633 		break;
1634 
1635 	case 0x5d1d:
1636 		displayMessage(dsAddr_CantJumpMsg); // "No way I can jump so high, cause, err, white men can't jump"
1637 		break;
1638 
1639 	case 0x5d88:
1640 		if (CHECK_FLAG(dsAddr_laundryState, 1)) { // dry laundry
1641 			SET_FLAG(dsAddr_laundryState, 2);
1642 			dialog->show(46, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
1643 			//waitLanAnimationFrame(1, 1); // another long waiting
1644 			playAnimation(604, 0);
1645 
1646 			loadScene(21, scene->getPosition());
1647 			setOns(0, 0);
1648 			disableObject(4);
1649 			enableObject(12);
1650 			playSound(46, 5);
1651 			playAnimation(606, 1);
1652 			setOns(0, 33);
1653 			loadScene(23, scene->getPosition());
1654 			playAnimation(605, 0);
1655 			dialog->show(47, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
1656 		} else {
1657 			uint16 d = dialog->pop(scene, dsAddr_dialogStackAskOldLadyOK, 0, 523, textColorMark, textColorOldLady, 0, 1);
1658 			if (d == 0x1913) { // 3rd time
1659 				wait(100);
1660 				moveRel(0, 0, 3);
1661 				wait(50);
1662 				displayMessage(dsAddr_giveUpMsg); // "I give up"
1663 				wait(50);
1664 			}
1665 		}
1666 		break;
1667 
1668 	case 0x5f9a:
1669 	case 0x5fa1:
1670 		displayMessage(dsAddr_dontNeedToOpenMsg); // "I don't need to open it"
1671 		break;
1672 
1673 	case 0x5fa8:
1674 		displayMessage(dsAddr_CantJumpMsg); // "No way I can jump so high, cause, err, white men can't jump"
1675 		break;
1676 
1677 	case 0x5faf:
1678 		displayMessage(dsAddr_noSecretPassageMsg); // "I don't think there's any secret passage inside"
1679 		break;
1680 
1681 	case 0x5fe5:
1682 		displayMessage(dsAddr_jugMeMsg); // "They can jug me if I steal this"
1683 		break;
1684 
1685 	case 0x5fec:
1686 		displayMessage(dsAddr_leaveFlowersAloneMsg); // "I'd better leave it. Women are really oversensitive about flowers."
1687 		break;
1688 
1689 	case 0x5ff3: // get duster
1690 		if (CHECK_FLAG(dsAddr_givenFlowerToOldLadyAlreadyFlag, 0)) {
1691 			dialog->pop(scene, dsAddr_dialogStackBorrowDusterFromOldLady, 0, 523, textColorMark, textColorOldLady, 0, 1);
1692 		} else {
1693 			dialog->show(43, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
1694 			wait(50);
1695 			inventory->add(kInvItemFeatherDusterClean);
1696 			disableObject(12);
1697 			setOns(0, 0);
1698 			playSound(5, 6);
1699 			playActorAnimation(541);
1700 		}
1701 		break;
1702 
1703 	case 0x603a:
1704 		rejectMessage();
1705 		break;
1706 
1707 	case 0x603e:
1708 		if (CHECK_FLAG(dsAddr_spokenToMirrorFlag, 1)) {
1709 			displayMessage(dsAddr_busyThinkingMsg); // "I'd better not interrupt it's thought process"
1710 		} else {
1711 			displayMessage(dsAddr_mirrorMirrorMsg); // "Mirror, Mirror on the wall...."
1712 			wait(150);
1713 			displayMessage(dsAddr_thinkTooLongMsg); // "Hey, don't think too long"
1714 			wait(150);
1715 			displayMessage(dsAddr_HintMaleMsg); // "A hint: Someone in this room, a male"
1716 			wait(150);
1717 			displayMessage(dsAddr_okWaitMsg); // "OK, take your time"
1718 			wait(150);
1719 			SET_FLAG(dsAddr_spokenToMirrorFlag, 1);
1720 		}
1721 		break;
1722 
1723 	case 0x6074:
1724 		rejectMessage();
1725 		break;
1726 
1727 	case 0x6078:
1728 		displayMessage(dsAddr_tooBigMsg); // "It's too big and I doubt if I'll ever need it"
1729 		break;
1730 
1731 	case 0x6205:
1732 		if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
1733 			displayMessage(dsAddr_tooHeavyMsg); // "It's too heavy. Not that I'm wimp"
1734 		else
1735 			fnTooDark();
1736 		break;
1737 
1738 	case 0x6217:
1739 		if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
1740 			displayMessage(dsAddr_noDentistsMsg); // "I don't want to have anything in common with dentists"
1741 		else
1742 			fnTooDark();
1743 		break;
1744 
1745 	case 0x62c1:
1746 		if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
1747 			retVal = false;
1748 		else
1749 			fnTooDark();
1750 		break;
1751 
1752 	case 0x634a:
1753 		displayMessage(dsAddr_noHandsSharpThornsMsg); // "I can't remove it with my hands. these thorns look really sharp"
1754 		break;
1755 
1756 	case 0x637f:
1757 		loadScene(21, Common::Point(201, 199));
1758 		scene->setOrientation(1);
1759 		break;
1760 
1761 	case 0x6399:
1762 		displayMessage(dsAddr_rockWalkingGeeMsg); // "Yeah, great idea. Let's take this rock and walk around a bit. Gee..."
1763 		break;
1764 
1765 	case 0x63a0:
1766 	case 0x63a7:
1767 		displayMessage(dsAddr_butterflyMsg); // "I'd better leave them alone, they make this place beautiful"
1768 		break;
1769 
1770 	case 0x63ae:
1771 		displayMessage(dsAddr_notSureIfAliveMsg); // "I'm not sure if it's alive"
1772 		break;
1773 
1774 	case 0x63bc:
1775 		playMusic(6);
1776 		loadScene(25, 151, 156, 2);
1777 		break;
1778 
1779 	case 0x63dc:
1780 		dialog->showMono(86, scene, 0, textColorMark, 0);
1781 		break;
1782 
1783 	case 0x63e3:
1784 		displayMessage(dsAddr_holeTooNarrowMsg); // "The hole is too narrow to fit my hand"
1785 		break;
1786 
1787 	case 0x646e:
1788 	case 0x6475:
1789 		dialog->showMono(85, scene, 0, textColorMark, 0);
1790 		break;
1791 
1792 	case 0x6479:
1793 		dialog->showMono(84, scene, 0, textColorMark, 0);
1794 		break;
1795 
1796 	case 0x6507:
1797 		if (CHECK_FLAG(dsAddr_birdsGoneFromScarecrowFlag, 1))
1798 			rejectMessage();
1799 		else
1800 			displayMessage(dsAddr_birdAttackMsg); // "Hey You! Wake up! Bird attack!"
1801 		break;
1802 
1803 	case 0x6541:
1804 		loadScene(20, Common::Point(10, 131));
1805 		scene->setOrientation(3);
1806 		break;
1807 
1808 	case 0x6635:
1809 		displayMessage(dsAddr_uninterestingHaystackMsg); // "I don't see anything interesting about this haystack"
1810 		break;
1811 
1812 	case 0x6663:
1813 		displayMessage(dsAddr_uninterestingHaystackMsg); // "I don't see anything interesting about this haystack"
1814 		break;
1815 
1816 	case 0x666a:
1817 		displayMessage(dsAddr_moreComplicatedMsg); // "It's more complicated than that"
1818 		break;
1819 
1820 	case 0x65c3:
1821 		if (CHECK_FLAG(dsAddr_mouseHoleState, 1)) {
1822 			playActorAnimation(635);
1823 			setOns(5, 0);
1824 			playSound(63, 11);
1825 			playSound(15, 20);
1826 			playSound(32, 31);
1827 			playActorAnimation(636);
1828 			inventory->add(kInvItemHandkerchief);
1829 			inventory->add(kInvItemMouse);
1830 			moveTo(scene->getPosition().x - 1, 139, 1, true);
1831 			displayMessage(dsAddr_yikesMsg); // "Yikes!"
1832 			SET_FLAG(dsAddr_mouseHoleState, 2);
1833 			SET_FLAG(dsAddr_HankerchiefInMouseholeFlag, 0);
1834 		} else
1835 			displayMessage(dsAddr_noSearchWarrantMsg); // "I don't have a search-warrant"
1836 		break;
1837 
1838 	case 0x6671:
1839 		displayMessage(dsAddr_cantOpenItMsg); // "I can't open it"
1840 		break;
1841 
1842 	case 0x6678:
1843 		rejectMessage();
1844 		break;
1845 
1846 	case 0x670f:
1847 		displayMessage(dsAddr_dontNeedThemMsg); // "I don't need them"
1848 		break;
1849 
1850 	case 0x6716:
1851 		displayMessage(dsAddr_pullObjMsg2); // "I can't reach it"
1852 		break;
1853 
1854 	case 0x6772:
1855 		loadScene(31, Common::Point(20, 188));
1856 		scene->setOrientation(2);
1857 		break;
1858 
1859 	case 0x678c:
1860 		loadScene(28, Common::Point(189, 153));
1861 		scene->setOrientation(4);
1862 		break;
1863 
1864 	case 0x67fa:
1865 		rejectMessage();
1866 		break;
1867 
1868 	case 0x67fe:
1869 		displayMessage(dsAddr_troubleWithStairsMsg); // "If I put it on I might have trouble walking up the stairs"
1870 		break;
1871 
1872 	case 0x6911:
1873 		displayMessage(dsAddr_9LivesToReadMsg); // "I'd need 9 lives to read them all"
1874 		break;
1875 
1876 	case 0x6954:
1877 		displayMessage(dsAddr_thanksNotTiredMsg); // "Thanks, I'm not so tired"
1878 		break;
1879 
1880 	case 0x695b:
1881 		displayMessage(dsAddr_noNeedToTurnOnMsg); // "There's no need to turn it on"
1882 		break;
1883 
1884 	case 0x6ba6:
1885 		displayMessage(dsAddr_wontBearWeightMsg); // "It won't bear my weight"
1886 		break;
1887 
1888 	case 0x6bda:
1889 		displayMessage(dsAddr_peepingTomMsg); // "What am I? A Peeping Tom?"
1890 		break;
1891 
1892 	case 0x6c1c:
1893 	case 0x6c20:
1894 		rejectMessage();
1895 		break;
1896 
1897 	case 0x6c24:
1898 		displayMessage(dsAddr_dontNeedThemMsg); // "I don't need them"
1899 		break;
1900 
1901 	case 0x6c2b:
1902 		loadScene(29, Common::Point(300, 188));
1903 		scene->setOrientation(4);
1904 		break;
1905 
1906 	case 0x6c7c:
1907 		displayMessage(dsAddr_bigPocketsMsg); // "I have big pockets, but there are limits"
1908 		break;
1909 
1910 	case 0x724e:
1911 		displayMessage(dsAddr_soSharpMsg); // "They're so sharp they'd rip my trousers!"
1912 		break;
1913 
1914 	case 0x72be:
1915 		rejectMessage();
1916 		break;
1917 
1918 	case 0x7305:
1919 		rejectMessage();
1920 		break;
1921 
1922 	case 0x7328:
1923 		displayMessage(dsAddr_noTimeForPleasuresMsg); // "I don't have time for pleasures"
1924 		break;
1925 
1926 	case 0x732f:
1927 		displayMessage(dsAddr_notSocksWithBareHandsMsg); // "I won't touch these socks with my bare hands!"
1928 		break;
1929 
1930 	case 0x739c:
1931 		displayMessage(dsAddr_notHalloweenMsg); // "It's not Halloween"
1932 		break;
1933 
1934 	case 0x7401:
1935 		displayMessage(dsAddr_NotManualMsg); // "It can't be controlled manually! I hate it!"
1936 		break;
1937 
1938 	case 0x746f:
1939 		displayMessage(dsAddr_nothingToPlayMsg); // "I have nothing to play"
1940 		break;
1941 
1942 	case 0x74b3:
1943 		loadScene(29, Common::Point(256, 171));
1944 		scene->setOrientation(3);
1945 		break;
1946 
1947 	case 0x74cd:
1948 		rejectMessage();
1949 		break;
1950 
1951 	case 0x74f9:
1952 		loadScene(38, Common::Point(160, 199));
1953 		scene->setOrientation(1);
1954 		break;
1955 
1956 	case 0x784a:
1957 		displayMessage(dsAddr_notMineMsg); // "I can't take it. It's not mine."
1958 		break;
1959 
1960 	case 0x7851:
1961 		displayMessage(dsAddr_lockedMsg); // "It's Locked!"
1962 		break;
1963 
1964 	case 0x7858:
1965 		displayMessage(dsAddr_lockedMsg); // "It's Locked!"
1966 		break;
1967 
1968 	case 0x785f:
1969 		displayMessage(dsAddr_pullObjMsg2); // "I can't reach it"
1970 		break;
1971 
1972 	case 0x7866:
1973 		if (CHECK_FLAG(dsAddr_JailCableAndBowlState, 3))
1974 			displayMessage(dsAddr_gotchaMsg); // "Gotcha"
1975 		else
1976 			retVal = false;
1977 		break;
1978 
1979 	case 0x7878:
1980 		{
1981 			byte v = res->dseg.get_byte(dsAddr_graffitiMsgId) + 1;
1982 			if (v <= 6)
1983 				SET_FLAG(dsAddr_graffitiMsgId, v);
1984 
1985 			switch (v) {
1986 			case 1:
1987 				displayMessage(dsAddr_SavingFineMsg); // "Saving is a very fine thing..."
1988 				break;
1989 			case 2:
1990 				displayMessage(dsAddr_loveCaptainMsg); // "I love captain"
1991 				break;
1992 			case 3:
1993 				displayMessage(dsAddr_soccerRulzMsg); // "Soccer rulz"
1994 				break;
1995 			case 4:
1996 				displayMessage(dsAddr_treeCutMsg); // "Don't cut the trees..."
1997 				break;
1998 			case 5:
1999 				displayMessage(dsAddr_visaAcceptedMsg); // "VISA Accepted"
2000 				break;
2001 			default:
2002 				displayMessage(dsAddr_otherGraffitiMsg); // "The rest of graffiti is obscene"
2003 				break;
2004 			}
2005 		}
2006 		break;
2007 
2008 	case 0x78a9:
2009 		if (CHECK_FLAG(dsAddr_captainDrawerState, 1))
2010 			displayMessage(dsAddr_nowOpenMsg); // "Now it's open"
2011 		else
2012 			retVal = false;
2013 		break;
2014 
2015 	case 0x78bb:
2016 		if (CHECK_FLAG(dsAddr_swappedBarmanMugFlag, 1))
2017 			displayMessage(dsAddr_yuckMsg); // "Yuck!"
2018 		else
2019 			retVal = false;
2020 		break;
2021 
2022 	case 0x78ce:
2023 		if (!CHECK_FLAG(dsAddr_mansionTreeHollowEmptyFlag, 1))
2024 			displayMessage(dsAddr_monstersMsg); // "Who knows what monsters live in there"
2025 		else
2026 			retVal = false;
2027 		break;
2028 
2029 	case 0x792b: // left click on ann
2030 		moveTo(245, 198, 1);
2031 		if (!CHECK_FLAG(dsAddr_alreadySaidAnneBeautifulFlag, 1)) {
2032 			dialog->showMono(50, scene, 0, textColorMark, 0);
2033 			SET_FLAG(dsAddr_alreadySaidAnneBeautifulFlag, 1);
2034 		} else
2035 			retVal = false;
2036 		break;
2037 
2038 	case 0x79c3:
2039 		if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
2040 			retVal = false;
2041 		else
2042 			fnTooDark();
2043 		break;
2044 
2045 	case 0x7b26: // cutting the fence
2046 		setOns(0, 0);
2047 		playSound(5, 2);
2048 		playSound(51, 11);
2049 		playSound(51, 23);
2050 		playActorAnimation(837);
2051 		playSound(51, 3);
2052 		playSound(51, 19);
2053 		playSound(23, 26);
2054 		playActorAnimation(838);
2055 		setOns(0, 0x60);
2056 		moveTo(281, scene->getPosition().y, 0, true);
2057 		disableObject(4);
2058 		SET_FLAG(dsAddr_cutFenceFlag, 1);
2059 		break;
2060 
2061 	case 0x7b89: // digging mysterious object
2062 		if (CHECK_FLAG(dsAddr_cutFenceFlag, 1)) {
2063 			playActorAnimation(844);
2064 			setOns(1, 0);
2065 			playSound(5, 5);
2066 			playSound(26, 19);
2067 			playSound(24, 25);
2068 			playActorAnimation(847);
2069 			playSound(5, 11);
2070 			playActorAnimation(848);
2071 			setOns(1, 0x64);
2072 			playActorAnimation(845);
2073 			disableObject(3);
2074 			inventory->add(kInvItemKaleidoscope);
2075 			inventory->remove(kInvItemShovelAct1);
2076 		} else
2077 			displayMessage(dsAddr_fenceBlocksMsg); // "The fence blocks the way"
2078 		break;
2079 
2080 	case 0x7bf6:
2081 		displayMessage(dsAddr_noDiggingKnifeMsg); // "Digging it out with the knife could take a hundred years"
2082 		break;
2083 
2084 	case 0x7bfd:
2085 		playSound(76, 18);
2086 		playSound(76, 22);
2087 		playSound(76, 26);
2088 		playSound(76, 30);
2089 		playSound(76, 34);
2090 		playSound(76, 47);
2091 		playSound(76, 51);
2092 		playSound(76, 55);
2093 		playSound(76, 59);
2094 		playSound(76, 63);
2095 		playActorAnimation(873);
2096 		moveTo(240, 163, 4);
2097 		displayMessage(dsAddr_cmonBabyMsg); // "C'mon baby, it's all yours!"
2098 		waitLanAnimationFrame(1, 0x22);
2099 		playSound(77, 2);
2100 		playSound(77, 12);
2101 		playSound(77, 16);
2102 		playSound(77, 20);
2103 		playSound(77, 34);
2104 		playSound(78, 41);
2105 		playSound(78, 51);
2106 		playSound(56, 63);
2107 		playSound(24, 67);
2108 		playSound(23, 76);
2109 		setLan(1, 0);
2110 		playAnimation(874, 1);
2111 		setOns(0, 0x68);
2112 		inventory->remove(kInvItemDruggedFood);
2113 		enableObject(6);
2114 		disableObject(1);
2115 		break;
2116 
2117 	case 0x7cc9:
2118 	case 0x7cd0:
2119 		displayMessage(dsAddr_throwCrumbsToBirdQMsg); // "Should I throw the crumbs to the bird?"
2120 		break;
2121 
2122 	case 0x7cd7:
2123 		displayMessage(dsAddr_dontWasteCrumbs); // "I don't want to waste these tasty crumbs"
2124 		break;
2125 
2126 	case 0x7cde:
2127 		displayMessage(dsAddr_mightSlipFallInMsg); // "Better not... I might slip and fall in..."
2128 		break;
2129 
2130 	case 0x7ce5: // put spring on the solid ground
2131 		playSound(5, 2);
2132 		playSound(19, 11);
2133 		playActorAnimation(840);
2134 		setOns(1, 0x61);
2135 		inventory->remove(kInvItemSpring);
2136 		disableObject(2);
2137 		enableObject(7);
2138 		break;
2139 
2140 	case 0x7d1a: // captain's key + door
2141 		if (res->dseg.get_byte(dsAddr_FirstActTrialState) <= 1) {
2142 			playSound(5, 2);
2143 			playSound(57, 12);
2144 			playSound(70, 19);
2145 			playActorAnimation(828);
2146 			moveTo(262, 160, 1, true);
2147 			disableObject(4);
2148 			disableObject(3);
2149 			setOns(0, 0);
2150 			setOns(1, 85);
2151 			setOns(2, 0);
2152 			setOns(3, 0);
2153 			loadScene(5, scene->getPosition());
2154 			setOns(0, 92);
2155 			playAnimation(829, 1, true, true, true);
2156 			wait(200);
2157 			playAnimation(0, 1);
2158 			setOns(0, 0);
2159 			dialog->showMono(156, scene, 830, textColorShockedCaptain, 1);
2160 			loadScene(7, 130, 195, 2);
2161 			playMusic(4);
2162 			setLan(1, 1);
2163 			wait(100);
2164 			dialog->show(157, scene, 0, 832, textColorMark, textColorCaptain, 0, 1);
2165 
2166 			//playAnimation(831, 1);
2167 
2168 			SET_FLAG(dsAddr_FirstActTrialState, 2);
2169 		} else
2170 			displayMessage(dsAddr_nahMsg); // "Nah"
2171 		break;
2172 
2173 	case 0x7e02: // tickling the captain
2174 		if (CHECK_FLAG(dsAddr_AlreadyTickledCaptainFlag, 1)) {
2175 			displayMessage(dsAddr_doesNotWorkMsg); // "That doesn't work"
2176 		} else {
2177 			playSound(5, 6);
2178 			playSound(27, 49);
2179 			playActorAnimation(834, true);
2180 			playAnimation(835, 1, true);
2181 			waitAnimation();
2182 
2183 			setOns(0, 94);
2184 			dialog->show(161, scene, 0, 832, textColorMark, textColorCaptain, 0, 1);
2185 			enableObject(12);
2186 			SET_FLAG(dsAddr_AlreadyTickledCaptainFlag, 1);
2187 		}
2188 		break;
2189 
2190 	case 0x7e4f: // giving magazine to captain
2191 		dialog->show(162, scene, 0, 856, textColorMark, textColorCaptain, 0, 1);
2192 		playSound(5, 3);
2193 		playActorAnimation(852, true);
2194 		playActorAnimation(853, true);
2195 		displayMessage(dsAddr_whatAboutMsg); // "What about a new"
2196 		displayMessage(dsAddr_hotOffMsg); // "hot off the press"
2197 		displayMessage(dsAddr_fullColorMsg); // "full-color"
2198 		displayMessage(dsAddr_specialEdMsg); // "special edition"
2199 		displayMessage(dsAddr_soldierNewsMsg); // "of Soldier News?!"
2200 		playAnimation(856, 1);
2201 		playSound(5, 3);
2202 		//playActorAnimation(854);
2203 		dialog->show(163, scene, 0, 856, textColorMark, textColorCaptain, 0, 1);
2204 		playAnimation(855, 1);
2205 		wait(200);
2206 		moveTo(30, 181, 0);
2207 		disableObject(1);
2208 		setLan(1, 0);
2209 		SET_FLAG(dsAddr_FirstActTrialState, 3);
2210 		SET_FLAG(dsAddr_gotPasswordNeedSpeakBarmanFlag, 1);
2211 		loadScene(8, 155, 199);
2212 		break;
2213 
2214 	case 0x7fbd: // using bird & bartender
2215 		playSound(5, 3);
2216 		playActorAnimation(876);
2217 		setOns(1, 0);
2218 		playSound(26, 7);
2219 		playSound(79, 15);
2220 		playAnimation(877, 1);
2221 		playAnimation(880, 1, true);
2222 
2223 		dialog->show(176, scene, 0, 857, textColorMark, textColorBarman, 0, 1);
2224 		setOns(2, 0x6a);
2225 		reloadLan();
2226 		playAnimation(878, 0);
2227 		//playAnimation(879, 0); // background bartender animation
2228 		inventory->remove(kInvItemBird);
2229 		enableObject(1);
2230 		SET_FLAG(dsAddr_birdOnBarRadioAntennaFlag, 1);
2231 		break;
2232 
2233 	case 0x8047:
2234 		playSound(32, 5);
2235 		playSound(5, 17);
2236 		playSound(52, 23);
2237 		playActorAnimation(881);
2238 		setOns(2, 0x6b);
2239 		inventory->remove(kInvItemMugOfMud);
2240 		inventory->add(kInvItemMug);
2241 		SET_FLAG(dsAddr_swappedBarmanMugFlag, 1);
2242 		break;
2243 
2244 	case 0x808b:
2245 		if (CHECK_FLAG(dsAddr_ShownPassToGuardFlag, 1)) {
2246 			displayMessage(dsAddr_gotPermissionMsg); // "I already got the permission"
2247 		} else {
2248 			displayMessage(dsAddr_showPapersMsg); // "Here are my papers"
2249 			playSound(5, 2);
2250 			playSound(5, 18);
2251 			playActorAnimation(810);
2252 			dialog->show(147, scene, 0, 809, textColorMark, textColorCampGuard, 0, 1);
2253 			SET_FLAG(dsAddr_ShownPassToGuardFlag, 1);
2254 		}
2255 		break;
2256 
2257 	case 0x80c3: // show kaleidoscope to the guard
2258 		dialog->show(165, scene, 0, 809, textColorMark, textColorCampGuard, 0, 1);
2259 		playSound(5, 3);
2260 		playSound(5, 30);
2261 		playSound(26, 14);
2262 		hideActor();
2263 		playAnimation(849, 0);
2264 		showActor();
2265 		playAnimation(851, 0);
2266 		playAnimation(850, 0);
2267 		reloadLan();
2268 		inventory->add(kInvItemSoldierNews);
2269 		inventory->remove(kInvItemKaleidoscope);
2270 		enableObject(1);
2271 		SET_FLAG(dsAddr_act1GuardState, 1);
2272 		break;
2273 
2274 	case 0x8398:
2275 		displayMessage(dsAddr_trySomewhereElseMsg); // "I'd better try somewhere else - I suppose this side is heavily guarded"
2276 		break;
2277 
2278 	case 0x85dd:
2279 		displayMessage(dsAddr_branchNotPaddleMsg); // "This branch is not a paddle. It doesn't even look like one"
2280 		break;
2281 
2282 	case 0x85e4:
2283 		displayMessage(dsAddr_sharpenNotPulverizeMsg); // "I needed to sharpen it, not pulverize"
2284 		break;
2285 
2286 	case 0x8d42:
2287 		displayMessage(dsAddr_bluntSickleMsg); // "The sickle is too blunt"
2288 		break;
2289 
2290 	case 0x8d49:
2291 		displayMessage(dsAddr_noChainsawFuelMsg); // "There's no fuel in the chainsaw"
2292 		break;
2293 
2294 	case 0x8d50:
2295 		displayMessage(dsAddr_thornsTooThinMsg); // "Thorns are too thin, the chainsaw is useless here"
2296 		break;
2297 
2298 	// Shore
2299 
2300 	case 0x5348:
2301 		if (CHECK_FLAG(dsAddr_alreadyGotBrokenPaddleFlag, 1)) { // got broken paddle from boat
2302 			displayMessage(dsAddr_boatEmptyMsg); // "There's nothing else in the boat"
2303 		} else {
2304 			SET_FLAG(dsAddr_alreadyGotBrokenPaddleFlag, 1);
2305 			playSound(57, 6);
2306 			playActorAnimation(536);
2307 			dialog->showMono(77, scene, 0, textColorMark, 0);
2308 			inventory->add(kInvItemBrokenPaddle);
2309 		}
2310 		break;
2311 
2312 	case 0x53a1:
2313 		if (CHECK_FLAG(dsAddr_spokenToManInWellFlag, 1)) { // spoken to man in well
2314 			displayMessage(dsAddr_stillThereMsg); // "Are you still there?"
2315 		} else {
2316 			displayMessage(dsAddr_echoMsg); // "Echo!"
2317 			displayMessage(dsAddr_loudEchoMsg, textColorWellEcho, 248, 164); // "ECHO!"
2318 			displayMessage(dsAddr_whoThereMsg); // "Who's there?!"
2319 			displayMessage(dsAddr_loudWhoThereMsg, textColorWellEcho, 225, 164); // "WHO'S THERE?!"
2320 			displayMessage(dsAddr_dontCopyMsg); // "DON'T COPY ME!"
2321 			displayMessage(dsAddr_loudDontCopyMsg, textColorWellEcho, 172, 164); // "DON'T COPY ME!!!"
2322 			displayMessage(dsAddr_throwRockMsg); // "OR I WILL THROW A ROCK DOWN THERE!"
2323 			displayMessage(dsAddr_orIWillMsg, textColorWellEcho, 232, 164); // "OR I WILL"
2324 			wait(100);
2325 			displayMessage(dsAddr_loudEchoMsg, textColorWellEcho, 248, 164);
2326 			SET_FLAG(dsAddr_spokenToManInWellFlag, 1);
2327 		}
2328 		break;
2329 
2330 	case 0x5458:
2331 		{
2332 			setOns(2, 0);
2333 			playSound(34, 7);
2334 			playActorAnimation(535);
2335 			inventory->add(kInvItemSecondFlower);
2336 			disableObject(1);
2337 
2338 			byte *scene_15_ons = scene->getOns(15);  // patch ons for the scene 15
2339 			scene_15_ons[0] = 0;
2340 
2341 			byte f = GET_FLAG(dsAddr_flowerIsleState) + 1;
2342 			SET_FLAG(dsAddr_flowerIsleState, f);
2343 			if (f >= 2) {
2344 				// disable object boat for scene 15!!
2345 				disableObject(1, 15);
2346 			}
2347 		}
2348 		break;
2349 
2350 	case 0x54b3:
2351 		{
2352 			setOns(1, 0);
2353 			setOns(3, 0);
2354 			playSound(33, 6);
2355 			playActorAnimation(534);
2356 			inventory->add(kInvItemFirstFlower);
2357 			disableObject(2);
2358 			setOns(1, 10);
2359 			setOns(1, 0, 15);
2360 			byte f = GET_FLAG(dsAddr_flowerIsleState) + 1;
2361 			SET_FLAG(dsAddr_flowerIsleState, f);
2362 			if (f >= 2) {
2363 				// disable object boat for scene 15!!
2364 				disableObject(1, 15);
2365 			}
2366 		}
2367 		break;
2368 
2369 	case 0x5502:
2370 		setOns(0, 0);
2371 		loadScene(15, 115, 180, 1);
2372 		playMusic(6);
2373 		playActorAnimation(568);
2374 		break;
2375 
2376 	case 0x5561: // Enter lakeside house
2377 		fnEgoDefaultPosition();
2378 		loadScene(19, 223, 199, 1);
2379 		break;
2380 
2381 	case 0x55a1:
2382 		fnEgoDefaultPosition();
2383 		rejectMessage();
2384 		break;
2385 
2386 	case csAddr_egoDefaultPosition:
2387 		fnEgoDefaultPosition();
2388 		break;
2389 
2390 	case 0x5634:
2391 		displayMessage(dsAddr_pullObjMsg2); // "I can't reach it"
2392 		break;
2393 
2394 	case 0x563b:
2395 		playSound(5, 10);
2396 		setOns(1, 0);
2397 		playActorAnimation(561);
2398 		inventory->add(kInvItemNut);
2399 		disableObject(6);
2400 		break;
2401 
2402 	case 0x56f6:
2403 		playSound(32, 7);
2404 		setOns(1, 0);
2405 		playActorAnimation(626);
2406 		disableObject(12);
2407 		inventory->add(kInvItemCheese);
2408 		displayMessage(dsAddr_foundFoodMsg); // "People leave food in unbelievable places"
2409 		break;
2410 
2411 	case 0x5756: // Open car door
2412 		playSound(11, 4);
2413 		playActorAnimation(514);
2414 		setOns(4, 8);
2415 		setOns(2, 5);
2416 		enableObject(14);
2417 		enableObject(15);
2418 		enableObject(16);
2419 		disableObject(1);
2420 		break;
2421 
2422 	case 0x5805: // Enter basketball house
2423 		playSound(70, 6);
2424 		playActorAnimation(513);
2425 		loadScene(22, 51, 180, 2);
2426 		break;
2427 
2428 	case 0x5832: // Ring doorbell
2429 		playActorAnimation(509);
2430 		displayMessage(dsAddr_outOfOrderMsg); // "It's out of order"
2431 		break;
2432 
2433 	case 0x58a2:
2434 		dialog->pop(scene, dsAddr_dialogStackSonny, 0, 502, textColorMark, textColorSonny, 0, 1);
2435 		scene->getObject(13)->setName((const char *)res->dseg.ptr(dsAddr_scnObjNameSonny));
2436 		break;
2437 
2438 	case 0x58b7: // Get comb from car
2439 		disableObject(14);
2440 		setOns(4, 0);
2441 		playSound(5, 7);
2442 		playActorAnimation(521);
2443 		setOns(4, 0);
2444 		inventory->add(kInvItemComb);
2445 		break;
2446 
2447 	case 0x58df: // Pull trunk lever in car
2448 		SET_FLAG(dsAddr_alreadyPulledTrunkReleaseLeverFlag, 1);
2449 		playSound(6, 1);
2450 		setOns(3, 6);
2451 		playActorAnimation(515);
2452 		break;
2453 
2454 	case 0x593e: // Enter annes house
2455 		playSound(89, 4);
2456 		playActorAnimation(980);
2457 		loadScene(23, 76, 199, 1);
2458 		if (CHECK_FLAG(dsAddr_lovestruckByAnneFlag, 1))
2459 			playMusic(7);
2460 		break;
2461 
2462 	case 0x5994:
2463 		fnEnterCave();
2464 		break;
2465 
2466 	case csAddr_caveNOP:
2467 		break;
2468 
2469 	case csAddr_enterCave:
2470 		fnEnterCave();
2471 		break;
2472 
2473 	case 0x5a8b:
2474 		if (!CHECK_FLAG(dsAddr_dogHasBoneFlag, 1)) {
2475 			playSound(43, 4); // grrrrrr
2476 			playSound(42, 15);
2477 			playSound(42, 17);
2478 			playSound(42, 19);
2479 			playAnimation(656, 0);
2480 			wait(50);
2481 			displayMessage(dsAddr_goodDoggyMsg); // "I understand. Good doggy"
2482 		} else if (!CHECK_FLAG(dsAddr_cellarDoorOpenFlag, 1)) { // Dog has bone
2483 			playSound(28, 3);
2484 			playActorAnimation(596);
2485 			setOns(1, 30);
2486 			SET_FLAG(dsAddr_cellarDoorOpenFlag, 1);
2487 			enableObject(8);
2488 		} else {
2489 			setOns(1, 0);
2490 			playSound(4, 4);
2491 			playActorAnimation(597);
2492 			SET_FLAG(dsAddr_cellarDoorOpenFlag, 0);
2493 			disableObject(8);
2494 			displayMessage(dsAddr_wallShakenMsg); // "Wow! This must have shaken all the nearby walls!"
2495 			setOns(1, 32, 24);
2496 			enableObject(4, 24);
2497 		}
2498 		break;
2499 
2500 	case 0x5b3a: // Click on dog
2501 		dialog->popMark(scene, dsAddr_dialogStackDog);
2502 		break;
2503 
2504 	case 0x5b59: // picking up the rope
2505 		dialog->showMark(70, scene);
2506 		wait(150);
2507 		dialog->showMark(71, scene);
2508 		moveRel(0, -12, 0);
2509 		playSound(34, 5);
2510 		playActorAnimation(607);
2511 		setOns(0, 0);
2512 		playActorAnimation(608);
2513 		playActorAnimation(609);
2514 		playActorAnimation(610);
2515 		playSound(5, 25);
2516 		playActorAnimation(611);
2517 		moveTo(16, scene->getPosition().y, 4, true);
2518 		inventory->add(kInvItemRopeAct2);
2519 		disableObject(12);
2520 		break;
2521 
2522 	case 0x5be1: // Talk to grandpa
2523 		dialog->pop(scene, dsAddr_dialogStackGrandpa, 0, 522, textColorMark, textColorGrandpa, 0, 1);
2524 		break;
2525 
2526 	case 0x5bee:
2527 		playSound(89, 5);
2528 		playSound(67, 11);
2529 		playActorAnimation(982);
2530 		displayMessage(dsAddr_emptyMsg); // "It's Empty"
2531 		break;
2532 
2533 	case 0x5c0d: // grandpa - drawers
2534 		if (CHECK_FLAG(dsAddr_SearchedGrandpaDrawersFlag, 1)) {
2535 			displayMessage(dsAddr_drawersEmptyMsg); // "There's nothing else in the drawers"
2536 		} else {
2537 			if (!CHECK_FLAG(dsAddr_alreadyAdjustedHoopPoleFlag, 1))
2538 				dialog->show(24, scene, 0, 522, textColorMark, textColorGrandpa, 0, 1);
2539 
2540 			playSound(66, 5);
2541 			playSound(67, 20);
2542 			playSound(5, 23);
2543 			playActorAnimation(631);
2544 			inventory->add(kInvItemHandkerchief);
2545 			SET_FLAG(dsAddr_SearchedGrandpaDrawersFlag, 1);
2546 		}
2547 		break;
2548 
2549 	case 0x5c84:
2550 		if (CHECK_FLAG(dsAddr_alreadyAdjustedHoopPoleFlag, 1)) {
2551 			inventory->add(kInvItemShotgun);
2552 			disableObject(7);
2553 			playSound(32, 7);
2554 			setOns(0, 0);
2555 			playActorAnimation(520);
2556 		} else {
2557 			dialog->pop(scene, dsAddr_dialogStackGrandpaShotgun, 0, 522, textColorMark, textColorGrandpa, 0, 1);
2558 		}
2559 		break;
2560 
2561 	case 0x5cf0:// Exit basketball house
2562 		playSound(88, 5);
2563 		playActorAnimation(981);
2564 		loadScene(20, 161, 165);
2565 		break;
2566 
2567 	case 0x5d24: // getting the fan
2568 		if (CHECK_FLAG(dsAddr_alreadyAdjustedHoopPoleFlag, 1)) {
2569 			setLan(2, 0);
2570 			playSound(32, 7);
2571 			playActorAnimation(508);
2572 			disableObject(13);
2573 			inventory->add(kInvItemFan);
2574 		} else {
2575 			dialog->pop(scene, dsAddr_dialogStackGrandpaFan, 0, 522, textColorMark, textColorGrandpa, 0, 1);
2576 		}
2577 		break;
2578 
2579 	case 0x5e4d: // right click on ann
2580 		if (!CHECK_FLAG(dsAddr_alreadySpokenToAnneFlag, 0)) {
2581 			displayMessage(dsAddr_girlTalkMsg); // "I really don't know how to talk to girls"
2582 		} else {
2583 			moveTo(245, 198, 1);
2584 			dialog->show(51, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
2585 			//waitLanAnimationFrame(2, 1); // too long, about 200 frames! seems to be present in original game (sic)
2586 			SET_FLAG(dsAddr_alreadySpokenToAnneFlag, 1);
2587 			for (byte i = 10; i <= 20; i += 2)
2588 				playSound(13, i);
2589 			playAnimation(528, 1);
2590 			wait(50);
2591 			playMusic(7);
2592 			SET_FLAG(dsAddr_lovestruckByAnneFlag, 1);
2593 			for (byte i = 3; i <= 17; i += 2)
2594 				playSound(56, i);
2595 			playActorAnimation(525);
2596 			for (byte i = 1; i <= 13; i += 2)
2597 				playSound(56, i);
2598 			playSound(40, 15);
2599 			playSound(40, 18);
2600 			playSound(40, 22);
2601 			playActorAnimation(526);
2602 			playSound(54, 1);
2603 			playSound(55, 5);
2604 			playActorAnimation(527);
2605 			wait(50);
2606 			dialog->show(52, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
2607 			scene->getObject(2)->setName((const char *)res->dseg.ptr(dsAddr_scnObjNameAnne));
2608 		}
2609 		break;
2610 
2611 	case 0x5f73: // exiting ann's house
2612 		if (CHECK_FLAG(dsAddr_lovestruckByAnneFlag, 1))
2613 			playMusic(6);
2614 		loadScene(21, 99, 180, 3);
2615 		break;
2616 
2617 	case 0x5fba:
2618 		if (CHECK_FLAG(dsAddr_nutSwappedForAppleFlag, 1)) {
2619 			displayMessage(dsAddr_noFruitMsg); // "There are no more interesting fruits here"
2620 		} else {
2621 			dialog->pop(scene, dsAddr_dialogStackGetAppleOldLady, 0, 523, textColorMark, textColorOldLady, 0, 1);
2622 		}
2623 		break;
2624 
2625 	case 0x607f:
2626 		fnEgoScaredBySpider();
2627 		break;
2628 
2629 	case 0x6083:
2630 		if (CHECK_FLAG(dsAddr_lightOnFlag, 1)) {
2631 			setOns(0, 0);
2632 			playSound(56, 10);
2633 			playActorAnimation(599);
2634 			inventory->add(kInvItemShovelAct2);
2635 			disableObject(2);
2636 		} else
2637 			fnEgoScaredBySpider();
2638 		break;
2639 
2640 	case csAddr_egoScaredBySpider:
2641 		fnEgoScaredBySpider();
2642 		break;
2643 
2644 	case csAddr_moveToLadderAndLeaveCellar:
2645 		fnMoveToLadderAndLeaveCellar();
2646 		break;
2647 
2648 	case csAddr_leaveCellar:
2649 		fnLeaveCellar();
2650 		break;
2651 
2652 	case 0x6176:
2653 		if (CHECK_FLAG(dsAddr_lightOnFlag, 1)) {
2654 			displayMessage(dsAddr_notInDarkMsg); // "I'm not going to wander here in the dark again"
2655 		} else {
2656 			playSound(71, 6);
2657 			playActorAnimation(598);
2658 			loadScene(24, scene->getPosition());
2659 			setOns(2, 0);
2660 			setLan(1, 0);
2661 			playAnimation(660, 0);
2662 			disableObject(1);
2663 			SET_FLAG(dsAddr_lightOnFlag, 1);
2664 			loadScene(24, scene->getPosition());
2665 		}
2666 		break;
2667 
2668 	case 0x61e9:
2669 		if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
2670 			dialog->popMark(scene, dsAddr_dialogStackTakeAxe);
2671 		else
2672 			fnTooDark();
2673 		break;
2674 
2675 	case csAddr_TooDark:
2676 		displayMessage(dsAddr_TooDarkMsg); // "It's too dark to see clearly"
2677 		break;
2678 
2679 	case 0x6229: // shelves in cellar
2680 		if (CHECK_FLAG(dsAddr_lightOnFlag, 1)) {
2681 			Common::Point p = scene->getPosition();
2682 			byte v = GET_FLAG(dsAddr_cellarShelfExamineCount);
2683 			switch (v) {
2684 			case 0:
2685 				displayMessage(dsAddr_whatGotMsg); // "Let's look what we've got here"
2686 				moveRel(-34, 0, 1);
2687 				displayMessage(dsAddr_strawberryJamMsg); // "Strawberry jam"
2688 				moveRel(20, 0, 1);
2689 				displayMessage(dsAddr_gooseberryJamMsg); // "Gooseberry jam"
2690 				moveRel(20, 0, 1);
2691 				displayMessage(dsAddr_blackberryJamMsg); // "Blackberry jam"
2692 				moveRel(20, 0, 1);
2693 				displayMessage(dsAddr_bilberryJamMsg); // "Bilberry jam"
2694 				moveTo(p, 3);
2695 				displayMessage(dsAddr_getMeOutJamMsg); // "Get me out of this jam!"
2696 				SET_FLAG(dsAddr_cellarShelfExamineCount, 1);
2697 				break;
2698 			case 1:
2699 				displayMessage(dsAddr_rosemaryJamMsg); // "Oh, and there is Rosemary jam"
2700 				wait(100);
2701 				displayMessage(dsAddr_knowRosemaryMsg); // "I used to know someone called Rosemary"
2702 				SET_FLAG(dsAddr_cellarShelfExamineCount, 2);
2703 				break;
2704 			default:
2705 				displayMessage(dsAddr_unwantedJamsMsg); // "I don't want those jams"
2706 				break;
2707 			}
2708 		} else
2709 			fnTooDark();
2710 		break;
2711 
2712 	case 0x6480: // dive mask
2713 		if (CHECK_FLAG(dsAddr_birdsGoneFromScarecrowFlag, 1)) {
2714 			playSound(56, 7);
2715 			playSound(5, 15);
2716 			playActorAnimation(613);
2717 			setOns(3, 36);
2718 			inventory->add(kInvItemMask);
2719 			disableObject(5);
2720 			displayMessage(dsAddr_needSunglassesMsg); // "Sorry buddy, but I need your sunglasses"
2721 		} else
2722 			displayMessage(dsAddr_crowKillMsg); // "I'm sure these crows will kill me"
2723 		break;
2724 
2725 	case 0x64c4: // flippers
2726 		if (CHECK_FLAG(dsAddr_birdsGoneFromScarecrowFlag, 1)) {
2727 			setOns(2, 35);
2728 			playSound(63, 8);
2729 			playSound(24, 10);
2730 			playActorAnimation(612);
2731 			inventory->add(kInvItemFins);
2732 			disableObject(6);
2733 		} else
2734 			displayMessage(dsAddr_crowKillMsg); // "I'm sure these crows will kill me"
2735 		break;
2736 
2737 	case 0x7907: // Describe car lever
2738 		if (CHECK_FLAG(dsAddr_alreadyPulledTrunkReleaseLeverFlag, 1)) { // Already pulled lever?
2739 			displayMessage(dsAddr_openBootMsg); // "It opens the boot"
2740 		} else
2741 			retVal = false;
2742 		break;
2743 
2744 	case 0x62d0: // Get bone from under rock
2745 		displayAsyncMessage(dsAddr_yeowMsg, 218, 96, 16, 24); // "YEEEOOOWWWW!"
2746 		playSound(26, 6);
2747 		playSound(26, 10);
2748 		playSound(24, 13);
2749 		playSound(46, 37);
2750 		setOns(0, 0);
2751 		playActorAnimation(594);
2752 		setOns(0, 29);
2753 		disableObject(1);
2754 		inventory->add(kInvItemBone);
2755 		playSound(5, 2);
2756 		playActorAnimation(595);
2757 		displayMessage(dsAddr_dinoBoneMsg); // "I really hope this is DINOSAUR bone"
2758 		break;
2759 
2760 	case 0x6351:
2761 		if (CHECK_FLAG(dsAddr_caveThornsCutDownFlag, 1)) { // cave bush is cut down
2762 			playMusic(8);
2763 			loadScene(26, 319, 169, 4);
2764 		} else
2765 			displayMessage(dsAddr_ridBushMsg); // "I must get rid of this bush first"
2766 		break;
2767 
2768 	case 0x63ea:
2769 		playSound(5, 10);
2770 		setOns(0, 0);
2771 		playActorAnimation(640);
2772 		inventory->add(kInvItemNugget);
2773 		disableObject(6);
2774 		break;
2775 
2776 	case 0x6411: // Kick hen
2777 		if (CHECK_FLAG(dsAddr_alreadyKickedHenFlag, 1)) { // already kicked hen
2778 			displayMessage(dsAddr_ridFrustationsMsg); // "I'd already got rid of my frustrations"
2779 		} else {
2780 			SET_FLAG(dsAddr_alreadyKickedHenFlag, 1);
2781 			displayMessage(dsAddr_henFlyMsg); // "I wonder if hens can fly. Come here, baby"
2782 			waitLanAnimationFrame(1, 87);
2783 			playSound(30, 26);
2784 			playSound(29, 49);
2785 			playActorAnimation(500, true);
2786 			playAnimation(501, 0, true);
2787 			waitAnimation();
2788 			setOns(0, 1);
2789 			enableObject(14);
2790 			displayMessage(dsAddr_firstTestFailMsg); // "First test failed"
2791 		}
2792 		break;
2793 
2794 	case 0x6592: // Rake
2795 		setOns(1, 0);
2796 		playSound(18, 10);
2797 		playActorAnimation(553);
2798 		inventory->add(kInvItemRakeBroken);
2799 		wait(50);
2800 		displayMessage(dsAddr_trousersMsg); // "Good I always asked mum for trousers with BIG pockets"
2801 		disableObject(11);
2802 		break;
2803 
2804 	case 0x66b5:
2805 		playSound(89, 5);
2806 		playActorAnimation(969);
2807 		loadScene(33, 319, 181, 4);
2808 		break;
2809 
2810 	case 0x6519: // Sickle
2811 		setOns(4, 0);
2812 		playSound(5, 11);
2813 		playActorAnimation(625);
2814 		inventory->add(kInvItemSickleBlunt);
2815 		disableObject(8);
2816 		break;
2817 
2818 	case 0x655b: // Get needle from haystack
2819 		if (CHECK_FLAG(dsAddr_gotNeedleAlreadyFlag, 1)) { // already have needle
2820 			displayMessage(dsAddr_dontPushLuckMsg); // "I don't think I should push my luck"
2821 		} else {
2822 			SET_FLAG(dsAddr_gotNeedleAlreadyFlag, 1);
2823 			playSound(49, 3);
2824 			playActorAnimation(548);
2825 			inventory->add(kInvItemNeedle);
2826 			displayMessage(dsAddr_needleHaystackMsg); // "And they say you can't find a needle in a haystack"
2827 		}
2828 		break;
2829 
2830 	case 0x663c: // Feather
2831 		setOns(0, 0);
2832 		playSound(5, 9);
2833 		playActorAnimation(511);
2834 		inventory->add(kInvItemFeather);
2835 		disableObject(15);
2836 		break;
2837 
2838 	case 0x667c:
2839 		playSound(70, 4);
2840 		playActorAnimation(972);
2841 		loadScene(29, 160, 199, 1);
2842 		break;
2843 
2844 	case 0x66a9:
2845 		displayMessage(dsAddr_dontLeaveMansionMsg); // "I don't want to leave the mansion, I want blood!"
2846 		disableObject(4);
2847 		break;
2848 
2849 	case 0x66e2:
2850 		playSound(88, 4);
2851 		playActorAnimation(970);
2852 		loadScene(35, 160, 199, 1);
2853 		break;
2854 
2855 	case 0x70bb:
2856 		dialog->pop(scene, dsAddr_dialogStackBusyCook, 0, 709, textColorMark, textColorCook, 0, 1);
2857 		break;
2858 
2859 	case 0x71ae:
2860 		if (CHECK_FLAG(dsAddr_MansionRadioBrokenFlag, 1)) {
2861 			if (CHECK_FLAG(dsAddr_MansionGotRadioBatteriesFlag, 1)) {
2862 				displayMessage(dsAddr_restUselessMsg); // "The rest is useless"
2863 			} else {
2864 				displayMessage(dsAddr_twoBatteriesMsg); // "Wow! Two 1.5V batteries!"
2865 				playSound(32, 6);
2866 				playActorAnimation(717);
2867 				inventory->add(kInvItemBatteries);
2868 				SET_FLAG(dsAddr_MansionGotRadioBatteriesFlag, 1);
2869 			}
2870 		} else
2871 			dialog->showMark(97, scene);
2872 		break;
2873 
2874 	case 0x70c8:
2875 		if (fnIsCookGone()) {
2876 			moveTo(81, 160, 4);
2877 			displayMessage(dsAddr_cognacMsg); // "Pfui! The cognac really didn't do any good"
2878 		}
2879 		break;
2880 
2881 	case csAddr_isCookGone:
2882 		retVal = fnIsCookGone();
2883 		break;
2884 
2885 	case 0x70ef:
2886 		if (fnIsCookGone())
2887 			displayMessage(dsAddr_tooHotMsg); // "It's too hot to touch!"
2888 		break;
2889 
2890 	case 0x70f9:
2891 		if (inventory->has(kInvItemBurningPaper)) {
2892 			inventory->remove(kInvItemBurningPaper);
2893 			loadScene(29, 40, 176, 2);
2894 			displayMessage(dsAddr_paperBurntMsg); // "The paper burnt out completely!"
2895 		} else
2896 			loadScene(29, 40, 176, 2);
2897 		break;
2898 
2899 	case 0x712c:
2900 		if (fnIsCookGone()) {
2901 			if (CHECK_FLAG(dsAddr_MansionHaveOpenedFridgeBeforeFlag, 1)) {
2902 				playSound(89, 4);
2903 				playActorAnimation(719);
2904 				setOns(4, 67);
2905 				++ *res->dseg.ptr(READ_LE_UINT16(res->dseg.ptr(dsAddr_sceneWalkboxTablePtr + (scene->getId() - 1) * 2)));
2906 				disableObject(5);
2907 				enableObject(12);
2908 			} else {
2909 				playSound(89, 4);
2910 				playSound(89, 4);
2911 				playSound(87, 45);
2912 				displayAsyncMessage(dsAddr_oneTakenMsg, 112, 108, 11, 35, textColorEskimo); // "This one's taken, OK?"
2913 				playActorAnimation(718);
2914 				wait(100);
2915 				displayMessage(dsAddr_slightMadMsg); // "It finally happened. I'm slightly mad"
2916 				SET_FLAG(dsAddr_MansionHaveOpenedFridgeBeforeFlag, 1);
2917 			}
2918 		}
2919 		break;
2920 
2921 	case 0x71eb:
2922 		setOns(2, 0);
2923 		playSound(32, 7);
2924 		playActorAnimation(710);
2925 		inventory->add(kInvItemChilliWithLabel);
2926 		disableObject(7);
2927 		enableObject(8);
2928 		break;
2929 
2930 	case 0x7244:
2931 		if (fnIsCookGone())
2932 			displayMessage(dsAddr_neverLearntMsg); // "I never learnt to how use one"
2933 		break;
2934 
2935 	case 0x7255:
2936 		if (CHECK_FLAG(dsAddr_MansionPutBurningPaperInFridgeFlag, 1)) {
2937 			setOns(4, 69);
2938 			playSound(32, 5);
2939 			playActorAnimation(725);
2940 			disableObject(12);
2941 			inventory->add(kInvItemMeat);
2942 		} else {
2943 			playActorAnimation(721);
2944 			displayMessage(dsAddr_frozenShelfMsg); // "It has frozen hard onto the shelf!"
2945 		}
2946 		break;
2947 
2948 	case 0x721c:
2949 		setOns(3, 0);
2950 		playSound(32, 7);
2951 		playActorAnimation(715);
2952 		inventory->add(kInvItemPastryRoller);
2953 		disableObject(9);
2954 		break;
2955 
2956 	case 0x7336:
2957 		setOns(1, 0);
2958 		playSound(5, 42);
2959 		displayAsyncMessage(dsAddr_noDepraveMsg, 2, 102, 20, 38); // "Nah, I don't want to deprave the kids"
2960 		playActorAnimation(697);
2961 		inventory->add(kInvItemCognac);
2962 		disableObject(1);
2963 		break;
2964 
2965 	case 0x7381:
2966 		playSound(5, 12);
2967 		playActorAnimation(704);
2968 		disableObject(2);
2969 		inventory->add(kInvItemIceTongs);
2970 		break;
2971 
2972 	case 0x7408:
2973 		if (CHECK_FLAG(dsAddr_mansionReadNewspaperFlag, 1)) {
2974 			displayMessage(dsAddr_noReadAgainMsg); // "I don't want to read it again. I might like it."
2975 		} else {
2976 			setOns(0, 0);
2977 			playSound(26, 17);
2978 			playSound(26, 23);
2979 			playSound(26, 30);
2980 			playSound(26, 37);
2981 			playSound(26, 43);
2982 			playSound(52, 34);
2983 			playActorAnimation(698);
2984 			setOns(0, 52);
2985 			setOns(2, 61);
2986 			dialog->showMark(92, scene);
2987 			enableObject(11);
2988 			SET_FLAG(dsAddr_mansionReadNewspaperFlag, 1);
2989 		}
2990 		break;
2991 
2992 	case 0x7476:
2993 		if (CHECK_FLAG(dsAddr_mansionExaminedCouchBeforeFlag, 1)) {
2994 			displayMessage(dsAddr_noSleepMsg); // "I don't want to sleep"
2995 		} else {
2996 			SET_FLAG(dsAddr_mansionExaminedCouchBeforeFlag, 1);
2997 			dialog->showMark(94, scene);
2998 			playSound(61, 5);
2999 			playSound(5, 14);
3000 			playActorAnimation(705);
3001 			displayMessage(dsAddr_justCorkMsg); // "It's just a cork"
3002 			inventory->add(kInvItemCork);
3003 		}
3004 		break;
3005 
3006 	case 0x74d1:
3007 		setOns(2, 0);
3008 		playSound(5, 12);
3009 		playActorAnimation(699);
3010 		inventory->add(kInvItemRemoteControl);
3011 		disableObject(11);
3012 		break;
3013 
3014 	case 0x7513: // fatso + doctor: pre-final
3015 		if (CHECK_FLAG(dsAddr_MansionThruFanByTimePillFlag, 1)) {
3016 			if (CHECK_FLAG(dsAddr_MansionVentFanStoppedFlag, 1)) {
3017 				playSound(88, 4);
3018 				playActorAnimation(979);
3019 				loadScene(37, 51, 183);
3020 
3021 				dialog->show(125, scene, 768, 769, textColorMansionGuard, textColorProfessor, 1, 2);
3022 				playAnimation(770, 0, true, true, true);
3023 				playAnimation(771, 1, true, true, true);
3024 				dialog->showMono(126, scene, 0, textColorMark, 0);
3025 				playAnimation(770, 0, true, true, true);
3026 				playAnimation(771, 1, true, true, true);
3027 				playSound(5, 3);
3028 				playSound(56, 12);
3029 				playSound(23, 20);
3030 				playSound(75, 25);
3031 				playActorAnimation(772);
3032 
3033 				playActorAnimation(773, true);
3034 				playAnimation(774, 0, true);
3035 				waitAnimation();
3036 				setOns(0, 74);
3037 				hideActor();
3038 				dialog->showMono(127, scene, 775, textColorJohnNoty, 1);
3039 				playAnimation(771, 1, true, true, true);
3040 				playAnimation(776, 0);
3041 
3042 				dialog->show(128, scene, 777, 778, textColorJohnNoty, textColorProfessor, 1, 2);
3043 
3044 				playAnimation(779, 0, true, true, true);
3045 				playAnimation(780, 1, true, true, true);
3046 
3047 				for (byte i = 1; i <= 6; ++i)
3048 					playSound(58, i);
3049 				playSound(58, 10);
3050 				playSound(2, 7);
3051 				playSound(55, 11);
3052 				playSound(54, 15);
3053 				playAnimation(781, 2, true);
3054 				playAnimation(782, 3, true);
3055 				waitAnimation();
3056 				setOns(1, 75);
3057 				setOns(2, 76);
3058 
3059 				for (byte i = 1; i <= 6; ++i)
3060 					playSound(58, i);
3061 				playSound(58, 9);
3062 				playSound(2, 7);
3063 				playSound(2, 15);
3064 				playSound(55, 10);
3065 
3066 				playAnimation(783, 2, true);
3067 				playAnimation(784, 3, true);
3068 				waitAnimation();
3069 				setOns(1, 77);
3070 				setOns(2, 78);
3071 
3072 				playAnimation(785, 2, true);
3073 				playAnimation(786, 3, true);
3074 				waitAnimation();
3075 
3076 				moveTo(112, 183, 2, true);
3077 
3078 				setOns(3, 79);
3079 				setOns(0, 0);
3080 
3081 				showActor();
3082 				playAnimation(0, 0);
3083 				playAnimation(787, 2, true);
3084 				playAnimation(788, 3, true);
3085 				waitAnimation();
3086 
3087 				playAnimation(0, 1);
3088 
3089 				playSound(32, 2);
3090 				playSound(24, 7);
3091 
3092 				playAnimation(790, 3, true);
3093 				playAnimation(789, 0, true);
3094 				waitAnimation();
3095 
3096 				setOns(0, 80);
3097 
3098 				playAnimation(792, 3, true, true, true);
3099 				dialog->show(129, scene, 0, 791, textColorMark, textColorJohnNoty, 0, 4);
3100 				playAnimation(792, 3, true, true, true);
3101 
3102 				moveTo(40, 171, 4);
3103 
3104 				setOns(3, 81, 35);
3105 				enableObject(12, 35);
3106 				playAnimation(0, 3);
3107 
3108 				loadScene(31, 298, 177, 4);
3109 				SET_FLAG(dsAddr_MansionJohnNotyEscapingFlag, 1);
3110 			} else
3111 				displayMessage(dsAddr_ventFirstMsg); // "I'd better stop this ventilator first"
3112 		} else
3113 			displayMessage(dsAddr_noSaladMsg); // "I don't want to turn myself into a salad"
3114 		break;
3115 
3116 	case 0x783d:
3117 		dialog->pop(scene, dsAddr_dialogStackJohnNotyEndgame, 0, 797, textColorMark, textColorJohnNoty, 0, 1);
3118 		break;
3119 
3120 	case 0x7966:
3121 		if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
3122 			retVal = false;
3123 		else
3124 			fnEgoScaredBySpider();
3125 		break;
3126 
3127 	case 0x7ad0:
3128 	case 0x7ad7:
3129 		retVal = !fnIsCookGone();
3130 		break;
3131 
3132 	case 0x7ab9:
3133 		if (CHECK_FLAG(dsAddr_vgaArtistQuipAlreadySaidFlag, 1))
3134 			retVal = false;
3135 		else {
3136 			dialog->showMono(90, scene, 0, textColorMark, 0);
3137 			SET_FLAG(dsAddr_vgaArtistQuipAlreadySaidFlag, 1);
3138 		}
3139 		break;
3140 
3141 	case 0x7ade:
3142 		if (CHECK_FLAG(dsAddr_MansionRadioBrokenFlag, 1))
3143 			displayMessage(dsAddr_whatInsideMsg); // "I was always curious what's inside these things"
3144 		else
3145 			retVal = false;
3146 		break;
3147 
3148 	case 0x7f23: // Use grenade on captains drawer
3149 		if (CHECK_FLAG(dsAddr_FirstActTrialState, 3)) {
3150 			enableOn(false);
3151 			playSound(5, 3);
3152 			playSound(58, 11);
3153 			playSound(46, 56);
3154 			playSound(46, 85);
3155 			playSound(46, 117);
3156 			playActorAnimation(870);
3157 			playSound(54, 15);
3158 			playActorAnimation(871);
3159 			SET_FLAG(dsAddr_captainDrawerState, 1);
3160 			setOns(1, 0x66);
3161 			moveTo(224, 194, 0, true);
3162 			displayCutsceneMessage(dsAddr_cutsceneMsg1, 23, 95); // "sixty seven rude words later"
3163 			inventory->remove(kInvItemRopeAndGrenade);
3164 			enableOn(true);
3165 		} else
3166 			displayMessage(dsAddr_captainWatchingMsg); // "with captain watching? Better not"
3167 		break;
3168 
3169 	case csAddr_egoSuspiciousPosition:
3170 		fnEgoSuspiciousPosition();
3171 		break;
3172 
3173 	case 0x509a:
3174 		fnEgoSuspiciousPosition();
3175 		setOns(1, 0);
3176 		playSound(5, 10);
3177 		playActorAnimation(543);
3178 		inventory->add(kInvItemBranch);
3179 		disableObject(9);
3180 		break;
3181 
3182 	case 0x7802:
3183 		if (CHECK_FLAG(dsAddr_MansionThruFanByTimePillFlag, 1)) {
3184 			if (CHECK_FLAG(dsAddr_MansionVentFanStoppedFlag, 1))
3185 				displayMessage(dsAddr_nahMsg); // "Nah"
3186 			else {
3187 				playSound(71, 4);
3188 				playActorAnimation(796);
3189 				setLan(1, 0);
3190 				SET_FLAG(dsAddr_MansionVentFanStoppedFlag, 1);
3191 			}
3192 		} else
3193 			displayMessage(dsAddr_noSaladMsg); // "I don't want to turn myself into a salad"
3194 		break;
3195 
3196 	case 0x78e0:
3197 		fnEgoSuspiciousPosition();
3198 		retVal = false;
3199 		break;
3200 
3201 	case 0x78e7:
3202 	case 0x78ee:
3203 		fnEgoDefaultPosition();
3204 		retVal = false;
3205 		break;
3206 
3207 	case 0x78f5:
3208 		if (CHECK_FLAG(dsAddr_carTrunkEmptyFlag, 1)) {
3209 			displayMessage(dsAddr_bootEmptyMsg); // "There's nothing else in the boot"
3210 		} else
3211 			retVal = false;
3212 		break;
3213 
3214 	case 0x7919:
3215 		if (!CHECK_FLAG(dsAddr_laundryState, 1))
3216 			retVal = false;
3217 		else
3218 			displayMessage(dsAddr_clothesDryMsg); // "The clothes are dry now."
3219 		break;
3220 
3221 	case 0x7950:
3222 		if (CHECK_FLAG(dsAddr_nutSwappedForAppleFlag, 1))
3223 			displayMessage(dsAddr_nutRealMsg); // "Only the nut is real"
3224 		else
3225 			retVal = false;
3226 		break;
3227 
3228 	case 0x7975:
3229 		if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
3230 			retVal = false;
3231 		else
3232 			displayMessage(dsAddr_shutValveMsg); // "Shutting the valve shook the dirt from the wall..."
3233 		break;
3234 
3235 	case 0x7987:
3236 	case 0x7996:
3237 	case 0x79a5:
3238 	case 0x79b4:
3239 		if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
3240 			retVal = false;
3241 		else
3242 			fnTooDark();
3243 		break;
3244 
3245 	case 0x79d2:
3246 		if (!CHECK_FLAG(dsAddr_gotNeedleAlreadyFlag, 1))
3247 			retVal = false;
3248 		else
3249 			displayMessage(dsAddr_ordinaryHaystackMsg); // "Just an ordinary hay stack. Now."
3250 		break;
3251 
3252 	case 0x7af0:
3253 		if (fnIsCookGone())
3254 			retVal = false;
3255 		break;
3256 
3257 	case 0x8117:
3258 		dialog->show(9, scene, 0, 529, textColorMark, textColorMansionGuard, 0, 1);
3259 		playSound(5, 2);
3260 		playSound(5, 44);
3261 		playAnimation(642, 0, true);
3262 		playActorAnimation(641, true);
3263 		waitAnimation();
3264 		dialog->show(10, scene, 0, 529, textColorMark, textColorMansionGuard, 0, 1);
3265 		wait(170);
3266 		dialog->show(11, scene, 0, 529, textColorMark, textColorMansionGuard, 0, 1);
3267 		moveRel(0, 1, 0);
3268 		wait(100);
3269 		dialog->show(12, scene, 0, 529, textColorMark, textColorMansionGuard, 0, 1);
3270 		inventory->remove(kInvItemNugget);
3271 		fnMansionIntrusionAttempt();
3272 		break;
3273 
3274 	case 0x8174:
3275 		setOns(0, 0);
3276 		playSound(5, 2);
3277 		playSound(5, 5);
3278 		playSound(5, 9);
3279 		playSound(14, 19);
3280 		playSound(5, 50);
3281 		playActorAnimation(542);
3282 		setOns(1, 15);
3283 		disableObject(3);
3284 		enableObject(9);
3285 		break;
3286 
3287 	case 0x81c2:
3288 		playSound(56, 11);
3289 		playSound(36, 13);
3290 		playSound(48, 22);
3291 		playSound(56, 57);
3292 		playSound(36, 59);
3293 		playSound(48, 68);
3294 		playSound(54, 120);
3295 		playSound(56, 141);
3296 		playSound(56, 144);
3297 		playSound(56, 147);
3298 		playAnimation(589, 1, true);
3299 		playActorAnimation(588, true);
3300 		waitAnimation();
3301 		wait(50);
3302 		displayMessage(dsAddr_itsGoneMsg); // "At least it's gone"
3303 		inventory->remove(kInvItemPaintedPotato);
3304 		SET_FLAG(dsAddr_mansionTreeHollowEmptyFlag, 1);
3305 		break;
3306 
3307 	case 0x823d: // grappling hook on the wall
3308 		playSound(5, 3);
3309 		for (byte i = 16; i <= 28; i += 2)
3310 			playSound(65, i);
3311 		playSound(47, 33);
3312 		playActorAnimation(620);
3313 		for (byte i = 3; i <= 18; i += 3)
3314 			playSound(56, i);
3315 
3316 		displayAsyncMessage(dsAddr_heyLetGoMsg, 38, 12, 20, 37, textColorMansionGuard); // "Hey, let go, will ya?!"
3317 		playActorAnimation(621, true);
3318 		playAnimation(623, 1, true);
3319 		waitAnimation();
3320 
3321 		displayAsyncMessage(dsAddr_aaahhhMsg, 30, 12, 1, 9, textColorMansionGuard); // "Aaaaaaaaaaaaahhh!"
3322 		playSound(35, 1);
3323 		playActorAnimation(622, true);
3324 		playAnimation(624, 0, true);
3325 		waitAnimation();
3326 
3327 		wait(150);
3328 		displayMessage(dsAddr_oopsMsg); // "Oops"
3329 
3330 		inventory->remove(kInvItemGrapplingHook);
3331 		fnMansionIntrusionAttempt();
3332 		break;
3333 
3334 	case 0x830b:
3335 		displayMessage(dsAddr_noChainsawFuelMsg); // "There's no fuel in the chainsaw"
3336 		break;
3337 
3338 	case 0x8312: // hedgehog + plastic apple
3339 		dialog->showMark(76, scene);
3340 		setLan(1, 0);
3341 		playSound(5, 24);
3342 		playSound(26, 32);
3343 		playSound(5, 42);
3344 		playSound(15, 77);
3345 		playSound(15, 79);
3346 		playSound(15, 82);
3347 		playSound(22, 91);
3348 		playSound(22, 102);
3349 		playSound(26, 114);
3350 		playSound(24, 124);
3351 		waitLanAnimationFrame(1, 0x1a);
3352 		playActorAnimation(562, true);
3353 		playAnimation(563, 1, true);
3354 		waitAnimation();
3355 
3356 		disableObject(6);
3357 		displayMessage(dsAddr_lifeIsBrutalMsg); // "Life is brutal"
3358 		inventory->remove(kInvItemPlasticApple);
3359 		inventory->add(kInvItemCone);
3360 		break;
3361 
3362 	case 0x839f:
3363 		inventory->remove(kInvItemDart);
3364 		playSound(37, 14);
3365 		playSound(16, 17);
3366 		playActorAnimation(564, true);
3367 		playAnimation(565, 2, true);
3368 		waitAnimation();
3369 		setOns(0, 24);
3370 		playSound(39, 5);
3371 		playActorAnimation(582);
3372 		moveTo(63, 195, 1);
3373 		playAnimation(571, 1);
3374 		playAnimation(572, 1);
3375 		playAnimation(573, 1);
3376 		for (byte i = 1; i <= 7; i += 2)
3377 			playSound(40, i);
3378 		playAnimation(574, 1);
3379 		setLan(1, 0);
3380 		playAnimation(575, 1);
3381 		playAnimation(576, 1);
3382 		playAnimation(577, 1);
3383 		playAnimation(578, 1);
3384 		playAnimation(579, 1);
3385 		playAnimation(580, 1);
3386 		playSound(55, 18);
3387 		playAnimation(581, 1);
3388 		disableObject(2);
3389 		SET_FLAG(dsAddr_beesGoneFlag, 1);
3390 		break;
3391 
3392 	case 0x84c7: // using paddle on boat
3393 		playSound(20, 9);
3394 		playActorAnimation(530);
3395 		loadScene(16, 236, 95, 1);
3396 		playMusic(9);
3397 		playActorAnimation(531);
3398 		playSound(36, 4);
3399 		playActorAnimation(532);
3400 		playActorAnimation(533);
3401 		setOns(0, 9);
3402 		moveTo(236, 95, 1, true);
3403 		break;
3404 
3405 	case 0x8538: // Sharpen sickle on well
3406 		moveTo(236, 190, 0);
3407 		setOns(2, 0);
3408 		// FIXME: Add code to Remove handle sprite (visible GFX glitch)
3409 		playSound(5, 4);
3410 		playSound(14, 14);
3411 		playSound(14, 33);
3412 		playSound(5, 43);
3413 		playActorAnimation(643);
3414 		setOns(2, 43);
3415 		moveTo(236, 179, 3);
3416 		inventory->remove(kInvItemSickleBlunt);
3417 		inventory->add(kInvItemSickleSharp);
3418 		break;
3419 
3420 	case 0x85d6:
3421 		displayMessage(dsAddr_paddleBrokenMsg); // "The paddle is BROKEN"
3422 		break;
3423 
3424 	case 0x85eb:
3425 		if (CHECK_FLAG(dsAddr_squirrelNutState, 1)) {
3426 			enableObject(6);
3427 			playSound(25, 10);
3428 			playSound(25, 14);
3429 			playSound(25, 18);
3430 			playActorAnimation(559);
3431 			setOns(1, 23);
3432 			SET_FLAG(dsAddr_squirrelNutState, 2);
3433 		} else
3434 			displayMessage(dsAddr_dontWorkPurposeMsg); // "I usually don't work without a purpose"
3435 		break;
3436 
3437 	case 0x863d:
3438 		playSound(12, 4);
3439 		playSound(50, 20);
3440 		playSound(50, 29);
3441 		playActorAnimation(554);
3442 		inventory->remove(kInvItemChocCandy);
3443 		inventory->add(kInvItemHeartShapedCandy);
3444 		break;
3445 
3446 	case 0x8665:
3447 		playSound(5, 3);
3448 		for (byte i = 12; i <= 24; i += 2)
3449 			playSound(56, i);
3450 		playActorAnimation(567);
3451 		inventory->remove(kInvItemFeatherDusterClean);
3452 		inventory->add(kInvItemFeatherDusterDirty);
3453 		break;
3454 
3455 	case 0x862c:
3456 		if (CHECK_FLAG(dsAddr_squirrelNutState, 1))
3457 			displayMessage(dsAddr_nutRakeMsg); // "It's pointless, the nut will slip between the rake's teeth"
3458 		else
3459 			displayMessage(dsAddr_objErrorMsg); // "That's no good"
3460 		break;
3461 
3462 	case 0x86a9: // correcting height of the pole with spanner
3463 		if (CHECK_FLAG(dsAddr_alreadyAdjustedHoopPoleFlag, 1)) {
3464 			displayMessage(dsAddr_noNeedMsg); // "No need to do it again"
3465 		} else {
3466 			SET_FLAG(dsAddr_alreadyAdjustedHoopPoleFlag, 1);
3467 			dialog->show(17, scene, 0, 502, textColorMark, textColorSonny, 0, 1);
3468 			waitLanAnimationFrame(1, 7);
3469 			playSound(5, 16);
3470 			playSound(1, 25);
3471 			playSound(1, 29);
3472 			playSound(1, 34);
3473 			playAnimation(506, 0, true);
3474 			playActorAnimation(504, true);
3475 			waitAnimation();
3476 
3477 			setOns(0, 0);
3478 			playSound(24, 2);
3479 			playSound(22, 24);
3480 			playSound(1, 28);
3481 			playSound(1, 32);
3482 			playSound(1, 37);
3483 			playSound(5, 43);
3484 			playSound(61, 70);
3485 			playSound(61, 91);
3486 			displayAsyncMessage(dsAddr_ConfusionMsg, 77, 90, 6, 17); // "!?&!"
3487 			playActorAnimation(505, true);
3488 			playAnimation(507, 0, true);
3489 			waitAnimation();
3490 
3491 			setOns(0, 4);
3492 			{
3493 				Object *obj = scene->getObject(3);
3494 				obj->rect.top += 20;
3495 				obj->rect.bottom += 20;
3496 				obj->rect.save();
3497 			}
3498 			playSound(10, 3);
3499 			playAnimation(503, 0);
3500 			setLan(1, 0, 22);
3501 			disableObject(1, 22);
3502 			disableObject(13, 20);
3503 			setLan(1, 0);
3504 			disableObject(1);
3505 			disableObject(2);
3506 			disableObject(14);
3507 			disableObject(15);
3508 			disableObject(16);
3509 			moveTo(162, 164, 2);
3510 			displayMessage(dsAddr_grandpaPromiseMsg, textColorSonny, 70, 76); // "But grandpa, you promised!"
3511 			displayMessage(dsAddr_ohLetsGoMsg, textColorGrandpa, 90, 76); // "Oh all right. Let's go"
3512 			moveTo(162, 191, 2);
3513 			setOns(1, 0);
3514 			setOns(2, 0);
3515 			setOns(3, 0);
3516 			setOns(4, 0);
3517 
3518 			{
3519 				Walkbox *w = scene->getWalkbox(0);
3520 				w->rect.clear();
3521 				w->save();
3522 			}
3523 
3524 			playSound(62, 1);
3525 			playSound(9, 8);
3526 			setLan(1, 0);
3527 			playAnimation(512, 0);
3528 
3529 			wait(100);
3530 			displayMessage(dsAddr_byeMsg); // "Bye."
3531 			{
3532 				Object *obj = scene->getObject(7);
3533 				obj->actorRect.left = obj->actorRect.right = 228;
3534 				obj->actorRect.top = obj->actorRect.bottom = 171;
3535 				obj->actorRect.save();
3536 			}
3537 			{
3538 				Object *obj = scene->getObject(8);
3539 				obj->actorRect.left = obj->actorRect.right = 290;
3540 				obj->actorRect.top = obj->actorRect.bottom = 171;
3541 				obj->actorRect.save();
3542 			}
3543 		}
3544 		break;
3545 
3546 	case 0x88c9: // give flower to old lady
3547 		if (CHECK_FLAG(dsAddr_givenFlowerToOldLadyAlreadyFlag, 1))
3548 			fnGiveAnotherFlowerToOldLady();
3549 		else {
3550 			inventory->remove(kInvItemFirstFlower);
3551 			SET_FLAG(dsAddr_givenFlowerToOldLadyAlreadyFlag, 1);
3552 			fnGivingFlowerToOldLady();
3553 		}
3554 		break;
3555 
3556 	case csAddr_givingFlowerToOldLady:
3557 		fnGivingFlowerToOldLady();
3558 		break;
3559 
3560 	case csAddr_giveAnotherFlowerToOldLady:
3561 		fnGiveAnotherFlowerToOldLady();
3562 		break;
3563 
3564 	case 0x8918: // give flower to old lady
3565 		if (CHECK_FLAG(dsAddr_givenFlowerToOldLadyAlreadyFlag, 1))
3566 			fnGiveAnotherFlowerToOldLady();
3567 		else {
3568 			inventory->remove(kInvItemSecondFlower);
3569 			SET_FLAG(dsAddr_givenFlowerToOldLadyAlreadyFlag, 1);
3570 			fnGivingFlowerToOldLady();
3571 		}
3572 		break;
3573 
3574 	case 0x892d:
3575 		if (CHECK_FLAG(dsAddr_givenFlowerToAnneAlreadyFlag, 1))
3576 			fnGiveAnotherFlowerToAnne();
3577 		else {
3578 			fnGivingFlowerToAnne();
3579 			inventory->remove(kInvItemFirstFlower);
3580 			SET_FLAG(dsAddr_givenFlowerToAnneAlreadyFlag, 1);
3581 		}
3582 		break;
3583 
3584 	case csAddr_givingFlowerToAnne:
3585 		fnGivingFlowerToAnne();
3586 		break;
3587 
3588 	case csAddr_giveAnotherFlowerToAnne:
3589 		fnGiveAnotherFlowerToAnne();
3590 		break;
3591 
3592 	case 0x89b7:
3593 		if (CHECK_FLAG(dsAddr_givenFlowerToAnneAlreadyFlag, 1))
3594 			fnGiveAnotherFlowerToAnne();
3595 		else {
3596 			fnGivingFlowerToAnne();
3597 			inventory->remove(kInvItemSecondFlower);
3598 			SET_FLAG(dsAddr_givenFlowerToAnneAlreadyFlag, 1);
3599 		}
3600 		break;
3601 
3602 	case 0x89cc:
3603 		inventory->remove(kInvItemWrappedCandy);
3604 		playSound(5, 6);
3605 		dialog->show(60, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
3606 		// FIXME - Dialog #61 not explicitly called. Does Dialog #60 run on somehow?
3607 		playActorAnimation(555, true);
3608 		playAnimation(556, 1, true);
3609 		waitAnimation();
3610 		playActorAnimation(557, true);
3611 		playAnimation(558, 1, true);
3612 		waitAnimation();
3613 		dialog->show(62, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
3614 		inventory->add(kInvItemRibbon);
3615 		break;
3616 
3617 	case 0x8a22:
3618 		playSound(45, 16);
3619 		playActorAnimation(560);
3620 		inventory->remove(kInvItemNut);
3621 		inventory->add(kInvItemPlasticApple);
3622 		wait(50);
3623 		dialog->show(44, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
3624 		dialog->show(45, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
3625 		SET_FLAG(dsAddr_nutSwappedForAppleFlag, 1);
3626 		break;
3627 
3628 	case 0x8a6f: // banknote + ann
3629 		if (CHECK_FLAG(dsAddr_examinedBanknoteFlag, 1)) {
3630 			dialog->show(63, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
3631 			playSound(5, 3);
3632 			playSound(5, 20);
3633 			playAnimation(671, 1, true);
3634 			playActorAnimation(670, true);
3635 			waitAnimation();
3636 			//playAnimation(672, 1);
3637 			dialog->show(64, scene, 524, 672, textColorMark, textColorAnne, 0, 2);
3638 			//playAnimation(672, 1);
3639 
3640 			playSound(83, 12);
3641 			displayAsyncMessage(dsAddr_hundredBucksMsg, 204, 114, 23, 38, textColorAnne); // "A hundred bucks!!!"
3642 			playActorAnimation(673);
3643 			loadScene(11, scene->getPosition());
3644 			playSound(24, 31);
3645 			playSound(24, 48);
3646 			playSound(79, 50);
3647 			playActorAnimation(674, true);
3648 			playAnimation(675, 0, true);
3649 			waitAnimation();
3650 			loadScene(28, 0, 167, 2);
3651 			playMusic(10);
3652 			moveTo(66, 167, 2);
3653 			displayMessage(dsAddr_wantBloodMsg); // "I want Blood!"
3654 			inventory->clear();
3655 			inventory->add(kInvItemSuperGlue);
3656 		} else
3657 			displayMessage(dsAddr_showHerMoneyMsg); // "If I just show her the money, she might take it"
3658 		break;
3659 
3660 	case 0x8b82: // use fan on laundry
3661 		setOns(0, 0);
3662 		playSound(5, 3);
3663 		playSound(5, 6);
3664 		playSound(5, 10);
3665 		playSound(92, 20);
3666 		playSound(92, 38);
3667 		playSound(92, 58);
3668 		displayAsyncMessage(dsAddr_yawnMsg, 30, 114, 58, 67); // "(yawn)"
3669 		playActorAnimation(602);
3670 		playSound(5, 3);
3671 		playActorAnimation(603);
3672 		setOns(0, 27);
3673 		SET_FLAG(dsAddr_laundryState, 1);
3674 		break;
3675 
3676 	case 0x8bfc: // Give bone to dog
3677 		displayMessage(dsAddr_hereBoyMsg); // "Here, boy"
3678 		playSound(5, 3);
3679 		playSound(26, 13);
3680 		playActorAnimation(657, true);
3681 		playAnimation(658, 0, true);
3682 		waitAnimation();
3683 
3684 		reloadLan();
3685 		playAnimation(659, 0);
3686 
3687 		inventory->remove(kInvItemBone);
3688 		SET_FLAG(dsAddr_dogHasBoneFlag, 1);
3689 		{
3690 			Object *o = scene->getObject(7);
3691 			o->actorRect.left = o->actorRect.right = 297;
3692 			o->actorRect.top = o->actorRect.bottom = 181;
3693 			o->actorOrientation = 1;
3694 			o->save();
3695 		}
3696 		{
3697 			Object *o = scene->getObject(9);
3698 			o->actorRect.left = o->actorRect.right = 297;
3699 			o->actorRect.top = o->actorRect.bottom = 181;
3700 			o->actorOrientation = 1;
3701 			o->save();
3702 		}
3703 		{
3704 			Walkbox *w = scene->getWalkbox(0);
3705 			w->rect.right = 266;
3706 			w->rect.bottom = 193;
3707 			w->save();
3708 		}
3709 		wait(100);
3710 		displayMessage(dsAddr_friendsNowMsg); // "I hope we're friends now"
3711 		break;
3712 
3713 	case 0x8c6e: // Use car jack on rock
3714 		playSound(5, 3);
3715 		playSound(26, 13);
3716 		playSound(24, 22);
3717 		playActorAnimation(592);
3718 		playSound(1, 5);
3719 		playSound(1, 9);
3720 		playSound(1, 13);
3721 		setOns(0, 0);
3722 		playActorAnimation(593);
3723 		setOns(0, 28);
3724 		enableObject(1);
3725 		inventory->remove(kInvItemCarJack);
3726 		break;
3727 
3728 	case 0x8cc8: // Cut bush with sickle
3729 		playSound(5, 3);
3730 		playActorAnimation(644);
3731 		setOns(1, 45);
3732 		playSound(56, 2);
3733 		playSound(26, 4);
3734 		playActorAnimation(645);
3735 		playSound(56, 1);
3736 		playSound(56, 6);
3737 		playSound(26, 3);
3738 		playSound(26, 8);
3739 		playActorAnimation(646);
3740 		playSound(5, 21);
3741 		playActorAnimation(647);
3742 		SET_FLAG(dsAddr_caveThornsCutDownFlag, 1);
3743 		inventory->remove(kInvItemSickleSharp);
3744 		disableObject(2);
3745 		scene->getObject(3)->actorRect.right = 156;
3746 		scene->getObject(3)->save();
3747 		break;
3748 
3749 	case csAddr_mouseOutOfHoleTimeout: // mouse falls back from the hole (cave)
3750 		if (CHECK_FLAG(dsAddr_timedCallbackState, 1)) {
3751 			inventory->add(kInvItemMouse);
3752 			playSound(24, 26);
3753 			playActorAnimation(650, true);
3754 			playAnimation(651, 2, true);
3755 			waitAnimation();
3756 		} else {
3757 			playSound(27, 5);
3758 			setOns(1, 0);
3759 			playActorAnimation(652);
3760 			playSound(24, 4);
3761 			playSound(5, 12);
3762 			moveTo(186, 179, 1, true);
3763 			playActorAnimation(653);
3764 			playActorAnimation(654, true);
3765 			playAnimation(655, 2, true);
3766 			waitAnimation();
3767 			displayMessage(dsAddr_mouseGoneMsg); // "The mouse has gone!"
3768 			inventory->add(kInvItemRock);
3769 			setLan(2, 4, 27);
3770 			enableObject(4, 27);
3771 			SET_FLAG(dsAddr_mouseHoleState, 0);
3772 		}
3773 		SET_FLAG(dsAddr_timedCallbackState, 0);
3774 		break;
3775 
3776 	case csAddr_putRockInHole:
3777 		fnPutRockInHole();
3778 		break;
3779 
3780 	case 0x8f1d:
3781 		dialog->showMark(72, scene);
3782 		for (uint i = 16; i <= 30; i += 2)
3783 			playSound(56, i);
3784 		playSound(2, 64);
3785 		playSound(3, 74);
3786 		displayAsyncMessage(dsAddr_lastChanceMsg, 212, 80, 35, 50); // "Last chance?"
3787 		playActorAnimation(516, true);
3788 		playAnimation(517, 2, true);
3789 		playAnimation(518, 3, true);
3790 		waitAnimation();
3791 		setLan(3, 0);
3792 		setLan(4, 0);
3793 		disableObject(2);
3794 		disableObject(3);
3795 		inventory->remove(kInvItemShotgun);
3796 		SET_FLAG(dsAddr_birdsGoneFromScarecrowFlag, 1);
3797 		break;
3798 
3799 	case 0x8fc8:
3800 		displayMessage(dsAddr_comeHereMsg); // "Come here, I've got something for you"
3801 		waitLanAnimationFrame(2, 4);
3802 		playSound(5, 3);
3803 		playActorAnimation(627, true);
3804 		playAnimation(629, 1, true);
3805 		waitAnimation();
3806 		playSound(41, 10);
3807 		playSound(41, 47);
3808 		playSound(55, 52);
3809 		if (CHECK_FLAG(dsAddr_HankerchiefInMouseholeFlag, 1)) {
3810 			setLan(2, 0);
3811 			playActorAnimation(628, true);
3812 			playAnimation(634, 1, true);
3813 			waitAnimation();
3814 			disableObject(4);
3815 			displayMessage(dsAddr_trappedMouseMsg); // "The mouse is trapped!"
3816 			SET_FLAG(dsAddr_mouseHoleState, 1);
3817 		} else {
3818 			playActorAnimation(628, true);
3819 			playAnimation(630, 1, true);
3820 			waitAnimation();
3821 			displayMessage(dsAddr_cantCatchMsg); // "I can't catch it!"
3822 		}
3823 		break;
3824 
3825 	case 0x9054: // mouse hole
3826 		if (CHECK_FLAG(dsAddr_mouseGotGoldNuggetFlag, 1)) {
3827 			displayMessage(dsAddr_nonsenseMsg); // "Nonsense"
3828 		} else {
3829 			playSound(5, 11);
3830 			playSound(49, 21);
3831 			playActorAnimation(632);
3832 			setOns(5, 40);
3833 			moveTo(239, 139, 0, true);
3834 			playActorAnimation(633);
3835 			SET_FLAG(dsAddr_HankerchiefInMouseholeFlag, 1);
3836 			inventory->remove(kInvItemHandkerchief);
3837 			if (!CHECK_FLAG(dsAddr_mouseNerveMsgSaidFlag, 1)) {
3838 				SET_FLAG(dsAddr_mouseNerveMsgSaidFlag, 1);
3839 				displayMessage(dsAddr_mouseNerveMsg); // "Boy, this mouse has some nerve!"
3840 			}
3841 		}
3842 		break;
3843 
3844 	case 0x933d:
3845 		if (fnIsCookGone()) {
3846 			if (CHECK_FLAG(dsAddr_MansionRadioBrokenFlag, 1))
3847 				displayMessage(dsAddr_breakFlattenMsg); // "I wanted to break it, not to flatten it!"
3848 			else {
3849 				setOns(1, 0);
3850 				playSound(5, 3);
3851 				playSound(5, 33);
3852 				playSound(24, 13);
3853 				playSound(24, 19);
3854 				playSound(24, 23);
3855 				playSound(24, 26);
3856 				playSound(24, 29);
3857 				playSound(23, 21);
3858 				playSound(74, 25);
3859 				playActorAnimation(716);
3860 				setOns(1, 66);
3861 				SET_FLAG(dsAddr_MansionRadioBrokenFlag, 1);
3862 			}
3863 		}
3864 		break;
3865 
3866 	case 0x93af: // sheet + hot plate
3867 		if (fnIsCookGone()) {
3868 			playSound(5, 3);
3869 			playSound(86, 11);
3870 			playActorAnimation(720);
3871 			inventory->add(kInvItemBurningPaper);
3872 			inventory->remove(kInvItemSheetOfPaper);
3873 		}
3874 		break;
3875 
3876 	case 0x93d5: // burning sheet + plate
3877 		setOns(4, 0);
3878 		playSound(87, 7);
3879 		playActorAnimation(722);
3880 		playSound(5, 3);
3881 		playSound(88, 12);
3882 		playSound(87, 24);
3883 		playActorAnimation(723);
3884 		displayMessage(dsAddr_burnBabyMsg); // "Burn, baby, burn!"
3885 		wait(100);
3886 		playSound(89, 4);
3887 		playActorAnimation(724);
3888 		setOns(4, 68);
3889 		displayMessage(dsAddr_voilaMsg); // "Voila"
3890 		inventory->remove(kInvItemBurningPaper);
3891 		SET_FLAG(dsAddr_MansionPutBurningPaperInFridgeFlag, 1);
3892 		break;
3893 
3894 	case csAddr_openFullToolbox: // Right click to open toolbox
3895 		inventory->remove(kInvItemToolboxFull);
3896 		inventory->add(kInvItemToolboxHalfEmpty);
3897 		inventory->add(kInvItemCarJack);
3898 		inventory->activate(false);
3899 		inventory->resetSelectedObject();
3900 		displayMessage(dsAddr_carJackMsg); // "Wow! There's a car jack inside! Great!"
3901 		break;
3902 
3903 	case csAddr_openHalfEmptyToolbox:
3904 		inventory->remove(kInvItemToolboxHalfEmpty);
3905 		inventory->add(kInvItemSpanner);
3906 		inventory->activate(false);
3907 		inventory->resetSelectedObject();
3908 		displayMessage(dsAddr_spannerMsg); // "There's something else inside the toolbox! A spanner!"
3909 		break;
3910 
3911 	case 0x671d: // very last part of the game
3912 		moveTo(153, 163, 4);
3913 		playActorAnimation(973);
3914 		if (CHECK_FLAG(dsAddr_drawerPuzzleBookValue, 0)) {
3915 			SET_FLAG(dsAddr_drawerPuzzleBookValue, _rnd.getRandomNumber(5) + 1);
3916 		}
3917 		loadScene(30, 18, 159, 2);
3918 		break;
3919 
3920 	case 0x67a6:
3921 		loadScene(29, 149, 163, 1);
3922 		playActorAnimation(974);
3923 		moveTo(160, 188, 0);
3924 		break;
3925 
3926 	case 0x6805:
3927 		fnEgoBottomRightTurn();
3928 		playSound(32, 12);
3929 		playActorAnimation(694);
3930 		playSound(15, 8);
3931 		playAnimation(693, 0);
3932 		setOns(6, 0);
3933 		displayMessage(dsAddr_fullAutomaticMsg); // "Fully Automatic"
3934 		inventory->add(kInvItemVideoTape);
3935 		disableObject(4);
3936 		break;
3937 
3938 	case csAddr_egoBottomRightTurn:
3939 		fnEgoBottomRightTurn();
3940 		break;
3941 
3942 	case 0x687a: // using the book
3943 		if (CHECK_FLAG(dsAddr_drawerPuzzleSolvedFlag, 1)) {
3944 			displayMessage(dsAddr_dontMessMsg); // "I don't need to mess with it anymore"
3945 		} else {
3946 			playSound(49, 5);
3947 			playSound(49, 17);
3948 			playActorAnimation(691);
3949 			if (!fnCheckingDrawers()) {
3950 				if (!CHECK_FLAG(dsAddr_drawerPuzzleBookMessageFlag, 1)) {
3951 					displayMessage(dsAddr_bookHeldMsg); // "Something's got hold of the book!"
3952 					SET_FLAG(dsAddr_drawerPuzzleBookMessageFlag, 1);
3953 				}
3954 			} else {
3955 				playSound(15, 8); // secret compartment
3956 				playAnimation(692, 0);
3957 				setOns(6, 59);
3958 				enableObject(4);
3959 				displayMessage(dsAddr_secretCompartmentMsg); // "Wow! A secret compartment!"
3960 				SET_FLAG(dsAddr_drawerPuzzleSolvedFlag, 1);
3961 			}
3962 		}
3963 		break;
3964 
3965 	case csAddr_checkingDrawers:
3966 		fnCheckingDrawers();
3967 		break;
3968 
3969 	case 0x6918:
3970 		if (inventory->has(kInvItemSheetOfPaper))
3971 			displayMessage(dsAddr_noMoreSheetsMsg); // "Right now I don't need any more sheets"
3972 		else {
3973 			if (!CHECK_FLAG(dsAddr_mansionTrashcanSearchedFlag, 1)) {
3974 				playActorAnimation(695);
3975 				dialog->showMark(91, scene);
3976 				SET_FLAG(dsAddr_mansionTrashcanSearchedFlag, 1);
3977 			}
3978 
3979 			playSound(5, 11);
3980 			playActorAnimation(696);
3981 			inventory->add(kInvItemSheetOfPaper);
3982 		}
3983 		break;
3984 
3985 	case 0x6962:
3986 		if (CHECK_FLAG(dsAddr_blueDrawerOpenFlag, 1)) {
3987 			setOns(0, 0);
3988 			playSound(67, 4);
3989 			playActorAnimation(678);
3990 			SET_FLAG(dsAddr_blueDrawerOpenFlag, 0);
3991 		} else if (CHECK_FLAG(dsAddr_redDrawerOpenFlag, 1)) {
3992 			fnDrawerOpenMessage();
3993 		} else {
3994 			playSound(66, 4);
3995 			playActorAnimation(677);
3996 			setOns(0, 53);
3997 			SET_FLAG(dsAddr_blueDrawerOpenFlag, 1);
3998 		}
3999 		break;
4000 
4001 	case 0x69b8:
4002 		if (CHECK_FLAG(dsAddr_redDrawerOpenFlag, 1)) {
4003 			setOns(1, 0);
4004 			playSound(67, 4);
4005 			playActorAnimation(680);
4006 			SET_FLAG(dsAddr_redDrawerOpenFlag, 0);
4007 		} else if (CHECK_FLAG(dsAddr_blueDrawerOpenFlag, 1)) {
4008 			fnDrawerOpenMessage();
4009 		} else if (CHECK_FLAG(dsAddr_greyDrawerOpenFlag, 1)) {
4010 			fnDrawerOpenMessage();
4011 		} else {
4012 			playSound(66, 5);
4013 			playActorAnimation(679);
4014 			setOns(1, 54);
4015 			SET_FLAG(dsAddr_redDrawerOpenFlag, 1);
4016 		}
4017 		break;
4018 
4019 	case 0x6a1b:
4020 		if (CHECK_FLAG(dsAddr_greyDrawerOpenFlag, 1)) {
4021 			setOns(2, 0);
4022 			playSound(67, 5);
4023 			playActorAnimation(682);
4024 			SET_FLAG(dsAddr_greyDrawerOpenFlag, 0);
4025 		} else if (CHECK_FLAG(dsAddr_redDrawerOpenFlag, 1)) {
4026 			fnDrawerOpenMessage();
4027 		} else {
4028 			playSound(67, 5);
4029 			playActorAnimation(681);
4030 			setOns(2, 55);
4031 			SET_FLAG(dsAddr_greyDrawerOpenFlag, 1);
4032 		}
4033 		break;
4034 
4035 	case 0x6a73:
4036 		if (CHECK_FLAG(dsAddr_greenDrawerOpenFlag, 1)) {
4037 			setOns(3, 0);
4038 			playSound(67, 4);
4039 			playActorAnimation(684);
4040 			SET_FLAG(dsAddr_greenDrawerOpenFlag, 0);
4041 		} else if (!CHECK_FLAG(dsAddr_brownDrawerOpenFlag, 1)) {
4042 			playSound(66, 4);
4043 			playActorAnimation(683);
4044 			setOns(3, 56);
4045 			SET_FLAG(dsAddr_greenDrawerOpenFlag, 1);
4046 		} else
4047 			fnDrawerOpenMessage();
4048 		break;
4049 
4050 	case 0x6acb:
4051 		if (CHECK_FLAG(dsAddr_brownDrawerOpenFlag, 1)) {
4052 			setOns(4, 0);
4053 			playSound(67, 4);
4054 			playActorAnimation(686);
4055 			SET_FLAG(dsAddr_brownDrawerOpenFlag, 0);
4056 		} else if (CHECK_FLAG(dsAddr_greenDrawerOpenFlag, 1)) {
4057 			fnDrawerOpenMessage();
4058 		} else if (CHECK_FLAG(dsAddr_pinkDrawerOpenFlag, 1)) {
4059 			fnDrawerOpenMessage();
4060 		} else {
4061 			playSound(66, 5);
4062 			playActorAnimation(685);
4063 			setOns(4, 57);
4064 			SET_FLAG(dsAddr_brownDrawerOpenFlag, 1);
4065 		}
4066 		break;
4067 
4068 	case 0x6b2e:
4069 		if (CHECK_FLAG(dsAddr_pinkDrawerOpenFlag, 1)) {
4070 			setOns(5, 0);
4071 			playSound(67, 5);
4072 			playActorAnimation(688);
4073 			SET_FLAG(dsAddr_pinkDrawerOpenFlag, 0);
4074 		} else if (CHECK_FLAG(dsAddr_brownDrawerOpenFlag, 1)) {
4075 			fnDrawerOpenMessage();
4076 		} else {
4077 			playSound(66, 6);
4078 			playActorAnimation(687);
4079 			setOns(5, 58);
4080 			SET_FLAG(dsAddr_pinkDrawerOpenFlag, 1);
4081 		}
4082 		break;
4083 
4084 	case csAddr_DrawerOpenMessage:
4085 		fnDrawerOpenMessage();
4086 		break;
4087 
4088 	case 0x6be1: // handle to the bathroom
4089 		if (CHECK_FLAG(dsAddr_MansionJohnNotyEscapingFlag, 1))
4090 			displayMessage(dsAddr_catchJohnFirstMsg); // "I'd better catch John Noty first"
4091 		else {
4092 			playSound(88, 4);
4093 			playActorAnimation(808);
4094 			loadScene(36, 41, 195, 2);
4095 		}
4096 		break;
4097 
4098 	case 0x6bad:
4099 		playSound(80, 4);
4100 		playActorAnimation(971);
4101 		loadScene(32, 139, 199, 1);
4102 		break;
4103 
4104 	case 0x6c45:
4105 		playSound(89, 6);
4106 		playActorAnimation(CHECK_FLAG(dsAddr_mansionHandleInDoorHoleFlag, 1) ? 985 : 806);
4107 		loadScene(34, 40, 133, 2);
4108 		break;
4109 
4110 	case 0x6c83:
4111 		waitLanAnimationFrame(1, 1);
4112 		dialog->pop(scene, dsAddr_dialogStackRobotSafe, 0, 727, textColorMark, textColorMike, 0, 1);
4113 		scene->getObject(1)->setName((const char *)res->dseg.ptr(dsAddr_scnObjNameMike));
4114 		SET_FLAG(dsAddr_MansionRobotSafeUnlockedFlag, 1);
4115 		break;
4116 
4117 	case 0x6c9d: // getting jar
4118 		setOns(0, 71);
4119 		playSound(32, 5);
4120 		playActorAnimation(732);
4121 		disableObject(2);
4122 		inventory->add(kInvItemTimePills);
4123 		break;
4124 
4125 	case 0x6cc4: // secret diary
4126 		playActorAnimation(754);
4127 		hideActor();
4128 
4129 		displayCutsceneMessage(dsAddr_cutsceneMsg0, 30, 95); // "A secret diary of ..."
4130 
4131 		playMusic(3);
4132 		loadScene(11, scene->getPosition());
4133 
4134 		playAnimation(750, 2);
4135 		dialog->show(117, scene, 751, 529, textColorProfessor, textColorMansionGuard, 2, 1);
4136 
4137 		playAnimation(752, 0, true);
4138 		playAnimation(753, 1, true);
4139 		waitAnimation();
4140 		dialog->show(118, scene, 529, 751, textColorMansionGuard, textColorProfessor, 1, 2);
4141 
4142 		loadScene(30, scene->getPosition());
4143 		dialog->show(108, scene, 733, 734, textColorProfessor, textColorJohnNoty, 2, 3);
4144 
4145 		playSound(75, 13);
4146 		playSound(32, 22);
4147 		playAnimation(735, 1, true);
4148 		playAnimation(736, 2, true);
4149 		waitAnimation();
4150 		dialog->show(109, scene, 737, 738, textColorJohnNoty, textColorProfessor, 3, 2);
4151 
4152 		playSound(32, 1);
4153 		playAnimation(739, 1, true);
4154 		playAnimation(740, 2, true);
4155 		waitAnimation();
4156 		dialog->show(110, scene, 733, 734, textColorProfessor, textColorJohnNoty, 2, 3);
4157 
4158 		playAnimation(742, 1, true);
4159 		playAnimation(741, 2, true);
4160 		waitAnimation();
4161 		dialog->show(111, scene, 743, 733, textColorJohnNoty, textColorProfessor, 3, 2);
4162 
4163 		playAnimation(744, 1, true);
4164 		playAnimation(745, 2, true);
4165 		waitAnimation();
4166 		dialog->show(112, scene, 734, 733, textColorJohnNoty, textColorProfessor, 3, 2);
4167 
4168 		playAnimation(746, 1, true);
4169 		playAnimation(747, 2, true);
4170 		waitAnimation();
4171 
4172 		dialog->show(113, scene, 734, 734, textColorJohnNoty, textColorJohnNoty, 3, 3);
4173 		dialog->show(114, scene, 748, 748, textColorJohnNoty, textColorJohnNoty, 3, 3);
4174 		dialog->show(115, scene, 749, 749, textColorJohnNoty, textColorJohnNoty, 3, 3);
4175 		dialog->show(116, scene, 748, 748, textColorJohnNoty, textColorJohnNoty, 3, 3);
4176 
4177 		playMusic(10);
4178 		loadScene(32, scene->getPosition());
4179 		showActor();
4180 		playSound(26, 10);
4181 		playActorAnimation(755);
4182 		moveRel(0, 0, 3);
4183 
4184 		dialog->showMark(119, scene);
4185 
4186 		hideActor();
4187 		loadScene(31, scene->getPosition());
4188 		dialog->show(123, scene, 763, 764, textColorMansionGuard, textColorJohnNoty, 1, 2);
4189 
4190 		loadScene(32, scene->getPosition());
4191 		showActor();
4192 		dialog->showMark(120, scene);
4193 		disableObject(3);
4194 		enableObject(7);
4195 
4196 		SET_FLAG(dsAddr_MansionJohnNotyOutsideBathroomFlag, 1);
4197 		break;
4198 
4199 	case 0x6f20:
4200 		if (CHECK_FLAG(dsAddr_MansionJohnNotyOutsideBathroomFlag, 1))
4201 			displayMessage(dsAddr_cantHideMsg); // "I can't hide here!"
4202 		else
4203 			rejectMessage();
4204 		break;
4205 
4206 	case 0x6f75: // hiding in left corner
4207 		moveRel(0, 0, 3);
4208 		playActorAnimation(756);
4209 		hideActor();
4210 		playAnimation(758, 1);
4211 		dialog->show(121, scene, 759, 759, textColorJohnNoty, textColorJohnNoty, 2, 2);
4212 
4213 		playSound(40, 5);
4214 		playSound(52, 13);
4215 		playSound(52, 17);
4216 		playSound(52, 21);
4217 		playAnimation(760, 1);
4218 		setOns(1, 72);
4219 		setOns(2, 73);
4220 		loadScene(31, scene->getPosition());
4221 		playSound(58, 5);
4222 		playSound(58, 8);
4223 		playSound(58, 10);
4224 		playSound(58, 12);
4225 		playSound(58, 14);
4226 		playAnimation(765, 1);
4227 		dialog->show(124, scene, 766, 766, textColorMansionGuard, textColorMansionGuard, 1, 1);
4228 		loadScene(32, scene->getPosition());
4229 		dialog->show(122, scene, 761, 761, textColorJohnNoty, textColorJohnNoty, 2, 2);
4230 		playAnimation(762, 1);
4231 		setOns(2, 0);
4232 		showActor();
4233 		playActorAnimation(757);
4234 		moveRel(0, 0, 1);
4235 		displayMessage(dsAddr_wasCloseMsg); // "That was close"
4236 		enableObject(8);
4237 		disableObject(7);
4238 
4239 		SET_FLAG(dsAddr_MansionJohnNotyOutsideBathroomFlag, 0);
4240 		break;
4241 
4242 	case 0x6f4d:
4243 		if (CHECK_FLAG(dsAddr_MansionJohnNotyOutsideBathroomFlag, 1))
4244 			displayMessage(dsAddr_johnOutsideMsg); // "There's John Noty outside! I can't go out!"
4245 		else
4246 			loadScene(31, 139, 172, 3);
4247 		break;
4248 
4249 	case 0x6f32:
4250 		if (CHECK_FLAG(dsAddr_MansionJohnNotyOutsideBathroomFlag, 1)) {
4251 			displayMessage(dsAddr_cantHideMsg); // "I can't hide here!"
4252 		} else {
4253 			playActorAnimation(977);
4254 			displayMessage(dsAddr_lockedMsg); // "It's Locked!"
4255 		}
4256 		break;
4257 
4258 	case 0x7096:
4259 		playSound(32, 5);
4260 		playActorAnimation(767);
4261 		setOns(1, 0);
4262 		inventory->add(kInvItemHandle);
4263 		disableObject(8);
4264 		break;
4265 
4266 	case 0x7218:
4267 		rejectMessage();
4268 		break;
4269 
4270 	case 0x7291:
4271 		playSound(89, 3);
4272 		playActorAnimation(975);
4273 		loadScene(31, 298, 177, 4);
4274 		break;
4275 
4276 	case 0x72c2:
4277 		if (CHECK_FLAG(dsAddr_MansionSinkState, 2)) {
4278 			displayMessage(dsAddr_enoughWaterMsg); // "There's enough water in the sink"
4279 		} else {
4280 			playSound(79, 6);
4281 			playSound(84, 9);
4282 			playActorAnimation(801);
4283 			wait(50);
4284 			if (CHECK_FLAG(dsAddr_MansionSinkState, 1)) {
4285 				displayMessage(dsAddr_sinkFullMsg); // "The sink is full of hot water"
4286 				SET_FLAG(dsAddr_MansionSinkState, 2);
4287 			} else
4288 				displayMessage(dsAddr_waterHotMsg); // "The water looks very hot"
4289 		}
4290 		break;
4291 
4292 	case 0x7309:
4293 		playSound(66, 5);
4294 		playSound(67, 11);
4295 		playActorAnimation(976);
4296 		displayMessage(dsAddr_emptyMsg); // "It's Empty"
4297 		break;
4298 
4299 	case 0x77d5:
4300 		if (CHECK_FLAG(dsAddr_MansionThruFanByTimePillFlag, 1) && !CHECK_FLAG(dsAddr_MansionVentFanStoppedFlag, 1)) { // disallow exiting through the first door until switch turned on, not present in original game
4301 			displayMessage(dsAddr_noSaladMsg); // "I don't want to turn myself into a salad"
4302 		} else {
4303 			playSound(89, 6);
4304 			playActorAnimation(978);
4305 			loadScene(31, 298, 177, 4);
4306 		}
4307 		break;
4308 
4309 	case 0x79e4:
4310 		fnEgoBottomRightTurn();
4311 		retVal = false;
4312 		break;
4313 
4314 	case 0x79eb: // color of the book
4315 		// FIXME - Replace with internal lookup and switch
4316 		displayMessage(res->dseg.get_word(dsAddr_bookColorMsgPtr + GET_FLAG(dsAddr_drawerPuzzleBookValue) * 2 - 2));
4317 		break;
4318 
4319 	case 0x79fd:
4320 		if (CHECK_FLAG(dsAddr_blueDrawerOpenFlag, 1))
4321 			displayMessage(dsAddr_blueInteriorMsg); // "It's got a blue interior"
4322 		else
4323 			retVal = false;
4324 		break;
4325 
4326 	case 0x7a0f:
4327 		if (CHECK_FLAG(dsAddr_redDrawerOpenFlag, 1)) {
4328 			if (!CHECK_FLAG(dsAddr_drawerGotPolaroidFlag, 1)) {
4329 				displayMessage(dsAddr_foundPolaroidMsg); // "There's a polaroid inside! I might need that"
4330 				playSound(5, 11);
4331 				playActorAnimation(690);
4332 				inventory->add(kInvItemPolaroidCamera);
4333 				SET_FLAG(dsAddr_drawerGotPolaroidFlag, 1);
4334 			}
4335 			displayMessage(dsAddr_redInteriorMsg); // "It's got a red interior"
4336 		} else
4337 			retVal = false;
4338 		break;
4339 
4340 	case 0x7a49:
4341 		if (CHECK_FLAG(dsAddr_greyDrawerOpenFlag, 1))
4342 			displayMessage(dsAddr_greyInteriorMsg); // "It's got a grey interior"
4343 		else
4344 			retVal = false;
4345 		break;
4346 
4347 	case 0x7a5b:
4348 		if (CHECK_FLAG(dsAddr_greenDrawerOpenFlag, 1))
4349 			displayMessage(dsAddr_greenInteriorMsg); // "It's got a green interior"
4350 		else
4351 			retVal = false;
4352 		break;
4353 
4354 	case 0x7a6d:
4355 		if (CHECK_FLAG(dsAddr_brownDrawerOpenFlag, 1))
4356 			displayMessage(dsAddr_brownInteriorMsg); // "It's got a brown interior"
4357 		else
4358 			retVal = false;
4359 		break;
4360 
4361 	case 0x7a7f:
4362 		if (CHECK_FLAG(dsAddr_pinkDrawerOpenFlag, 1)) {
4363 			if (!CHECK_FLAG(dsAddr_drawerGotDictaphoneFlag, 1)) {
4364 				displayMessage(dsAddr_dictaphoneInsideMsg); // "Wow! There's a dictaphone inside!"
4365 				playSound(5, 12);
4366 				playActorAnimation(689);
4367 				inventory->add(kInvItemDictaphoneNoBatteries);
4368 				SET_FLAG(dsAddr_drawerGotDictaphoneFlag, 1);
4369 			}
4370 			displayMessage(dsAddr_pinkInteriorMsg); // "It's got a pink interior"
4371 		} else
4372 			retVal = false;
4373 		break;
4374 
4375 	case 0x7af7:
4376 		if (CHECK_FLAG(dsAddr_MansionPutBurningPaperInFridgeFlag, 1))
4377 			displayMessage(dsAddr_yummyMsg); // "Yummy"
4378 		else
4379 			retVal = false;
4380 		break;
4381 
4382 	case 0x7b09:
4383 		{
4384 			byte v = GET_FLAG(dsAddr_MansionSinkState);
4385 			switch (v) {
4386 			case 1:
4387 				displayMessage(dsAddr_corkInHoleMsg); // "The cork is stuck in the hole"
4388 				break;
4389 			case 2:
4390 				displayMessage(dsAddr_sinkFullMsg); // "The sink is full of hot water"
4391 				break;
4392 			default:
4393 				retVal = false;
4394 				break;
4395 			}
4396 		}
4397 		break;
4398 
4399 	case csAddr_robotSafeAlreadyUnlockedCheck:
4400 		fnRobotSafeAlreadyUnlockedCheck();
4401 		break;
4402 
4403 	case csAddr_robotSafeUnlockCheck:
4404 		fnRobotSafeUnlockCheck();
4405 		break;
4406 
4407 	case 0x90bc: // handle on the hole
4408 		playSound(5, 3);
4409 		playSound(6, 9);
4410 		playActorAnimation(807);
4411 		setOns(0, 83);
4412 		inventory->remove(kInvItemHandle);
4413 		disableObject(2);
4414 		enableObject(3);
4415 		SET_FLAG(dsAddr_mansionHandleInDoorHoleFlag, 1);
4416 		break;
4417 
4418 	case 0x90fc: // dictaphone on robot
4419 		if (fnRobotSafeAlreadyUnlockedCheck()) {
4420 			if (CHECK_FLAG(dsAddr_MansionRobotSafeVoiceTestPassedFlag, 1)) {
4421 				displayMessage(dsAddr_fooledOnceMsg); // "I'd already fooled him once"
4422 			} else {
4423 				if (!CHECK_FLAG(dsAddr_usedDictaphoneOnTVFlag, 1)) {
4424 					displayMessage(dsAddr_notMyVoiceMsg); // "I won't cheat Mike with MY voice"
4425 				} else {
4426 					displayMessage(dsAddr_mikeVoiceTestMsg); // "Mike, activate the voice test"
4427 					waitLanAnimationFrame(1, 1);
4428 
4429 					playSound(5, 3);
4430 					playSound(5, 39);
4431 					displayAsyncMessage(dsAddr_singingMsg, 68, 126, 9, 35, textColorJohnNoty); // "siiiiinging!"
4432 					playActorAnimation(728);
4433 
4434 					waitLanAnimationFrame(1, 1);
4435 					dialog->show(98, scene, 0, 727, textColorMark, textColorMike, 0, 1);
4436 					SET_FLAG(dsAddr_MansionRobotSafeVoiceTestPassedFlag, 1);
4437 					fnRobotSafeUnlockCheck();
4438 				}
4439 			}
4440 		}
4441 		break;
4442 
4443 	case 0x91cb: // use socks on robot
4444 		if (fnRobotSafeAlreadyUnlockedCheck()) {
4445 			if (CHECK_FLAG(dsAddr_MansionRobotSafeScentTestPassedFlag, 1)) {
4446 				displayMessage(dsAddr_fooledOnceMsg); // "I'd already fooled him once"
4447 			} else {
4448 				displayMessage(dsAddr_mikeScentTestMsg); // "Mike, let's get on with the scent test"
4449 
4450 				waitLanAnimationFrame(1, 1);
4451 				playSound(5, 3);
4452 				playSound(5, 23);
4453 				playActorAnimation(729);
4454 
4455 				waitLanAnimationFrame(1, 1);
4456 				dialog->show(99, scene, 0, 727, textColorMark, textColorMike, 0, 1);
4457 				SET_FLAG(dsAddr_MansionRobotSafeScentTestPassedFlag, 1);
4458 				fnRobotSafeUnlockCheck();
4459 			}
4460 		}
4461 		break;
4462 
4463 	case 0x9209: // photo on robot
4464 		if (fnRobotSafeAlreadyUnlockedCheck()) {
4465 			if (CHECK_FLAG(dsAddr_MansionRobotSafeViewTestPassedFlag, 1)) {
4466 				displayMessage(dsAddr_fooledOnceMsg); // "I'd already fooled him once"
4467 			} else {
4468 				displayMessage(dsAddr_mikeViewTestMsg); // "Mike, run the view test"
4469 				waitLanAnimationFrame(1, 1);
4470 
4471 				playSound(5, 3);
4472 				playSound(5, 25);
4473 				playActorAnimation(730);
4474 
4475 				waitLanAnimationFrame(1, 1);
4476 				dialog->show(100, scene, 0, 727, textColorMark, textColorMike, 0, 1);
4477 				SET_FLAG(dsAddr_MansionRobotSafeViewTestPassedFlag, 1);
4478 				fnRobotSafeUnlockCheck();
4479 			}
4480 		}
4481 		break;
4482 
4483 	case 0x9247:
4484 		displayMessage(dsAddr_sameBottleMsg); // "The bottle's the same, but I doubt if it's enough to fool anyone"
4485 		break;
4486 
4487 	case 0x924e:
4488 		setOns(2, 64);
4489 		playSound(5, 3);
4490 		playSound(52, 10);
4491 		playActorAnimation(711);
4492 		moveRel(0, 0, 4);
4493 		dialog->show(95, scene, 0, 709, textColorMark, textColorCook, 0, 1);
4494 		moveTo(300, 190, 4);
4495 		inventory->remove(kInvItemFakeChilli);
4496 		disableObject(8);
4497 		playAnimation(712, 0);
4498 		setOns(2, 0);
4499 		playSound(15, 26);
4500 		playSound(15, 28);
4501 		playSound(16, 37);
4502 		playAnimation(713, 0);
4503 		dialog->show(96, scene, 0, 709, textColorMark, textColorCook, 0, 1);
4504 		playSound(85, 2);
4505 		playAnimation(714, 0);
4506 		setLan(1, 0);
4507 		disableObject(1);
4508 		{
4509 			Object *obj = scene->getObject(2);
4510 			obj->actorRect.left = obj->actorRect.right = 81;
4511 			obj->actorRect.top = obj->actorRect.bottom = 160;
4512 			obj->actorOrientation = 4;
4513 			obj->save();
4514 		}
4515 		{
4516 			Object *obj = scene->getObject(3);
4517 			obj->actorRect.left = obj->actorRect.right = 64;
4518 			obj->actorRect.top = obj->actorRect.bottom = 168;
4519 			obj->actorOrientation = 4;
4520 			obj->save();
4521 		}
4522 		{
4523 			Object *obj = scene->getObject(10);
4524 			obj->actorRect.left = obj->actorRect.right = 105;
4525 			obj->actorRect.top = obj->actorRect.bottom = 160;
4526 			obj->actorOrientation = 1;
4527 			obj->save();
4528 		}
4529 		SET_FLAG(dsAddr_MansionCookGoneFlag, 1);
4530 		break;
4531 
4532 	case 0x9472:
4533 		playSound(5, 4);
4534 		playSound(19, 14);
4535 		playActorAnimation(793);
4536 		displayMessage(dsAddr_fitsPerfectMsg); // "It fits perfectly!"
4537 		inventory->remove(kInvItemWrappedCork);
4538 		SET_FLAG(dsAddr_MansionSinkState, 1);
4539 		break;
4540 
4541 	case 0x9449: // meat + stew
4542 		playSound(5, 4);
4543 		playSound(63, 12);
4544 		playActorAnimation(726);
4545 		displayMessage(dsAddr_dislikeVealMsg); // "I never liked veal anyway"
4546 		inventory->remove(kInvItemMeat);
4547 		inventory->add(kInvItemPlasticBag);
4548 		break;
4549 
4550 	case 0x949b:
4551 		if (CHECK_FLAG(dsAddr_MansionSinkState, 2)) {
4552 			playSound(5, 4);
4553 			playSound(5, 25);
4554 			playActorAnimation(802);
4555 			displayMessage(dsAddr_labelOffMsg); // "The label has come off!"
4556 			inventory->remove(kInvItemChilliWithLabel);
4557 			inventory->add(kInvItemChilliNoLabel);
4558 			inventory->add(kInvItemLabel);
4559 		} else
4560 			displayMessage(dsAddr_noHotWaterMsg); // "There's no hot water in the sink"
4561 		break;
4562 
4563 	case 0x94d4:
4564 		if (inventory->has(kInvItemPlasticBag)) {
4565 			setOns(0, 0);
4566 			playSound(5, 3);
4567 			playSound(5, 18);
4568 			playSound(13, 12);
4569 			playActorAnimation(803);
4570 			disableObject(7);
4571 			inventory->remove(kInvItemPlasticBag);
4572 			inventory->add(kInvItemSocks);
4573 		} else
4574 			displayMessage(dsAddr_noSockStoreMsg); // "I don't have anything to store these socks in"
4575 		break;
4576 
4577 	case 0x951b:
4578 		playSound(5, 4);
4579 		playSound(5, 22);
4580 		playActorAnimation(804);
4581 		displayMessage(dsAddr_corkTooSmallMsg); // "The cork is a bit too small"
4582 		break;
4583 
4584 	case 0x73a3:
4585 		if (CHECK_FLAG(dsAddr_mansionTVOnFlag, 1)) {
4586 			SET_FLAG(dsAddr_mansionTVOnFlag, 0);
4587 
4588 			//call 73e6
4589 			playSound(71, 3);
4590 			playActorAnimation(700);
4591 			playAnimation(0, 0, true);
4592 			reloadLan();
4593 
4594 			if (CHECK_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 1)) {
4595 				displayMessage(dsAddr_muchBetterMsg); // "That's much better"
4596 			}
4597 		} else {
4598 			SET_FLAG(dsAddr_mansionTVOnFlag, 1);
4599 
4600 			//call 73e6
4601 			playSound(71, 3);
4602 			playActorAnimation(700);
4603 			reloadLan();
4604 		}
4605 		break;
4606 
4607 	case 0x9537: // using remote on VCR
4608 		playSound(5, 3);
4609 		playSound(5, 16);
4610 		playActorAnimation(703);
4611 		if (!CHECK_FLAG(dsAddr_mansionVCRTapeLoadedFlag, 1))
4612 			displayMessage(dsAddr_NotHappenMsg); // "Nothing happened"
4613 		else {
4614 			//0x955a
4615 			if (CHECK_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 0)) {
4616 				if (CHECK_FLAG(dsAddr_mansionTVOnFlag, 1)) {
4617 					if (!CHECK_FLAG(dsAddr_mansionVCRPlayedTapeBeforeFlag, 1))
4618 						displayMessage(dsAddr_tapeStartedMsg); // "The tape started!"
4619 
4620 					SET_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 1);
4621 					reloadLan();
4622 					if (!CHECK_FLAG(dsAddr_mansionVCRPlayedTapeBeforeFlag, 1)) {
4623 						dialog->show(93, scene, 0, 702, textColorMark, textColorJohnNoty, 0, 1);
4624 						SET_FLAG(dsAddr_mansionVCRPlayedTapeBeforeFlag, 1);
4625 					}
4626 				} else
4627 					displayMessage(dsAddr_tvOffMsg); // "I just realized that the TV is off"
4628 			} else {
4629 				SET_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 0);
4630 				if (CHECK_FLAG(dsAddr_mansionTVOnFlag, 1)) {
4631 					reloadLan();
4632 					displayMessage(dsAddr_muchBetterMsg); // "That's much better"
4633 				}
4634 			}
4635 		}
4636 		break;
4637 
4638 	case 0x95eb: // polaroid + tv
4639 		if (CHECK_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 1)) {
4640 			if (CHECK_FLAG(dsAddr_usedPolaroidOnTVFlag, 1)) {
4641 				displayMessage(dsAddr_enoughPhotosMsg); // "I don't need any more photos"
4642 			} else {
4643 				playSound(5, 3);
4644 				playSound(5, 24);
4645 				playSound(90, 18);
4646 				playActorAnimation(707);
4647 				inventory->add(kInvItemPhoto);
4648 				SET_FLAG(dsAddr_usedPolaroidOnTVFlag, 1);
4649 			}
4650 		} else
4651 			displayMessage(dsAddr_notRightMomentMsg); // "I don't think this is the right moment"
4652 		break;
4653 
4654 	case 0x962f: // dictaphone + tv
4655 		if (CHECK_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 1)) {
4656 			if (CHECK_FLAG(dsAddr_usedDictaphoneOnTVFlag, 1)) {
4657 				displayMessage(dsAddr_alreadyRecordedMsg); // "I already recorded what I wanted to"
4658 			} else {
4659 				displayMessage(dsAddr_recordScareMsg); // "Yeah, I can record this and scare the cats"
4660 				playSound(5, 3);
4661 				playSound(5, 27);
4662 				playActorAnimation(708);
4663 				SET_FLAG(dsAddr_usedDictaphoneOnTVFlag, 1);
4664 			}
4665 		} else
4666 			displayMessage(dsAddr_notRightMomentMsg); // "I don't think this is the right moment"
4667 		break;
4668 
4669 	case 0x95c8:
4670 		playSound(5, 3);
4671 		playSound(91, 12);
4672 		playActorAnimation(706);
4673 		inventory->remove(kInvItemVideoTape);
4674 		SET_FLAG(dsAddr_mansionVCRTapeLoadedFlag, 1);
4675 		break;
4676 
4677 	case 0x966c:
4678 		displayMessage(dsAddr_cantRecordNoBatteriesMsg); // "I can't record anything until I find some batteries"
4679 		break;
4680 
4681 	case 0x9673: // hit fatso - final scene
4682 		playSound(5, 3);
4683 		playSound(24, 10);
4684 		playActorAnimation(798);
4685 		playSound(63, 11);
4686 		playSound(19, 20);
4687 		playAnimation(799, 0);
4688 		moveTo(50, 170, 1);
4689 		playAnimation(800, 0, true, true, true);
4690 		wait(100);
4691 		playActorAnimation(805);
4692 		moveTo(50, 170, 3);
4693 		displayMessage(dsAddr_onlyChilliMsg); // "Good this red stuff is only a chilli"
4694 		//moveTo(105, 157, 0, true);
4695 		playMusic(3);
4696 		loadScene(11, 105, 157, 4);
4697 
4698 		dialog->show(203, scene, 0, 938, textColorMark, textColorCaptain, 0, 1);
4699 
4700 		playAnimation(939, 0, true, true);
4701 		playActorAnimation(942, true);
4702 		waitAnimation();
4703 
4704 		playAnimation(939, 0, true, true);
4705 		playAnimation(935, 1, true, true);
4706 		playActorAnimation(943, true);
4707 		waitAnimation();
4708 
4709 		playAnimation(940, 0, true, true);
4710 		playAnimation(936, 1, true, true);
4711 		playActorAnimation(944, true);
4712 		waitAnimation();
4713 
4714 		playAnimation(941, 0, true, true);
4715 		playAnimation(937, 1, true, true);
4716 		playActorAnimation(945, true);
4717 		waitAnimation();
4718 
4719 		dialog->show(204, scene, 0, 938, textColorMark, textColorCaptain, 0, 1);
4720 		playAnimation(946, 0);
4721 		dialog->show(205, scene, 0, 938, textColorMark, textColorCaptain, 0, 1);
4722 
4723 		playSound(24, 7);
4724 		playAnimation(948, 0, true);
4725 		playActorAnimation(947, true);
4726 		waitAnimation();
4727 
4728 		loadScene(40, 198, 186, 1);
4729 		dialog->show(206, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
4730 		dialog->show(207, scene, 0, 921, textColorMark, textColorRGBBoss, 0, 1);
4731 		playAnimation(923, 0);
4732 		dialog->show(208, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
4733 
4734 		moveTo(237, 186, 0);
4735 		moveTo(237, 177, 0);
4736 		moveTo(192, 177, 4);
4737 		playAnimation(949, 0);
4738 		dialog->showMono(209, scene, 950, textColorRGBBoss, 1);
4739 
4740 		playSound(32, 5);
4741 		playSound(40, 14);
4742 
4743 		playAnimation(951, 0, true);
4744 		playActorAnimation(952, true);
4745 		waitAnimation();
4746 
4747 		playMusic(11);
4748 		displayCredits();
4749 		loadScene(39, 192, 177, 0);
4750 		hideActor();
4751 		dialog->showMono(210, scene, 953, textColorMarkEnd, 1);
4752 		playSound(5, 15);
4753 		playAnimation(954, 0);
4754 		dialog->showMono(211, scene, 955, textColorMarkEnd, 1);
4755 		playMusic(2);
4756 		displayCredits(dsAddr_finalCredits6, 4500); // 3 minutes (infinite until key pressed in original)
4757 		scene->push(SceneEvent(SceneEvent::kQuit));
4758 		break;
4759 
4760 	case csAddr_useDivingEquipment: // using diving eq
4761 		// FIXME - Some code is missing here as displayMessage(dsAddr_cantTalkUnderwaterMsg),
4762 		//         displayMessage(dsAddr_notSwimmingThereMsg), displayMessage(dsAddr_tooLittleAirMsg)
4763 		//         displayMessage(dsAddr_fishDontWorryMsg) are never called.
4764 		{
4765 			int id = scene->getId();
4766 			if (id != 15) {
4767 				if (id == 16)
4768 					displayMessage(dsAddr_notHereMsg); // "Not here"
4769 				else
4770 					displayMessage(dsAddr_notBestPlaceMsg); // "It's not the best place for diving"
4771 			} else {
4772 				playSound(5, 3);
4773 				playSound(38, 16);
4774 				playSound(38, 22);
4775 				playActorAnimation(614);
4776 				playSound(5, 3);
4777 				playSound(44, 10);
4778 				playSound(20, 26);
4779 				playActorAnimation(615);
4780 				loadScene(17, 156, 180, 3);
4781 				SET_FLAG(dsAddr_timedCallbackState, 4);
4782 				playSound(64, 7);
4783 				playSound(64, 21);
4784 				playSound(64, 42);
4785 				playSound(64, 63);
4786 				setTimerCallback(csAddr_noAnchorTimeout, 30);
4787 				playActorAnimation(617, false, true);
4788 			}
4789 		}
4790 		break;
4791 
4792 	case csAddr_noAnchorTimeout: // no anchor, timeout
4793 		SET_FLAG(dsAddr_timedCallbackState, 0);
4794 		fnGetOutOfLake();
4795 		INC_FLAG(dsAddr_lakeDivingExitMessage);
4796 		switch (GET_FLAG(dsAddr_lakeDivingExitMessage)) {
4797 		case 1:
4798 			displayMessage(dsAddr_seaweedMsg); // "This seaweed is just like the flowers I gave mum on her last birthday"
4799 			break;
4800 		case 2:
4801 			displayMessage(dsAddr_fishBoatMsg); // "I wonder what fish do inside this boat at night"
4802 			break;
4803 		case 3:
4804 			displayMessage(dsAddr_fishSomethingMsg); // "I think I have to fish out something down there"
4805 			break;
4806 		case 4:
4807 			displayMessage(dsAddr_notRedHerringMsg); // "I hope all this fish stuff is not a red herring"
4808 			break;
4809 		case 5:
4810 			displayMessage(dsAddr_seaweedMsg); // "This seaweed is just like the flowers I gave mum on her last birthday"
4811 			break;
4812 		default:
4813 			displayMessage(dsAddr_niceDownMsg); // "It's nice down there"
4814 			break;
4815 		}
4816 		break;
4817 
4818 	case csAddr_gotAnchor:
4819 		fnGotAnchor();
4820 		break;
4821 
4822 	case csAddr_getOutOfLake:
4823 		fnGetOutOfLake();
4824 		break;
4825 
4826 	case csAddr_digMansionWall:
4827 		if (scene->getId() == 13) {
4828 			moveTo(172, 181, 1);
4829 			playSound(26, 19);
4830 			for (uint i = 0; i < 8; ++i)
4831 				playSound(26, 30 + i * 11);
4832 			playActorAnimation(661);
4833 			displayCutsceneMessage(dsAddr_cutsceneMsgA, 84, 95); // "Hundred moments later"
4834 			playSound(56, 10);
4835 			playSound(56, 21);
4836 
4837 			playSound(8, 48);
4838 			for (uint i = 0; i < 7; ++i)
4839 				playSound(26, 117 + i * 11);
4840 
4841 			moveRel(-20, 0, 0, true);
4842 			playActorAnimation(662, true);
4843 			playAnimation(663, 2, true);
4844 			waitAnimation();
4845 			setOns(1, 49);
4846 
4847 			displayCutsceneMessage(dsAddr_cutsceneMsgB, 53, 95); // "Another hundred moments later"
4848 			moveTo(162, 184, 0, true);
4849 			playSound(26, 6);
4850 			playSound(26, 17);
4851 			playSound(56, 10);
4852 			playSound(56, 21);
4853 			playSound(19, 27);
4854 			playSound(24, 38);
4855 			playSound(23, 44);
4856 			playActorAnimation(664);
4857 			playAnimation(665, 1);
4858 			wait(100);
4859 			displayMessage(dsAddr_foundCrudeOilMsg); // "At least I found crude oil and I'll be rich"
4860 			wait(100);
4861 			displayMessage(dsAddr_myLifeMsg); // "That's my life"
4862 			inventory->remove(kInvItemShovelAct2);
4863 			fnMansionIntrusionAttempt();
4864 		} else
4865 			displayMessage(dsAddr_notThinkRightPlaceMsg); // "I don't think this is the right place"
4866 		break;
4867 
4868 	case csAddr_tooDarkHere:
4869 		displayMessage(dsAddr_cantDoTooDarkMsg); // "I can't do anything here, it's too dark"
4870 		break;
4871 
4872 	case csAddr_examineBanknote:
4873 		displayMessage(dsAddr_bankNoteMsg); // "It's a note from some bank..."
4874 		SET_FLAG(dsAddr_examinedBanknoteFlag, 1);
4875 		retVal = false;
4876 		break;
4877 
4878 	case csAddr_useTimePills: // use pills
4879 		if (scene->getId() != 36) {
4880 			displayMessage(dsAddr_notTryNowMsg); // "There's no need to try them now"
4881 		} else if (CHECK_FLAG(dsAddr_mansionAlreadyUsedTimePillsFlag, 1)) {
4882 			displayMessage(dsAddr_nahMsg); // "Nah"
4883 		} else {
4884 			SET_FLAG(dsAddr_mansionAlreadyUsedTimePillsFlag, 1);
4885 			moveTo(102, 195, 2);
4886 			playSound(5, 3);
4887 			playSound(75, 12);
4888 			playActorAnimation(794);
4889 			wait(100);
4890 			setLan(1, 0);
4891 			moveTo(151, 197, 2);
4892 			playActorAnimation(795);
4893 			moveTo(186, 198, 2, true);
4894 			moveTo(220, 198, 4);
4895 			{
4896 				Walkbox *w = scene->getWalkbox(0);
4897 				w->rect.left = 0;
4898 				w->rect.bottom = kScreenHeight-1;
4899 				w->save();
4900 			}
4901 			setLan(1, 0xff);
4902 
4903 			dialog->showMark(130, scene);
4904 
4905 			Object *obj = scene->getObject(1);
4906 			obj->actorRect.left = obj->actorRect.right = 270;
4907 			obj->actorRect.top = obj->actorRect.bottom = 193;
4908 			obj->actorOrientation = 2;
4909 			obj->save();
4910 
4911 			obj = scene->getObject(3);
4912 			obj->actorRect.left = obj->actorRect.right = 254;
4913 			obj->actorRect.top = obj->actorRect.bottom = 193;
4914 			obj->actorOrientation = 1;
4915 			obj->save();
4916 
4917 			SET_FLAG(dsAddr_MansionThruFanByTimePillFlag, 1);
4918 		}
4919 		break;
4920 
4921 	case csAddr_mansionIntrusionAttempt:
4922 		retVal = fnMansionIntrusionAttempt();
4923 		break;
4924 
4925 	case csAddr_secondMansionIntrusion:
4926 		fnSecondMansionIntrusion();
4927 		break;
4928 
4929 	case csAddr_thirdMansionIntrusion:
4930 		fnThirdMansionIntrusion();
4931 		break;
4932 
4933 	case csAddr_fourthMansionIntrusion:
4934 		fnFourthMansionIntrusion();
4935 		break;
4936 
4937 	case csAddr_fifthMansionIntrusion:
4938 		fnFifthMansionIntrusion();
4939 		break;
4940 
4941 	case csAddr_sixthMansionIntrusion:
4942 		fnSixthMansionIntrusion();
4943 		break;
4944 
4945 	default:
4946 		error("unknown callback 0x%04x called", addr);
4947 		break;
4948 	}
4949 
4950 	return retVal;
4951 }
4952 
4953 } // End of namespace TeenAgent
4954