[Scummvm-cvs-logs] scummvm master -> d9e2943fe6962810ffccc6ae136d7092ac0bd4bf

bluegr bluegr at gmail.com
Sun Nov 22 23:45:49 CET 2015


This automated email contains information about 156 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2581c2d46f MADS: Re-enable the sprite slots handling for V2 games
f8979d60c3 MADS: Initial implementation of sound driver handling for V2 games
e6a14f403f MADS: The intro animations of Phantom and Dragon work now
f83b839e21 MADS: Initial implementation of the Phantom globals class
e0a3e9c38c MADS: Start splitting some verbs from the nouns in Phantom
72f434d5f8 MADS: Remove dead code
7960eb7835 MADS: Initial (very incomplete) implementation of Phantom scene 102
b212e2c6ed MADS: New conversation message logic for cutscene animations
262c7396d0 MADS: Fix to exit game safely when sound driver hasn't been created
d8b1612f1a MADS: Implement subtitles for animation cutscenes
b25b398152 MADS: Fix clearing on-screen messages when the cutscene animation changes
eb84b13700 MADS: Correct the color for the top/bottom line bounding the cutscene
d3cfa8cc03 MADS: Bugfix for the text view debugger command
673537bad9 MADS: Move all the anim and text view code into a common class
e5296ebf8d Merge branch 'master' into phantom
2356501d34 Merge branch 'master' into phantom
63ad675abf MADS: Allow multiple animations for Phantom and later games
7fbbf51593 MADS: Phantom - Implement Scene1xx functions
3ffa01ec2a MADS: Phantom: Implement Scene101::enter(), add some empty (new) engine functions
692e45a6e6 MADS: Phantom: Add a check on conversation restore in scene 1XX, rework some checks
12a1393faf MADS: Phantom: Add some more logic for scene 101
c275e304df MADS: Phantom: Rewrite logic for Scene102
79fbcb96c3 MADS: Add logic for scene 103, some rework on animations
b5167ceef6 MADS: Phantom: Fix calls to addSpriteCycle, remove duplicated sequence function
1d4e56c455 MADS: Phantom: Some renaming
2c59f4932e MADS: Phantom: Implement logic for scene 104
530c3303c6 MADS: Phantom: Fix some code formatting
abd7d58633 MADS: Phantom: Add logic for scene 105
f6db784f50 MADS: Phantom: Fix several calls to startPingPongCycle, addSpriteCycle and addReverseSpriteCycle
9519fb3a86 MADS: Phantom: Fix hotspot rects, remove some dead code
08cbf3d843 MADS: Phantom: Fix code formatting
aa61aabdaf MADS: Phantom: Implement scene 106
5f3c0cf63a MADS: Phantom: Add logic for scene 107
7a56c52c89 MADS: Phantom: Fix some hotspot rects in scene 103, implement scene 108
3488f05585 MADS: Phantom: Some renaming in scene 108
7a6bc4f8cf MADS: Phantom: Implement scene 109
1ce678fddb MADS: Phantom: Implement scene 110
8d7872272f MADS: Phantom: Move "lock" to the list of verbs
808ef06339 MADS: Phantom: Implement scene 111. Remove dead 'breaks'.
340016f423 MADS: Phantom: Implement scene 112
e2d86c3248 MADS: Phantom: Implement scene 113, some renaming
5b02ca1316 MADS: Phantom: Fix calls to setDynamicAnim in Scene 101
3864ad17ac MADS: Phantom: Some refactoring and renaming
44a28dbd49 MADS: Phantom: Move Exit and Climb to verbs. Review calls to isAction, use isObject instead when needed
4e0b3ca04b MADS: Phantom: Implement scene 114
0b046f848a MADS: Phantom: Add scene 150
52d035e962 MADS: Phantom: Implement SequenceList::addStampCycle()
d7ba77cfe6 MADS: Phantom: Implement loadSpeech() and playSpeech()
d22a997cb2 MADS: Get rid of SequenceList::setRange, use SequenceList::setAnimRange instead
d12d110543 MADS: Phantom: Increase maximum dynamic hotspots to 10, up from 8
51365c11ca MADS: Phantom: Fix loadAnimation and silence warning in animations_tick
e232c9fdb6 MADS: Phantom: Implement resetFacing()
80dae7b8fc MADS: Phantom: Initial work on hotspots with dynamic animations
9bfa51ef30 MADS: Phantom: Expand the existing camera adjustment logic for V2 games
fac601ae2e MADS: Fix typo
51d5f6c2b8 MADS: Phantom: Implement deleteSequence()
a2bd9b524e MADS: Phantom: Better checking for scene codes
6a14396d73 MADS: Dragon: Better checking for scene codes
5e6dbbef4c MADS: Phantom: Add Scene Group 2 generic functions
cbbfeb0171 MADS: Phantom: Implement scene 201
9bb46f2af3 MADS: Phantom: Some renaming in scene 113
2856020c37 MADS: Dragon: Add generic scene for group 1
43065c9ee2 MADS: Dragon: Implement scene 101
91bc69b1a3 MADS: Phantom: Some initial work on reading conversation files
0f27b68d57 MADS: Phantom: Disable auto camera adjust code for V2 games, for now
796b04d3cd MADS: Dragon: Implement scene 102
d26bc1937d MADS: Dragon: Implement scene 103
85c45c210e MADS: Dragon: Implement scene 104
3e979e59ef MADS: More work on V2 conversations
6fc4d50443 MADS: Phantom: Add hack in setHeroTrigger to stop conversations
86722cc41f MADS: Phantom: Initial implementation of Player::setWalkTrigger()
9aeecf83a3 MADS: Implement getFrameWidth and getFrameHeight
8422142c74 MADS: Phantom: Implement scene 202
f7389e98bc MADS: Dragon: Some rework in scene 104
2c5b63acfa MADS: Phantom: Implement scene 203
adfe7de5ab MADS: Phantom: change the type of a couple of local variables
98b52670c9 MADS: Phantom: Implement scene 204
de343a4d41 MADS: Phantom: Implement scene 205
26ae514e9d MADS: Phantom: Add scene 206
f0f5bd81ee MADS: Phantom: Implement scene 207
18683f98b0 MADS: Phantom: Implement scene 208
8aa06b4dd9 MADS: Phantom: Implement scene 250
892565069c MADS: Phantom: Add generic class Scene3xx
cb72286b34 MADS: Phantom: Set scaling velocity in generic classes Scene1xx and Scene2xx
49a5b194d0 MADS: Phantom: Rewrite some comments
cbb302a550 MADS: Phantom: Implement scene 301
b2a07f52f4 MADS: Phantom: Implement scene 302
b06b0ef872 MADS: Janitorial: Remove trailing spaces and tabs
58c94024a0 MADS: Phantom: Add scene 303
b5e787cd35 MADS: Phantom: Polish scene 303, add scene 304
0db7c488ea MADS: Phantom: Add scene 305
90e7f030c3 MADS: Phantom: Implement scene 306
4552a9026c MADS: Phantom: Implement scene 307
49ef6339ee MADS: Phantom: Implement scene 308
c21bf3cf38 MADS: Phantom: Implement scene 309
73614e9415 MADS: Use uint32 for frame timer functions
af7a233d97 MADS: Phantom: Implement scene 310
11753df6ff MADS: Phantom: Implement generic scene 4xx
bd1f03ee6c MADS: Phantom: Hook scene 310
7c4f6bae20 MADS: Phantom: Implement scene 401
71ea3ce562 MADS: Phantom: Implement scene 403
f2e17d83fe MADS: Phantom: Implement scene 404
89684642bb MADS: Phantom: Add scene 406
2243a976ce MADS: Phantom: Implement scene 407
6c53d6b391 MADS: Phantom: Implement scene 408
d449751c39 MADS: Phantom: Implement scene 409
70de0278af MADS: Phantom: Remove parasite character which breaks compilation
a7ebf1b755 MADS: Phantom: Implement scene 410
f94b5473b1 MADS: Phantom: Implement scene 453
1eaf7c13e0 MADS: Phantom: Janitorial - Remove extra spaces
9e675155b0 MADS: Phantom: Implement scene 456
04868be95b MADS: Phantom: Implement setupCatacombs
9d6bb85ce3 MADS: Phantom: Implement exitCatacombs
cdc564b060 MADS: Phantom: Phantom isn't naughty!
d073f5767c MADS: Phantom: Add more Catacombs functions
9ef395524e MADS: Phantom: Remove obsolete comment, fix the use of a boolean
75ee599cbb MADS: Phantom: Implement generic scene 5xx
4682aec147 MADS: Phantom: Implement scene 501
8920632798 MADS: Phantom: Implement scene 502 (except palette cycling)
dcf931f0bb MADS: Phantom: Improve a bit Scene502::getPanelInfo
178e45f4d9 MADS: Phantom: Initialize missing scene info so that Raoul is visible
1b75381b98 MADS: Phantom: Implement scene 504
f6e38119ec MADS: Phantom: More work on V2 scene data
41a6750d96 MADS: Phantom: Implement scene 505
98d1363041 MADS: Phantom: Add scene 506
7bd86b84a9 MADS: Phantom: Remove an erroneous TODO
8a74ec9da9 MADS: Phantom: Fix coding style in Scene1xx
47f43770ae MADS: Phantom: Only force a reset of scaling velocity when the section changes
bff5a3e680 MADS: Phantom: Implement Scene::drawToBackground()
d09d68ef70 MADS: Phantom: Fix bug in Scene102::enter()
ff4d0b9f54 MADS: Phantom: Update the definition of drawToBackground()
9abf901c28 MADS: Phantom: Implement doObjectAction()
b177f6326f MADS: Phantom: Implement unhandledAction()
925dc6b158 MADS: Phantom: Implement stopWalker()
34d5f929ac MADS: Remove useless casts in per-game logic
b7d4536cf1 MADS: Phantom: Update erroneous comments concerning Section Handlers
cbb26351f1 MADS: Phantom: Remove dummy scene handler
a71fd57608 MADS: Implement SetSeqPlayer for V2+ games, replace setTrigger by addSubEntry
7fb2ec9366 MADS: Replace the use of setTimingTrigger by a call to addTimer for V2+ games
6a34a1d58f MADS: Phantom: Add a comment about changing section
1765e231d9 MADS: Phantom: Implement disableNode() and disableLine()
bbe61b4054 MADS: DRAGON: Use constants instead of hardcoded values in one call of addSprites
0f5130e491 MADS: For consistency with Rex, remove the second parameter of addSprites when its value is the default one
0195ee51e9 MADS: Implement sceneScale for v2+ games
eb9881965d MADS: Fix ANIMFLAG_DITHER value
8753ee9f95 MADS: Rename the parameter of setNextFrameTimer
002a59c540 MADS: Implement syncTimers, add SyncType enum, modify all the calls to syncTimers
a475a7f18a MADS: Rex: Use a constant when checking _mainObjectSource
ed0e6d19f8 MADS: Dragon: Implement scene 105
03fe7c6b86 MADS: Phantom: Merge _variant and _initialVariant
ec3a4b994a MADS: Some work on Camera
9dc814e03f MADS: Implement some more Camera code
b5bffa81bf MADS: Fix header
0b2c269d86 MADS: Fix posAdjust in Animation::update for v2 games
f0d17d2c06 MADS: Remove obsolete comment and add debug trace in animation code
d9e2943fe6 Merge pull request #626 from dreammaster/phantom


Commit: 2581c2d46f7ee66c1a5fad17464de0477c8efe75
    https://github.com/scummvm/scummvm/commit/2581c2d46f7ee66c1a5fad17464de0477c8efe75
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-10-14T01:57:45+03:00

Commit Message:
MADS: Re-enable the sprite slots handling for V2 games

Changed paths:
    engines/mads/scene.cpp



diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index ad24dd4..e8ba988 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -497,14 +497,12 @@ void  Scene::drawElements(ScreenTransition transitionType, bool surfaceFlag) {
 	_dirtyAreas.copy(&_backgroundSurface, &_vm->_screen, _posAdjust);
 
 	// Handle dirty areas for foreground objects
-	if (_vm->getGameID() == GType_RexNebular)	// TODO: Implement for V2 games
-		_spriteSlots.setDirtyAreas();
+	_spriteSlots.setDirtyAreas();
 	_textDisplay.setDirtyAreas2();
 	_dirtyAreas.merge(1, DIRTY_AREAS_SIZE);
 
 	// Draw sprites that have changed
-	if (_vm->getGameID() == GType_RexNebular)	// TODO: Implement for V2 games
-		_spriteSlots.drawSprites(&_sceneSurface);
+	_spriteSlots.drawSprites(&_sceneSurface);
 
 	// Draw text elements onto the view
 	_textDisplay.draw(&_vm->_screen);


Commit: f8979d60c3479cd617fa048b83cd3c9c96e3f32e
    https://github.com/scummvm/scummvm/commit/f8979d60c3479cd617fa048b83cd3c9c96e3f32e
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-10-14T01:59:53+03:00

Commit Message:
MADS: Initial implementation of sound driver handling for V2 games

Changed paths:
    engines/mads/nebular/menu_nebular.cpp



diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index 3919e70..881481b 100644
--- a/engines/mads/nebular/menu_nebular.cpp
+++ b/engines/mads/nebular/menu_nebular.cpp
@@ -902,7 +902,11 @@ void AnimationView::loadNextResource() {
 		const char *chP = strchr(_currentAnimation->_header._soundName.c_str(), '.');
 		assert(chP);
 
-		int driverNum = atoi(chP + 1);
+		// Handle both Rex naming (xxx.009) and naming in later games (e.g. xxx.ph9)
+		int driverNum = atoi(chP + 3);
+		// HACK for Dragon
+		if (_currentAnimation->_header._soundName == "#SOUND.DRG")
+			driverNum = 9;
 		_vm->_sound->init(driverNum);
 	}
 


Commit: e6a14f403ff3bf0b42eae8fb91086ddec0e48752
    https://github.com/scummvm/scummvm/commit/e6a14f403ff3bf0b42eae8fb91086ddec0e48752
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-10-14T02:01:00+03:00

Commit Message:
MADS: The intro animations of Phantom and Dragon work now

Changed paths:
    engines/mads/dragonsphere/dragonsphere_scenes.cpp
    engines/mads/phantom/phantom_scenes.cpp



diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.cpp b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
index f32d17d..dbf1759 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
@@ -201,6 +201,10 @@ Common::String DragonsphereScene::formAnimName(char sepChar, int suffixNum) {
 /*------------------------------------------------------------------------*/
 
 void SceneInfoDragonsphere::loadCodes(MSurface &depthSurface, int variant) {
+	// The intro scenes do not have any codes
+	if (_sceneId >= 900)
+		return;
+
 	Common::String ext = Common::String::format(".WW%d", variant);
 	File f(Resources::formatName(RESPREFIX_RM, _sceneId, ext));
 	MadsPack codesPack(&f);
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 7fd7ce6..2028f24 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -169,6 +169,10 @@ Common::String PhantomScene::formAnimName(char sepChar, int suffixNum) {
 /*------------------------------------------------------------------------*/
 
 void SceneInfoPhantom::loadCodes(MSurface &depthSurface, int variant) {
+	// The intro scenes do not have any codes
+	if (_sceneId >= 900)
+		return;
+
 	Common::String ext = Common::String::format(".WW%d", variant);
 	File f(Resources::formatName(RESPREFIX_RM, _sceneId, ext));
 	MadsPack codesPack(&f);


Commit: f83b839e21c6f79a008c34666ddd96d8fdc3b15c
    https://github.com/scummvm/scummvm/commit/f83b839e21c6f79a008c34666ddd96d8fdc3b15c
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-10-14T02:03:53+03:00

Commit Message:
MADS: Initial implementation of the Phantom globals class

Changed paths:
  A engines/mads/phantom/globals_phantom.cpp
  A engines/mads/phantom/globals_phantom.h
    engines/mads/module.mk
    engines/mads/phantom/game_phantom.cpp
    engines/mads/phantom/game_phantom.h



diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index 96353e9..a954494 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -4,6 +4,7 @@ MODULE_OBJS := \
 	dragonsphere/game_dragonsphere.o \
 	dragonsphere/dragonsphere_scenes.o \
 	phantom/game_phantom.o \
+	phantom/globals_phantom.o \
 	phantom/phantom_scenes.o \
 	nebular/dialogs_nebular.o \
 	nebular/game_nebular.o \
diff --git a/engines/mads/phantom/game_phantom.cpp b/engines/mads/phantom/game_phantom.cpp
index 0b2531e..2384b94 100644
--- a/engines/mads/phantom/game_phantom.cpp
+++ b/engines/mads/phantom/game_phantom.cpp
@@ -28,7 +28,7 @@
 #include "mads/msurface.h"
 #include "mads/phantom/game_phantom.h"
 //#include "mads/nebular/dialogs_nebular.h"
-//#include "mads/nebular/globals_nebular.h"
+#include "mads/phantom/globals_phantom.h"
 #include "mads/phantom/phantom_scenes.h"
 
 namespace MADS {
@@ -57,6 +57,8 @@ void GamePhantom::initializeGlobals() {
 	_player._facing = FACING_NORTH;
 	_player._turnToFacing = FACING_NORTH;
 
+	_globals[kCurrentYear] = 1993;
+
 	/* Section #1 variables */
 	// TODO
 
diff --git a/engines/mads/phantom/game_phantom.h b/engines/mads/phantom/game_phantom.h
index 99cc2c1..654ec86 100644
--- a/engines/mads/phantom/game_phantom.h
+++ b/engines/mads/phantom/game_phantom.h
@@ -26,7 +26,7 @@
 #include "common/scummsys.h"
 #include "mads/game.h"
 #include "mads/globals.h"
-//#include "mads/nebular/globals_nebular.h"
+#include "mads/phantom/globals_phantom.h"
 
 namespace MADS {
 
@@ -64,15 +64,6 @@ enum InventoryObject {
 	OBJ_OAR = 24
 };
 
-// HACK: A stub for now, remove from here once it's implemented properly
-class PhantomGlobals : public Globals {
-public:
-	PhantomGlobals() {
-		resize(210);	// Rex has 210 globals
-	}
-	virtual ~PhantomGlobals() {}
-};
-
 class GamePhantom : public Game {
 	friend class Game;
 protected:
diff --git a/engines/mads/phantom/globals_phantom.cpp b/engines/mads/phantom/globals_phantom.cpp
new file mode 100644
index 0000000..e0db0a1
--- /dev/null
+++ b/engines/mads/phantom/globals_phantom.cpp
@@ -0,0 +1,49 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/scummsys.h"
+#include "common/config-manager.h"
+#include "mads/phantom/globals_phantom.h"
+
+namespace MADS {
+
+namespace Phantom {
+
+PhantomGlobals::PhantomGlobals()
+	: Globals() {
+	// Initialize lists
+	resize(210);
+	_spriteIndexes.resize(30);
+	_sequenceIndexes.resize(30);
+}
+
+void PhantomGlobals::synchronize(Common::Serializer &s) {
+	Globals::synchronize(s);
+
+	_spriteIndexes.synchronize(s);
+	_sequenceIndexes.synchronize(s);
+}
+
+
+} // End of namespace Phantom
+
+} // End of namespace MADS
diff --git a/engines/mads/phantom/globals_phantom.h b/engines/mads/phantom/globals_phantom.h
new file mode 100644
index 0000000..44d8c9e
--- /dev/null
+++ b/engines/mads/phantom/globals_phantom.h
@@ -0,0 +1,75 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef MADS_GLOBALS_PHANTOM_H
+#define MADS_GLOBALS_PHANTOM_H
+
+#include "common/scummsys.h"
+#include "common/array.h"
+#include "mads/game.h"
+#include "mads/resources.h"
+
+namespace MADS {
+
+namespace Phantom {
+
+enum GlobalId {
+	kWalkerTiming           = 0,
+//	kWalkerTiming0			= 1,
+
+	kCurrentYear            = 10,	// current year (1881 or 1993)
+
+	//kTalkInanimateCount		= 4,
+
+	/* Section #1 variables */
+
+	/* Section #2 variables */
+
+	/* Section #3 Variables */
+
+	/* Section #4 Variables */
+
+	/* Section #5 Variables */
+
+};
+
+class PhantomGlobals : public Globals {
+public:
+	SynchronizedList _spriteIndexes;
+	SynchronizedList _sequenceIndexes;
+public:
+	/**
+	 * Constructor
+	 */
+	PhantomGlobals();
+
+	/**
+	* Synchronize the globals data
+	*/
+	virtual void synchronize(Common::Serializer &s);
+};
+
+} // End of namespace Phantom
+
+} // End of namespace MADS
+
+#endif /* MADS_GLOBALS_PHANTOM_H */


Commit: e0a3e9c38c5e4e455fb0101cd82ca8ba53471a06
    https://github.com/scummvm/scummvm/commit/e0a3e9c38c5e4e455fb0101cd82ca8ba53471a06
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-10-14T02:05:53+03:00

Commit Message:
MADS: Start splitting some verbs from the nouns in Phantom

Changed paths:
    engines/mads/phantom/phantom_scenes.h



diff --git a/engines/mads/phantom/phantom_scenes.h b/engines/mads/phantom/phantom_scenes.h
index cd295a2..e761893 100644
--- a/engines/mads/phantom/phantom_scenes.h
+++ b/engines/mads/phantom/phantom_scenes.h
@@ -34,6 +34,17 @@ namespace MADS {
 
 namespace Phantom {
 
+enum Verb {
+	VERB_LOOK_AT = 0x60,
+	VERB_TURN_OFF = 0x95,
+	VERB_TURN_ON = 0x96,
+	VERB_UNLOCK = 0x97,
+	VERB_WALK_ACROSS = 0x99,
+	VERB_WALK_DOWN = 0x9A,
+	VERB_WALK_THROUGH = 0x9B,
+	VERB_WALK_UP = 0x9C,
+};
+
 enum Noun {
 	NOUN_GAME = 0x1,
 	NOUN_QSAVE = 0x2,
@@ -130,7 +141,6 @@ enum Noun {
 	NOUN_LOCK = 0x5D,
 	NOUN_LOCKING_RAIL = 0x5E,
 	NOUN_LOCKRAIL = 0x5F,
-	NOUN_LOOK_AT = 0x60,
 	NOUN_LOOK_THROUGH = 0x61,
 	NOUN_MANNEQUINS = 0x62,
 	NOUN_MIRROR = 0x63,
@@ -183,14 +193,7 @@ enum Noun {
 	NOUN_TICKET = 0x92,
 	NOUN_TRAP_CEILING = 0x93,
 	NOUN_TRAP_DOOR = 0x94,
-	NOUN_TURN_OFF = 0x95,
-	NOUN_TURN_ON = 0x96,
-	NOUN_UNLOCK = 0x97,
 	NOUN_URN = 0x98,
-	NOUN_WALK_ACROSS = 0x99,
-	NOUN_WALK_DOWN = 0x9A,
-	NOUN_WALK_THROUGH = 0x9B,
-	NOUN_WALK_UP = 0x9C,
 	NOUN_WALL = 0x9D,
 	NOUN_WARDROBE = 0x9E,
 	NOUN_WASTE_BASKET = 0x9F,


Commit: 72f434d5f82b123034bbcd38df10bebf2540984c
    https://github.com/scummvm/scummvm/commit/72f434d5f82b123034bbcd38df10bebf2540984c
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-10-14T02:08:00+03:00

Commit Message:
MADS: Remove dead code

Changed paths:
    engines/mads/phantom/phantom_scenes.h



diff --git a/engines/mads/phantom/phantom_scenes.h b/engines/mads/phantom/phantom_scenes.h
index e761893..0d7bc25 100644
--- a/engines/mads/phantom/phantom_scenes.h
+++ b/engines/mads/phantom/phantom_scenes.h
@@ -485,27 +485,6 @@ protected:
 };
 
 // TODO: Temporary, remove once implemented properly
-class Scene1xx : public PhantomScene {
-protected:
-	/**
-	 * Plays an appropriate sound when entering a scene
-	 */
-	void sceneEntrySound() {}
-
-	/**
-	 *Sets the AA file to use for the scene
-	 */
-	void setAAName() {}
-
-	/**
-	 * Updates the prefix used for getting player sprites for the scene
-	 */
-	void setPlayerSpritesPrefix() {}
-public:
-	Scene1xx(MADSEngine *vm) : PhantomScene(vm) {}
-};
-
-// TODO: Temporary, remove once implemented properly
 class DummyScene : public PhantomScene {
 public:
 	DummyScene(MADSEngine *vm) : PhantomScene(vm) {


Commit: 7960eb78354ddbce338782c861d6489829a0449d
    https://github.com/scummvm/scummvm/commit/7960eb78354ddbce338782c861d6489829a0449d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-10-14T02:08:52+03:00

Commit Message:
MADS: Initial (very incomplete) implementation of Phantom scene 102

Changed paths:
  A engines/mads/phantom/phantom_scenes1.cpp
  A engines/mads/phantom/phantom_scenes1.h
    engines/mads/module.mk
    engines/mads/phantom/phantom_scenes.cpp



diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index a954494..8a792a7 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -6,6 +6,7 @@ MODULE_OBJS := \
 	phantom/game_phantom.o \
 	phantom/globals_phantom.o \
 	phantom/phantom_scenes.o \
+	phantom/phantom_scenes1.o \
 	nebular/dialogs_nebular.o \
 	nebular/game_nebular.o \
 	nebular/globals_nebular.o \
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 2028f24..c8faa35 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -28,6 +28,7 @@
 #include "mads/scene.h"
 #include "mads/phantom/game_phantom.h"
 #include "mads/phantom/phantom_scenes.h"
+#include "mads/phantom/phantom_scenes1.h"
 
 namespace MADS {
 
@@ -44,7 +45,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 101:	// seats
 		return new DummyScene(vm);	// TODO
 	case 102:	// music stands
-		return new DummyScene(vm);	// TODO
+		return new Scene102(vm);
 	case 103:	// below stage
 		return new DummyScene(vm);	// TODO
 	case 104:	// stage
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
new file mode 100644
index 0000000..b4035dc
--- /dev/null
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -0,0 +1,182 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/scummsys.h"
+#include "mads/mads.h"
+#include "mads/scene.h"
+#include "mads/phantom/phantom_scenes.h"
+#include "mads/phantom/phantom_scenes1.h"
+
+namespace MADS {
+
+namespace Phantom {
+
+void Scene1xx::setAAName() {
+	// TODO
+	//int idx = 0;
+	//_game._aaName = Resources::formatAAName(idx);
+}
+
+void Scene1xx::sceneEntrySound() {
+	// TODO
+}
+
+/*------------------------------------------------------------------------*/
+
+Scene102::Scene102(MADSEngine *vm) : Scene1xx(vm) {
+	_animRunningFl = false;
+}
+
+void Scene102::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+	s.syncAsByte(_animRunningFl);
+}
+
+void Scene102::setup() {
+	//setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene102::enter() {
+	_animRunningFl = false;
+
+	// TODO: Load sprite series
+
+	if (_scene->_priorSceneId == 101) {
+		_game._player._playerPos = Common::Point(97, 79);
+		_game._player._facing = FACING_SOUTHEAST;
+		// TODO
+	} else if (_scene->_priorSceneId == 104) {
+		// Player fell from pit -> death
+		// TODO
+	} else if (_scene->_priorSceneId == 103 || _scene->_priorSceneId != -1) {
+		_game._player._playerPos = Common::Point(282, 145);
+		_game._player._facing = FACING_WEST;
+		// TODO: Door closing animation
+		_animRunningFl = true;
+	} else if (_scene->_priorSceneId == -1) {
+		// TODO
+	}
+
+	sceneEntrySound();
+}
+
+void Scene102::step() {
+	if (_game._trigger == 60) {		// Door closes
+		// TODO
+		_animRunningFl = false;
+	} else if (_game._trigger == 65) {		// Death
+		// TODO
+		_scene->_currentSceneId = 104;
+	}
+}
+
+void Scene102::preActions() {
+	if (_action.isAction(VERB_OPEN, NOUN_ORCHESTRA_DOOR) || _action.isAction(VERB_PUSH, NOUN_ORCHESTRA_DOOR)) {
+		_game._player.walk(Common::Point(282, 145), FACING_EAST);
+	}
+}
+
+void Scene102::actions() {
+	if (_action.isAction(VERB_WALK_DOWN, NOUN_AISLE)) {
+		_scene->_nextSceneId = 101;
+		_game._player._stepEnabled = true;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_ORCHESTRA_DOOR) ||
+		_action.isAction(VERB_PUSH, NOUN_ORCHESTRA_DOOR) ||
+		_action.isAction(VERB_OPEN, NOUN_ORCHESTRA_DOOR)) {
+		if (_animRunningFl) {
+			// TODO
+		} else {
+			switch (_game._trigger) {
+			case 70:	// try again
+			case 0:
+				// TODO
+				break;
+			case 1:
+				_scene->_nextSceneId = 103;
+				break;
+			}
+		}
+
+		_game._player._stepEnabled = true;
+	}
+
+	// TODO: Look around
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isObject(NOUN_PIT))
+			_vm->_dialogs->show(10211);
+		else if (_action.isObject(NOUN_SEATS))
+			if (_globals[kCurrentYear] == 1881)
+				_vm->_dialogs->show(10212);
+			else
+				_vm->_dialogs->show(10230);
+		else if (_action.isObject(NOUN_ORCHESTRA_DOOR))
+			_vm->_dialogs->show(10213);
+		else if (_action.isObject(NOUN_CONDUCTORS_STAND))
+			_vm->_dialogs->show(10214);
+		else if (_action.isObject(NOUN_MUSIC_STAND) || _action.isObject(NOUN_MUSIC_STANDS))
+			_vm->_dialogs->show(10215);
+		else if (_action.isObject(NOUN_PROMPTERS_BOX))
+			_vm->_dialogs->show(10217);
+		else if (_action.isObject(NOUN_STAGE))
+			_vm->_dialogs->show(10218);
+		else if (_action.isObject(NOUN_APRON))
+			_vm->_dialogs->show(10219);
+		else if (_action.isObject(NOUN_SIDE_WALL))
+			_vm->_dialogs->show(10220);
+		else if (_action.isObject(NOUN_FOLDING_CHAIRS))
+			_vm->_dialogs->show(10221);
+		else if (_action.isObject(NOUN_AISLE))
+			_vm->_dialogs->show(10222);
+		else if (_action.isObject(NOUN_PROSCENIUM_ARCH))
+			_vm->_dialogs->show(10223);
+		else if (_action.isObject(NOUN_ACT_CURTAIN))
+			_vm->_dialogs->show(10224);
+		else if (_action.isObject(NOUN_IN_ONE))
+			_vm->_dialogs->show(10225);
+		else if (_action.isObject(NOUN_IN_TWO))
+			_vm->_dialogs->show(10226);
+		else if (_action.isObject(NOUN_LEG))
+			_vm->_dialogs->show(10227);
+		else if (_action.isObject(NOUN_CHANDELIER))
+			_vm->_dialogs->show(10231);
+		else
+			return;
+
+		_game._player._stepEnabled = true;
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_ORCHESTRA_DOOR)) {
+		_vm->_dialogs->show(10228);
+		_game._player._stepEnabled = true;
+	}
+}
+
+
+/*------------------------------------------------------------------------*/
+
+} // End of namespace Phantom
+} // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
new file mode 100644
index 0000000..ef2cdb7
--- /dev/null
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -0,0 +1,74 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef MADS_PHANTOM_SCENES1_H
+#define MADS_PHANTOM_SCENES1_H
+
+#include "common/scummsys.h"
+#include "common/serializer.h"
+#include "mads/game.h"
+#include "mads/scene.h"
+#include "mads/phantom/phantom_scenes.h"
+
+namespace MADS {
+
+namespace Phantom {
+
+class Scene1xx : public PhantomScene {
+protected:
+	/**
+	 * Plays an appropriate sound when entering a scene
+	 */
+	void sceneEntrySound();
+
+	/**
+	 *Sets the AA file to use for the scene
+	 */
+	void setAAName();
+
+	/**
+	 * Updates the prefix used for getting player sprites for the scene
+	 */
+	void setPlayerSpritesPrefix();
+public:
+	Scene1xx(MADSEngine *vm) : PhantomScene(vm) {}
+};
+
+class Scene102 : public Scene1xx {
+private:
+	bool _animRunningFl;
+
+public:
+	Scene102(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
+
+} // End of namespace Phantom
+} // End of namespace MADS
+
+#endif /* MADS_PHANTOM_SCENES1_H */


Commit: b212e2c6ed5060dba5d5d58c8391c32dfb9f354e
    https://github.com/scummvm/scummvm/commit/b212e2c6ed5060dba5d5d58c8391c32dfb9f354e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-10-14T11:17:31+03:00

Commit Message:
MADS: New conversation message logic for cutscene animations

Changed paths:
    engines/mads/animation.cpp
    engines/mads/animation.h
    engines/mads/nebular/menu_nebular.cpp
    engines/mads/palette.cpp
    engines/mads/palette.h



diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp
index 0807d8e..bc3708b 100644
--- a/engines/mads/animation.cpp
+++ b/engines/mads/animation.cpp
@@ -159,6 +159,7 @@ Animation *Animation::init(MADSEngine *vm, Scene *scene) {
 }
 
 Animation::Animation(MADSEngine *vm, Scene *scene) : _vm(vm), _scene(scene) {
+	_flags = 0;
 	_font = nullptr;
 	_resetFlag = false;
 	_messageCtr = 0;
@@ -174,6 +175,8 @@ Animation::Animation(MADSEngine *vm, Scene *scene) : _vm(vm), _scene(scene) {
 	_actionDetails._indirectObjectId = -1;
 	_currentFrame = 0;
 	_oldFrameEntry = 0;
+	_rgbResult = -1;
+	_palIndex1 = _palIndex2 = -1;
 }
 
 Animation::~Animation() {
@@ -204,6 +207,7 @@ void Animation::load(MSurface &backSurface, DepthSurface &depthSurface,
 
 	if (_header._bgType == ANIMBG_INTERFACE)
 		flags |= PALFLAG_RESERVED;
+	_flags = flags;
 
 	if (flags & ANIMFLAG_LOAD_BACKGROUND) {
 		loadBackground(backSurface, depthSurface, _header, flags, palCycles, sceneInfo);
@@ -414,6 +418,7 @@ bool Animation::hasScroll() const {
 
 void Animation::update() {
 	Scene &scene = _vm->_game->_scene;
+	Palette &palette = *_vm->_palette;
 
 	if (_header._manualFlag) {
 		int spriteListIndex = _spriteListIndexes[_header._spritesIndex];
@@ -532,26 +537,42 @@ void Animation::update() {
 		} else if ((_currentFrame >= _messages[idx]._startFrame) && (_currentFrame <= _messages[idx]._endFrame)) {
 			// Start displaying the message
 			AnimMessage &me = _messages[idx];
+			uint8 colIndex1, colIndex2;
+
+			if (_flags & ANIMFLAG_ANIMVIEW) {
+				_rgbResult = palette._paletteUsage.checkRGB(me._rgb1, -1, true, &_palIndex1);
+				_rgbResult = palette._paletteUsage.checkRGB(me._rgb2, _rgbResult, true, &_palIndex2);
+
+				// Update the palette with the two needed colors
+				int palCount = _palIndex2 - _palIndex1;
+				if (palCount < 0)
+					palCount = _palIndex1 - _palIndex2 + 1;
+				palette.setPalette(palette._mainPalette, MIN(_palIndex1, _palIndex2), palCount);
+
+				colIndex1 = _palIndex1;
+				colIndex2 = _palIndex2;
+			} else {
+				// The color index to use is dependant on how many messages are currently on-screen
+				switch (_messageCtr) {
+				case 1:
+					colIndex1 = 252;
+					break;
+				case 2:
+					colIndex1 = 16;
+					break;
+				default:
+					colIndex1 = 250;
+					break;
+				}
+				colIndex2 = colIndex1 + 1;
 
-			// The color index to use is dependant on how many messages are currently on-screen
-			uint8 colIndex;
-			switch (_messageCtr) {
-			case 1:
-				colIndex = 252;
-				break;
-			case 2:
-				colIndex = 16;
-				break;
-			default:
-				colIndex = 250;
-				break;
+				_vm->_palette->setEntry(colIndex1, me._rgb1[0], me._rgb1[1], me._rgb1[2]);
+				_vm->_palette->setEntry(colIndex2, me._rgb2[0], me._rgb2[1], me._rgb2[2]);
 			}
 
-			_vm->_palette->setEntry(colIndex, me._rgb1[0], me._rgb1[1], me._rgb1[2]);
-			_vm->_palette->setEntry(colIndex + 1, me._rgb2[0], me._rgb2[1], me._rgb2[2]);
-
 			// Add a kernel message to display the given text
-			me._kernelMsgIndex = scene._kernelMessages.add(me._pos, colIndex * 0x101 + 0x100,
+			me._kernelMsgIndex = scene._kernelMessages.add(me._pos,
+				colIndex1 | (colIndex2 << 8),
 				0, 0, INDEFINITE_TIMEOUT, me._msg);
 			assert(me._kernelMsgIndex >= 0);
 			++_messageCtr;
diff --git a/engines/mads/animation.h b/engines/mads/animation.h
index 917d899..b7e98e7 100644
--- a/engines/mads/animation.h
+++ b/engines/mads/animation.h
@@ -37,7 +37,8 @@ enum AnimFlag {
 	ANIMFLAG_DITHER				= 0x1000,	// Dither to 16 colors
 	ANIMFLAG_CUSTOM_FONT		= 0x2000,	// Load ccustom font
 	ANIMFLAG_LOAD_BACKGROUND	= 0x0100,	// Load background
-	ANIMFLAG_LOAD_BACKGROUND_ONLY = 0x0200	// Load background only
+	ANIMFLAG_LOAD_BACKGROUND_ONLY = 0x0200,	// Load background only
+	ANIMFLAG_ANIMVIEW			= 0x8000	// Cutscene animation
 };
 
 enum AnimBgType {
@@ -155,6 +156,9 @@ private:
 	uint32 _nextScrollTimer;
 	int _messageCtr;
 	int _trigger;
+	int _flags;
+	int _rgbResult;
+	int _palIndex1, _palIndex2;
 	TriggerMode _triggerMode;
 	ActionDetails _actionDetails;
 
diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index 881481b..5cb175e 100644
--- a/engines/mads/nebular/menu_nebular.cpp
+++ b/engines/mads/nebular/menu_nebular.cpp
@@ -890,9 +890,9 @@ void AnimationView::loadNextResource() {
 	// Load the new animation
 	delete _currentAnimation;
 	_currentAnimation = Animation::init(_vm, &scene);
+	int flags = ANIMFLAG_ANIMVIEW | (resEntry._bgFlag ? ANIMFLAG_LOAD_BACKGROUND : 0);
 	_currentAnimation->load(scene._backgroundSurface, scene._depthSurface, 
-		resEntry._resourceName, resEntry._bgFlag ? ANIMFLAG_LOAD_BACKGROUND : 0,
-		&paletteCycles, _sceneInfo);
+		resEntry._resourceName, flags, &paletteCycles, _sceneInfo);
 
 	// Signal for a screen refresh
 	scene._spriteSlots.fullRefresh();
diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp
index c098e23..1787b3c 100644
--- a/engines/mads/palette.cpp
+++ b/engines/mads/palette.cpp
@@ -317,6 +317,62 @@ int PaletteUsage::rgbFactor(byte *palEntry, RGB6 &pal6) {
 	return total;
 }
 
+int PaletteUsage::checkRGB(const byte *rgb, int palStart, bool flag, int *palIndex) {
+	Palette &palette = *_vm->_palette;
+	bool match = false;
+	int result;
+	if (palStart >= 0) {
+		result = palStart;
+	} else {
+		result = -1;
+		for (int i = 0; i < palette._highRange; ++i) {
+			if (!palette._rgbList[i]) {
+				result = i;
+				break;
+			}
+		}
+	}
+
+	if (result >= 0) {
+		int mask = 1 << result;
+		byte *palP = &palette._mainPalette[0];
+		uint32 *flagsP = &palette._palFlags[0];
+
+		for (; flagsP < &palette._palFlags[PALETTE_COUNT]; ++flagsP, ++result) {
+			if ((!(*flagsP & 1) || flag) && !(*flagsP & 2)) {
+				if (!memcmp(palP, rgb, 3)) {
+					*flagsP |= mask;
+					
+					if (palIndex)
+						*palIndex = result;
+					match = true;
+					break;
+				}
+			}
+		}
+
+		if (!match) {
+			palP = &palette._mainPalette[0];
+			flagsP = &palette._palFlags[0];
+
+			for (int i = 0; i < PALETTE_COUNT; ++i, palP += 3, ++flagsP) {
+				if (!*flagsP) {
+					Common::copy(rgb, rgb + 3, palP);
+					*flagsP |= mask;
+
+					if (palIndex)
+						*palIndex = i;
+					match = true;
+					break;
+				}
+			}
+		}
+	}
+
+	assert(match);
+	return result;
+}
+
 /*------------------------------------------------------------------------*/
 
 void RGBList::clear() {
diff --git a/engines/mads/palette.h b/engines/mads/palette.h
index 9b8b714..27d25f2 100644
--- a/engines/mads/palette.h
+++ b/engines/mads/palette.h
@@ -136,6 +136,8 @@ public:
 	void updateUsage(Common::Array<int> &usageList, int sceneUsageIndex);
 
 	void resetPalFlags(int idx);
+
+	int checkRGB(const byte *rgb, int palStart, bool flag, int *palIndex);
 };
 
 class RGBList {


Commit: 262c7396d0d2c15ac88d73b8d97c5f76e5815e93
    https://github.com/scummvm/scummvm/commit/262c7396d0d2c15ac88d73b8d97c5f76e5815e93
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-10-15T10:00:55+03:00

Commit Message:
MADS: Fix to exit game safely when sound driver hasn't been created

Changed paths:
    engines/mads/sound.cpp



diff --git a/engines/mads/sound.cpp b/engines/mads/sound.cpp
index 9d0d9c8..d0aa770 100644
--- a/engines/mads/sound.cpp
+++ b/engines/mads/sound.cpp
@@ -42,9 +42,11 @@ SoundManager::SoundManager(MADSEngine *vm, Audio::Mixer *mixer) {
 }
 
 SoundManager::~SoundManager() {
-	_driver->stop();
+	if (_driver) {
+		_driver->stop();
+		delete _driver;
+	}
 
-	delete _driver;
 	delete _opl;
 }
 


Commit: d8b1612f1a995120444c8100088682b870c43f28
    https://github.com/scummvm/scummvm/commit/d8b1612f1a995120444c8100088682b870c43f28
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-10-15T10:00:55+03:00

Commit Message:
MADS: Implement subtitles for animation cutscenes

Changed paths:
    engines/mads/animation.cpp
    engines/mads/animation.h
    engines/mads/nebular/menu_nebular.cpp



diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp
index bc3708b..9f0e0ad 100644
--- a/engines/mads/animation.cpp
+++ b/engines/mads/animation.cpp
@@ -537,49 +537,44 @@ void Animation::update() {
 		} else if ((_currentFrame >= _messages[idx]._startFrame) && (_currentFrame <= _messages[idx]._endFrame)) {
 			// Start displaying the message
 			AnimMessage &me = _messages[idx];
-			uint8 colIndex1, colIndex2;
 
 			if (_flags & ANIMFLAG_ANIMVIEW) {
 				_rgbResult = palette._paletteUsage.checkRGB(me._rgb1, -1, true, &_palIndex1);
 				_rgbResult = palette._paletteUsage.checkRGB(me._rgb2, _rgbResult, true, &_palIndex2);
 
 				// Update the palette with the two needed colors
-				int palCount = _palIndex2 - _palIndex1;
-				if (palCount < 0)
-					palCount = _palIndex1 - _palIndex2 + 1;
-				palette.setPalette(palette._mainPalette, MIN(_palIndex1, _palIndex2), palCount);
-
-				colIndex1 = _palIndex1;
-				colIndex2 = _palIndex2;
+				int palStart = MIN(_palIndex1, _palIndex2);
+				int palCount = ABS(_palIndex2 - _palIndex1) + 1;
+				palette.setPalette(&palette._mainPalette[palStart * 3], palStart, palCount);
 			} else {
 				// The color index to use is dependant on how many messages are currently on-screen
 				switch (_messageCtr) {
 				case 1:
-					colIndex1 = 252;
+					_palIndex1 = 252;
 					break;
 				case 2:
-					colIndex1 = 16;
+					_palIndex1 = 16;
 					break;
 				default:
-					colIndex1 = 250;
+					_palIndex1 = 250;
 					break;
 				}
-				colIndex2 = colIndex1 + 1;
+				_palIndex2 = _palIndex1 + 1;
 
-				_vm->_palette->setEntry(colIndex1, me._rgb1[0], me._rgb1[1], me._rgb1[2]);
-				_vm->_palette->setEntry(colIndex2, me._rgb2[0], me._rgb2[1], me._rgb2[2]);
+				_vm->_palette->setEntry(_palIndex1, me._rgb1[0], me._rgb1[1], me._rgb1[2]);
+				_vm->_palette->setEntry(_palIndex2, me._rgb2[0], me._rgb2[1], me._rgb2[2]);
 			}
 
 			// Add a kernel message to display the given text
 			me._kernelMsgIndex = scene._kernelMessages.add(me._pos,
-				colIndex1 | (colIndex2 << 8),
+				_palIndex1 | (_palIndex2 << 8),
 				0, 0, INDEFINITE_TIMEOUT, me._msg);
 			assert(me._kernelMsgIndex >= 0);
 			++_messageCtr;
 
 			// If there's an accompanying sound, also play it
 			if (me._soundId > 0)
-				_vm->_audio->playSound(me._soundId);
+				_vm->_audio->playSound(me._soundId - 1);
 		}
 	}
 
diff --git a/engines/mads/animation.h b/engines/mads/animation.h
index b7e98e7..8b85a53 100644
--- a/engines/mads/animation.h
+++ b/engines/mads/animation.h
@@ -38,7 +38,7 @@ enum AnimFlag {
 	ANIMFLAG_CUSTOM_FONT		= 0x2000,	// Load ccustom font
 	ANIMFLAG_LOAD_BACKGROUND	= 0x0100,	// Load background
 	ANIMFLAG_LOAD_BACKGROUND_ONLY = 0x0200,	// Load background only
-	ANIMFLAG_ANIMVIEW			= 0x8000	// Cutscene animation
+	ANIMFLAG_ANIMVIEW			= 0x4000	// Cutscene animation
 };
 
 enum AnimBgType {
diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index 5cb175e..64f1b82 100644
--- a/engines/mads/nebular/menu_nebular.cpp
+++ b/engines/mads/nebular/menu_nebular.cpp
@@ -55,6 +55,8 @@ void MenuView::show() {
 
 	while (!_breakFlag && !_vm->shouldQuit()) {
 		if (_redrawFlag) {
+			scene._kernelMessages.update();
+
 			_vm->_game->_scene.drawElements(_vm->_game->_fx, _vm->_game->_fx);
 			_redrawFlag = false;
 		}


Commit: b25b3981527ff343c4959984ab3d630c6b8b4528
    https://github.com/scummvm/scummvm/commit/b25b3981527ff343c4959984ab3d630c6b8b4528
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-10-15T10:00:55+03:00

Commit Message:
MADS: Fix clearing on-screen messages when the cutscene animation changes

Changed paths:
    engines/mads/nebular/menu_nebular.cpp



diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index 64f1b82..591d745 100644
--- a/engines/mads/nebular/menu_nebular.cpp
+++ b/engines/mads/nebular/menu_nebular.cpp
@@ -889,6 +889,9 @@ void AnimationView::loadNextResource() {
 	if (resEntry._bgFlag)
 		palette.resetGamePalette(1, 8);
 
+	// Free any previous messages
+	scene._kernelMessages.reset();
+
 	// Load the new animation
 	delete _currentAnimation;
 	_currentAnimation = Animation::init(_vm, &scene);


Commit: eb84b1370087dc06f55e5afed18736c71c4a1ece
    https://github.com/scummvm/scummvm/commit/eb84b1370087dc06f55e5afed18736c71c4a1ece
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-10-15T10:00:55+03:00

Commit Message:
MADS: Correct the color for the top/bottom line bounding the cutscene

Changed paths:
    engines/mads/nebular/menu_nebular.cpp



diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index 591d745..6a13cea 100644
--- a/engines/mads/nebular/menu_nebular.cpp
+++ b/engines/mads/nebular/menu_nebular.cpp
@@ -889,9 +889,24 @@ void AnimationView::loadNextResource() {
 	if (resEntry._bgFlag)
 		palette.resetGamePalette(1, 8);
 
+	palette._mainPalette[253 * 3] = palette._mainPalette[253 * 3 + 1] 
+		= palette._mainPalette[253 * 3 + 2] = 0xb4;
+	palette.setPalette(&palette._mainPalette[253 * 3], 253, 1);
+
 	// Free any previous messages
 	scene._kernelMessages.reset();
 
+	// Handle the bars at the top/bottom
+	if (resEntry._showWhiteBars) {
+		// For animations the screen has been clipped to the middle 156 rows.
+		// So although it's slightly messy, bypass our screen class entirely,
+		// and draw the horizontal lines directly on the physiacl screen surface
+		Graphics::Surface *s = g_system->lockScreen();
+		s->hLine(0, 20, MADS_SCREEN_WIDTH, 253);
+		s->hLine(0, 179, MADS_SCREEN_WIDTH, 253);
+		g_system->unlockScreen();
+	}
+
 	// Load the new animation
 	delete _currentAnimation;
 	_currentAnimation = Animation::init(_vm, &scene);


Commit: d3cfa8cc03bf0d1f9c4927e76377acbaabd63bab
    https://github.com/scummvm/scummvm/commit/d3cfa8cc03bf0d1f9c4927e76377acbaabd63bab
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-10-15T10:35:49+03:00

Commit Message:
MADS: Bugfix for the text view debugger command

Changed paths:
    engines/mads/debugger.cpp



diff --git a/engines/mads/debugger.cpp b/engines/mads/debugger.cpp
index ee967cb..3b77d53 100644
--- a/engines/mads/debugger.cpp
+++ b/engines/mads/debugger.cpp
@@ -381,7 +381,7 @@ bool Debugger::Cmd_PlayText(int argc, const char **argv) {
 			resName.deleteChar(0);
 
 		Common::File f;
-		if (f.exists(resName) || f.exists(resName + ".res")) {
+		if (f.exists(resName) || f.exists(resName + ".txr")) {
 			Nebular::TextView::execute(_vm, resName);
 			return false;
 		} else {


Commit: 673537bad93f0b440172a0cc263ebf19cc95ffc0
    https://github.com/scummvm/scummvm/commit/673537bad93f0b440172a0cc263ebf19cc95ffc0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-10-15T11:33:14+03:00

Commit Message:
MADS: Move all the anim and text view code into a common class

The animation and text players are more or less common among all MADS
games

Changed paths:
  A engines/mads/menu_views.cpp
  A engines/mads/menu_views.h
    engines/mads/debugger.cpp
    engines/mads/dialogs.cpp
    engines/mads/dialogs.h
    engines/mads/module.mk
    engines/mads/nebular/dialogs_nebular.cpp
    engines/mads/nebular/dialogs_nebular.h
    engines/mads/nebular/menu_nebular.cpp
    engines/mads/nebular/menu_nebular.h



diff --git a/engines/mads/debugger.cpp b/engines/mads/debugger.cpp
index 3b77d53..99251f9 100644
--- a/engines/mads/debugger.cpp
+++ b/engines/mads/debugger.cpp
@@ -362,7 +362,7 @@ bool Debugger::Cmd_PlayAnim(int argc, const char **argv) {
 
 		Common::File f;
 		if (f.exists(resName) || f.exists(resName + ".res")) {
-			Nebular::AnimationView::execute(_vm, resName);
+			AnimationView::execute(_vm, resName);
 			return false;
 		} else {
 			debugPrintf("Could not find resource file\n");
@@ -382,7 +382,7 @@ bool Debugger::Cmd_PlayText(int argc, const char **argv) {
 
 		Common::File f;
 		if (f.exists(resName) || f.exists(resName + ".txr")) {
-			Nebular::TextView::execute(_vm, resName);
+			TextView::execute(_vm, resName);
 			return false;
 		} else {
 			debugPrintf("Could not find resource file\n");
diff --git a/engines/mads/dialogs.cpp b/engines/mads/dialogs.cpp
index 7e6909d..5ea8fb1 100644
--- a/engines/mads/dialogs.cpp
+++ b/engines/mads/dialogs.cpp
@@ -395,4 +395,77 @@ Dialogs::Dialogs(MADSEngine *vm)
 	_pendingDialog = DIALOG_NONE;
 }
 
+/*------------------------------------------------------------------------*/
+
+FullScreenDialog::FullScreenDialog(MADSEngine *vm) : _vm(vm) {
+	switch (_vm->getGameID()) {
+	case GType_RexNebular:
+		_screenId = 990;
+		break;
+	case GType_Phantom:
+		_screenId = 920;
+		break;
+	case GType_Dragonsphere:
+		_screenId = 922;
+		break;
+	default:
+		error("FullScreenDialog:Unknown game");
+	}
+	_palFlag = true;
+}
+
+FullScreenDialog::~FullScreenDialog() {
+	_vm->_screen.resetClipBounds();
+	_vm->_game->_scene.restrictScene();
+}
+
+void FullScreenDialog::display() {
+	Game &game = *_vm->_game;
+	Scene &scene = game._scene;
+
+	int nextSceneId = scene._nextSceneId;
+	int currentSceneId = scene._currentSceneId;
+	int priorSceneId = scene._priorSceneId;
+
+	if (_screenId > 0) {
+		SceneInfo *sceneInfo = SceneInfo::init(_vm);
+		sceneInfo->load(_screenId, 0, "", 0, scene._depthSurface, scene._backgroundSurface);
+	}
+
+	scene._priorSceneId = priorSceneId;
+	scene._currentSceneId = currentSceneId;
+	scene._nextSceneId = nextSceneId;
+
+	_vm->_events->initVars();
+	game._kernelMode = KERNEL_ROOM_INIT;
+
+	byte pal[768];
+	if (_vm->_screenFade) {
+		Common::fill(&pal[0], &pal[PALETTE_SIZE], 0);
+		_vm->_palette->setFullPalette(pal);
+	} else {
+		_vm->_palette->getFullPalette(pal);
+		_vm->_palette->fadeOut(pal, nullptr, 0, PALETTE_COUNT, 0, 1, 1, 16);
+	}
+
+	// Set Fx state and palette entries
+	game._fx = _vm->_screenFade == SCREEN_FADE_SMOOTH ? kTransitionFadeIn : kCenterVertTransition;
+	game._trigger = 0;
+
+	// Clear the screen and draw the upper and lower horizontal lines
+	_vm->_screen.empty();
+	_vm->_palette->setLowRange();
+	_vm->_screen.hLine(0, 20, MADS_SCREEN_WIDTH, 2);
+	_vm->_screen.hLine(0, 179, MADS_SCREEN_WIDTH, 2);
+	_vm->_screen.copyRectToScreen(Common::Rect(0, 0, MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT));
+
+	// Restrict the screen to the area between the two lines
+	_vm->_screen.setClipBounds(Common::Rect(0, DIALOG_TOP, MADS_SCREEN_WIDTH,
+		DIALOG_TOP + MADS_SCENE_HEIGHT));
+	_vm->_game->_scene.restrictScene();
+
+	if (_screenId > 0)
+		scene._spriteSlots.fullRefresh();
+}
+
 } // End of namespace MADS
diff --git a/engines/mads/dialogs.h b/engines/mads/dialogs.h
index c586a6f..317c7bd 100644
--- a/engines/mads/dialogs.h
+++ b/engines/mads/dialogs.h
@@ -30,6 +30,8 @@
 
 namespace MADS {
 
+#define DIALOG_TOP 22
+
 class Dialog {
 private:
 	void setDialogPalette();
@@ -226,6 +228,36 @@ public:
 	virtual bool show(int messageId, int objectId = -1) = 0;
 };
 
+class FullScreenDialog: public EventTarget {
+protected:
+	/**
+	 * Engine reference
+	 */
+	MADSEngine *_vm;
+
+	/**
+	 * Screen/scene to show background from
+	 */
+	int _screenId;
+
+	/**
+	 * Flag for palette initialization
+	 */
+	bool _palFlag;
+
+	/**
+	 * Handles displaying the screen background and dialog
+	 */
+	virtual void display();
+public:
+	/**
+	 * Constructor
+	 */
+	FullScreenDialog(MADSEngine *vm);
+
+	virtual ~FullScreenDialog();
+};
+
 } // End of namespace MADS
 
 #endif /* MADS_DIALOGS_H */
diff --git a/engines/mads/menu_views.cpp b/engines/mads/menu_views.cpp
new file mode 100644
index 0000000..6acf6cd
--- /dev/null
+++ b/engines/mads/menu_views.cpp
@@ -0,0 +1,782 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/scummsys.h"
+#include "mads/game.h"
+#include "mads/mads.h"
+#include "mads/menu_views.h"
+#include "mads/resources.h"
+#include "mads/scene.h"
+#include "mads/screen.h"
+
+namespace MADS {
+
+MenuView::MenuView(MADSEngine *vm) : FullScreenDialog(vm) {
+	_breakFlag = false;
+	_redrawFlag = true;
+	_palFlag = false;
+}
+
+void MenuView::show() {
+ 	Scene &scene = _vm->_game->_scene;	
+	EventsManager &events = *_vm->_events;
+	_vm->_screenFade = SCREEN_FADE_FAST;
+
+	scene._spriteSlots.reset(true);
+	display();
+
+	events.setEventTarget(this);
+	events.hideCursor();
+
+	while (!_breakFlag && !_vm->shouldQuit()) {
+		if (_redrawFlag) {
+			scene._kernelMessages.update();
+
+			_vm->_game->_scene.drawElements(_vm->_game->_fx, _vm->_game->_fx);
+			_redrawFlag = false;
+		}
+
+		_vm->_events->waitForNextFrame();
+		_vm->_game->_fx = kTransitionNone;
+		doFrame();
+	}
+
+	events.setEventTarget(nullptr);
+	_vm->_sound->stop();
+}
+
+void MenuView::display() {
+	_vm->_palette->resetGamePalette(4, 8);
+
+	FullScreenDialog::display();
+}
+
+bool MenuView::onEvent(Common::Event &event) {
+	if (event.type == Common::EVENT_KEYDOWN || event.type == Common::EVENT_LBUTTONDOWN) {
+		_breakFlag = true;
+		_vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
+		return true;
+	}
+
+	return false;
+}
+
+/*------------------------------------------------------------------------*/
+
+char TextView::_resourceName[100];
+#define TEXTVIEW_LINE_SPACING 2
+#define TEXT_ANIMATION_DELAY 100
+#define TV_NUM_FADE_STEPS 40
+#define TV_FADE_DELAY_MILLI 50
+
+void TextView::execute(MADSEngine *vm, const Common::String &resName) {
+	assert(resName.size() < 100);
+	Common::strlcpy(_resourceName, resName.c_str(), sizeof(_resourceName));
+	vm->_dialogs->_pendingDialog = DIALOG_TEXTVIEW;
+}
+
+TextView::TextView(MADSEngine *vm) : MenuView(vm) {
+	_animating = false;
+	_panSpeed = 0;
+	_spareScreen = nullptr;
+	_scrollCount = 0;
+	_lineY = -1;
+	_scrollTimeout = 0;
+	_panCountdown = 0;
+	_translationX = 0;
+	_screenId = -1;
+
+	_font = _vm->_font->getFont(FONT_CONVERSATION);
+	_vm->_palette->resetGamePalette(4, 0);
+
+	load();
+}
+
+TextView::~TextView() {
+}
+
+void TextView::load() {
+	Common::String scriptName(_resourceName);
+	scriptName += ".txr";
+
+	if (!_script.open(scriptName))
+		error("Could not open resource %s", _resourceName);
+
+	processLines();
+}
+
+void TextView::processLines() {
+	if (_script.eos())
+		error("Attempted to read past end of response file");
+
+	while (!_script.eos()) {
+		// Read in the next line
+		_script.readLine(_currentLine, 79);
+		char *p = _currentLine + strlen(_currentLine) - 1;
+		if (*p == '\n')
+			*p = '\0';
+
+		// Commented out line, so go loop for another
+		if (_currentLine[0] == '#')
+			continue;
+
+		// Process the line
+		char *cStart = strchr(_currentLine, '[');
+		if (cStart) {
+			while (cStart) {
+				// Loop for possible multiple commands on one line
+				char *cEnd = strchr(_currentLine, ']');
+				if (!cEnd)
+					error("Unterminated command '%s' in response file", _currentLine);
+
+				*cEnd = '\0';
+				processCommand();
+
+				// Copy rest of line (if any) to start of buffer
+				Common::strlcpy(_currentLine, cEnd + 1, sizeof(_currentLine));
+
+				cStart = strchr(_currentLine, '[');
+			}
+
+			if (_currentLine[0]) {
+				processText();
+				break;
+			}
+
+		} else {
+			processText();
+			break;
+		}
+	}
+}
+
+void TextView::processCommand() {
+	Scene &scene = _vm->_game->_scene;
+	Common::String scriptLine(_currentLine + 1);
+	scriptLine.toUppercase();
+	const char *paramP;
+	const char *commandStr = scriptLine.c_str();
+
+	if (!strncmp(commandStr, "BACKGROUND", 10)) {
+		// Set the background
+		paramP = commandStr + 10;
+		resetPalette();
+		int screenId = getParameter(&paramP);
+		
+		SceneInfo *sceneInfo = SceneInfo::init(_vm);
+		sceneInfo->load(screenId, 0, "", 0, scene._depthSurface, scene._backgroundSurface);
+		scene._spriteSlots.fullRefresh();
+		_redrawFlag = true;
+
+	} else if (!strncmp(commandStr, "GO", 2)) {
+		_animating = true;
+
+	} else if (!strncmp(commandStr, "PAN", 3)) {
+		// Set panning values
+		paramP = commandStr + 3;
+		int panX = getParameter(&paramP);
+		int panY = getParameter(&paramP);
+		int panSpeed = getParameter(&paramP);
+
+		if ((panX != 0) || (panY != 0)) {
+			_pan = Common::Point(panX, panY);
+			_panSpeed = panSpeed;
+		}
+
+	} else if (!strncmp(commandStr, "DRIVER", 6)) {
+		// Set the driver to use
+		paramP = commandStr + 7;
+
+		if (!strncmp(paramP, "#SOUND.00", 9)) {
+			int driverNum = paramP[9] - '0';
+			_vm->_sound->init(driverNum);
+		}
+	} else if (!strncmp(commandStr, "SOUND", 5)) {
+		// Set sound number
+		paramP = commandStr + 5;
+		int soundId = getParameter(&paramP);
+		_vm->_sound->command(soundId);
+
+	} else if (!strncmp(commandStr, "COLOR", 5) && ((commandStr[5] == '0') || 
+			(commandStr[5] == '1'))) {
+		// Set the text colors
+		int index = commandStr[5] - '0';
+		paramP = commandStr + 6;
+
+		byte r = getParameter(&paramP);
+		byte g = getParameter(&paramP);
+		byte b = getParameter(&paramP);
+
+		_vm->_palette->setEntry(5 + index, r, g, b);
+
+	} else if (!strncmp(commandStr, "SPARE", 5)) {
+		// Sets a secondary background number that can be later switched in with a PAGE command
+		paramP = commandStr + 6;
+		int spareIndex = commandStr[5] - '0';
+		assert(spareIndex < 4);
+		int screenId = getParameter(&paramP);
+
+		// Load the spare background
+		SceneInfo *sceneInfo = SceneInfo::init(_vm);
+		sceneInfo->_width = MADS_SCREEN_WIDTH;
+		sceneInfo->_height = MADS_SCENE_HEIGHT;
+		_spareScreens[spareIndex].setSize(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
+		sceneInfo->loadMadsV1Background(screenId, "", SCENEFLAG_TRANSLATE, 
+			_spareScreens[spareIndex]);
+		delete sceneInfo;
+
+	} else if (!strncmp(commandStr, "PAGE", 4)) {
+		// Signals to change to a previous specified secondary background
+		paramP = commandStr + 4;
+		int spareIndex = getParameter(&paramP);
+
+		// Only allow background switches if one isn't currently in progress
+		if (!_spareScreen && _spareScreens[spareIndex].getPixels() != nullptr) {
+			_spareScreen = &_spareScreens[spareIndex];
+			_translationX = 0;
+		}
+
+	} else {
+		error("Unknown response command: '%s'", commandStr);
+	}
+}
+
+int TextView::getParameter(const char **paramP) {
+	if ((**paramP != '=') && (**paramP != ','))
+		return 0;
+
+	int result = 0;
+	++*paramP;
+	while ((**paramP >= '0') && (**paramP <= '9')) {
+		result = result * 10 + (**paramP - '0');
+		++*paramP;
+	}
+
+	return result;
+}
+
+void TextView::processText() {
+	int xStart;
+
+	if (!strcmp(_currentLine, "***")) {
+		// Special signifier for end of script
+		_scrollCount = _font->getHeight() * 13;
+		_lineY = -1;
+		return;
+	}
+
+	_lineY = 0;
+
+	// Lines are always centered, except if line contains a '@', in which case the
+	// '@' marks the position that must be horizontally centered
+	char *centerP = strchr(_currentLine, '@');
+	if (centerP) {
+		*centerP = '\0';
+		xStart = (MADS_SCREEN_WIDTH / 2) - _font->getWidth(_currentLine);
+
+		// Delete the @ character and shift back the remainder of the string
+		char *p = centerP + 1;
+		if (*p == ' ') ++p;
+		strcpy(centerP, p);
+
+	} else {
+		int lineWidth = _font->getWidth(_currentLine);
+		xStart = (MADS_SCREEN_WIDTH - lineWidth) / 2;
+	}
+
+	// Add the new line to the list of pending lines
+	TextLine tl;
+	tl._pos = Common::Point(xStart, MADS_SCENE_HEIGHT);
+	tl._line = _currentLine;
+	tl._textDisplayIndex = -1;
+	_textLines.push_back(tl);
+}
+
+void TextView::display() {
+	FullScreenDialog::display();
+}
+
+void TextView::resetPalette() {
+	_vm->_palette->resetGamePalette(8, 8);
+	_vm->_palette->setEntry(5, 0, 63, 63);
+	_vm->_palette->setEntry(6, 0, 45, 45);
+}
+
+void TextView::doFrame() {
+	Scene &scene = _vm->_game->_scene;
+	if (!_animating)
+		return;
+
+	// Only update state if wait period has expired
+	uint32 currTime = g_system->getMillis();
+
+	// If a screen transition is in progress and it's time for another column, handle it
+	if (_spareScreen) {
+		byte *srcP = _spareScreen->getBasePtr(_translationX, 0);
+		byte *bgP = scene._backgroundSurface.getBasePtr(_translationX, 0);
+		byte *screenP = (byte *)_vm->_screen.getBasePtr(_translationX, 0);
+
+		for (int y = 0; y < MADS_SCENE_HEIGHT; ++y, srcP += MADS_SCREEN_WIDTH,
+			bgP += MADS_SCREEN_WIDTH, screenP += MADS_SCREEN_WIDTH) {
+			*bgP = *srcP;
+			*screenP = *srcP;
+		}
+
+		// Flag the column of the screen is modified
+		_vm->_screen.copyRectToScreen(Common::Rect(_translationX, 0,
+			_translationX + 1, MADS_SCENE_HEIGHT));
+
+		// Keep moving the column to copy to the right
+		if (++_translationX == MADS_SCREEN_WIDTH) {
+			// Surface transition is complete
+			_spareScreen = nullptr;
+		}
+	}
+
+	// Make sure it's time for an update
+	if (currTime < _scrollTimeout)
+		return;
+	_scrollTimeout = g_system->getMillis() + TEXT_ANIMATION_DELAY;
+	_redrawFlag = true;
+
+	// If any panning values are set, pan the background surface
+	if ((_pan.x != 0) || (_pan.y != 0)) {
+		if (_panCountdown > 0) {
+			--_panCountdown;
+			return;
+		}
+
+		// Handle horizontal panning
+		if (_pan.x != 0) {
+			byte *lineTemp = new byte[_pan.x];
+			for (int y = 0; y < MADS_SCENE_HEIGHT; ++y) {
+				byte *pixelsP = (byte *)scene._backgroundSurface.getBasePtr(0, y);
+
+				// Copy the first X pixels into temp buffer, move the rest of the line
+				// to the start of the line, and then move temp buffer pixels to end of line
+				Common::copy(pixelsP, pixelsP + _pan.x, lineTemp);
+				Common::copy(pixelsP + _pan.x, pixelsP + MADS_SCREEN_WIDTH, pixelsP);
+				Common::copy(lineTemp, lineTemp + _pan.x, pixelsP + MADS_SCREEN_WIDTH - _pan.x);
+			}
+
+			delete[] lineTemp;
+		}
+
+		// Handle vertical panning
+		if (_pan.y != 0) {
+			// Store the bottom Y lines into a temp buffer, move the rest of the lines down,
+			// and then copy the stored lines back to the top of the screen
+			byte *linesTemp = new byte[_pan.y * MADS_SCREEN_WIDTH];
+			byte *pixelsP = (byte *)scene._backgroundSurface.getBasePtr(0, MADS_SCENE_HEIGHT - _pan.y);
+			Common::copy(pixelsP, pixelsP + MADS_SCREEN_WIDTH * _pan.y, linesTemp);
+
+			for (int y = MADS_SCENE_HEIGHT - 1; y >= _pan.y; --y) {
+				byte *destP = (byte *)scene._backgroundSurface.getBasePtr(0, y);
+				byte *srcP = (byte *)scene._backgroundSurface.getBasePtr(0, y - _pan.y);
+				Common::copy(srcP, srcP + MADS_SCREEN_WIDTH, destP);
+			}
+
+			Common::copy(linesTemp, linesTemp + _pan.y * MADS_SCREEN_WIDTH, 
+				(byte *)scene._backgroundSurface.getPixels());
+			delete[] linesTemp;
+		}
+
+		// Flag for a full screen refresh
+		scene._spriteSlots.fullRefresh();
+	}
+
+	// Scroll all active text lines up
+	for (int i = _textLines.size() - 1; i >= 0; --i) {
+		TextLine &tl = _textLines[i];
+		if (tl._textDisplayIndex != -1)
+			// Expire the text line that's already on-screen
+			scene._textDisplay.expire(tl._textDisplayIndex);
+
+		tl._pos.y--;
+		if (tl._pos.y < 0) {
+			_textLines.remove_at(i);
+		} else {
+			tl._textDisplayIndex = scene._textDisplay.add(tl._pos.x, tl._pos.y, 
+				0x605, -1, tl._line, _font);
+		}
+	}
+
+	if (_scrollCount > 0) {
+		// Handling final scrolling of text off of screen
+		if (--_scrollCount == 0) {
+			scriptDone();
+			return;
+		}
+	} else {
+		// Handling a text row
+		if (++_lineY == (_font->getHeight() + TEXTVIEW_LINE_SPACING))
+			processLines();
+	}
+}
+
+void TextView::scriptDone() {
+	_breakFlag = true;
+	_vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
+}
+
+/*------------------------------------------------------------------------*/
+
+char AnimationView::_resourceName[100];
+
+void AnimationView::execute(MADSEngine *vm, const Common::String &resName) {
+	assert(resName.size() < 100);
+	Common::strlcpy(_resourceName, resName.c_str(), sizeof(_resourceName));
+	vm->_dialogs->_pendingDialog = DIALOG_ANIMVIEW;
+}
+
+AnimationView::AnimationView(MADSEngine *vm) : MenuView(vm) {
+	_redrawFlag = false;
+
+	_soundDriverLoaded = false;
+	_previousUpdate = 0;
+	_screenId = -1;
+	_resetPalette = false;
+	_resyncMode = NEVER;
+	_v1 = 0;
+	_v2 = -1;
+	_resourceIndex = -1;
+	_currentAnimation = nullptr;
+	_sfx = 0;
+	_soundFlag = _bgLoadFlag = true;
+	_showWhiteBars = true;
+	_manualFrameNumber = 0;
+	_manualSpriteSet = nullptr;
+	_manualStartFrame = _manualEndFrame = 0;
+	_manualFrame2 = 0;
+	_animFrameNumber = 0;
+	_nextCyclingActive = false;
+	_sceneInfo = SceneInfo::init(_vm);
+
+	load();
+}
+
+AnimationView::~AnimationView() {
+	delete _currentAnimation;
+	delete _sceneInfo;
+}
+
+void AnimationView::load() {
+	Common::String resName(_resourceName);
+	if (!resName.hasSuffix("."))
+		resName += ".res";
+
+	if (!_script.open(resName))
+		error("Could not open resource %s", resName.c_str());
+
+	processLines();
+}
+
+void AnimationView::display() {
+	Scene &scene = _vm->_game->_scene;
+	_vm->_palette->initPalette();
+	Common::fill(&_vm->_palette->_cyclingPalette[0], &_vm->_palette->_cyclingPalette[PALETTE_SIZE], 0);
+
+	_vm->_palette->resetGamePalette(1, 8);
+	scene._spriteSlots.reset();
+	scene._paletteCycles.clear();
+
+	MenuView::display();
+}
+
+bool AnimationView::onEvent(Common::Event &event) {
+	// Wait for the Escape key or a mouse press
+	if (((event.type == Common::EVENT_KEYDOWN) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) ||
+			(event.type == Common::EVENT_RBUTTONUP)) {
+		scriptDone();
+		return true;
+	}
+
+	return false;
+}
+
+void AnimationView::doFrame() {
+	Scene &scene = _vm->_game->_scene;
+	
+	if (_resourceIndex == -1 || _currentAnimation->freeFlag()) {
+		if (++_resourceIndex == (int)_resources.size()) {
+			scriptDone();
+		} else {
+			scene._frameStartTime = 0;
+			loadNextResource();
+		}
+	} else if (_currentAnimation->getCurrentFrame() == 1) {
+		scene._cyclingActive = _nextCyclingActive;
+	}
+
+	if (_currentAnimation) {
+		++scene._frameStartTime;
+		_currentAnimation->update();
+		_redrawFlag = true;
+	}
+}
+
+void AnimationView::loadNextResource() {
+	Scene &scene = _vm->_game->_scene;
+	Palette &palette = *_vm->_palette;
+	ResourceEntry &resEntry = _resources[_resourceIndex];
+	Common::Array<PaletteCycle> paletteCycles;
+
+	if (resEntry._bgFlag)
+		palette.resetGamePalette(1, 8);
+
+	palette._mainPalette[253 * 3] = palette._mainPalette[253 * 3 + 1] 
+		= palette._mainPalette[253 * 3 + 2] = 0xb4;
+	palette.setPalette(&palette._mainPalette[253 * 3], 253, 1);
+
+	// Free any previous messages
+	scene._kernelMessages.reset();
+
+	// Handle the bars at the top/bottom
+	if (resEntry._showWhiteBars) {
+		// For animations the screen has been clipped to the middle 156 rows.
+		// So although it's slightly messy, bypass our screen class entirely,
+		// and draw the horizontal lines directly on the physiacl screen surface
+		Graphics::Surface *s = g_system->lockScreen();
+		s->hLine(0, 20, MADS_SCREEN_WIDTH, 253);
+		s->hLine(0, 179, MADS_SCREEN_WIDTH, 253);
+		g_system->unlockScreen();
+	}
+
+	// Load the new animation
+	delete _currentAnimation;
+	_currentAnimation = Animation::init(_vm, &scene);
+	int flags = ANIMFLAG_ANIMVIEW | (resEntry._bgFlag ? ANIMFLAG_LOAD_BACKGROUND : 0);
+	_currentAnimation->load(scene._backgroundSurface, scene._depthSurface, 
+		resEntry._resourceName, flags, &paletteCycles, _sceneInfo);
+
+	// Signal for a screen refresh
+	scene._spriteSlots.fullRefresh();
+
+	// If a sound driver has been specified, then load the correct one
+	if (!_currentAnimation->_header._soundName.empty()) {
+		const char *chP = strchr(_currentAnimation->_header._soundName.c_str(), '.');
+		assert(chP);
+
+		// Handle both Rex naming (xxx.009) and naming in later games (e.g. xxx.ph9)
+		int driverNum = atoi(chP + 3);
+		// HACK for Dragon
+		if (_currentAnimation->_header._soundName == "#SOUND.DRG")
+			driverNum = 9;
+		_vm->_sound->init(driverNum);
+	}
+
+	// Handle any manual setup
+	if (_currentAnimation->_header._manualFlag) {
+		_manualFrameNumber = _currentAnimation->_header._spritesIndex;
+		_manualSpriteSet = _currentAnimation->getSpriteSet(_manualFrameNumber);
+	}
+
+	// Set the sound data for the animation
+	_vm->_sound->setEnabled(resEntry._soundFlag);
+
+	Common::String dsrName = _currentAnimation->_header._dsrName;
+	if (!dsrName.empty())
+		_vm->_audio->setSoundGroup(dsrName);
+
+	// Start the new animation
+	_currentAnimation->startAnimation(0);
+
+	// Handle the palette and cycling palette
+	scene._cyclingActive = false;
+	Common::copy(&palette._mainPalette[0], &palette._mainPalette[PALETTE_SIZE],
+		&palette._cyclingPalette[0]);
+
+	_vm->_game->_fx = (ScreenTransition)resEntry._fx;
+	_nextCyclingActive = paletteCycles.size() > 0;
+	if (!_vm->_game->_fx) {
+		palette.setFullPalette(palette._mainPalette);
+	}
+
+	scene.initPaletteAnimation(paletteCycles, _nextCyclingActive && !_vm->_game->_fx);
+}
+
+void AnimationView::scriptDone() {
+	_breakFlag = true;
+	_vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
+}
+
+void AnimationView::processLines() {
+	if (_script.eos()) {
+		// end of script, end animation
+		scriptDone();
+		return;
+	}
+
+	while (!_script.eos()) {
+		// Get in next line
+		_currentLine.clear();
+		char c;
+		while (!_script.eos() && (c = _script.readByte()) != '\n') {
+			if (c != '\r' && c != '\0')
+				_currentLine += c;
+		}
+		
+		// Process the line
+		while (!_currentLine.empty()) {
+			if (_currentLine.hasPrefix("-")) {
+				_currentLine.deleteChar(0);
+
+				processCommand();
+			} else {
+				// Get resource name
+				Common::String resName;
+				while (!_currentLine.empty() && (c = _currentLine[0]) != ' ') {
+					_currentLine.deleteChar(0);
+					resName += c;
+				}
+
+				// Add resource into list along with any set state information
+				_resources.push_back(ResourceEntry(resName, _sfx, _soundFlag, 
+					_bgLoadFlag, _showWhiteBars));
+
+				// Fx resets between resource entries
+				_sfx = 0;
+			}
+
+			// Skip any spaces
+			while (_currentLine.hasPrefix(" "))
+				_currentLine.deleteChar(0);
+		}
+	}
+}
+
+void AnimationView::processCommand() {
+	// Get the command character
+	char commandChar = toupper(_currentLine[0]);
+	_currentLine.deleteChar(0);
+
+	// Handle the command
+	switch (commandChar) {
+	case 'B':
+		_soundFlag = !_soundFlag;
+		break;
+	case 'H':
+		// -h[:ex]  Disable EMS / XMS high memory support
+		if (_currentLine.hasPrefix(":"))
+			_currentLine.deleteChar(0);
+		while (_currentLine.hasPrefix("e") || _currentLine.hasPrefix("x"))
+			_currentLine.deleteChar(0);
+		break;
+	case 'O':
+		// -o:xxx  Specify opening special effect
+		assert(_currentLine[0] == ':');
+		_currentLine.deleteChar(0);
+		_sfx = getParameter();
+		break;
+	case 'P':
+		// Switch to CONCAT mode, which is ignored anyway
+		break;
+	case 'R': {
+		// Resynch timer (always, beginning, never)
+		assert(_currentLine[0] == ':');
+		_currentLine.deleteChar(0);
+
+		char v = toupper(_currentLine[0]);
+		_currentLine.deleteChar(0);
+		if (v == 'N')
+			_resyncMode = NEVER;
+		else if (v == 'A')
+			_resyncMode = ALWAYS;
+		else if (v == 'B')
+			_resyncMode = BEGINNING;
+		else
+			error("Unknown parameter");
+		break;
+	}
+	case 'W':
+		// Switch white bars being visible
+		_showWhiteBars = !_showWhiteBars;
+		break;
+	case 'X':
+		// Exit after animation finishes. Ignore
+		break;
+	case 'D':
+		// Unimplemented and ignored in the original. Ignore as well
+		break;
+	case 'Y':
+		// Reset palette on startup
+		_resetPalette = true;
+		break;
+	default:
+		error("Unknown command char: '%c'", commandChar);
+	}
+}
+
+int AnimationView::getParameter() {
+	int result = 0;
+
+	while (!_currentLine.empty()) {
+		char c = _currentLine[0];
+		
+		if (c >= '0' && c <= '9') {
+			_currentLine.deleteChar(0);
+			result = result * 10 + (c - '0');
+		} else {
+			break;
+		}
+	}
+
+	return result;
+}
+
+void AnimationView::checkResource(const Common::String &resourceName) {
+	//bool hasSuffix = false;
+	
+}
+
+int AnimationView::scanResourceIndex(const Common::String &resourceName) {
+	int foundIndex = -1;
+
+	if (_v1) {
+		const char *chP = strchr(resourceName.c_str(), '\\');
+		if (!chP) {
+			chP = strchr(resourceName.c_str(), '*');
+		}
+
+		Common::String resName = chP ? Common::String(chP + 1) : resourceName;
+
+		if (_v2 != 3) {
+			assert(_resIndex.size() == 0);
+		}
+
+		// Scan for the resource name
+		for (uint resIndex = 0; resIndex < _resIndex.size(); ++resIndex) {
+			ResIndexEntry &resEntry = _resIndex[resIndex];
+			if (resEntry._resourceName.compareToIgnoreCase(resourceName)) {
+				foundIndex = resIndex;
+				break;
+			}
+		}
+	}
+
+	if (foundIndex >= 0) {
+		// TODO
+	}
+	return -1;
+}
+
+} // End of namespace MADS
diff --git a/engines/mads/menu_views.h b/engines/mads/menu_views.h
new file mode 100644
index 0000000..6faa665
--- /dev/null
+++ b/engines/mads/menu_views.h
@@ -0,0 +1,226 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef MADS_MENU_VIEWS_H
+#define MADS_MENU_VIEWS_H
+
+#include "common/scummsys.h"
+#include "mads/dialogs.h"
+#include "mads/game.h"
+#include "mads/msurface.h"
+
+namespace MADS {
+
+class MADSEngine;
+
+class MenuView: public FullScreenDialog {
+protected:
+	bool _breakFlag;
+	bool _redrawFlag;
+
+	virtual void doFrame() = 0;
+
+	virtual void display();
+
+	/**
+	* Event handler
+	*/
+	virtual bool onEvent(Common::Event &event);
+public:
+	MenuView(MADSEngine *vm);
+
+	virtual ~MenuView() {}
+
+	virtual void show();
+};
+
+struct TextLine {
+	Common::Point _pos;
+	Common::String _line;
+	int _textDisplayIndex;
+};
+
+/**
+ * Scrolling text view
+ */
+class TextView : public MenuView {
+private:
+	static char _resourceName[100];
+
+	bool _animating;
+	Common::Array<TextLine> _textLines;
+	Common::Point _pan;
+	int _panSpeed;
+	MSurface _spareScreens[4];
+	int _scrollCount;
+	int _lineY;
+	uint32 _scrollTimeout;
+	int _panCountdown;
+	int _translationX;
+	Common::File _script;
+	char _currentLine[80];
+	MSurface *_spareScreen;
+	Font *_font;
+private:
+	/**
+	 * Load the text resource
+	 */
+	void load();
+
+	/**
+	 * Process the lines
+	 */
+	void processLines();
+
+	/**
+	 * Process a command from the script file
+	 */
+	void processCommand();
+
+	/**
+	 * Process text from the script file
+	 */
+	void processText();
+
+	/**
+	 * Get a parameter from line
+	 */
+	int getParameter(const char **paramP);
+
+	/**
+	 * Called when the script is finished
+	 */
+	void scriptDone();
+
+	/**
+	 * Reset the game palette
+	 */
+	void resetPalette();
+protected:
+	virtual void display();
+
+	virtual void doFrame();
+public:
+	/**
+	 * Queue the given text resource for display
+	 */
+	static void execute(MADSEngine *vm, const Common::String &resName);
+
+	TextView(MADSEngine *vm);
+
+	virtual ~TextView();
+};
+
+enum ResyncMode { NEVER, ALWAYS, BEGINNING };
+
+struct ResourceEntry {
+	Common::String _resourceName;
+	int _fx;
+	bool _soundFlag;
+	bool _bgFlag;
+	bool _showWhiteBars;
+
+	ResourceEntry() {}
+	ResourceEntry(const Common::String &resName, int fx, bool soundFlag,
+			bool bgFlag, bool showWhiteBars) {
+		_resourceName = resName;
+		_fx = fx;
+		_soundFlag = soundFlag;
+		_bgFlag = bgFlag;
+		_showWhiteBars = showWhiteBars;
+	}
+};
+
+struct ResIndexEntry {
+	int _id;
+	int _v;
+	Common::String _resourceName;
+
+	ResIndexEntry() {}
+};
+
+/**
+* Animation cutscene view
+*/
+class AnimationView : public MenuView {
+private:
+	static char _resourceName[100];
+
+	Common::File _script;
+	uint32 _previousUpdate;
+	Common::String _currentLine;
+	bool _soundDriverLoaded;
+	bool _resetPalette;
+	ResyncMode _resyncMode;
+	int _sfx;
+	bool _soundFlag;
+	bool _bgLoadFlag;
+	bool _showWhiteBars;
+	Common::Array<ResourceEntry> _resources;
+	Common::Array<ResIndexEntry> _resIndex;
+	int _v1;
+	int _v2;
+	int _resourceIndex;
+	SceneInfo *_sceneInfo;
+	Animation *_currentAnimation;
+	int _manualFrameNumber;
+	SpriteAsset *_manualSpriteSet;
+	int _manualStartFrame, _manualEndFrame;
+	int _manualFrame2;
+	int _animFrameNumber;
+	bool _nextCyclingActive;
+private:
+	void checkResource(const Common::String &resourceName);
+
+	int scanResourceIndex(const Common::String &resourceName);
+
+	void load();
+
+	void processLines();
+
+	void processCommand();
+
+	int getParameter();
+
+	void scriptDone();
+
+	void loadNextResource();
+protected:
+	virtual void display();
+
+	virtual void doFrame();
+
+	virtual bool onEvent(Common::Event &event);
+public:
+	/**
+	* Queue the given text resource for display
+	*/
+	static void execute(MADSEngine *vm, const Common::String &resName);
+
+	AnimationView(MADSEngine *vm);
+
+	virtual ~AnimationView();
+};
+
+} // End of namespace MADS
+
+#endif /* MADS_MENU_VIEWS_H */
diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index 8a792a7..7cb7a91 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -37,6 +37,7 @@ MODULE_OBJS := \
 	hotspots.o \
 	inventory.o \
 	mads.o \
+	menu_views.o \
 	messages.o \
 	msurface.o \
 	palette.o \
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index 35a7d3b..86244bd 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -553,67 +553,6 @@ void PictureDialog::restore() {
 
 /*------------------------------------------------------------------------*/
 
-FullScreenDialog::FullScreenDialog(MADSEngine *vm) : _vm(vm) {
-	_screenId = 990;
-	_palFlag = true;
-}
-
-FullScreenDialog::~FullScreenDialog() {
-	_vm->_screen.resetClipBounds();
-	_vm->_game->_scene.restrictScene();
-}
-
-void FullScreenDialog::display() {
-	Game &game = *_vm->_game;
-	Scene &scene = game._scene;
-
-	int nextSceneId = scene._nextSceneId;
-	int currentSceneId = scene._currentSceneId;
-	int priorSceneId = scene._priorSceneId;
-
-	if (_screenId > 0) {
-		SceneInfo *sceneInfo = SceneInfo::init(_vm);
-		sceneInfo->load(_screenId, 0, "", 0, scene._depthSurface, scene._backgroundSurface);
-	}
-
-	scene._priorSceneId = priorSceneId;
-	scene._currentSceneId = currentSceneId;
-	scene._nextSceneId = nextSceneId;
-
-	_vm->_events->initVars();
-	game._kernelMode = KERNEL_ROOM_INIT;
-
-	byte pal[768];
-	if (_vm->_screenFade) {
-		Common::fill(&pal[0], &pal[PALETTE_SIZE], 0);
-		_vm->_palette->setFullPalette(pal);
-	} else {
-		_vm->_palette->getFullPalette(pal);
-		_vm->_palette->fadeOut(pal, nullptr, 0, PALETTE_COUNT, 0, 1, 1, 16);
-	}
-
-	// Set Fx state and palette entries
-	game._fx = _vm->_screenFade == SCREEN_FADE_SMOOTH ? kTransitionFadeIn : kCenterVertTransition;
-	game._trigger = 0;
-
-	// Clear the screen and draw the upper and lower horizontal lines
-	_vm->_screen.empty();
-	_vm->_palette->setLowRange();
-	_vm->_screen.hLine(0, 20, MADS_SCREEN_WIDTH, 2);
-	_vm->_screen.hLine(0, 179, MADS_SCREEN_WIDTH, 2);
-	_vm->_screen.copyRectToScreen(Common::Rect(0, 0, MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT));
-
-	// Restrict the screen to the area between the two lines
-	_vm->_screen.setClipBounds(Common::Rect(0, DIALOG_TOP, MADS_SCREEN_WIDTH,
-		DIALOG_TOP + MADS_SCENE_HEIGHT));
-	_vm->_game->_scene.restrictScene();
-
-	if (_screenId > 0)
-		scene._spriteSlots.fullRefresh();
-}
-
-/*------------------------------------------------------------------------*/
-
 GameDialog::DialogLine::DialogLine() {
 	_active = true;
 	_state = DLGSTATE_UNSELECTED;
diff --git a/engines/mads/nebular/dialogs_nebular.h b/engines/mads/nebular/dialogs_nebular.h
index f64f992..d00cd87 100644
--- a/engines/mads/nebular/dialogs_nebular.h
+++ b/engines/mads/nebular/dialogs_nebular.h
@@ -31,8 +31,6 @@ namespace MADS {
 
 namespace Nebular {
 
-#define DIALOG_TOP 22
-
 enum CapitalizationMode { kUppercase = 0, kLowercase = 1, kUpperAndLower = 2 };
 
 class DialogsNebular : public Dialogs {
@@ -109,36 +107,6 @@ enum DialogTextAlign { ALIGN_NONE = 0, ALIGN_CENTER = -1, ALIGN_AT_CENTER = -2,
 
 enum DialogState { DLGSTATE_UNSELECTED = 0, DLGSTATE_SELECTED = 1, DLGSTATE_FOCUSED = 2 };
 
-class FullScreenDialog: public EventTarget {
-protected:
-	/**
-	 * Engine reference
-	 */
-	MADSEngine *_vm;
-
-	/**
-	 * Screen/scene to show background from
-	 */
-	int _screenId;
-
-	/**
-	 * Flag for palette initialization
-	 */
-	bool _palFlag;
-
-	/**
-	 * Handles displaying the screen background and dialog
-	 */
-	virtual void display();
-public:
-	/**
-	 * Constructor
-	 */
-	FullScreenDialog(MADSEngine *vm);
-
-	virtual ~FullScreenDialog();
-};
-
 class GameDialog: public FullScreenDialog {
 	struct DialogLine {
 		bool _active;
diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index 6a13cea..717e3f6 100644
--- a/engines/mads/nebular/menu_nebular.cpp
+++ b/engines/mads/nebular/menu_nebular.cpp
@@ -23,6 +23,7 @@
 #include "common/scummsys.h"
 #include "mads/game.h"
 #include "mads/mads.h"
+#include "mads/menu_views.h"
 #include "mads/resources.h"
 #include "mads/scene.h"
 #include "mads/screen.h"
@@ -36,58 +37,6 @@ namespace Nebular {
 #define MADS_MENU_Y ((MADS_SCREEN_HEIGHT - MADS_SCENE_HEIGHT) / 2)
 #define MADS_MENU_ANIM_DELAY 70
 
-MenuView::MenuView(MADSEngine *vm) : FullScreenDialog(vm) {
-	_breakFlag = false;
-	_redrawFlag = true;
-	_palFlag = false;
-}
-
-void MenuView::show() {
- 	Scene &scene = _vm->_game->_scene;	
-	EventsManager &events = *_vm->_events;
-	_vm->_screenFade = SCREEN_FADE_FAST;
-
-	scene._spriteSlots.reset(true);
-	display();
-
-	events.setEventTarget(this);
-	events.hideCursor();
-
-	while (!_breakFlag && !_vm->shouldQuit()) {
-		if (_redrawFlag) {
-			scene._kernelMessages.update();
-
-			_vm->_game->_scene.drawElements(_vm->_game->_fx, _vm->_game->_fx);
-			_redrawFlag = false;
-		}
-
-		_vm->_events->waitForNextFrame();
-		_vm->_game->_fx = kTransitionNone;
-		doFrame();
-	}
-
-	events.setEventTarget(nullptr);
-	_vm->_sound->stop();
-}
-
-void MenuView::display() {
-	_vm->_palette->resetGamePalette(4, 8);
-
-	FullScreenDialog::display();
-}
-
-bool MenuView::onEvent(Common::Event &event) {
-	if (event.type == Common::EVENT_KEYDOWN || event.type == Common::EVENT_LBUTTONDOWN) {
-		_breakFlag = true;
-		_vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
-		return true;
-	}
-
-	return false;
-}
-
-/*------------------------------------------------------------------------*/
-
 MainMenu::MainMenu(MADSEngine *vm): MenuView(vm) {
 	Common::fill(&_menuItems[0], &_menuItems[7], (SpriteAsset *)nullptr);
 	Common::fill(&_menuItemIndexes[0], &_menuItemIndexes[7], -1);
@@ -426,706 +375,6 @@ bool AdvertView::onEvent(Common::Event &event) {
 	return false;
 }
 
-/*------------------------------------------------------------------------*/
-
-char TextView::_resourceName[100];
-#define TEXTVIEW_LINE_SPACING 2
-#define TEXT_ANIMATION_DELAY 100
-#define TV_NUM_FADE_STEPS 40
-#define TV_FADE_DELAY_MILLI 50
-
-void TextView::execute(MADSEngine *vm, const Common::String &resName) {
-	assert(resName.size() < 100);
-	Common::strlcpy(_resourceName, resName.c_str(), sizeof(_resourceName));
-	vm->_dialogs->_pendingDialog = DIALOG_TEXTVIEW;
-}
-
-TextView::TextView(MADSEngine *vm) : MenuView(vm) {
-	_animating = false;
-	_panSpeed = 0;
-	_spareScreen = nullptr;
-	_scrollCount = 0;
-	_lineY = -1;
-	_scrollTimeout = 0;
-	_panCountdown = 0;
-	_translationX = 0;
-	_screenId = -1;
-
-	_font = _vm->_font->getFont(FONT_CONVERSATION);
-	_vm->_palette->resetGamePalette(4, 0);
-
-	load();
-}
-
-TextView::~TextView() {
-}
-
-void TextView::load() {
-	Common::String scriptName(_resourceName);
-	scriptName += ".txr";
-
-	if (!_script.open(scriptName))
-		error("Could not open resource %s", _resourceName);
-
-	processLines();
-}
-
-void TextView::processLines() {
-	if (_script.eos())
-		error("Attempted to read past end of response file");
-
-	while (!_script.eos()) {
-		// Read in the next line
-		_script.readLine(_currentLine, 79);
-		char *p = _currentLine + strlen(_currentLine) - 1;
-		if (*p == '\n')
-			*p = '\0';
-
-		// Commented out line, so go loop for another
-		if (_currentLine[0] == '#')
-			continue;
-
-		// Process the line
-		char *cStart = strchr(_currentLine, '[');
-		if (cStart) {
-			while (cStart) {
-				// Loop for possible multiple commands on one line
-				char *cEnd = strchr(_currentLine, ']');
-				if (!cEnd)
-					error("Unterminated command '%s' in response file", _currentLine);
-
-				*cEnd = '\0';
-				processCommand();
-
-				// Copy rest of line (if any) to start of buffer
-				Common::strlcpy(_currentLine, cEnd + 1, sizeof(_currentLine));
-
-				cStart = strchr(_currentLine, '[');
-			}
-
-			if (_currentLine[0]) {
-				processText();
-				break;
-			}
-
-		} else {
-			processText();
-			break;
-		}
-	}
-}
-
-void TextView::processCommand() {
-	Scene &scene = _vm->_game->_scene;
-	Common::String scriptLine(_currentLine + 1);
-	scriptLine.toUppercase();
-	const char *paramP;
-	const char *commandStr = scriptLine.c_str();
-
-	if (!strncmp(commandStr, "BACKGROUND", 10)) {
-		// Set the background
-		paramP = commandStr + 10;
-		resetPalette();
-		int screenId = getParameter(&paramP);
-		
-		SceneInfo *sceneInfo = SceneInfo::init(_vm);
-		sceneInfo->load(screenId, 0, "", 0, scene._depthSurface, scene._backgroundSurface);
-		scene._spriteSlots.fullRefresh();
-		_redrawFlag = true;
-
-	} else if (!strncmp(commandStr, "GO", 2)) {
-		_animating = true;
-
-	} else if (!strncmp(commandStr, "PAN", 3)) {
-		// Set panning values
-		paramP = commandStr + 3;
-		int panX = getParameter(&paramP);
-		int panY = getParameter(&paramP);
-		int panSpeed = getParameter(&paramP);
-
-		if ((panX != 0) || (panY != 0)) {
-			_pan = Common::Point(panX, panY);
-			_panSpeed = panSpeed;
-		}
-
-	} else if (!strncmp(commandStr, "DRIVER", 6)) {
-		// Set the driver to use
-		paramP = commandStr + 7;
-
-		if (!strncmp(paramP, "#SOUND.00", 9)) {
-			int driverNum = paramP[9] - '0';
-			_vm->_sound->init(driverNum);
-		}
-	} else if (!strncmp(commandStr, "SOUND", 5)) {
-		// Set sound number
-		paramP = commandStr + 5;
-		int soundId = getParameter(&paramP);
-		_vm->_sound->command(soundId);
-
-	} else if (!strncmp(commandStr, "COLOR", 5) && ((commandStr[5] == '0') || 
-			(commandStr[5] == '1'))) {
-		// Set the text colors
-		int index = commandStr[5] - '0';
-		paramP = commandStr + 6;
-
-		byte r = getParameter(&paramP);
-		byte g = getParameter(&paramP);
-		byte b = getParameter(&paramP);
-
-		_vm->_palette->setEntry(5 + index, r, g, b);
-
-	} else if (!strncmp(commandStr, "SPARE", 5)) {
-		// Sets a secondary background number that can be later switched in with a PAGE command
-		paramP = commandStr + 6;
-		int spareIndex = commandStr[5] - '0';
-		assert(spareIndex < 4);
-		int screenId = getParameter(&paramP);
-
-		// Load the spare background
-		SceneInfo *sceneInfo = SceneInfo::init(_vm);
-		sceneInfo->_width = MADS_SCREEN_WIDTH;
-		sceneInfo->_height = MADS_SCENE_HEIGHT;
-		_spareScreens[spareIndex].setSize(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
-		sceneInfo->loadMadsV1Background(screenId, "", SCENEFLAG_TRANSLATE, 
-			_spareScreens[spareIndex]);
-		delete sceneInfo;
-
-	} else if (!strncmp(commandStr, "PAGE", 4)) {
-		// Signals to change to a previous specified secondary background
-		paramP = commandStr + 4;
-		int spareIndex = getParameter(&paramP);
-
-		// Only allow background switches if one isn't currently in progress
-		if (!_spareScreen && _spareScreens[spareIndex].getPixels() != nullptr) {
-			_spareScreen = &_spareScreens[spareIndex];
-			_translationX = 0;
-		}
-
-	} else {
-		error("Unknown response command: '%s'", commandStr);
-	}
-}
-
-int TextView::getParameter(const char **paramP) {
-	if ((**paramP != '=') && (**paramP != ','))
-		return 0;
-
-	int result = 0;
-	++*paramP;
-	while ((**paramP >= '0') && (**paramP <= '9')) {
-		result = result * 10 + (**paramP - '0');
-		++*paramP;
-	}
-
-	return result;
-}
-
-void TextView::processText() {
-	int xStart;
-
-	if (!strcmp(_currentLine, "***")) {
-		// Special signifier for end of script
-		_scrollCount = _font->getHeight() * 13;
-		_lineY = -1;
-		return;
-	}
-
-	_lineY = 0;
-
-	// Lines are always centered, except if line contains a '@', in which case the
-	// '@' marks the position that must be horizontally centered
-	char *centerP = strchr(_currentLine, '@');
-	if (centerP) {
-		*centerP = '\0';
-		xStart = (MADS_SCREEN_WIDTH / 2) - _font->getWidth(_currentLine);
-
-		// Delete the @ character and shift back the remainder of the string
-		char *p = centerP + 1;
-		if (*p == ' ') ++p;
-		strcpy(centerP, p);
-
-	} else {
-		int lineWidth = _font->getWidth(_currentLine);
-		xStart = (MADS_SCREEN_WIDTH - lineWidth) / 2;
-	}
-
-	// Add the new line to the list of pending lines
-	TextLine tl;
-	tl._pos = Common::Point(xStart, MADS_SCENE_HEIGHT);
-	tl._line = _currentLine;
-	tl._textDisplayIndex = -1;
-	_textLines.push_back(tl);
-}
-
-void TextView::display() {
-	FullScreenDialog::display();
-}
-
-void TextView::resetPalette() {
-	_vm->_palette->resetGamePalette(8, 8);
-	_vm->_palette->setEntry(5, 0, 63, 63);
-	_vm->_palette->setEntry(6, 0, 45, 45);
-}
-
-void TextView::doFrame() {
-	Scene &scene = _vm->_game->_scene;
-	if (!_animating)
-		return;
-
-	// Only update state if wait period has expired
-	uint32 currTime = g_system->getMillis();
-
-	// If a screen transition is in progress and it's time for another column, handle it
-	if (_spareScreen) {
-		byte *srcP = _spareScreen->getBasePtr(_translationX, 0);
-		byte *bgP = scene._backgroundSurface.getBasePtr(_translationX, 0);
-		byte *screenP = (byte *)_vm->_screen.getBasePtr(_translationX, 0);
-
-		for (int y = 0; y < MADS_SCENE_HEIGHT; ++y, srcP += MADS_SCREEN_WIDTH,
-			bgP += MADS_SCREEN_WIDTH, screenP += MADS_SCREEN_WIDTH) {
-			*bgP = *srcP;
-			*screenP = *srcP;
-		}
-
-		// Flag the column of the screen is modified
-		_vm->_screen.copyRectToScreen(Common::Rect(_translationX, 0,
-			_translationX + 1, MADS_SCENE_HEIGHT));
-
-		// Keep moving the column to copy to the right
-		if (++_translationX == MADS_SCREEN_WIDTH) {
-			// Surface transition is complete
-			_spareScreen = nullptr;
-		}
-	}
-
-	// Make sure it's time for an update
-	if (currTime < _scrollTimeout)
-		return;
-	_scrollTimeout = g_system->getMillis() + TEXT_ANIMATION_DELAY;
-	_redrawFlag = true;
-
-	// If any panning values are set, pan the background surface
-	if ((_pan.x != 0) || (_pan.y != 0)) {
-		if (_panCountdown > 0) {
-			--_panCountdown;
-			return;
-		}
-
-		// Handle horizontal panning
-		if (_pan.x != 0) {
-			byte *lineTemp = new byte[_pan.x];
-			for (int y = 0; y < MADS_SCENE_HEIGHT; ++y) {
-				byte *pixelsP = (byte *)scene._backgroundSurface.getBasePtr(0, y);
-
-				// Copy the first X pixels into temp buffer, move the rest of the line
-				// to the start of the line, and then move temp buffer pixels to end of line
-				Common::copy(pixelsP, pixelsP + _pan.x, lineTemp);
-				Common::copy(pixelsP + _pan.x, pixelsP + MADS_SCREEN_WIDTH, pixelsP);
-				Common::copy(lineTemp, lineTemp + _pan.x, pixelsP + MADS_SCREEN_WIDTH - _pan.x);
-			}
-
-			delete[] lineTemp;
-		}
-
-		// Handle vertical panning
-		if (_pan.y != 0) {
-			// Store the bottom Y lines into a temp buffer, move the rest of the lines down,
-			// and then copy the stored lines back to the top of the screen
-			byte *linesTemp = new byte[_pan.y * MADS_SCREEN_WIDTH];
-			byte *pixelsP = (byte *)scene._backgroundSurface.getBasePtr(0, MADS_SCENE_HEIGHT - _pan.y);
-			Common::copy(pixelsP, pixelsP + MADS_SCREEN_WIDTH * _pan.y, linesTemp);
-
-			for (int y = MADS_SCENE_HEIGHT - 1; y >= _pan.y; --y) {
-				byte *destP = (byte *)scene._backgroundSurface.getBasePtr(0, y);
-				byte *srcP = (byte *)scene._backgroundSurface.getBasePtr(0, y - _pan.y);
-				Common::copy(srcP, srcP + MADS_SCREEN_WIDTH, destP);
-			}
-
-			Common::copy(linesTemp, linesTemp + _pan.y * MADS_SCREEN_WIDTH, 
-				(byte *)scene._backgroundSurface.getPixels());
-			delete[] linesTemp;
-		}
-
-		// Flag for a full screen refresh
-		scene._spriteSlots.fullRefresh();
-	}
-
-	// Scroll all active text lines up
-	for (int i = _textLines.size() - 1; i >= 0; --i) {
-		TextLine &tl = _textLines[i];
-		if (tl._textDisplayIndex != -1)
-			// Expire the text line that's already on-screen
-			scene._textDisplay.expire(tl._textDisplayIndex);
-
-		tl._pos.y--;
-		if (tl._pos.y < 0) {
-			_textLines.remove_at(i);
-		} else {
-			tl._textDisplayIndex = scene._textDisplay.add(tl._pos.x, tl._pos.y, 
-				0x605, -1, tl._line, _font);
-		}
-	}
-
-	if (_scrollCount > 0) {
-		// Handling final scrolling of text off of screen
-		if (--_scrollCount == 0) {
-			scriptDone();
-			return;
-		}
-	} else {
-		// Handling a text row
-		if (++_lineY == (_font->getHeight() + TEXTVIEW_LINE_SPACING))
-			processLines();
-	}
-}
-
-void TextView::scriptDone() {
-	_breakFlag = true;
-	_vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
-}
-
-/*------------------------------------------------------------------------*/
-
-char AnimationView::_resourceName[100];
-
-void AnimationView::execute(MADSEngine *vm, const Common::String &resName) {
-	assert(resName.size() < 100);
-	Common::strlcpy(_resourceName, resName.c_str(), sizeof(_resourceName));
-	vm->_dialogs->_pendingDialog = DIALOG_ANIMVIEW;
-}
-
-AnimationView::AnimationView(MADSEngine *vm) : MenuView(vm) {
-	_redrawFlag = false;
-
-	_soundDriverLoaded = false;
-	_previousUpdate = 0;
-	_screenId = -1;
-	_resetPalette = false;
-	_resyncMode = NEVER;
-	_v1 = 0;
-	_v2 = -1;
-	_resourceIndex = -1;
-	_currentAnimation = nullptr;
-	_sfx = 0;
-	_soundFlag = _bgLoadFlag = true;
-	_showWhiteBars = true;
-	_manualFrameNumber = 0;
-	_manualSpriteSet = nullptr;
-	_manualStartFrame = _manualEndFrame = 0;
-	_manualFrame2 = 0;
-	_animFrameNumber = 0;
-	_nextCyclingActive = false;
-	_sceneInfo = SceneInfo::init(_vm);
-
-	load();
-}
-
-AnimationView::~AnimationView() {
-	delete _currentAnimation;
-	delete _sceneInfo;
-}
-
-void AnimationView::load() {
-	Common::String resName(_resourceName);
-	if (!resName.hasSuffix("."))
-		resName += ".res";
-
-	if (!_script.open(resName))
-		error("Could not open resource %s", resName.c_str());
-
-	processLines();
-}
-
-void AnimationView::display() {
-	Scene &scene = _vm->_game->_scene;
-	_vm->_palette->initPalette();
-	Common::fill(&_vm->_palette->_cyclingPalette[0], &_vm->_palette->_cyclingPalette[PALETTE_SIZE], 0);
-
-	_vm->_palette->resetGamePalette(1, 8);
-	scene._spriteSlots.reset();
-	scene._paletteCycles.clear();
-
-	MenuView::display();
-}
-
-bool AnimationView::onEvent(Common::Event &event) {
-	// Wait for the Escape key or a mouse press
-	if (((event.type == Common::EVENT_KEYDOWN) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) ||
-			(event.type == Common::EVENT_RBUTTONUP)) {
-		scriptDone();
-		return true;
-	}
-
-	return false;
-}
-
-void AnimationView::doFrame() {
-	Scene &scene = _vm->_game->_scene;
-	
-	if (_resourceIndex == -1 || _currentAnimation->freeFlag()) {
-		if (++_resourceIndex == (int)_resources.size()) {
-			scriptDone();
-		} else {
-			scene._frameStartTime = 0;
-			loadNextResource();
-		}
-	} else if (_currentAnimation->getCurrentFrame() == 1) {
-		scene._cyclingActive = _nextCyclingActive;
-	}
-
-	if (_currentAnimation) {
-		++scene._frameStartTime;
-		_currentAnimation->update();
-		_redrawFlag = true;
-	}
-}
-
-void AnimationView::loadNextResource() {
-	Scene &scene = _vm->_game->_scene;
-	Palette &palette = *_vm->_palette;
-	ResourceEntry &resEntry = _resources[_resourceIndex];
-	Common::Array<PaletteCycle> paletteCycles;
-
-	if (resEntry._bgFlag)
-		palette.resetGamePalette(1, 8);
-
-	palette._mainPalette[253 * 3] = palette._mainPalette[253 * 3 + 1] 
-		= palette._mainPalette[253 * 3 + 2] = 0xb4;
-	palette.setPalette(&palette._mainPalette[253 * 3], 253, 1);
-
-	// Free any previous messages
-	scene._kernelMessages.reset();
-
-	// Handle the bars at the top/bottom
-	if (resEntry._showWhiteBars) {
-		// For animations the screen has been clipped to the middle 156 rows.
-		// So although it's slightly messy, bypass our screen class entirely,
-		// and draw the horizontal lines directly on the physiacl screen surface
-		Graphics::Surface *s = g_system->lockScreen();
-		s->hLine(0, 20, MADS_SCREEN_WIDTH, 253);
-		s->hLine(0, 179, MADS_SCREEN_WIDTH, 253);
-		g_system->unlockScreen();
-	}
-
-	// Load the new animation
-	delete _currentAnimation;
-	_currentAnimation = Animation::init(_vm, &scene);
-	int flags = ANIMFLAG_ANIMVIEW | (resEntry._bgFlag ? ANIMFLAG_LOAD_BACKGROUND : 0);
-	_currentAnimation->load(scene._backgroundSurface, scene._depthSurface, 
-		resEntry._resourceName, flags, &paletteCycles, _sceneInfo);
-
-	// Signal for a screen refresh
-	scene._spriteSlots.fullRefresh();
-
-	// If a sound driver has been specified, then load the correct one
-	if (!_currentAnimation->_header._soundName.empty()) {
-		const char *chP = strchr(_currentAnimation->_header._soundName.c_str(), '.');
-		assert(chP);
-
-		// Handle both Rex naming (xxx.009) and naming in later games (e.g. xxx.ph9)
-		int driverNum = atoi(chP + 3);
-		// HACK for Dragon
-		if (_currentAnimation->_header._soundName == "#SOUND.DRG")
-			driverNum = 9;
-		_vm->_sound->init(driverNum);
-	}
-
-	// Handle any manual setup
-	if (_currentAnimation->_header._manualFlag) {
-		_manualFrameNumber = _currentAnimation->_header._spritesIndex;
-		_manualSpriteSet = _currentAnimation->getSpriteSet(_manualFrameNumber);
-	}
-
-	// Set the sound data for the animation
-	_vm->_sound->setEnabled(resEntry._soundFlag);
-
-	Common::String dsrName = _currentAnimation->_header._dsrName;
-	if (!dsrName.empty())
-		_vm->_audio->setSoundGroup(dsrName);
-
-	// Start the new animation
-	_currentAnimation->startAnimation(0);
-
-	// Handle the palette and cycling palette
-	scene._cyclingActive = false;
-	Common::copy(&palette._mainPalette[0], &palette._mainPalette[PALETTE_SIZE],
-		&palette._cyclingPalette[0]);
-
-	_vm->_game->_fx = (ScreenTransition)resEntry._fx;
-	_nextCyclingActive = paletteCycles.size() > 0;
-	if (!_vm->_game->_fx) {
-		palette.setFullPalette(palette._mainPalette);
-	}
-
-	scene.initPaletteAnimation(paletteCycles, _nextCyclingActive && !_vm->_game->_fx);
-}
-
-void AnimationView::scriptDone() {
-	_breakFlag = true;
-	_vm->_dialogs->_pendingDialog = DIALOG_MAIN_MENU;
-}
-
-void AnimationView::processLines() {
-	if (_script.eos()) {
-		// end of script, end animation
-		scriptDone();
-		return;
-	}
-
-	while (!_script.eos()) {
-		// Get in next line
-		_currentLine.clear();
-		char c;
-		while (!_script.eos() && (c = _script.readByte()) != '\n') {
-			if (c != '\r' && c != '\0')
-				_currentLine += c;
-		}
-		
-		// Process the line
-		while (!_currentLine.empty()) {
-			if (_currentLine.hasPrefix("-")) {
-				_currentLine.deleteChar(0);
-
-				processCommand();
-			} else {
-				// Get resource name
-				Common::String resName;
-				while (!_currentLine.empty() && (c = _currentLine[0]) != ' ') {
-					_currentLine.deleteChar(0);
-					resName += c;
-				}
-
-				// Add resource into list along with any set state information
-				_resources.push_back(ResourceEntry(resName, _sfx, _soundFlag, 
-					_bgLoadFlag, _showWhiteBars));
-
-				// Fx resets between resource entries
-				_sfx = 0;
-			}
-
-			// Skip any spaces
-			while (_currentLine.hasPrefix(" "))
-				_currentLine.deleteChar(0);
-		}
-	}
-}
-
-void AnimationView::processCommand() {
-	// Get the command character
-	char commandChar = toupper(_currentLine[0]);
-	_currentLine.deleteChar(0);
-
-	// Handle the command
-	switch (commandChar) {
-	case 'B':
-		_soundFlag = !_soundFlag;
-		break;
-	case 'H':
-		// -h[:ex]  Disable EMS / XMS high memory support
-		if (_currentLine.hasPrefix(":"))
-			_currentLine.deleteChar(0);
-		while (_currentLine.hasPrefix("e") || _currentLine.hasPrefix("x"))
-			_currentLine.deleteChar(0);
-		break;
-	case 'O':
-		// -o:xxx  Specify opening special effect
-		assert(_currentLine[0] == ':');
-		_currentLine.deleteChar(0);
-		_sfx = getParameter();
-		break;
-	case 'P':
-		// Switch to CONCAT mode, which is ignored anyway
-		break;
-	case 'R': {
-		// Resynch timer (always, beginning, never)
-		assert(_currentLine[0] == ':');
-		_currentLine.deleteChar(0);
-
-		char v = toupper(_currentLine[0]);
-		_currentLine.deleteChar(0);
-		if (v == 'N')
-			_resyncMode = NEVER;
-		else if (v == 'A')
-			_resyncMode = ALWAYS;
-		else if (v == 'B')
-			_resyncMode = BEGINNING;
-		else
-			error("Unknown parameter");
-		break;
-	}
-	case 'W':
-		// Switch white bars being visible
-		_showWhiteBars = !_showWhiteBars;
-		break;
-	case 'X':
-		// Exit after animation finishes. Ignore
-		break;
-	case 'D':
-		// Unimplemented and ignored in the original. Ignore as well
-		break;
-	case 'Y':
-		// Reset palette on startup
-		_resetPalette = true;
-		break;
-	default:
-		error("Unknown command char: '%c'", commandChar);
-	}
-}
-
-int AnimationView::getParameter() {
-	int result = 0;
-
-	while (!_currentLine.empty()) {
-		char c = _currentLine[0];
-		
-		if (c >= '0' && c <= '9') {
-			_currentLine.deleteChar(0);
-			result = result * 10 + (c - '0');
-		} else {
-			break;
-		}
-	}
-
-	return result;
-}
-
-void AnimationView::checkResource(const Common::String &resourceName) {
-	//bool hasSuffix = false;
-	
-}
-
-int AnimationView::scanResourceIndex(const Common::String &resourceName) {
-	int foundIndex = -1;
-
-	if (_v1) {
-		const char *chP = strchr(resourceName.c_str(), '\\');
-		if (!chP) {
-			chP = strchr(resourceName.c_str(), '*');
-		}
-
-		Common::String resName = chP ? Common::String(chP + 1) : resourceName;
-
-		if (_v2 != 3) {
-			assert(_resIndex.size() == 0);
-		}
-
-		// Scan for the resource name
-		for (uint resIndex = 0; resIndex < _resIndex.size(); ++resIndex) {
-			ResIndexEntry &resEntry = _resIndex[resIndex];
-			if (resEntry._resourceName.compareToIgnoreCase(resourceName)) {
-				foundIndex = resIndex;
-				break;
-			}
-		}
-	}
-
-	if (foundIndex >= 0) {
-		// TODO
-	}
-	return -1;
-}
-
-
 } // End of namespace Nebular
 
 } // End of namespace MADS
diff --git a/engines/mads/nebular/menu_nebular.h b/engines/mads/nebular/menu_nebular.h
index c05c872..29777a7 100644
--- a/engines/mads/nebular/menu_nebular.h
+++ b/engines/mads/nebular/menu_nebular.h
@@ -25,6 +25,7 @@
 
 #include "common/scummsys.h"
 #include "mads/game.h"
+#include "mads/menu_views.h"
 #include "mads/msurface.h"
 #include "mads/nebular/dialogs_nebular.h"
 
@@ -36,27 +37,6 @@ namespace Nebular {
 
 enum MADSGameAction { START_GAME, RESUME_GAME, SHOW_INTRO, CREDITS, QUOTES, EXIT };
 
-class MenuView: public FullScreenDialog {
-protected:
-	bool _breakFlag;
-	bool _redrawFlag;
-
-	virtual void doFrame() = 0;
-
-	virtual void display();
-
-	/**
-	* Event handler
-	*/
-	virtual bool onEvent(Common::Event &event);
-public:
-	MenuView(MADSEngine *vm);
-
-	virtual ~MenuView() {}
-
-	virtual void show();
-};
-
 class MainMenu: public MenuView {
 private:
 	SpriteAsset *_menuItems[7];
@@ -148,174 +128,6 @@ public:
 	void show();
 };
 
-struct TextLine {
-	Common::Point _pos;
-	Common::String _line;
-	int _textDisplayIndex;
-};
-
-/**
- * Scrolling text view
- */
-class TextView : public MenuView {
-private:
-	static char _resourceName[100];
-
-	bool _animating;
-	Common::Array<TextLine> _textLines;
-	Common::Point _pan;
-	int _panSpeed;
-	MSurface _spareScreens[4];
-	int _scrollCount;
-	int _lineY;
-	uint32 _scrollTimeout;
-	int _panCountdown;
-	int _translationX;
-	Common::File _script;
-	char _currentLine[80];
-	MSurface *_spareScreen;
-	Font *_font;
-private:
-	/**
-	 * Load the text resource
-	 */
-	void load();
-
-	/**
-	 * Process the lines
-	 */
-	void processLines();
-
-	/**
-	 * Process a command from the script file
-	 */
-	void processCommand();
-
-	/**
-	 * Process text from the script file
-	 */
-	void processText();
-
-	/**
-	 * Get a parameter from line
-	 */
-	int getParameter(const char **paramP);
-
-	/**
-	 * Called when the script is finished
-	 */
-	void scriptDone();
-
-	/**
-	 * Reset the game palette
-	 */
-	void resetPalette();
-protected:
-	virtual void display();
-
-	virtual void doFrame();
-public:
-	/**
-	 * Queue the given text resource for display
-	 */
-	static void execute(MADSEngine *vm, const Common::String &resName);
-
-	TextView(MADSEngine *vm);
-
-	virtual ~TextView();
-};
-
-enum ResyncMode { NEVER, ALWAYS, BEGINNING };
-
-struct ResourceEntry {
-	Common::String _resourceName;
-	int _fx;
-	bool _soundFlag;
-	bool _bgFlag;
-	bool _showWhiteBars;
-
-	ResourceEntry() {}
-	ResourceEntry(const Common::String &resName, int fx, bool soundFlag,
-			bool bgFlag, bool showWhiteBars) {
-		_resourceName = resName;
-		_fx = fx;
-		_soundFlag = soundFlag;
-		_bgFlag = bgFlag;
-		_showWhiteBars = showWhiteBars;
-	}
-};
-
-struct ResIndexEntry {
-	int _id;
-	int _v;
-	Common::String _resourceName;
-
-	ResIndexEntry() {}
-};
-
-/**
-* Animation cutscene view
-*/
-class AnimationView : public MenuView {
-private:
-	static char _resourceName[100];
-
-	Common::File _script;
-	uint32 _previousUpdate;
-	Common::String _currentLine;
-	bool _soundDriverLoaded;
-	bool _resetPalette;
-	ResyncMode _resyncMode;
-	int _sfx;
-	bool _soundFlag;
-	bool _bgLoadFlag;
-	bool _showWhiteBars;
-	Common::Array<ResourceEntry> _resources;
-	Common::Array<ResIndexEntry> _resIndex;
-	int _v1;
-	int _v2;
-	int _resourceIndex;
-	SceneInfo *_sceneInfo;
-	Animation *_currentAnimation;
-	int _manualFrameNumber;
-	SpriteAsset *_manualSpriteSet;
-	int _manualStartFrame, _manualEndFrame;
-	int _manualFrame2;
-	int _animFrameNumber;
-	bool _nextCyclingActive;
-private:
-	void checkResource(const Common::String &resourceName);
-
-	int scanResourceIndex(const Common::String &resourceName);
-
-	void load();
-
-	void processLines();
-
-	void processCommand();
-
-	int getParameter();
-
-	void scriptDone();
-
-	void loadNextResource();
-protected:
-	virtual void display();
-
-	virtual void doFrame();
-
-	virtual bool onEvent(Common::Event &event);
-public:
-	/**
-	* Queue the given text resource for display
-	*/
-	static void execute(MADSEngine *vm, const Common::String &resName);
-
-	AnimationView(MADSEngine *vm);
-
-	virtual ~AnimationView();
-};
-
 } // End of namespace Nebular
 
 } // End of namespace MADS


Commit: e5296ebf8dd09f603499b1894a33865ec71bb28f
    https://github.com/scummvm/scummvm/commit/e5296ebf8dd09f603499b1894a33865ec71bb28f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-05-31T14:45:10-04:00

Commit Message:
Merge branch 'master' into phantom

Changed paths:
  A CONTRIBUTING.md
  A audio/softsynth/mt32/Analog.cpp
  A audio/softsynth/mt32/Analog.h
  A audio/softsynth/mt32/MemoryRegion.h
  A audio/softsynth/mt32/MidiEventQueue.h
  A audio/softsynth/mt32/Types.h
  A audio/softsynth/mt32/internals.h
  A backends/platform/sdl/sdl-window.cpp
  A backends/platform/sdl/sdl-window.h
  A backends/platform/sdl/win32/win32-window.cpp
  A backends/platform/sdl/win32/win32-window.h
  A backends/platform/symbian/mmp/scummvm_access.mmp.in
  A backends/platform/symbian/mmp/scummvm_prince.mmp.in
  A dists/android/custom_rules.xml
  A dists/android/jni/Android.mk
  A dists/android/project.properties
  A dists/gcw0/default.gcw0.desktop
  A dists/gcw0/opk_make.sh
  A dists/gcw0/scummvm.png
  A dists/gcw0/scummvm.sh
  A dists/gcw0/scummvmrc
  A engines/access/access.cpp
  A engines/access/access.h
  A engines/access/amazon/amazon_game.cpp
  A engines/access/amazon/amazon_game.h
  A engines/access/amazon/amazon_logic.cpp
  A engines/access/amazon/amazon_logic.h
  A engines/access/amazon/amazon_player.cpp
  A engines/access/amazon/amazon_player.h
  A engines/access/amazon/amazon_resources.cpp
  A engines/access/amazon/amazon_resources.h
  A engines/access/amazon/amazon_room.cpp
  A engines/access/amazon/amazon_room.h
  A engines/access/amazon/amazon_scripts.cpp
  A engines/access/amazon/amazon_scripts.h
  A engines/access/animation.cpp
  A engines/access/animation.h
  A engines/access/asurface.cpp
  A engines/access/asurface.h
  A engines/access/bubble_box.cpp
  A engines/access/bubble_box.h
  A engines/access/char.cpp
  A engines/access/char.h
  A engines/access/configure.engine
  A engines/access/data.cpp
  A engines/access/data.h
  A engines/access/debugger.cpp
  A engines/access/debugger.h
  A engines/access/decompress.cpp
  A engines/access/decompress.h
  A engines/access/detection.cpp
  A engines/access/detection_tables.h
  A engines/access/events.cpp
  A engines/access/events.h
  A engines/access/files.cpp
  A engines/access/files.h
  A engines/access/font.cpp
  A engines/access/font.h
  A engines/access/inventory.cpp
  A engines/access/inventory.h
  A engines/access/martian/martian_game.cpp
  A engines/access/martian/martian_game.h
  A engines/access/martian/martian_resources.cpp
  A engines/access/martian/martian_resources.h
  A engines/access/martian/martian_room.cpp
  A engines/access/martian/martian_room.h
  A engines/access/martian/martian_scripts.cpp
  A engines/access/martian/martian_scripts.h
  A engines/access/module.mk
  A engines/access/player.cpp
  A engines/access/player.h
  A engines/access/resources.cpp
  A engines/access/resources.h
  A engines/access/room.cpp
  A engines/access/room.h
  A engines/access/screen.cpp
  A engines/access/screen.h
  A engines/access/scripts.cpp
  A engines/access/scripts.h
  A engines/access/sound.cpp
  A engines/access/sound.h
  A engines/access/video.cpp
  A engines/access/video.h
  A engines/sherlock/animation.cpp
  A engines/sherlock/animation.h
  A engines/sherlock/configure.engine
  A engines/sherlock/debugger.cpp
  A engines/sherlock/debugger.h
  A engines/sherlock/decompress.cpp
  A engines/sherlock/detection.cpp
  A engines/sherlock/detection_tables.h
  A engines/sherlock/events.cpp
  A engines/sherlock/events.h
  A engines/sherlock/inventory.cpp
  A engines/sherlock/inventory.h
  A engines/sherlock/journal.cpp
  A engines/sherlock/journal.h
  A engines/sherlock/map.cpp
  A engines/sherlock/map.h
  A engines/sherlock/module.mk
  A engines/sherlock/music.cpp
  A engines/sherlock/music.h
  A engines/sherlock/objects.cpp
  A engines/sherlock/objects.h
  A engines/sherlock/people.cpp
  A engines/sherlock/people.h
  A engines/sherlock/resources.cpp
  A engines/sherlock/resources.h
  A engines/sherlock/saveload.cpp
  A engines/sherlock/saveload.h
  A engines/sherlock/scalpel/darts.cpp
  A engines/sherlock/scalpel/darts.h
  A engines/sherlock/scalpel/drivers/adlib.cpp
  A engines/sherlock/scalpel/drivers/mididriver.h
  A engines/sherlock/scalpel/scalpel.cpp
  A engines/sherlock/scalpel/scalpel.h
  A engines/sherlock/scalpel/scalpel_scene.cpp
  A engines/sherlock/scalpel/scalpel_scene.h
  A engines/sherlock/scalpel/scalpel_user_interface.cpp
  A engines/sherlock/scalpel/scalpel_user_interface.h
  A engines/sherlock/scalpel/settings.cpp
  A engines/sherlock/scalpel/settings.h
  A engines/sherlock/scalpel/tsage/logo.cpp
  A engines/sherlock/scalpel/tsage/logo.h
  A engines/sherlock/scalpel/tsage/resources.cpp
  A engines/sherlock/scalpel/tsage/resources.h
  A engines/sherlock/scene.cpp
  A engines/sherlock/scene.h
  A engines/sherlock/screen.cpp
  A engines/sherlock/screen.h
  A engines/sherlock/sherlock.cpp
  A engines/sherlock/sherlock.h
  A engines/sherlock/sound.cpp
  A engines/sherlock/sound.h
  A engines/sherlock/surface.cpp
  A engines/sherlock/surface.h
  A engines/sherlock/talk.cpp
  A engines/sherlock/talk.h
  A engines/sherlock/tattoo/tattoo.cpp
  A engines/sherlock/tattoo/tattoo.h
  A engines/sherlock/tattoo/tattoo_scene.cpp
  A engines/sherlock/tattoo/tattoo_scene.h
  A engines/sherlock/tattoo/tattoo_user_interface.cpp
  A engines/sherlock/tattoo/tattoo_user_interface.h
  A engines/sherlock/user_interface.cpp
  A engines/sherlock/user_interface.h
  A engines/sword25/util/double_serialization.cpp
  A engines/sword25/util/double_serialization.h
  A engines/sword25/util/lua_persist.cpp
  A engines/sword25/util/lua_persistence.h
  A engines/sword25/util/lua_persistence_util.cpp
  A engines/sword25/util/lua_persistence_util.h
  A engines/sword25/util/lua_unpersist.cpp
  A engines/tsage/ringworld2/ringworld2_airduct.cpp
  A engines/tsage/ringworld2/ringworld2_airduct.h
  A engines/tsage/ringworld2/ringworld2_vampire.cpp
  A engines/tsage/ringworld2/ringworld2_vampire.h
  A engines/tsage/sherlock/sherlock_logo.cpp
  A engines/tsage/sherlock/sherlock_logo.h
  A engines/wintermute/game_description.h
  A engines/wintermute/video/subtitle_card.cpp
  A engines/wintermute/video/subtitle_card.h
  A engines/wintermute/video/video_subtitler.cpp
  A engines/wintermute/video/video_subtitler.h
  A engines/zvision/core/clock.cpp
  A engines/zvision/core/clock.h
  A engines/zvision/file/lzss_read_stream.cpp
  A engines/zvision/file/lzss_read_stream.h
  A engines/zvision/file/save_manager.cpp
  A engines/zvision/file/save_manager.h
  A engines/zvision/file/search_manager.cpp
  A engines/zvision/file/search_manager.h
  A engines/zvision/file/zfs_archive.cpp
  A engines/zvision/file/zfs_archive.h
  A engines/zvision/graphics/cursors/cursor.cpp
  A engines/zvision/graphics/cursors/cursor.h
  A engines/zvision/graphics/cursors/cursor_manager.cpp
  A engines/zvision/graphics/cursors/cursor_manager.h
  A engines/zvision/graphics/effects/fog.cpp
  A engines/zvision/graphics/effects/fog.h
  A engines/zvision/graphics/effects/light.cpp
  A engines/zvision/graphics/effects/light.h
  A engines/zvision/graphics/effects/wave.cpp
  A engines/zvision/graphics/effects/wave.h
  A engines/zvision/graphics/graphics_effect.h
  A engines/zvision/scripting/controls/fist_control.cpp
  A engines/zvision/scripting/controls/fist_control.h
  A engines/zvision/scripting/controls/hotmov_control.cpp
  A engines/zvision/scripting/controls/hotmov_control.h
  A engines/zvision/scripting/controls/paint_control.cpp
  A engines/zvision/scripting/controls/paint_control.h
  A engines/zvision/scripting/controls/safe_control.cpp
  A engines/zvision/scripting/controls/safe_control.h
  A engines/zvision/scripting/controls/save_control.cpp
  A engines/zvision/scripting/controls/save_control.h
  A engines/zvision/scripting/controls/slot_control.cpp
  A engines/zvision/scripting/controls/slot_control.h
  A engines/zvision/scripting/controls/titler_control.cpp
  A engines/zvision/scripting/controls/titler_control.h
  A engines/zvision/scripting/effects/animation_effect.cpp
  A engines/zvision/scripting/effects/animation_effect.h
  A engines/zvision/scripting/effects/distort_effect.cpp
  A engines/zvision/scripting/effects/distort_effect.h
  A engines/zvision/scripting/effects/music_effect.cpp
  A engines/zvision/scripting/effects/music_effect.h
  A engines/zvision/scripting/effects/region_effect.cpp
  A engines/zvision/scripting/effects/region_effect.h
  A engines/zvision/scripting/effects/syncsound_effect.cpp
  A engines/zvision/scripting/effects/syncsound_effect.h
  A engines/zvision/scripting/effects/timer_effect.cpp
  A engines/zvision/scripting/effects/timer_effect.h
  A engines/zvision/scripting/effects/ttytext_effect.cpp
  A engines/zvision/scripting/effects/ttytext_effect.h
  A engines/zvision/scripting/inventory.cpp
  A engines/zvision/scripting/menu.cpp
  A engines/zvision/scripting/menu.h
  A engines/zvision/scripting/scripting_effect.h
  A engines/zvision/sound/midi.cpp
  A engines/zvision/sound/midi.h
  A engines/zvision/text/string_manager.cpp
  A engines/zvision/text/string_manager.h
  A engines/zvision/text/subtitles.cpp
  A engines/zvision/text/subtitles.h
  A engines/zvision/text/text.cpp
  A engines/zvision/text/text.h
  A engines/zvision/text/truetype_font.cpp
  A engines/zvision/text/truetype_font.h
  A engines/zvision/video/rlf_decoder.cpp
  A engines/zvision/video/rlf_decoder.h
  A image/codecs/cinepak_tables.h
  A video/mpegps_decoder.cpp
  A video/mpegps_decoder.h
  R backends/platform/android/org/scummvm/scummvm/PluginProvider.java
  R backends/platform/android/org/scummvm/scummvm/ScummVMApplication.java
  R backends/platform/android/org/scummvm/scummvm/Unpacker.java
  R dists/android/mkplugin.sh
  R dists/android/plugin-manifest.xml
  R dists/android/plugin-manifest.xml.in
  R dists/android/plugin-strings.xml
  R dists/android/res/drawable/gradient.xml
  R dists/android/res/layout/splash.xml
  R dists/iphone/readme.txt
  R dists/iphone/scummvm.xcodeproj/project.pbxproj
  R engines/sword25/util/pluto/CHANGELOG
  R engines/sword25/util/pluto/FILEFORMAT
  R engines/sword25/util/pluto/README
  R engines/sword25/util/pluto/THANKS
  R engines/sword25/util/pluto/pdep.cpp
  R engines/sword25/util/pluto/pdep/README
  R engines/sword25/util/pluto/pdep/lzio.h
  R engines/sword25/util/pluto/pdep/pdep.h
  R engines/sword25/util/pluto/pluto.cpp
  R engines/sword25/util/pluto/pluto.h
  R engines/sword25/util/pluto/plzio.cpp
  R engines/zvision/animation/rlf_animation.cpp
  R engines/zvision/animation/rlf_animation.h
  R engines/zvision/archives/zfs_archive.cpp
  R engines/zvision/archives/zfs_archive.h
  R engines/zvision/core/menu.h
  R engines/zvision/core/save_manager.cpp
  R engines/zvision/core/save_manager.h
  R engines/zvision/cursors/cursor.cpp
  R engines/zvision/cursors/cursor.h
  R engines/zvision/cursors/cursor_manager.cpp
  R engines/zvision/cursors/cursor_manager.h
  R engines/zvision/fonts/truetype_font.cpp
  R engines/zvision/fonts/truetype_font.h
  R engines/zvision/inventory/inventory_manager.h
  R engines/zvision/scripting/controls/animation_control.cpp
  R engines/zvision/scripting/controls/animation_control.h
  R engines/zvision/scripting/controls/timer_node.cpp
  R engines/zvision/scripting/controls/timer_node.h
  R engines/zvision/strings/string_manager.cpp
  R engines/zvision/strings/string_manager.h
  R engines/zvision/subtitles/subtitles.h
  R engines/zvision/utility/clock.cpp
  R engines/zvision/utility/clock.h
  R engines/zvision/utility/lzss_read_stream.cpp
  R engines/zvision/utility/lzss_read_stream.h
  R engines/zvision/utility/single_value_container.cpp
  R engines/zvision/utility/single_value_container.h
  R engines/zvision/utility/utility.cpp
  R engines/zvision/utility/utility.h
    AUTHORS
    COPYRIGHT
    Makefile
    NEWS
    README
    audio/decoders/mp3.cpp
    audio/decoders/quicktime.cpp
    audio/fmopl.cpp
    audio/mods/protracker.cpp
    audio/softsynth/mt32/BReverbModel.cpp
    audio/softsynth/mt32/BReverbModel.h
    audio/softsynth/mt32/LA32FloatWaveGenerator.cpp
    audio/softsynth/mt32/LA32Ramp.cpp
    audio/softsynth/mt32/LA32WaveGenerator.cpp
    audio/softsynth/mt32/Part.cpp
    audio/softsynth/mt32/Partial.cpp
    audio/softsynth/mt32/PartialManager.cpp
    audio/softsynth/mt32/Poly.cpp
    audio/softsynth/mt32/Poly.h
    audio/softsynth/mt32/ROMInfo.cpp
    audio/softsynth/mt32/ROMInfo.h
    audio/softsynth/mt32/Structures.h
    audio/softsynth/mt32/Synth.cpp
    audio/softsynth/mt32/Synth.h
    audio/softsynth/mt32/TVA.cpp
    audio/softsynth/mt32/TVF.cpp
    audio/softsynth/mt32/TVP.cpp
    audio/softsynth/mt32/Tables.cpp
    audio/softsynth/mt32/Tables.h
    audio/softsynth/mt32/module.mk
    audio/softsynth/mt32/mt32emu.h
    audio/timestamp.cpp
    backends/audiocd/sdl/sdl-audiocd.cpp
    backends/audiocd/sdl/sdl-audiocd.h
    backends/events/dinguxsdl/dinguxsdl-events.cpp
    backends/events/sdl/sdl-events.cpp
    backends/events/sdl/sdl-events.h
    backends/events/symbiansdl/symbiansdl-events.cpp
    backends/fs/amigaos4/amigaos4-fs.cpp
    backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
    backends/graphics/dinguxsdl/dinguxsdl-graphics.h
    backends/graphics/gph/gph-graphics.cpp
    backends/graphics/gph/gph-graphics.h
    backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
    backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
    backends/graphics/maemosdl/maemosdl-graphics.cpp
    backends/graphics/maemosdl/maemosdl-graphics.h
    backends/graphics/opengl/opengl-graphics.cpp
    backends/graphics/opengl/opengl-graphics.h
    backends/graphics/openglsdl/openglsdl-graphics.cpp
    backends/graphics/openglsdl/openglsdl-graphics.h
    backends/graphics/openpandora/op-graphics.cpp
    backends/graphics/openpandora/op-graphics.h
    backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp
    backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h
    backends/graphics/sdl/sdl-graphics.cpp
    backends/graphics/sdl/sdl-graphics.h
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    backends/graphics/surfacesdl/surfacesdl-graphics.h
    backends/graphics/symbiansdl/symbiansdl-graphics.cpp
    backends/graphics/symbiansdl/symbiansdl-graphics.h
    backends/graphics/wincesdl/wincesdl-graphics.cpp
    backends/graphics/wincesdl/wincesdl-graphics.h
    backends/keymapper/action.h
    backends/log/log.cpp
    backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp
    backends/mixer/sdl/sdl-mixer.cpp
    backends/module.mk
    backends/platform/android/android.cpp
    backends/platform/android/android.h
    backends/platform/android/android.mk
    backends/platform/android/asset-archive.cpp
    backends/platform/android/jni.cpp
    backends/platform/android/jni.h
    backends/platform/android/org/scummvm/scummvm/ScummVM.java
    backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
    backends/platform/dingux/dingux.cpp
    backends/platform/dingux/dingux.mk
    backends/platform/gph/gph-backend.cpp
    backends/platform/linuxmoto/linuxmoto-sdl.cpp
    backends/platform/maemo/maemo.cpp
    backends/platform/maemo/maemo.h
    backends/platform/openpandora/op-backend.cpp
    backends/platform/samsungtv/samsungtv.cpp
    backends/platform/sdl/macosx/macosx.cpp
    backends/platform/sdl/macosx/macosx.h
    backends/platform/sdl/module.mk
    backends/platform/sdl/sdl-sys.h
    backends/platform/sdl/sdl.cpp
    backends/platform/sdl/sdl.h
    backends/platform/sdl/win32/win32-main.cpp
    backends/platform/sdl/win32/win32.cpp
    backends/platform/sdl/win32/win32.h
    backends/platform/symbian/AdaptAllMMPs.pl
    backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
    backends/platform/symbian/README
    backends/platform/symbian/S60/ScummVM_S60.mmp.in
    backends/platform/symbian/S60/ScummVM_S60_App.mmp
    backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
    backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
    backends/platform/symbian/S80/ScummVM_S80.mmp.in
    backends/platform/symbian/S80/ScummVM_S80_App.mmp
    backends/platform/symbian/S90/Scummvm_S90.mmp.in
    backends/platform/symbian/S90/Scummvm_S90_App.mmp
    backends/platform/symbian/UIQ2/ScummVM.rss
    backends/platform/symbian/UIQ3/ScummVM.rss
    backends/platform/symbian/UIQ3/ScummVM_A0000658.rss
    backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
    backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
    backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss
    backends/platform/symbian/help/ScummVM.rtf
    backends/platform/symbian/mmp/config.mmh
    backends/platform/symbian/mmp/scummvm_agi.mmp.in
    backends/platform/symbian/mmp/scummvm_agos.mmp.in
    backends/platform/symbian/mmp/scummvm_avalanche.mmp.in
    backends/platform/symbian/mmp/scummvm_base.mmp.in
    backends/platform/symbian/mmp/scummvm_bbvs.mmp.in
    backends/platform/symbian/mmp/scummvm_cge.mmp.in
    backends/platform/symbian/mmp/scummvm_cge2.mmp.in
    backends/platform/symbian/mmp/scummvm_cine.mmp.in
    backends/platform/symbian/mmp/scummvm_composer.mmp.in
    backends/platform/symbian/mmp/scummvm_cruise.mmp.in
    backends/platform/symbian/mmp/scummvm_draci.mmp.in
    backends/platform/symbian/mmp/scummvm_drascula.mmp.in
    backends/platform/symbian/mmp/scummvm_dreamweb.mmp.in
    backends/platform/symbian/mmp/scummvm_fullpipe.mmp.in
    backends/platform/symbian/mmp/scummvm_gob.mmp.in
    backends/platform/symbian/mmp/scummvm_groovie.mmp.in
    backends/platform/symbian/mmp/scummvm_hopkins.mmp.in
    backends/platform/symbian/mmp/scummvm_hugo.mmp.in
    backends/platform/symbian/mmp/scummvm_kyra.mmp.in
    backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
    backends/platform/symbian/mmp/scummvm_lure.mmp.in
    backends/platform/symbian/mmp/scummvm_m4.mmp.in
    backends/platform/symbian/mmp/scummvm_made.mmp.in
    backends/platform/symbian/mmp/scummvm_mads.mmp.in
    backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
    backends/platform/symbian/mmp/scummvm_mortevielle.mmp.in
    backends/platform/symbian/mmp/scummvm_neverhood.mmp.in
    backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
    backends/platform/symbian/mmp/scummvm_pegasus.mmp.in
    backends/platform/symbian/mmp/scummvm_queen.mmp.in
    backends/platform/symbian/mmp/scummvm_saga.mmp.in
    backends/platform/symbian/mmp/scummvm_sci.mmp.in
    backends/platform/symbian/mmp/scummvm_scumm.mmp.in
    backends/platform/symbian/mmp/scummvm_sky.mmp.in
    backends/platform/symbian/mmp/scummvm_sword1.mmp.in
    backends/platform/symbian/mmp/scummvm_sword2.mmp.in
    backends/platform/symbian/mmp/scummvm_sword25.mmp.in
    backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
    backends/platform/symbian/mmp/scummvm_testbed.mmp.in
    backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
    backends/platform/symbian/mmp/scummvm_toltecs.mmp.in
    backends/platform/symbian/mmp/scummvm_tony.mmp.in
    backends/platform/symbian/mmp/scummvm_toon.mmp.in
    backends/platform/symbian/mmp/scummvm_touche.mmp.in
    backends/platform/symbian/mmp/scummvm_tsage.mmp.in
    backends/platform/symbian/mmp/scummvm_tucker.mmp.in
    backends/platform/symbian/mmp/scummvm_voyeur.mmp.in
    backends/platform/symbian/mmp/scummvm_wintermute.mmp.in
    backends/platform/symbian/mmp/scummvm_zvision.mmp.in
    backends/platform/symbian/res/ScummVmAif.rss
    backends/platform/symbian/res/scummvm.rss
    backends/platform/symbian/res/scummvm_A0000658.rss
    backends/platform/symbian/src/ScummVm.hrh
    backends/platform/symbian/src/SymbianOS.cpp
    backends/platform/symbian/src/SymbianOS.h
    backends/platform/wii/osystem_events.cpp
    backends/platform/wince/wince-sdl.cpp
    backends/taskbar/win32/win32-taskbar.cpp
    backends/taskbar/win32/win32-taskbar.h
    base/main.cpp
    base/version.cpp
    common/EventMapper.cpp
    common/c++11-compat.h
    common/endian.h
    common/fft.cpp
    common/fft.h
    common/scummsys.h
    common/stream.h
    common/unzip.cpp
    common/xmlparser.cpp
    config.guess
    config.sub
    configure
    devtools/create_project/create_project.cpp
    devtools/create_translations/po_parser.cpp
    devtools/credits.pl
    devtools/scumm-md5.txt
    dists/android/AndroidManifest.xml
    dists/android/AndroidManifest.xml.in
    dists/android/res/layout/main.xml
    dists/codeblocks/readme.txt
    dists/debian/copyright
    dists/macosx/Info.plist
    dists/macosx/Info.plist.in
    dists/scummvm.rc
    dists/scummvm.rc.in
    dists/win32/scummvm.nsi
    dists/win32/scummvm.nsi.in
    engines/agi/agi.cpp
    engines/agi/agi.h
    engines/agi/detection.cpp
    engines/agi/detection_tables.h
    engines/agi/font.h
    engines/agi/graphics.cpp
    engines/agi/graphics.h
    engines/agi/loader_v2.cpp
    engines/agi/loader_v3.cpp
    engines/agi/preagi.cpp
    engines/agi/preagi_mickey.cpp
    engines/agi/sound_pcjr.cpp
    engines/agi/text.cpp
    engines/agos/detection_tables.h
    engines/agos/gfx.cpp
    engines/agos/input.cpp
    engines/agos/midi.cpp
    engines/agos/midi.h
    engines/agos/rooms.cpp
    engines/agos/saveload.cpp
    engines/bbvs/bbvs.cpp
    engines/bbvs/bbvs.h
    engines/bbvs/detection.cpp
    engines/bbvs/dialogs.cpp
    engines/bbvs/dialogs.h
    engines/bbvs/gamemodule.cpp
    engines/bbvs/gamemodule.h
    engines/bbvs/graphics.cpp
    engines/bbvs/minigames/bbairguitar.cpp
    engines/bbvs/minigames/bbairguitar.h
    engines/bbvs/minigames/bbant.cpp
    engines/bbvs/minigames/bbant.h
    engines/bbvs/minigames/bbloogie.cpp
    engines/bbvs/minigames/bbloogie.h
    engines/bbvs/minigames/bbtennis.cpp
    engines/bbvs/minigames/bbtennis.h
    engines/bbvs/minigames/minigame.cpp
    engines/bbvs/minigames/minigame.h
    engines/bbvs/saveload.cpp
    engines/bbvs/scene.cpp
    engines/bbvs/spritemodule.cpp
    engines/bbvs/videoplayer.cpp
    engines/bbvs/walk.cpp
    engines/cge/vga13h.cpp
    engines/cge2/cge2.cpp
    engines/cge2/cge2.h
    engines/cge2/cge2_main.cpp
    engines/cge2/cge2_main.h
    engines/cge2/configure.engine
    engines/cge2/detection.cpp
    engines/cge2/events.cpp
    engines/cge2/hero.cpp
    engines/cge2/map.cpp
    engines/cge2/saveload.cpp
    engines/cge2/snail.cpp
    engines/cge2/spare.h
    engines/cge2/talk.cpp
    engines/cge2/vga13h.cpp
    engines/cine/detection_tables.h
    engines/drascula/actors.cpp
    engines/drascula/detection.cpp
    engines/drascula/talk.cpp
    engines/engine.cpp
    engines/engine.h
    engines/fullpipe/fullpipe.cpp
    engines/fullpipe/gameloader.cpp
    engines/fullpipe/gfx.cpp
    engines/fullpipe/input.cpp
    engines/fullpipe/inventory.cpp
    engines/fullpipe/mgm.cpp
    engines/fullpipe/modal.cpp
    engines/fullpipe/motion.cpp
    engines/fullpipe/scene.cpp
    engines/fullpipe/scenes/scene02.cpp
    engines/fullpipe/scenes/scene04.cpp
    engines/fullpipe/scenes/scene14.cpp
    engines/fullpipe/scenes/scene15.cpp
    engines/fullpipe/scenes/scene16.cpp
    engines/fullpipe/scenes/scene23.cpp
    engines/fullpipe/scenes/scene28.cpp
    engines/fullpipe/scenes/scene29.cpp
    engines/fullpipe/scenes/scene37.cpp
    engines/fullpipe/sound.cpp
    engines/fullpipe/statics.cpp
    engines/gob/inter_v1.cpp
    engines/gob/surface.cpp
    engines/gob/surface.h
    engines/groovie/graphics.cpp
    engines/groovie/graphics.h
    engines/groovie/roq.cpp
    engines/groovie/roq.h
    engines/groovie/script.cpp
    engines/groovie/script.h
    engines/hopkins/computer.cpp
    engines/hopkins/files.cpp
    engines/hopkins/lines.cpp
    engines/hopkins/sound.cpp
    engines/hopkins/sound.h
    engines/hopkins/talk.cpp
    engines/hugo/mouse.cpp
    engines/kyra/sound_adlib.cpp
    engines/kyra/vqa.cpp
    engines/made/database.cpp
    engines/made/pmvplayer.cpp
    engines/made/redreader.cpp
    engines/made/resource.cpp
    engines/made/screenfx.cpp
    engines/made/screenfx.h
    engines/made/script.cpp
    engines/made/script.h
    engines/made/scriptfuncs.cpp
    engines/mads/action.cpp
    engines/mads/action.h
    engines/mads/animation.cpp
    engines/mads/animation.h
    engines/mads/assets.cpp
    engines/mads/assets.h
    engines/mads/audio.cpp
    engines/mads/audio.h
    engines/mads/compression.cpp
    engines/mads/compression.h
    engines/mads/debugger.cpp
    engines/mads/debugger.h
    engines/mads/detection.cpp
    engines/mads/detection_tables.h
    engines/mads/dialogs.cpp
    engines/mads/dialogs.h
    engines/mads/dragonsphere/dragonsphere_scenes.cpp
    engines/mads/dragonsphere/dragonsphere_scenes.h
    engines/mads/dragonsphere/game_dragonsphere.cpp
    engines/mads/dragonsphere/game_dragonsphere.h
    engines/mads/events.cpp
    engines/mads/events.h
    engines/mads/font.cpp
    engines/mads/font.h
    engines/mads/game.cpp
    engines/mads/game.h
    engines/mads/game_data.cpp
    engines/mads/game_data.h
    engines/mads/globals.cpp
    engines/mads/globals.h
    engines/mads/hotspots.cpp
    engines/mads/hotspots.h
    engines/mads/inventory.cpp
    engines/mads/inventory.h
    engines/mads/mads.cpp
    engines/mads/mads.h
    engines/mads/menu_views.cpp
    engines/mads/menu_views.h
    engines/mads/messages.cpp
    engines/mads/messages.h
    engines/mads/msurface.cpp
    engines/mads/msurface.h
    engines/mads/nebular/dialogs_nebular.cpp
    engines/mads/nebular/dialogs_nebular.h
    engines/mads/nebular/game_nebular.cpp
    engines/mads/nebular/game_nebular.h
    engines/mads/nebular/globals_nebular.cpp
    engines/mads/nebular/globals_nebular.h
    engines/mads/nebular/menu_nebular.cpp
    engines/mads/nebular/menu_nebular.h
    engines/mads/nebular/nebular_scenes.cpp
    engines/mads/nebular/nebular_scenes.h
    engines/mads/nebular/nebular_scenes1.cpp
    engines/mads/nebular/nebular_scenes1.h
    engines/mads/nebular/nebular_scenes2.cpp
    engines/mads/nebular/nebular_scenes2.h
    engines/mads/nebular/nebular_scenes3.cpp
    engines/mads/nebular/nebular_scenes3.h
    engines/mads/nebular/nebular_scenes4.cpp
    engines/mads/nebular/nebular_scenes4.h
    engines/mads/nebular/nebular_scenes5.cpp
    engines/mads/nebular/nebular_scenes5.h
    engines/mads/nebular/nebular_scenes6.cpp
    engines/mads/nebular/nebular_scenes6.h
    engines/mads/nebular/nebular_scenes7.cpp
    engines/mads/nebular/nebular_scenes7.h
    engines/mads/nebular/nebular_scenes8.cpp
    engines/mads/nebular/nebular_scenes8.h
    engines/mads/nebular/sound_nebular.cpp
    engines/mads/nebular/sound_nebular.h
    engines/mads/palette.cpp
    engines/mads/palette.h
    engines/mads/phantom/game_phantom.cpp
    engines/mads/phantom/game_phantom.h
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes.h
    engines/mads/player.cpp
    engines/mads/player.h
    engines/mads/rails.cpp
    engines/mads/rails.h
    engines/mads/resources.cpp
    engines/mads/resources.h
    engines/mads/scene.cpp
    engines/mads/scene.h
    engines/mads/scene_data.cpp
    engines/mads/scene_data.h
    engines/mads/screen.cpp
    engines/mads/screen.h
    engines/mads/sequence.cpp
    engines/mads/sequence.h
    engines/mads/sound.cpp
    engines/mads/sound.h
    engines/mads/sprites.cpp
    engines/mads/sprites.h
    engines/mads/staticres.cpp
    engines/mads/staticres.h
    engines/mads/user_interface.cpp
    engines/mads/user_interface.h
    engines/mohawk/configure.engine
    engines/mohawk/cursors.cpp
    engines/mohawk/myst.cpp
    engines/mohawk/myst_graphics.cpp
    engines/mohawk/myst_graphics.h
    engines/mohawk/myst_stacks/myst.cpp
    engines/mohawk/riven_external.cpp
    engines/mohawk/video.cpp
    engines/mohawk/video.h
    engines/mortevielle/actions.cpp
    engines/mortevielle/detection_tables.h
    engines/mortevielle/dialogs.cpp
    engines/mortevielle/graphics.cpp
    engines/mortevielle/mortevielle.h
    engines/mortevielle/outtext.cpp
    engines/mortevielle/utils.cpp
    engines/neverhood/console.cpp
    engines/neverhood/menumodule.cpp
    engines/neverhood/modules/module2400.cpp
    engines/neverhood/modules/module2700_sprites.cpp
    engines/neverhood/modules/module2800.cpp
    engines/neverhood/modules/module2800_sprites.cpp
    engines/neverhood/modules/module3000.cpp
    engines/neverhood/modules/module3000_sprites.cpp
    engines/neverhood/sound.cpp
    engines/pegasus/input.cpp
    engines/pegasus/menu.cpp
    engines/pegasus/pegasus.cpp
    engines/prince/animation.cpp
    engines/prince/animation.h
    engines/prince/archive.cpp
    engines/prince/archive.h
    engines/prince/cursor.h
    engines/prince/detection.cpp
    engines/prince/detection.h
    engines/prince/graphics.cpp
    engines/prince/graphics.h
    engines/prince/hero.cpp
    engines/prince/hero.h
    engines/prince/mhwanh.cpp
    engines/prince/mob.h
    engines/prince/object.cpp
    engines/prince/object.h
    engines/prince/prince.cpp
    engines/prince/prince.h
    engines/prince/pscr.h
    engines/prince/resource.h
    engines/prince/saveload.cpp
    engines/prince/script.cpp
    engines/prince/script.h
    engines/queen/logic.cpp
    engines/queen/talk.cpp
    engines/queen/walk.cpp
    engines/saga/actor.h
    engines/saga/introproc_ite.cpp
    engines/saga/saveload.cpp
    engines/saga/scene.cpp
    engines/saga/scene.h
    engines/saga/sfuncs.cpp
    engines/sci/console.cpp
    engines/sci/console.h
    engines/sci/detection.cpp
    engines/sci/detection_tables.h
    engines/sci/engine/file.cpp
    engines/sci/engine/kernel.cpp
    engines/sci/engine/kernel.h
    engines/sci/engine/kernel_tables.h
    engines/sci/engine/kevent.cpp
    engines/sci/engine/kfile.cpp
    engines/sci/engine/kgraphics.cpp
    engines/sci/engine/kmovement.cpp
    engines/sci/engine/kparse.cpp
    engines/sci/engine/kstring.cpp
    engines/sci/engine/kvideo.cpp
    engines/sci/engine/savegame.cpp
    engines/sci/engine/savegame.h
    engines/sci/engine/script.cpp
    engines/sci/engine/script.h
    engines/sci/engine/script_patches.cpp
    engines/sci/engine/script_patches.h
    engines/sci/engine/state.cpp
    engines/sci/engine/state.h
    engines/sci/engine/vm.cpp
    engines/sci/engine/workarounds.cpp
    engines/sci/engine/workarounds.h
    engines/sci/event.cpp
    engines/sci/graphics/controls16.cpp
    engines/sci/graphics/controls16.h
    engines/sci/graphics/cursor.cpp
    engines/sci/graphics/font.cpp
    engines/sci/graphics/font.h
    engines/sci/graphics/frameout.cpp
    engines/sci/graphics/paint16.cpp
    engines/sci/graphics/paint16.h
    engines/sci/graphics/paint32.cpp
    engines/sci/graphics/palette.cpp
    engines/sci/graphics/palette.h
    engines/sci/graphics/picture.cpp
    engines/sci/graphics/portrait.cpp
    engines/sci/graphics/portrait.h
    engines/sci/graphics/ports.cpp
    engines/sci/graphics/screen.cpp
    engines/sci/graphics/screen.h
    engines/sci/graphics/text16.cpp
    engines/sci/graphics/text16.h
    engines/sci/graphics/transitions.cpp
    engines/sci/graphics/view.cpp
    engines/sci/module.mk
    engines/sci/parser/vocabulary.cpp
    engines/sci/parser/vocabulary.h
    engines/sci/resource.cpp
    engines/sci/resource.h
    engines/sci/resource_audio.cpp
    engines/sci/sci.cpp
    engines/sci/sci.h
    engines/sci/sound/midiparser_sci.cpp
    engines/sci/sound/music.cpp
    engines/sci/sound/music.h
    engines/sci/sound/soundcmd.cpp
    engines/sci/sound/soundcmd.h
    engines/scumm/actor.cpp
    engines/scumm/actor.h
    engines/scumm/boxes.cpp
    engines/scumm/cdda.cpp
    engines/scumm/debugger.cpp
    engines/scumm/detection.cpp
    engines/scumm/detection_tables.h
    engines/scumm/dialogs.cpp
    engines/scumm/file.cpp
    engines/scumm/help.cpp
    engines/scumm/input.cpp
    engines/scumm/resource_v2.cpp
    engines/scumm/room.cpp
    engines/scumm/saveload.cpp
    engines/scumm/saveload.h
    engines/scumm/script.cpp
    engines/scumm/script_v0.cpp
    engines/scumm/script_v2.cpp
    engines/scumm/script_v5.cpp
    engines/scumm/script_v6.cpp
    engines/scumm/scumm-md5.h
    engines/scumm/scumm.cpp
    engines/scumm/scumm.h
    engines/scumm/scumm_v0.h
    engines/scumm/smush/smush_player.cpp
    engines/scumm/sound.cpp
    engines/scumm/vars.cpp
    engines/scumm/verbs.cpp
    engines/sword1/console.cpp
    engines/sword1/sound.cpp
    engines/sword25/gfx/renderobjectmanager.cpp
    engines/sword25/kernel/outputpersistenceblock.cpp
    engines/sword25/kernel/outputpersistenceblock.h
    engines/sword25/module.mk
    engines/sword25/script/luascript.cpp
    engines/sword25/sword25.cpp
    engines/sword25/util/lua/lapi.cpp
    engines/sword25/util/lua/liolib.cpp
    engines/tinsel/tinsel.cpp
    engines/tony/game.cpp
    engines/tony/gfxcore.cpp
    engines/tony/mpal/lzo.cpp
    engines/tony/mpal/mpal.cpp
    engines/tony/window.cpp
    engines/toon/anim.cpp
    engines/toon/character.cpp
    engines/toon/font.cpp
    engines/toon/state.cpp
    engines/toon/toon.cpp
    engines/toon/toon.h
    engines/tsage/blue_force/blueforce_scenes8.cpp
    engines/tsage/blue_force/blueforce_scenes8.h
    engines/tsage/blue_force/blueforce_scenes9.cpp
    engines/tsage/core.cpp
    engines/tsage/detection.cpp
    engines/tsage/detection_tables.h
    engines/tsage/globals.cpp
    engines/tsage/graphics.cpp
    engines/tsage/graphics.h
    engines/tsage/module.mk
    engines/tsage/resources.h
    engines/tsage/ringworld/ringworld_scenes3.cpp
    engines/tsage/ringworld/ringworld_scenes3.h
    engines/tsage/ringworld2/ringworld2_logic.cpp
    engines/tsage/ringworld2/ringworld2_outpost.cpp
    engines/tsage/ringworld2/ringworld2_outpost.h
    engines/tsage/ringworld2/ringworld2_scenes0.cpp
    engines/tsage/ringworld2/ringworld2_scenes1.cpp
    engines/tsage/ringworld2/ringworld2_scenes1.h
    engines/tsage/ringworld2/ringworld2_scenes3.cpp
    engines/tsage/tsage.cpp
    engines/tsage/tsage.h
    engines/voyeur/events.cpp
    engines/voyeur/files_threads.cpp
    engines/wintermute/base/base_engine.cpp
    engines/wintermute/base/base_engine.h
    engines/wintermute/base/base_file_manager.cpp
    engines/wintermute/base/base_game.cpp
    engines/wintermute/base/base_game.h
    engines/wintermute/base/base_game_settings.cpp
    engines/wintermute/base/base_game_settings.h
    engines/wintermute/base/base_keyboard_state.cpp
    engines/wintermute/base/base_keyboard_state.h
    engines/wintermute/base/base_sprite.cpp
    engines/wintermute/base/base_string_table.cpp
    engines/wintermute/base/base_string_table.h
    engines/wintermute/debugger.cpp
    engines/wintermute/detection.cpp
    engines/wintermute/detection_tables.h
    engines/wintermute/math/rect32.h
    engines/wintermute/module.mk
    engines/wintermute/video/video_theora_player.cpp
    engines/wintermute/video/video_theora_player.h
    engines/wintermute/wintermute.cpp
    engines/wintermute/wintermute.h
    engines/zvision/configure.engine
    engines/zvision/core/console.cpp
    engines/zvision/core/console.h
    engines/zvision/core/events.cpp
    engines/zvision/detection.cpp
    engines/zvision/detection.h
    engines/zvision/graphics/render_manager.cpp
    engines/zvision/graphics/render_manager.h
    engines/zvision/graphics/render_table.cpp
    engines/zvision/graphics/render_table.h
    engines/zvision/module.mk
    engines/zvision/scripting/actions.cpp
    engines/zvision/scripting/actions.h
    engines/zvision/scripting/control.cpp
    engines/zvision/scripting/control.h
    engines/zvision/scripting/controls/input_control.cpp
    engines/zvision/scripting/controls/input_control.h
    engines/zvision/scripting/controls/lever_control.cpp
    engines/zvision/scripting/controls/lever_control.h
    engines/zvision/scripting/controls/push_toggle_control.cpp
    engines/zvision/scripting/controls/push_toggle_control.h
    engines/zvision/scripting/puzzle.h
    engines/zvision/scripting/scr_file_handling.cpp
    engines/zvision/scripting/script_manager.cpp
    engines/zvision/scripting/script_manager.h
    engines/zvision/sound/zork_raw.cpp
    engines/zvision/sound/zork_raw.h
    engines/zvision/video/video.cpp
    engines/zvision/video/zork_avi_decoder.cpp
    engines/zvision/video/zork_avi_decoder.h
    engines/zvision/zvision.cpp
    engines/zvision/zvision.h
    graphics/VectorRenderer.h
    graphics/VectorRendererSpec.cpp
    graphics/VectorRendererSpec.h
    graphics/fonts/ttf.cpp
    graphics/surface.h
    graphics/transform_struct.h
    graphics/transform_tools.h
    gui/EventRecorder.cpp
    gui/Tooltip.cpp
    gui/Tooltip.h
    gui/about.cpp
    gui/browser_osx.mm
    gui/credits.h
    gui/debugger.cpp
    gui/debugger.h
    gui/dialog.cpp
    gui/saveload-dialog.cpp
    gui/themes/scummmodern.zip
    gui/themes/scummmodern/scummmodern_layout.stx
    gui/themes/translations.dat
    gui/widgets/edittext.cpp
    gui/widgets/tab.h
    icons/scummvm.info
    icons/scummvm_drawer.info
    image/codecs/cinepak.cpp
    image/codecs/cinepak.h
    image/codecs/codec.cpp
    image/codecs/codec.h
    image/codecs/mjpeg.cpp
    image/codecs/mpeg.h
    image/codecs/qtrle.cpp
    image/codecs/qtrle.h
    image/codecs/rpza.cpp
    image/codecs/rpza.h
    image/iff.cpp
    image/image_decoder.h
    po/be_BY.po
    po/ca_ES.po
    po/cs_CZ.po
    po/da_DA.po
    po/de_DE.po
    po/es_ES.po
    po/eu.po
    po/fi_FI.po
    po/fr_FR.po
    po/gl_ES.po
    po/hu_HU.po
    po/it_IT.po
    po/nb_NO.po
    po/nl_NL.po
    po/nn_NO.po
    po/pl_PL.po
    po/pt_BR.po
    po/ru_RU.po
    po/scummvm.pot
    po/se_SE.po
    po/uk_UA.po
    ports.mk
    test/audio/timestamp.h
    test/common/endian.h
    test/common/memoryreadstream.h
    test/common/memoryreadstreamendian.h
    test/cxxtest/cxxtestgen.py
    video/avi_decoder.cpp
    video/avi_decoder.h
    video/module.mk
    video/qt_decoder.cpp
    video/qt_decoder.h
    video/theora_decoder.cpp
    video/theora_decoder.h
    video/video_decoder.cpp
    video/video_decoder.h



diff --cc engines/mads/menu_views.cpp
index 6acf6cd,cfc3b09..10d5a21
--- a/engines/mads/menu_views.cpp
+++ b/engines/mads/menu_views.cpp
@@@ -1,24 -1,24 +1,24 @@@
  /* ScummVM - Graphic Adventure Engine
-- *
-- * ScummVM is the legal property of its developers, whose names
-- * are too numerous to list here. Please refer to the COPYRIGHT
-- * file distributed with this source distribution.
-- *
-- * This program is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU General Public License
-- * as published by the Free Software Foundation; either version 2
-- * of the License, or (at your option) any later version.
- 
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
- 
-  * You should have received a copy of the GNU General Public License
-  * along with this program; if not, write to the Free Software
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-- *
-  */
 - * This program is distributed in the hope that it will be useful,
 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 - * GNU General Public License for more details.
 - *
 - * You should have received a copy of the GNU General Public License
 - * along with this program; if not, write to the Free Software
 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 - *
 - */
++*
++* ScummVM is the legal property of its developers, whose names
++* are too numerous to list here. Please refer to the COPYRIGHT
++* file distributed with this source distribution.
++*
++* This program is free software; you can redistribute it and/or
++* modify it under the terms of the GNU General Public License
++* as published by the Free Software Foundation; either version 2
++* of the License, or (at your option) any later version.
++*
++* This program is distributed in the hope that it will be useful,
++* but WITHOUT ANY WARRANTY; without even the implied warranty of
++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++* GNU General Public License for more details.
++*
++* You should have received a copy of the GNU General Public License
++* along with this program; if not, write to the Free Software
++* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++*
++*/
  
  #include "common/scummsys.h"
  #include "mads/game.h"
@@@ -240,7 -254,7 +254,8 @@@ void TextView::processCommand() 
  		sceneInfo->_width = MADS_SCREEN_WIDTH;
  		sceneInfo->_height = MADS_SCENE_HEIGHT;
  		_spareScreens[spareIndex].setSize(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
- 		sceneInfo->loadMadsV1Background(screenId, "", SCENEFLAG_TRANSLATE, 
++
+ 		sceneInfo->loadMadsV1Background(screenId, "", SCENEFLAG_TRANSLATE,
  			_spareScreens[spareIndex]);
  		delete sceneInfo;
  
diff --cc engines/mads/menu_views.h
index 6faa665,6c8a2a8..c203248
--- a/engines/mads/menu_views.h
+++ b/engines/mads/menu_views.h
@@@ -8,12 -8,12 +8,20 @@@
   * modify it under the terms of the GNU General Public License
   * as published by the Free Software Foundation; either version 2
   * of the License, or (at your option) any later version.
++<<<<<<< HEAD
 +
++=======
+  *
++>>>>>>> master
   * This program is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU General Public License for more details.
++<<<<<<< HEAD
 +
++=======
+  *
++>>>>>>> master
   * You should have received a copy of the GNU General Public License
   * along with this program; if not, write to the Free Software
   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@@ -119,6 -117,11 +125,11 @@@ protected
  	virtual void display();
  
  	virtual void doFrame();
+ 
+ 	/**
 -	* Called when the script is finished
 -	*/
++	 * Called when the script is finished
++	 */
+ 	virtual void scriptDone();
  public:
  	/**
  	 * Queue the given text resource for display
@@@ -188,11 -191,8 +199,13 @@@ private
  	int _manualFrame2;
  	int _animFrameNumber;
  	bool _nextCyclingActive;
 +private:
 +	void checkResource(const Common::String &resourceName);
 +
 +	int scanResourceIndex(const Common::String &resourceName);
 +
+ 	uint _scrollFrameCtr;
+ private:
  	void load();
  
  	void processLines();


Commit: 2356501d349098b9e408662155da490b176764d6
    https://github.com/scummvm/scummvm/commit/2356501d349098b9e408662155da490b176764d6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-08-30T19:36:40-04:00

Commit Message:
Merge branch 'master' into phantom

Conflicts:
	engines/mads/phantom/game_phantom.cpp
	engines/mads/phantom/globals_phantom.h
	engines/mads/phantom/phantom_scenes.h
	engines/mads/phantom/phantom_scenes1.cpp
	engines/mads/phantom/phantom_scenes1.h
	engines/sherlock/events.cpp
	engines/sherlock/inventory.cpp
	engines/sherlock/journal.cpp
	engines/sherlock/map.cpp
	engines/sherlock/map.h
	engines/sherlock/module.mk
	engines/sherlock/music.cpp
	engines/sherlock/music.h
	engines/sherlock/objects.cpp
	engines/sherlock/objects.h
	engines/sherlock/people.cpp
	engines/sherlock/people.h
	engines/sherlock/resources.cpp
	engines/sherlock/resources.h
	engines/sherlock/scalpel/drivers/adlib.cpp
	engines/sherlock/scalpel/drivers/mididriver.h
	engines/sherlock/scalpel/scalpel.cpp
	engines/sherlock/scalpel/scalpel_scene.cpp
	engines/sherlock/scalpel/scalpel_scene.h
	engines/sherlock/scalpel/scalpel_user_interface.cpp
	engines/sherlock/scalpel/scalpel_user_interface.h
	engines/sherlock/scalpel/settings.cpp
	engines/sherlock/scalpel/tsage/logo.cpp
	engines/sherlock/scalpel/tsage/logo.h
	engines/sherlock/scene.cpp
	engines/sherlock/scene.h
	engines/sherlock/screen.cpp
	engines/sherlock/screen.h
	engines/sherlock/sherlock.cpp
	engines/sherlock/sherlock.h
	engines/sherlock/sound.cpp
	engines/sherlock/sound.h
	engines/sherlock/surface.cpp
	engines/sherlock/surface.h
	engines/sherlock/talk.cpp
	engines/sherlock/talk.h
	engines/sherlock/tattoo/tattoo.cpp
	engines/sherlock/tattoo/tattoo.h
	engines/sherlock/tattoo/tattoo_scene.cpp
	engines/sherlock/tattoo/tattoo_scene.h
	engines/sherlock/tattoo/tattoo_user_interface.cpp
	engines/sherlock/tattoo/tattoo_user_interface.h
	engines/sherlock/user_interface.cpp
	engines/sherlock/user_interface.h

Changed paths:
  A audio/adlib.cpp
  A audio/alsa_opl.cpp
  A audio/decoders/3do.cpp
  A audio/decoders/3do.h
  A audio/miles.h
  A audio/miles_adlib.cpp
  A audio/miles_mt32.cpp
  A doc/de/Spieletitel Original-Deutsch Deutsch-Original
  A engines/access/martian/martian_player.cpp
  A engines/access/martian/martian_player.h
  A engines/agos/drivers/accolade/adlib.cpp
  A engines/agos/drivers/accolade/driverfile.cpp
  A engines/agos/drivers/accolade/mididriver.h
  A engines/agos/drivers/accolade/mt32.cpp
  A engines/agos/drivers/simon1/adlib.cpp
  A engines/agos/drivers/simon1/adlib.h
  A engines/queen/midiadlib.h
  A engines/sherlock/fixed_text.cpp
  A engines/sherlock/fixed_text.h
  A engines/sherlock/fonts.cpp
  A engines/sherlock/fonts.h
  A engines/sherlock/image_file.cpp
  A engines/sherlock/image_file.h
  A engines/sherlock/scalpel/3do/movie_decoder.cpp
  A engines/sherlock/scalpel/3do/movie_decoder.h
  A engines/sherlock/scalpel/drivers/mt32.cpp
  A engines/sherlock/scalpel/scalpel_darts.cpp
  A engines/sherlock/scalpel/scalpel_darts.h
  A engines/sherlock/scalpel/scalpel_debugger.cpp
  A engines/sherlock/scalpel/scalpel_debugger.h
  A engines/sherlock/scalpel/scalpel_fixed_text.cpp
  A engines/sherlock/scalpel/scalpel_fixed_text.h
  A engines/sherlock/scalpel/scalpel_inventory.cpp
  A engines/sherlock/scalpel/scalpel_inventory.h
  A engines/sherlock/scalpel/scalpel_journal.cpp
  A engines/sherlock/scalpel/scalpel_journal.h
  A engines/sherlock/scalpel/scalpel_map.cpp
  A engines/sherlock/scalpel/scalpel_map.h
  A engines/sherlock/scalpel/scalpel_people.cpp
  A engines/sherlock/scalpel/scalpel_people.h
  A engines/sherlock/scalpel/scalpel_saveload.cpp
  A engines/sherlock/scalpel/scalpel_saveload.h
  A engines/sherlock/scalpel/scalpel_screen.cpp
  A engines/sherlock/scalpel/scalpel_screen.h
  A engines/sherlock/scalpel/scalpel_talk.cpp
  A engines/sherlock/scalpel/scalpel_talk.h
  A engines/sherlock/tattoo/tattoo_darts.cpp
  A engines/sherlock/tattoo/tattoo_darts.h
  A engines/sherlock/tattoo/tattoo_debugger.cpp
  A engines/sherlock/tattoo/tattoo_debugger.h
  A engines/sherlock/tattoo/tattoo_fixed_text.cpp
  A engines/sherlock/tattoo/tattoo_fixed_text.h
  A engines/sherlock/tattoo/tattoo_inventory.cpp
  A engines/sherlock/tattoo/tattoo_inventory.h
  A engines/sherlock/tattoo/tattoo_journal.cpp
  A engines/sherlock/tattoo/tattoo_journal.h
  A engines/sherlock/tattoo/tattoo_map.cpp
  A engines/sherlock/tattoo/tattoo_map.h
  A engines/sherlock/tattoo/tattoo_people.cpp
  A engines/sherlock/tattoo/tattoo_people.h
  A engines/sherlock/tattoo/tattoo_resources.cpp
  A engines/sherlock/tattoo/tattoo_resources.h
  A engines/sherlock/tattoo/tattoo_talk.cpp
  A engines/sherlock/tattoo/tattoo_talk.h
  A engines/sherlock/tattoo/widget_base.cpp
  A engines/sherlock/tattoo/widget_base.h
  A engines/sherlock/tattoo/widget_credits.cpp
  A engines/sherlock/tattoo/widget_credits.h
  A engines/sherlock/tattoo/widget_files.cpp
  A engines/sherlock/tattoo/widget_files.h
  A engines/sherlock/tattoo/widget_foolscap.cpp
  A engines/sherlock/tattoo/widget_foolscap.h
  A engines/sherlock/tattoo/widget_inventory.cpp
  A engines/sherlock/tattoo/widget_inventory.h
  A engines/sherlock/tattoo/widget_lab.cpp
  A engines/sherlock/tattoo/widget_lab.h
  A engines/sherlock/tattoo/widget_options.cpp
  A engines/sherlock/tattoo/widget_options.h
  A engines/sherlock/tattoo/widget_password.cpp
  A engines/sherlock/tattoo/widget_password.h
  A engines/sherlock/tattoo/widget_quit.cpp
  A engines/sherlock/tattoo/widget_quit.h
  A engines/sherlock/tattoo/widget_talk.cpp
  A engines/sherlock/tattoo/widget_talk.h
  A engines/sherlock/tattoo/widget_text.cpp
  A engines/sherlock/tattoo/widget_text.h
  A engines/sherlock/tattoo/widget_tooltip.cpp
  A engines/sherlock/tattoo/widget_tooltip.h
  A engines/sherlock/tattoo/widget_verbs.cpp
  A engines/sherlock/tattoo/widget_verbs.h
  A engines/zvision/detection_tables.h
  R audio/softsynth/adlib.cpp
  R engines/sherlock/scalpel/darts.cpp
  R engines/sherlock/scalpel/darts.h
  R engines/zvision/detection.h
    AUTHORS
    NEWS
    README
    audio/decoders/aiff.cpp
    audio/decoders/aiff.h
    audio/decoders/wave.h
    audio/fmopl.cpp
    audio/fmopl.h
    audio/midiparser.h
    audio/midiparser_xmidi.cpp
    audio/module.mk
    audio/softsynth/opl/dosbox.cpp
    audio/softsynth/opl/dosbox.h
    audio/softsynth/opl/mame.cpp
    audio/softsynth/opl/mame.h
    common/dcl.cpp
    common/dcl.h
    common/fft.cpp
    configure
    devtools/create_project/create_project.cpp
    devtools/create_project/xcode.cpp
    devtools/create_project/xcode.h
    devtools/credits.pl
    devtools/scumm-md5.txt
    doc/cz/PrectiMe
    doc/de/Liesmich
    doc/de/Neues
    engines/access/access.cpp
    engines/access/access.h
    engines/access/amazon/amazon_game.cpp
    engines/access/amazon/amazon_logic.cpp
    engines/access/amazon/amazon_player.cpp
    engines/access/amazon/amazon_resources.cpp
    engines/access/amazon/amazon_resources.h
    engines/access/amazon/amazon_scripts.cpp
    engines/access/amazon/amazon_scripts.h
    engines/access/asurface.cpp
    engines/access/asurface.h
    engines/access/bubble_box.cpp
    engines/access/bubble_box.h
    engines/access/char.cpp
    engines/access/char.h
    engines/access/decompress.cpp
    engines/access/decompress.h
    engines/access/detection_tables.h
    engines/access/inventory.cpp
    engines/access/inventory.h
    engines/access/martian/martian_game.cpp
    engines/access/martian/martian_game.h
    engines/access/martian/martian_resources.cpp
    engines/access/martian/martian_resources.h
    engines/access/martian/martian_room.cpp
    engines/access/martian/martian_room.h
    engines/access/martian/martian_scripts.cpp
    engines/access/martian/martian_scripts.h
    engines/access/module.mk
    engines/access/player.cpp
    engines/access/player.h
    engines/access/resources.cpp
    engines/access/resources.h
    engines/access/room.cpp
    engines/access/room.h
    engines/access/screen.cpp
    engines/access/screen.h
    engines/access/scripts.cpp
    engines/access/scripts.h
    engines/access/sound.cpp
    engines/access/sound.h
    engines/access/video.cpp
    engines/access/video.h
    engines/agi/detection_tables.h
    engines/agi/graphics.cpp
    engines/agi/preagi_mickey.cpp
    engines/agos/agos.cpp
    engines/agos/detection_tables.h
    engines/agos/gfx.cpp
    engines/agos/input.cpp
    engines/agos/midi.cpp
    engines/agos/midi.h
    engines/agos/midiparser_s1d.cpp
    engines/agos/module.mk
    engines/agos/res_snd.cpp
    engines/agos/sound.cpp
    engines/agos/zones.cpp
    engines/bbvs/sound.h
    engines/cine/sound.cpp
    engines/cruise/sound.cpp
    engines/fullpipe/motion.cpp
    engines/gob/gob.cpp
    engines/gob/map_v2.cpp
    engines/gob/sound/adlib.cpp
    engines/gob/sound/adlib.h
    engines/gob/sound/adlplayer.cpp
    engines/gob/sound/adlplayer.h
    engines/gob/sound/musplayer.cpp
    engines/gob/sound/musplayer.h
    engines/gob/sound/sound.cpp
    engines/gob/sound/sound.h
    engines/groovie/music.cpp
    engines/groovie/music.h
    engines/kyra/sound_adlib.cpp
    engines/lure/res.h
    engines/made/made.cpp
    engines/made/music.cpp
    engines/made/music.h
    engines/made/pmvplayer.cpp
    engines/made/screenfx.cpp
    engines/made/sound.cpp
    engines/made/sound.h
    engines/mads/hotspots.cpp
    engines/mads/nebular/sound_nebular.cpp
    engines/mads/nebular/sound_nebular.h
    engines/mads/phantom/game_phantom.cpp
    engines/mads/phantom/globals_phantom.h
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes.h
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h
    engines/mads/sound.cpp
    engines/mads/sound.h
    engines/mohawk/console.cpp
    engines/mohawk/detection_tables.h
    engines/mohawk/livingbooks.cpp
    engines/mohawk/livingbooks_code.cpp
    engines/mohawk/livingbooks_code.h
    engines/mohawk/myst_areas.cpp
    engines/mohawk/myst_stacks/channelwood.cpp
    engines/mohawk/myst_stacks/dni.cpp
    engines/mohawk/myst_stacks/intro.cpp
    engines/mohawk/myst_stacks/mechanical.cpp
    engines/mohawk/myst_stacks/myst.cpp
    engines/mohawk/myst_stacks/stoneship.cpp
    engines/mohawk/riven.cpp
    engines/mohawk/riven_external.cpp
    engines/mohawk/riven_scripts.cpp
    engines/mohawk/video.cpp
    engines/mohawk/video.h
    engines/mortevielle/detection_tables.h
    engines/mortevielle/menu.cpp
    engines/parallaction/adlib.cpp
    engines/pegasus/sound.cpp
    engines/queen/midiadlib.cpp
    engines/queen/music.cpp
    engines/saga/detection_tables.h
    engines/saga/introproc_ihnm.cpp
    engines/saga/introproc_ite.cpp
    engines/saga/music.cpp
    engines/saga/music.h
    engines/saga/saga.cpp
    engines/saga/saga.h
    engines/saga/scene.cpp
    engines/saga/scene.h
    engines/saga/script.cpp
    engines/saga/sndres.cpp
    engines/sci/detection.cpp
    engines/sci/detection_tables.h
    engines/sci/engine/kfile.cpp
    engines/sci/engine/script.cpp
    engines/sci/graphics/transitions.cpp
    engines/sci/graphics/transitions.h
    engines/sci/sound/audio.cpp
    engines/sci/sound/drivers/adlib.cpp
    engines/scumm/detection_tables.h
    engines/scumm/players/player_ad.cpp
    engines/scumm/players/player_ad.h
    engines/scumm/scumm-md5.h
    engines/scumm/scumm.cpp
    engines/scumm/scumm.h
    engines/scumm/string.cpp
    engines/sherlock/animation.cpp
    engines/sherlock/animation.h
    engines/sherlock/debugger.cpp
    engines/sherlock/debugger.h
    engines/sherlock/detection.cpp
    engines/sherlock/detection_tables.h
    engines/sherlock/events.cpp
    engines/sherlock/events.h
    engines/sherlock/inventory.cpp
    engines/sherlock/inventory.h
    engines/sherlock/journal.cpp
    engines/sherlock/journal.h
    engines/sherlock/map.cpp
    engines/sherlock/map.h
    engines/sherlock/module.mk
    engines/sherlock/music.cpp
    engines/sherlock/music.h
    engines/sherlock/objects.cpp
    engines/sherlock/objects.h
    engines/sherlock/people.cpp
    engines/sherlock/people.h
    engines/sherlock/resources.cpp
    engines/sherlock/resources.h
    engines/sherlock/saveload.cpp
    engines/sherlock/saveload.h
    engines/sherlock/scalpel/drivers/adlib.cpp
    engines/sherlock/scalpel/drivers/mididriver.h
    engines/sherlock/scalpel/scalpel.cpp
    engines/sherlock/scalpel/scalpel.h
    engines/sherlock/scalpel/scalpel_scene.cpp
    engines/sherlock/scalpel/scalpel_scene.h
    engines/sherlock/scalpel/scalpel_user_interface.cpp
    engines/sherlock/scalpel/scalpel_user_interface.h
    engines/sherlock/scalpel/settings.cpp
    engines/sherlock/scalpel/tsage/logo.cpp
    engines/sherlock/scalpel/tsage/logo.h
    engines/sherlock/scene.cpp
    engines/sherlock/scene.h
    engines/sherlock/screen.cpp
    engines/sherlock/screen.h
    engines/sherlock/sherlock.cpp
    engines/sherlock/sherlock.h
    engines/sherlock/sound.cpp
    engines/sherlock/sound.h
    engines/sherlock/surface.cpp
    engines/sherlock/surface.h
    engines/sherlock/talk.cpp
    engines/sherlock/talk.h
    engines/sherlock/tattoo/tattoo.cpp
    engines/sherlock/tattoo/tattoo.h
    engines/sherlock/tattoo/tattoo_scene.cpp
    engines/sherlock/tattoo/tattoo_scene.h
    engines/sherlock/tattoo/tattoo_user_interface.cpp
    engines/sherlock/tattoo/tattoo_user_interface.h
    engines/sherlock/user_interface.cpp
    engines/sherlock/user_interface.h
    engines/sky/music/adlibchannel.cpp
    engines/sky/music/adlibchannel.h
    engines/sky/music/adlibmusic.cpp
    engines/sky/music/adlibmusic.h
    engines/sword25/fmv/movieplayer.cpp
    engines/tinsel/music.cpp
    engines/tinsel/music.h
    engines/tinsel/tinsel.cpp
    engines/toltecs/music.cpp
    engines/toltecs/music.h
    engines/tony/window.cpp
    engines/tsage/detection_tables.h
    engines/tsage/globals.cpp
    engines/tsage/sherlock/sherlock_logo.cpp
    engines/tsage/sherlock/sherlock_logo.h
    engines/tsage/sound.cpp
    engines/tsage/sound.h
    engines/tsage/tsage.cpp
    engines/wintermute/base/base_script_holder.cpp
    engines/zvision/configure.engine
    engines/zvision/core/clock.h
    engines/zvision/core/console.cpp
    engines/zvision/detection.cpp
    engines/zvision/file/save_manager.cpp
    engines/zvision/graphics/render_manager.cpp
    engines/zvision/scripting/actions.cpp
    engines/zvision/scripting/actions.h
    engines/zvision/scripting/controls/input_control.cpp
    engines/zvision/scripting/controls/input_control.h
    engines/zvision/scripting/menu.cpp
    engines/zvision/scripting/menu.h
    engines/zvision/sound/zork_raw.cpp
    engines/zvision/text/string_manager.h
    engines/zvision/text/text.h
    engines/zvision/zvision.cpp
    engines/zvision/zvision.h
    gui/credits.h
    gui/debugger.cpp
    gui/debugger.h
    gui/launcher.cpp
    gui/options.cpp
    gui/themes/translations.dat
    image/codecs/cinepak.cpp
    image/codecs/cinepak.h
    po/POTFILES
    po/be_BY.po
    po/ca_ES.po
    po/cs_CZ.po
    po/da_DA.po
    po/de_DE.po
    po/es_ES.po
    po/eu.po
    po/fi_FI.po
    po/fr_FR.po
    po/gl_ES.po
    po/hu_HU.po
    po/it_IT.po
    po/nb_NO.po
    po/nl_NL.po
    po/nn_NO.po
    po/pl_PL.po
    po/pt_BR.po
    po/ru_RU.po
    po/scummvm.pot
    po/se_SE.po
    po/uk_UA.po





Commit: 63ad675abf7cc8585da30ef97bebe0c6cd502a58
    https://github.com/scummvm/scummvm/commit/63ad675abf7cc8585da30ef97bebe0c6cd502a58
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-09-21T21:18:19+02:00

Commit Message:
MADS: Allow multiple animations for Phantom and later games

Changed paths:
    engines/mads/game.cpp
    engines/mads/nebular/nebular_scenes1.cpp
    engines/mads/nebular/nebular_scenes2.cpp
    engines/mads/nebular/nebular_scenes3.cpp
    engines/mads/nebular/nebular_scenes4.cpp
    engines/mads/nebular/nebular_scenes5.cpp
    engines/mads/nebular/nebular_scenes6.cpp
    engines/mads/nebular/nebular_scenes7.cpp
    engines/mads/nebular/nebular_scenes8.cpp
    engines/mads/scene.cpp
    engines/mads/scene.h



diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp
index 91f6cd5..332ac43 100644
--- a/engines/mads/game.cpp
+++ b/engines/mads/game.cpp
@@ -297,8 +297,10 @@ void Game::sectionLoop() {
 		_vm->_events->waitCursor();
 		_kernelMode = KERNEL_ROOM_PRELOAD;
 
-		delete _scene._activeAnimation;
-		_scene._activeAnimation = nullptr;
+		for (int i = 0; i < 10; i++) {
+			delete _scene._animation[i];
+			_scene._animation[i] = nullptr;
+		}
 
 		_scene._reloadSceneFlag = false;
 
diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp
index fd97f71..d5e1fc0 100644
--- a/engines/mads/nebular/nebular_scenes1.cpp
+++ b/engines/mads/nebular/nebular_scenes1.cpp
@@ -258,32 +258,32 @@ void Scene101::step() {
 		break;
 	}
 
-	if (_scene->_activeAnimation != nullptr) {
-		if ((_scene->_activeAnimation->getCurrentFrame() >= 6) && (_messageNum == 0)) {
+	if (_scene->_animation[0] != nullptr) {
+		if ((_scene->_animation[0]->getCurrentFrame() >= 6) && (_messageNum == 0)) {
 			_messageNum++;
 			_scene->_kernelMessages.add(Common::Point(63, _posY), 0x1110, 0, 0, 240, _game.getQuote(49));
 			_posY += 14;
 		}
 
-		if ((_scene->_activeAnimation->getCurrentFrame() >= 7) && (_messageNum == 1)) {
+		if ((_scene->_animation[0]->getCurrentFrame() >= 7) && (_messageNum == 1)) {
 			_messageNum++;
 			_scene->_kernelMessages.add(Common::Point(63, _posY), 0x1110, 0, 0, 240, _game.getQuote(54));
 			_posY += 14;
 		}
 
-		if ((_scene->_activeAnimation->getCurrentFrame() >= 10) && (_messageNum == 2)) {
+		if ((_scene->_animation[0]->getCurrentFrame() >= 10) && (_messageNum == 2)) {
 			_messageNum++;
 			_scene->_kernelMessages.add(Common::Point(63, _posY), 0x1110, 0, 0, 240, _game.getQuote(55));
 			_posY += 14;
 		}
 
-		if ((_scene->_activeAnimation->getCurrentFrame() >= 17) && (_messageNum == 3)) {
+		if ((_scene->_animation[0]->getCurrentFrame() >= 17) && (_messageNum == 3)) {
 			_messageNum++;
 			_scene->_kernelMessages.add(Common::Point(63, _posY), 0x1110, 0, 0, 240, _game.getQuote(56));
 			_posY += 14;
 		}
 
-		if ((_scene->_activeAnimation->getCurrentFrame() >= 20) && (_messageNum == 4)) {
+		if ((_scene->_animation[0]->getCurrentFrame() >= 20) && (_messageNum == 4)) {
 			_messageNum++;
 			_scene->_kernelMessages.add(Common::Point(63, _posY), 0x1110, 0, 0, 240, _game.getQuote(50));
 			_posY += 14;
@@ -1782,7 +1782,7 @@ void Scene104::step() {
 	if ((_game._player._special > 0) && _game._player._stepEnabled)
 		_game._player._stepEnabled = false;
 
-	if (_kargShootingFl && (_scene->_activeAnimation->getCurrentFrame() >= 19)) {
+	if (_kargShootingFl && (_scene->_animation[0]->getCurrentFrame() >= 19)) {
 		_scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 34, 0, 120, _game.getQuote(52));
 		_kargShootingFl = false;
 	}
@@ -2079,7 +2079,7 @@ void Scene106::step() {
 		}
 	}
 
-	if (_firstEmergingFl && (_scene->_activeAnimation->getCurrentFrame() >= 19)) {
+	if (_firstEmergingFl && (_scene->_animation[0]->getCurrentFrame() >= 19)) {
 		_firstEmergingFl = false;
 		_scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 34, 0, 120, _game.getQuote(52));
 	}
@@ -2263,7 +2263,7 @@ void Scene107::enter() {
 }
 
 void Scene107::step() {
-	if (_shootingFl && (_scene->_activeAnimation->getCurrentFrame() >= 19)) {
+	if (_shootingFl && (_scene->_animation[0]->getCurrentFrame() >= 19)) {
 		_scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 34, 0, 120, _game.getQuote(52));
 		_shootingFl = false;
 	}
@@ -2919,7 +2919,7 @@ void Scene110::actions() {
 		switch (_game._trigger) {
 		case 0:
 			_scene->loadAnimation(Resources::formatName(110, 'T', 0, EXT_AA, ""), 1);
-			_scene->_activeAnimation->setNextFrameTimer(_game._player._ticksAmount + _game._player._priorTimer);
+			_scene->_animation[0]->setNextFrameTimer(_game._player._ticksAmount + _game._player._priorTimer);
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
 			break;
@@ -3066,7 +3066,7 @@ void Scene111::step() {
 	if (_game._trigger == 73)
 		_vm->_sound->command(37);
 
-	if (_rexDivingFl && (_scene->_activeAnimation->getCurrentFrame() >= 9)) {
+	if (_rexDivingFl && (_scene->_animation[0]->getCurrentFrame() >= 9)) {
 		_vm->_sound->command(36);
 		_rexDivingFl = false;
 	}
@@ -3138,8 +3138,8 @@ void Scene112::enter() {
 }
 
 void Scene112::step() {
-	if ((_scene->_activeAnimation != nullptr) && (_game._storyMode == STORYMODE_NICE)) {
-		if (_scene->_activeAnimation->getCurrentFrame() >= 54) {
+	if ((_scene->_animation[0] != nullptr) && (_game._storyMode == STORYMODE_NICE)) {
+		if (_scene->_animation[0]->getCurrentFrame() >= 54) {
 			_scene->freeAnimation();
 			_game._trigger = 70;
 		}
diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp
index 1cbd6f5..ad15f83 100644
--- a/engines/mads/nebular/nebular_scenes2.cpp
+++ b/engines/mads/nebular/nebular_scenes2.cpp
@@ -484,7 +484,7 @@ void Scene202::enter() {
 		}
 
 		_scene->loadAnimation(formAnimName('M', -1), 71);
-		_scene->_activeAnimation->setCurrentFrame(200);
+		_scene->_animation[0]->setCurrentFrame(200);
 	} else {
 		if (_ladderTopFl) {
 			_game._player._visible = false;
@@ -596,7 +596,7 @@ void Scene202::step() {
 		break;
 	}
 
-	if (!_scene->_activeAnimation && (_globals[kMeteorologistStatus] != METEOROLOGIST_GONE) && (_meteoClock2 <= _scene->_frameStartTime) && (_meteoClock1 <= _scene->_frameStartTime)) {
+	if (!_scene->_animation[0] && (_globals[kMeteorologistStatus] != METEOROLOGIST_GONE) && (_meteoClock2 <= _scene->_frameStartTime) && (_meteoClock1 <= _scene->_frameStartTime)) {
 		int randVal = _vm->getRandomNumber(1, 500);
 		int threshold = 1;
 		if (_ladderTopFl)
@@ -615,11 +615,11 @@ void Scene202::step() {
 		}
 	}
 
-	if (!_scene->_activeAnimation)
+	if (!_scene->_animation[0])
 		return;
 
 	if (_waitingMeteoFl) {
-		if (_scene->_activeAnimation->getCurrentFrame() >= 200) {
+		if (_scene->_animation[0]->getCurrentFrame() >= 200) {
 			if ((_globals[kMeteorologistWatch] == METEOROLOGIST_TOWER) || _globals[kLadderBroken]) {
 				_scene->_nextSceneId = 213;
 			} else {
@@ -628,7 +628,7 @@ void Scene202::step() {
 			}
 		}
 
-		if ((_scene->_activeAnimation->getCurrentFrame() == 160) && (_meteoFrame != _scene->_activeAnimation->getCurrentFrame())) {
+		if ((_scene->_animation[0]->getCurrentFrame() == 160) && (_meteoFrame != _scene->_animation[0]->getCurrentFrame())) {
 			Common::Point msgPos;
 			int msgFlag;
 			if (!_ladderTopFl) {
@@ -647,15 +647,15 @@ void Scene202::step() {
 		_toTeleportFl = true;
 	}
 
-	if (_scene->_activeAnimation->getCurrentFrame() == _meteoFrame) {
+	if (_scene->_animation[0]->getCurrentFrame() == _meteoFrame) {
 		return;
 	}
 
-	_meteoFrame = _scene->_activeAnimation->getCurrentFrame();
+	_meteoFrame = _scene->_animation[0]->getCurrentFrame();
 	int randVal = _vm->getRandomNumber(1, 1000);
 	int frameStep = -1;
 
-	switch (_scene->_activeAnimation->getCurrentFrame()) {
+	switch (_scene->_animation[0]->getCurrentFrame()) {
 	case 42:
 	case 77:
 	case 96:
@@ -693,8 +693,8 @@ void Scene202::step() {
 		break;
 	}
 
-	if (frameStep >= 0 && frameStep != _scene->_activeAnimation->getCurrentFrame() + 1) {
-		_scene->_activeAnimation->setCurrentFrame(frameStep);
+	if (frameStep >= 0 && frameStep != _scene->_animation[0]->getCurrentFrame() + 1) {
+		_scene->_animation[0]->setCurrentFrame(frameStep);
 		_meteoFrame = frameStep;
 	}
 }
@@ -797,7 +797,7 @@ void Scene202::actions() {
 		_scene->_nextSceneId = 203;
 	} else if (_action.isAction(VERB_WALK_TOWARDS, NOUN_FIELD_TO_NORTH)) {
 		if (_globals[kMeteorologistStatus] != METEOROLOGIST_GONE) {
-			if (_scene->_activeAnimation)
+			if (_scene->_animation[0])
 				_globals[kMeteorologistStatus] = METEOROLOGIST_PRESENT;
 			else
 				_globals[kMeteorologistStatus] = METEOROLOGIST_ABSENT;
@@ -890,7 +890,7 @@ void Scene202::actions() {
 				_globals._sequenceIndexes[10] = _scene->_sequences.startCycle(_globals._spriteIndexes[9], false, 6);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1);
 				_scene->_sequences.setPosition(_globals._sequenceIndexes[10], Common::Point(172, 123));
-				if (_scene->_activeAnimation) {
+				if (_scene->_animation[0]) {
 					_waitingMeteoFl = true;
 					_globals[kMeteorologistWatch] = METEOROLOGIST_GROUND;
 				} else {
@@ -898,7 +898,7 @@ void Scene202::actions() {
 				}
 				break;
 			case 2:
-				if (!_scene->_activeAnimation && !_meteorologistSpecial) {
+				if (!_scene->_animation[0] && !_meteorologistSpecial) {
 					_vm->_dialogs->show(20222);
 				}
 				_scene->_sequences.remove(_globals._sequenceIndexes[10]);
@@ -932,13 +932,13 @@ void Scene202::actions() {
 				_globals._sequenceIndexes[10] = _scene->_sequences.startCycle(_globals._spriteIndexes[9], true, -2);
 				_scene->_sequences.setPosition(_globals._sequenceIndexes[10], Common::Point(247, 82));
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1);
-				if (_scene->_activeAnimation) {
-					if (_scene->_activeAnimation->getCurrentFrame() > 200) {
+				if (_scene->_animation[0]) {
+					if (_scene->_animation[0]->getCurrentFrame() > 200) {
 						_scene->_sequences.addTimer(120, 2);
 					} else {
 						_waitingMeteoFl = true;
 						_globals[kMeteorologistWatch] = METEOROLOGIST_GONE;
-						if ((_scene->_activeAnimation->getCurrentFrame() >= 44) && (_scene->_activeAnimation->getCurrentFrame() <= 75)) {
+						if ((_scene->_animation[0]->getCurrentFrame() >= 44) && (_scene->_animation[0]->getCurrentFrame() <= 75)) {
 							_scene->_kernelMessages.reset();
 							int msgIndex = _scene->_kernelMessages.add(Common::Point(248, 15), 0x1110, 32, 0, 60, _game.getQuote(100));
 							_scene->_kernelMessages.setQuoted(msgIndex, 4, false);
@@ -952,7 +952,7 @@ void Scene202::actions() {
 				}
 				break;
 			case 2:
-				if (!_scene->_activeAnimation)
+				if (!_scene->_animation[0])
 					_vm->_dialogs->show(20222);
 				_meteorologistSpecial = false;
 				_scene->_sequences.remove(_globals._sequenceIndexes[10]);
@@ -1227,7 +1227,7 @@ void Scene205::enter() {
 
 	if (_globals[kSexOfRex] != SEX_MALE) {
 		_scene->loadAnimation(formAnimName('a', -1));
-		_scene->_activeAnimation->_resetFlag = true;
+		_scene->_animation[0]->_resetFlag = true;
 	} else {
 		_beingKicked = true;
 		_globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 8, 1, 0, 0);
@@ -1379,8 +1379,8 @@ void Scene205::actions() {
 			_scene->_sequences.updateTimeout(_globals._sequenceIndexes[9], -1);
 			_vm->_sound->command(27);
 		} else if (_game._trigger == 1) {
-			if (_scene->_activeAnimation != nullptr)
-				_scene->_activeAnimation->resetSpriteSetsCount();
+			if (_scene->_animation[0] != nullptr)
+				_scene->_animation[0]->resetSpriteSetsCount();
 
 			_vm->_dialogs->show(20516);
 			_scene->_reloadSceneFlag = true;
@@ -1746,9 +1746,9 @@ void Scene208::enter() {
 }
 
 void Scene208::step() {
-	if (_boundingFl && _scene->_activeAnimation &&
-			(_rhotundaTime <= _scene->_activeAnimation->getCurrentFrame())) {
-		_rhotundaTime = _scene->_activeAnimation->getCurrentFrame();
+	if (_boundingFl && _scene->_animation[0] &&
+			(_rhotundaTime <= _scene->_animation[0]->getCurrentFrame())) {
+		_rhotundaTime = _scene->_animation[0]->getCurrentFrame();
 
 		if (_rhotundaTime == 125)
 			_scene->_sequences.remove(_globals._sequenceIndexes[4]);
@@ -4064,7 +4064,7 @@ void Scene210::setDialogNode(int node) {
 			_vm->_palette->lock();
 			_scene->_kernelMessages.reset();
 			_scene->freeAnimation();
-			_scene->_activeAnimation = nullptr;
+			_scene->_animation[0] = nullptr;
 			_scene->resetScene();
 
 			_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('c', -1));
@@ -4263,8 +4263,8 @@ void Scene210::enter() {
 		}
 
 		restoreDialogNode(_curDialogNode, quote, number);
-		if (_scene->_activeAnimation)
-			_scene->_activeAnimation->setCurrentFrame(131);
+		if (_scene->_animation[0])
+			_scene->_animation[0]->setCurrentFrame(131);
 	}
 
 	_vm->_palette->setEntry(252, 63, 63, 10);
@@ -4274,9 +4274,9 @@ void Scene210::enter() {
 }
 
 void Scene210::step() {
-	if ((_twinkleAnimationType == 1) && _scene->_activeAnimation) {
-		if (_twinklesCurrentFrame != _scene->_activeAnimation->getCurrentFrame()) {
-			_twinklesCurrentFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_twinkleAnimationType == 1) && _scene->_animation[0]) {
+		if (_twinklesCurrentFrame != _scene->_animation[0]->getCurrentFrame()) {
+			_twinklesCurrentFrame = _scene->_animation[0]->getCurrentFrame();
 			int reset_frame = -1;
 			int random = _vm->getRandomNumber(1, 1000);
 
@@ -4396,8 +4396,8 @@ void Scene210::step() {
 			}
 
 			if (reset_frame >= 0) {
-				if (reset_frame != _scene->_activeAnimation->getCurrentFrame()) {
-					_scene->_activeAnimation->setCurrentFrame(reset_frame);
+				if (reset_frame != _scene->_animation[0]->getCurrentFrame()) {
+					_scene->_animation[0]->setCurrentFrame(reset_frame);
 					_twinklesCurrentFrame = reset_frame;
 				}
 
@@ -4411,9 +4411,9 @@ void Scene210::step() {
 		}
 	}
 
-	if ((_twinkleAnimationType == 2) && _scene->_activeAnimation) {
-		if (_twinklesCurrentFrame != _scene->_activeAnimation->getCurrentFrame()) {
-			_twinklesCurrentFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_twinkleAnimationType == 2) && _scene->_animation[0]) {
+		if (_twinklesCurrentFrame != _scene->_animation[0]->getCurrentFrame()) {
+			_twinklesCurrentFrame = _scene->_animation[0]->getCurrentFrame();
 			int reset_frame = -1;
 
 			if (_twinklesCurrentFrame == 53) {
@@ -4422,8 +4422,8 @@ void Scene210::step() {
 			} else if ((_twinklesCurrentFrame == 75) && _shouldTalk)
 				reset_frame = 60;
 
-			if ((reset_frame >= 0) && (reset_frame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(reset_frame);
+			if ((reset_frame >= 0) && (reset_frame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(reset_frame);
 				_twinklesCurrentFrame = reset_frame;
 			}
 		}
@@ -4646,7 +4646,7 @@ void Scene211::enter() {
 		_game._player._stepEnabled = false;
 		_game._player._visible = false;
 		_scene->loadAnimation(formAnimName('A', -1), 100);
-		_scene->_activeAnimation->setCurrentFrame(169);
+		_scene->_animation[0]->setCurrentFrame(169);
 	} else if (_scene->_priorSceneId != RETURNING_FROM_DIALOG) {
 		_game._player._playerPos = Common::Point(310, 31);
 		_game._player._facing = FACING_SOUTHWEST;
@@ -4725,8 +4725,8 @@ void Scene211::step() {
 		}
 	}
 
-	if (_ambushFl && (_scene->_activeAnimation->getCurrentFrame() > _monkeyFrame)) {
-		_monkeyFrame = _scene->_activeAnimation->getCurrentFrame();
+	if (_ambushFl && (_scene->_animation[0]->getCurrentFrame() > _monkeyFrame)) {
+		_monkeyFrame = _scene->_animation[0]->getCurrentFrame();
 		switch (_monkeyFrame) {
 		case 2: {
 			int msgIndex = _scene->_kernelMessages.add(Common::Point(12, 4), 0xFDFC, 0, 0, 60, _game.getQuote(157));
@@ -4798,9 +4798,9 @@ void Scene211::step() {
 			_wakeFl = false;
 		}
 
-		if (_scene->_activeAnimation->getCurrentFrame() > _monkeyFrame) {
-			_monkeyFrame = _scene->_activeAnimation->getCurrentFrame();
-			switch (_scene->_activeAnimation->getCurrentFrame()) {
+		if (_scene->_animation[0]->getCurrentFrame() > _monkeyFrame) {
+			_monkeyFrame = _scene->_animation[0]->getCurrentFrame();
+			switch (_scene->_animation[0]->getCurrentFrame()) {
 			case 177: {
 				int msgIndex = _scene->_kernelMessages.add(Common::Point(63, _scrollY), 0x1110, 0, 0, 180, _game.getQuote(165));
 				_scene->_kernelMessages.setQuoted(msgIndex, 4, true);
diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp
index 5a6edbf..717dd85 100644
--- a/engines/mads/nebular/nebular_scenes3.cpp
+++ b/engines/mads/nebular/nebular_scenes3.cpp
@@ -293,8 +293,8 @@ void Scene302::step() {
 	if (_game._trigger == 71)
 		_scene->_nextSceneId = 303;
 
-	if ((_scene->_activeAnimation != nullptr) && (_scene->_activeAnimation->getCurrentFrame() != _oldFrame)) {
-		_oldFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_scene->_animation[0] != nullptr) && (_scene->_animation[0]->getCurrentFrame() != _oldFrame)) {
+		_oldFrame = _scene->_animation[0]->getCurrentFrame();
 		if (_oldFrame == 147) {
 			_game._objects.setRoom(OBJ_POISON_DARTS, 1);
 			_game._objects.setRoom(OBJ_BLOWGUN, 1);
@@ -828,23 +828,23 @@ void Scene307::enter() {
 void Scene307::step() {
 	handleForceField(&_forceField, &_globals._spriteIndexes[0]);
 
-	if ((_animationMode == 1) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() == 126) {
+	if ((_animationMode == 1) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() == 126) {
 			_forceField._flag = false;
 			_vm->_sound->command(5);
 		}
 
-		if (_scene->_activeAnimation->getCurrentFrame() == 194) {
+		if (_scene->_animation[0]->getCurrentFrame() == 194) {
 			_forceField._flag = true;
 			_vm->_sound->command(24);
 		}
 	}
 
-	if ((_animationMode == 2) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() == 54)
+	if ((_animationMode == 2) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() == 54)
 			_forceField._flag = false;
 
-		if (_scene->_activeAnimation->getCurrentFrame() == 150) {
+		if (_scene->_animation[0]->getCurrentFrame() == 150) {
 			_game._player._visible = false;
 			_game._player._priorTimer = _scene->_frameStartTime - _game._player._ticksAmount;
 		}
@@ -869,7 +869,7 @@ void Scene307::step() {
 		}
 		_lastFrameTime = _scene->_frameStartTime;
 
-		if ((_guardTime > 3000) && !_duringPeeingFl && (_scene->_activeAnimation == nullptr)
+		if ((_guardTime > 3000) && !_duringPeeingFl && (_scene->_animation[0] == nullptr)
 		&& (_game._screenObjects._inputMode != kInputConversation) && _globals[kMetBuddyBeast] && !_activePrisonerFl) {
 			if (!_game._objects.isInInventory(OBJ_SCALPEL) && !_grateOpenedFl) {
 				_game._player._stepEnabled = false;
@@ -879,7 +879,7 @@ void Scene307::step() {
 				_scene->loadAnimation(formAnimName('b', -1), 70);
 			}
 			_guardTime = 0;
-		} else if ((_prisonerTimer > 300) && (_game._screenObjects._inputMode != kInputConversation) && (_scene->_activeAnimation == nullptr) && !_activePrisonerFl) {
+		} else if ((_prisonerTimer > 300) && (_game._screenObjects._inputMode != kInputConversation) && (_scene->_animation[0] == nullptr) && !_activePrisonerFl) {
 			if (!_globals[kMetBuddyBeast]) {
 				int idx = _scene->_kernelMessages.add(Common::Point(5, 51), 0xFDFC, 0, 81, 120, _game.getQuote(_prisonerMessageId));
 				_scene->_kernelMessages.setQuoted(idx, 4, true);
@@ -1380,9 +1380,9 @@ void Scene309::enter() {
 	_game._player._stepEnabled = false;
 	_scene->loadAnimation(formAnimName('a', -1), 60);
 
-	_characterSpriteIndexes[0] = _scene->_activeAnimation->_spriteListIndexes[2];
-	_characterSpriteIndexes[1] = _scene->_activeAnimation->_spriteListIndexes[2];
-	_characterSpriteIndexes[2] = _scene->_activeAnimation->_spriteListIndexes[1];
+	_characterSpriteIndexes[0] = _scene->_animation[0]->_spriteListIndexes[2];
+	_characterSpriteIndexes[1] = _scene->_animation[0]->_spriteListIndexes[2];
+	_characterSpriteIndexes[2] = _scene->_animation[0]->_spriteListIndexes[1];
 
 	_messagesIndexes[0] = -1;
 	_messagesIndexes[1] = -1;
@@ -1404,9 +1404,9 @@ void Scene309::step() {
 	if (_game._trigger == 62)
 		_messagesIndexes[2] = -1;
 
-	if (_scene->_activeAnimation != nullptr) {
-		if (_lastFrame != _scene->_activeAnimation->getCurrentFrame()) {
-			_lastFrame = _scene->_activeAnimation->getCurrentFrame();
+	if (_scene->_animation[0] != nullptr) {
+		if (_lastFrame != _scene->_animation[0]->getCurrentFrame()) {
+			_lastFrame = _scene->_animation[0]->getCurrentFrame();
 			if (_lastFrame == 39) {
 				_messagesIndexes[0] = _scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 32, 61, 210, _game.getQuote(348));
 				_messagesIndexes[1] = _scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 32, 0, 210, _game.getQuote(349));
@@ -1419,15 +1419,15 @@ void Scene309::step() {
 				if (_messagesIndexes[charIdx] >= 0) {
 					bool match = false;
 					int j = -1;
-					for (j = _scene->_activeAnimation->_oldFrameEntry; j < _scene->_activeAnimation->_header._frameEntriesCount; j++) {
-						if (_scene->_activeAnimation->_frameEntries[j]._spriteSlot._spritesIndex == _characterSpriteIndexes[charIdx]) {
+					for (j = _scene->_animation[0]->_oldFrameEntry; j < _scene->_animation[0]->_header._frameEntriesCount; j++) {
+						if (_scene->_animation[0]->_frameEntries[j]._spriteSlot._spritesIndex == _characterSpriteIndexes[charIdx]) {
 							match = true;
 							break;
 						}
 					}
 
 					if (match) {
-						SpriteSlotSubset *curSpriteSlot = &_scene->_activeAnimation->_frameEntries[j]._spriteSlot;
+						SpriteSlotSubset *curSpriteSlot = &_scene->_animation[0]->_frameEntries[j]._spriteSlot;
 						_scene->_kernelMessages._entries[_messagesIndexes[charIdx]]._position.x = curSpriteSlot->_position.x;
 						_scene->_kernelMessages._entries[_messagesIndexes[charIdx]]._position.y = curSpriteSlot->_position.y - (50 + (14 * ((charIdx == 0) ? 2 : 1)));
 					}
@@ -2602,7 +2602,7 @@ void Scene318::enter() {
 
 	if (_globals[kAfterHavoc]) {
 		_scene->loadAnimation(formAnimName('f', -1));
-		_scene->_activeAnimation->_resetFlag = true;
+		_scene->_animation[0]->_resetFlag = true;
 	} else if (!_globals[kHasSeenProfPyro]) {
 		_scene->_hotspots.activate(NOUN_PROFESSORS_GURNEY, false);
 		_scene->_hotspots.activate(NOUN_PROFESSOR, false);
@@ -2705,9 +2705,9 @@ void Scene318::enter() {
 }
 
 void Scene318::step() {
-	if ((_scene->_activeAnimation != nullptr) && (_animMode == 2)) {
-		if (_lastFrame != _scene->_activeAnimation->getCurrentFrame()) {
-			_lastFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_scene->_animation[0] != nullptr) && (_animMode == 2)) {
+		if (_lastFrame != _scene->_animation[0]->getCurrentFrame()) {
+			_lastFrame = _scene->_animation[0]->getCurrentFrame();
 			int nextFrame = -1;
 
 			switch (_lastFrame) {
@@ -2759,8 +2759,8 @@ void Scene318::step() {
 				break;
 			}
 
-			if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(nextFrame);
+			if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(nextFrame);
 				_lastFrame = nextFrame;
 			}
 		}
@@ -3185,11 +3185,11 @@ void Scene319::enter() {
 }
 
 void Scene319::step() {
-	if (_scene->_activeAnimation == nullptr)
+	if (_scene->_animation[0] == nullptr)
 		return;
 
-	if (_animFrame != _scene->_activeAnimation->getCurrentFrame()) {
-		_animFrame = _scene->_activeAnimation->getCurrentFrame();
+	if (_animFrame != _scene->_animation[0]->getCurrentFrame()) {
+		_animFrame = _scene->_animation[0]->getCurrentFrame();
 		int nextFrame = -1;
 		if (_animMode == 1) {
 			switch (_animFrame) {
@@ -3305,8 +3305,8 @@ void Scene319::step() {
 		if ((_animMode == 4) && (_animFrame == 16))
 			_vm->_screen._shakeCountdown = 80;
 
-		if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
-			_scene->_activeAnimation->setCurrentFrame(nextFrame);
+		if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+			_scene->_animation[0]->setCurrentFrame(nextFrame);
 			_animFrame = nextFrame;
 		}
 	}
@@ -3320,11 +3320,11 @@ void Scene319::step() {
 		_scene->freeAnimation();
 		_scene->loadAnimation(formAnimName('b', 0));
 		if (_nextAction1 == 3)
-			_scene->_activeAnimation->setCurrentFrame(85);
+			_scene->_animation[0]->setCurrentFrame(85);
 		else if (_nextAction1 == 1)
-			_scene->_activeAnimation->setCurrentFrame(40);
+			_scene->_animation[0]->setCurrentFrame(40);
 
-		_animFrame = _scene->_activeAnimation->getCurrentFrame();
+		_animFrame = _scene->_animation[0]->getCurrentFrame();
 		_slacheTalkingFl = true;
 		_vm->_screen._shakeCountdown = 1;
 
@@ -3710,9 +3710,9 @@ void Scene320::enter() {
 }
 
 void Scene320::step() {
-	if (_scene->_activeAnimation != nullptr) {
-		if (_lastFrame != _scene->_activeAnimation->getCurrentFrame()) {
-			_lastFrame = _scene->_activeAnimation->getCurrentFrame();
+	if (_scene->_animation[0] != nullptr) {
+		if (_lastFrame != _scene->_animation[0]->getCurrentFrame()) {
+			_lastFrame = _scene->_animation[0]->getCurrentFrame();
 			switch (_lastFrame) {
 			case 95:
 				_blinkFl = true;
@@ -3892,8 +3892,8 @@ void Scene321::enter() {
 }
 
 void Scene321::step() {
-	if (_scene->_activeAnimation != nullptr) {
-		if ((_scene->_activeAnimation->getCurrentFrame() >= 260) && (_globals[kSexOfRex] == REX_MALE) && (_game._storyMode >= STORYMODE_NICE))
+	if (_scene->_animation[0] != nullptr) {
+		if ((_scene->_animation[0]->getCurrentFrame() >= 260) && (_globals[kSexOfRex] == REX_MALE) && (_game._storyMode >= STORYMODE_NICE))
 			_scene->_nextSceneId = 316;
 	}
 
diff --git a/engines/mads/nebular/nebular_scenes4.cpp b/engines/mads/nebular/nebular_scenes4.cpp
index c981f6a..19e1fc7 100644
--- a/engines/mads/nebular/nebular_scenes4.cpp
+++ b/engines/mads/nebular/nebular_scenes4.cpp
@@ -876,7 +876,7 @@ void Scene402::enter() {
 	_refuseAlienLiquor = false;
 
 	_scene->loadAnimation(Resources::formatName(402, 'd', 1, EXT_AA, ""));
-	_scene->_activeAnimation->_resetFlag = true;
+	_scene->_animation[0]->_resetFlag = true;
 
 	_globals._sequenceIndexes[5] = _scene->_sequences.startCycle(_globals._spriteIndexes[5], false, 1);
 	_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 1);
@@ -1536,43 +1536,43 @@ void Scene402::step() {
 	if (_game._trigger == 32)
 		_rightWomanMoving = false;
 
-	if (_scene->_activeAnimation->getCurrentFrame() == 1) {
+	if (_scene->_animation[0]->getCurrentFrame() == 1) {
 		switch (_vm->getRandomNumber(1, 50)) {
 		case 1:
-			_scene->_activeAnimation->setCurrentFrame(2);
+			_scene->_animation[0]->setCurrentFrame(2);
 			break;
 
 		case 2:
-			_scene->_activeAnimation->setCurrentFrame(7);
+			_scene->_animation[0]->setCurrentFrame(7);
 			break;
 
 		case 3:
-			_scene->_activeAnimation->setCurrentFrame(11);
+			_scene->_animation[0]->setCurrentFrame(11);
 			break;
 
 		default:
-			_scene->_activeAnimation->setCurrentFrame(0);
+			_scene->_animation[0]->setCurrentFrame(0);
 			break;
 		}
 	}
 
-	if ((_scene->_activeAnimation->getCurrentFrame() == 4) && (_drinkTimer < 10)) {
+	if ((_scene->_animation[0]->getCurrentFrame() == 4) && (_drinkTimer < 10)) {
 		++ _drinkTimer;
-		_scene->_activeAnimation->setCurrentFrame(3);
+		_scene->_animation[0]->setCurrentFrame(3);
 	}
 
 	if (_drinkTimer == 10) {
 		_drinkTimer = 0;
-		_scene->_activeAnimation->setCurrentFrame(4);
-		_scene->_activeAnimation->_currentFrame = 5;
+		_scene->_animation[0]->setCurrentFrame(4);
+		_scene->_animation[0]->_currentFrame = 5;
 	}
 
 
-	switch (_scene->_activeAnimation->getCurrentFrame()) {
+	switch (_scene->_animation[0]->getCurrentFrame()) {
 	case 6:
 	case 10:
 	case 14:
-		_scene->_activeAnimation->setCurrentFrame(0);
+		_scene->_animation[0]->setCurrentFrame(0);
 		break;
 
 	default:
@@ -3126,36 +3126,36 @@ void Scene410::enter() {
 	sceneEntrySound();
 
 	_scene->loadAnimation(Resources::formatName(410, 'r', -1, EXT_AA, ""));
-	_scene->_activeAnimation->_resetFlag = true;
+	_scene->_animation[0]->_resetFlag = true;
 }
 
 void Scene410::step() {
-	if (_scene->_activeAnimation->getCurrentFrame() == 1) {
+	if (_scene->_animation[0]->getCurrentFrame() == 1) {
 		if (_vm->getRandomNumber(1, 30) == 1)
-			_scene->_activeAnimation->setCurrentFrame(2);
+			_scene->_animation[0]->setCurrentFrame(2);
 		else
-			_scene->_activeAnimation->setCurrentFrame(0);
+			_scene->_animation[0]->setCurrentFrame(0);
 	}
 
-	if (_scene->_activeAnimation->getCurrentFrame() == 9) {
+	if (_scene->_animation[0]->getCurrentFrame() == 9) {
 		if (_vm->getRandomNumber(1, 30) == 1)
-			_scene->_activeAnimation->setCurrentFrame(10);
+			_scene->_animation[0]->setCurrentFrame(10);
 		else
-			_scene->_activeAnimation->setCurrentFrame(8);
+			_scene->_animation[0]->setCurrentFrame(8);
 	}
 
-	if (_scene->_activeAnimation->getCurrentFrame() == 5) {
+	if (_scene->_animation[0]->getCurrentFrame() == 5) {
 		if (_vm->getRandomNumber(1, 30) == 1)
-			_scene->_activeAnimation->setCurrentFrame(6);
+			_scene->_animation[0]->setCurrentFrame(6);
 		else
-			_scene->_activeAnimation->setCurrentFrame(4);
+			_scene->_animation[0]->setCurrentFrame(4);
 	}
 
-	if (_scene->_activeAnimation->getCurrentFrame() == 3) {
+	if (_scene->_animation[0]->getCurrentFrame() == 3) {
 		if (_vm->getRandomNumber(1, 2) == 1)
-			_scene->_activeAnimation->setCurrentFrame(4);
+			_scene->_animation[0]->setCurrentFrame(4);
 		else // == 2
-			_scene->_activeAnimation->setCurrentFrame(8);
+			_scene->_animation[0]->setCurrentFrame(8);
 	}
 }
 
@@ -3491,7 +3491,7 @@ void Scene411::handleDialog() {
 			_game._player._priorTimer = _scene->_frameStartTime + _game._player._ticksAmount;
 			_game._player._visible = false;
 			_game._player._stepEnabled = false;
-			_scene->_activeAnimation->setCurrentFrame(_resetFrame);
+			_scene->_animation[0]->setCurrentFrame(_resetFrame);
 		}
 		_scene->_kernelMessages.reset();
 		_newQuantity = computeQuoteAndQuantity();
@@ -3661,16 +3661,16 @@ void Scene411::enter() {
 	}
 
 	_scene->loadAnimation(formAnimName('a', -1));
-	_scene->_activeAnimation->setCurrentFrame(128);
+	_scene->_animation[0]->setCurrentFrame(128);
 
 	_makeMushroomCloud = false;
 	_killRox = false;
 }
 
 void Scene411::step() {
-	if (_scene->_activeAnimation != nullptr) {
-		if (_curAnimationFrame != _scene->_activeAnimation->getCurrentFrame()) {
-			_curAnimationFrame = _scene->_activeAnimation->getCurrentFrame();
+	if (_scene->_animation[0] != nullptr) {
+		if (_curAnimationFrame != _scene->_animation[0]->getCurrentFrame()) {
+			_curAnimationFrame = _scene->_animation[0]->getCurrentFrame();
 			_resetFrame = -1;
 
 			switch (_curAnimationFrame) {
@@ -3738,14 +3738,14 @@ void Scene411::step() {
 				break;
 			}
 
-			if ((_resetFrame >= 0) && (_resetFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(_resetFrame);
+			if ((_resetFrame >= 0) && (_resetFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(_resetFrame);
 				_curAnimationFrame = _resetFrame;
 			}
 		}
 	}
 
-	if (_scene->_activeAnimation->getCurrentFrame() == 86)
+	if (_scene->_animation[0]->getCurrentFrame() == 86)
 		_vm->_sound->command(59);
 }
 
@@ -4113,10 +4113,10 @@ void Scene413::enter() {
 }
 
 void Scene413::step() {
-	if (_scene->_activeAnimation && _scene->_activeAnimation->getCurrentFrame() == 38)
-		_scene->_activeAnimation->setCurrentFrame(37);
+	if (_scene->_animation[0] && _scene->_animation[0]->getCurrentFrame() == 38)
+		_scene->_animation[0]->setCurrentFrame(37);
 
-	if (_scene->_activeAnimation && _scene->_activeAnimation->getCurrentFrame() == 21 && _canMove) {
+	if (_scene->_animation[0] && _scene->_animation[0]->getCurrentFrame() == 21 && _canMove) {
 		_vm->_sound->command(27);
 		_canMove = false;
 	}
diff --git a/engines/mads/nebular/nebular_scenes5.cpp b/engines/mads/nebular/nebular_scenes5.cpp
index 95eb429..092ddeb 100644
--- a/engines/mads/nebular/nebular_scenes5.cpp
+++ b/engines/mads/nebular/nebular_scenes5.cpp
@@ -722,9 +722,9 @@ void Scene504::enter() {
 }
 
 void Scene504::step() {
-	if ((_carAnimationMode == 1) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
-			_carFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_carAnimationMode == 1) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+			_carFrame = _scene->_animation[0]->getCurrentFrame();
 			int nextFrame;
 
 			if (_carFrame == 1)
@@ -732,8 +732,8 @@ void Scene504::step() {
 			else
 				nextFrame = -1;
 
-			if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(nextFrame);
+			if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(nextFrame);
 				_carFrame = nextFrame;
 			}
 		}
@@ -943,15 +943,15 @@ void Scene505::enter() {
 	_game._player._stepEnabled = false;
 	_frame = -1;
 	_scene->loadAnimation(formAnimName('a', -1));
-	_scene->_activeAnimation->setCurrentFrame(86);
+	_scene->_animation[0]->setCurrentFrame(86);
 
 	sceneEntrySound();
 	_vm->_sound->command(16);
 }
 
 void Scene505::step() {
-	if (_frame != _scene->_activeAnimation->getCurrentFrame()) {
-		_frame = _scene->_activeAnimation->getCurrentFrame();
+	if (_frame != _scene->_animation[0]->getCurrentFrame()) {
+		_frame = _scene->_animation[0]->getCurrentFrame();
 		int resetFrame = -1;
 
 		switch (_frame) {
@@ -1088,8 +1088,8 @@ void Scene505::step() {
 			break;
 		}
 
-		if ((resetFrame >= 0) && (resetFrame != _scene->_activeAnimation->getCurrentFrame())) {
-			_scene->_activeAnimation->setCurrentFrame(resetFrame);
+		if ((resetFrame >= 0) && (resetFrame != _scene->_animation[0]->getCurrentFrame())) {
+			_scene->_animation[0]->setCurrentFrame(resetFrame);
 			_frame = resetFrame;
 		}
 	}
@@ -1254,7 +1254,7 @@ void Scene506::step() {
 		switch (_game._trigger) {
 		case 70:
 			_game._player._visible = true;
-			_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+			_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 			_scene->_sequences.addTimer(6, 71);
 			break;
 
@@ -1943,9 +1943,9 @@ void Scene511::enter() {
 }
 
 void Scene511::step() {
-	if ((_lineAnimationMode == 1) && _scene->_activeAnimation) {
-		if (_lineFrame != _scene->_activeAnimation->getCurrentFrame()) {
-			_lineFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_lineAnimationMode == 1) && _scene->_animation[0]) {
+		if (_lineFrame != _scene->_animation[0]->getCurrentFrame()) {
+			_lineFrame = _scene->_animation[0]->getCurrentFrame();
 			int resetFrame = -1;
 
 			if ((_lineAnimationPosition == 2) && (_lineFrame == 14))
@@ -1961,8 +1961,8 @@ void Scene511::step() {
 					resetFrame = 2;
 			}
 
-			if ((resetFrame >= 0) && (resetFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(resetFrame);
+			if ((resetFrame >= 0) && (resetFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(resetFrame);
 				_lineFrame = resetFrame;
 			}
 		}
@@ -1971,7 +1971,7 @@ void Scene511::step() {
 	switch (_game._trigger) {
 	case 70:
 		_game._player._visible = true;
-		_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+		_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 		_scene->_sequences.addTimer(6, 71);
 		break;
 
@@ -2009,7 +2009,7 @@ void Scene511::preActions() {
 			_scene->loadAnimation(formAnimName('R',2), 1);
 		} else if (_game._trigger == 1) {
 			_game._player._visible = true;
-			_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+			_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 			_game._objects.setRoom(OBJ_FISHING_LINE, 1);
 			_handingLine = false;
 			_game._player._stepEnabled = true;
@@ -2118,8 +2118,8 @@ void Scene511::actions() {
 						_globals[kLineStatus] = 3;
 						_game._player._stepEnabled = true;
 
-						if (_scene->_activeAnimation)
-							_scene->_activeAnimation->eraseSprites();
+						if (_scene->_animation[0])
+							_scene->_animation[0]->eraseSprites();
 						_game._player.update();
 					}
 				}
@@ -2434,8 +2434,8 @@ void Scene512::actions() {
 		_vm->_dialogs->show(51225);
 	else if (_action.isAction(VERB_LOOK, NOUN_PADLOCK_KEY) && _game._objects.isInRoom(OBJ_PADLOCK_KEY))
 		_vm->_dialogs->show(51215);
-	else if (_action.isAction(VERB_LOOK, NOUN_FISHING_ROD) && (!_scene->_activeAnimation ||
-			_scene->_activeAnimation->getCurrentFrame() == 4))
+	else if (_action.isAction(VERB_LOOK, NOUN_FISHING_ROD) && (!_scene->_animation[0] ||
+			_scene->_animation[0]->getCurrentFrame() == 4))
 		_vm->_dialogs->show(51216);
 	else if (_action.isAction(VERB_LOOK, NOUN_SHIPS_WHEEL))
 		_vm->_dialogs->show(51218);
@@ -2570,7 +2570,7 @@ void Scene513::step() {
 	switch (_game._trigger) {
 	case 70:
 		_game._player._visible = true;
-		_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+		_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 		_scene->_sequences.addTimer(6, 71);
 		break;
 
diff --git a/engines/mads/nebular/nebular_scenes6.cpp b/engines/mads/nebular/nebular_scenes6.cpp
index d97e37e..5b7dae4 100644
--- a/engines/mads/nebular/nebular_scenes6.cpp
+++ b/engines/mads/nebular/nebular_scenes6.cpp
@@ -124,7 +124,7 @@ void Scene601::step() {
 	switch (_game._trigger) {
 	case 70:
 		_game._player._visible = true;
-		_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+		_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 		_scene->_sequences.addTimer(30, 71);
 		break;
 
@@ -431,7 +431,7 @@ void Scene602::actions() {
 
 		case 1: {
 			_game._player._visible = true;
-			_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+			_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 			_lastSpriteIdx = _globals._spriteIndexes[3];
 			_lastSequenceIdx = _scene->_sequences.startCycle(_lastSpriteIdx, false, -1);
 			_scene->_sequences.setDepth(_lastSequenceIdx, 14);
@@ -775,7 +775,7 @@ void Scene604::step() {
 	switch (_game._trigger) {
 	case 70:
 		_game._player._visible = true;
-		_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+		_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 		_scene->_sequences.addTimer(30, 71);
 		break;
 
@@ -797,9 +797,9 @@ void Scene604::step() {
 		break;
 	}
 
-	if (_monsterActive && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _monsterFrame) {
-			_monsterFrame = _scene->_activeAnimation->getCurrentFrame();
+	if (_monsterActive && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _monsterFrame) {
+			_monsterFrame = _scene->_animation[0]->getCurrentFrame();
 			int nextMonsterFrame = -1;
 
 			switch (_monsterFrame) {
@@ -837,7 +837,7 @@ void Scene604::step() {
 			}
 
 			if ((nextMonsterFrame >= 0) && (nextMonsterFrame != _monsterFrame)) {
-				_scene->_activeAnimation->setCurrentFrame(nextMonsterFrame);
+				_scene->_animation[0]->setCurrentFrame(nextMonsterFrame);
 				_monsterFrame = nextMonsterFrame;
 			}
 		}
@@ -1297,7 +1297,7 @@ void Scene607::step() {
 	switch (_game._trigger) {
 	case 80:
 		_game._player._visible = true;
-		_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+		_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 		_scene->_sequences.addTimer(6, 81);
 		break;
 
@@ -1331,7 +1331,7 @@ void Scene607::handleThrowingBone() {
 
 	case 1:
 		_game._player._visible = true;
-		_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+		_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 
 		if (_animationMode != 1)
 			_scene->_hotspots.activate(NOUN_OBNOXIOUS_DOG, false);
@@ -1605,7 +1605,7 @@ void Scene608::restoreAnimations() {
 		_scene->_sequences.remove(_globals._sequenceIndexes[6]);
 		_scene->_sequences.remove(_globals._sequenceIndexes[7]);
 		_scene->loadAnimation(formAnimName('A', -1));
-		_scene->_activeAnimation->setCurrentFrame(6);
+		_scene->_animation[0]->setCurrentFrame(6);
 	}
 }
 
@@ -1757,7 +1757,7 @@ void Scene608::enter() {
 		int idx = _scene->_dynamicHotspots.add(NOUN_CAR, VERB_WALKTO, -1, Common::Rect(100, 100, 100 + 82, 100 + 25));
 		_carHotspotId = _scene->_dynamicHotspots.setPosition(idx, Common::Point(96, 132), FACING_NORTHEAST);
 		_scene->loadAnimation(formAnimName('A', -1));
-		_scene->_activeAnimation->setCurrentFrame(6);
+		_scene->_animation[0]->setCurrentFrame(6);
 	} else if (_globals[kCarStatus] == CAR_SQUASHES_DOG) {
 		_carMode = 2;
 		_dogDeathMode = 0;
@@ -1927,13 +1927,13 @@ void Scene608::step() {
 		_animationMode = 0;
 	}
 
-	if ((_carMode == 4) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
-			_carFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_carMode == 4) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+			_carFrame = _scene->_animation[0]->getCurrentFrame();
 
 			if (_carFrame == 10) {
 				_game._player._visible = true;
-				_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+				_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 			} else if (_carFrame == 56) {
 				resetDogVariables();
 				_animationMode = 0;
@@ -1942,12 +1942,12 @@ void Scene608::step() {
 		}
 	}
 
-	if ((_carMode == 5) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
-			_carFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_carMode == 5) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+			_carFrame = _scene->_animation[0]->getCurrentFrame();
 			if (_carFrame == 10) {
 				_game._player._visible = true;
-				_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+				_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 			} else if (_carFrame == 52) {
 				resetDogVariables();
 				_animationMode = 0;
@@ -1956,13 +1956,13 @@ void Scene608::step() {
 		}
 	}
 
-	if ((_carMode == 6) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
-			_carFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_carMode == 6) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+			_carFrame = _scene->_animation[0]->getCurrentFrame();
 
 			if (_carFrame == 11) {
 				_game._player._visible = true;
-				_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+				_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 			} else if (_carFrame == 41) {
 				_globals._sequenceIndexes[10] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[10], false, 9, 0, 0, 0);
 				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 10, 11);
@@ -2000,9 +2000,9 @@ void Scene608::step() {
 	if (_game._trigger == 112)
 		_dogYelping = false;
 
-	if ((_carMode == 0) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
-			_carFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_carMode == 0) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+			_carFrame = _scene->_animation[0]->getCurrentFrame();
 			int nextFrame = -1;
 
 			if ((_globals[kCarStatus] == CAR_UP) || (_globals[kCarStatus] == CAR_DOWN)) {
@@ -2015,7 +2015,7 @@ void Scene608::step() {
 					break;
 
 				case 1:
-					if (_scene->_activeAnimation->getCurrentFrame() >= 12) {
+					if (_scene->_animation[0]->getCurrentFrame() >= 12) {
 						nextFrame = 0;
 						_carMoveMode = 0;
 						_globals[kCarStatus] = CAR_UP;
@@ -2023,7 +2023,7 @@ void Scene608::step() {
 					break;
 
 				case 2:
-					if (_scene->_activeAnimation->getCurrentFrame() >= 6) {
+					if (_scene->_animation[0]->getCurrentFrame() >= 6) {
 						nextFrame = 6;
 						_carMoveMode = 0;
 						_globals[kCarStatus] = CAR_DOWN;
@@ -2035,35 +2035,35 @@ void Scene608::step() {
 				}
 			}
 
-			if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(nextFrame);
+			if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(nextFrame);
 				_carFrame = nextFrame;
 			}
 		}
 	}
 
-	if ((_carMode == 2) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
-			_carFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_carMode == 2) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+			_carFrame = _scene->_animation[0]->getCurrentFrame();
 			int nextFrame = -1;
 
 			if (_carMoveMode == 0)
 				nextFrame = 28;
-			else if (_scene->_activeAnimation->getCurrentFrame() >= 28) {
+			else if (_scene->_animation[0]->getCurrentFrame() >= 28) {
 				nextFrame = 28;
 				_carMoveMode = 0;
 			}
 
-			if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(nextFrame);
+			if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(nextFrame);
 				_carFrame = nextFrame;
 			}
 		}
 	}
 
-	if ((_carMode == 3) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
-			_carFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_carMode == 3) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+			_carFrame = _scene->_animation[0]->getCurrentFrame();
 			int nextFrame = -1;
 
 			if (_resetPositionsFl) {
@@ -2071,22 +2071,22 @@ void Scene608::step() {
 				_carMoveMode = 0;
 			} else if (_carMoveMode == 0)
 				nextFrame = 6;
-			else if (_scene->_activeAnimation->getCurrentFrame() >= 6) {
+			else if (_scene->_animation[0]->getCurrentFrame() >= 6) {
 				nextFrame = 6;
 				_carMoveMode = 0;
 			}
 
-			if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(nextFrame);
+			if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(nextFrame);
 				_carFrame = nextFrame;
 			}
 		}
 	}
 
 
-	if ((_carMode == 1) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _carFrame) {
-			_carFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_carMode == 1) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _carFrame) {
+			_carFrame = _scene->_animation[0]->getCurrentFrame();
 			int nextFrame = -1;
 
 			if (_resetPositionsFl) {
@@ -2094,13 +2094,13 @@ void Scene608::step() {
 				_carMoveMode = 0;
 			} else if (_carMoveMode == 0)
 				nextFrame = 6;
-			else if (_scene->_activeAnimation->getCurrentFrame() >= 6) {
+			else if (_scene->_animation[0]->getCurrentFrame() >= 6) {
 				nextFrame = 6;
 				_carMoveMode = 0;
 			}
 
-			if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(nextFrame);
+			if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(nextFrame);
 				_carFrame = nextFrame;
 			}
 		}
@@ -2605,7 +2605,7 @@ void Scene609::step() {
 	switch (_game._trigger) {
 	case 70:
 		_game._player._visible = true;
-		_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+		_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 		_scene->_sequences.addTimer(6, 71);
 		break;
 
@@ -4145,13 +4145,13 @@ void Scene611::step() {
 			_hermitMovingFl = true;
 	}
 
-	if (_stickFingerFl && (_scene->_activeAnimation->getCurrentFrame() == 47)) {
+	if (_stickFingerFl && (_scene->_animation[0]->getCurrentFrame() == 47)) {
 		_stickFingerFl = false;
 		_hermitMovingFl = true;
 		_hermitMode = 1;
 	}
 
-	if (_scene->_activeAnimation != nullptr && (_scene->_activeAnimation->getCurrentFrame() == 240) && _check1Fl) {
+	if (_scene->_animation[0] != nullptr && (_scene->_animation[0]->getCurrentFrame() == 240) && _check1Fl) {
 		_check1Fl = false;
 		_scene->_kernelMessages.add(Common::Point(33, 88), 0xFDFC, 0, 0, 90, _game.getQuote(0x27E));
 		_scene->_sequences.addTimer(120, 120);
@@ -4240,7 +4240,7 @@ void Scene611::step() {
 		}
 	}
 
-	if (_scene->_activeAnimation != nullptr && _scene->_activeAnimation->getCurrentFrame() == 254)
+	if (_scene->_animation[0] != nullptr && _scene->_animation[0]->getCurrentFrame() == 254)
 		_game._player._stepEnabled = true;
 
 	if (_game._trigger == 110) {
@@ -4266,7 +4266,7 @@ void Scene611::step() {
 	}
 
 	if (_hermitMode == 6) {
-		if ((_scene->_activeAnimation->getCurrentFrame() == 9) && _check1Fl) {
+		if ((_scene->_animation[0]->getCurrentFrame() == 9) && _check1Fl) {
 			_scene->_sequences.remove(_globals._sequenceIndexes[3]);
 			_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 7, 1, 0, 0);
 			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 2);
@@ -4275,7 +4275,7 @@ void Scene611::step() {
 			_check1Fl = false;
 		}
 
-		if ((_scene->_activeAnimation->getCurrentFrame() == 17) && !_check1Fl) {
+		if ((_scene->_animation[0]->getCurrentFrame() == 17) && !_check1Fl) {
 			_nextFrame = 26;
 			_hermitMode = 4;
 			_check1Fl = true;
@@ -4283,13 +4283,13 @@ void Scene611::step() {
 	}
 
 	if (_hermitMode == 4) {
-		if ((_scene->_activeAnimation->getCurrentFrame() == 33) && _check1Fl) {
+		if ((_scene->_animation[0]->getCurrentFrame() == 33) && _check1Fl) {
 			displayHermitQuestions(_hermitDisplayedQuestion);
 			_nextFrame = 1;
 			_check1Fl = false;
 		}
 
-		if ((_scene->_activeAnimation->getCurrentFrame() == 9) && !_check1Fl) {
+		if ((_scene->_animation[0]->getCurrentFrame() == 9) && !_check1Fl) {
 			_nextFrame = 8;
 			_scene->_sequences.addTimer(1, 113);
 			_check1Fl = true;
@@ -4315,8 +4315,8 @@ void Scene611::step() {
 		_scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 115);
 	}
 
-	if ((_nextFrame >= 0) && (_nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
-		_scene->_activeAnimation->setCurrentFrame(_nextFrame);
+	if ((_nextFrame >= 0) && (_nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+		_scene->_animation[0]->setCurrentFrame(_nextFrame);
 		_nextFrame = -1;
 	}
 
@@ -4588,7 +4588,7 @@ void Scene612::step() {
 	switch (_game._trigger) {
 	case 70:
 		_game._player._visible = true;
-		_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+		_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 		_scene->_sequences.addTimer(6, 71);
 		break;
 
diff --git a/engines/mads/nebular/nebular_scenes7.cpp b/engines/mads/nebular/nebular_scenes7.cpp
index c2a249e..58280a7 100644
--- a/engines/mads/nebular/nebular_scenes7.cpp
+++ b/engines/mads/nebular/nebular_scenes7.cpp
@@ -361,7 +361,7 @@ void Scene701::actions() {
 
 			case 1: {
 				_game._player._visible = true;
-				_game._player._priorTimer = _scene->_activeAnimation->getNextFrameTimer() - _game._player._ticksAmount;
+				_game._player._priorTimer = _scene->_animation[0]->getNextFrameTimer() - _game._player._ticksAmount;
 				_globals._sequenceIndexes[2] = _scene->_sequences.startCycle(_globals._spriteIndexes[2], false, -1);
 				_scene->_sequences.setDepth (_globals._sequenceIndexes[2], 9);
 				int idx = _scene->_dynamicHotspots.add(NOUN_BOAT, VERB_CLIMB_INTO, _globals._sequenceIndexes[2], Common::Rect(0, 0, 0, 0));
@@ -694,7 +694,7 @@ void Scene703::enter() {
 		_boatDir = 2;
 		_monsterMode = 0;
 		_scene->loadAnimation(formAnimName('A', -1));
-		_scene->_activeAnimation->setCurrentFrame(34);
+		_scene->_animation[0]->setCurrentFrame(34);
 	} else if (_scene->_priorSceneId != RETURNING_FROM_DIALOG) {
 		_game._player._stepEnabled = false;
 		_boatDir = 1;
@@ -712,17 +712,17 @@ void Scene703::enter() {
 		_boatDir = 1;
 		_monsterMode = 1;
 		_scene->loadAnimation(formAnimName('B', -1));
-		_scene->_activeAnimation->setCurrentFrame(39);
+		_scene->_animation[0]->setCurrentFrame(39);
 	} else if (_boatDir == 1) {
 		_curSequence = 0;
 		_monsterMode = 0;
 		_scene->loadAnimation(formAnimName('A', -1));
-		_scene->_activeAnimation->setCurrentFrame(9);
+		_scene->_animation[0]->setCurrentFrame(9);
 	} else if (_boatDir == 2) {
 		_curSequence = 0;
 		_monsterMode = 0;
 		_scene->loadAnimation(formAnimName('A', -1));
-		_scene->_activeAnimation->setCurrentFrame(56);
+		_scene->_animation[0]->setCurrentFrame(56);
 	}
 
 	if (_scene->_roomChanged) {
@@ -764,9 +764,9 @@ void Scene703::step() {
 	if (_game._trigger == 70)
 		_scene->_reloadSceneFlag = true;
 
-	if ((_monsterMode == 3) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _boatFrame) {
-			_boatFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_monsterMode == 3) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _boatFrame) {
+			_boatFrame = _scene->_animation[0]->getCurrentFrame();
 			int nextBoatFrame = -1;
 
 			if (_boatFrame == 62) {
@@ -777,8 +777,8 @@ void Scene703::step() {
 				}
 			}
 
-			if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(nextBoatFrame);
+			if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(nextBoatFrame);
 				_boatFrame = nextBoatFrame;
 			}
 		}
@@ -787,9 +787,9 @@ void Scene703::step() {
 	if (_game._trigger == 70)
 		_scene->_reloadSceneFlag = true;
 
-	if ((_monsterMode == 0) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _boatFrame) {
-			_boatFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_monsterMode == 0) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _boatFrame) {
+			_boatFrame = _scene->_animation[0]->getCurrentFrame();
 			int nextBoatFrame = -1;
 
 			switch (_boatFrame) {
@@ -860,8 +860,8 @@ void Scene703::step() {
 				break;
 			}
 
-			if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(nextBoatFrame);
+			if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(nextBoatFrame);
 				_boatFrame = nextBoatFrame;
 			}
 		}
@@ -895,9 +895,9 @@ void Scene703::step() {
 	}
 
 
-	if ((_monsterMode == 1) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _boatFrame) {
-			_boatFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_monsterMode == 1) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _boatFrame) {
+			_boatFrame = _scene->_animation[0]->getCurrentFrame();
 			int nextBoatFrame = -1;
 
 			switch (_boatFrame) {
@@ -934,16 +934,16 @@ void Scene703::step() {
 				break;
 			}
 
-			if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(nextBoatFrame);
+			if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(nextBoatFrame);
 				_boatFrame = nextBoatFrame;
 			}
 		}
 	}
 
-	if ((_monsterMode == 2) && (_scene->_activeAnimation != nullptr)) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _boatFrame) {
-			_boatFrame = _scene->_activeAnimation->getCurrentFrame();
+	if ((_monsterMode == 2) && (_scene->_animation[0] != nullptr)) {
+		if (_scene->_animation[0]->getCurrentFrame() != _boatFrame) {
+			_boatFrame = _scene->_animation[0]->getCurrentFrame();
 			int nextBoatFrame = -1;
 
 			switch (_boatFrame) {
@@ -983,7 +983,7 @@ void Scene703::step() {
 				_scene->freeAnimation();
 				_monsterMode = 1;
 				_scene->loadAnimation(formAnimName('B', -1));
-				_scene->_activeAnimation->setCurrentFrame(39);
+				_scene->_animation[0]->setCurrentFrame(39);
 				_game._player._stepEnabled = true;
 				break;
 
@@ -992,7 +992,7 @@ void Scene703::step() {
 					_scene->freeAnimation();
 					_monsterMode = 1;
 					_scene->loadAnimation(formAnimName('B', -1));
-					_scene->_activeAnimation->setCurrentFrame(39);
+					_scene->_animation[0]->setCurrentFrame(39);
 					_game._player._stepEnabled = true;
 				} else
 					_game._objects.setRoom(OBJ_CHICKEN_BOMB, 1);
@@ -1005,7 +1005,7 @@ void Scene703::step() {
 				_scene->freeAnimation();
 				_monsterMode = 0;
 				_scene->loadAnimation(formAnimName('A', -1));
-				_scene->_activeAnimation->setCurrentFrame(9);
+				_scene->_animation[0]->setCurrentFrame(9);
 				_game._player._stepEnabled = true;
 				if (_game._storyMode == STORYMODE_NAUGHTY)
 					_vm->_dialogs->show(70321);
@@ -1018,8 +1018,8 @@ void Scene703::step() {
 				break;
 			}
 
-			if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(nextBoatFrame);
+			if ((nextBoatFrame >= 0) && (nextBoatFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(nextBoatFrame);
 				_boatFrame = nextBoatFrame;
 			}
 		}
@@ -1055,7 +1055,7 @@ void Scene703::actions() {
 		_scene->freeAnimation();
 		_monsterMode = 2;
 		_scene->loadAnimation(formAnimName('C', -1));
-		_scene->_activeAnimation->setCurrentFrame(19);
+		_scene->_animation[0]->setCurrentFrame(19);
 	} else if (_action.isAction(VERB_THROW, NOUN_CHICKEN, NOUN_SEA_MONSTER)) {
 		_game._player._stepEnabled = false;
 		_scene->freeAnimation();
@@ -1066,13 +1066,13 @@ void Scene703::actions() {
 		_scene->freeAnimation();
 		_monsterMode = 2;
 		_scene->loadAnimation(formAnimName('C', -1));
-		_scene->_activeAnimation->setCurrentFrame(39);
+		_scene->_animation[0]->setCurrentFrame(39);
 	} else if (_action.isAction(VERB_THROW, NOUN_BOMB, NOUN_SEA_MONSTER)) {
 		_game._player._stepEnabled = false;
 		_scene->freeAnimation();
 		_monsterMode = 2;
 		_scene->loadAnimation(formAnimName('C', -1));
-		_scene->_activeAnimation->setCurrentFrame(59);
+		_scene->_animation[0]->setCurrentFrame(59);
 	} else if (_action.isAction(VERB_THROW, NOUN_CHICKEN_BOMB, NOUN_SEA_MONSTER)) {
 		_useBomb = true;
 		_game._player._stepEnabled = false;
@@ -1241,21 +1241,21 @@ void Scene704::enter() {
 		_animationMode = 2;
 		_boatDirection = 2;
 		_scene->loadAnimation(formAnimName('A', -1));
-		_scene->_activeAnimation->setCurrentFrame(36);
+		_scene->_animation[0]->setCurrentFrame(36);
 	} else if (_scene->_priorSceneId != RETURNING_FROM_DIALOG) {
 		_game._player._stepEnabled = false;
 		_boatDirection = 1;
 		_scene->loadAnimation(formAnimName('A', -1));
 	} else if (_boatDirection == 1) {
 		_scene->loadAnimation(formAnimName('A', -1));
-		_scene->_activeAnimation->setCurrentFrame(8);
+		_scene->_animation[0]->setCurrentFrame(8);
 	} else if (_boatDirection == 2) {
 		if (_game._objects[OBJ_BOTTLE]._roomNumber == _scene->_currentSceneId) {
 			_scene->_sequences.setPosition(_globals._sequenceIndexes[1], Common::Point(123, 125));
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1);
 		}
 		_scene->loadAnimation(formAnimName('A', -1));
-		_scene->_activeAnimation->setCurrentFrame(57);
+		_scene->_animation[0]->setCurrentFrame(57);
 	}
 
 	if (_scene->_roomChanged)
@@ -1269,9 +1269,9 @@ void Scene704::enter() {
 }
 
 void Scene704::step() {
-	if (_scene->_activeAnimation != nullptr) {
-		if (_scene->_activeAnimation->getCurrentFrame() != _boatCurrentFrame) {
-			_boatCurrentFrame = _scene->_activeAnimation->getCurrentFrame();
+	if (_scene->_animation[0] != nullptr) {
+		if (_scene->_animation[0]->getCurrentFrame() != _boatCurrentFrame) {
+			_boatCurrentFrame = _scene->_animation[0]->getCurrentFrame();
 			int nextFrame = -1;
 
 			switch (_boatCurrentFrame) {
@@ -1377,8 +1377,8 @@ void Scene704::step() {
 				break;
 			}
 
-			if ((nextFrame >= 0) && (nextFrame != _scene->_activeAnimation->getCurrentFrame())) {
-				_scene->_activeAnimation->setCurrentFrame(nextFrame);
+			if ((nextFrame >= 0) && (nextFrame != _scene->_animation[0]->getCurrentFrame())) {
+				_scene->_animation[0]->setCurrentFrame(nextFrame);
 				_boatCurrentFrame = nextFrame;
 			}
 		}
@@ -1906,9 +1906,9 @@ void Scene706::step() {
 		_scene->_reloadSceneFlag = true;
 	}
 
-	if (_scene->_activeAnimation != nullptr) {
-		if ((_animationMode != 0) && (_scene->_activeAnimation->getCurrentFrame() != _animationFrame)) {
-			_animationFrame = _scene->_activeAnimation->getCurrentFrame();
+	if (_scene->_animation[0] != nullptr) {
+		if ((_animationMode != 0) && (_scene->_animation[0]->getCurrentFrame() != _animationFrame)) {
+			_animationFrame = _scene->_animation[0]->getCurrentFrame();
 
 			if (_animationFrame == 6) {
 				_scene->_sequences.remove(_globals._sequenceIndexes[1]);
diff --git a/engines/mads/nebular/nebular_scenes8.cpp b/engines/mads/nebular/nebular_scenes8.cpp
index a904569..3c5cfe3 100644
--- a/engines/mads/nebular/nebular_scenes8.cpp
+++ b/engines/mads/nebular/nebular_scenes8.cpp
@@ -930,7 +930,7 @@ void Scene804::enter() {
 void Scene804::step() {
 	if (!_messWithThrottle) {
 
-		if ((_throttleGone) && (_movingThrottle) && (_scene->_activeAnimation->getCurrentFrame() == 39)) {
+		if ((_throttleGone) && (_movingThrottle) && (_scene->_animation[0]->getCurrentFrame() == 39)) {
 			_globals._sequenceIndexes[1] = _scene->_sequences.startCycle
 				(_globals._spriteIndexes[1], false, 1);
 			_scene->_sequences.setPosition(_globals._sequenceIndexes[1], Common::Point(133, 139));
@@ -938,7 +938,7 @@ void Scene804::step() {
 			_throttleGone = false;
 		}
 
-		if ((_movingThrottle) && (_scene->_activeAnimation->getCurrentFrame() == 42)) {
+		if ((_movingThrottle) && (_scene->_animation[0]->getCurrentFrame() == 42)) {
 			_resetFrame = 0;
 			_movingThrottle = false;
 		}
@@ -947,12 +947,12 @@ void Scene804::step() {
 			_resetFrame = 42;
 		}
 
-		if (_scene->_activeAnimation->getCurrentFrame() == 65)
+		if (_scene->_animation[0]->getCurrentFrame() == 65)
 			_scene->_sequences.remove(_globals._sequenceIndexes[7]);
 
 		switch (_game._storyMode) {
 		case STORYMODE_NAUGHTY:
-			if (_scene->_activeAnimation->getCurrentFrame() == 81) {
+			if (_scene->_animation[0]->getCurrentFrame() == 81) {
 				_resetFrame = 80;
 				_globals[kInSpace] = false;
 				_globals[kBeamIsUp] = true;
@@ -964,7 +964,7 @@ void Scene804::step() {
 			break;
 
 		case STORYMODE_NICE:
-			if (_scene->_activeAnimation->getCurrentFrame() == 68) {
+			if (_scene->_animation[0]->getCurrentFrame() == 68) {
 				_resetFrame = 66;
 				_globals[kInSpace] = false;
 				_globals[kBeamIsUp] = true;
@@ -975,12 +975,12 @@ void Scene804::step() {
 			}
 		}
 
-		if (_scene->_activeAnimation->getCurrentFrame() == 34) {
+		if (_scene->_animation[0]->getCurrentFrame() == 34) {
 			_resetFrame = 36;
 			_scene->_sequences.remove(_globals._sequenceIndexes[1]);
 		}
 
-		if (_scene->_activeAnimation->getCurrentFrame() == 37) {
+		if (_scene->_animation[0]->getCurrentFrame() == 37) {
 			_resetFrame = 36;
 			if (!_dontPullThrottleAgain) {
 				_dontPullThrottleAgain = true;
@@ -992,20 +992,20 @@ void Scene804::step() {
 			_scene->_nextSceneId = 803;
 		}
 
-		if ((_scene->_activeAnimation->getCurrentFrame() == 7) && (!_globals[kWindowFixed])) {
+		if ((_scene->_animation[0]->getCurrentFrame() == 7) && (!_globals[kWindowFixed])) {
 			_globals._sequenceIndexes[4] = _scene->_sequences.startCycle(_globals._spriteIndexes[4], false, 1);
 			_scene->_sequences.addTimer(20, 110);
 			_globals[kWindowFixed] = true;
 		}
 
-		if (_scene->_activeAnimation->getCurrentFrame() == 10) {
+		if (_scene->_animation[0]->getCurrentFrame() == 10) {
 			_resetFrame = 0;
 			_game._player._stepEnabled = true;
 			_game._objects.setRoom(OBJ_POLYCEMENT, NOWHERE);
 		}
 
 		// FIXME: Original doesn't have resetFrame check. Check why this has been needed
-		if (_resetFrame == -1 &&  _scene->_activeAnimation->getCurrentFrame() == 1) {
+		if (_resetFrame == -1 &&  _scene->_animation[0]->getCurrentFrame() == 1) {
 			int randomVal = _vm->getRandomNumber(29) + 1;
 			switch (randomVal) {
 			case 1:
@@ -1023,7 +1023,7 @@ void Scene804::step() {
 			}
 		}
 
-		switch (_scene->_activeAnimation->getCurrentFrame()) {
+		switch (_scene->_animation[0]->getCurrentFrame()) {
 		case 26:
 		case 28:
 		case 31:
@@ -1031,12 +1031,12 @@ void Scene804::step() {
 			break;
 		}
 	} else {
-		if ((_scene->_activeAnimation->getCurrentFrame() == 36) && (!_throttleGone)) {
+		if ((_scene->_animation[0]->getCurrentFrame() == 36) && (!_throttleGone)) {
 			_scene->_sequences.remove(_globals._sequenceIndexes[1]);
 			_throttleGone = true;
 		}
 
-		if (_scene->_activeAnimation->getCurrentFrame() == 39) {
+		if (_scene->_animation[0]->getCurrentFrame() == 39) {
 			_movingThrottle = false;
 			switch (_throttleCounter) {
 			case 1:
@@ -1074,8 +1074,8 @@ void Scene804::step() {
 	}
 
 	if (_resetFrame >= 0) {
-		if (_resetFrame != _scene->_activeAnimation->getCurrentFrame()) {
-			_scene->_activeAnimation->setCurrentFrame(_resetFrame);
+		if (_resetFrame != _scene->_animation[0]->getCurrentFrame()) {
+			_scene->_animation[0]->setCurrentFrame(_resetFrame);
 			_resetFrame = -1;
 		}
 	}
@@ -1084,12 +1084,12 @@ void Scene804::step() {
 		_scene->_nextSceneId = 803;
 	}
 
-	if ((_scene->_activeAnimation->getCurrentFrame() == 72) && !_alreadyPop) {
+	if ((_scene->_animation[0]->getCurrentFrame() == 72) && !_alreadyPop) {
 		_vm->_sound->command(21);
 		_alreadyPop = true;
 	}
 
-	if ((_scene->_activeAnimation->getCurrentFrame() == 80) && !_alreadyOrgan) {
+	if ((_scene->_animation[0]->getCurrentFrame() == 80) && !_alreadyOrgan) {
 		_vm->_sound->command(22);
 		_alreadyOrgan = true;
 	}
@@ -1606,7 +1606,7 @@ void Scene810::enter() {
 }
 
 void Scene810::step() {
-	if (_scene->_activeAnimation && (_scene->_activeAnimation->getCurrentFrame() == 200) 
+	if (_scene->_animation[0] && (_scene->_animation[0]->getCurrentFrame() == 200) 
 			&& _moveAllowed) {
 		_scene->_sequences.addTimer(100, 70);
 		_moveAllowed = false;
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index ee5f1a5..9eb6a1a 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -49,7 +49,8 @@ Scene::Scene(MADSEngine *vm)
 	_reloadSceneFlag = false;
 	_freeAnimationFlag = false;
 	_animationData = nullptr;
-	_activeAnimation = nullptr;
+	for (int i = 0; i < 10; i++)
+		_animation[i] = nullptr;
 	_textSpacing = -1;
 	_frameStartTime = 0;
 	_mode = SCREENMODE_VGA;
@@ -430,8 +431,10 @@ void Scene::doFrame() {
 				_sequences.tick();
 
 				// Handle any active animation
-				if (_activeAnimation)
-					_activeAnimation->update();
+				for (int i = 0; i < 10; i++) {
+					if (_animation[i])
+						_animation[i]->update();
+				}
 			}
 
 			// If the debugget flag is set, show the mouse position
@@ -480,8 +483,10 @@ void Scene::doFrame() {
 	_vm->_game->_fx = kTransitionNone;
 
 	// Handle freeing animation if necessary
-	if (_activeAnimation && _activeAnimation->freeFlag())
-		_freeAnimationFlag = true;
+	for (int i = 0; i < 10; i++) {
+		if (_animation[i] && _animation[i]->freeFlag())
+			_freeAnimationFlag = true;
+	}
 	if (_freeAnimationFlag)
 		freeAnimation();
 }
@@ -605,19 +610,19 @@ void Scene::checkKeyboard() {
 	}
 }
 
-void Scene::loadAnimation(const Common::String &resName, int trigger) {
+void Scene::loadAnimation(const Common::String &resName, int trigger, int id) {
 	// WORKAROUND: If there's already a previous active animation used by the
 	// scene, then free it before we create the new one
-	if (_activeAnimation)
+	if ((_vm->getGameID() == GType_RexNebular) && _animation[id])
 		freeAnimation();
 
 	DepthSurface depthSurface;
 	UserInterface interfaceSurface(_vm);
 
-	_activeAnimation = Animation::init(_vm, this);
-	_activeAnimation->load(interfaceSurface, depthSurface, resName,
+	_animation[id] = Animation::init(_vm, this);
+	_animation[id]->load(interfaceSurface, depthSurface, resName,
 		_vm->_dithering ? ANIMFLAG_DITHER : 0, nullptr, nullptr);
-	_activeAnimation->startAnimation(trigger);
+	_animation[id]->startAnimation(trigger);
 }
 
 void Scene::updateCursor() {
@@ -658,9 +663,12 @@ void Scene::freeCurrentScene() {
 		delete _animationData;
 		_animationData = nullptr;
 	}
-	if (_activeAnimation) {
-		delete _activeAnimation;
-		_activeAnimation = nullptr;
+
+	for (int i = 0; i < 10; i++) {
+		if (_animation[i]) {
+			delete _animation[i];
+			_animation[i] = nullptr;
+		}
 	}
 
 	_vm->_palette->_paletteUsage.load(nullptr);
@@ -692,30 +700,34 @@ void Scene::resetScene() {
 }
 
 void Scene::freeAnimation() {
-	if (_activeAnimation) {
-		Player &player = _vm->_game->_player;
+	for (int j = 0; j < 10; j++) {
+		if (_animation[j]) {
+			if (j == 0) {
+				Player &player = _vm->_game->_player;
+
+				if (!_freeAnimationFlag) {
+					_spriteSlots.fullRefresh(true);
+					_sequences.scan();
+				}
 
-		if (!_freeAnimationFlag) {
-			_spriteSlots.fullRefresh(true);
-			_sequences.scan();
-		}
+				// Refresh the player
+				if (player._visible) {
+					player._forceRefresh = true;
+					player.update();
+				}
+			}
 
-		// Refresh the player
-		if (player._visible) {
-			player._forceRefresh = true;
-			player.update();
-		}
+			// Remove any kernel messages in use by the animation
+			for (uint i = 0; i < _animation[j]->_messages.size(); ++i) {
+				int msgIndex = _animation[j]->_messages[i]._kernelMsgIndex;
+				if (msgIndex >= 0)
+					_kernelMessages.remove(msgIndex);
+			}
 
-		// Remove any kernel messages in use by the animation
-		for (uint i = 0; i < _activeAnimation->_messages.size(); ++i) {
-			int msgIndex = _activeAnimation->_messages[i]._kernelMsgIndex;
-			if (msgIndex >= 0)
-				_kernelMessages.remove(msgIndex);
+			// Delete the animation
+			delete _animation[j];
+			_animation[j] = nullptr;
 		}
-
-		// Delete the animation
-		delete _activeAnimation;
-		_activeAnimation = nullptr;
 	}
 
 	_freeAnimationFlag = false;
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index c0784c3..a29f8a0 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -111,7 +111,7 @@ public:
 	Common::Array<PaletteCycle> _paletteCycles;
 	Common::StringArray _vocabStrings;
 	Animation *_animationData;
-	Animation *_activeAnimation;
+	Animation *_animation[10];
 	bool _freeAnimationFlag;
 	int _depthStyle;
 	int _bandsRange;
@@ -214,7 +214,7 @@ public:
 	/**
 	 * Load an animation
 	 */
-	void loadAnimation(const Common::String &resName, int trigger = 0);
+	void loadAnimation(const Common::String &resName, int trigger = 0, int id = 0);
 
 	/**
 	 * Returns a vocab entry


Commit: 7fbbf515932a32447fce1c2785936d3f2277bcaa
    https://github.com/scummvm/scummvm/commit/7fbbf515932a32447fce1c2785936d3f2277bcaa
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-09-22T10:39:43+02:00

Commit Message:
MADS: Phantom - Implement Scene1xx functions

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/player.cpp
    engines/mads/player.h



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 2d991fd..97ff94e 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -31,15 +31,89 @@ namespace MADS {
 namespace Phantom {
 
 void Scene1xx::setAAName() {
-	// TODO
-	//int idx = 0;
-	//_game._aaName = Resources::formatAAName(idx);
+	_game._aaName = Resources::formatAAName(_globals[kTempInterface]);
+	_vm->_palette->setEntry(254, 43, 47, 51);
 }
 
 void Scene1xx::sceneEntrySound() {
-	// TODO
+	if (!_vm->_musicFlag)
+		return;
+
+	if (_globals[kDoneBrieConv203] == 3) {
+		_vm->_sound->command(39);
+	} else {
+		switch (_scene->_nextSceneId) {
+		case 101:
+			if (!_game._visitedScenes._sceneRevisited)
+				_vm->_sound->command(38);
+			else
+				_vm->_sound->command(16);
+			break;
+
+		case 102:
+			if (_scene->_priorSceneId == 104)
+				_vm->_sound->command(27);
+			else
+				_vm->_sound->command(16);
+			break;
+
+		case 103:
+			if ((_globals[kJacquesStatus] == 2)) {
+				_vm->_sound->command(32);
+				_globals[kJacquesStatus] = 3;
+			} else
+				_vm->_sound->command(16);
+			break;
+
+		case 104:
+			if (_scene->_priorSceneId == 301) {
+				warning("TODO: Add check on Conversation restore running == 7");
+				_vm->_sound->command(33);
+			} else if ((_globals[kRoom103104Transition] == 0) && !_globals[kObservedPhan104]) {
+				_vm->_sound->command(37);
+				_globals[kObservedPhan104] = true;
+			} else
+				_vm->_sound->command(16);
+			break;
+
+		case 111:
+			if (_scene->_priorSceneId == 150)
+				_vm->_sound->command(38);
+			else if (_globals[kLeaveAngelMusicOn])
+				_vm->_sound->command(34);
+			else
+				_vm->_sound->command(16);
+			break;
+		case 113:
+			if (_globals[kLeaveAngelMusicOn])
+				_vm->_sound->command(34);
+			else if (_globals[kCurrentYear] == 1993)
+				_vm->_sound->command(36);
+			else
+				_vm->_sound->command(35);
+			break;
+
+		default:
+			if ((_scene->_priorSceneId != 204) && (_scene->_nextSceneId != 150))
+				_vm->_sound->command(16);
+			break;
+		}
+	}
 }
 
+void Scene1xx::setPlayerSpritesPrefix() {
+	_vm->_sound->command(5);
+
+	Common::String oldName = _game._player._spritesPrefix;
+
+	if (!_game._player._forcePrefix)
+		_game._player._spritesPrefix = "RAL";
+
+	if (oldName != _game._player._spritesPrefix)
+		_game._player._spritesChanged = true;
+
+	_game._player._scalingVelocity = true;}
+
 /*------------------------------------------------------------------------*/
 
 Scene101::Scene101(MADSEngine *vm) : Scene1xx(vm) {
@@ -48,11 +122,10 @@ Scene101::Scene101(MADSEngine *vm) : Scene1xx(vm) {
 
 void Scene101::synchronize(Common::Serializer &s) {
 	Scene1xx::synchronize(s);
-
 }
 
 void Scene101::setup() {
-	//setPlayerSpritesPrefix();
+	setPlayerSpritesPrefix();
 	setAAName();
 }
 
diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp
index bb747f4..10c93e5 100644
--- a/engines/mads/player.cpp
+++ b/engines/mads/player.cpp
@@ -80,6 +80,7 @@ Player::Player(MADSEngine *vm)
 	_moving = false;
 	_walkOffScreen = 0;
 	_walkOffScreenSceneId = -1;
+	_forcePrefix = false;
 
 	Common::fill(&_stopWalkerList[0], &_stopWalkerList[12], 0);
 	Common::fill(&_stopWalkerTrigger[0], &_stopWalkerTrigger[12], 0);
diff --git a/engines/mads/player.h b/engines/mads/player.h
index e5765a9..d2cdd47 100644
--- a/engines/mads/player.h
+++ b/engines/mads/player.h
@@ -131,6 +131,7 @@ public:
 	int _trigger;
 	bool _scalingVelocity;
 	bool _forceRefresh;
+	bool _forcePrefix;
 	bool _needToWalk;
 	bool _readyToWalk;
 	int _stopWalkerIndex;


Commit: 3ffa01ec2a4482441f0147c0947a600def0a178b
    https://github.com/scummvm/scummvm/commit/3ffa01ec2a4482441f0147c0947a600def0a178b
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-10T17:32:51+02:00

Commit Message:
MADS: Phantom: Implement Scene101::enter(), add some empty (new) engine functions

Changed paths:
  A engines/mads/conversations.cpp
  A engines/mads/conversations.h
    engines/mads/hotspots.cpp
    engines/mads/hotspots.h
    engines/mads/mads.cpp
    engines/mads/mads.h
    engines/mads/module.mk
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h
    engines/mads/player.cpp
    engines/mads/player.h
    engines/mads/scene.cpp
    engines/mads/scene.h
    engines/mads/sequence.cpp
    engines/mads/sequence.h



diff --git a/engines/mads/conversations.cpp b/engines/mads/conversations.cpp
new file mode 100644
index 0000000..451142a
--- /dev/null
+++ b/engines/mads/conversations.cpp
@@ -0,0 +1,47 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "mads/conversations.h"
+#include "mads/mads.h"
+
+namespace MADS {
+
+GameConversation::GameConversation(MADSEngine *vm)
+	: _vm(vm) {
+	_restoreRunning = 0;
+}
+
+GameConversation::~GameConversation() {
+}
+
+void GameConversation::get(int id) {
+	warning("TODO GameConversation::get");
+}
+
+void GameConversation::run(int id) {
+	warning("TODO GameConversation::run");
+}
+
+void GameConversation::exportPointer(int *val) {
+	warning("TODO GameConversation::exportPointer");
+}
+} // End of namespace MADS
diff --git a/engines/mads/conversations.h b/engines/mads/conversations.h
new file mode 100644
index 0000000..fe128ad
--- /dev/null
+++ b/engines/mads/conversations.h
@@ -0,0 +1,54 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef MADS_CONVERSATIONS_H
+#define MADS_CONVERSATIONS_H
+
+namespace MADS {
+
+class MADSEngine;
+
+class GameConversation {
+private:
+	MADSEngine *_vm;
+
+public:
+	/**
+	 * Constructor
+	 */
+	GameConversation(MADSEngine *vm);
+
+	/**
+	 * Destructor
+	 */
+	virtual ~GameConversation();
+
+	void get(int id);
+	void run(int id);
+	void exportPointer(int *val);
+
+	int _restoreRunning;
+};
+
+} // End of namespace MADS
+
+#endif /* MADS_CONVERSATIONS_H */
diff --git a/engines/mads/hotspots.cpp b/engines/mads/hotspots.cpp
index 8afef2e..2235bf5 100644
--- a/engines/mads/hotspots.cpp
+++ b/engines/mads/hotspots.cpp
@@ -52,6 +52,11 @@ DynamicHotspots::DynamicHotspots(MADSEngine *vm) : _vm(vm) {
 	_count = 0;
 }
 
+int DynamicHotspots::add(int descId, int verbId, int syntax, int seqIndex, const Common::Rect &bounds) {
+	warning("TODO: DynamicHotspots::add(5 params))");
+	return add(descId, verbId, seqIndex, bounds);
+}
+
 int DynamicHotspots::add(int descId, int verbId, int seqIndex, const Common::Rect &bounds) {
 	// Find a free slot
 	uint idx = 0;
diff --git a/engines/mads/hotspots.h b/engines/mads/hotspots.h
index 902275b..12b7e99 100644
--- a/engines/mads/hotspots.h
+++ b/engines/mads/hotspots.h
@@ -56,6 +56,16 @@ public:
 
 #define DYNAMIC_HOTSPOTS_SIZE 8
 
+#define SYNTAX_SINGULAR               0
+#define SYNTAX_PLURAL                 1
+#define SYNTAX_PARTITIVE              2
+#define SYNTAX_SINGULAR_MASC          3
+#define SYNTAX_SINGULAR_FEM           4
+#define SYNTAX_SINGULAR_LIVING        5
+#define SYNTAX_MASC_NOT_PROPER        6
+#define SYNTAX_FEM_NOT_PROPER         7
+#define MAX_SYNTAX                    8
+
 class DynamicHotspots {
 private:
 	MADSEngine *_vm;
@@ -68,6 +78,7 @@ public:
 
 	Common::Array<MADS::DynamicHotspot>::size_type size() const { return _entries.size(); }
 	DynamicHotspot &operator[](uint idx) { return _entries[idx]; }
+	int add(int descId, int verbId, int syntax, int seqIndex, const Common::Rect &bounds);
 	int add(int descId, int verbId, int seqIndex, const Common::Rect &bounds);
 	int setPosition(int index, const Common::Point &pos, Facing facing);
 	int setCursor(int index, CursorType cursor);
diff --git a/engines/mads/mads.cpp b/engines/mads/mads.cpp
index 8c7b6b1..0bdf484 100644
--- a/engines/mads/mads.cpp
+++ b/engines/mads/mads.cpp
@@ -46,12 +46,14 @@ MADSEngine::MADSEngine(OSystem *syst, const MADSGameDescription *gameDesc) :
 	_musicFlag = true;
 	_soundFlag = true;
 	_dithering = false;
+	_disableFastwalk = false;
 
 	_debugger = nullptr;
 	_dialogs = nullptr;
 	_events = nullptr;
 	_font = nullptr;
 	_game = nullptr;
+	_gameConv = nullptr;
 	_palette = nullptr;
 	_resources = nullptr;
 	_sound = nullptr;
@@ -65,6 +67,7 @@ MADSEngine::~MADSEngine() {
 	delete _font;
 	Font::deinit();
 	delete _game;
+	delete _gameConv;
 	delete _palette;
 	delete _resources;
 	delete _sound;
@@ -96,6 +99,14 @@ void MADSEngine::initialize() {
 	_audio = new AudioPlayer(_mixer, getGameID());
 	_game = Game::init(this);
 
+	switch (getGameID()) {
+	case GType_RexNebular:
+		_gameConv = nullptr;
+		break;
+	default:
+		_gameConv = new GameConversation(this);
+	}
+
 	loadOptions();
 
 	_screen.empty();
diff --git a/engines/mads/mads.h b/engines/mads/mads.h
index 9010353..1b0f96a 100644
--- a/engines/mads/mads.h
+++ b/engines/mads/mads.h
@@ -30,6 +30,7 @@
 #include "common/util.h"
 #include "engines/engine.h"
 #include "graphics/surface.h"
+#include "mads/conversations.h"
 #include "mads/debugger.h"
 #include "mads/dialogs.h"
 #include "mads/events.h"
@@ -96,6 +97,7 @@ public:
 	EventsManager *_events;
 	Font *_font;
 	Game *_game;
+	GameConversation * _gameConv;
 	Palette *_palette;
 	Resources *_resources;
 	ScreenSurface _screen;
@@ -108,6 +110,7 @@ public:
 	bool _musicFlag;
 	bool _soundFlag;
 	bool _dithering;
+	bool _disableFastwalk;
 public:
 	MADSEngine(OSystem *syst, const MADSGameDescription *gameDesc);
 	virtual ~MADSEngine();
diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index 7cb7a91..9c79068 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -26,6 +26,7 @@ MODULE_OBJS := \
 	assets.o \
 	audio.o \
 	compression.o \
+	conversations.o \
 	debugger.o \
 	detection.o \
 	dialogs.o \
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 97ff94e..e47505d 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -22,6 +22,7 @@
 
 #include "common/scummsys.h"
 #include "mads/mads.h"
+#include "mads/conversations.h"
 #include "mads/scene.h"
 #include "mads/phantom/phantom_scenes.h"
 #include "mads/phantom/phantom_scenes1.h"
@@ -117,30 +118,129 @@ void Scene1xx::setPlayerSpritesPrefix() {
 /*------------------------------------------------------------------------*/
 
 Scene101::Scene101(MADSEngine *vm) : Scene1xx(vm) {
-
+	_execute_chan = -1;
+	_execute_wipe = -1;
+	_brie_calling_position = -1;
+	_brie_chandelier_position = -1;
+	_brie_calling_frame = -1;
+	_brie_chandelier_frame = -1;
+	_talk_count = -1;
+	_dynamic_brie = 0;
+	_dynamic_brie_2 = 0;
+	_start_walking = false;
+	_start_walking_0 = false;
+	_anim_0_running = false;
+	_anim_1_running = false;
+	_start_sitting_down = false;
 }
 
 void Scene101::synchronize(Common::Serializer &s) {
 	Scene1xx::synchronize(s);
+	s.syncAsSint16LE(_execute_chan);
+	s.syncAsSint16LE(_execute_wipe);
+	s.syncAsSint16LE(_brie_calling_position);
+	s.syncAsSint16LE(_brie_chandelier_position);
+	s.syncAsSint16LE(_brie_calling_frame);
+	s.syncAsSint16LE(_brie_chandelier_frame);
+	s.syncAsSint16LE(_talk_count);
+	s.syncAsSint16LE(_dynamic_brie);
+	s.syncAsSint16LE(_dynamic_brie_2);
+	s.syncAsByte(_start_walking);
+	s.syncAsByte(_start_walking_0);
+	s.syncAsByte(_anim_0_running);
+	s.syncAsByte(_anim_1_running);
+	s.syncAsByte(_start_sitting_down);
 }
 
 void Scene101::setup() {
 	setPlayerSpritesPrefix();
 	setAAName();
+	_scene->addActiveVocab(NOUN_MONSIEUR_BRIE);
 }
 
 void Scene101::enter() {
-	// TODO
+	_vm->_disableFastwalk = true;
+
+	if (_scene->_priorSceneId != RETURNING_FROM_DIALOG) {
+		_execute_chan         = -1;
+		_execute_wipe         = -1;
+		_start_walking        = false;
+		_start_walking_0      = false;
+		_anim_0_running       = true;
+		_anim_1_running       = false;
+		_start_sitting_down = false;
+	}
+
+	// Load Dialogs
+	_vm->_gameConv->get(0);
+	_vm->_gameConv->get(1);
 
 	if (_globals[kCurrentYear] == 1993) {
 		_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('z', -1));
-		// TODO
-		//_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
 	} else {
-		// TODO
+		_scene->_hotspots.activate(NOUN_CHANDELIER, false);
 	}
 
-	// TODO
+	if (_globals[kBrieTalkStatus] == 0) {
+		_game._player.firstWalk(Common::Point(-20, 75), FACING_EAST, Common::Point(18, 79), FACING_EAST, true);
+		_brie_calling_position = 0;
+		_brie_chandelier_position = 3;
+		_game._player.setWalkTrigger(50);
+
+		_scene->loadAnimation(formAnimName('b', 9), 1, 1);
+		_scene->loadAnimation(formAnimName('b', 8), 1, 0);
+
+		_anim_0_running  = true;
+		_anim_1_running  = true;
+
+		_dynamic_brie = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
+		_scene->_dynamicHotspots[_dynamic_brie]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_dynamic_brie, Common::Point(490, 119), FACING_NONE);
+		_scene->setDynamicAnim(_dynamic_brie, 0, 0);
+		_scene->setDynamicAnim(_dynamic_brie, 0, 1);
+		_scene->setDynamicAnim(_dynamic_brie, 0, 2);
+		_scene->setDynamicAnim(_dynamic_brie, 0, 3);
+		_scene->setDynamicAnim(_dynamic_brie, 0, 4);
+
+		_dynamic_brie_2 = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
+		_scene->_dynamicHotspots[_dynamic_brie_2]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_dynamic_brie_2, Common::Point(25, 80), FACING_NONE);
+		_scene->setDynamicAnim(_dynamic_brie_2, 1, 1);
+		_scene->setDynamicAnim(_dynamic_brie_2, 1, 2);
+
+		_talk_count = 0;
+	} else if (_globals[kBrieTalkStatus] == 1) {
+		_scene->loadAnimation(formAnimName('b', 9), 1, 1);
+		_dynamic_brie = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
+		_scene->_dynamicHotspots[_dynamic_brie]._articleNumber = PREP_ON;
+		_scene->setDynamicAnim(_dynamic_brie, 1, 1);
+		_scene->setDynamicAnim(_dynamic_brie, 1, 2);
+		_anim_1_running = true;
+		_talk_count = 0;
+		_brie_chandelier_position = 3;
+
+		if (_vm->_gameConv->_restoreRunning == 1) {
+			_vm->_gameConv->run(1);
+			_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+			_brie_chandelier_position = 4;
+			if (_scene->_animation[1])
+				_scene->_animation[1]->setCurrentFrame(25);
+		}
+	} else {
+		if (_scene->_priorSceneId == 202) {
+			if (_globals[kJacquesStatus] == 1)
+				_globals[kJacquesStatus] = 2;
+
+			_game._player.firstWalk(Common::Point(-20, 75), FACING_EAST, Common::Point(18, 79), FACING_EAST, true);
+		} else if ((_scene->_priorSceneId == 102) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+			_game._player.firstWalk(Common::Point(655, 130), FACING_WEST, Common::Point(625, 127), FACING_WEST, true);
+			_scene->setCamera(Common::Point(320, 0));
+		}
+	}
+
+	sceneEntrySound();
 }
 
 void Scene101::step() {
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 0f5f56a..60cb63b 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -55,8 +55,20 @@ public:
 
 class Scene101 : public Scene1xx {
 private:
-	// TODO
-
+	int _execute_chan;
+	int _execute_wipe;
+	int _brie_calling_position;
+	int _brie_chandelier_position;
+	int _brie_calling_frame;
+	int _brie_chandelier_frame;
+	int _talk_count;
+	int _dynamic_brie;
+	int _dynamic_brie_2;
+	bool _start_walking;
+	bool _start_walking_0;
+	bool _anim_0_running;
+	bool _anim_1_running;
+	bool _start_sitting_down;
 public:
 	Scene101(MADSEngine *vm);
 	virtual void synchronize(Common::Serializer &s);
diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp
index 10c93e5..ce8ab37 100644
--- a/engines/mads/player.cpp
+++ b/engines/mads/player.cpp
@@ -81,6 +81,8 @@ Player::Player(MADSEngine *vm)
 	_walkOffScreen = 0;
 	_walkOffScreenSceneId = -1;
 	_forcePrefix = false;
+	_commandsAllowed = false;
+	_enableAtTarget = false;
 
 	Common::fill(&_stopWalkerList[0], &_stopWalkerList[12], 0);
 	Common::fill(&_stopWalkerTrigger[0], &_stopWalkerTrigger[12], 0);
@@ -798,4 +800,18 @@ void Player::removePlayerSprites() {
 	_visible = false;
 }
 
+void Player::firstWalk(Common::Point fromPos, Facing fromFacing, Common::Point destPos, Facing destFacing, bool enableFl) {
+	_playerPos = fromPos;
+	_facing = fromFacing;
+
+	walk(destPos, destFacing);
+	_walkAnywhere = true;
+
+	_commandsAllowed = false;
+	_enableAtTarget = enableFl;
+}
+
+void Player::setWalkTrigger(int val) {
+	warning("TODO: Player::setWalkTrigger");
+}
 } // End of namespace MADS
diff --git a/engines/mads/player.h b/engines/mads/player.h
index d2cdd47..d4b703f 100644
--- a/engines/mads/player.h
+++ b/engines/mads/player.h
@@ -134,6 +134,8 @@ public:
 	bool _forcePrefix;
 	bool _needToWalk;
 	bool _readyToWalk;
+	bool _commandsAllowed;
+	bool _enableAtTarget;
 	int _stopWalkerIndex;
 	int _centerOfGravity;
 	int _currentDepth;
@@ -222,6 +224,10 @@ public:
 	}
 
 	void removePlayerSprites();
+
+	void firstWalk(Common::Point fromPos, Facing fromFacing, Common::Point destPos, Facing destFacing, bool enableFl);
+
+	void setWalkTrigger(int val);
 };
 
 } // End of namespace MADS
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 9eb6a1a..b02c57e 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -744,4 +744,11 @@ void Scene::synchronize(Common::Serializer &s) {
 	_dynamicHotspots.synchronize(s);
 }
 
+void Scene::setDynamicAnim(int id, int anim_id, int segment) {
+	warning("TODO: Scene::setDynamicAnim");
+}
+
+void Scene::setCamera(Common::Point pos) {
+	warning("TODO: Scene::setCamera");
+}
 } // End of namespace MADS
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index a29f8a0..ba37b97 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -248,6 +248,9 @@ public:
 	* Synchronize the game
 	*/
 	void synchronize(Common::Serializer &s);
+
+	void setDynamicAnim(int id, int anim_id, int segment);
+	void setCamera(Common::Point pos);
 };
 
 } // End of namespace MADS
diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp
index e5bf163..dc67006 100644
--- a/engines/mads/sequence.cpp
+++ b/engines/mads/sequence.cpp
@@ -550,4 +550,9 @@ void SequenceList::setMotion(int seqIndex, int flags, int deltaX, int deltaY) {
 	se._posAccum.x = se._posAccum.y = 0;
 }
 
+int SequenceList::addStampCycle(int srcSpriteIdx, bool flipped, int sprite) {
+	warning("TODO: SequenceList::addStampCycle");
+	return -1;
+}
+
 } // End of namespace
diff --git a/engines/mads/sequence.h b/engines/mads/sequence.h
index c3a277c..df49170 100644
--- a/engines/mads/sequence.h
+++ b/engines/mads/sequence.h
@@ -125,6 +125,8 @@ public:
 	void setMsgLayout(int seqIndex);
 	void setDone(int seqIndex);
 	void setMotion(int seqIndex, int flags, int deltaX, int deltaY);
+
+	int addStampCycle(int srcSpriteIdx, bool flipped, int sprite);
 };
 
 } // End of namespace MADS


Commit: 692e45a6e682c16831fac3d5b00b38863ec5683a
    https://github.com/scummvm/scummvm/commit/692e45a6e682c16831fac3d5b00b38863ec5683a
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-10T18:10:11+02:00

Commit Message:
MADS: Phantom: Add a check on conversation restore in scene 1XX, rework some checks

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index e47505d..2891ffa 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -67,10 +67,9 @@ void Scene1xx::sceneEntrySound() {
 			break;
 
 		case 104:
-			if (_scene->_priorSceneId == 301) {
-				warning("TODO: Add check on Conversation restore running == 7");
+			if ((_vm->_gameConv->_restoreRunning == 7) || (_scene->_priorSceneId == 301)) {
 				_vm->_sound->command(33);
-			} else if ((_globals[kRoom103104Transition] == 0) && !_globals[kObservedPhan104]) {
+			} else if (!_globals[kRoom103104Transition] && !_globals[kObservedPhan104]) {
 				_vm->_sound->command(37);
 				_globals[kObservedPhan104] = true;
 			} else
@@ -228,16 +227,13 @@ void Scene101::enter() {
 			if (_scene->_animation[1])
 				_scene->_animation[1]->setCurrentFrame(25);
 		}
-	} else {
-		if (_scene->_priorSceneId == 202) {
-			if (_globals[kJacquesStatus] == 1)
-				_globals[kJacquesStatus] = 2;
-
-			_game._player.firstWalk(Common::Point(-20, 75), FACING_EAST, Common::Point(18, 79), FACING_EAST, true);
-		} else if ((_scene->_priorSceneId == 102) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
-			_game._player.firstWalk(Common::Point(655, 130), FACING_WEST, Common::Point(625, 127), FACING_WEST, true);
-			_scene->setCamera(Common::Point(320, 0));
-		}
+	} else if (_scene->_priorSceneId == 202) {
+		if (_globals[kJacquesStatus] == 1)
+			_globals[kJacquesStatus] = 2;
+		_game._player.firstWalk(Common::Point(-20, 75), FACING_EAST, Common::Point(18, 79), FACING_EAST, true);
+	} else if ((_scene->_priorSceneId == 102) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+		_game._player.firstWalk(Common::Point(655, 130), FACING_WEST, Common::Point(625, 127), FACING_WEST, true);
+		_scene->setCamera(Common::Point(320, 0));
 	}
 
 	sceneEntrySound();


Commit: 12a1393faf585b131701602d633edf07f07186dd
    https://github.com/scummvm/scummvm/commit/12a1393faf585b131701602d633edf07f07186dd
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-12T10:53:46+02:00

Commit Message:
MADS: Phantom: Add some more logic for scene 101

Changed paths:
    engines/mads/conversations.cpp
    engines/mads/conversations.h
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h
    engines/mads/scene.cpp
    engines/mads/scene.h



diff --git a/engines/mads/conversations.cpp b/engines/mads/conversations.cpp
index 451142a..8981578 100644
--- a/engines/mads/conversations.cpp
+++ b/engines/mads/conversations.cpp
@@ -27,7 +27,7 @@ namespace MADS {
 
 GameConversation::GameConversation(MADSEngine *vm)
 	: _vm(vm) {
-	_restoreRunning = 0;
+	_running = _restoreRunning = 0;
 }
 
 GameConversation::~GameConversation() {
@@ -41,7 +41,19 @@ void GameConversation::run(int id) {
 	warning("TODO GameConversation::run");
 }
 
+void GameConversation::stop() {
+	warning("TODO GameConversation::stop");
+}
+
 void GameConversation::exportPointer(int *val) {
 	warning("TODO GameConversation::exportPointer");
 }
+
+void GameConversation::setHeroTrigger(int val) {
+	warning("TODO: GameConversation::setHeroTrigger");
+}
+
+void GameConversation::setInterlocutorTrigger(int val) {
+	warning("TODO: GameConversation::setInterlocutorTrigger");
+}
 } // End of namespace MADS
diff --git a/engines/mads/conversations.h b/engines/mads/conversations.h
index fe128ad..9e25eb9 100644
--- a/engines/mads/conversations.h
+++ b/engines/mads/conversations.h
@@ -44,8 +44,12 @@ public:
 
 	void get(int id);
 	void run(int id);
+	void stop();
 	void exportPointer(int *val);
+	void setHeroTrigger(int val);
+	void setInterlocutorTrigger(int val);
 
+	int _running;
 	int _restoreRunning;
 };
 
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 2891ffa..cb36be1 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -123,6 +123,7 @@ Scene101::Scene101(MADSEngine *vm) : Scene1xx(vm) {
 	_brie_chandelier_position = -1;
 	_brie_calling_frame = -1;
 	_brie_chandelier_frame = -1;
+	_converse_counter = 0;
 	_talk_count = -1;
 	_dynamic_brie = 0;
 	_dynamic_brie_2 = 0;
@@ -141,6 +142,7 @@ void Scene101::synchronize(Common::Serializer &s) {
 	s.syncAsSint16LE(_brie_chandelier_position);
 	s.syncAsSint16LE(_brie_calling_frame);
 	s.syncAsSint16LE(_brie_chandelier_frame);
+	s.syncAsSint16LE(_converse_counter);
 	s.syncAsSint16LE(_talk_count);
 	s.syncAsSint16LE(_dynamic_brie);
 	s.syncAsSint16LE(_dynamic_brie_2);
@@ -161,12 +163,9 @@ void Scene101::enter() {
 	_vm->_disableFastwalk = true;
 
 	if (_scene->_priorSceneId != RETURNING_FROM_DIALOG) {
-		_execute_chan         = -1;
-		_execute_wipe         = -1;
-		_start_walking        = false;
-		_start_walking_0      = false;
-		_anim_0_running       = true;
-		_anim_1_running       = false;
+		_execute_chan = _execute_wipe = -1;
+		_start_walking = _start_walking_0 = false;
+		_anim_0_running = _anim_1_running = false;
 		_start_sitting_down = false;
 	}
 
@@ -240,32 +239,80 @@ void Scene101::enter() {
 }
 
 void Scene101::step() {
-	// TODO
+	if (_anim_0_running)
+		handleAnimation0();
+
+	if ((_globals[kWalkerConverse] == 2) || (_globals[kWalkerConverse] == 3)) {
+		++_converse_counter;
+		if (_converse_counter > 200)
+			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
+	}
+
+	if (_anim_1_running) {
+		handleAnimation1();
+
+		if (_scene->_animation[1]->getCurrentFrame() == 80) {
+			_game._player._stepEnabled = true;
+			_game._player.setWalkTrigger(55);
+		}
+	}
+
+	if (!_start_sitting_down && (_globals[kBrieTalkStatus] != 2)) {
+		warning("TODO: Add a check on view port x > 200");
+		_start_sitting_down = true;
+		_game._player.walk(Common::Point(490, 119), FACING_NORTHEAST);
+		_game._player._stepEnabled = false;
+		_game._player.setWalkTrigger(55);
+		_brie_chandelier_position = 4;
+	}
+
+	if (_game._trigger == 55) {
+		_game._player._stepEnabled = true;
+		_vm->_gameConv->run(1);
+		_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+		_brie_chandelier_frame = -1;
+		_talk_count = 0;
+	}
+
+	if (_game._trigger == 50) {
+		_vm->_gameConv->run(0);
+		_brie_calling_position = 1;
+	}
 }
 
 void Scene101::preActions() {
 	if (_action.isAction(VERB_EXIT_TO, NOUN_ORCHESTRA_PIT)) {
-		// TODO: Handle Brie
-		_game._player._walkOffScreenSceneId = 102;
+		if ((_globals[kBrieTalkStatus] == 2) || _start_walking) {
+			_game._player._walkOffScreenSceneId = 102;
+			_globals[kBrieTalkStatus] = 2;
+		} else {
+			_vm->_gameConv->run(0);
+			_game._player._needToWalk = false;
+		}
 	} else if (_action.isAction(VERB_EXIT_TO, NOUN_GRAND_FOYER)) {
-		// TODO: Handle Brie
-		_game._player._walkOffScreenSceneId = 202;
-	} else if (_action.isAction(VERB_TAKE, NOUN_MONSIEUR_BRIE)) {
-		_vm->_dialogs->show(10121);
-	} else if (_action.isAction(VERB_TALK_TO, NOUN_MONSIEUR_BRIE)) {
-		if (_globals[kBrieTalkStatus] == 2)
+		if ((_globals[kBrieTalkStatus] == 2) || _start_walking)
+			_game._player._walkOffScreenSceneId = 202;
+		else {
+			_vm->_gameConv->run(0);
 			_game._player._needToWalk = false;
-	}
-
-	// TODO
+		}
+	} else if (_action.isAction(VERB_TAKE, NOUN_MONSIEUR_BRIE))
+		_vm->_dialogs->show(10121);
+	else if (_action.isAction(VERB_TALK_TO, NOUN_MONSIEUR_BRIE) && (_globals[kBrieTalkStatus] == 2))
+		_game._player._needToWalk = false;
 }
 
 void Scene101::actions() {
-	// TODO: Brie conversation
-
-	// TODO: Look around
-
-	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+	if (_vm->_gameConv->_running == 0)
+		handleConversation0();
+	else if (_vm->_gameConv->_running == 1)
+		handleConversation1();
+	else if (_action._lookFlag) {
+		if (_globals[kCurrentYear] == 1993)
+			_vm->_dialogs->show(10110);
+		else
+			_vm->_dialogs->show(10111);
+	} else if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
 		if (_action.isObject(NOUN_AISLE)) {
 			_vm->_dialogs->show(10112);
 		} else if (_action.isObject(NOUN_CHANDELIER)) {
@@ -275,8 +322,10 @@ void Scene101::actions() {
 		} else if (_action.isObject(NOUN_SIDE_WALL)) {
 			_vm->_dialogs->show(10115);
 		} else if (_action.isObject(NOUN_SEATS)) {
-			// TODO: Finish this
-			_vm->_dialogs->show(10116);
+			if ((_globals[kBrieTalkStatus] > 1) || _start_walking)
+				_vm->_dialogs->show(10119);
+			else
+				_vm->_dialogs->show(10116);
 		} else if (_action.isObject(NOUN_GRAND_FOYER)) {
 			_vm->_dialogs->show(10117);
 		} else if (_action.isObject(NOUN_ORCHESTRA_PIT)) {
@@ -284,14 +333,273 @@ void Scene101::actions() {
 		} else if (_action.isObject(NOUN_MONSIEUR_BRIE)) {
 			_vm->_dialogs->show(10120);
 		}
-
-		_game._player._stepEnabled = true;
 	} else if (_action.isAction(VERB_TALK_TO, NOUN_MONSIEUR_BRIE)) {
 		if (_globals[kBrieTalkStatus] == 2)
 			_vm->_dialogs->show(10122);
-		_game._player._stepEnabled = true;
-	} else if (_action.isAction(VERB_TAKE, NOUN_MONSIEUR_BRIE)) {
-		_game._player._stepEnabled = true;
+	} else if (!_action.isAction(VERB_TAKE, NOUN_MONSIEUR_BRIE))
+		return;
+
+	_action._inProgress = false;
+}
+
+void Scene101::handleConversation0() {
+	_vm->_gameConv->setHeroTrigger(90);
+
+	if (_game._trigger == 90) {
+		_globals[kBrieTalkStatus] = 1;
+		_start_walking_0 = true;
+	}  
+}
+
+void Scene101::handleConversation1() {
+	if ((_action._activeAction._verbId >= 0) && (_action._activeAction._verbId <= 27)) {
+		int interlocutorFl = false;
+
+		if (_game._trigger == 60) {
+			switch (_action._activeAction._verbId) {
+			case 0:
+				_brie_chandelier_position = 6;
+				_execute_wipe = 2;
+				break;
+
+			case 1:
+				_brie_chandelier_position = 2;
+				_execute_chan = 9;
+				break;
+
+			case 4:
+				_brie_chandelier_position = 0;
+				_execute_chan = -1;
+				_execute_wipe = -1;
+				break;
+
+			case 8:
+			case 10:
+			case 18:
+			case 22:
+			case 24:
+				_start_walking = true;
+				_execute_chan = -1;
+				_execute_wipe = -1;
+				_globals[kWalkerConverse] = 0;
+				_vm->_gameConv->setInterlocutorTrigger(105);
+				interlocutorFl = true;
+				break;
+
+			case 12:
+				_brie_chandelier_position = 5;
+				_execute_chan = -1;
+				_execute_wipe = -1;
+				break;
+
+			default:
+				break;
+			}
+		}
+
+		if (!interlocutorFl)
+			_vm->_gameConv->setInterlocutorTrigger(60);
+
+		_vm->_gameConv->setHeroTrigger(70);
+
+		_talk_count = 0;
+
+		if (_game._trigger == 60) {
+			if (!_start_walking)
+				_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
+
+			_brie_chandelier_position = 2;
+		} else if ((_game._trigger == 70) && !_start_walking) {
+			_brie_chandelier_position = 4;
+			_execute_chan = -1;
+			_execute_wipe = -1;
+			if (!_start_walking)
+				_globals[kWalkerConverse] = _vm->getRandomNumber(2, 3);
+
+			_converse_counter = 0;
+		}
+	}
+}
+
+void Scene101::handleAnimation0() {
+	int random;
+	int reset_frame;
+
+	if (_scene->_animation[0]->getCurrentFrame() != _brie_calling_frame) {
+		_brie_calling_frame = _scene->_animation[0]->getCurrentFrame();
+		reset_frame = -1;
+		switch (_brie_calling_frame) {
+		case 1:
+		case 9:
+		case 12:
+			if (_brie_calling_position == 1) {
+				if (_brie_calling_frame == 9) {
+					if (_start_walking_0) {
+						reset_frame = 13;
+						_brie_calling_position = 3;
+					} else
+						_brie_calling_position = 2;
+				} else
+					reset_frame = 1;
+			}
+
+			if (_brie_calling_position == 0) {
+				if (_start_walking_0) {
+					reset_frame = 60;
+					_brie_calling_position = 3;
+				} else
+					reset_frame = 0;
+			}
+
+			if (_brie_calling_position == 2) {
+				if (_start_walking_0) {
+					reset_frame = 13;
+					_brie_calling_position = 3;
+				} else {
+					random = _vm->getRandomNumber(1, 2);
+					++_talk_count;
+
+					if (_talk_count < 18) {
+						if (random == 1)
+							reset_frame = 7;
+						else
+							reset_frame = 10;
+					} else {
+						reset_frame = 54;
+						_brie_calling_position = 0;
+					}
+				}
+			}
+			break;
+
+		case 53:
+			_anim_0_running    = false;
+			_scene->freeAnimation(0);
+			break;
+
+		case 59:  
+			if (_start_walking_0) {
+				reset_frame = 60;
+				_brie_calling_position = 3;
+			} else {
+				reset_frame = 0;
+				_brie_calling_position = 0;
+			}
+			break;
+
+		case 66:
+			reset_frame = 24;
+			break;
+		}
+
+		if (reset_frame >= 0) {
+			if (_scene->_animation[0])
+				_scene->_animation[0]->setCurrentFrame(reset_frame);
+			_brie_calling_frame = reset_frame;
+		}
+	}
+} 
+
+void Scene101::handleAnimation1() {
+	int random;
+	int reset_frame;
+
+	if (_scene->_animation[1]->getCurrentFrame() != _brie_chandelier_frame) {
+		_brie_chandelier_frame = _scene->_animation[1]->getCurrentFrame();
+		reset_frame = -1;
+		switch (_brie_chandelier_frame) {
+		case 1:
+			if (_brie_chandelier_position == 3)
+				reset_frame = 0;
+			break;
+
+		case 11:
+		case 14:
+		case 17:
+		case 19:
+		case 26:
+		case 44:
+		case 333:
+			if (_talk_count == _execute_chan) {
+				_brie_chandelier_position = 0;
+				++_talk_count;
+				_execute_chan = -1;
+			} 
+
+			if (_talk_count == _execute_wipe) {
+				_brie_chandelier_position = 6;
+				++_talk_count;
+				_execute_wipe = -1;
+			}
+
+			if (_start_walking) {
+				if (_vm->_gameConv->_running == 1) {
+					if (_talk_count > 13)
+						_brie_chandelier_position = 1;
+				} else
+					_brie_chandelier_position = 1;
+			}
+
+			switch (_brie_chandelier_position) {
+			case 0:
+				reset_frame = 27;
+				_brie_chandelier_position = 2;
+				break;
+
+			case 1:
+				_globals[kBrieTalkStatus] = 2;
+				reset_frame = 45;
+				if (_vm->_gameConv->_running == 1)
+					_vm->_gameConv->stop();
+				_scene->_dynamicHotspots.remove(_dynamic_brie);
+				_game._player._stepEnabled = false;
+				break;
+
+			case 2:
+				random = _vm->getRandomNumber(1, 3);
+				++_talk_count;
+				if (_talk_count < 15) {
+					if (random == 1)
+						reset_frame = 12;
+					else if (random == 2)
+						reset_frame = 14;
+					else if (random == 3)
+						reset_frame = 17;
+				} else {
+					_brie_chandelier_position = 4;
+					reset_frame = 25;
+				}
+				break;
+
+			case 4:
+				reset_frame = 25;
+				break;
+
+			case 5:
+				reset_frame = 21;
+				_brie_chandelier_position = 2;
+				break;
+
+			case 6:
+				reset_frame = 316;
+				_brie_chandelier_position = 2;
+				break;
+
+			default:
+				break;
+			}
+			break;
+
+		case 315:
+			_scene->freeAnimation(1);
+			break;
+		}
+
+		if (reset_frame >= 0) {
+			if (_scene->_animation[1])
+				_scene->_animation[1]->setCurrentFrame(reset_frame);
+			_brie_chandelier_frame = reset_frame;
+		}
 	}
 }
 
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 60cb63b..bd5a479 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -62,6 +62,7 @@ private:
 	int _brie_calling_frame;
 	int _brie_chandelier_frame;
 	int _talk_count;
+	int _converse_counter;
 	int _dynamic_brie;
 	int _dynamic_brie_2;
 	bool _start_walking;
@@ -78,6 +79,11 @@ public:
 	virtual void step();
 	virtual void preActions();
 	virtual void actions();
+
+	void handleConversation0();
+	void handleConversation1();
+	void handleAnimation0();
+	void handleAnimation1();
 };
 
 class Scene102 : public Scene1xx {
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index b02c57e..b02c251 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -614,7 +614,7 @@ void Scene::loadAnimation(const Common::String &resName, int trigger, int id) {
 	// WORKAROUND: If there's already a previous active animation used by the
 	// scene, then free it before we create the new one
 	if ((_vm->getGameID() == GType_RexNebular) && _animation[id])
-		freeAnimation();
+		freeAnimation(id);
 
 	DepthSurface depthSurface;
 	UserInterface interfaceSurface(_vm);
@@ -700,37 +700,40 @@ void Scene::resetScene() {
 }
 
 void Scene::freeAnimation() {
-	for (int j = 0; j < 10; j++) {
-		if (_animation[j]) {
-			if (j == 0) {
-				Player &player = _vm->_game->_player;
-
-				if (!_freeAnimationFlag) {
-					_spriteSlots.fullRefresh(true);
-					_sequences.scan();
-				}
+	for (int j = 0; j < 10; j++)
+		freeAnimation(j);
 
-				// Refresh the player
-				if (player._visible) {
-					player._forceRefresh = true;
-					player.update();
-				}
+	_freeAnimationFlag = false;
+}
+
+void Scene::freeAnimation(int idx) {
+	if (_animation[idx]) {
+		if (idx == 0) {
+			Player &player = _vm->_game->_player;
+
+			if (!_freeAnimationFlag) {
+				_spriteSlots.fullRefresh(true);
+				_sequences.scan();
 			}
 
-			// Remove any kernel messages in use by the animation
-			for (uint i = 0; i < _animation[j]->_messages.size(); ++i) {
-				int msgIndex = _animation[j]->_messages[i]._kernelMsgIndex;
-				if (msgIndex >= 0)
-					_kernelMessages.remove(msgIndex);
+			// Refresh the player
+			if (player._visible) {
+				player._forceRefresh = true;
+				player.update();
 			}
+		}
 
-			// Delete the animation
-			delete _animation[j];
-			_animation[j] = nullptr;
+		// Remove any kernel messages in use by the animation
+		for (uint i = 0; i < _animation[idx]->_messages.size(); ++i) {
+			int msgIndex = _animation[idx]->_messages[i]._kernelMsgIndex;
+			if (msgIndex >= 0)
+				_kernelMessages.remove(msgIndex);
 		}
-	}
 
-	_freeAnimationFlag = false;
+		// Delete the animation
+		delete _animation[idx];
+		_animation[idx] = nullptr;
+	}
 }
 
 void Scene::synchronize(Common::Serializer &s) {
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index ba37b97..d89cbb8 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -245,6 +245,11 @@ public:
 	void freeAnimation();
 
 	/**
+	 * Frees any given active animation for the scene
+	 */
+	void freeAnimation(int idx);
+
+	/**
 	* Synchronize the game
 	*/
 	void synchronize(Common::Serializer &s);


Commit: c275e304df97260ca79b5c2ca2b64e4de3670294
    https://github.com/scummvm/scummvm/commit/c275e304df97260ca79b5c2ca2b64e4de3670294
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-13T09:09:50+02:00

Commit Message:
MADS: Phantom: Rewrite logic for Scene102

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h
    engines/mads/scene.cpp
    engines/mads/scene.h
    engines/mads/sequence.cpp
    engines/mads/sequence.h



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index cb36be1..3b8016f 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -606,50 +606,86 @@ void Scene101::handleAnimation1() {
 /*------------------------------------------------------------------------*/
 
 Scene102::Scene102(MADSEngine *vm) : Scene1xx(vm) {
-	_animRunningFl = false;
+	_anim0RunningFl = false;
 }
 
 void Scene102::synchronize(Common::Serializer &s) {
 	Scene1xx::synchronize(s);
 
-	s.syncAsByte(_animRunningFl);
+	s.syncAsByte(_anim0RunningFl);
 }
 
 void Scene102::setup() {
-	//setPlayerSpritesPrefix();
+	setPlayerSpritesPrefix();
 	setAAName();
 }
 
 void Scene102::enter() {
-	_animRunningFl = false;
+	_anim0RunningFl = false;
 
 	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('x', 0));
 	_globals._spriteIndexes[3] = _scene->_sprites.addSprites("*RAL86");
 
 	if (_globals[kCurrentYear] == 1993) {
 		_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('z', -1));
-		// TODO
-		//_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+		_scene->drawToBackground(_globals._sequenceIndexes[0], 1, Common::Point(-32000, -32000), 0, 100);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
 	} else {
-		// TODO
+		_scene->_hotspots.activate(NOUN_CHANDELIER, false);
 	}
 
 	if (_scene->_priorSceneId == 101) {
 		_game._player._playerPos = Common::Point(97, 79);
 		_game._player._facing = FACING_SOUTHEAST;
-		// TODO
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 4);
 		_game._player.walk(Common::Point(83, 87), FACING_SOUTHEAST);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
 	} else if (_scene->_priorSceneId == 104) {
 		// Player fell from pit -> death
-		// TODO
+		Common::Point deathPos = Common::Point(0, 0);
+		int deathScale = 0;
+		int deathDepth = 0;
+		_game._player._stepEnabled = false;
+		_game._player._visible = false;
+
+		switch (_globals[36]) {
+		case 0:
+			deathPos = Common::Point(221, 57);
+			deathScale = 50;
+			deathDepth = 14;
+			break;
+
+		case 1:
+			deathPos = Common::Point(219, 85);
+			deathScale = 60;
+			deathDepth = 6;
+			break;
+
+		case 2:
+			deathPos = Common::Point(257, 138);
+			deathScale = 76;
+			deathDepth = 1;
+			break;
+
+		default:
+			break;
+		}
+		_scene->_userInterface.emptyConversationList();
+		_scene->_userInterface.setup(kInputConversation);
+		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], deathDepth);
+		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], deathPos);
+		_scene->_sequences.setScale(_globals._sequenceIndexes[3], deathScale);
+		_scene->_sequences.setTimingTrigger(120, 65);
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 4);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
 	} else if (_scene->_priorSceneId == 103 || _scene->_priorSceneId != -1) {
 		_game._player._playerPos = Common::Point(282, 145);
 		_game._player._facing = FACING_WEST;
-		_animRunningFl = true;
-		// TODO: Door closing animation
+		_anim0RunningFl = true;
+		_scene->loadAnimation(formAnimName('d', 1), 60, 0);
 	} else if (_scene->_priorSceneId == -1) {
-		// TODO
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 4);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
 	}
 
@@ -657,12 +693,20 @@ void Scene102::enter() {
 }
 
 void Scene102::step() {
-	if (_game._trigger == 60) {		// Door closes
-		// TODO
-		_animRunningFl = false;
-	} else if (_game._trigger == 65) {		// Death
-		// TODO
-		_scene->_currentSceneId = 104;
+	if (_game._trigger == 60) {
+		// Door closes
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 4);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+		_anim0RunningFl = false;
+	} else if (_game._trigger == 65) {
+		// Death
+		if (_globals[kDeathLocation] == 0)
+			_vm->_dialogs->show(10232);
+		else
+			_vm->_dialogs->show(10229);
+
+		_vm->_sound->command(16);
+		_scene->_nextSceneId = 104;
 	}
 }
 
@@ -675,34 +719,31 @@ void Scene102::preActions() {
 void Scene102::actions() {
 	if (_action.isAction(VERB_WALK_DOWN, NOUN_AISLE)) {
 		_scene->_nextSceneId = 101;
-		_game._player._stepEnabled = true;
-	}
-
-	if (_action.isAction(VERB_WALK_THROUGH, NOUN_ORCHESTRA_DOOR) ||
+	} else if (_action.isAction(VERB_WALK_THROUGH, NOUN_ORCHESTRA_DOOR) ||
 		_action.isAction(VERB_PUSH, NOUN_ORCHESTRA_DOOR) ||
 		_action.isAction(VERB_OPEN, NOUN_ORCHESTRA_DOOR)) {
-		if (_animRunningFl) {
-			// TODO
+		if (_anim0RunningFl) {
+			_scene->_sequences.setTimingTrigger(15, 70);
+			_game._player._stepEnabled = false;
 		} else {
-			_scene->_nextSceneId = 103;		// FIXME: temporary HACK - remove!
-
 			switch (_game._trigger) {
 			case 70:	// try again
 			case 0:
-				// TODO
+				_scene->deleteSequence(_globals._sequenceIndexes[2]);
+				_scene->loadAnimation(formAnimName('d', 0), 1, 0);
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
 				break;
 			case 1:
 				_scene->_nextSceneId = 103;
 				break;
+			default:
+				break;
 			}
 		}
-
-		_game._player._stepEnabled = true;
-	}
-
-	// TODO: Look around
-
-	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+	} else if (_action._lookFlag)
+		_vm->_dialogs->show(10210);
+	else if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
 		if (_action.isObject(NOUN_PIT))
 			_vm->_dialogs->show(10211);
 		else if (_action.isObject(NOUN_SEATS))
@@ -740,18 +781,12 @@ void Scene102::actions() {
 			_vm->_dialogs->show(10227);
 		else if (_action.isObject(NOUN_CHANDELIER))
 			_vm->_dialogs->show(10231);
-		else
-			return;
-
-		_game._player._stepEnabled = true;
-	}
-
-	if (_action.isAction(VERB_CLOSE, NOUN_ORCHESTRA_DOOR)) {
+	} else if (_action.isAction(VERB_CLOSE, NOUN_ORCHESTRA_DOOR)) {
 		_vm->_dialogs->show(10228);
-		_game._player._stepEnabled = true;
 	}
-}
 
+	_game._player._stepEnabled = false;
+}
 
 /*------------------------------------------------------------------------*/
 
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index bd5a479..2da9ba7 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -88,7 +88,7 @@ public:
 
 class Scene102 : public Scene1xx {
 private:
-	bool _animRunningFl;
+	bool _anim0RunningFl;
 
 public:
 	Scene102(MADSEngine *vm);
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index b02c251..0db0f93 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -754,4 +754,12 @@ void Scene::setDynamicAnim(int id, int anim_id, int segment) {
 void Scene::setCamera(Common::Point pos) {
 	warning("TODO: Scene::setCamera");
 }
+
+void Scene::drawToBackground(int series_id, int sprite_id, Common::Point pos, int depth, int scale) {
+	warning("TODO: Scene::drawToBackground");
+}
+
+void Scene::deleteSequence(int idx) {
+	warning("TODO: Scene::deleteSequence");
+}
 } // End of namespace MADS
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index d89cbb8..fd4ed24 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -256,6 +256,8 @@ public:
 
 	void setDynamicAnim(int id, int anim_id, int segment);
 	void setCamera(Common::Point pos);
+	void drawToBackground(int series_id, int sprite_id, Common::Point pos, int depth, int scale);
+	void deleteSequence(int idx);
 };
 
 } // End of namespace MADS
diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp
index dc67006..3b261f5 100644
--- a/engines/mads/sequence.cpp
+++ b/engines/mads/sequence.cpp
@@ -555,4 +555,8 @@ int SequenceList::addStampCycle(int srcSpriteIdx, bool flipped, int sprite) {
 	return -1;
 }
 
+int SequenceList::setTimingTrigger(int delay, int code) {
+	warning("TODO: SequenceList::setTimingTrigger");
+	return -1;
+}
 } // End of namespace
diff --git a/engines/mads/sequence.h b/engines/mads/sequence.h
index df49170..0343e9c 100644
--- a/engines/mads/sequence.h
+++ b/engines/mads/sequence.h
@@ -127,6 +127,7 @@ public:
 	void setMotion(int seqIndex, int flags, int deltaX, int deltaY);
 
 	int addStampCycle(int srcSpriteIdx, bool flipped, int sprite);
+	int setTimingTrigger(int delay, int code);
 };
 
 } // End of namespace MADS


Commit: 79fbcb96c3532e730ad8298d96f56f4a52c77ead
    https://github.com/scummvm/scummvm/commit/79fbcb96c3532e730ad8298d96f56f4a52c77ead
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-15T11:21:31+02:00

Commit Message:
MADS: Add logic for scene 103, some rework on animations

Changed paths:
    engines/mads/conversations.cpp
    engines/mads/conversations.h
    engines/mads/game.cpp
    engines/mads/game.h
    engines/mads/phantom/globals_phantom.cpp
    engines/mads/phantom/globals_phantom.h
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h
    engines/mads/player.cpp
    engines/mads/player.h
    engines/mads/rails.cpp
    engines/mads/rails.h
    engines/mads/scene.cpp
    engines/mads/scene.h
    engines/mads/sequence.cpp
    engines/mads/sequence.h



diff --git a/engines/mads/conversations.cpp b/engines/mads/conversations.cpp
index 8981578..52a6404 100644
--- a/engines/mads/conversations.cpp
+++ b/engines/mads/conversations.cpp
@@ -49,6 +49,10 @@ void GameConversation::exportPointer(int *val) {
 	warning("TODO GameConversation::exportPointer");
 }
 
+void GameConversation::exportValue(int val) {
+	warning("TODO GameConversation::exportValue");
+}
+
 void GameConversation::setHeroTrigger(int val) {
 	warning("TODO: GameConversation::setHeroTrigger");
 }
@@ -56,4 +60,9 @@ void GameConversation::setHeroTrigger(int val) {
 void GameConversation::setInterlocutorTrigger(int val) {
 	warning("TODO: GameConversation::setInterlocutorTrigger");
 }
+
+int* GameConversation::getVariable(int idx) {
+	warning("TODO: GameConversation::getVariable");
+	return nullptr;
+}
 } // End of namespace MADS
diff --git a/engines/mads/conversations.h b/engines/mads/conversations.h
index 9e25eb9..225fc4f 100644
--- a/engines/mads/conversations.h
+++ b/engines/mads/conversations.h
@@ -42,10 +42,13 @@ public:
 	 */
 	virtual ~GameConversation();
 
+	int* getVariable(int idx);
+
 	void get(int id);
 	void run(int id);
 	void stop();
 	void exportPointer(int *val);
+	void exportValue(int val);
 	void setHeroTrigger(int val);
 	void setInterlocutorTrigger(int val);
 
diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp
index 332ac43..311a95c 100644
--- a/engines/mads/game.cpp
+++ b/engines/mads/game.cpp
@@ -599,4 +599,8 @@ void Game::createThumbnail() {
 	::createThumbnail(_saveThumb, _vm->_screen.getData(), MADS_SCREEN_WIDTH, MADS_SCREEN_HEIGHT, thumbPalette);
 }
 
+void Game::syncTimers(int slave_type, int slave_id, int master_type, int master_id) {
+	warning("TODO: Game_syncTimers");
+}
+
 } // End of namespace MADS
diff --git a/engines/mads/game.h b/engines/mads/game.h
index 95b54b0..2a1daac 100644
--- a/engines/mads/game.h
+++ b/engines/mads/game.h
@@ -235,6 +235,9 @@ public:
 	 * Creates a temporary thumbnail for use in saving games
 	 */
 	void createThumbnail();
+
+	void syncTimers(int slave_type, int slave_id, int master_type, int master_id);
+
 };
 
 } // End of namespace MADS
diff --git a/engines/mads/phantom/globals_phantom.cpp b/engines/mads/phantom/globals_phantom.cpp
index e0db0a1..dd3bd84 100644
--- a/engines/mads/phantom/globals_phantom.cpp
+++ b/engines/mads/phantom/globals_phantom.cpp
@@ -34,6 +34,7 @@ PhantomGlobals::PhantomGlobals()
 	resize(210);
 	_spriteIndexes.resize(30);
 	_sequenceIndexes.resize(30);
+	_animationIndexes.resize(30);
 }
 
 void PhantomGlobals::synchronize(Common::Serializer &s) {
@@ -41,6 +42,7 @@ void PhantomGlobals::synchronize(Common::Serializer &s) {
 
 	_spriteIndexes.synchronize(s);
 	_sequenceIndexes.synchronize(s);
+	_animationIndexes.synchronize(s);
 }
 
 
diff --git a/engines/mads/phantom/globals_phantom.h b/engines/mads/phantom/globals_phantom.h
index c23b53c..cf35b40 100644
--- a/engines/mads/phantom/globals_phantom.h
+++ b/engines/mads/phantom/globals_phantom.h
@@ -124,6 +124,7 @@ class PhantomGlobals : public Globals {
 public:
 	SynchronizedList _spriteIndexes;
 	SynchronizedList _sequenceIndexes;
+	SynchronizedList _animationIndexes;
 public:
 	/**
 	 * Constructor
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index f7f4d15..83b7f8b 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -47,7 +47,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 102:	// music stands
 		return new Scene102(vm);
 	case 103:	// below stage
-		return new DummyScene(vm);	// TODO
+		return new Scene103(vm);
 	case 104:	// stage
 		return new DummyScene(vm);	// TODO
 	case 105:	// ground floor, storage room
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 3b8016f..979f978 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -187,8 +187,8 @@ void Scene101::enter() {
 		_brie_chandelier_position = 3;
 		_game._player.setWalkTrigger(50);
 
-		_scene->loadAnimation(formAnimName('b', 9), 1, 1);
-		_scene->loadAnimation(formAnimName('b', 8), 1, 0);
+		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('b', 9), 1);
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('b', 8), 1);
 
 		_anim_0_running  = true;
 		_anim_1_running  = true;
@@ -210,7 +210,7 @@ void Scene101::enter() {
 
 		_talk_count = 0;
 	} else if (_globals[kBrieTalkStatus] == 1) {
-		_scene->loadAnimation(formAnimName('b', 9), 1, 1);
+		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('b', 9), 1);
 		_dynamic_brie = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
 		_scene->_dynamicHotspots[_dynamic_brie]._articleNumber = PREP_ON;
 		_scene->setDynamicAnim(_dynamic_brie, 1, 1);
@@ -223,8 +223,7 @@ void Scene101::enter() {
 			_vm->_gameConv->run(1);
 			_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
 			_brie_chandelier_position = 4;
-			if (_scene->_animation[1])
-				_scene->_animation[1]->setCurrentFrame(25);
+			_scene->setAnimFrame(_globals._animationIndexes[1], 25);
 		}
 	} else if (_scene->_priorSceneId == 202) {
 		if (_globals[kJacquesStatus] == 1)
@@ -251,7 +250,7 @@ void Scene101::step() {
 	if (_anim_1_running) {
 		handleAnimation1();
 
-		if (_scene->_animation[1]->getCurrentFrame() == 80) {
+		if (_scene->getAnimFrame(_globals._animationIndexes[1]) == 80) {
 			_game._player._stepEnabled = true;
 			_game._player.setWalkTrigger(55);
 		}
@@ -425,8 +424,8 @@ void Scene101::handleAnimation0() {
 	int random;
 	int reset_frame;
 
-	if (_scene->_animation[0]->getCurrentFrame() != _brie_calling_frame) {
-		_brie_calling_frame = _scene->_animation[0]->getCurrentFrame();
+	if (_scene->getAnimFrame(_globals._animationIndexes[0]) != _brie_calling_frame) {
+		_brie_calling_frame = _scene->getAnimFrame(_globals._animationIndexes[0]);
 		reset_frame = -1;
 		switch (_brie_calling_frame) {
 		case 1:
@@ -493,8 +492,7 @@ void Scene101::handleAnimation0() {
 		}
 
 		if (reset_frame >= 0) {
-			if (_scene->_animation[0])
-				_scene->_animation[0]->setCurrentFrame(reset_frame);
+			_scene->setAnimFrame(_globals._animationIndexes[0], reset_frame);
 			_brie_calling_frame = reset_frame;
 		}
 	}
@@ -504,8 +502,8 @@ void Scene101::handleAnimation1() {
 	int random;
 	int reset_frame;
 
-	if (_scene->_animation[1]->getCurrentFrame() != _brie_chandelier_frame) {
-		_brie_chandelier_frame = _scene->_animation[1]->getCurrentFrame();
+	if (_scene->getAnimFrame(_globals._animationIndexes[1]) != _brie_chandelier_frame) {
+		_brie_chandelier_frame = _scene->getAnimFrame(_globals._animationIndexes[1]);
 		reset_frame = -1;
 		switch (_brie_chandelier_frame) {
 		case 1:
@@ -596,8 +594,7 @@ void Scene101::handleAnimation1() {
 		}
 
 		if (reset_frame >= 0) {
-			if (_scene->_animation[1])
-				_scene->_animation[1]->setCurrentFrame(reset_frame);
+			_scene->setAnimFrame(_globals._animationIndexes[1], reset_frame);
 			_brie_chandelier_frame = reset_frame;
 		}
 	}
@@ -683,7 +680,7 @@ void Scene102::enter() {
 		_game._player._playerPos = Common::Point(282, 145);
 		_game._player._facing = FACING_WEST;
 		_anim0RunningFl = true;
-		_scene->loadAnimation(formAnimName('d', 1), 60, 0);
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 1), 60);
 	} else if (_scene->_priorSceneId == -1) {
 		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 4);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
@@ -711,9 +708,8 @@ void Scene102::step() {
 }
 
 void Scene102::preActions() {
-	if (_action.isAction(VERB_OPEN, NOUN_ORCHESTRA_DOOR) || _action.isAction(VERB_PUSH, NOUN_ORCHESTRA_DOOR)) {
+	if (_action.isAction(VERB_OPEN, NOUN_ORCHESTRA_DOOR) || _action.isAction(VERB_PUSH, NOUN_ORCHESTRA_DOOR))
 		_game._player.walk(Common::Point(282, 145), FACING_EAST);
-	}
 }
 
 void Scene102::actions() {
@@ -730,7 +726,7 @@ void Scene102::actions() {
 			case 70:	// try again
 			case 0:
 				_scene->deleteSequence(_globals._sequenceIndexes[2]);
-				_scene->loadAnimation(formAnimName('d', 0), 1, 0);
+				_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 0), 1);
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;
 				break;
@@ -781,14 +777,1672 @@ void Scene102::actions() {
 			_vm->_dialogs->show(10227);
 		else if (_action.isObject(NOUN_CHANDELIER))
 			_vm->_dialogs->show(10231);
-	} else if (_action.isAction(VERB_CLOSE, NOUN_ORCHESTRA_DOOR)) {
+	} else if (_action.isAction(VERB_CLOSE, NOUN_ORCHESTRA_DOOR))
 		_vm->_dialogs->show(10228);
-	}
 
 	_game._player._stepEnabled = false;
 }
 
 /*------------------------------------------------------------------------*/
+Scene103::Scene103(MADSEngine *vm) : Scene1xx(vm) {
+	_jacquesAction = -1;
+	_lastRandom = -1;
+	_standPosition = -1;
+	_hotspotPrompt1 = -1;
+	_hotspotPrompt2 = -1;
+	_hotspotPrompt3 = -1;
+	_hotspotPrompt4 = -1;
+	_hotspotPrompt5 = -1;
+	_hotspotRightFloor1 = -1;
+	_hotspotRightFloor2 = -1;
+	_hotspotLeftFloor1 = -1;
+	_hotspotLeftFloor2 = -1;
+	_hotspotGentleman = -1;
+	_convCount = -1;
+	_lastStairFrame = -1;
+	_lastJacquesFrame = -1;
+	_talkCount = -1;
+
+	_anim0ActvFl = false;
+	_anim1ActvFl = false;
+	_anim2ActvFl = false;
+	_anim3ActvFl = false;
+	_anim4ActvFl = false;
+	_anim5ActvFl = false;
+	_anim6ActvFl = false;
+	_climbThroughTrapFl = false;
+	_guardFrameFl = false;
+	_sitFl = false;
+}
+
+void Scene103::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+	s.syncAsSint16LE(_jacquesAction);
+	s.syncAsSint16LE(_lastRandom);
+	s.syncAsSint16LE(_standPosition);
+	s.syncAsSint16LE(_hotspotPrompt1);
+	s.syncAsSint16LE(_hotspotPrompt2);
+	s.syncAsSint16LE(_hotspotPrompt3);
+	s.syncAsSint16LE(_hotspotPrompt4);
+	s.syncAsSint16LE(_hotspotPrompt5);
+	s.syncAsSint16LE(_hotspotRightFloor1);
+	s.syncAsSint16LE(_hotspotRightFloor2);
+	s.syncAsSint16LE(_hotspotLeftFloor1);
+	s.syncAsSint16LE(_hotspotLeftFloor2);
+	s.syncAsSint16LE(_convCount);
+	s.syncAsSint16LE(_lastStairFrame);
+
+	s.syncAsByte(_anim0ActvFl);
+	s.syncAsByte(_anim1ActvFl);
+	s.syncAsByte(_anim2ActvFl);
+	s.syncAsByte(_anim3ActvFl);
+	s.syncAsByte(_anim4ActvFl);
+	s.syncAsByte(_anim5ActvFl);
+	s.syncAsByte(_anim6ActvFl);
+	s.syncAsByte(_climbThroughTrapFl);
+	s.syncAsByte(_guardFrameFl);
+	s.syncAsByte(_sitFl);
+}
+
+void Scene103::setup() {
+	setPlayerSpritesPrefix();
+	setAAName();
+
+	_scene->_initialVariant = 0;
+
+	if ((_globals[kPrompterStandStatus] == 1) || (_globals[kCurrentYear] == 1881)) {
+		_scene->_initialVariant = 1;
+		if ((_globals[kJacquesStatus] == 0) && (_globals[kCurrentYear] == 1881))
+			_scene->_initialVariant = 2;
+		else if ((_globals[kJacquesStatus] >= 1) && (_globals[kCurrentYear] == 1881))
+			_scene->_initialVariant = 3;
+	}
+
+	_scene->addActiveVocab(NOUN_PROMPTERS_STAND);
+	_scene->addActiveVocab(NOUN_JACQUES);
+	_scene->addActiveVocab(NOUN_GENTLEMAN);
+	_scene->addActiveVocab(NOUN_CLIMB);
+}
+
+void Scene103::enter() {
+	if (_scene->_priorSceneId != -1) {
+		_anim0ActvFl = false;
+		_anim1ActvFl = false;
+		_anim2ActvFl = false;
+		_anim3ActvFl = false;
+		_anim4ActvFl = false;
+		_anim5ActvFl = false;
+		_anim6ActvFl = false;
+		_climbThroughTrapFl = false;
+		_guardFrameFl = false;
+		_sitFl = false;
+		_jacquesAction = 1; 
+		_lastRandom = 0;
+		_standPosition = 0;
+	}
+
+	if (_globals[kJacquesStatus] >= 1) {
+		if (_game._objects.isInRoom(OBJ_KEY)) {
+			_globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('x', 2), false);
+			_globals._spriteIndexes[8] = _scene->_sprites.addSprites("*RRD_9", false);
+		}
+		_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('f', 3), false);
+		_globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('c', 1), false);
+		_globals._spriteIndexes[7] = _scene->_sprites.addSprites(formAnimName('f', 1), false);
+	} else {
+		_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('f', 0), false);
+		_globals._spriteIndexes[10] = _scene->_sprites.addSprites(formAnimName('a', 3), false);
+	}
+
+	_globals._spriteIndexes[9] = _scene->_sprites.addSprites(formAnimName('x', 3), false);
+	_globals._spriteIndexes[11] = _scene->_sprites.addSprites(formAnimName('a', 2), false);
+	_globals._spriteIndexes[12] = _scene->_sprites.addSprites(formAnimName('f', 2), false);
+	_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('x', 0), false);
+	_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('x', 1), false);
+	_globals._spriteIndexes[2] = _scene->_sprites.addSprites("*RDR_6", false);
+
+	adjustRails(_scene->_initialVariant);
+
+	_scene->_hotspots.activate(NOUN_JACQUES, false);
+	_scene->_hotspots.activate(NOUN_KEY,  false);
+
+	_vm->_gameConv->get(12);
+
+	if (_globals[kTrapDoorStatus] == 0) {
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 5);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+
+		_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, 2);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 3);
+	} else if (_globals[kTrapDoorStatus] == 1) {
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+
+		_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 3);
+	}
+
+	Common::Point promptPos;
+	Facing promptFacing;
+
+	if (_globals[kJacquesStatus] == 0) {
+		promptPos = Common::Point(115, 142);
+		promptFacing = FACING_NORTHEAST;
+	} else {
+		promptPos = Common::Point(171, 142);
+		promptFacing = FACING_NORTHWEST;
+	}
+
+	if ((_globals[kPrompterStandStatus] == 1) || (_globals[kCurrentYear] == 1881)) {
+		if (_globals[kJacquesStatus] >= 1) {
+			_globals._sequenceIndexes[7] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[7], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[7], 1);
+
+			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
+			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+
+		} else {
+			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
+			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+
+			_globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 1) ; 
+		}
+
+		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(121, 79, 40, 63));
+		_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, promptPos, promptFacing);
+
+		_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(161, 67, 16, 75));
+		_scene->_dynamicHotspots[_hotspotPrompt2]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotPrompt2, promptPos, promptFacing);
+
+		_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(177, 90, 18, 52));
+		_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, promptPos, promptFacing);
+
+		_hotspotPrompt4 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(114, 100, 7, 38));
+		_scene->_dynamicHotspots[_hotspotPrompt4]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotPrompt4, promptPos, promptFacing);
+
+		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, -1, Common::Rect(121, 49, 40, 30));
+		_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(196, 134), FACING_SOUTHWEST);
+		_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
+
+		_hotspotRightFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(154, 6, 41, 6));
+		_scene->_dynamicHotspots[_hotspotRightFloor1]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotRightFloor1, Common::Point(171, 142), FACING_NONE);
+
+		_hotspotRightFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(114, 136, 32, 6));
+		_scene->_dynamicHotspots[_hotspotRightFloor2]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotRightFloor2, Common::Point(127, 140), FACING_NONE);
+
+		if ((_globals[kJacquesStatus] == 0) && (_globals[kCurrentYear] == 1881)) {
+			if (_globals[kJacquesNameIsKnown] >= 1) {
+				_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(156, 116, 33, 31));
+				_scene->_dynamicHotspots[_hotspotGentleman]._articleNumber = PREP_ON;
+				_scene->_dynamicHotspots.setPosition(_hotspotGentleman, Common::Point(206, 148), FACING_NORTHWEST);
+			} else {
+				_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_GENTLEMAN, VERB_WALKTO, SYNTAX_MASC_NOT_PROPER, -1, Common::Rect(156, 116, 33, 31));
+				_scene->_dynamicHotspots[_hotspotGentleman]._articleNumber = PREP_ON;
+				_scene->_dynamicHotspots.setPosition(_hotspotGentleman, Common::Point(206, 148), FACING_NORTHWEST);
+			}
+			int tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(149, 140, 13, 7));
+			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
+			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(155, 144), FACING_NONE);
+
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(187, 136, 8, 7));
+			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
+			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(195, 139), FACING_NONE);
+		} else if ((_globals[kJacquesStatus] >= 1) && (_globals[kCurrentYear] == 1881)) {
+			_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 3);
+			if (_game._objects.isInRoom(OBJ_KEY)) {
+				_globals._sequenceIndexes[5] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[5], false, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 14);
+				_scene->_hotspots.activate(NOUN_KEY, true);
+			}
+			_scene->_hotspots.activate(NOUN_JACQUES, true);
+			_scene->_dynamicHotspots.remove(_hotspotRightFloor2);
+
+			int tmpIdx = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(114, 132, 30, 10));
+			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
+			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(95, 144), FACING_NORTHEAST);
+
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(94, 129, 18, 4));
+			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
+			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(95, 133), FACING_NONE);
+
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(94, 132, 3, 9));
+			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
+			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(93, 135), FACING_NONE);
+
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(112, 150, 21, 3));
+			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
+			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(118, 154), FACING_NONE);
+
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(98, 146, 21, 4));
+			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
+			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(104, 148), FACING_NONE);
+		}
+	} else if (_globals[kPrompterStandStatus] == 0) {
+		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
+		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139)); 
+
+		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(2, 79, 40, 63));
+		_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, Common::Point(59, 140), FACING_NORTHWEST);
+
+		_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(42, 67, 16, 75));
+		_scene->_dynamicHotspots[_hotspotPrompt2]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotPrompt2, Common::Point(59, 140), FACING_NORTHWEST);
+
+		_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(58, 90, 18, 52));
+		_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, Common::Point(59, 140), FACING_NORTHWEST);
+
+		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, -1, Common::Rect(2, 49, 40, 30));
+		_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(79, 132), FACING_SOUTHWEST);
+		_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
+
+		_hotspotLeftFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(35, 137, 40, 5));
+		_scene->_dynamicHotspots[_hotspotLeftFloor1]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor1, Common::Point(59, 140), FACING_NONE);
+		_hotspotLeftFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(76, 129, 6, 6));
+		_scene->_dynamicHotspots[_hotspotLeftFloor2]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor2, Common::Point(80, 135), FACING_NONE);
+	}
+
+	if ((_globals[kJacquesStatus] == 0) && (_globals[kCurrentYear] == 1881)) {
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('j', 1), 1);
+		_anim0ActvFl = true;
+		_scene->setAnimFrame(_globals._animationIndexes[0], 9);
+	}
+
+	if (_scene->_priorSceneId == 104) {
+		_game._player._stepEnabled = false;
+		_game._player._visible = false;
+		if (_globals[kRoom103104Transition] == 0) {
+			_globals[kRoom103104Transition] = 1;
+			_globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -2);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 4);
+			_standPosition = 1;
+			_game._player._playerPos = Common::Point(79, 132);
+			_scene->_sequences.setTimingTrigger(1, 100);
+		} else {
+			_standPosition = 2;
+			_globals._animationIndexes[3] = _scene->loadAnimation(formAnimName('w', 1), 0);
+			_anim3ActvFl = true;
+			_game._player._stepEnabled = true;
+			_game._player._playerPos = Common::Point(196, 134);
+			_scene->setAnimFrame(_globals._animationIndexes[3], 36);
+
+			_scene->deleteSequence(_globals._sequenceIndexes[3]);
+			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13);  
+			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+		}
+
+		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
+
+	} else if (_scene->_priorSceneId == 102) {
+		_game._player.firstWalk(Common::Point(-20, 140), FACING_EAST, Common::Point(15, 147), FACING_EAST, true);
+		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
+
+	} else if ((_scene->_priorSceneId == 105) || (_scene->_priorSceneId != -1)) {
+		_game._player._playerPos = Common::Point(287, 135);
+		_game._player._facing = FACING_WEST;
+		_game._player._stepEnabled = false;
+		_game._player.walk(Common::Point(252, 134), FACING_WEST);
+		_game._player.setWalkTrigger(65);
+		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 6);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
+
+	} else if (_scene->_priorSceneId == -1) {
+		if (_standPosition == 1) {
+			_game._player._visible = false;
+			_globals._animationIndexes[5] = _scene->loadAnimation(formAnimName('w', 3), 0);
+			_anim5ActvFl = true;
+			_scene->setAnimFrame(_globals._animationIndexes[5], 33);
+
+		} else if (_standPosition == 2) {
+
+			_scene->deleteSequence(_globals._sequenceIndexes[3]);
+			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13);  
+			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+			_game._player._visible = false;
+			_globals._animationIndexes[3] = _scene->loadAnimation(formAnimName('w', 1), 0);
+			_anim3ActvFl = true;
+			_game._player._stepEnabled = true;
+			_scene->setAnimFrame(_globals._animationIndexes[3], 36);
+
+		} else if (_vm->_gameConv->_restoreRunning == 12) {
+			_vm->_gameConv->run(12);
+			_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+			_vm->_gameConv->exportValue(_globals[kMusicSelected]);
+			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
+		}
+		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
+	}
+
+	sceneEntrySound();
+}
+
+void Scene103::step() {
+	if (_anim0ActvFl)
+		handleJacquesAnim();
+
+	if (_anim3ActvFl)
+		climbRightStairs();
+
+	if (_anim5ActvFl)
+		climbLeftStairs();
+
+	if (_anim4ActvFl)
+		descendRightStairs();
+
+	if (_anim6ActvFl)
+		descendLeftStairs();
+
+	if ((_globals[kWalkerConverse] == 2) || (_globals[kWalkerConverse] == 3)) {
+		++_convCount;
+		if (_convCount > 200)
+			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
+	}
+
+	switch (_game._trigger) {
+	case 65:
+		_scene->deleteSequence(_globals._sequenceIndexes[1]);
+		_globals._sequenceIndexes[1] = _scene->_sequences.addBackwardSequence(_globals._spriteIndexes[1], false, 8, 0, 0, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
+		_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 6);
+		_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 66);
+		_vm->_sound->command(66);
+		break; 
+
+	case 66: {
+		int syncIdx = _globals._sequenceIndexes[1];
+		_vm->_sound->command(25);
+		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 1);
+		_game.syncTimers(1, _globals._sequenceIndexes[1], 1, syncIdx); 
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
+		_game._player._stepEnabled = true;
+		}
+		break;
+
+	case 80:
+		_scene->_nextSceneId = 104;
+		_scene->_reloadSceneFlag = true;
+		break;
+
+	default:
+		break;
+	}
+
+	switch (_game._trigger) {
+	case 100:
+		_scene->deleteSequence(_globals._sequenceIndexes[10]);
+		_globals._sequenceIndexes[10] = _scene->_sequences.addBackwardSequence(_globals._spriteIndexes[10], false, 6, 0, 0, 1);
+		_scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 101);
+		_scene->_sequences.setRange(_globals._sequenceIndexes[10], -1, -2);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 4);
+		break; 
+
+	case 101:
+		_globals._animationIndexes[5] = _scene->loadAnimation(formAnimName('w', 3), 0);
+		_anim5ActvFl = true;
+		_scene->setAnimFrame(_globals._animationIndexes[5], 33);
+		_game._player._stepEnabled = true;
+		_game.syncTimers(3, _globals._animationIndexes[5], 1, _globals._sequenceIndexes[10]);
+		break;
+
+	default:
+		break;
+	}
+
+	switch (_game._trigger) {
+	case 0:
+		if (_anim1ActvFl) {
+			if ((_scene->getAnimFrame(_globals._animationIndexes[1]) == 10) && !_guardFrameFl) {
+				_vm->_sound->command(64);
+				_guardFrameFl = true;
+				_scene->deleteSequence(_globals._sequenceIndexes[0]);
+				_scene->deleteSequence(_globals._sequenceIndexes[9]);
+				_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 6, 0, 0, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[0], -1, -2);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 105);
+			}
+		} else if (_anim2ActvFl) {
+			if ((_scene->getAnimFrame(_globals._animationIndexes[2]) == 7) && !_guardFrameFl) {
+				_vm->_sound->command(64);
+				_guardFrameFl = true;
+				_scene->deleteSequence(_globals._sequenceIndexes[0]);
+				_scene->deleteSequence(_globals._sequenceIndexes[9]);
+				_globals._sequenceIndexes[0] = _scene->_sequences.addBackwardSequence(_globals._spriteIndexes[0], false, 6, 0, 0, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[0], -1, -2);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 110);
+			}
+		}
+		break;
+
+	case 105:
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, -2);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+		_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -2);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 2);
+		_guardFrameFl = false;
+		break;
+
+	case 110:
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+		_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 2);
+		_guardFrameFl = false;
+		break;
+
+	default:
+		break;
+	}
+
+	if (_globals[kJacquesStatus] == 3) {
+		warning("TODO: add a check on the return value of _vm->_sound->command ???");
+		_vm->_sound->command(38);
+	}
+}
+
+void Scene103::preActions() {
+	if (_action.isAction(VERB_OPEN, NOUN_DOOR))
+		_game._player._needToWalk = true;
+
+	if (_action.isAction(VERB_OPEN, NOUN_DOOR_TO_PIT)) {
+		_game._player.walk(Common::Point(0, 150), FACING_WEST);
+		_game._player._walkOffScreenSceneId = 102;
+	}
+
+	if ((_standPosition != 0) && !_action.isAction(VERB_CLIMB_THROUGH, NOUN_TRAP_DOOR) &&
+		!_action.isAction(VERB_OPEN, NOUN_TRAP_DOOR) &&
+		!_action.isAction(NOUN_CLIMB, NOUN_PROMPTERS_STAND) &&
+		!_action.isAction(VERB_PUSH, NOUN_TRAP_DOOR) &&
+		!_action.isAction(VERB_LOOK_THROUGH, NOUN_PROMPTERS_BOX) &&
+		!_action.isAction(VERB_PULL, NOUN_TRAP_DOOR)) {
+
+		if (_action.isAction(VERB_PULL) || _action.isAction(VERB_PUSH)) {
+			if (!_action.isAction(NOUN_LEVER) && !_game._trigger)
+				_game._player._needToWalk = false;
+		}
+
+		if ((_action.isAction(VERB_PUSH, NOUN_PROMPTERS_STAND)) || (_action.isAction(VERB_PULL, NOUN_PROMPTERS_STAND))) {
+			if (!_game._trigger)
+				_game._player._needToWalk = true;
+		}
+
+		if (_game._player._needToWalk) {
+			if (_globals[kPrompterStandStatus] == 0) {
+				switch (_game._trigger) {
+				case 0:
+					_scene->freeAnimation(5);
+					_game._player._readyToWalk = false;
+					_game._player._visible = false;
+					_game._player._stepEnabled = false;
+					_anim5ActvFl = false;
+					_anim6ActvFl = true;
+					_globals._animationIndexes[6] = _scene->loadAnimation(formAnimName('w', 4), 1);
+					break;
+
+				case 1:
+					_game._player._playerPos = Common::Point(79, 132);
+					_game._player._stepEnabled = true;
+					_game._player._visible = true;
+					_standPosition = 0;
+					_game._player._readyToWalk = true;
+					if (_action.isAction(VERB_PUSH, NOUN_PROMPTERS_STAND))
+						_game._player._needToWalk = false;
+					_anim6ActvFl = false;
+					_game._player.resetFacing(FACING_NORTHEAST);
+					_game.syncTimers(2, 0, 3, _globals._animationIndexes[6]);
+					break;
+
+				default:
+					break;
+				}
+			} else {
+				switch (_game._trigger) {
+				case 0:
+					_scene->freeAnimation(3);
+					_game._player._readyToWalk = false;
+					if (_action.isAction(VERB_PUSH, NOUN_PROMPTERS_STAND))
+						_game._player._needToWalk = true;
+					_game._player._visible = false;
+					_game._player._stepEnabled = false;
+					_anim3ActvFl = false;
+					_anim4ActvFl = true;
+					_globals._animationIndexes[4] = _scene->loadAnimation(formAnimName('w', 2), 1);
+					break;
+
+				case 1:
+					_game._player._playerPos = Common::Point(196, 134);
+					_game._player._stepEnabled = true;
+					_game._player._readyToWalk = true;
+					if (_action.isAction(VERB_PUSH, NOUN_PROMPTERS_STAND))
+						_game._player._needToWalk = false;
+					_game._player._visible = true;
+					_standPosition = 0;
+					_anim4ActvFl = false;
+					_game._player.resetFacing(FACING_NORTHEAST);
+					_game.syncTimers(2, 0, 3, _globals._animationIndexes[4]);
+					break;
+
+				default:
+					break;
+				}
+			}
+		}
+	}
+
+	if (_standPosition == 0) {
+		if ((_action.isAction(VERB_PUSH, NOUN_PROMPTERS_STAND)) || (_action.isAction(VERB_PULL, NOUN_PROMPTERS_STAND))) {
+			if (_globals[kCurrentYear] == 1993) {
+				if (_globals[kPrompterStandStatus] == 0)
+					_game._player.walk(Common::Point(2, 138), FACING_WEST);
+				else
+					_game._player.walk(Common::Point(176, 142), FACING_WEST);
+			}
+		}
+	}
+
+	if (_action.isAction(VERB_LOOK_THROUGH, NOUN_PROMPTERS_BOX) && (_standPosition == 0) && (_globals[kPrompterStandStatus] == 0) && (_globals[kCurrentYear] == 1993))
+		_game._player.walk(Common::Point(79, 132), FACING_SOUTHWEST);
+
+	if (_action.isAction(VERB_CLIMB_THROUGH, NOUN_TRAP_DOOR) && (_standPosition == 0) && (_globals[kPrompterStandStatus] == 1) && (_globals[kTrapDoorStatus] == 0))
+		_game._player.walk(Common::Point(196, 134), FACING_SOUTHWEST);
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_PIT))
+		_game._player._walkOffScreenSceneId = 102;
+
+	if ((_action.isAction(VERB_OPEN, NOUN_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(NOUN_LOCK, NOUN_DOOR)) && (_standPosition == 0))
+		_game._player.walk(Common::Point(252, 134), FACING_EAST);
+}
+
+void Scene103::actions() {
+	if (_action.isAction(VERB_OPEN, NOUN_DOOR_TO_PIT)) {
+		_scene->_nextSceneId = 102;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_vm->_gameConv->_running == 12) {
+		process_conv_jacques();
+		_action._inProgress = false;
+		return;
+	} 
+
+	if (_action.isAction(VERB_CLIMB_THROUGH, NOUN_TRAP_DOOR)) {
+		if (_globals[kTrapDoorStatus] == 1) {
+			_vm->_dialogs->show(10333);
+			_action._inProgress = false;
+			return;
+		} else if (_globals[kPrompterStandStatus] == 0) {
+			_vm->_dialogs->show(10341);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if ((_action.isAction(VERB_LOOK_THROUGH, NOUN_PROMPTERS_BOX)) && (_globals[kPrompterStandStatus] == 1)) {
+		_vm->_dialogs->show(10342);
+		_action._inProgress = false;
+		return;
+	}
+
+	if ((_action.isAction(NOUN_CLIMB, NOUN_PROMPTERS_STAND) && _standPosition == 0) ||
+		(_action.isAction(VERB_LOOK_THROUGH, NOUN_PROMPTERS_BOX) && (_standPosition == 0)) ||
+		(_action.isAction(VERB_CLIMB_THROUGH, NOUN_TRAP_DOOR) && (_standPosition == 0))) {
+		if (_globals[kPrompterStandStatus] == 0) {
+			if (_game._trigger == 0) {
+				if (_action.isAction(VERB_LOOK_THROUGH, NOUN_PROMPTERS_BOX)) {
+					_sitFl = true;
+					_globals._animationIndexes[5] = _scene->loadAnimation(formAnimName('w', 3), 115); 
+				} else
+					_globals._animationIndexes[5] = _scene->loadAnimation(formAnimName('w', 3), 0); 
+
+				_game._player._visible = false;
+				_game._player._stepEnabled = false;
+				_anim5ActvFl = true;
+				_game.syncTimers(3, _globals._animationIndexes[5], 2, 0);
+				_action._inProgress = false;
+				return;
+			}
+		} else if (_game._trigger == 0) {
+			if (_action.isAction(VERB_CLIMB_THROUGH, NOUN_TRAP_DOOR)) {
+				_climbThroughTrapFl = true;
+				_globals._animationIndexes[3] = _scene->loadAnimation(formAnimName('w', 1), 120);
+			} else
+				_globals._animationIndexes[3] = _scene->loadAnimation(formAnimName('w', 1), 0);
+
+			_game._player._visible = false;
+			_game._player._stepEnabled = false;
+			_anim3ActvFl = true;
+			_game.syncTimers(3, _globals._animationIndexes[3], 2, 0);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(NOUN_CLIMB, NOUN_PROMPTERS_STAND)) {
+		if (_standPosition != 0) {
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if ((_action.isAction(VERB_PUSH, NOUN_PROMPTERS_STAND)) || (_action.isAction(VERB_PULL, NOUN_PROMPTERS_STAND))) {
+		if (_globals[kCurrentYear] == 1993) {
+			if (_globals[kPrompterStandStatus] == 0) {
+				switch (_game._trigger) {
+				case 0:
+					if (_globals[kPrompterStandStatus] == 0) {
+						_game._player._stepEnabled = false;
+						_game._player._visible = false;
+						_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('s', 1), 75);
+						_game._player._priorTimer = _scene->_frameStartTime;
+						_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
+						_scene->deleteSequence(_globals._sequenceIndexes[3]);
+					}
+					break;
+
+				case 75:
+					if (_globals[kPrompterStandStatus] == 0) {
+						_globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, 1);
+						_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 1) ; 
+						_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+						_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
+						_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+						_game.syncTimers(1, _globals._sequenceIndexes[3], 3, _globals._animationIndexes[0]);
+						_globals[kPrompterStandStatus] = 1;
+						_game._player._stepEnabled = true;
+						_game._player._visible = true;
+						_game._player._playerPos = Common::Point(117, 139);
+						_game._player.resetFacing(FACING_EAST);
+						_game.syncTimers(2, 0, 3, _globals._animationIndexes[0]);
+
+						_scene->_dynamicHotspots.remove(_hotspotPrompt1);
+						_scene->_dynamicHotspots.remove(_hotspotPrompt2);
+						_scene->_dynamicHotspots.remove(_hotspotPrompt3);
+						_scene->_dynamicHotspots.remove(_hotspotPrompt5);
+						_scene->_dynamicHotspots.remove(_hotspotLeftFloor1);
+						_scene->_dynamicHotspots.remove(_hotspotLeftFloor2);
+
+						_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(121, 79, 40, 63));
+						_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, Common::Point(171, 142), FACING_NORTHWEST);
+
+						_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(161, 67, 16, 75));
+						_scene->_dynamicHotspots[_hotspotPrompt2]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotPrompt2, Common::Point(171, 142), FACING_NORTHWEST);
+
+						_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(177, 90, 18, 52));
+						_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, Common::Point(171, 142), FACING_NORTHWEST);
+
+						_hotspotPrompt4 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(114, 100, 7, 38));
+						_scene->_dynamicHotspots[_hotspotPrompt4]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotPrompt4, Common::Point(171, 142), FACING_NORTHWEST);
+
+						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, -1, Common::Rect(121, 49, 40, 30));
+						_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(196, 134), FACING_SOUTHWEST);
+						_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
+
+						_hotspotRightFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(154, 6, 41, 6));
+						_scene->_dynamicHotspots[_hotspotRightFloor1]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotRightFloor1, Common::Point(171, 142), FACING_NONE);
+
+						_hotspotRightFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(114, 136, 32, 6));
+						_scene->_dynamicHotspots[_hotspotRightFloor2]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotRightFloor2, Common::Point(127, 140), FACING_NONE);
+
+						_scene->changeVariant(1);
+						adjustRails(1);
+					}
+					break;
+
+				default:
+					break;
+				}
+			} else {
+				switch (_game._trigger) {
+				case 0:
+					if (_globals[kPrompterStandStatus] == 1) {
+						_game._player._stepEnabled = false;
+						_game._player._visible = false;
+						_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('s', 2), 75);
+						_game._player._priorTimer = _scene->_frameStartTime;
+						_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
+						_scene->deleteSequence(_globals._sequenceIndexes[12]);
+						_scene->deleteSequence(_globals._sequenceIndexes[3]);
+					}
+					break;
+
+				case 75:
+					if (_globals[kPrompterStandStatus] == 1) {
+						_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+						_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
+						_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139)); 
+						_game.syncTimers(1, _globals._sequenceIndexes[3], 3, _globals._animationIndexes[0]);
+						_globals[kPrompterStandStatus] = 0;
+						_game._player._stepEnabled = true;
+						_game._player._visible = true;
+						_game._player._playerPos = Common::Point(62, 142);
+						_game._player.resetFacing(FACING_WEST);
+						_game.syncTimers(2, 0, 3, _globals._animationIndexes[0]);
+						_scene->_dynamicHotspots.remove(_hotspotPrompt1);
+						_scene->_dynamicHotspots.remove(_hotspotPrompt2);
+						_scene->_dynamicHotspots.remove(_hotspotPrompt3);
+						_scene->_dynamicHotspots.remove(_hotspotPrompt4);
+						_scene->_dynamicHotspots.remove(_hotspotPrompt5);
+						_scene->_dynamicHotspots.remove(_hotspotRightFloor1);
+						_scene->_dynamicHotspots.remove(_hotspotRightFloor2);
+
+						_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(2, 79, 40, 63));
+						_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, Common::Point(59, 140), FACING_NORTHWEST);
+
+						_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(42, 67, 16, 75));
+						_scene->_dynamicHotspots[_hotspotPrompt2]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotPrompt2, Common::Point(59, 140), FACING_NORTHWEST);
+
+						_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(58, 90, 18, 52));
+						_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, Common::Point(59, 140), FACING_NORTHWEST);
+
+						_hotspotLeftFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(35, 137, 40, 5));
+						_scene->_dynamicHotspots[_hotspotLeftFloor1]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor1, Common::Point(59, 140), FACING_NONE);
+
+						_hotspotLeftFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(76, 129, 6, 6));
+						_scene->_dynamicHotspots[_hotspotLeftFloor2]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor2, Common::Point(80, 135), FACING_NONE);
+
+						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, -1, Common::Rect(2, 49, 40, 30));
+						_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
+						_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(79, 132), FACING_SOUTHWEST);
+						_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
+
+						_scene->changeVariant(0);
+						adjustRails(0);
+					}
+					break;
+
+				default:
+					break;
+				}
+			}
+		} else {
+			if (_globals[kJacquesNameIsKnown])
+				_vm->_dialogs->show(10340);
+			else
+				_vm->_dialogs->show(10350);
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR) || _action.isAction(VERB_OPEN, NOUN_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(NOUN_LOCK, NOUN_DOOR)) {
+		if ((_globals[kCurrentYear] == 1881) && !_action.isAction(NOUN_LOCK, NOUN_DOOR) && !_action.isAction(VERB_UNLOCK, NOUN_DOOR)) {
+			switch (_game._trigger) {
+			case (0):
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 5, 0, 0, 2);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[2], -1, -2);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], true);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 2);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 2, 3, 70);
+				break;
+
+			case 2:
+				_game._player._visible = true;
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[2]); 
+				_game._player.walk(Common::Point(295, 132), FACING_WEST);
+				_scene->_sequences.setTimingTrigger(180, 3);
+				break;
+
+			case 3:
+				_scene->_nextSceneId = 105;
+				break;
+
+			case 70:
+				_vm->_sound->command(24);
+				_scene->deleteSequence(_globals._sequenceIndexes[1]);
+				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 0, 0, 1);   
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14); 
+				_scene->_sequences.setRange(_globals._sequenceIndexes[1], -1, -2);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 71);
+				_vm->_sound->command(66);
+				break; 
+
+			case 71: {
+				int oldIdx = _globals._sequenceIndexes[1];
+				_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, -2);
+				_game.syncTimers(1, _globals._sequenceIndexes[1], 1, oldIdx); 
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
+				}
+				break;
+
+			default:
+				break;
+			}
+		} else {
+			switch (_game._trigger) {
+			case (0):
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;  
+				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 5, 0, 0, 1);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 4);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], true);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 1);
+				break;
+
+			case 1: {
+				int oldIdx = _globals._sequenceIndexes[2];
+				_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 4);
+				_game.syncTimers(1, _globals._sequenceIndexes[2], 1, oldIdx); 
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], false);
+				_scene->_sequences.setTimingTrigger(15, 2);
+				_vm->_sound->command(73);
+				}
+				break; 
+
+			case 2:
+				_scene->deleteSequence(_globals._sequenceIndexes[2]);
+				_globals._sequenceIndexes[2] = _scene->_sequences.addBackwardSequence(_globals._spriteIndexes[2], false, 5, 0, 0, 1);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 4);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], false);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 3);
+				break;
+
+			case 3:
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[2]); 
+				_game._player._visible = true;
+				if (_action.isAction(NOUN_LOCK) || _action.isAction(VERB_UNLOCK))
+					_vm->_dialogs->show(00032);
+				else
+					_vm->_dialogs->show(10335);
+
+				_game._player._stepEnabled = true;
+				break;
+
+			default:
+				break;
+			}
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_KEY) && (_game._objects.isInRoom(OBJ_KEY) || _game._trigger)) {
+		switch (_game._trigger) {
+		case (0):
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;  
+			_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 5, 0, 0, 2);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[8], 1, 5);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 5, 1);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
+			_action._inProgress = false;
+			return;
+			break;
+
+		case 1:
+			_scene->deleteSequence(_globals._sequenceIndexes[5]);
+			_scene->_hotspots.activate(NOUN_KEY, false);
+			_game._objects.addToInventory(OBJ_KEY);
+			_vm->_sound->command(26);
+			_action._inProgress = false;
+			return;
+			break;
+
+		case 2:
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); 
+			_game._player._visible = true;
+			_scene->_sequences.setTimingTrigger(20, 3);
+			_action._inProgress = false;
+			return;
+			break;
+
+		case 3:
+			_globals[kPlayerScore] += 5;
+			_vm->_dialogs->showItem(OBJ_KEY, 800, 0);
+			_game._player._stepEnabled = true;
+			_action._inProgress = false;
+			return;
+			break;
+
+		default:
+			break;
+		}
+	}
+
+	if (_action.isAction(VERB_TALK_TO, NOUN_GENTLEMAN) || _action.isAction(VERB_TALK_TO, NOUN_JACQUES)) {
+		if (_globals[kJacquesStatus] == 0) {
+			_vm->_gameConv->run(12);
+			_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+			_vm->_gameConv->exportValue(_globals[kMusicSelected]);
+		} else
+			_vm->_dialogs->show(10343);
+
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLIMB_THROUGH, NOUN_TRAP_DOOR) || _climbThroughTrapFl) {
+		if ((_standPosition == 2) && (_globals[kTrapDoorStatus] == 0))  {
+			switch (_game._trigger) {
+			case 0:
+			case 120:
+				if (!(_globals[kPlayerScoreFlags] & 1)) {
+					_globals[kPlayerScoreFlags] |= 1;
+					_globals[kPlayerScore] += 3;
+				}
+
+				_scene->freeAnimation(3);
+				_anim3ActvFl = false;
+				_climbThroughTrapFl = false;
+				_game._player._stepEnabled = false;
+				_globals._sequenceIndexes[11] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[11], false, 6, 0, 0, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[11], 5);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[11], -1, -2);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 0, 0, 1);
+				break;
+
+			case 1:
+				_globals[kRoom103104Transition] = 1;
+				_scene->_nextSceneId = 104;
+				break;
+
+			default:
+				break;
+			}
+		}
+		_action._inProgress = false;
+		return;
+	}    
+
+	if (_action.isAction(VERB_LOOK_THROUGH, NOUN_PROMPTERS_BOX) || _sitFl) {
+		if (_standPosition == 1) {
+			switch (_game._trigger) {
+			case 0:
+			case 115:
+				_scene->freeAnimation(5);
+				_anim5ActvFl = false;
+				_game._player._stepEnabled = false;
+				_globals._sequenceIndexes[10] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[10], false, 6, 0, 0, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 4);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[10], -1, -2);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 1);
+				if (!_sitFl)
+					_game.syncTimers(1, _globals._sequenceIndexes[10], 3, _globals._animationIndexes[5]);
+				_sitFl = false;
+				break;
+
+			case 1:
+				_globals[kRoom103104Transition] = 0;
+				_scene->_nextSceneId = 104;
+				break;
+
+			default:
+				break;
+			}
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_PUSH, NOUN_LEVER) || _action.isAction(VERB_PULL, NOUN_LEVER)) {
+		if (_globals[kTrapDoorStatus] == 1) { 
+			switch (_game._trigger) {
+			case 0:
+				_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('l', 1), 1);
+				_anim1ActvFl   = true;
+				_game._player._visible = false;
+				_game._player._stepEnabled = false;
+				_game.syncTimers(3, _globals._animationIndexes[1], 2, 0);
+				break;
+
+			case 1:
+				_anim1ActvFl    = false;
+				_game._player._visible = true;
+				_globals[kTrapDoorStatus] = 0; 
+				_game._player._stepEnabled = true;
+				_game.syncTimers(2, 0, 3, _globals._animationIndexes[1]);
+				break;
+
+			default:
+				break;
+			}
+		} else {
+			switch (_game._trigger) {
+			case 0:
+				_globals._animationIndexes[2] = _scene->loadAnimation(formAnimName('l', 2), 1);
+				_anim2ActvFl = true;
+				_game._player._visible = false;
+				_game._player._stepEnabled = false;
+				_game.syncTimers(3, _globals._animationIndexes[2], 2, 0);
+				break;
+
+			case 1:
+				_anim2ActvFl = false;
+				_game._player._visible = true;
+				_globals[kTrapDoorStatus] = 1; 
+				_game._player._stepEnabled = true;
+				_game.syncTimers(2, 0, 3, _globals._animationIndexes[2]);
+				break;
+
+			default:
+				break;
+			}
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action._lookFlag) {
+		if ((_globals[kCurrentYear] == 1881) && (_globals[kJacquesStatus] >= 1))
+			_vm->_dialogs->show(10311);
+		else
+			_vm->_dialogs->show(10310);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isAction(NOUN_PROMPTERS_STAND)) {
+			if (_globals[kJacquesStatus] >= 1)
+				_vm->_dialogs->show(10349);
+			else if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(10312);
+			else
+				_vm->_dialogs->show(10345);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_FLOOR)) {
+			_vm->_dialogs->show(10313);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_TRAP_CEILING)) {
+			_vm->_dialogs->show(10314);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_DOOR)) {
+			_vm->_dialogs->show(10315);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_DOOR_TO_PIT)) {
+			_vm->_dialogs->show(10316);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WALL)) {
+			_vm->_dialogs->show(10317);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PROMPTERS_BOX)) {
+			_vm->_dialogs->show(10318);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_TRAP_DOOR)) {
+			_vm->_dialogs->show(10319);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_JUNK)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(10320);
+			else
+				_vm->_dialogs->show(10346);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CARTON)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(10321);
+			else
+				_vm->_dialogs->show(10347);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_GARBAGE_CAN)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(10322);
+			else
+				_vm->_dialogs->show(10348);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CABLE)) {
+			_vm->_dialogs->show(10323);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_JACQUES) || _action.isAction(NOUN_GENTLEMAN)) {
+			if (_globals[kJacquesStatus] == 0)
+				_vm->_dialogs->show(10324);
+			else
+				_vm->_dialogs->show(10325);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_KEY)) {
+			if (_game._objects.isInRoom(OBJ_KEY)) {
+				_vm->_dialogs->show(10326);
+				_action._inProgress = false;
+				return;
+			}
+		}
+
+		if (_action.isAction(NOUN_STAIR_UNIT)) {
+			_vm->_dialogs->show(10327);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_EXPOSED_BRICK)) {
+			_vm->_dialogs->show(10328);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WATER_PIPE)) {
+			_vm->_dialogs->show(10329);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PROMPTERS_SEAT)) {
+			_vm->_dialogs->show(10338);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LEVER)) {
+			_vm->_dialogs->show(10339);
+			_action._inProgress = false;
+			return;
+		}
+
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_DOOR_TO_PIT)) {
+		_vm->_dialogs->show(10331);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_DOOR)) {
+		_vm->_dialogs->show(10331);
+		_action._inProgress = false;
+		return;
+	}
+
+	if ((_action.isAction(VERB_OPEN, NOUN_TRAP_DOOR)) || (_action.isAction(VERB_CLOSE, NOUN_TRAP_DOOR))) {
+		_vm->_dialogs->show(10344);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_JACQUES) || _action.isAction(VERB_TAKE, NOUN_GENTLEMAN)) {
+		if (_globals[kJacquesStatus] == 0) {
+			if (_globals[kJacquesNameIsKnown])
+				_vm->_dialogs->show(10336);
+			else
+				_vm->_dialogs->show(10351);
+		} else
+			_vm->_dialogs->show(10337);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene103::adjustRails(int variant) {
+	switch (variant) {
+	case 0:
+		_scene->_rails.disableNode(3);
+		_scene->_rails.disableNode(4);
+		_scene->_rails.disableNode(5);
+		_scene->_rails.disableNode(6);
+		_scene->_rails.disableNode(12);
+		_scene->_rails.disableNode(13);
+		_scene->_rails.disableNode(14);
+		break;
+
+	case 1:
+		_scene->_rails.disableNode(1);
+		_scene->_rails.disableNode(2);
+		_scene->_rails.disableNode(3);
+		_scene->_rails.disableNode(4);
+		_scene->_rails.disableNode(5);
+		_scene->_rails.disableNode(6);
+		_scene->_rails.disableNode(7);
+		_scene->_rails.disableNode(9);
+		_scene->_rails.disableNode(10);
+		_scene->_rails.disableNode(11);
+		break;
+
+	case 2:
+		_scene->_rails.disableNode(1);
+		_scene->_rails.disableNode(2);
+		_scene->_rails.disableNode(5);
+		_scene->_rails.disableNode(6);
+		_scene->_rails.disableNode(7);
+		_scene->_rails.disableNode(9);
+		_scene->_rails.disableNode(10);
+		_scene->_rails.disableNode(11);
+		break;
+
+	case 3:
+		_scene->_rails.disableNode(1);
+		_scene->_rails.disableNode(2);
+		_scene->_rails.disableNode(3);
+		_scene->_rails.disableNode(4);
+		_scene->_rails.disableNode(10);
+		_scene->_rails.disableNode(11);
+		break;
+
+	default:
+		break;
+	}
+}
+
+void Scene103::handleJacquesAnim() {
+	if (_scene->getAnimFrame(_globals._animationIndexes[0]) == _lastJacquesFrame)
+		return;
+
+	_lastJacquesFrame = _scene->getAnimFrame(_globals._animationIndexes[0]);
+	int resetFrame = -1;
+	int random;
+
+	switch (_lastJacquesFrame) {
+	case 1:
+	case 2:
+	case 3:
+	case 9:
+	case 17:
+	case 23:
+	case 33:
+	case 51:
+		switch (_jacquesAction) {
+		case 2:
+			random = 4;
+			_jacquesAction = 0;
+			break;
+
+		case 3:
+			random = 5;
+			_jacquesAction = 0;
+			break;
+
+		case 4:
+			random = 6;
+			break;
+
+		case 0:
+			random = _vm->getRandomNumber(1, 3);
+			++_talkCount;
+			if (_talkCount > 22) {
+				_jacquesAction = 1;
+				random = 9;
+			}
+			break;
+
+		default:
+			random = _vm->getRandomNumber(6, 50);
+			while (_lastRandom == random)
+				random = _vm->getRandomNumber(6, 50);
+
+			_lastRandom = random;
+			break;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 0;
+			break;
+
+		case 2:
+			resetFrame = 1;
+			break;
+
+		case 3:
+			resetFrame = 2;
+			break;
+
+		case 4:
+			resetFrame = 4;
+			break;
+
+		case 5:
+			resetFrame = 10;
+			break;
+
+		case 6:
+			resetFrame = 34;
+			break;
+
+		case 7:
+			resetFrame = 24;
+			break;
+
+		case 8:
+			resetFrame = 18;
+			break;
+
+		default:
+			resetFrame = 8;
+			break;
+		}
+		break;
+
+	case 36:    
+	case 40:    
+	case 48:    
+		switch (_jacquesAction) {
+		case 0:
+		case 2:
+		case 3:
+			random = 2; 
+			break;
+
+		case 4:
+			random = 1;
+			_jacquesAction = 0;
+			break;
+
+		default:
+			random = _vm->getRandomNumber(2, 50);
+			while (_lastRandom == random)
+				random = _vm->getRandomNumber(2, 50);
+			_lastRandom = random;
+			break;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 37;
+			break; 
+
+		case 2:
+			resetFrame = 49;
+			break; 
+
+		case 3:
+			resetFrame = 41;
+			break; 
+
+		default:
+			resetFrame = 35;
+			break; 
+		}
+		break;
+
+	case 44:   
+		random = _vm->getRandomNumber(1, 50);
+		while (_lastRandom == random) {
+			random = _vm->getRandomNumber(1, 50);
+		}
+		_lastRandom = random;
+
+		switch (_jacquesAction) {
+		case 0:
+		case 2:
+		case 3:
+		case 4:
+			random = 1; 
+			break;
+
+		default:
+			random = _vm->getRandomNumber(1, 50);
+			while (_lastRandom == random)
+				random = _vm->getRandomNumber(1, 50);
+			_lastRandom = random;
+			break;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 45;
+			break; 
+
+		default:
+			resetFrame = 43;
+			break; 
+		}
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
+		_lastJacquesFrame = resetFrame;
+	}
+}
+
+void Scene103::climbRightStairs() {
+	if (_scene->getAnimFrame(_globals._animationIndexes[3]) == _lastStairFrame)
+		return;
+
+	_lastStairFrame = _scene->getAnimFrame(_globals._animationIndexes[3]);
+	int stairs_reset_frame = -1;
+
+	if (_lastStairFrame == 37) {
+		stairs_reset_frame = 36;
+		_standPosition = 2;
+		_game._player._stepEnabled = true;
+	}
+
+	if (_lastStairFrame == 2) {
+		_scene->deleteSequence(3);
+		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13); 
+		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+	}
+
+	if (stairs_reset_frame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[3], stairs_reset_frame);
+		_lastStairFrame = stairs_reset_frame;
+	}
+}
+
+void Scene103::climbLeftStairs() {
+	if (_scene->getAnimFrame(_globals._animationIndexes[5]) == _lastStairFrame)
+		return;
+
+	_lastStairFrame = _scene->getAnimFrame(_globals._animationIndexes[5]);
+	int stairs_reset_frame  = -1;
+
+	if (_lastStairFrame == 34) {
+		stairs_reset_frame = 33;
+		_standPosition = 1;
+		_game._player._stepEnabled = true;
+	}
+
+	if (_lastStairFrame == 2) {
+		_scene->deleteSequence(3);
+		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13); 
+		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139)); 
+	}
+
+	if (stairs_reset_frame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[5], stairs_reset_frame);
+		_lastStairFrame = stairs_reset_frame;
+	}
+}
+
+void Scene103::descendRightStairs() {
+	if (_scene->getAnimFrame(_globals._animationIndexes[4]) == _lastStairFrame)
+		return;
+
+	// CHECKME: use of this local variable
+	int stairs_reset_frame = -1;
+	_lastStairFrame = _scene->getAnimFrame(_globals._animationIndexes[4]);
+
+	if (_lastStairFrame == 2) {
+		_scene->deleteSequence(3);
+		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);  
+		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+	}
+
+	if (stairs_reset_frame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[4], stairs_reset_frame);
+		_lastStairFrame = stairs_reset_frame;
+	}
+}
+
+void Scene103::descendLeftStairs() {
+	if (_scene->getAnimFrame(_globals._animationIndexes[6]) == _lastStairFrame)
+		return;
+
+	// CHECKME: use of this local variable
+	int stairs_reset_frame = -1;
+	_lastStairFrame = _scene->getAnimFrame(_globals._animationIndexes[6]);
+
+	if (_lastStairFrame == 2) {
+		_scene->deleteSequence(3);
+		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);  
+		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139)); 
+	}
+
+	if (stairs_reset_frame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[6], stairs_reset_frame);
+		_lastStairFrame = stairs_reset_frame;
+	}
+}
+
+void Scene103::process_conv_jacques() {
+	int quit_converse = false;
+	int *value_1;
+
+	switch (_action._activeAction._verbId) {
+	case 1:
+		_vm->_gameConv->setInterlocutorTrigger(96);
+		if (_globals[kJacquesNameIsKnown] == 0) {
+			_globals[kJacquesNameIsKnown] = 1;
+			_scene->_dynamicHotspots.remove(_hotspotGentleman);
+			_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(156, 116, 33, 31));
+			_scene->_dynamicHotspots[_hotspotGentleman]._articleNumber = PREP_ON;
+			_scene->_dynamicHotspots.setPosition(_hotspotGentleman, Common::Point(206, 148), FACING_NORTHWEST);
+		}
+		break;
+
+	case 4:
+	case 6:
+	case 7:
+	case 10:
+	case 19:
+	case 30:
+		_globals[kWalkerConverse] = 0;
+		value_1 = _vm->_gameConv->getVariable(26);
+		if (*value_1)
+			_globals[kJacquesNameIsKnown] = 2;
+
+		quit_converse = true;
+		break;
+
+	case 8:
+		_vm->_gameConv->setInterlocutorTrigger(94);
+		break;
+
+	case 12:
+		_vm->_gameConv->setInterlocutorTrigger(96);
+		break;
+
+	case 29:
+		_vm->_gameConv->setInterlocutorTrigger(98);
+		break;
+
+	default:
+		break;
+	}
+
+	if ((_action._activeAction._verbId != 1) && (_action._activeAction._verbId != 8) && (_action._activeAction._verbId != 12) && (_action._activeAction._verbId != 29))
+		_vm->_gameConv->setInterlocutorTrigger(90);
+
+	_vm->_gameConv->setHeroTrigger(92);
+
+	switch (_game._trigger) {
+	case 90:
+		if (!quit_converse)
+			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
+		_jacquesAction = 0;
+		break;
+
+	case 92:
+		if (!quit_converse)
+			_globals[kWalkerConverse] = _vm->getRandomNumber(2, 3);
+		_convCount = 0;
+		_jacquesAction = 1;
+		break;
+
+	case 94:
+		if (!quit_converse)
+			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
+		_jacquesAction = 2;
+		break;
+
+	case 96:
+		if (!quit_converse)
+			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
+		_jacquesAction = 3;
+		break;
+
+	case 98:
+		if (!quit_converse)
+			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
+		_jacquesAction = 4;
+		break;
+
+	default:
+		break;
+	}
+
+	_talkCount = 0;
+}
+
+/*------------------------------------------------------------------------*/
 
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 2da9ba7..f978fa4 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -101,6 +101,56 @@ public:
 	virtual void actions();
 };
 
+class Scene103 : public Scene1xx {
+private:
+	int _jacquesAction;
+	int _lastRandom;
+	int _standPosition;
+	int _hotspotPrompt1;
+	int _hotspotPrompt2;
+	int _hotspotPrompt3;
+	int _hotspotPrompt4;
+	int _hotspotPrompt5;
+	int _hotspotRightFloor1;
+	int _hotspotRightFloor2;
+	int _hotspotLeftFloor1;
+	int _hotspotLeftFloor2;
+	int _hotspotGentleman;
+	int _convCount;
+	int _lastStairFrame;
+	int _lastJacquesFrame;
+	int _talkCount;
+
+	bool _anim0ActvFl;
+	bool _anim1ActvFl;
+	bool _anim2ActvFl;
+	bool _anim3ActvFl;
+	bool _anim4ActvFl;
+	bool _anim5ActvFl;
+	bool _anim6ActvFl;
+	bool _climbThroughTrapFl;
+	bool _guardFrameFl;
+	bool _sitFl;
+
+	void adjustRails(int variant);
+	void handleJacquesAnim();
+	void climbRightStairs();
+	void climbLeftStairs();
+	void descendRightStairs();
+	void descendLeftStairs();
+	void process_conv_jacques();
+
+public:
+	Scene103(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
+
 } // End of namespace Phantom
 } // End of namespace MADS
 
diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp
index ce8ab37..01430b0 100644
--- a/engines/mads/player.cpp
+++ b/engines/mads/player.cpp
@@ -814,4 +814,8 @@ void Player::firstWalk(Common::Point fromPos, Facing fromFacing, Common::Point d
 void Player::setWalkTrigger(int val) {
 	warning("TODO: Player::setWalkTrigger");
 }
+
+void Player::resetFacing(Facing facing) {
+	warning("TODO: Player::resetFacing");
+}
 } // End of namespace MADS
diff --git a/engines/mads/player.h b/engines/mads/player.h
index d4b703f..96d5aa8 100644
--- a/engines/mads/player.h
+++ b/engines/mads/player.h
@@ -228,6 +228,9 @@ public:
 	void firstWalk(Common::Point fromPos, Facing fromFacing, Common::Point destPos, Facing destFacing, bool enableFl);
 
 	void setWalkTrigger(int val);
+
+	void resetFacing(Facing facing);
+
 };
 
 } // End of namespace MADS
diff --git a/engines/mads/rails.cpp b/engines/mads/rails.cpp
index 9b2ec71..b69f813 100644
--- a/engines/mads/rails.cpp
+++ b/engines/mads/rails.cpp
@@ -274,4 +274,8 @@ void Rails::synchronize(Common::Serializer &s) {
 	}
 }
 
+void Rails::disableNode(int idx) {
+	warning("TODO: Rails::disableNode");
+}
+
 } // End of namespace MADS
diff --git a/engines/mads/rails.h b/engines/mads/rails.h
index c95f5c4..ef09516 100644
--- a/engines/mads/rails.h
+++ b/engines/mads/rails.h
@@ -127,6 +127,9 @@ public:
 	 * Synchronize the data for the route
 	 */
 	void synchronize(Common::Serializer &s);
+
+	void disableNode(int idx);
+
 };
 
 } // End of namespace MADS
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 0db0f93..57c93a9 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -60,6 +60,7 @@ Scene::Scene(MADSEngine *vm)
 	_interfaceY = 0;
 	_spritesCount = 0;
 	_variant = 0;
+	_initialVariant = 0;
 
 	_paletteUsageF.push_back(PaletteUsage::UsageEntry(0xF));
 
@@ -610,19 +611,24 @@ void Scene::checkKeyboard() {
 	}
 }
 
-void Scene::loadAnimation(const Common::String &resName, int trigger, int id) {
+int Scene::loadAnimation(const Common::String &resName, int trigger) {
 	// WORKAROUND: If there's already a previous active animation used by the
 	// scene, then free it before we create the new one
-	if ((_vm->getGameID() == GType_RexNebular) && _animation[id])
-		freeAnimation(id);
+	if ((_vm->getGameID() == GType_RexNebular) && _animation[0])
+		freeAnimation(0);
 
 	DepthSurface depthSurface;
 	UserInterface interfaceSurface(_vm);
 
+	warning("TODO: Fix loadAnimation");
+	int id = 0;
+
 	_animation[id] = Animation::init(_vm, this);
 	_animation[id]->load(interfaceSurface, depthSurface, resName,
 		_vm->_dithering ? ANIMFLAG_DITHER : 0, nullptr, nullptr);
 	_animation[id]->startAnimation(trigger);
+
+	return id;
 }
 
 void Scene::updateCursor() {
@@ -744,9 +750,23 @@ void Scene::synchronize(Common::Serializer &s) {
 	s.syncAsByte(_roomChanged);
 	s.syncAsUint16LE(_nextSceneId);
 	s.syncAsUint16LE(_priorSceneId);
+	s.syncAsSint16LE(_initialVariant);
+	s.syncAsSint16LE(_variant);
 	_dynamicHotspots.synchronize(s);
 }
 
+void Scene::setAnimFrame(int id, int val) {
+	if ((id >= 0) && _animation[id])
+		_animation[id]->setCurrentFrame(val);
+}
+
+int Scene::getAnimFrame(int id) {
+	if ((id >= 0) && _animation[id])
+		return _animation[id]->getCurrentFrame();
+
+	return -1;
+}
+
 void Scene::setDynamicAnim(int id, int anim_id, int segment) {
 	warning("TODO: Scene::setDynamicAnim");
 }
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index fd4ed24..57cc794 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -98,6 +98,7 @@ public:
 	int _textSpacing;
 	Hotspots _hotspots;
 	DirtyAreas _dirtyAreas;
+	int _initialVariant;
 	int _variant;
 	SceneInfo *_sceneInfo;
 	MSurface _backgroundSurface;
@@ -214,7 +215,7 @@ public:
 	/**
 	 * Load an animation
 	 */
-	void loadAnimation(const Common::String &resName, int trigger = 0, int id = 0);
+	int loadAnimation(const Common::String &resName, int trigger = 0);
 
 	/**
 	 * Returns a vocab entry
@@ -254,6 +255,9 @@ public:
 	*/
 	void synchronize(Common::Serializer &s);
 
+	void setAnimFrame(int id, int val);
+	int getAnimFrame(int id);
+
 	void setDynamicAnim(int id, int anim_id, int segment);
 	void setCamera(Common::Point pos);
 	void drawToBackground(int series_id, int sprite_id, Common::Point pos, int depth, int scale);
diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp
index 3b261f5..184d710 100644
--- a/engines/mads/sequence.cpp
+++ b/engines/mads/sequence.cpp
@@ -559,4 +559,23 @@ int SequenceList::setTimingTrigger(int delay, int code) {
 	warning("TODO: SequenceList::setTimingTrigger");
 	return -1;
 }
+
+void SequenceList::setRange(int sequence_id, int first, int last) {
+	warning("TODO: SequenceList::setRange");
+}
+
+int SequenceList::addBackwardSequence(int idx, bool flipped, int numTicks, int intervalTicks, int startTicks, int expire) {
+	warning("TODO: SequenceList::addBackwardSequence");
+	return -1;
+}
+
+int SequenceList::setTrigger(int idx, int trigger_type, int trigger_sprite, int trigger_code) {
+	warning("TODO: SequenceList::setTrigger");
+	return -1;
+}
+
+void SequenceList::setSeqPlayer(int idx, bool flag) {
+	warning("TODO: SequenceList::setSeqPlayer");
+}
+
 } // End of namespace
diff --git a/engines/mads/sequence.h b/engines/mads/sequence.h
index 0343e9c..a1ce3b8 100644
--- a/engines/mads/sequence.h
+++ b/engines/mads/sequence.h
@@ -128,6 +128,10 @@ public:
 
 	int addStampCycle(int srcSpriteIdx, bool flipped, int sprite);
 	int setTimingTrigger(int delay, int code);
+	void setRange(int sequence_id, int first, int last);
+	int addBackwardSequence(int idx, bool flipped, int numTicks, int intervalTicks, int startTicks, int expire);
+	int setTrigger(int sequence_id, int trigger_type, int trigger_sprite, int trigger_code);
+	void setSeqPlayer(int idx, bool flag);
 };
 
 } // End of namespace MADS


Commit: b5167ceef64e225217bf2c02e1a72e7cc85c4145
    https://github.com/scummvm/scummvm/commit/b5167ceef64e225217bf2c02e1a72e7cc85c4145
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-15T11:46:11+02:00

Commit Message:
MADS: Phantom: Fix calls to addSpriteCycle, remove duplicated sequence function

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/sequence.cpp
    engines/mads/sequence.h



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 979f978..5cb811a 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -1163,7 +1163,7 @@ void Scene103::step() {
 	switch (_game._trigger) {
 	case 65:
 		_scene->deleteSequence(_globals._sequenceIndexes[1]);
-		_globals._sequenceIndexes[1] = _scene->_sequences.addBackwardSequence(_globals._spriteIndexes[1], false, 8, 0, 0, 1);
+		_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
 		_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 6);
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 66);
@@ -1192,7 +1192,7 @@ void Scene103::step() {
 	switch (_game._trigger) {
 	case 100:
 		_scene->deleteSequence(_globals._sequenceIndexes[10]);
-		_globals._sequenceIndexes[10] = _scene->_sequences.addBackwardSequence(_globals._spriteIndexes[10], false, 6, 0, 0, 1);
+		_globals._sequenceIndexes[10] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[10], false, 6, 1);
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 101);
 		_scene->_sequences.setRange(_globals._sequenceIndexes[10], -1, -2);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 4);
@@ -1218,7 +1218,7 @@ void Scene103::step() {
 				_guardFrameFl = true;
 				_scene->deleteSequence(_globals._sequenceIndexes[0]);
 				_scene->deleteSequence(_globals._sequenceIndexes[9]);
-				_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 6, 0, 0, 1);
+				_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 6, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[0], -1, -2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 105);
@@ -1229,7 +1229,7 @@ void Scene103::step() {
 				_guardFrameFl = true;
 				_scene->deleteSequence(_globals._sequenceIndexes[0]);
 				_scene->deleteSequence(_globals._sequenceIndexes[9]);
-				_globals._sequenceIndexes[0] = _scene->_sequences.addBackwardSequence(_globals._spriteIndexes[0], false, 6, 0, 0, 1);
+				_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 6, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[0], -1, -2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 110);
@@ -1627,7 +1627,7 @@ void Scene103::actions() {
 			case 70:
 				_vm->_sound->command(24);
 				_scene->deleteSequence(_globals._sequenceIndexes[1]);
-				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 0, 0, 1);   
+				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);   
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14); 
 				_scene->_sequences.setRange(_globals._sequenceIndexes[1], -1, -2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 71);
@@ -1650,7 +1650,7 @@ void Scene103::actions() {
 			case (0):
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;  
-				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 5, 0, 0, 1);
+				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 5, 1);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 1);
@@ -1668,7 +1668,7 @@ void Scene103::actions() {
 
 			case 2:
 				_scene->deleteSequence(_globals._sequenceIndexes[2]);
-				_globals._sequenceIndexes[2] = _scene->_sequences.addBackwardSequence(_globals._spriteIndexes[2], false, 5, 0, 0, 1);
+				_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 5, 1);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], false);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 3);
@@ -1763,7 +1763,7 @@ void Scene103::actions() {
 				_anim3ActvFl = false;
 				_climbThroughTrapFl = false;
 				_game._player._stepEnabled = false;
-				_globals._sequenceIndexes[11] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[11], false, 6, 0, 0, 1);
+				_globals._sequenceIndexes[11] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[11], false, 6, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[11], 5);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[11], -1, -2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 0, 0, 1);
@@ -1790,7 +1790,7 @@ void Scene103::actions() {
 				_scene->freeAnimation(5);
 				_anim5ActvFl = false;
 				_game._player._stepEnabled = false;
-				_globals._sequenceIndexes[10] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[10], false, 6, 0, 0, 1);
+				_globals._sequenceIndexes[10] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[10], false, 6, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 4);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[10], -1, -2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 1);
diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp
index 184d710..61848c0 100644
--- a/engines/mads/sequence.cpp
+++ b/engines/mads/sequence.cpp
@@ -564,11 +564,6 @@ void SequenceList::setRange(int sequence_id, int first, int last) {
 	warning("TODO: SequenceList::setRange");
 }
 
-int SequenceList::addBackwardSequence(int idx, bool flipped, int numTicks, int intervalTicks, int startTicks, int expire) {
-	warning("TODO: SequenceList::addBackwardSequence");
-	return -1;
-}
-
 int SequenceList::setTrigger(int idx, int trigger_type, int trigger_sprite, int trigger_code) {
 	warning("TODO: SequenceList::setTrigger");
 	return -1;
diff --git a/engines/mads/sequence.h b/engines/mads/sequence.h
index a1ce3b8..900458e 100644
--- a/engines/mads/sequence.h
+++ b/engines/mads/sequence.h
@@ -129,7 +129,6 @@ public:
 	int addStampCycle(int srcSpriteIdx, bool flipped, int sprite);
 	int setTimingTrigger(int delay, int code);
 	void setRange(int sequence_id, int first, int last);
-	int addBackwardSequence(int idx, bool flipped, int numTicks, int intervalTicks, int startTicks, int expire);
 	int setTrigger(int sequence_id, int trigger_type, int trigger_sprite, int trigger_code);
 	void setSeqPlayer(int idx, bool flag);
 };


Commit: 1d4e56c455a15f1fa2ae6a927cd272f04a042be3
    https://github.com/scummvm/scummvm/commit/1d4e56c455a15f1fa2ae6a927cd272f04a042be3
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-15T14:56:03+02:00

Commit Message:
MADS: Phantom: Some renaming

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 5cb811a..fc5832d 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -117,40 +117,38 @@ void Scene1xx::setPlayerSpritesPrefix() {
 /*------------------------------------------------------------------------*/
 
 Scene101::Scene101(MADSEngine *vm) : Scene1xx(vm) {
-	_execute_chan = -1;
-	_execute_wipe = -1;
-	_brie_calling_position = -1;
-	_brie_chandelier_position = -1;
-	_brie_calling_frame = -1;
-	_brie_chandelier_frame = -1;
-	_converse_counter = 0;
-	_talk_count = -1;
-	_dynamic_brie = 0;
-	_dynamic_brie_2 = 0;
-	_start_walking = false;
-	_start_walking_0 = false;
-	_anim_0_running = false;
-	_anim_1_running = false;
-	_start_sitting_down = false;
+	_chanStatus = -1;
+	_wipeStatus = -1;
+	_callingStatus = -1;
+	_chandelierStatus = -1;
+	_callingFrame = -1;
+	_chandelierFrame = -1;
+	_convCounter = 0;
+	_talkCounter = -1;
+	_brieAnimId = 0;
+	_startWalkingFl = false;
+	_startWalking0Fl = false;
+	_anim0Running = false;
+	_anim1Running = false;
+	_startSittingFl = false;
 }
 
 void Scene101::synchronize(Common::Serializer &s) {
 	Scene1xx::synchronize(s);
-	s.syncAsSint16LE(_execute_chan);
-	s.syncAsSint16LE(_execute_wipe);
-	s.syncAsSint16LE(_brie_calling_position);
-	s.syncAsSint16LE(_brie_chandelier_position);
-	s.syncAsSint16LE(_brie_calling_frame);
-	s.syncAsSint16LE(_brie_chandelier_frame);
-	s.syncAsSint16LE(_converse_counter);
-	s.syncAsSint16LE(_talk_count);
-	s.syncAsSint16LE(_dynamic_brie);
-	s.syncAsSint16LE(_dynamic_brie_2);
-	s.syncAsByte(_start_walking);
-	s.syncAsByte(_start_walking_0);
-	s.syncAsByte(_anim_0_running);
-	s.syncAsByte(_anim_1_running);
-	s.syncAsByte(_start_sitting_down);
+	s.syncAsSint16LE(_chanStatus);
+	s.syncAsSint16LE(_wipeStatus);
+	s.syncAsSint16LE(_callingStatus);
+	s.syncAsSint16LE(_chandelierStatus);
+	s.syncAsSint16LE(_callingFrame);
+	s.syncAsSint16LE(_chandelierFrame);
+	s.syncAsSint16LE(_convCounter);
+	s.syncAsSint16LE(_talkCounter);
+	s.syncAsSint16LE(_brieAnimId);
+	s.syncAsByte(_startWalkingFl);
+	s.syncAsByte(_startWalking0Fl);
+	s.syncAsByte(_anim0Running);
+	s.syncAsByte(_anim1Running);
+	s.syncAsByte(_startSittingFl);
 }
 
 void Scene101::setup() {
@@ -163,10 +161,10 @@ void Scene101::enter() {
 	_vm->_disableFastwalk = true;
 
 	if (_scene->_priorSceneId != RETURNING_FROM_DIALOG) {
-		_execute_chan = _execute_wipe = -1;
-		_start_walking = _start_walking_0 = false;
-		_anim_0_running = _anim_1_running = false;
-		_start_sitting_down = false;
+		_chanStatus = _wipeStatus = -1;
+		_startWalkingFl = _startWalking0Fl = false;
+		_anim0Running = _anim1Running = false;
+		_startSittingFl = false;
 	}
 
 	// Load Dialogs
@@ -183,46 +181,46 @@ void Scene101::enter() {
 
 	if (_globals[kBrieTalkStatus] == 0) {
 		_game._player.firstWalk(Common::Point(-20, 75), FACING_EAST, Common::Point(18, 79), FACING_EAST, true);
-		_brie_calling_position = 0;
-		_brie_chandelier_position = 3;
+		_callingStatus = 0;
+		_chandelierStatus = 3;
 		_game._player.setWalkTrigger(50);
 
 		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('b', 9), 1);
 		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('b', 8), 1);
 
-		_anim_0_running  = true;
-		_anim_1_running  = true;
-
-		_dynamic_brie = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
-		_scene->_dynamicHotspots[_dynamic_brie]._articleNumber = PREP_ON;
-		_scene->_dynamicHotspots.setPosition(_dynamic_brie, Common::Point(490, 119), FACING_NONE);
-		_scene->setDynamicAnim(_dynamic_brie, 0, 0);
-		_scene->setDynamicAnim(_dynamic_brie, 0, 1);
-		_scene->setDynamicAnim(_dynamic_brie, 0, 2);
-		_scene->setDynamicAnim(_dynamic_brie, 0, 3);
-		_scene->setDynamicAnim(_dynamic_brie, 0, 4);
-
-		_dynamic_brie_2 = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
-		_scene->_dynamicHotspots[_dynamic_brie_2]._articleNumber = PREP_ON;
-		_scene->_dynamicHotspots.setPosition(_dynamic_brie_2, Common::Point(25, 80), FACING_NONE);
-		_scene->setDynamicAnim(_dynamic_brie_2, 1, 1);
-		_scene->setDynamicAnim(_dynamic_brie_2, 1, 2);
-
-		_talk_count = 0;
+		_anim0Running  = true;
+		_anim1Running  = true;
+
+		_brieAnimId = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
+		_scene->_dynamicHotspots[_brieAnimId]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_brieAnimId, Common::Point(490, 119), FACING_NONE);
+		_scene->setDynamicAnim(_brieAnimId, 0, 0);
+		_scene->setDynamicAnim(_brieAnimId, 0, 1);
+		_scene->setDynamicAnim(_brieAnimId, 0, 2);
+		_scene->setDynamicAnim(_brieAnimId, 0, 3);
+		_scene->setDynamicAnim(_brieAnimId, 0, 4);
+
+		int tmpIdx = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
+		_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(25, 80), FACING_NONE);
+		_scene->setDynamicAnim(tmpIdx, 1, 1);
+		_scene->setDynamicAnim(tmpIdx, 1, 2);
+
+		_talkCounter = 0;
 	} else if (_globals[kBrieTalkStatus] == 1) {
 		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('b', 9), 1);
-		_dynamic_brie = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
-		_scene->_dynamicHotspots[_dynamic_brie]._articleNumber = PREP_ON;
-		_scene->setDynamicAnim(_dynamic_brie, 1, 1);
-		_scene->setDynamicAnim(_dynamic_brie, 1, 2);
-		_anim_1_running = true;
-		_talk_count = 0;
-		_brie_chandelier_position = 3;
+		_brieAnimId = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
+		_scene->_dynamicHotspots[_brieAnimId]._articleNumber = PREP_ON;
+		_scene->setDynamicAnim(_brieAnimId, 1, 1);
+		_scene->setDynamicAnim(_brieAnimId, 1, 2);
+		_anim1Running = true;
+		_talkCounter = 0;
+		_chandelierStatus = 3;
 
 		if (_vm->_gameConv->_restoreRunning == 1) {
 			_vm->_gameConv->run(1);
 			_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
-			_brie_chandelier_position = 4;
+			_chandelierStatus = 4;
 			_scene->setAnimFrame(_globals._animationIndexes[1], 25);
 		}
 	} else if (_scene->_priorSceneId == 202) {
@@ -238,16 +236,16 @@ void Scene101::enter() {
 }
 
 void Scene101::step() {
-	if (_anim_0_running)
+	if (_anim0Running)
 		handleAnimation0();
 
 	if ((_globals[kWalkerConverse] == 2) || (_globals[kWalkerConverse] == 3)) {
-		++_converse_counter;
-		if (_converse_counter > 200)
+		++_convCounter;
+		if (_convCounter > 200)
 			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
 	}
 
-	if (_anim_1_running) {
+	if (_anim1Running) {
 		handleAnimation1();
 
 		if (_scene->getAnimFrame(_globals._animationIndexes[1]) == 80) {
@@ -256,32 +254,32 @@ void Scene101::step() {
 		}
 	}
 
-	if (!_start_sitting_down && (_globals[kBrieTalkStatus] != 2)) {
+	if (!_startSittingFl && (_globals[kBrieTalkStatus] != 2)) {
 		warning("TODO: Add a check on view port x > 200");
-		_start_sitting_down = true;
+		_startSittingFl = true;
 		_game._player.walk(Common::Point(490, 119), FACING_NORTHEAST);
 		_game._player._stepEnabled = false;
 		_game._player.setWalkTrigger(55);
-		_brie_chandelier_position = 4;
+		_chandelierStatus = 4;
 	}
 
 	if (_game._trigger == 55) {
 		_game._player._stepEnabled = true;
 		_vm->_gameConv->run(1);
 		_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
-		_brie_chandelier_frame = -1;
-		_talk_count = 0;
+		_chandelierFrame = -1;
+		_talkCounter = 0;
 	}
 
 	if (_game._trigger == 50) {
 		_vm->_gameConv->run(0);
-		_brie_calling_position = 1;
+		_callingStatus = 1;
 	}
 }
 
 void Scene101::preActions() {
 	if (_action.isAction(VERB_EXIT_TO, NOUN_ORCHESTRA_PIT)) {
-		if ((_globals[kBrieTalkStatus] == 2) || _start_walking) {
+		if ((_globals[kBrieTalkStatus] == 2) || _startWalkingFl) {
 			_game._player._walkOffScreenSceneId = 102;
 			_globals[kBrieTalkStatus] = 2;
 		} else {
@@ -289,7 +287,7 @@ void Scene101::preActions() {
 			_game._player._needToWalk = false;
 		}
 	} else if (_action.isAction(VERB_EXIT_TO, NOUN_GRAND_FOYER)) {
-		if ((_globals[kBrieTalkStatus] == 2) || _start_walking)
+		if ((_globals[kBrieTalkStatus] == 2) || _startWalkingFl)
 			_game._player._walkOffScreenSceneId = 202;
 		else {
 			_vm->_gameConv->run(0);
@@ -321,7 +319,7 @@ void Scene101::actions() {
 		} else if (_action.isObject(NOUN_SIDE_WALL)) {
 			_vm->_dialogs->show(10115);
 		} else if (_action.isObject(NOUN_SEATS)) {
-			if ((_globals[kBrieTalkStatus] > 1) || _start_walking)
+			if ((_globals[kBrieTalkStatus] > 1) || _startWalkingFl)
 				_vm->_dialogs->show(10119);
 			else
 				_vm->_dialogs->show(10116);
@@ -346,7 +344,7 @@ void Scene101::handleConversation0() {
 
 	if (_game._trigger == 90) {
 		_globals[kBrieTalkStatus] = 1;
-		_start_walking_0 = true;
+		_startWalking0Fl = true;
 	}  
 }
 
@@ -357,19 +355,19 @@ void Scene101::handleConversation1() {
 		if (_game._trigger == 60) {
 			switch (_action._activeAction._verbId) {
 			case 0:
-				_brie_chandelier_position = 6;
-				_execute_wipe = 2;
+				_chandelierStatus = 6;
+				_wipeStatus = 2;
 				break;
 
 			case 1:
-				_brie_chandelier_position = 2;
-				_execute_chan = 9;
+				_chandelierStatus = 2;
+				_chanStatus = 9;
 				break;
 
 			case 4:
-				_brie_chandelier_position = 0;
-				_execute_chan = -1;
-				_execute_wipe = -1;
+				_chandelierStatus = 0;
+				_chanStatus = -1;
+				_wipeStatus = -1;
 				break;
 
 			case 8:
@@ -377,18 +375,18 @@ void Scene101::handleConversation1() {
 			case 18:
 			case 22:
 			case 24:
-				_start_walking = true;
-				_execute_chan = -1;
-				_execute_wipe = -1;
+				_startWalkingFl = true;
+				_chanStatus = -1;
+				_wipeStatus = -1;
 				_globals[kWalkerConverse] = 0;
 				_vm->_gameConv->setInterlocutorTrigger(105);
 				interlocutorFl = true;
 				break;
 
 			case 12:
-				_brie_chandelier_position = 5;
-				_execute_chan = -1;
-				_execute_wipe = -1;
+				_chandelierStatus = 5;
+				_chanStatus = -1;
+				_wipeStatus = -1;
 				break;
 
 			default:
@@ -401,21 +399,21 @@ void Scene101::handleConversation1() {
 
 		_vm->_gameConv->setHeroTrigger(70);
 
-		_talk_count = 0;
+		_talkCounter = 0;
 
 		if (_game._trigger == 60) {
-			if (!_start_walking)
+			if (!_startWalkingFl)
 				_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
 
-			_brie_chandelier_position = 2;
-		} else if ((_game._trigger == 70) && !_start_walking) {
-			_brie_chandelier_position = 4;
-			_execute_chan = -1;
-			_execute_wipe = -1;
-			if (!_start_walking)
+			_chandelierStatus = 2;
+		} else if ((_game._trigger == 70) && !_startWalkingFl) {
+			_chandelierStatus = 4;
+			_chanStatus = -1;
+			_wipeStatus = -1;
+			if (!_startWalkingFl)
 				_globals[kWalkerConverse] = _vm->getRandomNumber(2, 3);
 
-			_converse_counter = 0;
+			_convCounter = 0;
 		}
 	}
 }
@@ -424,65 +422,65 @@ void Scene101::handleAnimation0() {
 	int random;
 	int reset_frame;
 
-	if (_scene->getAnimFrame(_globals._animationIndexes[0]) != _brie_calling_frame) {
-		_brie_calling_frame = _scene->getAnimFrame(_globals._animationIndexes[0]);
+	if (_scene->getAnimFrame(_globals._animationIndexes[0]) != _callingFrame) {
+		_callingFrame = _scene->getAnimFrame(_globals._animationIndexes[0]);
 		reset_frame = -1;
-		switch (_brie_calling_frame) {
+		switch (_callingFrame) {
 		case 1:
 		case 9:
 		case 12:
-			if (_brie_calling_position == 1) {
-				if (_brie_calling_frame == 9) {
-					if (_start_walking_0) {
+			if (_callingStatus == 1) {
+				if (_callingFrame == 9) {
+					if (_startWalking0Fl) {
 						reset_frame = 13;
-						_brie_calling_position = 3;
+						_callingStatus = 3;
 					} else
-						_brie_calling_position = 2;
+						_callingStatus = 2;
 				} else
 					reset_frame = 1;
 			}
 
-			if (_brie_calling_position == 0) {
-				if (_start_walking_0) {
+			if (_callingStatus == 0) {
+				if (_startWalking0Fl) {
 					reset_frame = 60;
-					_brie_calling_position = 3;
+					_callingStatus = 3;
 				} else
 					reset_frame = 0;
 			}
 
-			if (_brie_calling_position == 2) {
-				if (_start_walking_0) {
+			if (_callingStatus == 2) {
+				if (_startWalking0Fl) {
 					reset_frame = 13;
-					_brie_calling_position = 3;
+					_callingStatus = 3;
 				} else {
 					random = _vm->getRandomNumber(1, 2);
-					++_talk_count;
+					++_talkCounter;
 
-					if (_talk_count < 18) {
+					if (_talkCounter < 18) {
 						if (random == 1)
 							reset_frame = 7;
 						else
 							reset_frame = 10;
 					} else {
 						reset_frame = 54;
-						_brie_calling_position = 0;
+						_callingStatus = 0;
 					}
 				}
 			}
 			break;
 
 		case 53:
-			_anim_0_running    = false;
+			_anim0Running    = false;
 			_scene->freeAnimation(0);
 			break;
 
 		case 59:  
-			if (_start_walking_0) {
+			if (_startWalking0Fl) {
 				reset_frame = 60;
-				_brie_calling_position = 3;
+				_callingStatus = 3;
 			} else {
 				reset_frame = 0;
-				_brie_calling_position = 0;
+				_callingStatus = 0;
 			}
 			break;
 
@@ -493,7 +491,7 @@ void Scene101::handleAnimation0() {
 
 		if (reset_frame >= 0) {
 			_scene->setAnimFrame(_globals._animationIndexes[0], reset_frame);
-			_brie_calling_frame = reset_frame;
+			_callingFrame = reset_frame;
 		}
 	}
 } 
@@ -502,12 +500,12 @@ void Scene101::handleAnimation1() {
 	int random;
 	int reset_frame;
 
-	if (_scene->getAnimFrame(_globals._animationIndexes[1]) != _brie_chandelier_frame) {
-		_brie_chandelier_frame = _scene->getAnimFrame(_globals._animationIndexes[1]);
+	if (_scene->getAnimFrame(_globals._animationIndexes[1]) != _chandelierFrame) {
+		_chandelierFrame = _scene->getAnimFrame(_globals._animationIndexes[1]);
 		reset_frame = -1;
-		switch (_brie_chandelier_frame) {
+		switch (_chandelierFrame) {
 		case 1:
-			if (_brie_chandelier_position == 3)
+			if (_chandelierStatus == 3)
 				reset_frame = 0;
 			break;
 
@@ -518,30 +516,30 @@ void Scene101::handleAnimation1() {
 		case 26:
 		case 44:
 		case 333:
-			if (_talk_count == _execute_chan) {
-				_brie_chandelier_position = 0;
-				++_talk_count;
-				_execute_chan = -1;
+			if (_talkCounter == _chanStatus) {
+				_chandelierStatus = 0;
+				++_talkCounter;
+				_chanStatus = -1;
 			} 
 
-			if (_talk_count == _execute_wipe) {
-				_brie_chandelier_position = 6;
-				++_talk_count;
-				_execute_wipe = -1;
+			if (_talkCounter == _wipeStatus) {
+				_chandelierStatus = 6;
+				++_talkCounter;
+				_wipeStatus = -1;
 			}
 
-			if (_start_walking) {
+			if (_startWalkingFl) {
 				if (_vm->_gameConv->_running == 1) {
-					if (_talk_count > 13)
-						_brie_chandelier_position = 1;
+					if (_talkCounter > 13)
+						_chandelierStatus = 1;
 				} else
-					_brie_chandelier_position = 1;
+					_chandelierStatus = 1;
 			}
 
-			switch (_brie_chandelier_position) {
+			switch (_chandelierStatus) {
 			case 0:
 				reset_frame = 27;
-				_brie_chandelier_position = 2;
+				_chandelierStatus = 2;
 				break;
 
 			case 1:
@@ -549,14 +547,14 @@ void Scene101::handleAnimation1() {
 				reset_frame = 45;
 				if (_vm->_gameConv->_running == 1)
 					_vm->_gameConv->stop();
-				_scene->_dynamicHotspots.remove(_dynamic_brie);
+				_scene->_dynamicHotspots.remove(_brieAnimId);
 				_game._player._stepEnabled = false;
 				break;
 
 			case 2:
 				random = _vm->getRandomNumber(1, 3);
-				++_talk_count;
-				if (_talk_count < 15) {
+				++_talkCounter;
+				if (_talkCounter < 15) {
 					if (random == 1)
 						reset_frame = 12;
 					else if (random == 2)
@@ -564,7 +562,7 @@ void Scene101::handleAnimation1() {
 					else if (random == 3)
 						reset_frame = 17;
 				} else {
-					_brie_chandelier_position = 4;
+					_chandelierStatus = 4;
 					reset_frame = 25;
 				}
 				break;
@@ -575,12 +573,12 @@ void Scene101::handleAnimation1() {
 
 			case 5:
 				reset_frame = 21;
-				_brie_chandelier_position = 2;
+				_chandelierStatus = 2;
 				break;
 
 			case 6:
 				reset_frame = 316;
-				_brie_chandelier_position = 2;
+				_chandelierStatus = 2;
 				break;
 
 			default:
@@ -595,7 +593,7 @@ void Scene101::handleAnimation1() {
 
 		if (reset_frame >= 0) {
 			_scene->setAnimFrame(_globals._animationIndexes[1], reset_frame);
-			_brie_chandelier_frame = reset_frame;
+			_chandelierFrame = reset_frame;
 		}
 	}
 }
@@ -603,13 +601,13 @@ void Scene101::handleAnimation1() {
 /*------------------------------------------------------------------------*/
 
 Scene102::Scene102(MADSEngine *vm) : Scene1xx(vm) {
-	_anim0RunningFl = false;
+	_anim0Running = false;
 }
 
 void Scene102::synchronize(Common::Serializer &s) {
 	Scene1xx::synchronize(s);
 
-	s.syncAsByte(_anim0RunningFl);
+	s.syncAsByte(_anim0Running);
 }
 
 void Scene102::setup() {
@@ -618,7 +616,7 @@ void Scene102::setup() {
 }
 
 void Scene102::enter() {
-	_anim0RunningFl = false;
+	_anim0Running = false;
 
 	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('x', 0));
 	_globals._spriteIndexes[3] = _scene->_sprites.addSprites("*RAL86");
@@ -679,7 +677,7 @@ void Scene102::enter() {
 	} else if (_scene->_priorSceneId == 103 || _scene->_priorSceneId != -1) {
 		_game._player._playerPos = Common::Point(282, 145);
 		_game._player._facing = FACING_WEST;
-		_anim0RunningFl = true;
+		_anim0Running = true;
 		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 1), 60);
 	} else if (_scene->_priorSceneId == -1) {
 		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 4);
@@ -694,7 +692,7 @@ void Scene102::step() {
 		// Door closes
 		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 4);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
-		_anim0RunningFl = false;
+		_anim0Running = false;
 	} else if (_game._trigger == 65) {
 		// Death
 		if (_globals[kDeathLocation] == 0)
@@ -718,7 +716,7 @@ void Scene102::actions() {
 	} else if (_action.isAction(VERB_WALK_THROUGH, NOUN_ORCHESTRA_DOOR) ||
 		_action.isAction(VERB_PUSH, NOUN_ORCHESTRA_DOOR) ||
 		_action.isAction(VERB_OPEN, NOUN_ORCHESTRA_DOOR)) {
-		if (_anim0RunningFl) {
+		if (_anim0Running) {
 			_scene->_sequences.setTimingTrigger(15, 70);
 			_game._player._stepEnabled = false;
 		} else {
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index f978fa4..173f6c5 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -55,21 +55,20 @@ public:
 
 class Scene101 : public Scene1xx {
 private:
-	int _execute_chan;
-	int _execute_wipe;
-	int _brie_calling_position;
-	int _brie_chandelier_position;
-	int _brie_calling_frame;
-	int _brie_chandelier_frame;
-	int _talk_count;
-	int _converse_counter;
-	int _dynamic_brie;
-	int _dynamic_brie_2;
-	bool _start_walking;
-	bool _start_walking_0;
-	bool _anim_0_running;
-	bool _anim_1_running;
-	bool _start_sitting_down;
+	int _chanStatus;
+	int _wipeStatus;
+	int _callingStatus;
+	int _chandelierStatus;
+	int _callingFrame;
+	int _chandelierFrame;
+	int _talkCounter;
+	int _convCounter;
+	int _brieAnimId;
+	bool _startWalkingFl;
+	bool _startWalking0Fl;
+	bool _anim0Running;
+	bool _anim1Running;
+	bool _startSittingFl;
 public:
 	Scene101(MADSEngine *vm);
 	virtual void synchronize(Common::Serializer &s);
@@ -88,7 +87,7 @@ public:
 
 class Scene102 : public Scene1xx {
 private:
-	bool _anim0RunningFl;
+	bool _anim0Running;
 
 public:
 	Scene102(MADSEngine *vm);


Commit: 2c59f4932efa4338c45bf4e3824a6b5cbd0ff4d1
    https://github.com/scummvm/scummvm/commit/2c59f4932efa4338c45bf4e3824a6b5cbd0ff4d1
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-16T15:44:35+02:00

Commit Message:
MADS: Phantom: Implement logic for scene 104

Changed paths:
    engines/mads/conversations.cpp
    engines/mads/conversations.h
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/conversations.cpp b/engines/mads/conversations.cpp
index 52a6404..ada740d 100644
--- a/engines/mads/conversations.cpp
+++ b/engines/mads/conversations.cpp
@@ -65,4 +65,13 @@ int* GameConversation::getVariable(int idx) {
 	warning("TODO: GameConversation::getVariable");
 	return nullptr;
 }
+
+void GameConversation::hold() {
+	warning("TODO: GameConversation::hold");
+}
+
+void GameConversation::release() {
+	warning("TODO: GameConversation::release");
+}
+
 } // End of namespace MADS
diff --git a/engines/mads/conversations.h b/engines/mads/conversations.h
index 225fc4f..48d054f 100644
--- a/engines/mads/conversations.h
+++ b/engines/mads/conversations.h
@@ -51,6 +51,8 @@ public:
 	void exportValue(int val);
 	void setHeroTrigger(int val);
 	void setInterlocutorTrigger(int val);
+	void hold();
+	void release();
 
 	int _running;
 	int _restoreRunning;
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index fc5832d..7d6ba22 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -345,7 +345,7 @@ void Scene101::handleConversation0() {
 	if (_game._trigger == 90) {
 		_globals[kBrieTalkStatus] = 1;
 		_startWalking0Fl = true;
-	}  
+	}
 }
 
 void Scene101::handleConversation1() {
@@ -474,7 +474,7 @@ void Scene101::handleAnimation0() {
 			_scene->freeAnimation(0);
 			break;
 
-		case 59:  
+		case 59:
 			if (_startWalking0Fl) {
 				reset_frame = 60;
 				_callingStatus = 3;
@@ -494,7 +494,7 @@ void Scene101::handleAnimation0() {
 			_callingFrame = reset_frame;
 		}
 	}
-} 
+}
 
 void Scene101::handleAnimation1() {
 	int random;
@@ -520,7 +520,7 @@ void Scene101::handleAnimation1() {
 				_chandelierStatus = 0;
 				++_talkCounter;
 				_chanStatus = -1;
-			} 
+			}
 
 			if (_talkCounter == _wipeStatus) {
 				_chandelierStatus = 6;
@@ -674,7 +674,7 @@ void Scene102::enter() {
 		_scene->_sequences.setTimingTrigger(120, 65);
 		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 4);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
-	} else if (_scene->_priorSceneId == 103 || _scene->_priorSceneId != -1) {
+	} else if (_scene->_priorSceneId == 103 || _scene->_priorSceneId != RETURNING_FROM_LOADING) {
 		_game._player._playerPos = Common::Point(282, 145);
 		_game._player._facing = FACING_WEST;
 		_anim0Running = true;
@@ -864,7 +864,7 @@ void Scene103::setup() {
 }
 
 void Scene103::enter() {
-	if (_scene->_priorSceneId != -1) {
+	if (_scene->_priorSceneId != RETURNING_FROM_LOADING) {
 		_anim0ActvFl = false;
 		_anim1ActvFl = false;
 		_anim2ActvFl = false;
@@ -875,7 +875,7 @@ void Scene103::enter() {
 		_climbThroughTrapFl = false;
 		_guardFrameFl = false;
 		_sitFl = false;
-		_jacquesAction = 1; 
+		_jacquesAction = 1;
 		_lastRandom = 0;
 		_standPosition = 0;
 	}
@@ -939,15 +939,15 @@ void Scene103::enter() {
 
 			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
-			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139));
 
 		} else {
 			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
-			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139));
 
 			_globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, 1);
-			_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 1) ; 
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 1) ;
 		}
 
 		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(121, 79, 40, 63));
@@ -1030,7 +1030,7 @@ void Scene103::enter() {
 	} else if (_globals[kPrompterStandStatus] == 0) {
 		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
-		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139)); 
+		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139));
 
 		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(2, 79, 40, 63));
 		_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
@@ -1083,8 +1083,8 @@ void Scene103::enter() {
 
 			_scene->deleteSequence(_globals._sequenceIndexes[3]);
 			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
-			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13);  
-			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13);
+			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139));
 		}
 
 		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, -1);
@@ -1095,7 +1095,7 @@ void Scene103::enter() {
 		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
 
-	} else if ((_scene->_priorSceneId == 105) || (_scene->_priorSceneId != -1)) {
+	} else if ((_scene->_priorSceneId == 105) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
 		_game._player._playerPos = Common::Point(287, 135);
 		_game._player._facing = FACING_WEST;
 		_game._player._stepEnabled = false;
@@ -1115,8 +1115,8 @@ void Scene103::enter() {
 
 			_scene->deleteSequence(_globals._sequenceIndexes[3]);
 			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
-			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13);  
-			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13);
+			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139));
 			_game._player._visible = false;
 			_globals._animationIndexes[3] = _scene->loadAnimation(formAnimName('w', 1), 0);
 			_anim3ActvFl = true;
@@ -1166,13 +1166,13 @@ void Scene103::step() {
 		_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 6);
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 66);
 		_vm->_sound->command(66);
-		break; 
+		break;
 
 	case 66: {
 		int syncIdx = _globals._sequenceIndexes[1];
 		_vm->_sound->command(25);
 		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 1);
-		_game.syncTimers(1, _globals._sequenceIndexes[1], 1, syncIdx); 
+		_game.syncTimers(1, _globals._sequenceIndexes[1], 1, syncIdx);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
 		_game._player._stepEnabled = true;
 		}
@@ -1194,7 +1194,7 @@ void Scene103::step() {
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 101);
 		_scene->_sequences.setRange(_globals._sequenceIndexes[10], -1, -2);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 4);
-		break; 
+		break;
 
 	case 101:
 		_globals._animationIndexes[5] = _scene->loadAnimation(formAnimName('w', 3), 0);
@@ -1385,7 +1385,7 @@ void Scene103::actions() {
 		process_conv_jacques();
 		_action._inProgress = false;
 		return;
-	} 
+	}
 
 	if (_action.isAction(VERB_CLIMB_THROUGH, NOUN_TRAP_DOOR)) {
 		if (_globals[kTrapDoorStatus] == 1) {
@@ -1412,9 +1412,9 @@ void Scene103::actions() {
 			if (_game._trigger == 0) {
 				if (_action.isAction(VERB_LOOK_THROUGH, NOUN_PROMPTERS_BOX)) {
 					_sitFl = true;
-					_globals._animationIndexes[5] = _scene->loadAnimation(formAnimName('w', 3), 115); 
+					_globals._animationIndexes[5] = _scene->loadAnimation(formAnimName('w', 3), 115);
 				} else
-					_globals._animationIndexes[5] = _scene->loadAnimation(formAnimName('w', 3), 0); 
+					_globals._animationIndexes[5] = _scene->loadAnimation(formAnimName('w', 3), 0);
 
 				_game._player._visible = false;
 				_game._player._stepEnabled = false;
@@ -1464,10 +1464,10 @@ void Scene103::actions() {
 				case 75:
 					if (_globals[kPrompterStandStatus] == 0) {
 						_globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, 1);
-						_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 1) ; 
+						_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 1) ;
 						_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
 						_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
-						_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+						_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139));
 						_game.syncTimers(1, _globals._sequenceIndexes[3], 3, _globals._animationIndexes[0]);
 						_globals[kPrompterStandStatus] = 1;
 						_game._player._stepEnabled = true;
@@ -1538,7 +1538,7 @@ void Scene103::actions() {
 					if (_globals[kPrompterStandStatus] == 1) {
 						_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
 						_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
-						_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139)); 
+						_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139));
 						_game.syncTimers(1, _globals._sequenceIndexes[3], 3, _globals._animationIndexes[0]);
 						_globals[kPrompterStandStatus] = 0;
 						_game._player._stepEnabled = true;
@@ -1613,7 +1613,7 @@ void Scene103::actions() {
 
 			case 2:
 				_game._player._visible = true;
-				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[2]); 
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[2]);
 				_game._player.walk(Common::Point(295, 132), FACING_WEST);
 				_scene->_sequences.setTimingTrigger(180, 3);
 				break;
@@ -1625,17 +1625,17 @@ void Scene103::actions() {
 			case 70:
 				_vm->_sound->command(24);
 				_scene->deleteSequence(_globals._sequenceIndexes[1]);
-				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);   
-				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14); 
+				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[1], -1, -2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 71);
 				_vm->_sound->command(66);
-				break; 
+				break;
 
 			case 71: {
 				int oldIdx = _globals._sequenceIndexes[1];
 				_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, -2);
-				_game.syncTimers(1, _globals._sequenceIndexes[1], 1, oldIdx); 
+				_game.syncTimers(1, _globals._sequenceIndexes[1], 1, oldIdx);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
 				}
 				break;
@@ -1647,7 +1647,7 @@ void Scene103::actions() {
 			switch (_game._trigger) {
 			case (0):
 				_game._player._stepEnabled = false;
-				_game._player._visible = false;  
+				_game._player._visible = false;
 				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 5, 1);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], true);
@@ -1657,12 +1657,12 @@ void Scene103::actions() {
 			case 1: {
 				int oldIdx = _globals._sequenceIndexes[2];
 				_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 4);
-				_game.syncTimers(1, _globals._sequenceIndexes[2], 1, oldIdx); 
+				_game.syncTimers(1, _globals._sequenceIndexes[2], 1, oldIdx);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], false);
 				_scene->_sequences.setTimingTrigger(15, 2);
 				_vm->_sound->command(73);
 				}
-				break; 
+				break;
 
 			case 2:
 				_scene->deleteSequence(_globals._sequenceIndexes[2]);
@@ -1673,7 +1673,7 @@ void Scene103::actions() {
 				break;
 
 			case 3:
-				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[2]); 
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[2]);
 				_game._player._visible = true;
 				if (_action.isAction(NOUN_LOCK) || _action.isAction(VERB_UNLOCK))
 					_vm->_dialogs->show(00032);
@@ -1695,7 +1695,7 @@ void Scene103::actions() {
 		switch (_game._trigger) {
 		case (0):
 			_game._player._stepEnabled = false;
-			_game._player._visible = false;  
+			_game._player._visible = false;
 			_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 5, 0, 0, 2);
 			_scene->_sequences.setRange(_globals._sequenceIndexes[8], 1, 5);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
@@ -1715,7 +1715,7 @@ void Scene103::actions() {
 			break;
 
 		case 2:
-			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]); 
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]);
 			_game._player._visible = true;
 			_scene->_sequences.setTimingTrigger(20, 3);
 			_action._inProgress = false;
@@ -1778,7 +1778,7 @@ void Scene103::actions() {
 		}
 		_action._inProgress = false;
 		return;
-	}    
+	}
 
 	if (_action.isAction(VERB_LOOK_THROUGH, NOUN_PROMPTERS_BOX) || _sitFl) {
 		if (_standPosition == 1) {
@@ -1811,7 +1811,7 @@ void Scene103::actions() {
 	}
 
 	if (_action.isAction(VERB_PUSH, NOUN_LEVER) || _action.isAction(VERB_PULL, NOUN_LEVER)) {
-		if (_globals[kTrapDoorStatus] == 1) { 
+		if (_globals[kTrapDoorStatus] == 1) {
 			switch (_game._trigger) {
 			case 0:
 				_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('l', 1), 1);
@@ -1824,7 +1824,7 @@ void Scene103::actions() {
 			case 1:
 				_anim1ActvFl    = false;
 				_game._player._visible = true;
-				_globals[kTrapDoorStatus] = 0; 
+				_globals[kTrapDoorStatus] = 0;
 				_game._player._stepEnabled = true;
 				_game.syncTimers(2, 0, 3, _globals._animationIndexes[1]);
 				break;
@@ -1845,7 +1845,7 @@ void Scene103::actions() {
 			case 1:
 				_anim2ActvFl = false;
 				_game._player._visible = true;
-				_globals[kTrapDoorStatus] = 1; 
+				_globals[kTrapDoorStatus] = 1;
 				_game._player._stepEnabled = true;
 				_game.syncTimers(2, 0, 3, _globals._animationIndexes[2]);
 				break;
@@ -2173,14 +2173,14 @@ void Scene103::handleJacquesAnim() {
 		}
 		break;
 
-	case 36:    
-	case 40:    
-	case 48:    
+	case 36:
+	case 40:
+	case 48:
 		switch (_jacquesAction) {
 		case 0:
 		case 2:
 		case 3:
-			random = 2; 
+			random = 2;
 			break;
 
 		case 4:
@@ -2199,23 +2199,23 @@ void Scene103::handleJacquesAnim() {
 		switch (random) {
 		case 1:
 			resetFrame = 37;
-			break; 
+			break;
 
 		case 2:
 			resetFrame = 49;
-			break; 
+			break;
 
 		case 3:
 			resetFrame = 41;
-			break; 
+			break;
 
 		default:
 			resetFrame = 35;
-			break; 
+			break;
 		}
 		break;
 
-	case 44:   
+	case 44:
 		random = _vm->getRandomNumber(1, 50);
 		while (_lastRandom == random) {
 			random = _vm->getRandomNumber(1, 50);
@@ -2227,7 +2227,7 @@ void Scene103::handleJacquesAnim() {
 		case 2:
 		case 3:
 		case 4:
-			random = 1; 
+			random = 1;
 			break;
 
 		default:
@@ -2241,11 +2241,11 @@ void Scene103::handleJacquesAnim() {
 		switch (random) {
 		case 1:
 			resetFrame = 45;
-			break; 
+			break;
 
 		default:
 			resetFrame = 43;
-			break; 
+			break;
 		}
 		break;
 	}
@@ -2272,8 +2272,8 @@ void Scene103::climbRightStairs() {
 	if (_lastStairFrame == 2) {
 		_scene->deleteSequence(3);
 		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
-		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13); 
-		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13);
+		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139));
 	}
 
 	if (stairs_reset_frame >= 0) {
@@ -2298,8 +2298,8 @@ void Scene103::climbLeftStairs() {
 	if (_lastStairFrame == 2) {
 		_scene->deleteSequence(3);
 		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
-		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13); 
-		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139)); 
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13);
+		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139));
 	}
 
 	if (stairs_reset_frame >= 0) {
@@ -2319,8 +2319,8 @@ void Scene103::descendRightStairs() {
 	if (_lastStairFrame == 2) {
 		_scene->deleteSequence(3);
 		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
-		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);  
-		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139)); 
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
+		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139));
 	}
 
 	if (stairs_reset_frame >= 0) {
@@ -2340,8 +2340,8 @@ void Scene103::descendLeftStairs() {
 	if (_lastStairFrame == 2) {
 		_scene->deleteSequence(3);
 		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
-		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);  
-		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139)); 
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
+		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139));
 	}
 
 	if (stairs_reset_frame >= 0) {
@@ -2442,5 +2442,1189 @@ void Scene103::process_conv_jacques() {
 
 /*------------------------------------------------------------------------*/
 
+Scene104::Scene104(MADSEngine *vm) : Scene1xx(vm) {
+	_anim0ActvFl = _anim1ActvFl = _anim2ActvFl = false;
+	_needToTalk = false;
+	_needToGetUp = false;
+	_sittingUp = false;
+	_beforeHeLeaves = false;
+	_beforeSheLeaves = false;
+	_needToStandUp = false;
+
+	_walkStatus = -1;
+	_walkFrame = -1;
+	_coupleStatus = -1;
+	_richStatus = -1;
+	_richTalkCount = -1;
+	_manTalkCount = -1;
+	_womanTalkCount = -1;
+	_lookCount = -1;
+	_coupleFrame = -1;
+	_lastPlayerFrame = -1;
+	_richFrame = -1;
+}
+
+void Scene104::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+	s.syncAsByte(_anim0ActvFl);
+	s.syncAsByte(_anim1ActvFl);
+	s.syncAsByte(_anim2ActvFl);
+	s.syncAsByte(_needToTalk);
+	s.syncAsByte(_needToGetUp);
+	s.syncAsByte(_sittingUp);
+	s.syncAsByte(_beforeHeLeaves);
+	s.syncAsByte(_beforeSheLeaves);
+	s.syncAsByte(_needToStandUp);
+
+	s.syncAsSint16LE(_walkStatus);
+	s.syncAsSint16LE(_walkFrame);
+	s.syncAsSint16LE(_coupleStatus);
+	s.syncAsSint16LE(_richStatus);
+	s.syncAsSint16LE(_richTalkCount);
+	s.syncAsSint16LE(_manTalkCount);
+	s.syncAsSint16LE(_womanTalkCount);
+	s.syncAsSint16LE(_lookCount);
+	s.syncAsSint16LE(_coupleFrame);
+	s.syncAsSint16LE(_lastPlayerFrame);
+}
+
+void Scene104::setup() {
+	setPlayerSpritesPrefix();
+	setAAName();
+
+	if (_globals[kTrapDoorStatus] == 1)
+		_scene->_initialVariant = 1;
+
+	_scene->addActiveVocab(NOUN_MONSIEUR_RICHARD);
+}
+
+void Scene104::enter() {
+	_vm->_disableFastwalk = true;
+
+	if (_scene->_priorSceneId != RETURNING_FROM_LOADING) {
+		_anim0ActvFl = false;
+		_anim1ActvFl = false;
+		_anim2ActvFl = false;
+		_needToTalk = false;
+		_needToGetUp = false;
+		_sittingUp = false;
+		_beforeSheLeaves = false;
+		_needToStandUp = false;
+	}
+
+	_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('a', 0), false);
+	_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('a', 6), false);
+	_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('x', 0), false);
+
+	if (_globals[kCurrentYear] == 1993)
+		_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('z', 0), false);
+
+	_vm->_gameConv->get(7);
+
+	if (_globals[kTrapDoorStatus] == 1) {
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 15);
+	} else {
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 2);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 15);
+	}
+
+	if (_scene->_priorSceneId == RETURNING_FROM_LOADING) {
+		if (_vm->_gameConv->_restoreRunning == 7) {
+			_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('r', 1), 1);
+			_globals._animationIndexes[2] = _scene->loadAnimation(formAnimName('d', 1), 1);
+			_walkStatus = 0;
+			_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('m', 1), 1);
+			if (_coupleStatus < 11) {
+				_coupleStatus = 1;
+				_richStatus = 0;
+				_scene->setAnimFrame(_globals._animationIndexes[1], 14);
+			} else {
+				_coupleStatus = 17;
+				_richStatus = 4;
+				_scene->setAnimFrame(_globals._animationIndexes[1], 105);
+				_scene->setAnimFrame(_globals._animationIndexes[0], 216);
+			}
+
+			_vm->_gameConv->run(7);
+			_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+			_game._player._visible = false;
+		}
+
+	} else if (_scene->_priorSceneId == 301) {
+		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('r', 1), 1);
+		_anim1ActvFl = true;
+		_coupleStatus = 11;
+
+		_globals._animationIndexes[2] = _scene->loadAnimation(formAnimName('d', 1), 1);
+		_anim2ActvFl = true;
+		_walkStatus = 0;
+
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('m', 1), 1);
+		_anim0ActvFl = true;
+		_richStatus = 0;
+
+		cleanInventory ();
+
+		_game._player._visible = false;
+		_game._visitedScenes.pop_back();
+		_globals[kTrapDoorStatus] = 1;
+		_globals[kCurrentYear] = 1881;
+		_globals[kPrompterStandStatus] = 1;
+		_globals[kTicketPeoplePresent] = 1;
+		_globals[kMakeBrieLeave203] = false;
+		_game._player._playerPos.x = 161;
+
+		_game._visitedScenes.add(301);
+		_game._visitedScenes.add(101);
+
+		_scene->setCamera(Common::Point(60, 0));
+		_scene->_sequences.setTimingTrigger(1, 91);
+
+	} else if (_scene->_priorSceneId == 103) {
+		if (_globals[kRoom103104Transition] == 0) {
+			_scene->_userInterface.emptyConversationList();
+			_scene->_userInterface.setup(kInputConversation);
+
+			if (!_globals[kObservedPhan104]) {
+				_globals._animationIndexes[4] = _scene->loadAnimation(formAnimName('p', 1), 93);
+				_game._player._playerPos.x = 319;
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_scene->setCamera(Common::Point(158, 0));
+			} else {
+				_globals._animationIndexes[5] = _scene->loadAnimation(formAnimName('p', 2), 94);
+				_game._player._playerPos.x = 319;
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_scene->setCamera(Common::Point(158, 0));
+			}
+		} else {
+			_game._player._playerPos = Common::Point(319, 96);
+			_game._player._facing = FACING_SOUTH;
+			_scene->setCamera(Common::Point(158, 0));
+		}
+	} else if (_scene->_priorSceneId == 102) {
+		switch (_globals[kDeathLocation]) {
+		case 0:
+			_game._player._playerPos = Common::Point(496, 79);
+			_scene->setCamera(Common::Point(320, 0));
+			break;
+
+		case 1:
+			_game._player._playerPos = Common::Point(346, 71);
+			_scene->setCamera(Common::Point(158, 0));
+			break;
+
+		case 2:
+			_game._player._playerPos = Common::Point(172, 73);
+			break;
+
+		default:
+			break;
+		}
+	} else if (_scene->_priorSceneId == 108) {
+		if (_game._player._playerPos.x > 213)
+			_game._player._playerPos.y = 97;
+		else if (_game._player._playerPos.x > 110)
+			_game._player._playerPos.y = 128;
+		else
+			_game._player._playerPos.y = 148;
+
+		_game._player.firstWalk(Common::Point(-20, _game._player._playerPos.y), FACING_EAST, Common::Point(12, _game._player._playerPos.y), FACING_EAST, true);
+	} else if ((_scene->_priorSceneId == 107) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+		if (_game._player._playerPos.x > 191)
+			_game._player._playerPos.y = 142;
+		else if (_game._player._playerPos.x > 104)
+			_game._player._playerPos.y = 120;
+		else
+			_game._player._playerPos.y = 95;
+
+		_game._player.firstWalk(Common::Point(655, _game._player._playerPos.y), FACING_WEST, Common::Point(627, _game._player._playerPos.y), FACING_WEST, true);
+		_scene->setCamera(Common::Point(320, 0));
+	}
+
+	if (_globals[kCurrentYear] == 1993) {
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+	} else
+		_scene->_hotspots.activate(NOUN_CHANDELIER, false);
+
+	if (_globals[kTrapDoorStatus] == 1) {
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 15);
+	} else {
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 2);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 15);
+	}
+
+	sceneEntrySound();
+}
+
+void Scene104::step() {
+	if (_anim0ActvFl)
+		handleRichAnimations();
+
+	if (_anim1ActvFl)
+		handleCoupleAnimations();
+
+	if (_anim2ActvFl)
+		handleWalkAnimation();
+
+	if (_game._player._moving)
+		handlePlayerWalk();
+
+	if (_game._trigger == 91) {
+		_vm->_dialogs->show(10434);
+		_vm->_gameConv->run(7);
+		_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+	}
+
+	if (_game._trigger == 93) {
+		_scene->_nextSceneId = 103;
+		_game._player._playerPos.x = 400;
+		_globals[kRoom103104Transition] = 0;
+	}
+
+	if (_game._trigger == 94) {
+		_scene->_nextSceneId = 103;
+		_globals[kRoom103104Transition] = 0;
+	}
+}
+
+void Scene104::preActions() {
+	if (_action.isAction(NOUN_EXIT, NOUN_STAGE_LEFT))
+		_game._player._walkOffScreenSceneId = 108;
+
+	if (_action.isAction(NOUN_EXIT, NOUN_STAGE_RIGHT))
+		_game._player._walkOffScreenSceneId = 107;
+
+	if (_action.isAction(VERB_OPEN, NOUN_TRAP_DOOR) || _action.isAction(VERB_CLOSE, NOUN_TRAP_DOOR))
+		_game._player.walk(Common::Point(320, 92), FACING_NORTH);
+}
+
+void Scene104::actions() {
+	if (_vm->_gameConv->_running == 7) {
+		processConversations();
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLIMB_THROUGH, NOUN_TRAP_DOOR)) {
+		if (_globals[kTrapDoorStatus] == 0) {
+			switch (_game._trigger) {
+			case 0:
+				_game._player._visible = false;
+				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 0, 0, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 13);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 16);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 60);
+				break;
+
+			case 60:
+				_scene->_nextSceneId = 103;
+				_globals[kRoom103104Transition] = 1;
+				_game._player._stepEnabled = true;
+				break;
+
+			default:
+				break;
+			}
+		} else {
+			_vm->_dialogs->show(10429);
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_JUMP_INTO, NOUN_ORCHESTRA_PIT)) {
+		switch (_game._trigger) {
+		case 0:
+			if (_game._player._playerPos.x > 400)
+				_globals[kDeathLocation] = 0;
+			else if (_game._player._playerPos.x > 200)
+				_globals[kDeathLocation] = 1;
+			else
+				_globals[kDeathLocation] = 2;
+
+			_scene->changeVariant(2);
+
+			if (_globals[kTrapDoorStatus] == 1)
+				_scene->drawToBackground(_globals._spriteIndexes[0], 1, Common::Point(-32000, -32000), 0, 100);
+			else
+				_scene->drawToBackground(_globals._spriteIndexes[0], 2, Common::Point(-32000, -32000), 0, 100);
+
+			_vm->_dialogs->show(10426);
+			_game._player._visible = false;
+			_game._player._stepEnabled = false;
+			_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 7, 0, 0, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 15);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[3], -1, 4);
+			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], _game._player._playerPos);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
+			break;
+
+		case 1:
+			_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 1, 0, 0, 10);
+			_scene->_sequences.setTimingTrigger(60, 2);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[3], 4, 4);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 15);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
+			_scene->_sequences.setMotion(_globals._sequenceIndexes[3], 0, 0, 200);
+			break;
+
+		case 2:
+			_vm->_sound->command(1);
+			_vm->_sound->command(67);
+			_scene->_nextSceneId = 102;
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action._lookFlag) {
+		if (_globals[kCurrentYear] == 1993)
+			_vm->_dialogs->show(10410);
+		else
+			_vm->_dialogs->show(10411);
+
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isAction(NOUN_STAGE)) {
+			_vm->_dialogs->show(10412);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_APRON)) {
+			_vm->_dialogs->show(10413);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PROSCENIUM_ARCH)) {
+			_vm->_dialogs->show(10414);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_ACT_CURTAIN)) {
+			_vm->_dialogs->show(10415);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_ORCHESTRA_PIT)) {
+			_vm->_dialogs->show(10416);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CONDUCTORS_STAND)) {
+			_vm->_dialogs->show(10417);
+			_action._inProgress = false;
+			return;
+		}
+
+		if ((_action.isAction(NOUN_MUSIC_STAND)) || (_action.isAction(NOUN_MUSIC_STANDS))) {
+			_vm->_dialogs->show(10418);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PROMPTERS_BOX)) {
+			_vm->_dialogs->show(10419);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_TRAP_DOOR)) {
+			_vm->_dialogs->show(10420);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_HOUSE)) {
+			if (_globals[kCurrentYear] == 1881)
+				_vm->_dialogs->show(10421);
+			else
+				_vm->_dialogs->show(10427);
+
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STAGE_LEFT)) {
+			_vm->_dialogs->show(10422);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STAGE_RIGHT)) {
+			_vm->_dialogs->show(10423);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CHANDELIER)) {
+			_vm->_dialogs->show(10428);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_MONSIEUR_RICHARD)) {
+			_vm->_dialogs->show(10433);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_JUMP_INTO, NOUN_ORCHESTRA_PIT)) {
+		_vm->_dialogs->show(10426);
+		_scene->_nextSceneId = 102;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_PROMPTERS_BOX) || _action.isAction(VERB_CLOSE, NOUN_PROMPTERS_BOX)) {
+		_vm->_dialogs->show(10430);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_TRAP_DOOR)) {
+		if (_globals[kTrapDoorStatus] == 0)
+			_vm->_dialogs->show(10424);
+		else
+			_vm->_dialogs->show(10432);
+
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_TRAP_DOOR)) {
+		if (_globals[kTrapDoorStatus] == 1)
+			_vm->_dialogs->show(10425);
+		else
+			_vm->_dialogs->show(10433);
+
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_CHANDELIER)) {
+		_vm->_dialogs->show(10435);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene104::cleanInventory() {
+	if (_game._objects.isInInventory(OBJ_LARGE_NOTE))
+		_game._objects.setRoom(OBJ_LARGE_NOTE, NOWHERE);
+
+	if (_game._objects.isInInventory(OBJ_SANDBAG))
+		_game._objects.setRoom(OBJ_SANDBAG, NOWHERE);
+
+	if (_game._objects.isInInventory(OBJ_SMALL_NOTE))
+		_game._objects.setRoom(OBJ_SMALL_NOTE, NOWHERE);
+
+	if (_game._objects.isInInventory(OBJ_PARCHMENT))
+		_game._objects.setRoom(OBJ_PARCHMENT, NOWHERE);
+
+	if (_game._objects.isInInventory(OBJ_BOOK))
+		_game._objects.setRoom(OBJ_BOOK, NOWHERE);
+
+	if (_game._objects.isInInventory(OBJ_RED_FRAME))
+		_game._objects.setRoom(OBJ_RED_FRAME, 105);
+
+	if (_game._objects.isInInventory(OBJ_YELLOW_FRAME))
+		_game._objects.setRoom(OBJ_YELLOW_FRAME, 107);
+
+	if (_game._objects.isInInventory(OBJ_BLUE_FRAME))
+		_game._objects.setRoom(OBJ_BLUE_FRAME, 302);
+
+	if (_game._objects.isInInventory(OBJ_GREEN_FRAME))
+		_game._objects.setRoom(OBJ_GREEN_FRAME, 307);
+}
+
+void Scene104::processConversations() {
+	bool interlocutorTriggerFl = false;
+	bool heroTriggerFl = false;
+
+	switch (_action._activeAction._verbId) {
+	case 2:
+	case 10:
+	case 12:
+	case 16:
+	case 20:
+	case 21:
+	case 24:
+		_vm->_gameConv->setInterlocutorTrigger(75);
+		interlocutorTriggerFl = true;
+		break;
+
+	case 3:
+		if (!_needToGetUp) {
+			_vm->_gameConv->setInterlocutorTrigger(67);
+			interlocutorTriggerFl = true;
+			_needToGetUp = true;
+		}
+		break;
+
+	case 8:
+		_vm->_gameConv->setInterlocutorTrigger(87);
+		interlocutorTriggerFl = true;
+		break;
+
+	case 11:
+		_vm->_gameConv->setInterlocutorTrigger(77);
+		interlocutorTriggerFl = true;
+		break;
+
+	case 14:
+	case 25:
+		if (!_game._trigger) {
+			_richStatus = 0;
+			_coupleStatus = 5;
+			_vm->_gameConv->hold();
+		}
+		break;
+
+	case 22:
+		_vm->_gameConv->setInterlocutorTrigger(75);
+		_vm->_gameConv->setHeroTrigger(79);
+		interlocutorTriggerFl = true;
+		heroTriggerFl  = true;
+		break;
+
+	case 23:
+		_vm->_gameConv->setInterlocutorTrigger(89);
+		interlocutorTriggerFl = true;
+		break;
+
+	case 28:
+		_vm->_gameConv->setInterlocutorTrigger(81);
+		interlocutorTriggerFl = true;
+		break;
+
+	case 30:
+		if (!_game._trigger) {
+			_vm->_gameConv->hold();
+			_richStatus = 4;
+		}
+		break;
+
+	case 32:
+		_coupleStatus = 14;
+		heroTriggerFl = true;
+		interlocutorTriggerFl = true;
+		_vm->_gameConv->hold();
+		break;
+
+	default:
+		break;
+	}
+
+	switch (_game._trigger) {
+	case 67:
+		_vm->_gameConv->hold();
+		_coupleStatus = 12;
+		break;
+
+	case 69:
+		if (!_beforeSheLeaves && !_beforeHeLeaves && (_coupleStatus != 14) && !_needToStandUp) {
+			_richStatus = 0;
+			if (_sittingUp)
+				_coupleStatus = 4;
+			else
+				_coupleStatus = 12;
+		}
+		break;
+
+	case 71:
+		if (!_beforeSheLeaves && !_beforeHeLeaves && (_coupleStatus != 14) && !_needToStandUp) {
+			_richStatus = 0;
+			if (_sittingUp && !_beforeSheLeaves) {
+				_coupleStatus = 3;
+				_richStatus = 0;
+			}
+		}
+		break;
+
+	case 75:
+		_richStatus = 1;
+
+		if (_sittingUp) {
+			if (_action._activeAction._verbId == 20) {
+				_lookCount = 0;
+				_coupleStatus = 9;
+			} else if ((_action._activeAction._verbId == 21) || (_action._activeAction._verbId == 22)) {
+				_lookCount = 0;
+				_coupleStatus = 10;
+			} else {
+				_coupleStatus = 1;
+			}
+		} else {
+			_coupleStatus = 11;
+		}
+		break;
+
+	case 77:
+		_richStatus = 0;
+		_coupleStatus = 8;
+		break;
+
+	case 79:
+		_richStatus = 0;
+		_coupleStatus = 7;
+		break;
+
+	case 81:
+		_richStatus = 1;
+		_beforeHeLeaves = true;
+		_coupleStatus = 15;
+		break;
+
+	case 83:
+		_vm->_gameConv->release();
+		if (_coupleStatus != 17)
+			_game._player._stepEnabled = false;
+		break;
+
+	case 87:
+		_richStatus = 3;
+		break;
+
+	case 89:
+		_richStatus = 2;
+		break;
+
+	default:
+		break;
+	}
+
+	if (!heroTriggerFl && !_beforeSheLeaves)
+		_vm->_gameConv->setHeroTrigger(71);
+
+	if (!interlocutorTriggerFl)
+		_vm->_gameConv->setInterlocutorTrigger(69);
+
+	_richTalkCount = 0;
+	_manTalkCount = 0;
+	_womanTalkCount = 0;
+}
+
+void Scene104::handleWalkAnimation() {
+	if (_scene->_animation[_globals._animationIndexes[2]]->getCurrentFrame() == _walkFrame)
+		return;
+
+	_walkFrame = _scene->_animation[_globals._animationIndexes[2]]->getCurrentFrame();
+	int daae_walk_reset_frame = -1;
+
+	switch (_walkFrame) {
+	case 1:
+		if (_walkStatus == 0) {
+			daae_walk_reset_frame = 0;
+		} else {
+			_game.syncTimers(3, _globals._animationIndexes[2], 3, _globals._animationIndexes[1]);
+			daae_walk_reset_frame = 1;
+		}
+		break;
+
+	case 138:
+		_walkStatus = 0;
+		daae_walk_reset_frame = 0;
+		break;
+
+	default:
+		break;
+	}
+
+	if (daae_walk_reset_frame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[2], daae_walk_reset_frame);
+		_walkFrame = daae_walk_reset_frame;
+	}
+}
+
+void Scene104::handleRichAnimations() {
+	if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == _richFrame)
+		return;
+
+	_richFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
+	int random;
+	int resetFrame = -1;
+
+	switch (_richFrame) {
+	case 1:
+	case 2:
+	case 3:
+	case 4:
+	case 8:
+	case 14:
+	case 22:
+	case 34:
+	case 40:
+	case 44:
+	case 48:
+		random = -1;
+		if (_richStatus == 1) {
+			random = _vm->getRandomNumber(1, 3);
+			++_richTalkCount;
+			if (_richTalkCount > 15) {
+				_richStatus = 0;
+				random = 40;
+			}
+		}
+
+		if (_richStatus == 0)
+			random = _vm->getRandomNumber(7, 80);
+
+		if (_richStatus == 2) {
+			random = 4;
+			_richStatus = 1;
+			_richTalkCount = 8;
+		}
+
+		if (_richStatus == 3) {
+			random = 5;
+			_richStatus = 1;
+			_richTalkCount = 8;
+		}
+
+		if (_richStatus == 4)
+			random = 6;
+
+		if (_richStatus == 5)
+			random = 7;
+
+		switch (random) {
+		case 1:
+			resetFrame = 1;
+			break;
+
+		case 2:
+			resetFrame = 2;
+			break;
+
+		case 3:
+			resetFrame = 3;
+			break;
+
+		case 4:
+			resetFrame = 23;
+			break;
+
+		case 5:
+			resetFrame = 35;
+			break;
+
+		case 6:
+			resetFrame = 49;
+			break;
+
+		case 7:
+			resetFrame = 41;
+			break;
+
+		case 8:
+			resetFrame = 45;
+			break;
+
+		case 9:
+			resetFrame = 9;
+			break;
+
+		case 10:
+			resetFrame = 5;
+			break;
+
+		case 11:
+			resetFrame = 15;
+			break;
+
+		default:
+			resetFrame = 0;
+			break;
+		}
+		break;
+
+	case 117:
+		_coupleStatus = 13;
+		break;
+
+	case 125:
+		resetFrame = 124;
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
+		_richFrame = resetFrame;
+	}
+}
+
+void Scene104::handleCoupleAnimations() {
+	if (_scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame() == _coupleFrame)
+		return;
+
+	_coupleFrame = _scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame();
+	int resetFrame = -1;
+	int random;
+
+	switch (_coupleFrame) {
+	case 1:
+	case 103:
+	case 104:
+	case 105:
+		if (_coupleStatus == 11)
+			resetFrame = 0;
+		else {
+			resetFrame = _vm->getRandomNumber(102, 104);
+			++_womanTalkCount;
+			if (_womanTalkCount > 15) {
+				if (_needToGetUp) {
+					_coupleStatus = 6;
+					resetFrame   = 1;
+				} else {
+					_coupleStatus = 11;
+					resetFrame   = 0;
+				}
+			}
+		}
+		break;
+
+	case 9:
+	case 10:
+	case 11:
+	case 12:
+	case 13:
+	case 14:
+	case 15:
+	case 25:
+	case 33:
+	case 41:
+		switch (_coupleFrame) {
+		case 9:
+			_coupleStatus = 6;
+			break;
+
+		case 33:
+			_vm->_gameConv->release();
+			if (_action._activeAction._verbId == 13)
+				_coupleStatus = 4;
+
+			break;
+
+		case 41:
+			_vm->_gameConv->release();
+			_sittingUp = true;
+			if (_needToTalk)
+				_coupleStatus = 3;
+			else
+				_coupleStatus = 1;
+			break;
+		}
+
+		random = -1;
+
+		switch (_coupleStatus) {
+		case 1:
+			random = 12;
+			break;
+
+		case 2:
+		case 7:
+		case 8:
+			random = 11;
+			break;
+
+		case 3:
+			random = _vm->getRandomNumber(4, 6);
+			++_manTalkCount;
+			if (_manTalkCount > 15) {
+				_coupleStatus = 1;
+				random = 12;
+			}
+			break;
+
+		case 4:
+			if (_beforeSheLeaves) {
+				random = 10;
+			} else {
+				random = _vm->getRandomNumber(1, 3);
+				++_womanTalkCount;
+				if (_womanTalkCount > 15) {
+					_coupleStatus = 1;
+					random = 12;
+				}
+			}
+			break;
+
+		case 5:
+			_coupleStatus = 1;
+			random = 8;
+			break;
+
+		case 6:
+			_coupleStatus = 1;
+			random = 7;
+			break;
+
+		case 13:
+			random = 9;
+			break;
+
+		case 15:
+			random = 10;
+			break;
+
+		default:
+			break;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 12;
+			break;
+
+		case 2:
+			resetFrame = 13;
+			break;
+
+		case 3:
+			resetFrame = 14;
+			break;
+
+		case 4:
+			resetFrame = 9;
+			break;
+
+		case 5:
+			resetFrame = 10;
+			break;
+
+		case 6:
+			resetFrame = 11;
+			break;
+
+		case 7:
+			resetFrame = 33;
+			break;
+
+		case 8:
+			resetFrame = 25;
+			break;
+
+		case 9:
+			resetFrame = 54;
+			break;
+
+		case 10:
+			resetFrame = 41;
+			break;
+
+		case 11:
+			resetFrame = 15;
+			break;
+
+		case 12:
+			resetFrame = 14;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 17:
+	case 18:
+	case 19:
+	case 20:
+	case 21:
+	case 22:
+	case 23:
+		random = -1;
+		switch (_coupleStatus) {
+		case 1:
+		case 3:
+		case 4:
+		case 5:
+		case 6:
+		case 15:
+		case 16:
+			random = 7;
+			break;
+
+		case 2:
+			random = 8;
+			break;
+
+		case 7:
+			random = _vm->getRandomNumber(4, 6);
+			++_manTalkCount;
+			if (_manTalkCount > 15) {
+				_coupleStatus = 2;
+				random = 8;
+			}
+			break;
+
+		case 8:
+			random = _vm->getRandomNumber(1, 3);
+			++_womanTalkCount;
+			if (_womanTalkCount > 15) {
+				_coupleStatus = 1;
+				random = 7;
+			}
+			break;
+
+		case 9:
+			random = 1;
+			++_lookCount;
+			if (_lookCount > 6) {
+				_coupleStatus = 1;
+				random = 7;
+			}
+			break;
+
+		case 10:
+			random = 1;
+			break;
+
+		default:
+			break;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 20;
+			break;
+
+		case 2:
+			resetFrame = 21;
+			break;
+
+		case 3:
+			resetFrame = 22;
+			break;
+
+		case 4:
+			resetFrame = 17;
+			break;
+
+		case 5:
+			resetFrame = 18;
+			break;
+
+		case 6:
+			resetFrame = 19;
+			break;
+
+		case 7:
+			resetFrame = 23;
+			break;
+
+		case 8:
+			resetFrame = 20;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 52:
+		_walkStatus = 1;
+		resetFrame = 54;
+		break;
+
+	case 55:
+		if (_coupleStatus != 13)
+			resetFrame = 54;
+
+		break;
+
+	case 89:
+		_vm->_gameConv->release();
+		break;
+
+	case 90:
+		if (_coupleStatus != 14) {
+			resetFrame = 89;
+		} else {
+			resetFrame = 90;
+			_globals[kTempVar] = 200;
+		}
+		break;
+
+	case 102:
+		_vm->_gameConv->release();
+		_game._player._playerPos = Common::Point(166, 126);
+		_game._player.resetFacing(FACING_SOUTH);
+		resetFrame = 105;
+		_game._player._visible = true;
+		_game.syncTimers(2, 0, 3, _globals._animationIndexes[1]);
+		break;
+
+	case 106:
+		_coupleStatus = 17;
+		resetFrame = 105;
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[1], resetFrame);
+		_coupleFrame = resetFrame;
+	}
+}
+
+void Scene104::handlePlayerWalk() {
+	if (_game._player._frameNumber == _lastPlayerFrame)
+		return;
+
+	_lastPlayerFrame = _game._player._frameNumber;
+	switch (_game._player._facing) {
+	case FACING_NORTH:
+	case FACING_SOUTH:
+		if ((_game._player._frameNumber == 5) || (_game._player._frameNumber == 11))
+			_vm->_sound->command(68);
+		break;
+
+	case FACING_NORTHEAST:
+	case FACING_NORTHWEST:
+	case FACING_SOUTHEAST:
+	case FACING_SOUTHWEST:
+		if ((_game._player._frameNumber == 7) || (_game._player._frameNumber == 14))
+			_vm->_sound->command(68);
+		break;
+
+	case FACING_EAST:
+	case FACING_WEST:
+		if ((_game._player._frameNumber == 8) || (_game._player._frameNumber == 16))
+			_vm->_sound->command(68);
+		break;
+
+	default:
+		break;
+	}
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 173f6c5..cd9f6ae 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -150,6 +150,48 @@ public:
 	virtual void actions();
 };
 
+class Scene104 : public Scene1xx {
+private:
+	bool _anim0ActvFl;
+	bool _anim1ActvFl;
+	bool _anim2ActvFl;
+	bool _needToGetUp;
+	bool _needToStandUp;
+	bool _needToTalk;
+	bool _sittingUp;
+	bool _beforeSheLeaves;
+	bool _beforeHeLeaves;
+
+	int _walkStatus;
+	int _walkFrame;
+	int _coupleStatus;
+	int _coupleFrame;
+	int _richStatus;
+	int _richFrame;
+	int _manTalkCount;
+	int _womanTalkCount;
+	int _lookCount;
+	int _richTalkCount;
+	int _lastPlayerFrame;
+
+	void cleanInventory();
+	void processConversations();
+	void handleWalkAnimation();
+	void handleCoupleAnimations();
+	void handleRichAnimations();
+	void handlePlayerWalk();
+
+public:
+	Scene104(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
+
 } // End of namespace Phantom
 } // End of namespace MADS
 


Commit: 530c3303c6457054daf8211886ae824937670af6
    https://github.com/scummvm/scummvm/commit/530c3303c6457054daf8211886ae824937670af6
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-16T15:55:08+02:00

Commit Message:
MADS: Phantom: Fix some code formatting

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 7d6ba22..66a8721 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -947,7 +947,7 @@ void Scene103::enter() {
 			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139));
 
 			_globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, 1);
-			_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 1) ;
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 1);
 		}
 
 		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(121, 79, 40, 63));
@@ -1464,7 +1464,7 @@ void Scene103::actions() {
 				case 75:
 					if (_globals[kPrompterStandStatus] == 0) {
 						_globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, 1);
-						_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 1) ;
+						_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 1);
 						_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
 						_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
 						_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139));


Commit: abd7d58633bb0a0e024ddfd5f257b09e532d4630
    https://github.com/scummvm/scummvm/commit/abd7d58633bb0a0e024ddfd5f257b09e532d4630
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-18T01:07:06+02:00

Commit Message:
MADS: Phantom: Add logic for scene 105

Use an enum in various calls of _scene->_dynamicHotspots.add()

Changed paths:
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h
    engines/mads/scene.cpp
    engines/mads/scene.h



diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 83b7f8b..4e474a8 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -49,9 +49,9 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 103:	// below stage
 		return new Scene103(vm);
 	case 104:	// stage
-		return new DummyScene(vm);	// TODO
+		return new Scene104(vm);
 	case 105:	// ground floor, storage room
-		return new DummyScene(vm);	// TODO
+		return new Scene105(vm);
 	case 106:	// behind stage
 		return new DummyScene(vm);	// TODO
 	case 107:	// stage right wing
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 66a8721..78fe216 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -191,7 +191,7 @@ void Scene101::enter() {
 		_anim0Running  = true;
 		_anim1Running  = true;
 
-		_brieAnimId = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
+		_brieAnimId = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(0, 0, 0, 0));
 		_scene->_dynamicHotspots[_brieAnimId]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_brieAnimId, Common::Point(490, 119), FACING_NONE);
 		_scene->setDynamicAnim(_brieAnimId, 0, 0);
@@ -200,7 +200,7 @@ void Scene101::enter() {
 		_scene->setDynamicAnim(_brieAnimId, 0, 3);
 		_scene->setDynamicAnim(_brieAnimId, 0, 4);
 
-		int tmpIdx = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
+		int tmpIdx = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(0, 0, 0, 0));
 		_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(25, 80), FACING_NONE);
 		_scene->setDynamicAnim(tmpIdx, 1, 1);
@@ -209,7 +209,7 @@ void Scene101::enter() {
 		_talkCounter = 0;
 	} else if (_globals[kBrieTalkStatus] == 1) {
 		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('b', 9), 1);
-		_brieAnimId = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(0, 0, 0, 0));
+		_brieAnimId = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(0, 0, 0, 0));
 		_scene->_dynamicHotspots[_brieAnimId]._articleNumber = PREP_ON;
 		_scene->setDynamicAnim(_brieAnimId, 1, 1);
 		_scene->setDynamicAnim(_brieAnimId, 1, 2);
@@ -950,38 +950,38 @@ void Scene103::enter() {
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 1);
 		}
 
-		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(121, 79, 40, 63));
+		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 79, 40, 63));
 		_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, promptPos, promptFacing);
 
-		_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(161, 67, 16, 75));
+		_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(161, 67, 16, 75));
 		_scene->_dynamicHotspots[_hotspotPrompt2]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt2, promptPos, promptFacing);
 
-		_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(177, 90, 18, 52));
+		_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(177, 90, 18, 52));
 		_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, promptPos, promptFacing);
 
-		_hotspotPrompt4 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(114, 100, 7, 38));
+		_hotspotPrompt4 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(114, 100, 7, 38));
 		_scene->_dynamicHotspots[_hotspotPrompt4]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt4, promptPos, promptFacing);
 
-		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, -1, Common::Rect(121, 49, 40, 30));
+		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 49, 40, 30));
 		_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(196, 134), FACING_SOUTHWEST);
 		_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
 
-		_hotspotRightFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(154, 6, 41, 6));
+		_hotspotRightFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(154, 6, 41, 6));
 		_scene->_dynamicHotspots[_hotspotRightFloor1]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotRightFloor1, Common::Point(171, 142), FACING_NONE);
 
-		_hotspotRightFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(114, 136, 32, 6));
+		_hotspotRightFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(114, 136, 32, 6));
 		_scene->_dynamicHotspots[_hotspotRightFloor2]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotRightFloor2, Common::Point(127, 140), FACING_NONE);
 
 		if ((_globals[kJacquesStatus] == 0) && (_globals[kCurrentYear] == 1881)) {
 			if (_globals[kJacquesNameIsKnown] >= 1) {
-				_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(156, 116, 33, 31));
+				_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(156, 116, 33, 31));
 				_scene->_dynamicHotspots[_hotspotGentleman]._articleNumber = PREP_ON;
 				_scene->_dynamicHotspots.setPosition(_hotspotGentleman, Common::Point(206, 148), FACING_NORTHWEST);
 			} else {
@@ -989,11 +989,11 @@ void Scene103::enter() {
 				_scene->_dynamicHotspots[_hotspotGentleman]._articleNumber = PREP_ON;
 				_scene->_dynamicHotspots.setPosition(_hotspotGentleman, Common::Point(206, 148), FACING_NORTHWEST);
 			}
-			int tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(149, 140, 13, 7));
+			int tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(149, 140, 13, 7));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(155, 144), FACING_NONE);
 
-			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(187, 136, 8, 7));
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(187, 136, 8, 7));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(195, 139), FACING_NONE);
 		} else if ((_globals[kJacquesStatus] >= 1) && (_globals[kCurrentYear] == 1881)) {
@@ -1007,23 +1007,23 @@ void Scene103::enter() {
 			_scene->_hotspots.activate(NOUN_JACQUES, true);
 			_scene->_dynamicHotspots.remove(_hotspotRightFloor2);
 
-			int tmpIdx = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(114, 132, 30, 10));
+			int tmpIdx = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(114, 132, 30, 10));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(95, 144), FACING_NORTHEAST);
 
-			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(94, 129, 18, 4));
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(94, 129, 18, 4));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(95, 133), FACING_NONE);
 
-			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(94, 132, 3, 9));
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(94, 132, 3, 9));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(93, 135), FACING_NONE);
 
-			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(112, 150, 21, 3));
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(112, 150, 21, 3));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(118, 154), FACING_NONE);
 
-			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(98, 146, 21, 4));
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(98, 146, 21, 4));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(104, 148), FACING_NONE);
 		}
@@ -1032,27 +1032,27 @@ void Scene103::enter() {
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
 		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139));
 
-		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(2, 79, 40, 63));
+		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 79, 40, 63));
 		_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, Common::Point(59, 140), FACING_NORTHWEST);
 
-		_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(42, 67, 16, 75));
+		_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(42, 67, 16, 75));
 		_scene->_dynamicHotspots[_hotspotPrompt2]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt2, Common::Point(59, 140), FACING_NORTHWEST);
 
-		_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(58, 90, 18, 52));
+		_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(58, 90, 18, 52));
 		_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, Common::Point(59, 140), FACING_NORTHWEST);
 
-		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, -1, Common::Rect(2, 49, 40, 30));
+		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 49, 40, 30));
 		_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(79, 132), FACING_SOUTHWEST);
 		_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
 
-		_hotspotLeftFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(35, 137, 40, 5));
+		_hotspotLeftFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(35, 137, 40, 5));
 		_scene->_dynamicHotspots[_hotspotLeftFloor1]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor1, Common::Point(59, 140), FACING_NONE);
-		_hotspotLeftFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(76, 129, 6, 6));
+		_hotspotLeftFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(76, 129, 6, 6));
 		_scene->_dynamicHotspots[_hotspotLeftFloor2]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor2, Common::Point(80, 135), FACING_NONE);
 	}
@@ -1483,32 +1483,32 @@ void Scene103::actions() {
 						_scene->_dynamicHotspots.remove(_hotspotLeftFloor1);
 						_scene->_dynamicHotspots.remove(_hotspotLeftFloor2);
 
-						_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(121, 79, 40, 63));
+						_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 79, 40, 63));
 						_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, Common::Point(171, 142), FACING_NORTHWEST);
 
-						_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(161, 67, 16, 75));
+						_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(161, 67, 16, 75));
 						_scene->_dynamicHotspots[_hotspotPrompt2]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt2, Common::Point(171, 142), FACING_NORTHWEST);
 
-						_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(177, 90, 18, 52));
+						_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(177, 90, 18, 52));
 						_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, Common::Point(171, 142), FACING_NORTHWEST);
 
-						_hotspotPrompt4 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(114, 100, 7, 38));
+						_hotspotPrompt4 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(114, 100, 7, 38));
 						_scene->_dynamicHotspots[_hotspotPrompt4]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt4, Common::Point(171, 142), FACING_NORTHWEST);
 
-						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, -1, Common::Rect(121, 49, 40, 30));
+						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 49, 40, 30));
 						_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(196, 134), FACING_SOUTHWEST);
 						_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
 
-						_hotspotRightFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(154, 6, 41, 6));
+						_hotspotRightFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(154, 6, 41, 6));
 						_scene->_dynamicHotspots[_hotspotRightFloor1]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotRightFloor1, Common::Point(171, 142), FACING_NONE);
 
-						_hotspotRightFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(114, 136, 32, 6));
+						_hotspotRightFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(114, 136, 32, 6));
 						_scene->_dynamicHotspots[_hotspotRightFloor2]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotRightFloor2, Common::Point(127, 140), FACING_NONE);
 
@@ -1554,27 +1554,27 @@ void Scene103::actions() {
 						_scene->_dynamicHotspots.remove(_hotspotRightFloor1);
 						_scene->_dynamicHotspots.remove(_hotspotRightFloor2);
 
-						_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(2, 79, 40, 63));
+						_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 79, 40, 63));
 						_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, Common::Point(59, 140), FACING_NORTHWEST);
 
-						_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(42, 67, 16, 75));
+						_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(42, 67, 16, 75));
 						_scene->_dynamicHotspots[_hotspotPrompt2]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt2, Common::Point(59, 140), FACING_NORTHWEST);
 
-						_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, -1, Common::Rect(58, 90, 18, 52));
+						_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(58, 90, 18, 52));
 						_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, Common::Point(59, 140), FACING_NORTHWEST);
 
-						_hotspotLeftFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(35, 137, 40, 5));
+						_hotspotLeftFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(35, 137, 40, 5));
 						_scene->_dynamicHotspots[_hotspotLeftFloor1]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor1, Common::Point(59, 140), FACING_NONE);
 
-						_hotspotLeftFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, -1, Common::Rect(76, 129, 6, 6));
+						_hotspotLeftFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(76, 129, 6, 6));
 						_scene->_dynamicHotspots[_hotspotLeftFloor2]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor2, Common::Point(80, 135), FACING_NONE);
 
-						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, -1, Common::Rect(2, 49, 40, 30));
+						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 49, 40, 30));
 						_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(79, 132), FACING_SOUTHWEST);
 						_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
@@ -2360,7 +2360,7 @@ void Scene103::process_conv_jacques() {
 		if (_globals[kJacquesNameIsKnown] == 0) {
 			_globals[kJacquesNameIsKnown] = 1;
 			_scene->_dynamicHotspots.remove(_hotspotGentleman);
-			_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, -1, Common::Rect(156, 116, 33, 31));
+			_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(156, 116, 33, 31));
 			_scene->_dynamicHotspots[_hotspotGentleman]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(_hotspotGentleman, Common::Point(206, 148), FACING_NORTHWEST);
 		}
@@ -3626,5 +3626,572 @@ void Scene104::handlePlayerWalk() {
 
 /*------------------------------------------------------------------------*/
 
+Scene105::Scene105(MADSEngine *vm) : Scene1xx(vm) {
+}
+
+void Scene105::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+}
+
+void Scene105::setup() {
+	if (_globals[kCurrentYear] == 1993)
+		_scene->_initialVariant = 1;
+
+	setPlayerSpritesPrefix();
+	setAAName();
+
+	_scene->addActiveVocab(NOUN_LIGHT_FIXTURE);
+}
+
+void Scene105::enter() {
+	_scene->loadSpeech(8);
+
+	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('x', 2), false);
+	_globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('x', 3), false);
+	_globals._spriteIndexes[5] = _scene->_sprites.addSprites("*RRD_9", false);
+	_globals._spriteIndexes[6] = _scene->_sprites.addSprites("*RDR_9", false);
+	_globals._spriteIndexes[7] = _scene->_sprites.addSprites(formAnimName('a', 0), false);
+	_globals._spriteIndexes[8] = _scene->_sprites.addSprites(formAnimName('a', 1), false);
+	if (_globals[kCurrentYear] == 1993)
+		_globals._spriteIndexes[3]       = _scene->_sprites.addSprites(formAnimName('z', -1), false);
+
+	if ((_globals[kCurrentYear] == 1881) && (!_globals[kHintThatDaaeIsHome2])) {
+		if ((_globals[kJacquesNameIsKnown] == 2) && (_globals[kMadameNameIsKnown] == 2) &&
+			_globals[kPanelIn206] && _globals[kDoneRichConv203] && _game._objects.isInInventory(OBJ_LANTERN) &&
+			((_game._objects.isInInventory(OBJ_CABLE_HOOK) && _game._objects.isInInventory(OBJ_ROPE)) || _game._objects.isInInventory(OBJ_ROPE_WITH_HOOK))) {
+			_globals[kHintThatDaaeIsHome2] = true;
+			_scene->_sequences.setTimingTrigger(300, 75);
+		}
+	}
+
+	if ((_game._objects.isInRoom(OBJ_LANTERN)) && (_globals[kCurrentYear] == 1881)) {
+		_globals._spriteIndexes[0]  = _scene->_sprites.addSprites(formAnimName('x', 0), false);
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+	} else {
+		_scene->_hotspots.activate(NOUN_LANTERN, false);
+	}
+
+	if (_game._objects.isInRoom(OBJ_RED_FRAME)) {
+		_globals._spriteIndexes[1]  = _scene->_sprites.addSprites(formAnimName('x', 1), false);
+		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
+	} else {
+		_scene->_hotspots.activate(NOUN_RED_FRAME, false);
+	}
+
+	if (_globals[kCurrentYear] == 1993) {
+		_scene->drawToBackground(_globals._spriteIndexes[3], 1, Common::Point(-32000, -32000), 0, 100);
+		_scene->_hotspots.activate(NOUN_PROPS, false);
+		_scene->_hotspots.activate(NOUN_BEAR_PROP, false);
+		_scene->_hotspots.activate(NOUN_STAIR_UNIT, false);
+		_scene->_hotspots.activate(NOUN_PROP, false);
+		_scene->_hotspots.activate(NOUN_ELEPHANT_PROP, false);
+		_scene->_hotspots.activate(NOUN_COLUMN_PROP, false);
+
+		int tmpIdx = _scene->_dynamicHotspots.add(NOUN_COLUMN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(132, 24, 21, 105));
+		_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(159, 133), FACING_NORTHWEST);
+
+		tmpIdx = _scene->_dynamicHotspots.add(NOUN_COLUMN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(56, 45, 11, 77));
+		_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(72, 126), FACING_NORTHWEST);
+
+		_scene->_dynamicHotspots.add(NOUN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(0, 125, 29, 31));
+		_scene->_dynamicHotspots.add(NOUN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(29, 136, 50, 20));
+		_scene->_dynamicHotspots.add(NOUN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(79, 141, 53, 15));
+
+		_scene->_dynamicHotspots.add(NOUN_BEAR_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(278, 132, 21, 24));
+		_scene->_dynamicHotspots.add(NOUN_BEAR_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(299, 146, 8, 10));
+		_scene->_dynamicHotspots.add(NOUN_BEAR_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(269, 142, 8, 8));
+
+		_scene->_dynamicHotspots.add(NOUN_LIGHT_FIXTURE, VERB_LOOK_AT, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(102, 14, 24, 10));
+	}
+
+	_globals._sequenceIndexes[4] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[4], false, 2);
+	_scene->_sequences.setDepth(_globals._sequenceIndexes[4], 14);
+
+	if ((_scene->_priorSceneId == 106) || (_scene->_priorSceneId == 114)) {
+		_game._player._playerPos = Common::Point(198, 132);
+		_game._player._facing = FACING_WEST;
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
+	} else if ((_scene->_priorSceneId == 103) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+		_game._player._playerPos = Common::Point(3, 112);
+		_game._player._facing = FACING_SOUTHEAST;
+		_game._player.walk(Common::Point(45, 131), FACING_SOUTHEAST);
+		_game._player.setWalkTrigger(60);
+		_game._player._stepEnabled = false;
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 8);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
+	} else if (_scene->_priorSceneId == RETURNING_FROM_LOADING) {
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
+	}
+
+	sceneEntrySound();
+}
+
+void Scene105::step() {
+	switch (_game._trigger) {
+	case 60:
+		_scene->deleteSequence(_globals._sequenceIndexes[2]);
+		_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 0, 0, 1);   
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
+		_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 8);
+		_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 61);
+		_vm->_sound->command(66);
+		break; 
+
+	case 61:
+		_vm->_sound->command(25);
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
+		_game._player._stepEnabled = true;
+		break;
+
+	case 75:
+		_scene->playSpeech(8);
+		_scene->_sequences.setTimingTrigger(120, 76);
+		break;
+
+	case 76:
+		_vm->_dialogs->show(10537);
+		break;
+
+	default:
+		break;
+	}
+}
+
+void Scene105::actions() {
+	if ((_action.isAction(VERB_PUSH, NOUN_THUNDER_MACHINE)) || (_action.isAction(VERB_PULL, NOUN_THUNDER_MACHINE))) {
+		switch (_game._trigger) {
+		case 0:
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;
+			_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('t', 1), 70);
+			_scene->deleteSequence(_globals._sequenceIndexes[4]);
+			_game.syncTimers(1, _globals._sequenceIndexes[4], 3, _globals._animationIndexes[0]);
+			_scene->_sequences.setSeqPlayer(_globals._animationIndexes[0], false);
+			break;
+
+		case 70:
+			_globals._sequenceIndexes[4] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[4], false, 2);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[4], 14);
+			_game.syncTimers(1, _globals._sequenceIndexes[4], 3, _globals._animationIndexes[0]);
+			_game._player._stepEnabled = true;
+			_game._player._visible = true;
+			_game.syncTimers(2, 0, 3, _globals._animationIndexes[0]);
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLIMB_UP, NOUN_CIRCULAR_STAIRCASE)) {
+		switch (_game._trigger) {
+		case 0:
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;
+			_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('u', 1), 1);
+			_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
+			break;
+
+		case 1:
+			_scene->_nextSceneId = 106;
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLIMB_DOWN, NOUN_CIRCULAR_STAIRCASE)) {
+		switch (_game._trigger) {
+		case 0:
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;
+			_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 1), 1);
+			_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
+			break;
+
+		case 1:
+			_scene->_nextSceneId = 114;
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_RED_FRAME) && (_game._objects.isInRoom(OBJ_RED_FRAME) || _game._trigger)) {
+		switch (_game._trigger) {
+		case (0):
+			if (_globals[kCurrentYear] == 1881) {
+				int count = 0;
+
+				if (_game._objects.isInInventory(NOUN_YELLOW_FRAME))
+					++count;
+
+				if (_game._objects.isInInventory(NOUN_GREEN_FRAME))
+					++count;
+
+				if (_game._objects.isInInventory(NOUN_BLUE_FRAME))
+					++count;
+
+				if (count < 3)
+					_globals[kPlayerScore] += 5;
+			}
+
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;  
+			_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 5, 0, 0, 2);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[5], 1, 5);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 2, 5, 1);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 2);
+			break;
+
+		case 1:
+			_scene->deleteSequence(_globals._sequenceIndexes[1]);
+			_scene->_hotspots.activate(NOUN_RED_FRAME, false);
+			_game._objects.addToInventory(OBJ_RED_FRAME);
+			_vm->_sound->command(26);
+			break;
+
+		case 2:
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[5]); 
+			_game._player._visible = true;
+			_scene->_sequences.setTimingTrigger(20, 3);
+			break;
+
+		case 3:
+			if (_globals[kCurrentYear] == 1881)
+				_vm->_dialogs->showItem(OBJ_RED_FRAME, 842, 0);
+			else
+				_vm->_dialogs->showItem(OBJ_RED_FRAME, 802, 0);
+
+			_game._player._stepEnabled = true;
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_LANTERN) && (_game._objects.isInRoom(OBJ_LANTERN) || _game._trigger)) {
+		switch (_game._trigger) {
+		case (0):
+			_globals[kPlayerScore] += 5;
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;  
+			_globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 5, 0, 0, 2);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 2, 4, 1);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 2);
+			break;
+
+		case 1:
+			_scene->deleteSequence(_globals._sequenceIndexes[0]);
+			_scene->_hotspots.activate(NOUN_LANTERN, false);
+			_game._objects.addToInventory(OBJ_LANTERN);
+			_vm->_sound->command(26);
+			break;
+
+		case 2:
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[6]); 
+			_game._player._visible = true;
+			_scene->_sequences.setTimingTrigger(20, 3);
+			break;
+
+		case 3:
+			_vm->_dialogs->showItem(OBJ_LANTERN, 801, 0);
+			_game._player._stepEnabled = true;
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR) || _action.isAction(VERB_OPEN, NOUN_DOOR) || (_game._trigger) ||
+		_action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(NOUN_LOCK, NOUN_DOOR)) {
+		if ((_globals[kCurrentYear] == 1881) && !_action.isAction(VERB_UNLOCK) && !_action.isAction(NOUN_LOCK)){
+			switch (_game._trigger) {
+			case (0):
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;  
+				_globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 5, 0, 0, 2);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 2, 4, 65);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 2);
+				break;
+
+			case 2:
+				_game._player._visible = true;
+				_scene->_sequences.setTimingTrigger(180, 3);
+				break;
+
+			case 3:
+				_scene->_nextSceneId = 103;
+				break;
+
+			case 65:
+				_vm->_sound->command(24);
+				_scene->deleteSequence(_globals._sequenceIndexes[2]);
+				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 0, 0, 1);   
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 8);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 66);
+				_vm->_sound->command(66);
+				break; 
+
+			case 66: {
+				int tmpIdx = _globals._sequenceIndexes[2];
+				_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 8);
+				_game.syncTimers(1, _globals._sequenceIndexes[2], 1, tmpIdx); 
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+				_game._player.walk(Common::Point(0, 111), FACING_NORTHWEST);
+				}
+				break;
+
+			default:
+				break;
+			}
+		} else {
+			switch (_game._trigger) {
+			case (0):
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;  
+				_globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], true, 5, 0, 0, 1);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 1);
+				break;
+
+			case 1: {
+				int tmpIdx = _globals._sequenceIndexes[6];
+				_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], true, 4);
+				_game.syncTimers(1, _globals._sequenceIndexes[6], 1, tmpIdx); 
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], false);
+				_vm->_sound->command(73);
+				_scene->_sequences.setTimingTrigger(15, 2);
+				}
+				break; 
+
+			case 2:
+				_scene->deleteSequence(_globals._sequenceIndexes[6]);
+				_globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], true, 5, 0, 0, 1);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], false);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 3);
+				break;
+
+			case 3:
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[6]); 
+				_game._player._visible = true;
+				if (_action.isAction(NOUN_LOCK) || _action.isAction(VERB_UNLOCK))
+					_vm->_dialogs->show(32);
+				else
+					_vm->_dialogs->show(10536);
+
+				_game._player._stepEnabled = true;
+				break;
+
+			default:
+				break;
+			}
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action._lookFlag) {
+		if (_globals[kCurrentYear] == 1993)
+			_vm->_dialogs->show(10510);
+		else
+			_vm->_dialogs->show(10511);
+
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isAction(NOUN_FLOOR)) {
+			_vm->_dialogs->show(10512);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CIRCULAR_STAIRCASE)) {
+			_vm->_dialogs->show(10513);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LANTERN) && _game._objects.isInRoom(OBJ_LANTERN))  {
+			_vm->_dialogs->show(10514);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_RED_FRAME) && _game._objects.isInRoom(OBJ_RED_FRAME)){
+			if (_globals[kCurrentYear] == 1881)
+				_vm->_dialogs->show(10530);
+			else
+				_vm->_dialogs->show(10515);
+
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_DOOR)) {
+			_vm->_dialogs->show(10516);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WALL)) {
+			_vm->_dialogs->show(10517);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PROP_TABLE)) {
+			_vm->_dialogs->show(10518);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_BEAR_PROP)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(10519);
+			else
+				_vm->_dialogs->show(10538);
+
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_ELEPHANT_PROP)) {
+			_vm->_dialogs->show(10520);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_COLUMN_PROP)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(10521);
+			else
+				_vm->_dialogs->show(10539);
+
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_THUNDER_MACHINE)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(10522);
+			else
+				_vm->_dialogs->show(10540);
+
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STAIR_UNIT)) {
+			_vm->_dialogs->show(10523);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PROP)) {
+			_vm->_dialogs->show(10524);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PROPS)) {
+			_vm->_dialogs->show(10525);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_EXIT_SIGN)) {
+			_vm->_dialogs->show(10526);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_FLATS)) {
+			_vm->_dialogs->show(10527);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_HEMP)) {
+			_vm->_dialogs->show(10528);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PIPE)) {
+			_vm->_dialogs->show(10529);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_GRAFFITI)) {
+			_vm->_dialogs->show(10531);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LIGHT_FIXTURE)) {
+			_vm->_dialogs->show(10535);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_TALK_TO, NOUN_BEAR_PROP)) {
+		_vm->_dialogs->show(10532);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_BEAR_PROP)) {
+		_vm->_dialogs->show(10533);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_DOOR)) {
+		_vm->_dialogs->show(10534);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene105::preActions() {
+  if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_PIT))
+    _game._player._walkOffScreenSceneId = 102;
+
+  if (_action.isAction(VERB_OPEN, NOUN_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(NOUN_LOCK, NOUN_DOOR))
+	  _game._player.walk(Common::Point(33, 128), FACING_NORTHWEST);
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index cd9f6ae..83b94ba 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -192,6 +192,20 @@ public:
 	virtual void actions();
 };
 
+class Scene105 : public Scene1xx {
+private:
+
+public:
+	Scene105(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
+
 } // End of namespace Phantom
 } // End of namespace MADS
 
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 57c93a9..5a8fbe6 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -782,4 +782,12 @@ void Scene::drawToBackground(int series_id, int sprite_id, Common::Point pos, in
 void Scene::deleteSequence(int idx) {
 	warning("TODO: Scene::deleteSequence");
 }
+
+void Scene::loadSpeech(int idx) {
+	warning("TODO: Scene::loadSpeech");
+}
+
+void Scene::playSpeech(int idx) {
+	warning("TODO: Scene::playSpeech");
+}
 } // End of namespace MADS
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index 57cc794..653bdd1 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -262,6 +262,8 @@ public:
 	void setCamera(Common::Point pos);
 	void drawToBackground(int series_id, int sprite_id, Common::Point pos, int depth, int scale);
 	void deleteSequence(int idx);
+	void loadSpeech(int idx);
+	void playSpeech(int idx);
 };
 
 } // End of namespace MADS


Commit: f6db784f5065d9888ef5f99b4495ef0cc8eaa4a4
    https://github.com/scummvm/scummvm/commit/f6db784f5065d9888ef5f99b4495ef0cc8eaa4a4
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-18T01:14:12+02:00

Commit Message:
MADS: Phantom: Fix several calls to startPingPongCycle, addSpriteCycle and addReverseSpriteCycle

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 78fe216..edf7d45 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -1604,7 +1604,7 @@ void Scene103::actions() {
 			case (0):
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;
-				_globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 5, 0, 0, 2);
+				_globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 5, 2);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[2], -1, -2);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 2);
@@ -1696,7 +1696,7 @@ void Scene103::actions() {
 		case (0):
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
-			_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 5, 0, 0, 2);
+			_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 5, 2);
 			_scene->_sequences.setRange(_globals._sequenceIndexes[8], 1, 5);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 5, 1);
@@ -2716,7 +2716,7 @@ void Scene104::actions() {
 			switch (_game._trigger) {
 			case 0:
 				_game._player._visible = false;
-				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 0, 0, 1);
+				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 13);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 16);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 60);
@@ -2758,7 +2758,7 @@ void Scene104::actions() {
 			_vm->_dialogs->show(10426);
 			_game._player._visible = false;
 			_game._player._stepEnabled = false;
-			_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 7, 0, 0, 1);
+			_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 7, 1);
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 15);
 			_scene->_sequences.setRange(_globals._sequenceIndexes[3], -1, 4);
 			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], _game._player._playerPos);
@@ -2767,7 +2767,7 @@ void Scene104::actions() {
 			break;
 
 		case 1:
-			_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 1, 0, 0, 10);
+			_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 1, 10);
 			_scene->_sequences.setTimingTrigger(60, 2);
 			_scene->_sequences.setRange(_globals._sequenceIndexes[3], 4, 4);
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 15);
@@ -3735,7 +3735,7 @@ void Scene105::step() {
 	switch (_game._trigger) {
 	case 60:
 		_scene->deleteSequence(_globals._sequenceIndexes[2]);
-		_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 0, 0, 1);   
+		_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);   
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
 		_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 8);
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 61);
@@ -3852,7 +3852,7 @@ void Scene105::actions() {
 
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;  
-			_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 5, 0, 0, 2);
+			_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 5, 2);
 			_scene->_sequences.setRange(_globals._sequenceIndexes[5], 1, 5);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 2, 5, 1);
@@ -3891,7 +3891,7 @@ void Scene105::actions() {
 			_globals[kPlayerScore] += 5;
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;  
-			_globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 5, 0, 0, 2);
+			_globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 5, 2);
 			_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 2, 4, 1);
@@ -3930,7 +3930,7 @@ void Scene105::actions() {
 			case (0):
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;  
-				_globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 5, 0, 0, 2);
+				_globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 5, 2);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 2, 4, 65);
@@ -3949,7 +3949,7 @@ void Scene105::actions() {
 			case 65:
 				_vm->_sound->command(24);
 				_scene->deleteSequence(_globals._sequenceIndexes[2]);
-				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 0, 0, 1);   
+				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);   
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 8);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 66);
@@ -3973,7 +3973,7 @@ void Scene105::actions() {
 			case (0):
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;  
-				_globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], true, 5, 0, 0, 1);
+				_globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], true, 5, 1);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 1);
@@ -3991,7 +3991,7 @@ void Scene105::actions() {
 
 			case 2:
 				_scene->deleteSequence(_globals._sequenceIndexes[6]);
-				_globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], true, 5, 0, 0, 1);
+				_globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], true, 5, 1);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], false);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 3);


Commit: 9519fb3a86d129c0761bb17f82994176f2c4382f
    https://github.com/scummvm/scummvm/commit/9519fb3a86d129c0761bb17f82994176f2c4382f
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-18T10:18:39+02:00

Commit Message:
MADS: Phantom: Fix hotspot rects, remove some dead code

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index edf7d45..523a33f 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -950,46 +950,46 @@ void Scene103::enter() {
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 1);
 		}
 
-		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 79, 40, 63));
+		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 79, 121 + 40, 79 + 63));
 		_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, promptPos, promptFacing);
 
-		_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(161, 67, 16, 75));
+		_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(161, 67, 161 + 16, 67 + 75));
 		_scene->_dynamicHotspots[_hotspotPrompt2]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt2, promptPos, promptFacing);
 
-		_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(177, 90, 18, 52));
+		_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(177, 90, 177 + 18, 90 + 52));
 		_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, promptPos, promptFacing);
 
-		_hotspotPrompt4 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(114, 100, 7, 38));
+		_hotspotPrompt4 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(114, 100, 114 + 7, 100 + 38));
 		_scene->_dynamicHotspots[_hotspotPrompt4]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt4, promptPos, promptFacing);
 
-		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 49, 40, 30));
+		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 49, 121 + 40, 49 + 30));
 		_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(196, 134), FACING_SOUTHWEST);
 		_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
 
-		_hotspotRightFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(154, 6, 41, 6));
+		_hotspotRightFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(154, 6, 154 + 41, 6 + 6));
 		_scene->_dynamicHotspots[_hotspotRightFloor1]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotRightFloor1, Common::Point(171, 142), FACING_NONE);
 
-		_hotspotRightFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(114, 136, 32, 6));
+		_hotspotRightFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(114, 136, 114 + 32, 136 + 6));
 		_scene->_dynamicHotspots[_hotspotRightFloor2]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotRightFloor2, Common::Point(127, 140), FACING_NONE);
 
 		if ((_globals[kJacquesStatus] == 0) && (_globals[kCurrentYear] == 1881)) {
 			if (_globals[kJacquesNameIsKnown] >= 1) {
-				_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(156, 116, 33, 31));
+				_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(156, 116, 156 + 33, 116 + 31));
 				_scene->_dynamicHotspots[_hotspotGentleman]._articleNumber = PREP_ON;
 				_scene->_dynamicHotspots.setPosition(_hotspotGentleman, Common::Point(206, 148), FACING_NORTHWEST);
 			} else {
-				_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_GENTLEMAN, VERB_WALKTO, SYNTAX_MASC_NOT_PROPER, -1, Common::Rect(156, 116, 33, 31));
+				_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_GENTLEMAN, VERB_WALKTO, SYNTAX_MASC_NOT_PROPER, -1, Common::Rect(156, 116, 156 + 33, 116 + 31));
 				_scene->_dynamicHotspots[_hotspotGentleman]._articleNumber = PREP_ON;
 				_scene->_dynamicHotspots.setPosition(_hotspotGentleman, Common::Point(206, 148), FACING_NORTHWEST);
 			}
-			int tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(149, 140, 13, 7));
+			int tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(149, 140, 149 + 13, 140 + 7));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(155, 144), FACING_NONE);
 
@@ -1007,23 +1007,23 @@ void Scene103::enter() {
 			_scene->_hotspots.activate(NOUN_JACQUES, true);
 			_scene->_dynamicHotspots.remove(_hotspotRightFloor2);
 
-			int tmpIdx = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(114, 132, 30, 10));
+			int tmpIdx = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(114, 132, 114 + 30, 132 + 10));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(95, 144), FACING_NORTHEAST);
 
-			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(94, 129, 18, 4));
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(94, 129, 94 + 18, 129 + 4));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(95, 133), FACING_NONE);
 
-			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(94, 132, 3, 9));
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(94, 132, 94 + 3, 132 + 9));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(93, 135), FACING_NONE);
 
-			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(112, 150, 21, 3));
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(112, 150, 112 + 21, 150 + 3));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(118, 154), FACING_NONE);
 
-			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(98, 146, 21, 4));
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(98, 146, 98 + 21, 146 + 4));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(104, 148), FACING_NONE);
 		}
@@ -1032,27 +1032,27 @@ void Scene103::enter() {
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
 		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139));
 
-		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 79, 40, 63));
+		_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 79, 2 + 40, 79 + 63));
 		_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, Common::Point(59, 140), FACING_NORTHWEST);
 
-		_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(42, 67, 16, 75));
+		_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(42, 67, 42 + 16, 67 + 75));
 		_scene->_dynamicHotspots[_hotspotPrompt2]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt2, Common::Point(59, 140), FACING_NORTHWEST);
 
-		_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(58, 90, 18, 52));
+		_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(58, 90, 58 + 18, 90 + 52));
 		_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, Common::Point(59, 140), FACING_NORTHWEST);
 
-		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 49, 40, 30));
+		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 49, 2 + 40, 49 + 30));
 		_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(79, 132), FACING_SOUTHWEST);
 		_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
 
-		_hotspotLeftFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(35, 137, 40, 5));
+		_hotspotLeftFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(35, 137, 35 + 40, 137 + 5));
 		_scene->_dynamicHotspots[_hotspotLeftFloor1]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor1, Common::Point(59, 140), FACING_NONE);
-		_hotspotLeftFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(76, 129, 6, 6));
+		_hotspotLeftFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(76, 129, 76 + 6, 129 + 6));
 		_scene->_dynamicHotspots[_hotspotLeftFloor2]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor2, Common::Point(80, 135), FACING_NONE);
 	}
@@ -1089,12 +1089,10 @@ void Scene103::enter() {
 
 		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, -1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
-
 	} else if (_scene->_priorSceneId == 102) {
 		_game._player.firstWalk(Common::Point(-20, 140), FACING_EAST, Common::Point(15, 147), FACING_EAST, true);
 		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
-
 	} else if ((_scene->_priorSceneId == 105) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
 		_game._player._playerPos = Common::Point(287, 135);
 		_game._player._facing = FACING_WEST;
@@ -1103,16 +1101,13 @@ void Scene103::enter() {
 		_game._player.setWalkTrigger(65);
 		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 6);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
-
 	} else if (_scene->_priorSceneId == -1) {
 		if (_standPosition == 1) {
 			_game._player._visible = false;
 			_globals._animationIndexes[5] = _scene->loadAnimation(formAnimName('w', 3), 0);
 			_anim5ActvFl = true;
 			_scene->setAnimFrame(_globals._animationIndexes[5], 33);
-
 		} else if (_standPosition == 2) {
-
 			_scene->deleteSequence(_globals._sequenceIndexes[3]);
 			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 13);
@@ -1122,7 +1117,6 @@ void Scene103::enter() {
 			_anim3ActvFl = true;
 			_game._player._stepEnabled = true;
 			_scene->setAnimFrame(_globals._animationIndexes[3], 36);
-
 		} else if (_vm->_gameConv->_restoreRunning == 12) {
 			_vm->_gameConv->run(12);
 			_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
@@ -1439,11 +1433,9 @@ void Scene103::actions() {
 		}
 	}
 
-	if (_action.isAction(NOUN_CLIMB, NOUN_PROMPTERS_STAND)) {
-		if (_standPosition != 0) {
-			_action._inProgress = false;
-			return;
-		}
+	if (_action.isAction(NOUN_CLIMB, NOUN_PROMPTERS_STAND) && (_standPosition != 0)) {
+		_action._inProgress = false;
+		return;
 	}
 
 	if ((_action.isAction(VERB_PUSH, NOUN_PROMPTERS_STAND)) || (_action.isAction(VERB_PULL, NOUN_PROMPTERS_STAND))) {
@@ -1483,32 +1475,32 @@ void Scene103::actions() {
 						_scene->_dynamicHotspots.remove(_hotspotLeftFloor1);
 						_scene->_dynamicHotspots.remove(_hotspotLeftFloor2);
 
-						_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 79, 40, 63));
+						_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 79, 121 + 40, 79 + 63));
 						_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, Common::Point(171, 142), FACING_NORTHWEST);
 
-						_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(161, 67, 16, 75));
+						_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(161, 67, 161 + 16, 67 + 75));
 						_scene->_dynamicHotspots[_hotspotPrompt2]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt2, Common::Point(171, 142), FACING_NORTHWEST);
 
-						_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(177, 90, 18, 52));
+						_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(177, 90, 177 + 18, 90 + 52));
 						_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, Common::Point(171, 142), FACING_NORTHWEST);
 
-						_hotspotPrompt4 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(114, 100, 7, 38));
+						_hotspotPrompt4 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(114, 100, 114 + 7, 100 + 38));
 						_scene->_dynamicHotspots[_hotspotPrompt4]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt4, Common::Point(171, 142), FACING_NORTHWEST);
 
-						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 49, 40, 30));
+						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 49, 121 + 40, 49 + 30));
 						_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(196, 134), FACING_SOUTHWEST);
 						_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
 
-						_hotspotRightFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(154, 6, 41, 6));
+						_hotspotRightFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(154, 6, 154 + 41, 6 + 6));
 						_scene->_dynamicHotspots[_hotspotRightFloor1]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotRightFloor1, Common::Point(171, 142), FACING_NONE);
 
-						_hotspotRightFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(114, 136, 32, 6));
+						_hotspotRightFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(114, 136, 114 + 32, 132 + 6));
 						_scene->_dynamicHotspots[_hotspotRightFloor2]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotRightFloor2, Common::Point(127, 140), FACING_NONE);
 
@@ -1554,7 +1546,7 @@ void Scene103::actions() {
 						_scene->_dynamicHotspots.remove(_hotspotRightFloor1);
 						_scene->_dynamicHotspots.remove(_hotspotRightFloor2);
 
-						_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 79, 40, 63));
+						_hotspotPrompt1 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 79, 2 + 40, 79 + 63));
 						_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, Common::Point(59, 140), FACING_NORTHWEST);
 
@@ -1588,12 +1580,11 @@ void Scene103::actions() {
 					break;
 				}
 			}
-		} else {
-			if (_globals[kJacquesNameIsKnown])
-				_vm->_dialogs->show(10340);
-			else
-				_vm->_dialogs->show(10350);
-		}
+		} else if (_globals[kJacquesNameIsKnown])
+			_vm->_dialogs->show(10340);
+		else
+			_vm->_dialogs->show(10350);
+
 		_action._inProgress = false;
 		return;
 	}
@@ -1963,12 +1954,10 @@ void Scene103::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_KEY)) {
-			if (_game._objects.isInRoom(OBJ_KEY)) {
-				_vm->_dialogs->show(10326);
-				_action._inProgress = false;
-				return;
-			}
+		if (_action.isAction(NOUN_KEY) && _game._objects.isInRoom(OBJ_KEY)) {
+			_vm->_dialogs->show(10326);
+			_action._inProgress = false;
+			return;
 		}
 
 		if (_action.isAction(NOUN_STAIR_UNIT)) {
@@ -2217,9 +2206,9 @@ void Scene103::handleJacquesAnim() {
 
 	case 44:
 		random = _vm->getRandomNumber(1, 50);
-		while (_lastRandom == random) {
+		while (_lastRandom == random)
 			random = _vm->getRandomNumber(1, 50);
-		}
+
 		_lastRandom = random;
 
 		switch (_jacquesAction) {
@@ -2312,8 +2301,6 @@ void Scene103::descendRightStairs() {
 	if (_scene->getAnimFrame(_globals._animationIndexes[4]) == _lastStairFrame)
 		return;
 
-	// CHECKME: use of this local variable
-	int stairs_reset_frame = -1;
 	_lastStairFrame = _scene->getAnimFrame(_globals._animationIndexes[4]);
 
 	if (_lastStairFrame == 2) {
@@ -2322,19 +2309,12 @@ void Scene103::descendRightStairs() {
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
 		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139));
 	}
-
-	if (stairs_reset_frame >= 0) {
-		_scene->setAnimFrame(_globals._animationIndexes[4], stairs_reset_frame);
-		_lastStairFrame = stairs_reset_frame;
-	}
 }
 
 void Scene103::descendLeftStairs() {
 	if (_scene->getAnimFrame(_globals._animationIndexes[6]) == _lastStairFrame)
 		return;
 
-	// CHECKME: use of this local variable
-	int stairs_reset_frame = -1;
 	_lastStairFrame = _scene->getAnimFrame(_globals._animationIndexes[6]);
 
 	if (_lastStairFrame == 2) {
@@ -2343,11 +2323,6 @@ void Scene103::descendLeftStairs() {
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 4);
 		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139));
 	}
-
-	if (stairs_reset_frame >= 0) {
-		_scene->setAnimFrame(_globals._animationIndexes[6], stairs_reset_frame);
-		_lastStairFrame = stairs_reset_frame;
-	}
 }
 
 void Scene103::process_conv_jacques() {
@@ -2396,7 +2371,8 @@ void Scene103::process_conv_jacques() {
 		break;
 	}
 
-	if ((_action._activeAction._verbId != 1) && (_action._activeAction._verbId != 8) && (_action._activeAction._verbId != 12) && (_action._activeAction._verbId != 29))
+	if ((_action._activeAction._verbId != 1) && (_action._activeAction._verbId != 8)
+	 && (_action._activeAction._verbId != 12) && (_action._activeAction._verbId != 29))
 		_vm->_gameConv->setInterlocutorTrigger(90);
 
 	_vm->_gameConv->setHeroTrigger(92);
@@ -3690,21 +3666,21 @@ void Scene105::enter() {
 		_scene->_hotspots.activate(NOUN_ELEPHANT_PROP, false);
 		_scene->_hotspots.activate(NOUN_COLUMN_PROP, false);
 
-		int tmpIdx = _scene->_dynamicHotspots.add(NOUN_COLUMN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(132, 24, 21, 105));
+		int tmpIdx = _scene->_dynamicHotspots.add(NOUN_COLUMN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(132, 24, 132 + 21, 24 + 105));
 		_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(159, 133), FACING_NORTHWEST);
 
-		tmpIdx = _scene->_dynamicHotspots.add(NOUN_COLUMN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(56, 45, 11, 77));
+		tmpIdx = _scene->_dynamicHotspots.add(NOUN_COLUMN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(56, 45, 56 + 11, 45 + 77));
 		_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(72, 126), FACING_NORTHWEST);
 
-		_scene->_dynamicHotspots.add(NOUN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(0, 125, 29, 31));
-		_scene->_dynamicHotspots.add(NOUN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(29, 136, 50, 20));
-		_scene->_dynamicHotspots.add(NOUN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(79, 141, 53, 15));
+		_scene->_dynamicHotspots.add(NOUN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(0, 125, 29, 125 + 31));
+		_scene->_dynamicHotspots.add(NOUN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(29, 136, 29 + 50, 136 + 20));
+		_scene->_dynamicHotspots.add(NOUN_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(79, 141, 79 + 53, 141 + 15));
 
-		_scene->_dynamicHotspots.add(NOUN_BEAR_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(278, 132, 21, 24));
-		_scene->_dynamicHotspots.add(NOUN_BEAR_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(299, 146, 8, 10));
-		_scene->_dynamicHotspots.add(NOUN_BEAR_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(269, 142, 8, 8));
+		_scene->_dynamicHotspots.add(NOUN_BEAR_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(278, 132, 278 + 21, 132 + 24));
+		_scene->_dynamicHotspots.add(NOUN_BEAR_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(299, 146, 299 + 8, 146 + 10));
+		_scene->_dynamicHotspots.add(NOUN_BEAR_PROP, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(269, 142, 269 + 8, 142 + 8));
 
-		_scene->_dynamicHotspots.add(NOUN_LIGHT_FIXTURE, VERB_LOOK_AT, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(102, 14, 24, 10));
+		_scene->_dynamicHotspots.add(NOUN_LIGHT_FIXTURE, VERB_LOOK_AT, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(102, 14, 102 + 24, 102 + 10));
 	}
 
 	_globals._sequenceIndexes[4] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[4], false, 2);


Commit: 08cbf3d8436f83cc35a582b1bff56c158930f95e
    https://github.com/scummvm/scummvm/commit/08cbf3d8436f83cc35a582b1bff56c158930f95e
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-18T10:24:41+02:00

Commit Message:
MADS: Phantom: Fix code formatting

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 523a33f..b7199bd 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -188,8 +188,8 @@ void Scene101::enter() {
 		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('b', 9), 1);
 		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('b', 8), 1);
 
-		_anim0Running  = true;
-		_anim1Running  = true;
+		_anim0Running = true;
+		_anim1Running = true;
 
 		_brieAnimId = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(0, 0, 0, 0));
 		_scene->_dynamicHotspots[_brieAnimId]._articleNumber = PREP_ON;
@@ -470,7 +470,7 @@ void Scene101::handleAnimation0() {
 			break;
 
 		case 53:
-			_anim0Running    = false;
+			_anim0Running = false;
 			_scene->freeAnimation(0);
 			break;
 
@@ -903,7 +903,7 @@ void Scene103::enter() {
 	adjustRails(_scene->_initialVariant);
 
 	_scene->_hotspots.activate(NOUN_JACQUES, false);
-	_scene->_hotspots.activate(NOUN_KEY,  false);
+	_scene->_hotspots.activate(NOUN_KEY, false);
 
 	_vm->_gameConv->get(12);
 
@@ -1739,7 +1739,7 @@ void Scene103::actions() {
 	}
 
 	if (_action.isAction(VERB_CLIMB_THROUGH, NOUN_TRAP_DOOR) || _climbThroughTrapFl) {
-		if ((_standPosition == 2) && (_globals[kTrapDoorStatus] == 0))  {
+		if ((_standPosition == 2) && (_globals[kTrapDoorStatus] == 0)) {
 			switch (_game._trigger) {
 			case 0:
 			case 120:
@@ -1806,14 +1806,14 @@ void Scene103::actions() {
 			switch (_game._trigger) {
 			case 0:
 				_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('l', 1), 1);
-				_anim1ActvFl   = true;
+				_anim1ActvFl = true;
 				_game._player._visible = false;
 				_game._player._stepEnabled = false;
 				_game.syncTimers(3, _globals._animationIndexes[1], 2, 0);
 				break;
 
 			case 1:
-				_anim1ActvFl    = false;
+				_anim1ActvFl = false;
 				_game._player._visible = true;
 				_globals[kTrapDoorStatus] = 0;
 				_game._player._stepEnabled = true;
@@ -2276,7 +2276,7 @@ void Scene103::climbLeftStairs() {
 		return;
 
 	_lastStairFrame = _scene->getAnimFrame(_globals._animationIndexes[5]);
-	int stairs_reset_frame  = -1;
+	int stairs_reset_frame = -1;
 
 	if (_lastStairFrame == 34) {
 		stairs_reset_frame = 33;
@@ -2980,7 +2980,7 @@ void Scene104::processConversations() {
 		_vm->_gameConv->setInterlocutorTrigger(75);
 		_vm->_gameConv->setHeroTrigger(79);
 		interlocutorTriggerFl = true;
-		heroTriggerFl  = true;
+		heroTriggerFl = true;
 		break;
 
 	case 23:
@@ -3273,10 +3273,10 @@ void Scene104::handleCoupleAnimations() {
 			if (_womanTalkCount > 15) {
 				if (_needToGetUp) {
 					_coupleStatus = 6;
-					resetFrame   = 1;
+					resetFrame = 1;
 				} else {
 					_coupleStatus = 11;
-					resetFrame   = 0;
+					resetFrame = 0;
 				}
 			}
 		}
@@ -3312,6 +3312,9 @@ void Scene104::handleCoupleAnimations() {
 			else
 				_coupleStatus = 1;
 			break;
+
+		default:
+			break;
 		}
 
 		random = -1;
@@ -3630,7 +3633,7 @@ void Scene105::enter() {
 	_globals._spriteIndexes[7] = _scene->_sprites.addSprites(formAnimName('a', 0), false);
 	_globals._spriteIndexes[8] = _scene->_sprites.addSprites(formAnimName('a', 1), false);
 	if (_globals[kCurrentYear] == 1993)
-		_globals._spriteIndexes[3]       = _scene->_sprites.addSprites(formAnimName('z', -1), false);
+		_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('z', -1), false);
 
 	if ((_globals[kCurrentYear] == 1881) && (!_globals[kHintThatDaaeIsHome2])) {
 		if ((_globals[kJacquesNameIsKnown] == 2) && (_globals[kMadameNameIsKnown] == 2) &&
@@ -3642,7 +3645,7 @@ void Scene105::enter() {
 	}
 
 	if ((_game._objects.isInRoom(OBJ_LANTERN)) && (_globals[kCurrentYear] == 1881)) {
-		_globals._spriteIndexes[0]  = _scene->_sprites.addSprites(formAnimName('x', 0), false);
+		_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('x', 0), false);
 		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
 	} else {
@@ -3650,7 +3653,7 @@ void Scene105::enter() {
 	}
 
 	if (_game._objects.isInRoom(OBJ_RED_FRAME)) {
-		_globals._spriteIndexes[1]  = _scene->_sprites.addSprites(formAnimName('x', 1), false);
+		_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('x', 1), false);
 		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
 	} else {
@@ -3711,12 +3714,12 @@ void Scene105::step() {
 	switch (_game._trigger) {
 	case 60:
 		_scene->deleteSequence(_globals._sequenceIndexes[2]);
-		_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);   
+		_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
 		_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 8);
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 61);
 		_vm->_sound->command(66);
-		break; 
+		break;
 
 	case 61:
 		_vm->_sound->command(25);
@@ -3827,7 +3830,7 @@ void Scene105::actions() {
 			}
 
 			_game._player._stepEnabled = false;
-			_game._player._visible = false;  
+			_game._player._visible = false;
 			_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 5, 2);
 			_scene->_sequences.setRange(_globals._sequenceIndexes[5], 1, 5);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
@@ -3843,7 +3846,7 @@ void Scene105::actions() {
 			break;
 
 		case 2:
-			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[5]); 
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[5]);
 			_game._player._visible = true;
 			_scene->_sequences.setTimingTrigger(20, 3);
 			break;
@@ -3866,7 +3869,7 @@ void Scene105::actions() {
 		case (0):
 			_globals[kPlayerScore] += 5;
 			_game._player._stepEnabled = false;
-			_game._player._visible = false;  
+			_game._player._visible = false;
 			_globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 5, 2);
 			_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
@@ -3882,7 +3885,7 @@ void Scene105::actions() {
 			break;
 
 		case 2:
-			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[6]); 
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[6]);
 			_game._player._visible = true;
 			_scene->_sequences.setTimingTrigger(20, 3);
 			break;
@@ -3905,7 +3908,7 @@ void Scene105::actions() {
 			switch (_game._trigger) {
 			case (0):
 				_game._player._stepEnabled = false;
-				_game._player._visible = false;  
+				_game._player._visible = false;
 				_globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 5, 2);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
@@ -3925,17 +3928,17 @@ void Scene105::actions() {
 			case 65:
 				_vm->_sound->command(24);
 				_scene->deleteSequence(_globals._sequenceIndexes[2]);
-				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);   
+				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 8);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 66);
 				_vm->_sound->command(66);
-				break; 
+				break;
 
 			case 66: {
 				int tmpIdx = _globals._sequenceIndexes[2];
 				_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 8);
-				_game.syncTimers(1, _globals._sequenceIndexes[2], 1, tmpIdx); 
+				_game.syncTimers(1, _globals._sequenceIndexes[2], 1, tmpIdx);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
 				_game._player.walk(Common::Point(0, 111), FACING_NORTHWEST);
 				}
@@ -3948,7 +3951,7 @@ void Scene105::actions() {
 			switch (_game._trigger) {
 			case (0):
 				_game._player._stepEnabled = false;
-				_game._player._visible = false;  
+				_game._player._visible = false;
 				_globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], true, 5, 1);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
@@ -3958,12 +3961,12 @@ void Scene105::actions() {
 			case 1: {
 				int tmpIdx = _globals._sequenceIndexes[6];
 				_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], true, 4);
-				_game.syncTimers(1, _globals._sequenceIndexes[6], 1, tmpIdx); 
+				_game.syncTimers(1, _globals._sequenceIndexes[6], 1, tmpIdx);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], false);
 				_vm->_sound->command(73);
 				_scene->_sequences.setTimingTrigger(15, 2);
 				}
-				break; 
+				break;
 
 			case 2:
 				_scene->deleteSequence(_globals._sequenceIndexes[6]);
@@ -3974,7 +3977,7 @@ void Scene105::actions() {
 				break;
 
 			case 3:
-				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[6]); 
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[6]);
 				_game._player._visible = true;
 				if (_action.isAction(NOUN_LOCK) || _action.isAction(VERB_UNLOCK))
 					_vm->_dialogs->show(32);
@@ -4015,7 +4018,7 @@ void Scene105::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_LANTERN) && _game._objects.isInRoom(OBJ_LANTERN))  {
+		if (_action.isAction(NOUN_LANTERN) && _game._objects.isInRoom(OBJ_LANTERN)) {
 			_vm->_dialogs->show(10514);
 			_action._inProgress = false;
 			return;
@@ -4160,11 +4163,11 @@ void Scene105::actions() {
 }
 
 void Scene105::preActions() {
-  if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_PIT))
-    _game._player._walkOffScreenSceneId = 102;
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_PIT))
+		_game._player._walkOffScreenSceneId = 102;
 
-  if (_action.isAction(VERB_OPEN, NOUN_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(NOUN_LOCK, NOUN_DOOR))
-	  _game._player.walk(Common::Point(33, 128), FACING_NORTHWEST);
+	if (_action.isAction(VERB_OPEN, NOUN_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(NOUN_LOCK, NOUN_DOOR))
+		_game._player.walk(Common::Point(33, 128), FACING_NORTHWEST);
 }
 
 /*------------------------------------------------------------------------*/


Commit: aa61aabdaf25ccfb7997592d62838090894e52c6
    https://github.com/scummvm/scummvm/commit/aa61aabdaf25ccfb7997592d62838090894e52c6
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-18T14:59:13+02:00

Commit Message:
MADS: Phantom: Implement scene 106

Changed paths:
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 4e474a8..31b50fe 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -53,7 +53,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 105:	// ground floor, storage room
 		return new Scene105(vm);
 	case 106:	// behind stage
-		return new DummyScene(vm);	// TODO
+		return new Scene106(vm);
 	case 107:	// stage right wing
 		return new DummyScene(vm);	// TODO
 	case 108:	// stage left wing
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index b7199bd..5357cfe 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -4172,5 +4172,580 @@ void Scene105::preActions() {
 
 /*------------------------------------------------------------------------*/
 
+Scene106::Scene106(MADSEngine *vm) : Scene1xx(vm) {
+	_sandbagHostpotId = -1;
+}
+
+void Scene106::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+	s.syncAsSint16LE(_sandbagHostpotId);
+}
+
+void Scene106::setup() {
+	if (_globals[kCurrentYear] == 1881)
+		_scene->_initialVariant = 1;
+
+	setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene106::enter() {
+	_scene->loadSpeech(8);
+
+	if (_globals[kCurrentYear] == 1993) {
+		if (!_game._objects.isInInventory(OBJ_SANDBAG)) {
+			_globals._spriteIndexes[5] = _scene->_sprites.addSprites("*RRD_9", false);
+			_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('x', 0), false);
+		}
+	} else {
+		_globals._spriteIndexes[7] = _scene->_sprites.addSprites(formAnimName('z', -1), false);
+		if (_game._objects.isInRoom(OBJ_CABLE_HOOK) && !_game._objects.isInInventory(OBJ_ROPE_WITH_HOOK)) {
+			_globals._spriteIndexes[5] = _scene->_sprites.addSprites("*RRD_9", false);
+			_globals._spriteIndexes[8] = _scene->_sprites.addSprites(formAnimName('p', 0), false);
+		}
+	}
+
+	_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('a', 0), false);
+	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('x', 1), false);
+	_globals._spriteIndexes[3] = _scene->_sprites.addSprites("*RDR_9", false);
+	_globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('a', 1), false);
+	_globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('a', 2), false);
+
+	if ((_globals[kCurrentYear] == 1881) && (!_globals[kHintThatDaaeIsHome1])) {
+		if ((_globals[kJacquesNameIsKnown] == 2) && (_globals[kMadameNameIsKnown] == 2)
+		 && (_globals[kPanelIn206]) && (_globals[kDoneRichConv203]) && (_game._objects.isInInventory(OBJ_LANTERN))
+		 && ((_game._objects.isInInventory(OBJ_CABLE_HOOK) && _game._objects.isInInventory(OBJ_ROPE))
+		   || _game._objects.isInInventory(OBJ_ROPE_WITH_HOOK))) {
+			_globals[kHintThatDaaeIsHome1] = true;
+			_scene->_sequences.setTimingTrigger(300, 85);
+		}
+	}
+
+	if ((_globals[kSandbagStatus] == 1) && (_globals[kCurrentYear] == 1993) && _game._objects.isInRoom(OBJ_SANDBAG)) {
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, -2);
+		_sandbagHostpotId = _scene->_dynamicHotspots.add(NOUN_SANDBAG, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(227, 140, 227 + 18, 140 + 11));
+		_scene->_dynamicHotspots.setPosition(_sandbagHostpotId, Common::Point(224, 152), FACING_NORTHEAST);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 2);
+	} 
+
+	if (_globals[kCurrentYear] == 1881) {
+		_scene->drawToBackground(_globals._spriteIndexes[7], 1, Common::Point(-32000, -32000), 0, 100);
+		_scene->_hotspots.activate(NOUN_BIG_PROP, false);
+		_scene->_hotspots.activate(NOUN_STATUE, false);
+		_scene->_hotspots.activate(NOUN_PLANT_PROP, false);
+		_scene->_hotspots.activate(NOUN_PEDESTAL, false);
+		_scene->_hotspots.activate(NOUN_SANDBAG, false);
+		_scene->_hotspots.activate(NOUN_CRATE, false);
+
+		_scene->_dynamicHotspots.add(NOUN_SANDBAG, VERB_LOOK_AT, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(40, 47, 40 + 11, 47 + 17));
+		_scene->_dynamicHotspots.add(NOUN_SANDBAG, VERB_LOOK_AT, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(98, 14, 98 + 5, 14 + 10));
+		_scene->_dynamicHotspots.add(NOUN_SANDBAG, VERB_LOOK_AT, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(111, 23, 111 + 6, 23 + 9));
+		_scene->_dynamicHotspots.add(NOUN_SANDBAG, VERB_LOOK_AT, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(119, 12, 119 + 5, 12 + 8));
+
+		int idx = _scene->_dynamicHotspots.add(NOUN_STAGE, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(80, 114, 80 + 24, 114 + 4));
+		_scene->_dynamicHotspots.setPosition(idx, Common::Point(93, 121), FACING_NONE);
+
+		idx = _scene->_dynamicHotspots.add(NOUN_STAGE, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(106, 102, 106 + 5, 102 + 10));
+		_scene->_dynamicHotspots.setPosition(idx, Common::Point(108, 109), FACING_NONE);
+	} else {
+		_scene->_hotspots.activate(NOUN_BOXES, false);
+		_scene->_hotspots.activate(NOUN_CASE, false);
+	}
+
+	if ((_game._objects.isInRoom(OBJ_CABLE_HOOK)) && (_globals[kCurrentYear] == 1881) && !_game._objects.isInInventory(OBJ_ROPE_WITH_HOOK)){
+		_globals._sequenceIndexes[8] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[8], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[8], 3);
+	} else {
+		_scene->_hotspots.activate(NOUN_CABLE_HOOK, false);
+	}
+
+	if (_scene->_priorSceneId == 109) {
+		_game._player._playerPos = Common::Point(180, 58);
+		_game._player._facing = FACING_SOUTH;
+		_game._player.walk(Common::Point(179, 63), FACING_SOUTH);
+		_game._player.setWalkTrigger(60);
+		_game._player._stepEnabled = false;
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 5);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+	} else if ((_scene->_priorSceneId == 105) || (_scene->_priorSceneId == 301)) {
+		_game._player._playerPos = Common::Point(235, 142);
+		_game._player._facing = FACING_WEST;
+		_game._player.walk(Common::Point(227, 143), FACING_WEST);
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+	} else if (_scene->_priorSceneId == 107) {
+		_game._player._playerPos = Common::Point(143, 68);
+		_game._player._facing = FACING_WEST;
+		_game._player.walk(Common::Point(163, 68), FACING_SOUTHEAST);
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+	} else if ((_scene->_priorSceneId == 108) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+		_game._player.firstWalk(Common::Point(-20, 130), FACING_SOUTHEAST, Common::Point(19, 147), FACING_NORTHEAST, true);
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+	} else if (_scene->_priorSceneId == RETURNING_FROM_LOADING) {
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+	}
+
+	sceneEntrySound();
+}
+
+void Scene106::step() {
+	switch (_game._trigger) {
+	case 85:
+		_scene->playSpeech(8);
+		_scene->_sequences.setTimingTrigger(120, 86);
+		break;
+
+	case 86:
+		_vm->_dialogs->show(10637);
+		break;
+
+	case 60:
+		_scene->deleteSequence(_globals._sequenceIndexes[2]);
+		_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+		_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 5);
+		_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 61);
+		break;
+
+	case 61:
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+		_vm->_sound->command(25);
+		_game._player._stepEnabled = true;
+		break;
+
+	default:
+		break;
+	}
+}
+
+void Scene106::actions() {
+	if ((_action.isAction(VERB_TAKE, NOUN_SANDBAG)) && (_scene->_customDest.y < 61)) {
+		_vm->_dialogs->show(10635);
+		_action._inProgress = false;
+		return;
+	} else if (_action.isAction(VERB_TAKE, NOUN_SANDBAG)) {
+		if (_game._objects.isInRoom(OBJ_SANDBAG)) {
+			switch (_game._trigger) {
+			case (0):
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], false, 5, 2);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[5], 1, 5);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 2, 5, 1);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 2);
+				break;
+
+			case 1:
+				_scene->deleteSequence(_globals._sequenceIndexes[0]);
+				_scene->_dynamicHotspots.remove(_sandbagHostpotId);
+				_vm->_sound->command(26);
+				break;
+
+			case 2:
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[5]);
+				_game._player._visible = true;
+				_scene->_sequences.setTimingTrigger(20, 3);
+				break;
+
+			case 3:
+				_game._objects.addToInventory(OBJ_SANDBAG);
+				_vm->_dialogs->showItem(OBJ_SANDBAG, 803, 0);
+				_game._player._stepEnabled = true;
+				break;
+
+			default:
+				break;
+			}
+			_action._inProgress = false;
+			return;
+		} 
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_CABLE_HOOK)) {
+		if (_game._objects.isInRoom(OBJ_CABLE_HOOK)) {
+			switch (_game._trigger) {
+			case (0):
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 5, 2);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[5], 1, 5);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[5],
+					2, 5, 1);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 2);
+				_globals[kPlayerScore] += 5;
+				break;
+
+			case 1:
+				_scene->deleteSequence(_globals._sequenceIndexes[8]);
+				_scene->_hotspots.activate(NOUN_CABLE_HOOK, false);
+				_vm->_sound->command(26);
+				break;
+
+			case 2:
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[5]);
+				_game._player._visible = true;
+				_scene->_sequences.setTimingTrigger(20, 3);
+				break;
+
+			case 3:
+				_game._objects.addToInventory(OBJ_CABLE_HOOK);
+				_vm->_dialogs->showItem(OBJ_CABLE_HOOK, 822, 0);
+				_game._player._stepEnabled = true;
+				break;
+
+			default:
+				break;
+			}
+			_action._inProgress = false;
+			return;
+		} 
+	}
+
+	switch (_game._trigger) {
+	case 75:
+		_game._player._stepEnabled = false;
+		_game._player._visible = false;
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 1), 76);
+		_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
+		_action._inProgress = false;
+		return;
+		break;
+
+	case 76:
+		_scene->_nextSceneId = 105;
+		_action._inProgress = false;
+		return;
+		break;
+
+	case 80:
+		_game._player._stepEnabled = false;
+		_game._player._visible = false;
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('u', 1), 81);
+		_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
+		_action._inProgress = false;
+		return;
+		break;
+
+	case 81:
+		_scene->_sequences.setTimingTrigger(120, 82);
+		_action._inProgress = false;
+		return;
+		break;
+
+	case 82:
+		_scene->_nextSceneId = 301;
+		_action._inProgress = false;
+		return;
+		break;
+
+	default:
+		break;
+	}
+
+	if (_action.isAction(VERB_EXIT_TO, NOUN_STAGE_RIGHT_WING)) {
+		_scene->_nextSceneId = 107;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLIMB_DOWN) || _action.isAction(VERB_CLIMB_UP)) {
+		if (_globals[kSandbagStatus] == 1) {
+			switch (_game._trigger) {
+			case 0:
+				_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('s',-1), 1);
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				break;
+
+			case 1:
+				_game.syncTimers(2, 0, 3, _globals._animationIndexes[0]);
+				_game._player._visible = true;
+				_game._player._playerPos = Common::Point(225, 143);
+				_game._player.resetFacing(FACING_EAST);
+				_game._player.walk(Common::Point(236, 142), FACING_EAST);
+
+				if (_action.isAction(VERB_CLIMB_DOWN))
+					_game._player.setWalkTrigger(75);
+				else
+					_game._player.setWalkTrigger(80);
+				break;
+
+			default:
+				break;
+			}
+		} else {
+			switch (_game._trigger) {
+			case 0:
+				_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 4, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 2);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 9);
+				_scene->_sequences.setTimingTrigger(6, 2);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 1);
+				break;
+
+			case 1:
+				_vm->_sound->command(70);
+				_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, -2);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 2);
+				_sandbagHostpotId = _scene->_dynamicHotspots.add(NOUN_SANDBAG, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(227, 140, 227 + 18, 140 + 11));
+				_scene->_dynamicHotspots.setPosition(_sandbagHostpotId, Common::Point(224, 152), FACING_NORTHEAST);
+				break;
+
+			case 2:
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('s', 1), 3);
+				_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
+				break;
+
+			case 3:
+				_game.syncTimers(2, 0, 3, _globals._animationIndexes[0]);
+				_game._player._visible = true;
+				_game._player._stepEnabled = true;
+				_game._player._playerPos = Common::Point(228, 140);
+				_game._player.resetFacing(FACING_SOUTHEAST);
+				_globals[kSandbagStatus] = 1;
+				_vm->_dialogs->show(10632);
+				break;
+
+			default:
+				break;
+			}
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR) || _action.isAction(VERB_OPEN, NOUN_DOOR)) {
+		switch (_game._trigger) {
+		case (0):
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;
+			_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 5, 2);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[3], 1, 4);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 2, 4, 65);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 67);
+			break;
+
+		case 65:
+			_vm->_sound->command(24);
+			_scene->deleteSequence(_globals._sequenceIndexes[2]);
+			_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 5);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 66);
+			break;
+
+		case 66: {
+			int idx = _globals._sequenceIndexes[2];
+			_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 5);
+			_game.syncTimers(1, _globals._sequenceIndexes[2], 1, idx);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+			}
+			break;
+
+		case 67:
+			_game._player._visible = true;
+			_game._player.walk(Common::Point(180, 60), FACING_NORTH);
+			_game._player.setWalkTrigger(68);
+			break;
+
+		case 68:
+			_scene->deleteSequence(_globals._sequenceIndexes[2]);
+			_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 1);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[2], -1, -2);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 69);
+			break;
+
+		case 69:
+			_vm->_sound->command(25);
+			_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, -1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 1);
+			_scene->_nextSceneId = 109;
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action._lookFlag) {
+		_vm->_dialogs->show(10610);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isAction(NOUN_STAGE_RIGHT_WING)) {
+			_vm->_dialogs->show(10611);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STAGE_LEFT_WING)) {
+			_vm->_dialogs->show(10612);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_IN_TWO)) {
+			_vm->_dialogs->show(10613);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CYCLORAMA)) {
+			_vm->_dialogs->show(10614);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STAGE)) {
+			_vm->_dialogs->show(10615);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PEDESTAL)) {
+			_vm->_dialogs->show(10616);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PLANT_PROP)) {
+			_vm->_dialogs->show(10617);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_SANDBAG)) {
+			if (_scene->_customDest.y < 60) {
+				_vm->_dialogs->show(10618);
+				_action._inProgress = false;
+				return;
+			} else if (_game._objects.isInRoom(OBJ_SANDBAG)) {
+				_vm->_dialogs->show(10633);
+				_action._inProgress = false;
+				return;
+			}
+		}
+
+		if (_action.isAction(NOUN_STATUE)) {
+			_vm->_dialogs->show(10619);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CIRCULAR_STAIRCASE)) {
+			_vm->_dialogs->show(10620);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_BATTEN)) {
+			_vm->_dialogs->show(10621);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_DOOR)) {
+			_vm->_dialogs->show(10622);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_BOXES) || _action.isAction(NOUN_BOX)) {
+			_vm->_dialogs->show(10623);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_BIG_PROP)) {
+			_vm->_dialogs->show(10624);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CRATE)) {
+			_vm->_dialogs->show(10625);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CASE)) {
+			if (_globals[kCurrentYear] == 1881)
+				_vm->_dialogs->show(10638);
+			else
+				_vm->_dialogs->show(10636);
+
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_VENTILATION_DUCT)) {
+			_vm->_dialogs->show(10626);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_JUNK)) {
+			_vm->_dialogs->show(10627);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_FLATS)) {
+			_vm->_dialogs->show(10628);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WALL)) {
+			_vm->_dialogs->show(10629);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CABLE_HOOK) && _game._objects.isInRoom(OBJ_CABLE_HOOK)) {
+			_vm->_dialogs->show(10639);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_TALK_TO, NOUN_STATUE)) {
+		_vm->_dialogs->show(10630);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_DOOR)) {
+		_vm->_dialogs->show(10634);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene106::preActions() {
+	if (_action.isAction(VERB_EXIT_TO, NOUN_STAGE_LEFT_WING))
+		_game._player._walkOffScreenSceneId = 108;
+
+	if (_action.isAction(VERB_OPEN, NOUN_DOOR))
+		_game._player.walk(Common::Point(179, 63), FACING_NORTHWEST);
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 83b94ba..1c3ab89 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -206,6 +206,19 @@ public:
 	virtual void actions();
 };
 
+class Scene106 : public Scene1xx {
+private:
+	int _sandbagHostpotId;
+public:
+	Scene106(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
 } // End of namespace Phantom
 } // End of namespace MADS
 


Commit: 5f3c0cf63aeaf46f30f40a5b7f9a119199dcc194
    https://github.com/scummvm/scummvm/commit/5f3c0cf63aeaf46f30f40a5b7f9a119199dcc194
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-18T20:51:42+02:00

Commit Message:
MADS: Phantom: Add logic for scene 107

Changed paths:
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 31b50fe..313a494 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -55,7 +55,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 106:	// behind stage
 		return new Scene106(vm);
 	case 107:	// stage right wing
-		return new DummyScene(vm);	// TODO
+		return new Scene107(vm);
 	case 108:	// stage left wing
 		return new DummyScene(vm);	// TODO
 	case 109:	// upper floor, staircase
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 5357cfe..cb080c6 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -4747,5 +4747,276 @@ void Scene106::preActions() {
 
 /*------------------------------------------------------------------------*/
 
+Scene107::Scene107(MADSEngine *vm) : Scene1xx(vm) {
+}
+
+void Scene107::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+}
+
+void Scene107::setup() {
+	setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene107::enter() {
+	if (_globals[kCurrentYear] == 1993)
+		_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('z', -1), false);
+
+	if (_game._objects.isInRoom(OBJ_YELLOW_FRAME)) {
+		_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('f', 0), false);
+		_globals._spriteIndexes[1] = _scene->_sprites.addSprites("*RRD_9", false);
+	}
+
+	if (_game._objects.isInRoom(OBJ_YELLOW_FRAME)) {
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+	} else {
+		_scene->_hotspots.activate(NOUN_YELLOW_FRAME, false);
+	}
+
+	if (_globals[kCurrentYear] == 1993) {
+		_scene->drawToBackground(_globals._spriteIndexes[0], 1, Common::Point(-32000, -32000), 0, 100);
+		_scene->_hotspots.activate(NOUN_PROP_TABLE, false);
+	} else {
+		_scene->_hotspots.activate(NOUN_HEADSET, false);
+	}
+
+	if (_scene->_priorSceneId == 106) {
+		_game._player._playerPos = Common::Point(276, 73);
+		_game._player._facing = FACING_SOUTHWEST;
+		_game._player.walk(Common::Point(248, 75), FACING_SOUTHWEST);
+	} else if ((_scene->_priorSceneId == 104) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+		if (_game._player._playerPos.y > 128) {
+			_game._player._playerPos.x = 216;
+			_game._player._facing = FACING_NORTHWEST;
+		} else if (_game._player._playerPos.y > 99) {
+			_game._player._playerPos.x = 127;
+			_game._player._facing = FACING_NORTHWEST;
+		} else {
+			_game._player._playerPos.x = 44;
+			_game._player._facing = FACING_NORTHEAST;
+		}
+		_game._player._playerPos.y = 143;
+	}
+
+	sceneEntrySound();
+}
+
+void Scene107::step() {
+}
+
+void Scene107::actions() {
+	if (_action.isAction(VERB_WALK_ONTO, NOUN_STAGE)) {
+		_scene->_nextSceneId = 104;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK, NOUN_BACKSTAGE)) {
+		_scene->_nextSceneId = 106;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_YELLOW_FRAME) && (_game._objects.isInRoom(OBJ_YELLOW_FRAME) || _game._trigger)) {
+		switch (_game._trigger) {
+		case (0):
+			if (_globals[kCurrentYear] == 1881) {
+				int count = 0;
+				if (_game._objects.isInInventory(OBJ_GREEN_FRAME))
+					++count;
+				if (_game._objects.isInInventory(OBJ_RED_FRAME))
+					++count;
+				if (_game._objects.isInInventory(OBJ_BLUE_FRAME))
+					++count;
+
+				if (count < 3)
+					_globals[kPlayerScore] += 5;
+			}
+
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;
+			_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 5, 2);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 5);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 5, 1);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 2);
+			break;
+
+		case 1:
+			_scene->deleteSequence(_globals._sequenceIndexes[2]);
+			_scene->_hotspots.activate(NOUN_YELLOW_FRAME, false);
+			_game._objects.addToInventory(OBJ_YELLOW_FRAME);
+			_vm->_sound->command(26);
+			break;
+
+		case 2:
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); 
+			_game._player._visible = true;
+			_scene->_sequences.setTimingTrigger(20, 3);
+			break;
+
+		case 3:
+			if (_globals[kCurrentYear] == 1881)
+				_vm->_dialogs->showItem(OBJ_YELLOW_FRAME, 843, 0);
+			else
+				_vm->_dialogs->showItem(OBJ_YELLOW_FRAME, 804, 0);
+
+			_game._player._stepEnabled = true;
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action._lookFlag) {
+		_vm->_dialogs->show(10710);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isAction(NOUN_STAGE)) {
+			_vm->_dialogs->show(10711);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_IN_TWO)) {
+			_vm->_dialogs->show(10712);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_IN_ONE)) {
+			_vm->_dialogs->show(10713);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CYCLORAMA)) {
+			_vm->_dialogs->show(10714);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_COUNTERWEIGHT_SYSTEM)) {
+			_vm->_dialogs->show(10715);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PURCHASE_LINES)) {
+			_vm->_dialogs->show(10716);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LOCKRAIL)) {
+			_vm->_dialogs->show(10717);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STAGE)) {
+			_vm->_dialogs->show(10718);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PROP_TABLE)) {
+			_vm->_dialogs->show(10719);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_ACT_CURTAIN)) {
+			_vm->_dialogs->show(10720);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LEG)) {
+			_vm->_dialogs->show(10721);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_APRON)) {
+			_vm->_dialogs->show(10722);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PROSCENIUM_ARCH)) {
+			_vm->_dialogs->show(10723);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STAGE)) {
+			_vm->_dialogs->show(10724);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_BACKSTAGE)) {
+			_vm->_dialogs->show(10725);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_YELLOW_FRAME) && _game._objects.isInRoom(OBJ_YELLOW_FRAME)) {
+			if (_globals[kCurrentYear] == 1881)
+				_vm->_dialogs->show(10727);
+			else
+				_vm->_dialogs->show(10726);
+
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_HEADSET)) {
+			_vm->_dialogs->show(10728);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WALL)) {
+			_vm->_dialogs->show(10730);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_HEADSET)) {
+		_vm->_dialogs->show(10729);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TALK_TO, NOUN_HEADSET)) {
+		_vm->_dialogs->show(10732);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_PULL, NOUN_PURCHASE_LINES)) {
+		_vm->_dialogs->show(10731);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene107::preActions() {
+}
+
+/*------------------------------------------------------------------------*/
+
+
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 1c3ab89..ad91b8e 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -193,8 +193,6 @@ public:
 };
 
 class Scene105 : public Scene1xx {
-private:
-
 public:
 	Scene105(MADSEngine *vm);
 	virtual void synchronize(Common::Serializer &s);
@@ -219,6 +217,20 @@ public:
 	virtual void preActions();
 	virtual void actions();
 };
+
+class Scene107 : public Scene1xx {
+private:
+
+public:
+	Scene107(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
 } // End of namespace Phantom
 } // End of namespace MADS
 


Commit: 7a56c52c89d8a6afc391b1f8181dcad56ad3997e
    https://github.com/scummvm/scummvm/commit/7a56c52c89d8a6afc391b1f8181dcad56ad3997e
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-18T23:57:38+02:00

Commit Message:
MADS: Phantom: Fix some hotspot rects in scene 103, implement scene 108

Changed paths:
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 313a494..4d8a411 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -57,7 +57,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 107:	// stage right wing
 		return new Scene107(vm);
 	case 108:	// stage left wing
-		return new DummyScene(vm);	// TODO
+		return new Scene108(vm);
 	case 109:	// upper floor, staircase
 		return new DummyScene(vm);	// TODO
 	case 110:	// outside dressing rooms 1
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index cb080c6..14b5be3 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -993,7 +993,7 @@ void Scene103::enter() {
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(155, 144), FACING_NONE);
 
-			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(187, 136, 8, 7));
+			tmpIdx = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(187, 136, 187 + 8, 136 + 7));
 			_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(195, 139), FACING_NONE);
 		} else if ((_globals[kJacquesStatus] >= 1) && (_globals[kCurrentYear] == 1881)) {
@@ -1550,23 +1550,23 @@ void Scene103::actions() {
 						_scene->_dynamicHotspots[_hotspotPrompt1]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt1, Common::Point(59, 140), FACING_NORTHWEST);
 
-						_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(42, 67, 16, 75));
+						_hotspotPrompt2 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(42, 67, 42 + 16, 67 + 75));
 						_scene->_dynamicHotspots[_hotspotPrompt2]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt2, Common::Point(59, 140), FACING_NORTHWEST);
 
-						_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(58, 90, 18, 52));
+						_hotspotPrompt3 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_WALKTO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(58, 90, 58 + 18, 90 + 52));
 						_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, Common::Point(59, 140), FACING_NORTHWEST);
 
-						_hotspotLeftFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(35, 137, 40, 5));
+						_hotspotLeftFloor1 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(35, 137, 35 + 40, 137 + 5));
 						_scene->_dynamicHotspots[_hotspotLeftFloor1]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor1, Common::Point(59, 140), FACING_NONE);
 
-						_hotspotLeftFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(76, 129, 6, 6));
+						_hotspotLeftFloor2 = _scene->_dynamicHotspots.add(NOUN_FLOOR, VERB_WALK_ACROSS, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(76, 129, 76 + 6, 129 + 6));
 						_scene->_dynamicHotspots[_hotspotLeftFloor2]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor2, Common::Point(80, 135), FACING_NONE);
 
-						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 49, 40, 30));
+						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 49, 2 + 40, 49 + 30));
 						_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(79, 132), FACING_SOUTHWEST);
 						_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
@@ -2335,7 +2335,7 @@ void Scene103::process_conv_jacques() {
 		if (_globals[kJacquesNameIsKnown] == 0) {
 			_globals[kJacquesNameIsKnown] = 1;
 			_scene->_dynamicHotspots.remove(_hotspotGentleman);
-			_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(156, 116, 33, 31));
+			_hotspotGentleman = _scene->_dynamicHotspots.add(NOUN_JACQUES, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(156, 116, 156 + 33, 116 + 31));
 			_scene->_dynamicHotspots[_hotspotGentleman]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(_hotspotGentleman, Common::Point(206, 148), FACING_NORTHWEST);
 		}
@@ -4852,7 +4852,7 @@ void Scene107::actions() {
 			break;
 
 		case 2:
-			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); 
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]);
 			_game._player._visible = true;
 			_scene->_sequences.setTimingTrigger(20, 3);
 			break;
@@ -5017,6 +5017,595 @@ void Scene107::preActions() {
 
 /*------------------------------------------------------------------------*/
 
+Scene108::Scene108(MADSEngine *vm) : Scene1xx(vm) {
+	_anim0ActvFl = false;
+	_handRaisedFl = false;
+	_shutUpCount = -1;
+	_maxTalkCount = -1;
+	_charAction = -1;
+	_charFrame = -1;
+	_charHotspotId = -1;
+	_charTalkCount = -1;
+	_conversationCount = -1;
+	_prevShutUpFrame = -1;
+}
+
+void Scene108::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+	s.syncAsByte(_anim0ActvFl);
+	s.syncAsByte(_handRaisedFl);
+	s.syncAsSint16LE(_shutUpCount);
+	s.syncAsSint16LE(_maxTalkCount);
+	s.syncAsSint16LE(_charAction);
+	s.syncAsSint16LE(_charFrame);
+	s.syncAsSint16LE(_charHotspotId);
+	s.syncAsSint16LE(_charTalkCount);
+	s.syncAsSint16LE(_conversationCount);
+	s.syncAsSint16LE(_prevShutUpFrame);
+}
+
+void Scene108::setup() {
+	setPlayerSpritesPrefix();
+	setAAName();
+	
+	if (_globals[kCurrentYear] == 1993)
+		_scene->_initialVariant = 1;
+
+	_scene->addActiveVocab(NOUN_GENTLEMAN);
+	_scene->addActiveVocab(NOUN_CHARLES);
+}
+
+void Scene108::enter() {
+	if (_scene->_priorSceneId != RETURNING_FROM_LOADING) {
+		_anim0ActvFl = false;
+		_handRaisedFl = false;
+		_charTalkCount = 0;
+		_shutUpCount = 40;
+		_maxTalkCount = 15;
+	}
+
+	_vm->_gameConv->get(2);
+
+	if (_globals[kCurrentYear] == 1993) {
+		_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('z', -1), false);
+		_scene->_hotspots.activate(NOUN_STOOL, false);
+		int idx = _scene->_dynamicHotspots.add(NOUN_STOOL, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(250, 68, 250 + 8, 68 + 21));
+		_scene->_dynamicHotspots[idx]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(idx, Common::Point(253, 75), FACING_SOUTHEAST);
+		_scene->drawToBackground(_globals._spriteIndexes[0], 1, Common::Point(-32000, -32000), 0, 100);
+	} else {
+		_scene->_hotspots.activate(NOUN_HEADSET, false);
+		int idx = _scene->_dynamicHotspots.add(NOUN_WALL, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(258, 58, 258 + 6, 58 + 10));
+		_scene->_dynamicHotspots[idx]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(idx, Common::Point(236, 69), FACING_NORTHEAST);
+	}
+
+	if ((_globals[kCurrentYear] == 1993) && (_globals[kDoneBrieConv203] == 0)) {
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('c', 1), 1);
+		_anim0ActvFl = true;
+
+		if (_vm->_gameConv->_running == 2) {
+			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
+			_charAction = 0;
+			_vm->_gameConv->run(2);
+			_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+			_vm->_gameConv->exportValue(_globals[kJulieNameIsKnown]);
+			_vm->_gameConv->exportValue(_globals[kObservedPhan104]);
+			_scene->setAnimFrame(_globals._animationIndexes[0], 55);
+			_shutUpCount = 40;
+		} else {
+			_charAction = 2;
+		}
+
+		if (_globals[kCharlesNameIsKnown]) {
+			_charHotspotId = _scene->_dynamicHotspots.add(NOUN_CHARLES, VERB_WALK_TO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(253, 52, 253 + 15, 52 + 34));
+			_scene->_dynamicHotspots[_charHotspotId]._articleNumber = PREP_ON;
+		} else {
+			_charHotspotId = _scene->_dynamicHotspots.add(NOUN_GENTLEMAN, VERB_WALK_TO, SYNTAX_MASC_NOT_PROPER, EXT_NONE, Common::Rect(253, 52, 253 + 15, 52 + 34));
+			_scene->_dynamicHotspots[_charHotspotId]._articleNumber = PREP_ON;
+		}
+		_scene->_dynamicHotspots.setPosition(_charHotspotId, Common::Point(235, 102), FACING_NORTHEAST);
+	} 
+
+	if (_scene->_priorSceneId == 106) {
+		_game._player._playerPos = Common::Point(48, 81);
+		_game._player._facing = FACING_SOUTHEAST;
+		_game._player.walk(Common::Point(71, 76), FACING_SOUTHEAST);
+	} else if ((_scene->_priorSceneId == 104) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+		if (_game._player._playerPos.y > 128) {
+			_game._player._playerPos.x = 124;
+			_game._player._facing = FACING_NORTHEAST;
+		} else if (_game._player._playerPos.y > 99) {
+			_game._player._playerPos.x = 185;
+			_game._player._facing = FACING_NORTHEAST;
+		} else {
+			_game._player._playerPos.x = 243;
+			_game._player._facing = FACING_NORTHWEST;
+		}
+
+		_game._player._playerPos.y = 143;
+	}
+
+	sceneEntrySound();
+}
+
+void Scene108::step() {
+	if (_anim0ActvFl)
+		handle_animation_char ();
+
+	if ((_globals[kWalkerConverse] == 2) || (_globals[kWalkerConverse] == 3)) {
+		++_conversationCount;
+		if (_conversationCount > 200)
+			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
+	}
+}
+
+void Scene108::actions() {
+	if (_vm->_gameConv->_running == 2) {
+		process_conversation_charles();
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TALK_TO, NOUN_GENTLEMAN) || _action.isAction(VERB_TALK_TO, NOUN_CHARLES)) {
+		_charAction = 6;
+		_game._player._stepEnabled = false;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_ONTO, NOUN_STAGE)) {
+		_scene->_nextSceneId = 104;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK, NOUN_BACKSTAGE)) {
+		_scene->_nextSceneId = 106;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action._lookFlag) {
+		_vm->_dialogs->show(10810);
+		_action._inProgress = false;
+		return;
+	} 
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isAction(NOUN_WALL)) {
+			_vm->_dialogs->show(10730);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STAGE)) {
+			_vm->_dialogs->show(10811);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_IN_TWO)) {
+			_vm->_dialogs->show(10812);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_IN_ONE)) {
+			_vm->_dialogs->show(10813);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PROSCENIUM_ARCH)) {
+			_vm->_dialogs->show(10814);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_ACT_CURTAIN)) {
+			_vm->_dialogs->show(10815);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LEG)) {
+			_vm->_dialogs->show(10816);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CYCLORAMA)) {
+			_vm->_dialogs->show(10817);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_FLATS)) {
+			_vm->_dialogs->show(10818);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STAGEMANAGERS_POST)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(10819);
+			else
+				_vm->_dialogs->show(10820);
+
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STOOL)) {
+			_vm->_dialogs->show(10821);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_BACKSTAGE)) {
+			_vm->_dialogs->show(10822);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STAGE)) {
+			_vm->_dialogs->show(10823);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_HEADSET)) {
+			_vm->_dialogs->show(10824);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WALL)) {
+			_vm->_dialogs->show(10826);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CHARLES) || _action.isAction(NOUN_GENTLEMAN)) {
+			_vm->_dialogs->show(10827);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_CHARLES) || _action.isAction(VERB_TAKE, NOUN_GENTLEMAN)) {
+		_vm->_dialogs->show(10828);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_HEADSET)) {
+		_vm->_dialogs->show(10825);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_STOOL) && (_globals[kCurrentYear] == 1993)) {
+		_vm->_dialogs->show(10829);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TALK_TO, NOUN_HEADSET)) {
+		_vm->_dialogs->show(10830);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene108::preActions() {
+}
+
+void Scene108::handle_animation_char() {
+	if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == _charFrame)
+		return;
+
+	_charFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
+	int resetFrame = -1;
+	int random = -1;
+
+	switch (_charFrame) {
+	case 1:
+	case 2:
+	case 3:
+	case 4:
+	case 92:
+		if (_charAction == 2)
+			random = _vm->getRandomNumber(2, 15);
+
+		if (_charAction == 6) {
+			_charTalkCount = 0;
+			_charAction = 1;
+			random = 1;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 5;
+			break;
+
+		case 2:
+			resetFrame = 0;
+			break;
+
+		case 3:
+			resetFrame = 1;
+			break;
+
+		case 4:
+			resetFrame = 2;
+			break;
+
+		default:
+			resetFrame = 3;
+			break;
+		}
+		break;
+
+	case 18:
+	case 19:
+	case 20:
+	case 21:
+	case 27:
+	case 33:
+	case 41:
+	case 51:
+	case 52:
+	case 53:
+	case 54:
+	case 55:
+	case 56:
+	case 57:
+	case 62:
+	case 73:
+		if (_charFrame == 18) {
+			_game._player._stepEnabled = true;
+			_vm->_gameConv->run(2);
+			_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+			_vm->_gameConv->exportValue(_globals[kJulieNameIsKnown]);
+			_vm->_gameConv->exportValue(_globals[kObservedPhan104]);
+		}
+
+		if (_charAction == 1) {
+			if (_handRaisedFl) {
+				random = _vm->getRandomNumber(1, 3);
+			} else {
+				random = _vm->getRandomNumber(1, 4);
+				if (random == 4)
+					random = _vm->getRandomNumber(1, 4);
+			}
+
+			if (random == 4)
+				_handRaisedFl = true;
+
+			++_charTalkCount;
+			if (_charTalkCount > _maxTalkCount) {
+				_charAction = 0;
+				_shutUpCount = 0;
+				_prevShutUpFrame = 10;
+				random = 12;
+			} 
+		} else if (_charAction == 0) {
+			int delay = _vm->getRandomNumber(10, 15);
+			++_shutUpCount;
+			if (_shutUpCount > delay) {
+				random = _vm->getRandomNumber(10, 16);
+				_prevShutUpFrame = random;
+				if (random == 15)
+					_shutUpCount = 16;
+				else
+					_shutUpCount = 0;
+			} else {
+				random = _prevShutUpFrame;
+			}
+		} else if (_charAction == 7) {
+			_charAction = 1;
+			random = 5;
+		} else if (_charAction == 3) {
+			_charAction = 1;
+			random = 6;
+		} else if (_charAction == 5) {
+			_charAction = 1;
+			random = 7;
+		} else if (_charAction == 4) {
+			_charAction = 1;
+			random = 8;
+		} else if (_charAction == 2) {
+			random = 9;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 18;
+			break;
+
+		case 2:
+			resetFrame = 19;
+			break;
+
+		case 3:
+			resetFrame = 20;
+			break;
+
+		case 4:
+			resetFrame = 62;
+			_charTalkCount += 5;
+			break;
+
+		case 5:
+			resetFrame = 21;
+			break;
+
+		case 6:
+			resetFrame = 41;
+			break;
+
+		case 7:
+			resetFrame = 33;
+			break;
+
+		case 8:
+			resetFrame = 27;
+			break;
+
+		case 9:
+			resetFrame = 74;
+			break;
+
+		case 10:
+			resetFrame = 51;
+			break;
+
+		case 11:
+			resetFrame = 53;
+			break;
+
+		case 12:
+			resetFrame = 54;
+			break;
+
+		case 13:
+			resetFrame = 55;
+			break;
+
+		case 14:
+			resetFrame = 56;
+			break;
+
+		case 15:
+			resetFrame = 57;
+			break;
+
+		case 16:
+			resetFrame = 52;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
+		_charFrame = resetFrame;
+	}
+}
+
+void Scene108::process_conversation_charles() {
+	switch (_action._activeAction._verbId) {
+	case 1:
+	case 25:
+	case 26:
+		_globals[kWalkerConverse] = 0;
+		_vm->_gameConv->setHeroTrigger(64);
+		if (_action._activeAction._verbId == 26)
+			_globals[kCharlesNameIsKnown] = 2;
+		break;
+
+	case 2:
+		if (!_globals[kCharlesNameIsKnown]) {
+			_scene->_dynamicHotspots.remove(_charHotspotId);
+			_charHotspotId = _scene->_dynamicHotspots.add(NOUN_CHARLES, VERB_WALK_TO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(253, 52, 253 + 15, 52 + 34));
+			_scene->_dynamicHotspots[_charHotspotId]._articleNumber = PREP_ON;
+			_scene->_dynamicHotspots.setPosition(_charHotspotId, Common::Point(235, 102), FACING_NORTHEAST);
+			_globals[kCharlesNameIsKnown] = true;
+		}
+		break;
+
+	case 5:
+		_vm->_gameConv->setInterlocutorTrigger(66);
+		_maxTalkCount = 35;
+		break;
+
+	case 6:
+	case 8:
+	case 9:
+	case 10:
+	case 11:
+	case 12:
+	case 15:
+		_maxTalkCount = 35;
+		break;
+
+	case 16:
+		_vm->_gameConv->setInterlocutorTrigger(68);
+		_maxTalkCount = 35;
+		break;
+
+	case 19:
+		_vm->_gameConv->setInterlocutorTrigger(72);
+		break;
+
+	case 22:
+		_vm->_gameConv->setInterlocutorTrigger(70);
+		break;
+
+	default:
+		_maxTalkCount = 15;
+		break;
+	}
+
+	switch (_game._trigger) {
+	case 60:
+		_charAction = 1;
+		_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
+		break;
+
+	case 62:
+		_globals[kWalkerConverse] = _vm->getRandomNumber(2, 3);
+		_conversationCount = 0;
+		_charAction = 0;
+		break;
+
+	case 64:
+		_charAction = 2;
+		break;
+
+	case 66:
+		_charAction = 5;
+		break;
+
+	case 68:
+		_charAction = 4;
+		break;
+
+	case 70:
+		_charAction = 7;
+		break;
+
+	case 72:
+		_charAction = 3;
+		break;
+
+	default:
+		break;
+	} 
+
+	if ((_action._activeAction._verbId != 1) && (_action._activeAction._verbId != 5) &&
+		(_action._activeAction._verbId != 16) && (_action._activeAction._verbId != 19) &&
+		(_action._activeAction._verbId != 22) && (_action._activeAction._verbId != 25) &&
+		(_action._activeAction._verbId != 26) && (_charAction != 2)) {
+		_vm->_gameConv->setInterlocutorTrigger(60);
+		_vm->_gameConv->setHeroTrigger(62);
+	}
+
+	_charTalkCount = 0;
+	_shutUpCount = 40;
+	_handRaisedFl = false;
+}
+
+/*------------------------------------------------------------------------*/
 
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index ad91b8e..7a3b3fb 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -219,10 +219,35 @@ public:
 };
 
 class Scene107 : public Scene1xx {
+public:
+	Scene107(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
+
+class Scene108 : public Scene1xx {
 private:
+	bool _anim0ActvFl;
+	bool _handRaisedFl;
+	int _shutUpCount;
+	int _maxTalkCount;
+	int _charAction;
+	int _charFrame;
+	int _charTalkCount;
+	int _charHotspotId;
+	int _conversationCount;
+	int _prevShutUpFrame;
+
+	void handle_animation_char();
+	void process_conversation_charles();
 
 public:
-	Scene107(MADSEngine *vm);
+	Scene108(MADSEngine *vm);
 	virtual void synchronize(Common::Serializer &s);
 
 	virtual void setup();
@@ -231,6 +256,7 @@ public:
 	virtual void preActions();
 	virtual void actions();
 };
+
 } // End of namespace Phantom
 } // End of namespace MADS
 


Commit: 3488f05585a1c3491e90e3aa5d14fb34fcfb17d5
    https://github.com/scummvm/scummvm/commit/3488f05585a1c3491e90e3aa5d14fb34fcfb17d5
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-19T00:20:09+02:00

Commit Message:
MADS: Phantom: Some renaming in scene 108

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 14b5be3..0e50bf5 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -5132,7 +5132,7 @@ void Scene108::enter() {
 
 void Scene108::step() {
 	if (_anim0ActvFl)
-		handle_animation_char ();
+		handleCharAnimation ();
 
 	if ((_globals[kWalkerConverse] == 2) || (_globals[kWalkerConverse] == 3)) {
 		++_conversationCount;
@@ -5143,7 +5143,7 @@ void Scene108::step() {
 
 void Scene108::actions() {
 	if (_vm->_gameConv->_running == 2) {
-		process_conversation_charles();
+		handleCharlesConversation();
 		_action._inProgress = false;
 		return;
 	}
@@ -5303,7 +5303,7 @@ void Scene108::actions() {
 void Scene108::preActions() {
 }
 
-void Scene108::handle_animation_char() {
+void Scene108::handleCharAnimation() {
 	if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == _charFrame)
 		return;
 
@@ -5502,7 +5502,7 @@ void Scene108::handle_animation_char() {
 	}
 }
 
-void Scene108::process_conversation_charles() {
+void Scene108::handleCharlesConversation() {
 	switch (_action._activeAction._verbId) {
 	case 1:
 	case 25:
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 7a3b3fb..99146ae 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -243,8 +243,8 @@ private:
 	int _conversationCount;
 	int _prevShutUpFrame;
 
-	void handle_animation_char();
-	void process_conversation_charles();
+	void handleCharAnimation();
+	void handleCharlesConversation();
 
 public:
 	Scene108(MADSEngine *vm);


Commit: 7a6bc4f8cfb26ea58385f21886ad0a6b0dbb18a9
    https://github.com/scummvm/scummvm/commit/7a6bc4f8cfb26ea58385f21886ad0a6b0dbb18a9
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-19T07:15:42+02:00

Commit Message:
MADS: Phantom: Implement scene 109

Changed paths:
    engines/mads/game.cpp
    engines/mads/game.h
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h
    engines/mads/scene.cpp
    engines/mads/scene.h



diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp
index 311a95c..8ddfd1e 100644
--- a/engines/mads/game.cpp
+++ b/engines/mads/game.cpp
@@ -603,4 +603,7 @@ void Game::syncTimers(int slave_type, int slave_id, int master_type, int master_
 	warning("TODO: Game_syncTimers");
 }
 
+void Game::camPanTo(Camera *camera, int target) {
+	warning("TODO: Game::camPanTo");
+}
 } // End of namespace MADS
diff --git a/engines/mads/game.h b/engines/mads/game.h
index 2a1daac..c5dfcbb 100644
--- a/engines/mads/game.h
+++ b/engines/mads/game.h
@@ -238,6 +238,12 @@ public:
 
 	void syncTimers(int slave_type, int slave_id, int master_type, int master_id);
 
+	typedef struct {
+		//TODO
+	} Camera;
+	Camera _camX, _camY;
+	void camPanTo(Camera *camera, int target);
+
 };
 
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 4d8a411..5c414d2 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -59,7 +59,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 108:	// stage left wing
 		return new Scene108(vm);
 	case 109:	// upper floor, staircase
-		return new DummyScene(vm);	// TODO
+		return new Scene109(vm);
 	case 110:	// outside dressing rooms 1
 		return new DummyScene(vm);	// TODO
 	case 111:	// outside dressing rooms 2
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 0e50bf5..cc84b6e 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -5607,5 +5607,512 @@ void Scene108::handleCharlesConversation() {
 
 /*------------------------------------------------------------------------*/
 
+Scene109::Scene109(MADSEngine *vm) : Scene1xx(vm) {
+	_anim0ActvFl = false;
+	_anim1ActvFl = false;
+	_anim2ActvFl = false;
+	_anim3ActvFl = false;
+}
+
+void Scene109::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+	s.syncAsByte(_anim0ActvFl);
+	s.syncAsByte(_anim1ActvFl);
+	s.syncAsByte(_anim2ActvFl);
+	s.syncAsByte(_anim3ActvFl);
+}
+
+void Scene109::setup() {
+	setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene109::enter() {
+	_anim0ActvFl = false;
+	_anim1ActvFl = false;
+	_anim2ActvFl = false;
+	_anim3ActvFl = false;
+
+	_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('x', 0), false);
+	_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('x', 2), false);
+	_globals._spriteIndexes[8] = _scene->_sprites.addSprites("*RDR_6", false);
+
+	if (_globals[kCurrentYear] == 1881) {
+		_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('x', 1), false);
+		_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('x', 3), false);
+		_globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('x', 4), false);
+
+		_scene->_hotspots.activate(NOUN_LIGHT_FIXTURE, false);
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 14);
+		_globals._sequenceIndexes[4] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[4], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[4], 14);
+		_scene->_sequences.setTimingTrigger(1, 70);
+	} else {
+		_globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('z', 0), false);
+		_globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('z', 1), false);
+		_globals._spriteIndexes[7] = _scene->_sprites.addSprites(formAnimName('z', 2), false);
+
+		_scene->_hotspots.activate(NOUN_LAMP, false);
+		_globals._sequenceIndexes[5] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[5], false, 1);
+		_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, 1);
+		_globals._sequenceIndexes[7] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[7], false, 1);
+	}
+
+	if (_scene->_priorSceneId == 106) {
+		_game._player._playerPos = Common::Point(31, 459);
+		_game._player._facing = FACING_NORTHEAST;
+		_scene->setCamera(Common::Point(0, 312));
+		_scene->sceneScale(467, 95, 442, 78);
+		_currentFloor = 1;
+	} else if (_scene->_priorSceneId == 111) {
+		if (_globals[kLeaveAngelMusicOn]) {
+			_globals[kLeaveAngelMusicOn] = false;
+			sceneEntrySound();
+		}
+		_game._player._playerPos = Common::Point(4, 136);
+		_game._player._facing = FACING_EAST;
+		_game._player.walk(Common::Point(32, 138), FACING_EAST);
+		_game._player.setWalkTrigger(60);
+		_game._player._stepEnabled = false;
+		_scene->setCamera(Common::Point(0, 0));
+		_scene->sceneScale(155, 95, 130, 78);
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 3);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+		_currentFloor = 3;
+	} else if ((_scene->_priorSceneId == 110) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+		_game._player._playerPos = Common::Point(3, 292);
+		_game._player._facing = FACING_EAST;
+		_game._player.walk(Common::Point(31, 295), FACING_EAST);
+		_game._player.setWalkTrigger(65);
+		_game._player._stepEnabled = false;
+		_scene->setCamera(Common::Point(0, 156));
+		_scene->sceneScale(311, 95, 286, 78);
+		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 3);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
+		_currentFloor = 2;
+	} else if (_scene->_priorSceneId == RETURNING_FROM_LOADING) {
+		if (_currentFloor == 2) {
+			_scene->setCamera(Common::Point(0, 156));
+			_scene->sceneScale(311, 95, 286, 78);
+		} else if (_currentFloor == 3) {
+			_scene->setCamera(Common::Point(0, 0));
+			_scene->sceneScale(155, 95, 130, 78);
+		} else {
+			_scene->setCamera(Common::Point(0, 312));
+			_scene->sceneScale(467, 95, 442, 78);
+		}
+	}
+
+	sceneEntrySound();
+}
+
+void Scene109::step() {
+	if (_anim0ActvFl) {
+		if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 80)
+			_game.camPanTo(&_game._camY, 156);
+	}
+
+	if (_anim1ActvFl) {
+		if (_scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame() == 80)
+			_game.camPanTo(&_game._camY, 0);
+	}
+
+	if (_anim2ActvFl) {
+		if (_scene->_animation[_globals._animationIndexes[2]]->getCurrentFrame() == 7)
+			_game.camPanTo(&_game._camY, 312);
+	}
+
+	if (_anim3ActvFl) {
+		if (_scene->_animation[_globals._animationIndexes[3]]->getCurrentFrame() == 14)
+			_game.camPanTo(&_game._camY, 156);
+	}
+
+	switch (_game._trigger) {
+	case 60:
+		_scene->deleteSequence(_globals._sequenceIndexes[0]);
+		_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+		_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 3);
+		_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 61);
+		break;
+
+	case 61:
+		_vm->_sound->command(25);
+		_game._player._stepEnabled = true;
+		break;
+
+	default:
+		break;
+	}
+
+	switch (_game._trigger) {
+	case 65:
+		_scene->deleteSequence(_globals._sequenceIndexes[1]);
+		_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
+		_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 3);
+		_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 66);
+		break;
+
+	case 66:
+		_vm->_sound->command(25);
+		_game._player._stepEnabled = true;
+		break;
+
+	default:
+		break;
+	}
+
+	if (_game._trigger == 70) {
+		int rndFrame = _vm->getRandomNumber(1, 3);
+		int rndDelay = _vm->getRandomNumber(4, 7);
+		_scene->deleteSequence(_globals._sequenceIndexes[2]);
+		_scene->deleteSequence(_globals._sequenceIndexes[3]);
+		_scene->deleteSequence(_globals._sequenceIndexes[4]);
+
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, rndFrame);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+
+		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, rndFrame);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 14);
+
+		_globals._sequenceIndexes[4] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[4], false, rndFrame);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[4], 14);
+
+		_scene->_sequences.setTimingTrigger(rndDelay, 70);
+	}
+}
+
+void Scene109::actions() {
+	if (_action.isAction(VERB_WALK, NOUN_BACKSTAGE)) {
+		_scene->_nextSceneId = 106;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLIMB_UP, NOUN_STAIRCASE)) {
+		if (_currentFloor == 2) {
+			switch (_game._trigger) {
+			case 0:
+				_game._player.walk(Common::Point(58, 295), FACING_EAST);
+				_game._player.setWalkTrigger(1);
+				break;
+
+			case 1:
+				_anim1ActvFl = true;
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('w', 2), 2);
+				_game.syncTimers(3, _globals._animationIndexes[1], 2, 0);
+				break;
+
+			case 2:
+				_game.syncTimers(2, 0, 3, _globals._animationIndexes[1]);
+				_scene->sceneScale(155, 95, 130, 78);
+				_anim1ActvFl = false;
+				_game._player._visible = true;
+				_game._player._playerPos = Common::Point(261, 137);
+				_game._player.walk(Common::Point(281, 143), FACING_SOUTHWEST);
+				_game._player.setWalkTrigger(3);
+				break;
+
+			case 3:
+				_game._player._stepEnabled = true;
+				_currentFloor = 3;
+				break;
+
+			default:
+				break;
+			}
+		} else if (_currentFloor == 1) {
+			switch (_game._trigger) {
+			case 0:
+				_game._player.walk(Common::Point(58, 452), FACING_EAST);
+				_game._player.setWalkTrigger(1);
+				break;
+
+			case 1:
+				_anim0ActvFl = true;
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('w', 1), 2);
+				_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
+				break;
+
+			case 2:
+				_game.syncTimers(2, 0, 3, _globals._animationIndexes[0]);
+				_scene->sceneScale(311, 95, 286, 78);
+				_anim0ActvFl = false;
+				_game._player._visible = true;
+				_game._player._playerPos = Common::Point(264, 295);
+				_game._player.walk(Common::Point(289, 299), FACING_SOUTHWEST);
+				_game._player.setWalkTrigger(3);
+				break;
+
+			case 3:
+				_game._player._stepEnabled = true;
+				_currentFloor = 2;
+				break;
+
+			default:
+				break;
+			}
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLIMB_DOWN, NOUN_STAIRCASE)) {
+		if (_currentFloor == 2) {
+			switch (_game._trigger) {
+			case 0:
+				_game._player.walk(Common::Point(287, 291), FACING_WEST);
+				_game._player.setWalkTrigger(1);
+				break;
+
+			case 1:
+				_game._player.walk(Common::Point(269, 292), FACING_WEST);
+				_game._player.setWalkTrigger(2);
+				break;
+
+			case 2:
+				_anim2ActvFl = true;
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_globals._animationIndexes[2] = _scene->loadAnimation(formAnimName('w', 3), 3);
+				_game.syncTimers(3, _globals._animationIndexes[2], 2, 0);
+				break;
+
+			case 3:
+				_game.syncTimers(2, 0, 3, _globals._animationIndexes[2]);
+				_scene->sceneScale(467, 95, 442, 78);
+				_anim2ActvFl = false;
+				_game._player._visible = true;
+				_game._player._playerPos = Common::Point(61, 450);
+				_game._player.walk(Common::Point(36, 450), FACING_SOUTHEAST);
+				_game._player.setWalkTrigger(4);
+				break;
+
+			case 4:
+				_game._player._stepEnabled = true;
+				_currentFloor = 1;
+				break;
+
+			default:
+				break;
+			}
+		} else if (_currentFloor == 3) {
+			switch (_game._trigger) {
+			case 0:
+				_game._player.walk(Common::Point(287, 137), FACING_WEST);
+				_game._player.setWalkTrigger(1);
+				break;
+
+			case 1:
+				_game._player.walk(Common::Point(269, 138), FACING_WEST);
+				_game._player.setWalkTrigger(2);
+				break;
+
+			case 2:
+				_anim3ActvFl = true;
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_globals._animationIndexes[3] = _scene->loadAnimation(formAnimName('w', 4), 3);
+				_game.syncTimers(3, _globals._animationIndexes[3], 2, 0);
+				break;
+
+			case 3:
+				_game.syncTimers(2, 0, 3, _globals._animationIndexes[3]);
+				_scene->sceneScale(311, 95, 286, 78);
+				_anim3ActvFl = false;
+				_game._player._visible = true;
+				_game._player._playerPos = Common::Point(59, 296);
+				_game._player.walk(Common::Point(40, 294), FACING_SOUTHEAST);
+				_game._player.setWalkTrigger(4);
+				break;
+
+			case 4:
+				_game._player._stepEnabled = true;
+				_currentFloor = 2;
+				break;
+
+			default:
+				break;
+			}
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR) || _action.isAction(VERB_OPEN, NOUN_DOOR) || _game._trigger) {
+		switch (_game._trigger) {
+		case (0):
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;
+			_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], true, 5, 2);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[8], -1, -2);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 4, 75);
+			break;
+
+		case 2:
+			_game._player._visible = true;
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]);
+			if (_currentFloor == 3)
+				_game._player.walk(Common::Point(2, 131), FACING_WEST);
+			else if (_currentFloor == 2)
+				_game._player.walk(Common::Point(2, 281), FACING_WEST);
+
+			_scene->_sequences.setTimingTrigger(180, 3);
+			break;
+
+		case 3:
+			if (_currentFloor == 3)
+				_scene->_nextSceneId = 111;
+			else if (_currentFloor == 2)
+				_scene->_nextSceneId = 110;
+			break;
+
+		case 75:
+			_vm->_sound->command(24);
+			if (_currentFloor == 3) {
+				_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 3);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0],
+					0, 0, 76);
+			} else if (_currentFloor == 2) {
+				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 3);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1],
+					0, 0, 76);
+			}
+			break;
+
+		case 76:
+			if (_currentFloor == 3) {
+				int idx = _globals._sequenceIndexes[0];
+				_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 3);
+				_game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+			} else if (_currentFloor == 2) {
+				int idx = _globals._sequenceIndexes[1];
+				_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 3);
+				_game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
+			}
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action._lookFlag) {
+		_vm->_dialogs->show(10910);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isAction(NOUN_STAIRCASE)) {
+			if (_currentFloor == 1)
+				_vm->_dialogs->show(10911);
+			else if (_currentFloor == 2)
+				_vm->_dialogs->show(10921);
+			else if (_currentFloor == 3)
+				_vm->_dialogs->show(10922);
+
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_FLOOR)) {
+			_vm->_dialogs->show(10912);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_BACKSTAGE)) {
+			_vm->_dialogs->show(10913);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_DOOR)) {
+			_vm->_dialogs->show(10914);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_RAILING)) {
+			_vm->_dialogs->show(10915);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WALL)) {
+			_vm->_dialogs->show(10916);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LIGHT_FIXTURE)) {
+			_vm->_dialogs->show(10917);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LAMP)) {
+			_vm->_dialogs->show(10918);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_HOLE)) {
+			_vm->_dialogs->show(10919);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CEILING)) {
+			_vm->_dialogs->show(10920);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_LAMP)) {
+		_vm->_dialogs->show(10924);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_DOOR)) {
+		_vm->_dialogs->show(10923);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene109::preActions() {
+	if (_action.isAction(VERB_OPEN, NOUN_DOOR)) {
+		if (_currentFloor == 3)
+			_game._player.walk(Common::Point(32, 138), FACING_WEST);
+		else if (_currentFloor == 2)
+			_game._player.walk(Common::Point(31, 295), FACING_WEST);
+	}
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 99146ae..30e93df 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -257,6 +257,23 @@ public:
 	virtual void actions();
 };
 
+class Scene109 : public Scene1xx {
+private:
+	bool _anim0ActvFl;
+	bool _anim1ActvFl;
+	bool _anim2ActvFl;
+	bool _anim3ActvFl;
+	int _currentFloor;
+public:
+	Scene109(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
 } // End of namespace Phantom
 } // End of namespace MADS
 
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 5a8fbe6..d62e333 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -790,4 +790,8 @@ void Scene::loadSpeech(int idx) {
 void Scene::playSpeech(int idx) {
 	warning("TODO: Scene::playSpeech");
 }
+
+void Scene::sceneScale(int front_y, int front_scale, int back_y,  int back_scale) {
+	warning("TODO: Scene:scaleRoom");
+}
 } // End of namespace MADS
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index 653bdd1..9289593 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -264,6 +264,7 @@ public:
 	void deleteSequence(int idx);
 	void loadSpeech(int idx);
 	void playSpeech(int idx);
+	void sceneScale(int front_y, int front_scale, int back_y,  int back_scale);
 };
 
 } // End of namespace MADS


Commit: 1ce678fddbe4e893c9cf3dd467d8a77ffaeff42d
    https://github.com/scummvm/scummvm/commit/1ce678fddbe4e893c9cf3dd467d8a77ffaeff42d
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-19T14:31:31+02:00

Commit Message:
MADS: Phantom: Implement scene 110

Changed paths:
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 5c414d2..4b54a42 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -61,7 +61,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 109:	// upper floor, staircase
 		return new Scene109(vm);
 	case 110:	// outside dressing rooms 1
-		return new DummyScene(vm);	// TODO
+		return new Scene110(vm);
 	case 111:	// outside dressing rooms 2
 		return new DummyScene(vm);	// TODO
 	case 112:	// inside dressing room 1
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index cc84b6e..fb177b5 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -6114,5 +6114,354 @@ void Scene109::preActions() {
 
 /*------------------------------------------------------------------------*/
 
+Scene110::Scene110(MADSEngine *vm) : Scene1xx(vm) {
+}
+
+void Scene110::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+}
+
+void Scene110::setup() {
+	if (_globals[kCurrentYear] == 1993)
+		_scene->_initialVariant = 1;
+
+	setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene110::enter() {
+	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('x', 0), false);
+	_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('x', 1), false);
+	_globals._spriteIndexes[1] = _scene->_sprites.addSprites("*RDR_9", false);
+
+	if (_globals[kCurrentYear] == 1993) {
+		_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('z', -1), false);
+		_scene->drawToBackground(_globals._spriteIndexes[0], 1, Common::Point(-32000, -32000), 0, 100);
+		_scene->_hotspots.activate(NOUN_POSTER, false);
+		_scene->_hotspots.activate(NOUN_WASTE_BASKET, false);
+
+		if (_globals[kDoneBrieConv203] == 0) {
+			if (_globals[kJuliesDoor] == 0) {
+				_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 3);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 8);
+			}
+		} else {
+			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 8);
+		}
+	} else {
+		_scene->_hotspots.activate(NOUN_BULLETIN_BOARD, false);
+		_scene->_hotspots.activate(NOUN_PAPER, false);
+		_scene->_hotspots.activate(NOUN_TRASH_BUCKET, false);
+	}
+
+	if (_scene->_priorSceneId == 112) {
+		_game._player._playerPos = Common::Point(261, 121);
+		_game._player._facing = FACING_SOUTH;
+		_game._player.walk(Common::Point(221, 131), FACING_SOUTH);
+	} else if ((_scene->_priorSceneId == 109) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+		_game._player.firstWalk(Common::Point(335, 150), FACING_WEST, Common::Point(310, 150), FACING_WEST, true);
+	}
+
+	sceneEntrySound();
+}
+
+void Scene110::step() {
+}
+
+void Scene110::actions() {
+	if ((_action.isAction(VERB_WALK_THROUGH, NOUN_RIGHT_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) || _action.isAction(NOUN_LOCK, NOUN_RIGHT_DOOR))
+	 && (_globals[kDoneBrieConv203] == 0) && (_globals[kCurrentYear] == 1993) && (_globals[kJuliesDoor] == 0)) {
+		_scene->_nextSceneId = 112;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_LEFT_DOOR) || _action.isAction(VERB_OPEN, NOUN_LEFT_DOOR)
+	 || _action.isAction(VERB_UNLOCK, NOUN_LEFT_DOOR) || _action.isAction(NOUN_LOCK, NOUN_LEFT_DOOR)) {
+		switch (_game._trigger) {
+		case (0):
+			_game._player._stepEnabled  = false;
+			_game._player._visible = false;  
+			_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 1);
+			break;
+
+		case 1: {
+			int idx = _globals._sequenceIndexes[1];
+			_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 4);
+			_game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx); 
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], false);
+			_scene->_sequences.setTimingTrigger(30, 2);
+			_vm->_sound->command(73);
+			}
+			break; 
+
+		case 2:
+			_scene->deleteSequence(_globals._sequenceIndexes[1]);
+			_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], false);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 3);
+			break;
+
+		case 3:
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); 
+			_game._player._visible = true;
+			_game._player._stepEnabled = true;
+			if (_action.isAction(NOUN_LOCK) || _action.isAction(VERB_UNLOCK))
+				_vm->_dialogs->show(32);
+			else
+				_vm->_dialogs->show(11022);
+
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_RIGHT_DOOR) || _action.isAction(VERB_OPEN, NOUN_RIGHT_DOOR)
+	 || _action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) || _action.isAction(NOUN_LOCK, NOUN_RIGHT_DOOR)) {
+		if ((_globals[kCurrentYear] == 1881) || (_globals[kDoneBrieConv203] >= 1)
+		 && !_action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) && !_action.isAction(NOUN_LOCK, NOUN_RIGHT_DOOR)) {
+			switch (_game._trigger) {
+			case (0):
+				_game._player._stepEnabled  = false;
+				_game._player._visible = false;  
+				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 1);
+				break;
+
+			case 1: {
+				int idx = _globals._sequenceIndexes[1];
+				_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 4);
+				_game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx); 
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], false);
+				_scene->_sequences.setTimingTrigger(30, 2);
+				_vm->_sound->command(73);
+				}
+				break; 
+
+			case 2:
+				_scene->deleteSequence(_globals._sequenceIndexes[1]);
+				_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], false);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 3);
+				break;
+
+			case 3:
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); 
+				_game._player._visible = true;
+				_game._player._stepEnabled = true;
+				if (_action.isAction(NOUN_LOCK) || _action.isAction(VERB_UNLOCK))
+					_vm->_dialogs->show(32);
+				else
+					_vm->_dialogs->show(11023);
+				break;
+
+			default:
+				break;
+			}
+			_action._inProgress = false;
+			return;
+		} else if (_globals[kJuliesDoor] == 1) {
+			switch (_game._trigger) {
+			case (0):
+				_game._player._stepEnabled  = false;
+				_game._player._visible = false;  
+				_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 7, 2);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 4, 1);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 3);
+				break;
+
+			case 1:
+				_vm->_sound->command(24);
+				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 10, 1);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[2], -1, -2);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 2);
+				break; 
+
+			case 2:
+				_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 3);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
+				break;
+
+			case 3:
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); 
+				_game._player._visible = true;
+				_game._player.walk(Common::Point(261, 121), FACING_NORTHEAST);
+				_game._player.setWalkTrigger(4);
+				break;
+
+			case 4:
+				_scene->_nextSceneId = 112;
+				_globals[kJuliesDoor] = 0;
+				break;
+
+			default:
+				break;
+			}
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action._lookFlag) {
+		_vm->_dialogs->show(11010);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isAction(NOUN_FLOOR)) {
+			_vm->_dialogs->show(11011);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WALL)) {
+			_vm->_dialogs->show(11012);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CEILING)) {
+			_vm->_dialogs->show(11013);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STAIRWELL)) {
+			_vm->_dialogs->show(11014);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_RIGHT_DOOR)) {
+			if (_globals[kDoneBrieConv203] >= 1)
+				_vm->_dialogs->show(11016);
+			else if (_globals[kChrisFStatus] == 1)
+				_vm->_dialogs->show(11015);
+			else
+				_vm->_dialogs->show(11016);
+
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LEFT_DOOR)) {
+			_vm->_dialogs->show(11016);
+			_action._inProgress = false;
+			return;
+		}
+
+		if ((_action.isAction(NOUN_WASTE_BASKET)) || (_action.isAction(NOUN_TRASH_BUCKET))) {
+			_vm->_dialogs->show(11017);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_POSTER)) {
+			_vm->_dialogs->show(11018);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_BULLETIN_BOARD)) {
+			_vm->_dialogs->show(11019);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PAPER)) {
+			_vm->_dialogs->show(11029);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(VERB_TAKE, NOUN_WASTE_BASKET) || _action.isAction(VERB_TAKE, NOUN_TRASH_BUCKET)) {
+			_vm->_dialogs->show(11020);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LIGHT_FIXTURE)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(11021);
+			else
+				_vm->_dialogs->show(11028);
+
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_PAPER)) {
+		_vm->_dialogs->show(11030);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_RIGHT_DOOR)) {
+		if (_globals[kDoneBrieConv203] >= 1)
+			_vm->_dialogs->show(11026);
+		else if (_globals[kChrisFStatus] == 1)
+			_vm->_dialogs->show(11024);
+		else
+			_vm->_dialogs->show(11026);
+
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_LEFT_DOOR)) {
+		_vm->_dialogs->show(11025);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_RIGHT_DOOR)) {
+		if ((_globals[kChrisFStatus] == 1) && (_globals[kDoneBrieConv203] == 0))
+			_vm->_dialogs->show(11027);
+
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene110::preActions() {
+	if (_action.isAction(VERB_EXIT_TO, NOUN_STAIRWELL))
+		_game._player._walkOffScreenSceneId = 109;
+
+	if (_action.isAction(VERB_OPEN, NOUN_LEFT_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_LEFT_DOOR) || _action.isAction(NOUN_LOCK, NOUN_LEFT_DOOR))
+		_game._player.walk(Common::Point(111, 126), FACING_NORTHEAST);
+
+	if (_action.isAction(VERB_OPEN, NOUN_RIGHT_DOOR) || _action.isAction(VERB_WALK_THROUGH, NOUN_RIGHT_DOOR)
+	 || _action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) || _action.isAction(NOUN_LOCK, NOUN_RIGHT_DOOR)) {
+		if ((_globals[kCurrentYear] == 1881) || (_globals[kDoneBrieConv203] >= 1))
+			_game._player.walk(Common::Point(221, 131), FACING_NORTHEAST);
+		else if ((_globals[kJuliesDoor] == 1) || _action.isAction(VERB_OPEN))
+			_game._player.walk(Common::Point(223, 128), FACING_NORTHEAST);
+		else if (_globals[kJuliesDoor] == 0)
+			_game._player.walk(Common::Point(261, 120), FACING_NORTHEAST);
+	}
+
+	if (_action.isAction(VERB_LOOK, NOUN_PAPER))
+		_game._player._needToWalk = true;
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 30e93df..1a6a6d7 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -274,6 +274,18 @@ public:
 	virtual void preActions();
 	virtual void actions();
 };
+
+class Scene110 : public Scene1xx {
+public:
+	Scene110(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
 } // End of namespace Phantom
 } // End of namespace MADS
 


Commit: 8d7872272fefc2a55ad34bbb0f11415e5ed50f37
    https://github.com/scummvm/scummvm/commit/8d7872272fefc2a55ad34bbb0f11415e5ed50f37
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-19T14:34:02+02:00

Commit Message:
MADS: Phantom: Move "lock" to the list of verbs

Changed paths:
    engines/mads/phantom/phantom_scenes.h
    engines/mads/phantom/phantom_scenes1.cpp



diff --git a/engines/mads/phantom/phantom_scenes.h b/engines/mads/phantom/phantom_scenes.h
index c0a823a..c51c11e 100644
--- a/engines/mads/phantom/phantom_scenes.h
+++ b/engines/mads/phantom/phantom_scenes.h
@@ -51,6 +51,7 @@ enum Verb {
 	VERB_CLIMB_THROUGH = 0x23,
 	VERB_EXIT_TO = 0x37,
 	VERB_JUMP_INTO = 0x53,
+	VERB_LOCK = 0x5D,
 	VERB_LOOK_AT = 0x60,
 	VERB_LOOK_THROUGH = 0x61,
 	VERB_TURN_OFF = 0x95,
@@ -142,7 +143,6 @@ enum Noun {
 	NOUN_LEG = 0x5A,
 	NOUN_LETTER = 0x5B,
 	NOUN_LIGHT_FIXTURE = 0x5C,
-	NOUN_LOCK = 0x5D,
 	NOUN_LOCKING_RAIL = 0x5E,
 	NOUN_LOCKRAIL = 0x5F,
 	NOUN_MANNEQUINS = 0x62,
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index fb177b5..bd4edd9 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -1364,7 +1364,7 @@ void Scene103::preActions() {
 	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_PIT))
 		_game._player._walkOffScreenSceneId = 102;
 
-	if ((_action.isAction(VERB_OPEN, NOUN_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(NOUN_LOCK, NOUN_DOOR)) && (_standPosition == 0))
+	if ((_action.isAction(VERB_OPEN, NOUN_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(VERB_LOCK, NOUN_DOOR)) && (_standPosition == 0))
 		_game._player.walk(Common::Point(252, 134), FACING_EAST);
 }
 
@@ -1589,8 +1589,8 @@ void Scene103::actions() {
 		return;
 	}
 
-	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR) || _action.isAction(VERB_OPEN, NOUN_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(NOUN_LOCK, NOUN_DOOR)) {
-		if ((_globals[kCurrentYear] == 1881) && !_action.isAction(NOUN_LOCK, NOUN_DOOR) && !_action.isAction(VERB_UNLOCK, NOUN_DOOR)) {
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR) || _action.isAction(VERB_OPEN, NOUN_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(VERB_LOCK, NOUN_DOOR)) {
+		if ((_globals[kCurrentYear] == 1881) && !_action.isAction(VERB_LOCK, NOUN_DOOR) && !_action.isAction(VERB_UNLOCK, NOUN_DOOR)) {
 			switch (_game._trigger) {
 			case (0):
 				_game._player._stepEnabled = false;
@@ -1666,7 +1666,7 @@ void Scene103::actions() {
 			case 3:
 				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[2]);
 				_game._player._visible = true;
-				if (_action.isAction(NOUN_LOCK) || _action.isAction(VERB_UNLOCK))
+				if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK))
 					_vm->_dialogs->show(00032);
 				else
 					_vm->_dialogs->show(10335);
@@ -3903,8 +3903,8 @@ void Scene105::actions() {
 	}
 
 	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR) || _action.isAction(VERB_OPEN, NOUN_DOOR) || (_game._trigger) ||
-		_action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(NOUN_LOCK, NOUN_DOOR)) {
-		if ((_globals[kCurrentYear] == 1881) && !_action.isAction(VERB_UNLOCK) && !_action.isAction(NOUN_LOCK)){
+		_action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(VERB_LOCK, NOUN_DOOR)) {
+		if ((_globals[kCurrentYear] == 1881) && !_action.isAction(VERB_UNLOCK) && !_action.isAction(VERB_LOCK)){
 			switch (_game._trigger) {
 			case (0):
 				_game._player._stepEnabled = false;
@@ -3979,7 +3979,7 @@ void Scene105::actions() {
 			case 3:
 				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[6]);
 				_game._player._visible = true;
-				if (_action.isAction(NOUN_LOCK) || _action.isAction(VERB_UNLOCK))
+				if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK))
 					_vm->_dialogs->show(32);
 				else
 					_vm->_dialogs->show(10536);
@@ -4166,7 +4166,7 @@ void Scene105::preActions() {
 	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_PIT))
 		_game._player._walkOffScreenSceneId = 102;
 
-	if (_action.isAction(VERB_OPEN, NOUN_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(NOUN_LOCK, NOUN_DOOR))
+	if (_action.isAction(VERB_OPEN, NOUN_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_DOOR) || _action.isAction(VERB_LOCK, NOUN_DOOR))
 		_game._player.walk(Common::Point(33, 128), FACING_NORTHWEST);
 }
 
@@ -6170,7 +6170,7 @@ void Scene110::step() {
 }
 
 void Scene110::actions() {
-	if ((_action.isAction(VERB_WALK_THROUGH, NOUN_RIGHT_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) || _action.isAction(NOUN_LOCK, NOUN_RIGHT_DOOR))
+	if ((_action.isAction(VERB_WALK_THROUGH, NOUN_RIGHT_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) || _action.isAction(VERB_LOCK, NOUN_RIGHT_DOOR))
 	 && (_globals[kDoneBrieConv203] == 0) && (_globals[kCurrentYear] == 1993) && (_globals[kJuliesDoor] == 0)) {
 		_scene->_nextSceneId = 112;
 		_action._inProgress = false;
@@ -6178,7 +6178,7 @@ void Scene110::actions() {
 	}
 
 	if (_action.isAction(VERB_WALK_THROUGH, NOUN_LEFT_DOOR) || _action.isAction(VERB_OPEN, NOUN_LEFT_DOOR)
-	 || _action.isAction(VERB_UNLOCK, NOUN_LEFT_DOOR) || _action.isAction(NOUN_LOCK, NOUN_LEFT_DOOR)) {
+	 || _action.isAction(VERB_UNLOCK, NOUN_LEFT_DOOR) || _action.isAction(VERB_LOCK, NOUN_LEFT_DOOR)) {
 		switch (_game._trigger) {
 		case (0):
 			_game._player._stepEnabled  = false;
@@ -6211,7 +6211,7 @@ void Scene110::actions() {
 			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); 
 			_game._player._visible = true;
 			_game._player._stepEnabled = true;
-			if (_action.isAction(NOUN_LOCK) || _action.isAction(VERB_UNLOCK))
+			if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK))
 				_vm->_dialogs->show(32);
 			else
 				_vm->_dialogs->show(11022);
@@ -6226,9 +6226,9 @@ void Scene110::actions() {
 	}
 
 	if (_action.isAction(VERB_WALK_THROUGH, NOUN_RIGHT_DOOR) || _action.isAction(VERB_OPEN, NOUN_RIGHT_DOOR)
-	 || _action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) || _action.isAction(NOUN_LOCK, NOUN_RIGHT_DOOR)) {
+	 || _action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) || _action.isAction(VERB_LOCK, NOUN_RIGHT_DOOR)) {
 		if ((_globals[kCurrentYear] == 1881) || (_globals[kDoneBrieConv203] >= 1)
-		 && !_action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) && !_action.isAction(NOUN_LOCK, NOUN_RIGHT_DOOR)) {
+		 && !_action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) && !_action.isAction(VERB_LOCK, NOUN_RIGHT_DOOR)) {
 			switch (_game._trigger) {
 			case (0):
 				_game._player._stepEnabled  = false;
@@ -6261,7 +6261,7 @@ void Scene110::actions() {
 				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); 
 				_game._player._visible = true;
 				_game._player._stepEnabled = true;
-				if (_action.isAction(NOUN_LOCK) || _action.isAction(VERB_UNLOCK))
+				if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK))
 					_vm->_dialogs->show(32);
 				else
 					_vm->_dialogs->show(11023);
@@ -6444,11 +6444,11 @@ void Scene110::preActions() {
 	if (_action.isAction(VERB_EXIT_TO, NOUN_STAIRWELL))
 		_game._player._walkOffScreenSceneId = 109;
 
-	if (_action.isAction(VERB_OPEN, NOUN_LEFT_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_LEFT_DOOR) || _action.isAction(NOUN_LOCK, NOUN_LEFT_DOOR))
+	if (_action.isAction(VERB_OPEN, NOUN_LEFT_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_LEFT_DOOR) || _action.isAction(VERB_LOCK, NOUN_LEFT_DOOR))
 		_game._player.walk(Common::Point(111, 126), FACING_NORTHEAST);
 
 	if (_action.isAction(VERB_OPEN, NOUN_RIGHT_DOOR) || _action.isAction(VERB_WALK_THROUGH, NOUN_RIGHT_DOOR)
-	 || _action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) || _action.isAction(NOUN_LOCK, NOUN_RIGHT_DOOR)) {
+	 || _action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) || _action.isAction(VERB_LOCK, NOUN_RIGHT_DOOR)) {
 		if ((_globals[kCurrentYear] == 1881) || (_globals[kDoneBrieConv203] >= 1))
 			_game._player.walk(Common::Point(221, 131), FACING_NORTHEAST);
 		else if ((_globals[kJuliesDoor] == 1) || _action.isAction(VERB_OPEN))


Commit: 808ef0633979b0044ef047127ddfbfa366f7733d
    https://github.com/scummvm/scummvm/commit/808ef0633979b0044ef047127ddfbfa366f7733d
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-19T21:32:27+02:00

Commit Message:
MADS: Phantom: Implement scene 111. Remove dead 'breaks'.

Changed paths:
    engines/mads/phantom/game_phantom.cpp
    engines/mads/phantom/game_phantom.h
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/phantom/game_phantom.cpp b/engines/mads/phantom/game_phantom.cpp
index 592a108..d1e6041 100644
--- a/engines/mads/phantom/game_phantom.cpp
+++ b/engines/mads/phantom/game_phantom.cpp
@@ -39,6 +39,7 @@ GamePhantom::GamePhantom(MADSEngine *vm)
 	: Game(vm) {
 	_surface = new MSurface(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
 	_storyMode = STORYMODE_NAUGHTY;
+	_difficulty = DIFFICULTY_HARD;
 }
 
 void GamePhantom::startGame() {
diff --git a/engines/mads/phantom/game_phantom.h b/engines/mads/phantom/game_phantom.h
index 44b2321..8020d3e 100644
--- a/engines/mads/phantom/game_phantom.h
+++ b/engines/mads/phantom/game_phantom.h
@@ -35,6 +35,10 @@ namespace Phantom {
 // TODO: Adapt for Phantom's difficulty setting
 enum StoryMode { STORYMODE_NAUGHTY = 1, STORYMODE_NICE = 2 };
 
+enum Difficulty {
+	DIFFICULTY_HARD = 1, DIFFICULTY_MEDIUM = 2, DIFFICULTY_EASY = 3
+};
+
 enum InventoryObject {
 	OBJ_NONE = -1,
 	OBJ_KEY = 0,
@@ -79,6 +83,8 @@ protected:
 public:
 	PhantomGlobals _globals;
 	StoryMode _storyMode;
+	Difficulty _difficulty;
+
 
 	virtual Globals &globals() { return _globals; }
 
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 4b54a42..8dd3dc6 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -63,7 +63,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 110:	// outside dressing rooms 1
 		return new Scene110(vm);
 	case 111:	// outside dressing rooms 2
-		return new DummyScene(vm);	// TODO
+		return new Scene111(vm);
 	case 112:	// inside dressing room 1
 		return new DummyScene(vm);	// TODO
 	case 113:	// inside dressing room 2
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index bd4edd9..d0c725b 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -1694,7 +1694,6 @@ void Scene103::actions() {
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
 			_action._inProgress = false;
 			return;
-			break;
 
 		case 1:
 			_scene->deleteSequence(_globals._sequenceIndexes[5]);
@@ -1703,7 +1702,6 @@ void Scene103::actions() {
 			_vm->_sound->command(26);
 			_action._inProgress = false;
 			return;
-			break;
 
 		case 2:
 			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]);
@@ -1711,7 +1709,6 @@ void Scene103::actions() {
 			_scene->_sequences.setTimingTrigger(20, 3);
 			_action._inProgress = false;
 			return;
-			break;
 
 		case 3:
 			_globals[kPlayerScore] += 5;
@@ -1719,7 +1716,6 @@ void Scene103::actions() {
 			_game._player._stepEnabled = true;
 			_action._inProgress = false;
 			return;
-			break;
 
 		default:
 			break;
@@ -4416,13 +4412,11 @@ void Scene106::actions() {
 		_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
 		_action._inProgress = false;
 		return;
-		break;
 
 	case 76:
 		_scene->_nextSceneId = 105;
 		_action._inProgress = false;
 		return;
-		break;
 
 	case 80:
 		_game._player._stepEnabled = false;
@@ -4431,19 +4425,16 @@ void Scene106::actions() {
 		_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
 		_action._inProgress = false;
 		return;
-		break;
 
 	case 81:
 		_scene->_sequences.setTimingTrigger(120, 82);
 		_action._inProgress = false;
 		return;
-		break;
 
 	case 82:
 		_scene->_nextSceneId = 301;
 		_action._inProgress = false;
 		return;
-		break;
 
 	default:
 		break;
@@ -6463,5 +6454,549 @@ void Scene110::preActions() {
 
 /*------------------------------------------------------------------------*/
 
+Scene111::Scene111(MADSEngine *vm) : Scene1xx(vm) {
+	_removeAxe = false;
+	_anim0ActvFl = false;
+	_anim1ActvFl = false;
+	_closedFl = false;
+	_listenFrame = -1;
+	_listenStatus = -1;
+
+}
+
+void Scene111::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+	s.syncAsByte(_removeAxe);
+	s.syncAsByte(_anim0ActvFl);
+	s.syncAsByte(_anim1ActvFl);
+	s.syncAsByte(_closedFl);
+	s.syncAsSint16LE(_listenFrame);
+	s.syncAsSint16LE(_listenStatus);
+}
+
+void Scene111::setup() {
+	if (_globals[kCurrentYear] == 1993)
+		_scene->_initialVariant = 1;
+
+	setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene111::enter() {
+	_scene->_hotspots.activate(NOUN_HOOK, false);
+
+	_removeAxe = false;
+	_anim0ActvFl = false;
+	_anim1ActvFl = false;
+	_closedFl = true;
+
+	if (_globals[kCurrentYear] == 1881) {
+		if ((_globals[kJacquesNameIsKnown] == 2) && (_globals[kMadameNameIsKnown] == 2) && (_globals[kPanelIn206]) &&
+			(_globals[kDoneRichConv203]) && (_game._objects.isInInventory(OBJ_LANTERN)) &&
+			((_game._objects.isInInventory(OBJ_CABLE_HOOK) && _game._objects.isInInventory(OBJ_ROPE)) || _game._objects.isInInventory(OBJ_ROPE_WITH_HOOK))) {
+				_closedFl = false;
+		} else
+			_closedFl = true;
+	} else
+		_closedFl = false;
+
+	if (_globals[kJacquesStatus]) {
+		_scene->_hotspots.activate(NOUN_HOOK, true);
+		_scene->_hotspots.activate(NOUN_FIRE_AXE, false);
+	}
+
+	_vm->_gameConv->get(14);
+
+	_globals._spriteIndexes[0] = _scene->_sprites.addSprites("*RDR_9", false);
+	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('a', 1), false);
+	_globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('a', 3), false);
+	_globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('x', 0), false);
+
+	if (_globals[kCurrentYear] == 1881)
+		_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('a', 2), false);
+
+	if (_globals[kCurrentYear] == 1993) {
+		_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('z', -1), false);
+		_scene->drawToBackground(_globals._spriteIndexes[1], 1, Common::Point(-32000, -32000), 0, 100);
+		_scene->_hotspots.activate(NOUN_LAMP, false);
+		int idx = _scene->_dynamicHotspots.add(NOUN_WALL, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(35, 82, 35 + 13, 82 + 11));
+		_scene->_dynamicHotspots.setPosition(idx, Common::Point(78, 122), FACING_NORTHEAST);
+	} else {
+		_scene->_hotspots.activate(NOUN_LIGHT, false);
+		if (_globals[kChristineDoorStatus] == 2) {
+			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 10);
+			_scene->drawToBackground(_globals._spriteIndexes[4], 1, Common::Point(-32000, -32000), 0, 100);
+			_scene->_hotspots.activate(NOUN_FIRE_AXE, false);
+			_scene->_hotspots.activate(NOUN_DOOR_CHUNKS, true);
+			_scene->_hotspots.activate(NOUN_HANDLE, true);
+			_scene->_hotspots.activate(NOUN_AXE, true);
+		}
+	}  
+
+	if ((_globals[kChristineDoorStatus] == 0) && (_scene->_priorSceneId != 113) && !_closedFl) {
+		_globals._sequenceIndexes[5] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[5], false, 3);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 14);
+	}
+
+	if ((_globals[kCurrentYear] == 1993) || (_globals[kChristineDoorStatus] <= 1)) {
+		if (!_globals[kJacquesStatus]) {
+			_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 5);
+			_scene->_hotspots.activate(NOUN_AXE, false);
+		}
+		_scene->_hotspots.activate(NOUN_DOOR_CHUNKS, false);
+		_scene->_hotspots.activate(NOUN_HANDLE, false);
+	}
+
+	if (_scene->_priorSceneId == 113) {
+		_game._player._playerPos = Common::Point(146, 108);
+		_game._player.walk(Common::Point(112, 126), FACING_SOUTH);
+
+		if (!_globals[kLeaveAngelMusicOn])
+			sceneEntrySound();
+
+		if (_globals[kChristineDoorStatus] != 2) {
+			_globals._sequenceIndexes[5] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[5], false, 3);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 14);
+
+			if ((_globals[kCurrentYear] == 1881) && (_globals[kLeaveAngelMusicOn])) {
+				_game._player.setWalkTrigger(60);
+				_game._player._stepEnabled = false;
+				_globals[kChristineDoorStatus] = 1;
+				_globals[kChrisKickedRaoulOut] = true;
+				_globals[kHintThatDaaeIsHome1] = true;
+				_globals[kHintThatDaaeIsHome2] = true;
+			}
+		}
+	} else if ((_scene->_priorSceneId == 109) || (_scene->_priorSceneId != RETURNING_FROM_LOADING))
+		_game._player.firstWalk(Common::Point(335, 150), FACING_WEST, Common::Point(311, 150), FACING_WEST, true);
+
+	sceneEntrySound();
+}
+
+void Scene111::step() {
+	if (_anim0ActvFl)
+		handleListenAnimation ();
+
+	if (!_removeAxe && _anim1ActvFl && (_scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame() == 5)) {
+		_scene->deleteSequence(_globals._sequenceIndexes[2]);
+		_game._objects.addToInventory(OBJ_FIRE_AXE);
+		_removeAxe = true;
+	}  
+
+	if (_game._objects.isInInventory(OBJ_FIRE_AXE) && _anim1ActvFl && (_scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame() == 36))
+		_game._objects.setRoom(OBJ_FIRE_AXE, NOWHERE);
+
+	if (_game._player._playerPos == Common::Point(145, 108))
+		_scene->_nextSceneId = 113;
+
+	switch (_game._trigger) {
+	case 60:
+		_scene->deleteSequence(_globals._sequenceIndexes[5]);
+		_globals._sequenceIndexes[5] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[5], false, 7, 1);
+		_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 62);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 14);
+		_scene->_sequences.setRange(_globals._sequenceIndexes[5], -1, -2);
+		break;
+
+	case 62:
+		_vm->_sound->command(25);
+		_game._player._stepEnabled = true;
+		_vm->_gameConv->run(14);
+		if (_game._difficulty == DIFFICULTY_EASY)
+			_vm->_gameConv->exportValue(1);
+		else
+			_vm->_gameConv->exportValue(0);
+
+		_game._player.walk(Common::Point(119, 124), FACING_EAST);
+		_game._player.setWalkTrigger(64);
+		break;
+
+	case 64:
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('l', 1), 70);
+		_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
+		_anim0ActvFl = true;
+		_listenStatus = 0;
+		_game._player._visible = false;
+		break;
+
+	case 70:
+		_game._player._visible = true;
+		_anim0ActvFl = false;
+		_game.syncTimers(2, 0, 3, _globals._animationIndexes[0]);
+		_scene->_sequences.setTimingTrigger(30, 71);
+		break;
+
+	case 71:
+		_vm->_gameConv->release();
+		break;
+
+	default:
+		break;
+	}
+}
+
+void Scene111::actions() {
+	if (_vm->_gameConv->_running == 14) {
+		handleListenConversation();
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_RIGHT_DOOR) || _action.isAction(VERB_OPEN, NOUN_RIGHT_DOOR) || _action.isAction(VERB_UNLOCK) || _action.isAction(VERB_LOCK)) {
+		switch (_game._trigger) {
+		case (0):
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;  
+			_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 4);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 1);
+			_action._inProgress = false;
+			return;
+
+		case 1: {
+			int idx = _globals._sequenceIndexes[0];
+			_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 4);
+			_game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx); 
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false);
+			_scene->_sequences.setTimingTrigger(30, 2);
+			_vm->_sound->command(73);
+			_action._inProgress = false;
+			return;
+			}
+
+		case 2:
+			_scene->deleteSequence(_globals._sequenceIndexes[0]);
+			_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 4);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 3);
+			_action._inProgress = false;
+			return;
+
+		case 3:
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); 
+			_game._player._visible = true;
+			if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK))
+				_vm->_dialogs->show(32);
+			else
+				_vm->_dialogs->show(11123);
+
+			_game._player._stepEnabled = true;
+			_action._inProgress = false;
+			return;
+
+		default:
+			break;
+		}
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_LEFT_DOOR) || _action.isAction(VERB_OPEN, NOUN_LEFT_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_LEFT_DOOR) || _action.isAction(VERB_LOCK, NOUN_LEFT_DOOR)) {
+		if ((_globals[kChristineDoorStatus] == 1) || _closedFl || _action.isAction(VERB_UNLOCK, NOUN_LEFT_DOOR) || _action.isAction(VERB_LOCK, NOUN_LEFT_DOOR)) {
+			switch (_game._trigger) {
+			case (0):
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;  
+				_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 4);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 1);
+				_action._inProgress = false;
+				return;
+
+			case 1: {
+				int idx = _globals._sequenceIndexes[0];
+				_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 4);
+				_game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx); 
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false);
+				_scene->_sequences.setTimingTrigger(30, 2);
+				_vm->_sound->command(73);
+				_action._inProgress = false;
+				return;
+				}
+
+			case 2:
+				_scene->deleteSequence(_globals._sequenceIndexes[0]);
+				_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
+				_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 4);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 3);
+				_action._inProgress = false;
+				return;
+
+			case 3:
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); 
+				_game._player._visible = true;
+
+				if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK))
+					_vm->_dialogs->show(32);
+				else if ((_globals[kChrisKickedRaoulOut]) && (_globals[kTicketPeoplePresent] == 1) && (_globals[kJacquesStatus] == 0))
+					_vm->_dialogs->show(11135);
+				else
+					_vm->_dialogs->show(11124);
+
+				_game._player._stepEnabled = true;
+				_action._inProgress = false;
+				return;
+
+			default:
+				break;
+			}
+		} else if (_globals[kChristineDoorStatus] == 2) {
+			_vm->_dialogs->show(11137);
+			_action._inProgress = false;
+			return;
+		} else {
+			_vm->_dialogs->show(11126);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_FIRE_AXE)) {
+		if ((_globals[kCurrentYear] == 1881) && (_globals[kJacquesStatus] == 0) && (_globals[kChristineDoorStatus] == 1) && (_globals[kChrisKickedRaoulOut])) {
+			switch (_game._trigger) {
+			case 0:
+				_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('q', -1), 1);
+				_scene->_hotspots.activate(NOUN_FIRE_AXE, false);
+				_scene->_hotspots.activate(NOUN_DOOR_CHUNKS, true);
+				_scene->_hotspots.activate(NOUN_HANDLE, true);
+				_scene->_hotspots.activate(NOUN_AXE, true);
+				_anim1ActvFl = true;
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				break;
+
+			case 1:
+				_globals[kChristineDoorStatus] = 2;
+				_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
+				_game.syncTimers(1, _globals._sequenceIndexes[3], 3, _globals._animationIndexes[1]); 
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 10);
+				_scene->drawToBackground(_globals._spriteIndexes[4], 1, Common::Point(-32000, -32000), 0, 100);
+				_game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); 
+				_game._player._visible = true;
+				_game._player._playerPos = Common::Point(126, 126);
+				_anim1ActvFl = false;
+				_game._player.walk(Common::Point(145, 108), FACING_NORTHEAST);
+				_game._player.resetFacing(FACING_NORTHWEST);
+				break;
+
+			default:
+				break;
+			}
+		} else if (_globals[kCurrentYear] == 1993 && _globals[kMakeBrieLeave203])
+			_vm->_dialogs->show(11142);
+		else
+			_vm->_dialogs->show(11134);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action._lookFlag) {
+		if (_globals[kCurrentYear] == 1993)
+			_vm->_dialogs->show(11110);
+		else
+			_vm->_dialogs->show(11111);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isAction(NOUN_FLOOR)) {
+			_vm->_dialogs->show(11112);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WALL)) {
+			_vm->_dialogs->show(11113);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CEILING)) {
+			_vm->_dialogs->show(11114);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_STAIRWELL)) {
+			_vm->_dialogs->show(11115);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_TABLE)) {
+			_vm->_dialogs->show(11118);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PLANT)) {
+			_vm->_dialogs->show(11119);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_FIRE_AXE)) {
+			_vm->_dialogs->show(11120);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_HANDLE)) {
+			_vm->_dialogs->show(11121);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_AXE)) {
+			_vm->_dialogs->show(11122);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_DOOR_CHUNKS)) {
+			_vm->_dialogs->show(11129);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LIGHT)) {
+			_vm->_dialogs->show(11131);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LAMP)) {
+			_vm->_dialogs->show(11132);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_HOOK)) {
+			_vm->_dialogs->show(11141);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LEFT_DOOR)) {
+			if (_globals[kJacquesStatus])
+				_vm->_dialogs->show(11140);
+			else if (_globals[kChristineDoorStatus] == 2)
+				_vm->_dialogs->show(11130);
+			else if ((_globals[kChrisKickedRaoulOut]) && (_globals[kTicketPeoplePresent] == 1))
+				_vm->_dialogs->show(11136);
+			else if ((_globals[kChristineDoorStatus] == 1) || _closedFl)
+				_vm->_dialogs->show(11117);
+			else if (_globals[kChristineDoorStatus] == 0)
+				_vm->_dialogs->show(11116);
+			_action._inProgress = false;
+			return;
+		}  
+
+		if (_action.isAction(NOUN_RIGHT_DOOR)) {
+			_vm->_dialogs->show(11117);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_RIGHT_DOOR)) {
+		_vm->_dialogs->show(11128);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_LEFT_DOOR)) {
+		if (_closedFl)
+			_vm->_dialogs->show(11128);
+		else if ((_globals[kChristineDoorStatus] == 2) && (!_globals[kTicketPeoplePresent]))
+			_vm->_dialogs->show(11138);
+		else if (_globals[kChristineDoorStatus] == 1)
+			_vm->_dialogs->show(11127);
+		else if (_globals[kChristineDoorStatus] == 0)
+			_vm->_dialogs->show(11125);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_LEFT_DOOR)) {
+		if (_globals[kChristineDoorStatus] == 0)
+			_vm->_dialogs->show(11126);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene111::preActions() {
+	if (_action.isAction(VERB_EXIT_TO, NOUN_STAIRWELL)) {
+		if (_globals[kLeaveAngelMusicOn]) {
+			_vm->_dialogs->show(11139);
+			_game._player._needToWalk = false;
+			_game._player.cancelCommand();
+		} else
+			_game._player._walkOffScreenSceneId = 109;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_FIRE_AXE) && _game._objects.isInRoom(OBJ_FIRE_AXE) && (_globals[kCurrentYear] == 1881)
+	 && (_globals[kChristineDoorStatus] == 1) && (_globals[kChrisKickedRaoulOut]) && (_globals[kJacquesStatus] == 0))
+		_game._player.walk(Common::Point(119, 124), FACING_EAST);
+
+	if (_action.isAction(VERB_OPEN, NOUN_RIGHT_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) || _action.isAction(VERB_LOCK, NOUN_RIGHT_DOOR))
+		_game._player.walk(Common::Point(219, 131), FACING_NORTHEAST);
+
+	if (_action.isAction(VERB_OPEN, NOUN_LEFT_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_LEFT_DOOR) || _action.isAction(VERB_LOCK, NOUN_LEFT_DOOR))
+		_game._player.walk(Common::Point(109, 124), FACING_NORTHEAST);
+
+	if ((_action.isAction(VERB_WALK_THROUGH, NOUN_LEFT_DOOR) || _action.isAction(VERB_UNLOCK, NOUN_LEFT_DOOR) || _action.isAction(VERB_LOCK, NOUN_LEFT_DOOR))
+	 && !_closedFl && ((_globals[kChristineDoorStatus] == 2) || (_globals[kChristineDoorStatus] == 0)))
+		_game._player.walk(Common::Point(145, 108), FACING_NORTHEAST);
+}
+
+void Scene111::handleListenAnimation() {
+	if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == _listenFrame)
+		return;
+
+	int nextFrame  = -1;
+	_listenFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
+
+	if (_listenFrame == 6) {
+		if (_listenStatus == 0)
+			nextFrame = 5;
+		else if (_listenStatus == 1)
+			nextFrame = 7;
+	}
+
+	if (nextFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[0], nextFrame);
+		_listenFrame = nextFrame;
+	}
+}
+
+void Scene111::handleListenConversation() {
+	if (_action._activeAction._verbId == 1)
+		_vm->_gameConv->setInterlocutorTrigger(66);
+
+	if (_action._activeAction._verbId == 7)
+		_vm->_gameConv->setInterlocutorTrigger(68);
+
+	if (_game._trigger == 66)
+		_listenStatus = 0;
+
+	if (_game._trigger == 68) {
+		_listenStatus = 1;
+		_vm->_gameConv->hold();
+	}
+
+	if ((_action._activeAction._verbId != 1) && (_action._activeAction._verbId != 7))
+		_vm->_gameConv->setInterlocutorTrigger(72);
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 1a6a6d7..b5fb417 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -286,6 +286,29 @@ public:
 	virtual void preActions();
 	virtual void actions();
 };
+
+class Scene111 : public Scene1xx {
+private:
+	bool _removeAxe;
+	bool _anim0ActvFl;
+	bool _anim1ActvFl;
+	bool _closedFl;
+	int _listenFrame;
+	int _listenStatus;
+
+	void handleListenAnimation();
+	void handleListenConversation();
+
+public:
+	Scene111(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
 } // End of namespace Phantom
 } // End of namespace MADS
 


Commit: 340016f423f8f8982a70496d9b00aea244d18ce8
    https://github.com/scummvm/scummvm/commit/340016f423f8f8982a70496d9b00aea244d18ce8
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-20T01:04:59+02:00

Commit Message:
MADS: Phantom: Implement scene 112

Changed paths:
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 8dd3dc6..29f2223 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -65,7 +65,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 111:	// outside dressing rooms 2
 		return new Scene111(vm);
 	case 112:	// inside dressing room 1
-		return new DummyScene(vm);	// TODO
+		return new Scene112(vm);
 	case 113:	// inside dressing room 2
 		return new DummyScene(vm);	// TODO
 	case 114:	// lower floor, storage room
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index d0c725b..8832942 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -6172,8 +6172,8 @@ void Scene110::actions() {
 	 || _action.isAction(VERB_UNLOCK, NOUN_LEFT_DOOR) || _action.isAction(VERB_LOCK, NOUN_LEFT_DOOR)) {
 		switch (_game._trigger) {
 		case (0):
-			_game._player._stepEnabled  = false;
-			_game._player._visible = false;  
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;
 			_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
 			_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
@@ -6183,12 +6183,12 @@ void Scene110::actions() {
 		case 1: {
 			int idx = _globals._sequenceIndexes[1];
 			_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 4);
-			_game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx); 
+			_game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], false);
 			_scene->_sequences.setTimingTrigger(30, 2);
 			_vm->_sound->command(73);
 			}
-			break; 
+			break;
 
 		case 2:
 			_scene->deleteSequence(_globals._sequenceIndexes[1]);
@@ -6199,7 +6199,7 @@ void Scene110::actions() {
 			break;
 
 		case 3:
-			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); 
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]);
 			_game._player._visible = true;
 			_game._player._stepEnabled = true;
 			if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK))
@@ -6222,8 +6222,8 @@ void Scene110::actions() {
 		 && !_action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) && !_action.isAction(VERB_LOCK, NOUN_RIGHT_DOOR)) {
 			switch (_game._trigger) {
 			case (0):
-				_game._player._stepEnabled  = false;
-				_game._player._visible = false;  
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
 				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
@@ -6233,12 +6233,12 @@ void Scene110::actions() {
 			case 1: {
 				int idx = _globals._sequenceIndexes[1];
 				_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 4);
-				_game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx); 
+				_game.syncTimers(1, _globals._sequenceIndexes[1], 1, idx);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], false);
 				_scene->_sequences.setTimingTrigger(30, 2);
 				_vm->_sound->command(73);
 				}
-				break; 
+				break;
 
 			case 2:
 				_scene->deleteSequence(_globals._sequenceIndexes[1]);
@@ -6249,7 +6249,7 @@ void Scene110::actions() {
 				break;
 
 			case 3:
-				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); 
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]);
 				_game._player._visible = true;
 				_game._player._stepEnabled = true;
 				if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK))
@@ -6266,8 +6266,8 @@ void Scene110::actions() {
 		} else if (_globals[kJuliesDoor] == 1) {
 			switch (_game._trigger) {
 			case (0):
-				_game._player._stepEnabled  = false;
-				_game._player._visible = false;  
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
 				_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 7, 2);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
@@ -6281,7 +6281,7 @@ void Scene110::actions() {
 				_scene->_sequences.setRange(_globals._sequenceIndexes[2], -1, -2);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 2);
-				break; 
+				break;
 
 			case 2:
 				_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 3);
@@ -6289,7 +6289,7 @@ void Scene110::actions() {
 				break;
 
 			case 3:
-				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); 
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]);
 				_game._player._visible = true;
 				_game._player.walk(Common::Point(261, 121), FACING_NORTHEAST);
 				_game._player.setWalkTrigger(4);
@@ -6533,7 +6533,7 @@ void Scene111::enter() {
 			_scene->_hotspots.activate(NOUN_HANDLE, true);
 			_scene->_hotspots.activate(NOUN_AXE, true);
 		}
-	}  
+	}
 
 	if ((_globals[kChristineDoorStatus] == 0) && (_scene->_priorSceneId != 113) && !_closedFl) {
 		_globals._sequenceIndexes[5] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[5], false, 3);
@@ -6584,7 +6584,7 @@ void Scene111::step() {
 		_scene->deleteSequence(_globals._sequenceIndexes[2]);
 		_game._objects.addToInventory(OBJ_FIRE_AXE);
 		_removeAxe = true;
-	}  
+	}
 
 	if (_game._objects.isInInventory(OBJ_FIRE_AXE) && _anim1ActvFl && (_scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame() == 36))
 		_game._objects.setRoom(OBJ_FIRE_AXE, NOWHERE);
@@ -6649,7 +6649,7 @@ void Scene111::actions() {
 		switch (_game._trigger) {
 		case (0):
 			_game._player._stepEnabled = false;
-			_game._player._visible = false;  
+			_game._player._visible = false;
 			_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
 			_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 4);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
@@ -6660,7 +6660,7 @@ void Scene111::actions() {
 		case 1: {
 			int idx = _globals._sequenceIndexes[0];
 			_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 4);
-			_game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx); 
+			_game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false);
 			_scene->_sequences.setTimingTrigger(30, 2);
 			_vm->_sound->command(73);
@@ -6678,7 +6678,7 @@ void Scene111::actions() {
 			return;
 
 		case 3:
-			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); 
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]);
 			_game._player._visible = true;
 			if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK))
 				_vm->_dialogs->show(32);
@@ -6699,7 +6699,7 @@ void Scene111::actions() {
 			switch (_game._trigger) {
 			case (0):
 				_game._player._stepEnabled = false;
-				_game._player._visible = false;  
+				_game._player._visible = false;
 				_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
 				_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
@@ -6710,7 +6710,7 @@ void Scene111::actions() {
 			case 1: {
 				int idx = _globals._sequenceIndexes[0];
 				_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 4);
-				_game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx); 
+				_game.syncTimers(1, _globals._sequenceIndexes[0], 1, idx);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false);
 				_scene->_sequences.setTimingTrigger(30, 2);
 				_vm->_sound->command(73);
@@ -6728,7 +6728,7 @@ void Scene111::actions() {
 				return;
 
 			case 3:
-				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]); 
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[0]);
 				_game._player._visible = true;
 
 				if (_action.isAction(VERB_LOCK) || _action.isAction(VERB_UNLOCK))
@@ -6773,10 +6773,10 @@ void Scene111::actions() {
 			case 1:
 				_globals[kChristineDoorStatus] = 2;
 				_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 1);
-				_game.syncTimers(1, _globals._sequenceIndexes[3], 3, _globals._animationIndexes[1]); 
+				_game.syncTimers(1, _globals._sequenceIndexes[3], 3, _globals._animationIndexes[1]);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 10);
 				_scene->drawToBackground(_globals._spriteIndexes[4], 1, Common::Point(-32000, -32000), 0, 100);
-				_game.syncTimers(2, 0, 3, _globals._animationIndexes[1]); 
+				_game.syncTimers(2, 0, 3, _globals._animationIndexes[1]);
 				_game._player._visible = true;
 				_game._player._playerPos = Common::Point(126, 126);
 				_anim1ActvFl = false;
@@ -6896,7 +6896,7 @@ void Scene111::actions() {
 				_vm->_dialogs->show(11116);
 			_action._inProgress = false;
 			return;
-		}  
+		}
 
 		if (_action.isAction(NOUN_RIGHT_DOOR)) {
 			_vm->_dialogs->show(11117);
@@ -6961,7 +6961,7 @@ void Scene111::handleListenAnimation() {
 	if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == _listenFrame)
 		return;
 
-	int nextFrame  = -1;
+	int nextFrame = -1;
 	_listenFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
 
 	if (_listenFrame == 6) {
@@ -6998,5 +6998,657 @@ void Scene111::handleListenConversation() {
 
 /*------------------------------------------------------------------------*/
 
+Scene112::Scene112(MADSEngine *vm) : Scene1xx(vm) {
+	_anim0ActvFl = false;
+	_anim1ActvFl = false;
+	_raoulAction = -1;
+	_raoulFrame = -1;
+	_didOptionFl = -1;
+	_julieFrame = -1;
+	_julieAction = -1;
+	_julieHotspotId = -1;
+	_julieCounter = -1;
+}
+
+void Scene112::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+	s.syncAsByte(_anim0ActvFl);
+	s.syncAsByte(_anim1ActvFl);
+	s.syncAsSint16LE(_raoulAction);
+	s.syncAsSint16LE(_raoulFrame);
+	s.syncAsSint16LE(_didOptionFl);
+	s.syncAsSint16LE(_julieFrame);
+	s.syncAsSint16LE(_julieAction);
+	s.syncAsSint16LE(_julieCounter);
+}
+
+void Scene112::setup() {
+	setPlayerSpritesPrefix();
+	setAAName();
+
+	_scene->addActiveVocab(NOUN_WOMAN);
+	_scene->addActiveVocab(NOUN_JULIE);
+}
+
+void Scene112::enter() {
+	if (_scene->_priorSceneId != RETURNING_FROM_LOADING) {
+		_raoulAction = 2;
+		_didOptionFl = 0;
+	}
+
+	_vm->_gameConv->get(3);
+
+	_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('j', 1), 1);
+	_anim0ActvFl = true;
+	_julieAction = 2;
+	_scene->setAnimFrame(_globals._animationIndexes[0], 3);
+	if (_globals[kJulieNameIsKnown] == 2) {
+		_julieHotspotId = _scene->_dynamicHotspots.add(NOUN_JULIE, VERB_WALK_TO, SYNTAX_SINGULAR_FEM, EXT_NONE, Common::Rect(255, 82, 255 + 30, 82 + 44));
+		_scene->_dynamicHotspots[_julieHotspotId]._articleNumber = PREP_ON;
+		_scene->_dynamicHotspots.setPosition(_julieHotspotId, Common::Point(216, 137), FACING_NORTHEAST);
+		_scene->_hotspots.activate(NOUN_WOMAN, false);
+	}
+	_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('r', 1), 1);
+	_anim1ActvFl = true;
+	_scene->setAnimFrame(_globals._animationIndexes[1], 82);
+	_raoulAction = 2;
+
+	if (_vm->_gameConv->_restoreRunning == 3) {
+		_vm->_gameConv->run(3);
+		_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+		_scene->setAnimFrame(_globals._animationIndexes[1], 17);
+		_raoulAction = 1;
+		_game._player._playerPos = Common::Point(53, 128);
+		_game._player._facing = FACING_EAST;
+		_game._player._visible = false;
+	} else if ((_scene->_priorSceneId == 110) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+		_game._player._playerPos = Common::Point(128, 145);
+		_game._player._facing = FACING_NORTH;
+	}
+
+	sceneEntrySound();
+}
+
+void Scene112::step() {
+	if (_anim0ActvFl)
+		handleJulieAnimation();
+
+	if (_anim1ActvFl)
+		handleRaoulChair();
+}
+
+void Scene112::actions() {
+	if (_vm->_gameConv->_running == 3) {
+		handleConversation();
+		_action._inProgress = false;
+		return;
+	}
+
+	if ((_action.isAction(VERB_TALK_TO, NOUN_JULIE)) || (_action.isAction(VERB_TALK_TO, NOUN_WOMAN))) {
+		if (_globals[kJulieNameIsKnown] > 0) {
+			_game._player._visible = false;
+			_game.syncTimers(3, _globals._animationIndexes[1], 2, 0);
+			_scene->setAnimFrame(_globals._animationIndexes[1], 1);
+			_raoulAction = 1;
+		}
+		_vm->_gameConv->run(3);
+		_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_EXIT_TO, NOUN_CORRIDOR)) {
+		_scene->_nextSceneId = 110;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action._lookFlag) {
+		_vm->_dialogs->show(11210);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isAction(NOUN_WALL)) {
+			_vm->_dialogs->show(11211);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_FLOOR)) {
+			_vm->_dialogs->show(11212);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_MIRROR)) {
+			_vm->_dialogs->show(11213);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_BALLET_BAR)) {
+			_vm->_dialogs->show(11214);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CORRIDOR)) {
+			_vm->_dialogs->show(11215);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_THROW_RUGS)) {
+			_vm->_dialogs->show(11216);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_DRESSING_SCREEN)) {
+			_vm->_dialogs->show(11217);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_DRESSING_TABLE)) {
+			_vm->_dialogs->show(11218);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CHAIR)) {
+			_vm->_dialogs->show(11219);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PLANT)) {
+			_vm->_dialogs->show(11220);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_COAT_RACK)) {
+			_vm->_dialogs->show(11221);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_UMBRELLA)) {
+			_vm->_dialogs->show(11222);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PAINTINGS)) {
+			_vm->_dialogs->show(11223);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_TRASH_BUCKET)) {
+			_vm->_dialogs->show(11224);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_SHELF)) {
+			_vm->_dialogs->show(11225);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CONTAINER)) {
+			_vm->_dialogs->show(11226);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_TORN_POSTER)) {
+			_vm->_dialogs->show(11227);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_POSTER)) {
+			_vm->_dialogs->show(11228);
+			_action._inProgress = false;
+			return;
+		}
+
+		if ((_action.isAction(NOUN_REVIEW)) || (_action.isAction(NOUN_REVIEWS))) {
+			_vm->_dialogs->show(11229);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_JULIE)) {
+			_vm->_dialogs->show(11231);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_COSTUME_RACK)) {
+			_vm->_dialogs->show(11232);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LIGHT_FIXTURE)) {
+			_vm->_dialogs->show(11233);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WARDROBE)) {
+			_vm->_dialogs->show(11234);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WOMAN)) {
+			_vm->_dialogs->show(11237);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_TAKE)) {
+		if (_action.isAction(NOUN_WOMAN) || _action.isAction(NOUN_JULIE)) {
+			_vm->_dialogs->show(11238);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_WARDROBE)) {
+		_vm->_dialogs->show(11235);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_CONTAINER)) {
+		_vm->_dialogs->show(11236);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene112::preActions() {
+	if ((_action.isAction(VERB_TALK_TO, NOUN_JULIE) || _action.isAction(VERB_TALK_TO, NOUN_WOMAN)) && (_globals[kJulieNameIsKnown] > 0))
+		_game._player.walk(Common::Point(53, 128), FACING_EAST);
+}
+
+void Scene112::handleConversation() {
+	switch (_action._activeAction._verbId) {
+	case 1:
+		if (!_game._trigger && (_raoulAction == 2))
+			_vm->_gameConv->setInterlocutorTrigger(68);
+		break;
+
+	case 3:
+	case 4:
+		if (_globals[kJulieNameIsKnown] < 2) {
+			_globals[kJulieNameIsKnown] = 2;
+			_scene->_hotspots.activate(NOUN_WOMAN, false);
+			_julieHotspotId = _scene->_dynamicHotspots.add(NOUN_JULIE, VERB_WALK_TO, SYNTAX_SINGULAR_FEM, EXT_NONE, Common::Rect(255, 82, 255 + 30, 82 + 44));
+			_scene->_dynamicHotspots[_julieHotspotId]._articleNumber = PREP_ON;
+			_scene->_dynamicHotspots.setPosition(_julieHotspotId, Common::Point(216, 137), FACING_NORTHEAST);
+		}
+		break;
+
+	case 5:
+		_vm->_gameConv->setInterlocutorTrigger(74);
+		_globals[kJulieNameIsKnown] = 1;
+		break;
+
+	case 6:
+	case 7:
+	case 10:
+	case 23:
+	case 27:
+		_vm->_gameConv->setInterlocutorTrigger(74);
+		_globals[kJulieNameIsKnown] = 2;
+		break;
+
+	case 13:
+		_julieAction = 1;
+		_raoulAction = 1;
+		break;
+
+	case 14:
+	case 15:
+	case 16:
+		_julieAction = 0;
+		_raoulAction = 1;
+		break;
+
+	default:
+		break;
+	}
+
+	switch (_game._trigger) {
+	case 60:
+		_julieAction = 0;
+		_raoulAction = 1;
+		break;
+
+	case 62:
+		_julieAction = 2;
+		if (_raoulAction != 2)
+			_raoulAction = 0;
+		break;
+
+	case 68: 
+		_scene->_sequences.setTimingTrigger(120, 70);
+		_vm->_gameConv->hold();
+		break;
+
+	case 70: 
+		_game._player.walk(Common::Point(53, 128), FACING_EAST);
+		_game._player.setWalkTrigger(72);
+		break;
+
+	case 72:
+		_vm->_gameConv->release();
+		_game._player._visible = false;
+		_game.syncTimers(3, _globals._animationIndexes[1], 2, 0);
+		_scene->setAnimFrame(_globals._animationIndexes[1], 1);
+		_raoulAction = 1;
+		break;
+
+	case 74: 
+		_raoulAction = 3;
+		_vm->_gameConv->hold();
+		break;
+
+	default:
+		break;
+	}
+
+	if ((_action._activeAction._verbId != 0) && (_action._activeAction._verbId != 1) &&
+		(_action._activeAction._verbId != 2) && (_action._activeAction._verbId != 5) &&
+		(_action._activeAction._verbId != 6) && (_action._activeAction._verbId != 7) &&
+		(_action._activeAction._verbId != 10) && (_action._activeAction._verbId != 23) &&
+		(_action._activeAction._verbId != 27)) {
+		_vm->_gameConv->setInterlocutorTrigger(60);
+		_vm->_gameConv->setHeroTrigger(62);
+	}
+
+	if (_action._activeAction._verbId == 18)
+		_globals[kCanFindBookInLibrary] = true;
+
+	_julieCounter = 0;
+}
+
+void Scene112::handleJulieAnimation() {
+	int random = -1;
+	int resetFrame;
+
+	if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() != _julieFrame) {
+		_julieFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
+		resetFrame = -1;
+
+		switch (_julieFrame) {
+		case 1:
+		case 2:
+		case 3:
+		case 22:
+		case 39:
+		case 71:
+		case 107:
+			switch (_julieAction) {
+			case 0:
+				random = _vm->getRandomNumber(4, 6);
+				++_julieCounter;
+				if (_julieCounter > 25)
+					_julieAction = 2;
+				break;
+
+			case 1:
+				random = 3;
+				break;
+
+			case 2:
+				random = _vm->getRandomNumber(1, 3);
+				while (_didOptionFl == random)
+					random = _vm->getRandomNumber(1, 3);
+				_didOptionFl = random;
+				break;
+
+			default:
+				break;
+			}
+
+			switch (random) {
+			case 1:
+				resetFrame = 22;
+				break;
+
+			case 2:
+				resetFrame = 39;
+				break;
+
+			case 3:
+				resetFrame = 83;
+				break;
+
+			case 4:
+				resetFrame = 0;
+				break;
+
+			case 5:
+				resetFrame = 1;
+				break;
+
+			case 6:
+				resetFrame = 2;
+				break;
+
+			default:
+				break;
+			}
+			break;
+		case 56:
+		case 77:
+		case 83:
+			random = _vm->getRandomNumber(1, 3);
+			while (_didOptionFl == random)
+				random = _vm->getRandomNumber(1, 3);
+			_didOptionFl = random;
+
+			if ((_julieAction == 0) || (_julieAction == 1))
+				random = 3;
+
+			switch (random) {
+			case 1:
+				resetFrame = 71;
+				break;
+
+			case 2:
+				resetFrame = 77;
+				break;
+
+			case 3:
+				resetFrame = 56;
+				break;
+
+			default:
+				break;
+			}
+
+			break;
+
+		case 95:
+			if (_julieAction == 1)
+				random = 2;
+			else
+				random = 1;
+
+			switch (random) {
+			case 1:
+				resetFrame = 95;
+				break;
+
+			case 2:
+				resetFrame = 107;
+				break;
+
+			default:
+				break;
+			}
+			break;
+
+		case 130:
+			resetFrame = 95;
+			_julieAction = 2;
+			break;
+
+		default:
+			break;
+		}
+
+		if (resetFrame >= 0) {
+			_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
+			_julieFrame = resetFrame;
+		}
+	}
+}
+
+void Scene112::handleRaoulChair() {
+	if (_scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame() == _raoulFrame)
+		return;
+
+	_raoulFrame = _scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame();
+	int resetFrame = -1;
+	int random = -1;
+
+	switch (_raoulFrame) {
+	case 18:
+	case 30:
+	case 41:
+	case 49:
+	case 56:
+	case 65:
+		switch (_raoulAction) {
+		case 0:
+			random = _vm->getRandomNumber(1, 4);
+			_raoulAction = 1;
+			break;
+
+		case 2:
+			random = 6;
+			break;
+
+		case 3:
+			random = 5;
+			_raoulAction = 2;
+			break;
+
+		default:
+			random = _vm->getRandomNumber(7, 50);
+			while (_didOptionFl == random)
+				random = _vm->getRandomNumber(7, 50);
+			_didOptionFl = random;
+			break;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 49;
+			break;
+
+		case 2:
+			resetFrame = 41;
+			break;
+
+		case 3:
+			resetFrame = 18;
+			break;
+
+		case 4:
+			resetFrame = 30;
+			break;
+
+		case 5:
+			resetFrame = 65;
+			break;
+
+		case 6:
+			resetFrame = 82;
+			break;
+
+		case 7:
+			resetFrame = 56;
+			break;
+
+		default:
+			resetFrame = 17;
+			break;
+		}
+		break;
+
+	case 61:
+		if (_raoulAction == 1)
+			random = 1;
+		else
+			random = 2;
+
+		switch (random) {
+		case 1:
+			resetFrame = 60;
+			break;
+
+		case 2:
+			resetFrame = 61;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 82:
+		_raoulAction = 2;
+		_game._player._visible = true;
+		_vm->_gameConv->release();
+		_game.syncTimers(2, 0, 3, _globals._animationIndexes[1]);
+		break;
+
+	case 83:
+		if (_raoulAction == 2)
+			random = 1;
+		else
+			random = 2;
+
+		switch (random) {
+		case 1:
+			resetFrame = 82;
+			break;
+
+		case 2:
+			resetFrame = 0;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[1], resetFrame);
+		_raoulFrame = resetFrame;
+	}
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index b5fb417..05cf173 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -309,6 +309,35 @@ public:
 	virtual void preActions();
 	virtual void actions();
 };
+
+class Scene112 : public Scene1xx {
+private:
+	bool _anim0ActvFl;
+	bool _anim1ActvFl;
+
+	int _raoulAction;
+	int _raoulFrame;
+	int _didOptionFl;
+	int _julieFrame;
+	int _julieAction;
+	int _julieCounter;
+	int _julieHotspotId;
+
+	void handleConversation();
+	void handleJulieAnimation();
+	void handleRaoulChair();
+
+public:
+	Scene112(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
+
 } // End of namespace Phantom
 } // End of namespace MADS
 


Commit: e2d86c32489a318327778f3626b2dbe1a1d2a067
    https://github.com/scummvm/scummvm/commit/e2d86c32489a318327778f3626b2dbe1a1d2a067
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-20T14:07:26+02:00

Commit Message:
MADS: Phantom: Implement scene 113, some renaming

Changed paths:
    engines/mads/hotspots.cpp
    engines/mads/hotspots.h
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h
    engines/mads/scene.cpp
    engines/mads/scene.h



diff --git a/engines/mads/hotspots.cpp b/engines/mads/hotspots.cpp
index 2235bf5..526654d 100644
--- a/engines/mads/hotspots.cpp
+++ b/engines/mads/hotspots.cpp
@@ -217,4 +217,16 @@ void Hotspots::activate(int vocabId, bool active) {
 	}
 }
 
+void Hotspots::activateAtPos(int vocabId, bool active, Common::Point pos) {
+	for (uint idx = 0; idx < size(); ++idx) {
+		Hotspot &hotspot = (*this)[idx];
+		if ((hotspot._vocabId == vocabId) && (pos.x >= hotspot._bounds.left) &&
+		    (pos.x <= hotspot._bounds.right) && (pos.y >= hotspot._bounds.top) &&
+		    (pos.y <= hotspot._bounds.bottom)) {
+			hotspot._active = active;
+			_vm->_game->_screenObjects.setActive(CAT_HOTSPOT, idx, active);
+		}
+	}
+}
+
 } // End of namespace MADS
diff --git a/engines/mads/hotspots.h b/engines/mads/hotspots.h
index 12b7e99..faabd44 100644
--- a/engines/mads/hotspots.h
+++ b/engines/mads/hotspots.h
@@ -124,6 +124,12 @@ public:
 	 * Sets the active state of a given hotspot
 	 */
 	void activate(int vocabId, bool active);
+
+	/**
+	 * Sets the active state of a given hotspot if it includes a given position
+	 */
+	void activateAtPos(int vocabId, bool active, Common::Point pos);
+
 };
 
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 29f2223..e961000 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -67,7 +67,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 112:	// inside dressing room 1
 		return new Scene112(vm);
 	case 113:	// inside dressing room 2
-		return new DummyScene(vm);	// TODO
+		return new Scene113(vm);
 	case 114:	// lower floor, storage room
 		return new DummyScene(vm);	// TODO
 	case 150:	// cutscene
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 8832942..2ed2cbf 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -194,6 +194,7 @@ void Scene101::enter() {
 		_brieAnimId = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(0, 0, 0, 0));
 		_scene->_dynamicHotspots[_brieAnimId]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_brieAnimId, Common::Point(490, 119), FACING_NONE);
+		// FIXME: 2nd parameter is wrong
 		_scene->setDynamicAnim(_brieAnimId, 0, 0);
 		_scene->setDynamicAnim(_brieAnimId, 0, 1);
 		_scene->setDynamicAnim(_brieAnimId, 0, 2);
@@ -203,6 +204,7 @@ void Scene101::enter() {
 		int tmpIdx = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(0, 0, 0, 0));
 		_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(25, 80), FACING_NONE);
+		//FIXME: 2nd paramater is wrong
 		_scene->setDynamicAnim(tmpIdx, 1, 1);
 		_scene->setDynamicAnim(tmpIdx, 1, 2);
 
@@ -211,6 +213,7 @@ void Scene101::enter() {
 		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('b', 9), 1);
 		_brieAnimId = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(0, 0, 0, 0));
 		_scene->_dynamicHotspots[_brieAnimId]._articleNumber = PREP_ON;
+		//FIXME: 2nd parameter is wrong
 		_scene->setDynamicAnim(_brieAnimId, 1, 1);
 		_scene->setDynamicAnim(_brieAnimId, 1, 2);
 		_anim1Running = true;
@@ -419,12 +422,11 @@ void Scene101::handleConversation1() {
 }
 
 void Scene101::handleAnimation0() {
-	int random;
-	int reset_frame;
+	int resetFrame;
 
 	if (_scene->getAnimFrame(_globals._animationIndexes[0]) != _callingFrame) {
 		_callingFrame = _scene->getAnimFrame(_globals._animationIndexes[0]);
-		reset_frame = -1;
+		resetFrame = -1;
 		switch (_callingFrame) {
 		case 1:
 		case 9:
@@ -432,37 +434,36 @@ void Scene101::handleAnimation0() {
 			if (_callingStatus == 1) {
 				if (_callingFrame == 9) {
 					if (_startWalking0Fl) {
-						reset_frame = 13;
+						resetFrame = 13;
 						_callingStatus = 3;
 					} else
 						_callingStatus = 2;
 				} else
-					reset_frame = 1;
+					resetFrame = 1;
 			}
 
 			if (_callingStatus == 0) {
 				if (_startWalking0Fl) {
-					reset_frame = 60;
+					resetFrame = 60;
 					_callingStatus = 3;
 				} else
-					reset_frame = 0;
+					resetFrame = 0;
 			}
 
 			if (_callingStatus == 2) {
 				if (_startWalking0Fl) {
-					reset_frame = 13;
+					resetFrame = 13;
 					_callingStatus = 3;
 				} else {
-					random = _vm->getRandomNumber(1, 2);
 					++_talkCounter;
 
 					if (_talkCounter < 18) {
-						if (random == 1)
-							reset_frame = 7;
+						if (_vm->getRandomNumber(1, 2) == 1)
+							resetFrame = 7;
 						else
-							reset_frame = 10;
+							resetFrame = 10;
 					} else {
-						reset_frame = 54;
+						resetFrame = 54;
 						_callingStatus = 0;
 					}
 				}
@@ -476,37 +477,37 @@ void Scene101::handleAnimation0() {
 
 		case 59:
 			if (_startWalking0Fl) {
-				reset_frame = 60;
+				resetFrame = 60;
 				_callingStatus = 3;
 			} else {
-				reset_frame = 0;
+				resetFrame = 0;
 				_callingStatus = 0;
 			}
 			break;
 
 		case 66:
-			reset_frame = 24;
+			resetFrame = 24;
 			break;
 		}
 
-		if (reset_frame >= 0) {
-			_scene->setAnimFrame(_globals._animationIndexes[0], reset_frame);
-			_callingFrame = reset_frame;
+		if (resetFrame >= 0) {
+			_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
+			_callingFrame = resetFrame;
 		}
 	}
 }
 
 void Scene101::handleAnimation1() {
 	int random;
-	int reset_frame;
+	int resetFrame;
 
 	if (_scene->getAnimFrame(_globals._animationIndexes[1]) != _chandelierFrame) {
 		_chandelierFrame = _scene->getAnimFrame(_globals._animationIndexes[1]);
-		reset_frame = -1;
+		resetFrame = -1;
 		switch (_chandelierFrame) {
 		case 1:
 			if (_chandelierStatus == 3)
-				reset_frame = 0;
+				resetFrame = 0;
 			break;
 
 		case 11:
@@ -538,13 +539,13 @@ void Scene101::handleAnimation1() {
 
 			switch (_chandelierStatus) {
 			case 0:
-				reset_frame = 27;
+				resetFrame = 27;
 				_chandelierStatus = 2;
 				break;
 
 			case 1:
 				_globals[kBrieTalkStatus] = 2;
-				reset_frame = 45;
+				resetFrame = 45;
 				if (_vm->_gameConv->_running == 1)
 					_vm->_gameConv->stop();
 				_scene->_dynamicHotspots.remove(_brieAnimId);
@@ -556,28 +557,28 @@ void Scene101::handleAnimation1() {
 				++_talkCounter;
 				if (_talkCounter < 15) {
 					if (random == 1)
-						reset_frame = 12;
+						resetFrame = 12;
 					else if (random == 2)
-						reset_frame = 14;
+						resetFrame = 14;
 					else if (random == 3)
-						reset_frame = 17;
+						resetFrame = 17;
 				} else {
 					_chandelierStatus = 4;
-					reset_frame = 25;
+					resetFrame = 25;
 				}
 				break;
 
 			case 4:
-				reset_frame = 25;
+				resetFrame = 25;
 				break;
 
 			case 5:
-				reset_frame = 21;
+				resetFrame = 21;
 				_chandelierStatus = 2;
 				break;
 
 			case 6:
-				reset_frame = 316;
+				resetFrame = 316;
 				_chandelierStatus = 2;
 				break;
 
@@ -591,9 +592,9 @@ void Scene101::handleAnimation1() {
 			break;
 		}
 
-		if (reset_frame >= 0) {
-			_scene->setAnimFrame(_globals._animationIndexes[1], reset_frame);
-			_chandelierFrame = reset_frame;
+		if (resetFrame >= 0) {
+			_scene->setAnimFrame(_globals._animationIndexes[1], resetFrame);
+			_chandelierFrame = resetFrame;
 		}
 	}
 }
@@ -782,6 +783,7 @@ void Scene102::actions() {
 }
 
 /*------------------------------------------------------------------------*/
+
 Scene103::Scene103(MADSEngine *vm) : Scene1xx(vm) {
 	_jacquesAction = -1;
 	_lastRandom = -1;
@@ -2246,10 +2248,10 @@ void Scene103::climbRightStairs() {
 		return;
 
 	_lastStairFrame = _scene->getAnimFrame(_globals._animationIndexes[3]);
-	int stairs_reset_frame = -1;
+	int stairsResetFrame = -1;
 
 	if (_lastStairFrame == 37) {
-		stairs_reset_frame = 36;
+		stairsResetFrame = 36;
 		_standPosition = 2;
 		_game._player._stepEnabled = true;
 	}
@@ -2261,9 +2263,9 @@ void Scene103::climbRightStairs() {
 		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(154, 139));
 	}
 
-	if (stairs_reset_frame >= 0) {
-		_scene->setAnimFrame(_globals._animationIndexes[3], stairs_reset_frame);
-		_lastStairFrame = stairs_reset_frame;
+	if (stairsResetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[3], stairsResetFrame);
+		_lastStairFrame = stairsResetFrame;
 	}
 }
 
@@ -2272,10 +2274,10 @@ void Scene103::climbLeftStairs() {
 		return;
 
 	_lastStairFrame = _scene->getAnimFrame(_globals._animationIndexes[5]);
-	int stairs_reset_frame = -1;
+	int stairsResetFrame = -1;
 
 	if (_lastStairFrame == 34) {
-		stairs_reset_frame = 33;
+		stairsResetFrame = 33;
 		_standPosition = 1;
 		_game._player._stepEnabled = true;
 	}
@@ -2287,9 +2289,9 @@ void Scene103::climbLeftStairs() {
 		_scene->_sequences.setPosition(_globals._sequenceIndexes[3], Common::Point(37, 139));
 	}
 
-	if (stairs_reset_frame >= 0) {
-		_scene->setAnimFrame(_globals._animationIndexes[5], stairs_reset_frame);
-		_lastStairFrame = stairs_reset_frame;
+	if (stairsResetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[5], stairsResetFrame);
+		_lastStairFrame = stairsResetFrame;
 	}
 }
 
@@ -2322,8 +2324,7 @@ void Scene103::descendLeftStairs() {
 }
 
 void Scene103::process_conv_jacques() {
-	int quit_converse = false;
-	int *value_1;
+	int quitConversationFl = false;
 
 	switch (_action._activeAction._verbId) {
 	case 1:
@@ -2342,13 +2343,14 @@ void Scene103::process_conv_jacques() {
 	case 7:
 	case 10:
 	case 19:
-	case 30:
+	case 30: {
 		_globals[kWalkerConverse] = 0;
-		value_1 = _vm->_gameConv->getVariable(26);
-		if (*value_1)
+		int *val = _vm->_gameConv->getVariable(26);
+		if (*val)
 			_globals[kJacquesNameIsKnown] = 2;
 
-		quit_converse = true;
+		quitConversationFl = true;
+		}
 		break;
 
 	case 8:
@@ -2375,32 +2377,32 @@ void Scene103::process_conv_jacques() {
 
 	switch (_game._trigger) {
 	case 90:
-		if (!quit_converse)
+		if (!quitConversationFl)
 			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
 		_jacquesAction = 0;
 		break;
 
 	case 92:
-		if (!quit_converse)
+		if (!quitConversationFl)
 			_globals[kWalkerConverse] = _vm->getRandomNumber(2, 3);
 		_convCount = 0;
 		_jacquesAction = 1;
 		break;
 
 	case 94:
-		if (!quit_converse)
+		if (!quitConversationFl)
 			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
 		_jacquesAction = 2;
 		break;
 
 	case 96:
-		if (!quit_converse)
+		if (!quitConversationFl)
 			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
 		_jacquesAction = 3;
 		break;
 
 	case 98:
-		if (!quit_converse)
+		if (!quitConversationFl)
 			_globals[kWalkerConverse] = _vm->getRandomNumber(1, 4);
 		_jacquesAction = 4;
 		break;
@@ -2537,7 +2539,7 @@ void Scene104::enter() {
 		_anim0ActvFl = true;
 		_richStatus = 0;
 
-		cleanInventory ();
+		cleanInventory();
 
 		_game._player._visible = false;
 		_game._visitedScenes.pop_back();
@@ -3101,30 +3103,30 @@ void Scene104::handleWalkAnimation() {
 		return;
 
 	_walkFrame = _scene->_animation[_globals._animationIndexes[2]]->getCurrentFrame();
-	int daae_walk_reset_frame = -1;
+	int daaeResetFrame = -1;
 
 	switch (_walkFrame) {
 	case 1:
 		if (_walkStatus == 0) {
-			daae_walk_reset_frame = 0;
+			daaeResetFrame = 0;
 		} else {
 			_game.syncTimers(3, _globals._animationIndexes[2], 3, _globals._animationIndexes[1]);
-			daae_walk_reset_frame = 1;
+			daaeResetFrame = 1;
 		}
 		break;
 
 	case 138:
 		_walkStatus = 0;
-		daae_walk_reset_frame = 0;
+		daaeResetFrame = 0;
 		break;
 
 	default:
 		break;
 	}
 
-	if (daae_walk_reset_frame >= 0) {
-		_scene->setAnimFrame(_globals._animationIndexes[2], daae_walk_reset_frame);
-		_walkFrame = daae_walk_reset_frame;
+	if (daaeResetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[2], daaeResetFrame);
+		_walkFrame = daaeResetFrame;
 	}
 }
 
@@ -4223,7 +4225,7 @@ void Scene106::enter() {
 		_sandbagHostpotId = _scene->_dynamicHotspots.add(NOUN_SANDBAG, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(227, 140, 227 + 18, 140 + 11));
 		_scene->_dynamicHotspots.setPosition(_sandbagHostpotId, Common::Point(224, 152), FACING_NORTHEAST);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 2);
-	} 
+	}
 
 	if (_globals[kCurrentYear] == 1881) {
 		_scene->drawToBackground(_globals._spriteIndexes[7], 1, Common::Point(-32000, -32000), 0, 100);
@@ -4360,7 +4362,7 @@ void Scene106::actions() {
 			}
 			_action._inProgress = false;
 			return;
-		} 
+		}
 	}
 
 	if (_action.isAction(VERB_TAKE, NOUN_CABLE_HOOK)) {
@@ -4401,7 +4403,7 @@ void Scene106::actions() {
 			}
 			_action._inProgress = false;
 			return;
-		} 
+		}
 	}
 
 	switch (_game._trigger) {
@@ -5039,7 +5041,7 @@ void Scene108::synchronize(Common::Serializer &s) {
 void Scene108::setup() {
 	setPlayerSpritesPrefix();
 	setAAName();
-	
+
 	if (_globals[kCurrentYear] == 1993)
 		_scene->_initialVariant = 1;
 
@@ -5097,7 +5099,7 @@ void Scene108::enter() {
 			_scene->_dynamicHotspots[_charHotspotId]._articleNumber = PREP_ON;
 		}
 		_scene->_dynamicHotspots.setPosition(_charHotspotId, Common::Point(235, 102), FACING_NORTHEAST);
-	} 
+	}
 
 	if (_scene->_priorSceneId == 106) {
 		_game._player._playerPos = Common::Point(48, 81);
@@ -5123,7 +5125,7 @@ void Scene108::enter() {
 
 void Scene108::step() {
 	if (_anim0ActvFl)
-		handleCharAnimation ();
+		handleCharAnimation();
 
 	if ((_globals[kWalkerConverse] == 2) || (_globals[kWalkerConverse] == 3)) {
 		++_conversationCount;
@@ -5162,7 +5164,7 @@ void Scene108::actions() {
 		_vm->_dialogs->show(10810);
 		_action._inProgress = false;
 		return;
-	} 
+	}
 
 	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
 		if (_action.isAction(NOUN_WALL)) {
@@ -5382,7 +5384,7 @@ void Scene108::handleCharAnimation() {
 				_shutUpCount = 0;
 				_prevShutUpFrame = 10;
 				random = 12;
-			} 
+			}
 		} else if (_charAction == 0) {
 			int delay = _vm->getRandomNumber(10, 15);
 			++_shutUpCount;
@@ -5581,7 +5583,7 @@ void Scene108::handleCharlesConversation() {
 
 	default:
 		break;
-	} 
+	}
 
 	if ((_action._activeAction._verbId != 1) && (_action._activeAction._verbId != 5) &&
 		(_action._activeAction._verbId != 16) && (_action._activeAction._verbId != 19) &&
@@ -6578,7 +6580,7 @@ void Scene111::enter() {
 
 void Scene111::step() {
 	if (_anim0ActvFl)
-		handleListenAnimation ();
+		handleListenAnimation();
 
 	if (!_removeAxe && _anim1ActvFl && (_scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame() == 5)) {
 		_scene->deleteSequence(_globals._sequenceIndexes[2]);
@@ -7342,12 +7344,12 @@ void Scene112::handleConversation() {
 			_raoulAction = 0;
 		break;
 
-	case 68: 
+	case 68:
 		_scene->_sequences.setTimingTrigger(120, 70);
 		_vm->_gameConv->hold();
 		break;
 
-	case 70: 
+	case 70:
 		_game._player.walk(Common::Point(53, 128), FACING_EAST);
 		_game._player.setWalkTrigger(72);
 		break;
@@ -7360,7 +7362,7 @@ void Scene112::handleConversation() {
 		_raoulAction = 1;
 		break;
 
-	case 74: 
+	case 74:
 		_raoulAction = 3;
 		_vm->_gameConv->hold();
 		break;
@@ -7650,5 +7652,1501 @@ void Scene112::handleRaoulChair() {
 
 /*------------------------------------------------------------------------*/
 
+Scene113::Scene113(MADSEngine *vm) : Scene1xx(vm) {
+	_standing_talking = false;
+	_day_wants_to_talk = false;
+	_music_is_playing = false;
+	_right_after_kiss = false;
+	_anim_0_running = false;
+	_anim_1_running = false;
+	_anim_2_running = false;
+	_anim_3_running = false;
+	_anim_4_running = false;
+	_prevent_1 = false;
+	_prevent_2 = false;
+	_raoul_is_up = false;
+	_arms_are_out = false;
+
+	_dayStatus = -1;
+	_raoulAction = -1;
+	_christineHotspotId2 = -1;
+	_raoulCount = -1;
+	_dayCount = -1;
+	_standCount = -1;
+	_julieStatus = -1;
+	_florentStatus = -1;
+	_florentFrame = -1;
+	_florentCount = -1;
+	_dayFrame = -1;
+	_lastDayResetFrame = -1;
+	_raoulFrame = -1;
+	_julieFrame = -1;
+	_julieCount = -1;
+}
+
+void Scene113::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+	s.syncAsByte(_standing_talking);
+	s.syncAsByte(_day_wants_to_talk);
+	s.syncAsByte(_music_is_playing);
+	s.syncAsByte(_right_after_kiss);
+	s.syncAsByte(_anim_0_running);
+	s.syncAsByte(_anim_1_running);
+	s.syncAsByte(_anim_2_running);
+	s.syncAsByte(_anim_3_running);
+	s.syncAsByte(_anim_4_running);
+	s.syncAsByte(_prevent_1);
+	s.syncAsByte(_prevent_2);
+	s.syncAsByte(_raoul_is_up);
+	s.syncAsByte(_arms_are_out);
+
+	s.syncAsSint16LE(_dayStatus);
+	s.syncAsSint16LE(_raoulAction);
+	s.syncAsSint16LE(_christineHotspotId2);
+	s.syncAsSint16LE(_raoulCount);
+	s.syncAsSint16LE(_dayCount);
+	s.syncAsSint16LE(_standCount);
+	s.syncAsSint16LE(_julieStatus);
+	s.syncAsSint16LE(_florentStatus);
+	s.syncAsSint16LE(_florentFrame);
+	s.syncAsSint16LE(_florentCount);
+	s.syncAsSint16LE(_dayFrame);
+	s.syncAsSint16LE(_lastDayResetFrame);
+	s.syncAsSint16LE(_raoulFrame);
+	s.syncAsSint16LE(_julieFrame);
+	s.syncAsSint16LE(_julieCount);
+}
+
+void Scene113::setup() {
+	setPlayerSpritesPrefix();
+	setAAName();
+
+	_scene->addActiveVocab(NOUN_CHRISTINE);
+	_scene->addActiveVocab(NOUN_WOMAN);
+	_scene->addActiveVocab(NOUN_JULIE);
+}
+
+void Scene113::enter() {
+	if (_scene->_priorSceneId != RETURNING_FROM_LOADING) {
+		_standing_talking = false;
+		_day_wants_to_talk = false;
+		_music_is_playing = false;
+		_right_after_kiss = false;
+		_anim_0_running = false;
+		_anim_1_running = false;
+		_anim_2_running = false;
+		_anim_3_running = false;
+		_anim_4_running = false;
+		_prevent_1 = false;
+		_prevent_2 = false;
+		_raoul_is_up = false;
+		_arms_are_out = false;
+	}
+
+	_scene->_hotspots.activate(NOUN_SMALL_NOTE, false);
+	_scene->_hotspots.activate(NOUN_DRESSING_GOWN, false);
+	_scene->_hotspots.activate(NOUN_CHRISTINE, false);
+	_scene->_hotspots.activate(NOUN_JULIE, false);
+	_scene->_hotspots.activate(NOUN_LIGHT_FIXTURE, false);
+
+	if (_globals[kCurrentYear] == 1993) {
+		_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('z', -1), false);
+		_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('f', 0), false);
+
+		if (_game._objects.isInRoom(OBJ_SMALL_NOTE))
+			_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('f', 1), false);
+
+		if ((_globals[kDoneBrieConv203] == 1) || (_globals[kDoneBrieConv203] == 3))
+			_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('c', 3), false);
+	}
+
+	if (_globals[kCurrentYear] == 1993) {
+		_vm->_gameConv->get(4);
+		if ((_globals[kDoneBrieConv203] == 1) || (_globals[kDoneBrieConv203] == 3))
+			_vm->_gameConv->get(6);
+	} else {
+		_globals._spriteIndexes[4] = _scene->_sprites.addSprites("*faceral", false);
+		_globals._spriteIndexes[5] = _scene->_sprites.addSprites("*facecrsd", false);
+		_vm->_gameConv->get(13);
+	}
+
+	if (_globals[kCurrentYear] == 1993) {
+		_scene->drawToBackground(_globals._spriteIndexes[3], 1, Common::Point(-32000, -32000), 0, 100);
+		_scene->_hotspots.activate(NOUN_VASE, false);
+		_scene->_hotspots.activate(NOUN_FAN, false);
+		_scene->_hotspots.activateAtPos(NOUN_LIGHT_FIXTURE, true, Common::Point(155, 17));
+	} else {
+		_scene->_hotspots.activateAtPos(NOUN_LIGHT_FIXTURE, true, Common::Point(150, 46));
+		_scene->_hotspots.activate(NOUN_NOTICE, false);
+	}
+
+	if (_scene->_priorSceneId == RETURNING_FROM_LOADING) {
+		if (_globals[kCurrentYear] == 1881) {
+			if (_dayStatus <= 3) {
+				_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('r', 1), 1);
+				_anim_1_running = true;
+			}
+
+			if (_raoulAction == 3)
+				_scene->setAnimFrame(_globals._animationIndexes[1], 33);
+			else {
+				_raoulAction = 1;
+				_game._player._visible = false;
+				_scene->setAnimFrame(_globals._animationIndexes[1], 8);
+			}
+
+			if (_music_is_playing) {
+				_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 2), 0);
+				_anim_0_running = true;
+				_christineHotspotId1 = _scene->_dynamicHotspots.add(NOUN_CHRISTINE, VERB_WALK_TO, SYNTAX_SINGULAR_FEM, EXT_NONE, Common::Rect(0, 0, 0, 0));
+				_scene->_dynamicHotspots[_christineHotspotId1]._articleNumber = PREP_ON;
+				_scene->setDynamicAnim(_christineHotspotId1, _globals._animationIndexes[0], 13);
+				_scene->setDynamicAnim(_christineHotspotId1, _globals._animationIndexes[0], 14);
+				_scene->setDynamicAnim(_christineHotspotId1, _globals._animationIndexes[0], 16);
+				_scene->setAnimFrame(_globals._animationIndexes[0], 212);
+				_game._player._visible = true;
+				_anim_1_running = false;
+			} else {
+				switch (_dayStatus) {
+				case 0:
+				case 1:
+				case 2:
+				case 3:
+					_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 1), 0);
+					_anim_0_running = true;
+					_dayStatus = 2;
+					_scene->setAnimFrame(_globals._animationIndexes[0], 208);
+					_scene->_hotspots.activate(NOUN_CHRISTINE, true);
+					_scene->_hotspots.activateAtPos(NOUN_CHRISTINE, false, Common::Point(220, 130));
+					break;
+
+				default:
+					_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 2), 0);
+					_anim_0_running = true;
+					_dayStatus = 7;
+					_game._player._visible = false;
+					_scene->setAnimFrame(_globals._animationIndexes[0], 165);
+					break;
+				}
+				_christineHotspotId1 = _scene->_dynamicHotspots.add(NOUN_CHRISTINE, VERB_WALK_TO, SYNTAX_SINGULAR_FEM, EXT_NONE, Common::Rect(0, 0, 0, 0));
+				_scene->_dynamicHotspots[_christineHotspotId1]._articleNumber = PREP_ON;
+				_scene->setDynamicAnim(_christineHotspotId1, _globals._animationIndexes[0], 13);
+				_scene->setDynamicAnim(_christineHotspotId1, _globals._animationIndexes[0], 14);
+				_scene->setDynamicAnim(_christineHotspotId1, _globals._animationIndexes[0], 16);
+			}
+
+			if (_dayStatus == 2) {
+				_scene->_hotspots.activate(NOUN_CHRISTINE, true);
+				_scene->_hotspots.activateAtPos(NOUN_CHRISTINE, false, Common::Point(220, 130));
+			} else {
+				_game._player._playerPos = Common::Point(175, 148);
+				_game._player._facing = FACING_NORTHEAST;
+			}
+
+		} else if ((_globals[kDoneBrieConv203] == 1) || (_globals[kDoneBrieConv203] == 3)) {
+			_globals._animationIndexes[4] = _scene->loadAnimation(formAnimName('x', 1), 1);
+			_julieStatus = 0;
+			_anim_4_running = true;
+			_globals[kMakeBrieLeave203] = true;
+			_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
+			_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+			_scene->_hotspots.activate(NOUN_DRESSING_GOWN, true);
+			_scene->_hotspots.activate(NOUN_JULIE, true);
+			_scene->_hotspots.activateAtPos(NOUN_CHRISTINE, true, Common::Point(220, 130));
+		} else if (_globals[kCurrentYear] == 1993) {
+			_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+			_globals._animationIndexes[2] = _scene->loadAnimation(formAnimName('f', 1), 1);
+			_anim_2_running = true;
+
+			if (_florentStatus != 3)
+				_florentStatus = 1;
+
+			_globals._animationIndexes[3] = _scene->loadAnimation(formAnimName('r', 1), 1);
+			_anim_3_running = true;
+
+			if (_raoulAction == 3)
+				_scene->setAnimFrame(_globals._animationIndexes[3], 33);
+			else {
+				_scene->setAnimFrame(_globals._animationIndexes[3], 8);
+				_raoulAction = 1;
+				_game._player._playerPos = Common::Point(201, 120);
+				_game._player._facing = FACING_SOUTH;
+				_game._player._visible = false;
+			}
+
+			if (_florentStatus == 3)
+				_scene->setAnimFrame(_globals._animationIndexes[2], 41);
+
+			if (_globals[kFlorentNameIsKnown] >= 1) {
+				_christineHotspotId2 = _scene->_dynamicHotspots.add(NOUN_CHRISTINE, VERB_WALK_TO, SYNTAX_SINGULAR_FEM, EXT_NONE, Common::Rect(43, 118, 43 + 15, 118 + 29));
+				_scene->_dynamicHotspots[_christineHotspotId2]._articleNumber = PREP_ON;
+				_scene->_dynamicHotspots.setPosition(_christineHotspotId2, Common::Point(106, 127), FACING_SOUTHWEST);
+			} else {
+				_christineHotspotId2 = _scene->_dynamicHotspots.add(NOUN_WOMAN, VERB_WALK_TO, SYNTAX_FEM_NOT_PROPER, EXT_NONE, Common::Rect(43, 118, 43 + 15, 118 + 29));
+				_scene->_dynamicHotspots[_christineHotspotId2]._articleNumber = PREP_ON;
+				_scene->_dynamicHotspots.setPosition(_christineHotspotId2, Common::Point(106, 127), FACING_SOUTHWEST);
+			}
+
+			_scene->_hotspots.activate(NOUN_DRESSING_GOWN, true);
+
+			if (_game._objects.isInRoom(OBJ_SMALL_NOTE)) {
+				_scene->_hotspots.activate(NOUN_SMALL_NOTE, true);
+				_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 13);
+			}
+		}
+	} else if (_globals[kCurrentYear] == 1993) {
+		if ((_globals[kDoneBrieConv203] == 1) || (_globals[kDoneBrieConv203] == 3)) {
+			if (!(_globals[kPlayerScoreFlags] & 4)) {
+				_globals[kPlayerScoreFlags] = _globals[kPlayerScoreFlags] | 4;
+				_globals[kPlayerScore] += 5;
+			}
+
+			_globals._animationIndexes[4] = _scene->loadAnimation(formAnimName('x', 1), 1);
+			_julieStatus = 0;
+			_anim_4_running = true;
+			_globals[kMakeBrieLeave203] = true;
+			_game._player._playerPos = Common::Point(190, 148);
+			_game._player._facing = FACING_NORTH;
+			_game._player._stepEnabled = false;
+			_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
+			_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+			_scene->_hotspots.activate(NOUN_DRESSING_GOWN, true);
+			_scene->_hotspots.activate(NOUN_JULIE, true);
+			_scene->_hotspots.activateAtPos(NOUN_CHRISTINE, true, Common::Point(220, 130));
+			_game._player.walk(Common::Point(175, 128), FACING_NORTHEAST);
+			_game._player.setWalkTrigger(102);
+		} else {
+			_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+
+			_globals._animationIndexes[2] = _scene->loadAnimation(formAnimName('f', 1), 1);
+			_florentStatus = 1;
+			_anim_2_running = true;
+
+			_globals._animationIndexes[3] = _scene->loadAnimation(formAnimName('r', 1), 1);
+			_raoulAction = 3;
+			_anim_3_running = true;
+			_scene->setAnimFrame(_globals._animationIndexes[3], 33);
+
+			if (_globals[kFlorentNameIsKnown] >= 1) {
+				_christineHotspotId2 = _scene->_dynamicHotspots.add(NOUN_CHRISTINE, VERB_WALK_TO, SYNTAX_SINGULAR_FEM, EXT_NONE, Common::Rect(43, 118, 43 + 15, 118 + 29));
+				_scene->_dynamicHotspots[_christineHotspotId2]._articleNumber = PREP_ON;
+				_scene->_dynamicHotspots.setPosition(_christineHotspotId2, Common::Point(106, 127), FACING_SOUTHWEST);
+			} else {
+				_christineHotspotId2 = _scene->_dynamicHotspots.add(NOUN_WOMAN, VERB_WALK_TO, SYNTAX_FEM_NOT_PROPER, EXT_NONE, Common::Rect(43, 118, 43 + 15, 118 + 29));
+				_scene->_dynamicHotspots[_christineHotspotId2]._articleNumber = PREP_ON;
+				_scene->_dynamicHotspots.setPosition(_christineHotspotId2, Common::Point(106, 127), FACING_SOUTHWEST);
+			}
+
+			_game._player._playerPos = Common::Point(190, 148);
+			_game._player._facing = FACING_NORTH;
+
+			_scene->_hotspots.activate(NOUN_DRESSING_GOWN, true);
+			if (_game._objects.isInRoom(OBJ_SMALL_NOTE)) {
+				_scene->_hotspots.activate(NOUN_SMALL_NOTE, true);
+				_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 13);
+			}
+		}
+	} else if ((_globals[kCurrentYear] == 1881) && (! _globals[kChrisKickedRaoulOut])) {
+		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('r', 1), 1);
+		_raoulAction = 3;
+		_anim_1_running = true;
+		_scene->setAnimFrame(_globals._animationIndexes[1], 33);
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 1), 1);
+		_dayStatus = 2;
+		_anim_0_running = true;
+
+		_scene->_hotspots.activate(NOUN_CHRISTINE, true);
+		_scene->_hotspots.activateAtPos(NOUN_CHRISTINE, false, Common::Point(220, 130));
+		_scene->_sequences.setTimingTrigger(60, 60);
+		_game._player._playerPos = Common::Point(190, 148);
+		_game._player._facing = FACING_NORTH;
+	} else if ((_globals[kCurrentYear] == 1881) && _globals[kChrisKickedRaoulOut]) {
+		_globals[kChrisKickedRaoulOut] = 2;
+		_game._player._playerPos = Common::Point(190, 148);
+		_game._player._facing = FACING_NORTH;
+		_globals[kCameFromFade] = true;
+		_game._player._stepEnabled = false;
+		_globals[kPlayerScore] += 8;
+		_scene->_sequences.setTimingTrigger(60, 110);
+	} else if (_scene->_priorSceneId == 111) {
+		_game._player._playerPos = Common::Point(190, 148);
+		_game._player._facing = FACING_NORTH;
+	}
+
+	switch (_vm->_gameConv->_restoreRunning) {
+	case 4:
+		_vm->_gameConv->run(4);
+		_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+		break;
+
+	case 6:
+		_vm->_gameConv->run(6);
+		break;
+
+	case 13:
+		_vm->_gameConv->run(13);
+		_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+		break;
+
+	default:
+		break;
+	}
+
+	sceneEntrySound();
+}
+
+void Scene113::step() {
+	if (_anim_1_running)
+		handle_animation_13_raoul();
+
+	if (_anim_4_running)
+		handle_animation_6_julie();
+
+	if (_anim_2_running)
+		handle_animation_florent();
+
+	if (_anim_3_running) {
+		handle_animation_4_raoul();
+
+		if ((!_game._objects.isInInventory(OBJ_SMALL_NOTE)) && (_scene->_animation[_globals._animationIndexes[3]]->getCurrentFrame() == 26)) {
+			_scene->_hotspots.activate(NOUN_SMALL_NOTE, false);
+			_game._objects.addToInventory(OBJ_SMALL_NOTE);
+			_scene->deleteSequence(_globals._sequenceIndexes[1]);
+			_vm->_sound->command(26);
+			_scene->_speechReady = -1;
+			_vm->_dialogs->showItem(OBJ_SMALL_NOTE, 806, 2);
+		}
+	}
+
+	if ((_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 86) && (!_prevent_2)) {
+		_scene->freeAnimation(_globals._animationIndexes[0]);
+		_prevent_2 = true;
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 2), 0);
+		_scene->setAnimFrame (_globals._animationIndexes[0], 86);
+		_game.syncTimers(3, _globals._animationIndexes[0], 4, 0);
+		_scene->animations_tick();
+	}
+
+	if (_anim_0_running) {
+		handle_animation_13_day();
+
+		if ((_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 95) && (!_arms_are_out)) {
+			_standing_talking = true;
+			_dayStatus = 7;
+			_raoulAction = 3;
+			_arms_are_out = true;
+			_game.syncTimers(3, _globals._animationIndexes[0], 3, _globals._animationIndexes[1]);
+		}
+
+		if ((_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 165) && !_right_after_kiss)
+			_right_after_kiss = true;
+	}
+
+	switch (_game._trigger) {
+	case 60:
+		if (!_game._visitedScenes._sceneRevisited)
+			_vm->_dialogs->show(11342);
+		break;
+
+	case 102:
+		_game._player._stepEnabled = true;
+		_vm->_gameConv->run(6);
+		break;
+
+	case 108:
+		_vm->_dialogs->show(11332);
+		_vm->_dialogs->show(11333);
+		_scene->_nextSceneId = 150;
+		_globals[kLeaveAngelMusicOn] = false;
+		break;
+
+	case 110:
+		_vm->_dialogs->show(11331);
+		_game._player.walk(Common::Point(272, 138), FACING_EAST);
+		_game._player.setWalkTrigger(108);
+		break;
+
+	default:
+		break;
+	}
+}
+
+void Scene113::actions() {
+	if (_vm->_gameConv->_running == 13) {
+		process_conversation_love();
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_vm->_gameConv->_running == 4) {
+		process_conversation_florent();
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_vm->_gameConv->_running == 6) {
+		process_conversation_dead();
+		_action._inProgress = false;
+		return;
+	}
+
+	if ((_action.isAction(VERB_TALK_TO, NOUN_WOMAN)) || (_action.isAction(VERB_TALK_TO, NOUN_CHRISTINE))) {
+		if (_globals[kCurrentYear] == 1881) {
+			_game._player._stepEnabled = true;
+			_vm->_gameConv->run(13);
+			_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+		} else if (_globals[kDoneBrieConv203]) {
+			_vm->_dialogs->show(11348);
+		} else {
+			_game._player._stepEnabled = true;
+			_vm->_gameConv->run(4);
+			_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_EXIT_TO, NOUN_CORRIDOR)) {
+		if (_globals[kDoneBrieConv203] == 1)
+			_globals[kDoneBrieConv203] = 3;
+
+		_scene->_nextSceneId = 111;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action._lookFlag) {
+		if (_globals[kCurrentYear] == 1993) {
+			if (_globals[kDoneBrieConv203])
+				_vm->_dialogs->show(11340);
+			else
+				_vm->_dialogs->show(11310);
+		} else {
+			_vm->_dialogs->show(11311);
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isAction(NOUN_FLOOR)) {
+			_vm->_dialogs->show(11312);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_RUG)) {
+			_vm->_dialogs->show(11313);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WALL)) {
+			_vm->_dialogs->show(11314);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_COUCH)) {
+			_vm->_dialogs->show(11315);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_MURAL)) {
+			_vm->_dialogs->show(11316);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PAINTING)) {
+			if (_globals[kCurrentYear] == 1881)
+				_vm->_dialogs->show(11317);
+			else
+				_vm->_dialogs->show(11343);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_PAINTING)) {
+			_vm->_dialogs->show(11317);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_DRESSING_TABLE)) {
+			_vm->_dialogs->show(11318);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CHAIR)) {
+			_vm->_dialogs->show(11319);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_MIRROR)) {
+			if (_globals[kCurrentYear] == 1993) {
+				_vm->_dialogs->show(11344);
+			} else {
+				_vm->_dialogs->show(11320);
+			}
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_FAN)) {
+			_vm->_dialogs->show(11321);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_VASE)) {
+			_vm->_dialogs->show(11322);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_HAT_RACK)) {
+			_vm->_dialogs->show(11323);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_LIGHT_FIXTURE)) {
+			_vm->_dialogs->show(11324);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CEILING)) {
+			_vm->_dialogs->show(11325);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WARDROBE)) {
+			_vm->_dialogs->show(11326);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_DRESSING_SCREEN)) {
+			_vm->_dialogs->show(11327);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CORRIDOR)) {
+			_vm->_dialogs->show(11328);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_DRESSING_GOWN)) {
+			_vm->_dialogs->show(11330);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_SMALL_NOTE) && _game._objects.isInRoom(OBJ_SMALL_NOTE)) {
+			_vm->_dialogs->show(11349);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CHRISTINE) && _globals[kDoneBrieConv203]) {
+			_vm->_dialogs->show(11338);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_JULIE)) {
+			_vm->_dialogs->show(11339);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_NOTICE)) {
+			_vm->_dialogs->show(11347);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_CLOTHES_DUMMY)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(11345);
+			else
+				_vm->_dialogs->show(11346);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isAction(NOUN_WOMAN) || _action.isAction(NOUN_CHRISTINE)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(11341);
+			else {
+				if (_music_is_playing)
+					_vm->_dialogs->show(11336);
+				else
+					_vm->_dialogs->show(11342);
+			}
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_WARDROBE)) {
+		_vm->_dialogs->show(11329);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_SMALL_NOTE) && _game._objects.isInRoom(OBJ_SMALL_NOTE)) {
+		_vm->_dialogs->show(11334);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_DRESSING_GOWN)) {
+		_vm->_dialogs->show(11335);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_CHRISTINE) || _action.isAction(VERB_TAKE, NOUN_WOMAN)) {
+		_vm->_dialogs->show(11337);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene113::preActions() {
+	if (_action.isAction(VERB_WALK_UP, NOUN_AISLE))
+		_game._player._walkOffScreenSceneId = 101;
+
+	if (_action.isAction(VERB_LOOK, NOUN_MIRROR))
+		_game._player.walk(Common::Point(272, 138), FACING_EAST);
+
+	if (! _action.isAction(VERB_EXIT_TO, NOUN_CORRIDOR) && !_globals[kChrisKickedRaoulOut]
+	 && !_action.isAction(VERB_LOOK, NOUN_CHRISTINE) && !_action.isAction(VERB_TAKE, NOUN_CHRISTINE) && _music_is_playing) {
+		_vm->_gameConv->run(13);
+		_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+		_game._player.cancelCommand();
+	} else if (_action.isAction(VERB_TALK_TO, NOUN_WOMAN) || _action.isAction(VERB_TALK_TO, NOUN_CHRISTINE)) {
+		_game._player.walk(Common::Point(106, 127), FACING_SOUTHWEST);
+	}
+
+	if (!_action.isAction(VERB_EXIT_TO, NOUN_CORRIDOR) && !_action.isAction(VERB_LOOK, NOUN_JULIE)
+	 && !_action.isAction(VERB_LOOK, NOUN_CHRISTINE) && !_action._lookFlag && (_globals[kDoneBrieConv203] != 0)
+	 && (_globals[kCurrentYear] == 1993)) {
+		if (_action.isAction(VERB_TALK_TO, NOUN_CHRISTINE)) {
+			_game._player._needToWalk = false;
+
+		} else if (_action.isAction(VERB_LOOK)) {
+			_game._player._needToWalk = false;
+
+		} else if (_action.isAction(VERB_TALK_TO, NOUN_JULIE)) {
+			_game._player._needToWalk = false;
+			_vm->_gameConv->run(6);
+			_game._player.cancelCommand();
+
+		} else {
+			_vm->_dialogs->show(11350);
+			_game._player._needToWalk = false;
+			_game._player.cancelCommand();
+		}
+	}
+}
+
+void Scene113::handle_animation_florent() {
+	if (_scene->_animation[_globals._animationIndexes[2]]->getCurrentFrame() == _florentFrame)
+		return;
+
+	int random;
+	_florentFrame = _scene->_animation[_globals._animationIndexes[2]]->getCurrentFrame();
+	int resetFrame = -1;
+
+	switch (_florentFrame) {
+	case 1:
+	case 11:
+	case 23:
+	case 38:
+	case 45:
+		random = _vm->getRandomNumber(4, 30);
+
+		if (_florentStatus == 2) {
+			random = 1;
+		}
+
+		if (_florentStatus == 0) {
+			random = 2;
+		}
+
+		if (_florentStatus == 3) {
+			random = 3;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 2;
+			_florentStatus = 1;
+			break;
+
+		case 2:
+			resetFrame = 28;
+			break;
+
+		case 3:
+			resetFrame = 39;
+			break;
+
+		case 4:
+			resetFrame = 12;
+			break;
+
+		default:
+			resetFrame = 0;
+			break;
+		}
+		break;
+
+	case 24:
+	case 25:
+	case 26:
+	case 27:
+	case 33:
+		random = _vm->getRandomNumber(5, 20);
+
+		if (_florentStatus == 0) {
+			random = _vm->getRandomNumber(1, 4);
+			++_florentCount;
+			if (_florentCount > 5) {
+				_florentStatus = 1;
+				random = 5;
+			}
+		}
+
+		if ((_florentStatus == 2) ||
+			(_florentStatus == 3)) {
+				random = 5;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 23;
+			break;
+
+		case 2:
+			resetFrame = 24;
+			break;
+
+		case 3:
+			resetFrame = 25;
+			break;
+
+		case 4:
+			resetFrame = 26;
+			break;
+
+		case 5:
+			resetFrame = 34;
+			break;
+
+		default:
+			resetFrame = 32;
+			break;
+		}
+		break;
+
+	case 42:
+		if (_florentStatus == 3)
+			resetFrame = 41;
+
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[2], resetFrame);
+		_florentFrame = resetFrame;
+	}
+}
+
+void Scene113::handle_animation_13_day() {
+	if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == _dayFrame)
+		return;
+
+	_dayFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
+	int random;
+	int resetFrame = -1;
+	switch (_dayFrame) {
+	case 1:
+	case 4:
+	case 14:
+	case 17:
+	case 20:
+	case 26:
+	case 166:
+	case 206:
+	case 207:
+	case 208:
+	case 209:
+	case 210:
+	case 211:
+	case 219:
+	case 231:
+	case 253:
+		switch (_dayStatus) {
+		case 0:
+			random = _vm->getRandomNumber(1, 3);
+			++_dayCount;
+			if (_dayCount < 6) {
+				if (random == 1) {
+					resetFrame = 1;
+				} else if (random == 2) {
+					resetFrame = 15;
+				} else {
+					resetFrame = 18;
+				}
+			} else {
+				_dayStatus = 1;
+				resetFrame = 25;
+				_day_wants_to_talk = false;
+			}
+			break;
+
+		case 1:
+			if (_day_wants_to_talk) {
+				_dayStatus = 0;
+				_day_wants_to_talk = false;
+				resetFrame = 1;
+			} else {
+				resetFrame = 25;
+			}
+			break;
+
+		case 2:
+			random = _vm->getRandomNumber(1, 50);
+			switch (random) {
+			case 1:
+				resetFrame = 212;
+				break;
+
+			case 2:
+				resetFrame = 219;
+				break;
+
+			case 3:
+				resetFrame = 231;
+				break;
+
+			default:
+				resetFrame = 0;
+				break;
+			}
+			break;
+
+		case 3:
+			resetFrame = 5;
+			_dayStatus = 0;
+			break;
+
+		case 4:
+			resetFrame = 31;
+			break;
+
+		case 5:
+			resetFrame = _vm->getRandomNumber(205, 207);
+			++_standCount;
+			if (_standCount > 18) {
+				_dayStatus = 7;
+				resetFrame = 165;
+			}
+			if (_music_is_playing)
+				resetFrame = 167;
+			break;
+
+		case 6:
+			resetFrame = _vm->getRandomNumber(208, 210);
+			while (_lastDayResetFrame == resetFrame)
+				resetFrame = _vm->getRandomNumber(208, 210);
+
+			_lastDayResetFrame = resetFrame;
+
+			++_standCount;
+			if (_standCount > 18) {
+				_dayStatus = 7;
+				resetFrame = 165;
+			}
+
+			if (_music_is_playing)
+				resetFrame = 167;
+			break;
+
+		case 7:
+			resetFrame = 165;
+			if (_music_is_playing)
+				resetFrame = 167;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 182:
+		_game._player._visible = true;
+		_vm->_gameConv->release();
+		_game.syncTimers(2, 0, 3, _globals._animationIndexes[1]);
+		_game._player._playerPos = Common::Point(175, 148);
+		_game._player._turnToFacing = FACING_NORTHEAST;
+		_game._player.resetFacing(FACING_SOUTHEAST);
+		_game._player._turnToFacing = FACING_NORTHEAST;
+		break;
+
+	case 205:
+	case 212:
+		resetFrame = 211;
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
+		_dayFrame = resetFrame;
+	}
+}
+
+void Scene113::handle_animation_4_raoul() {
+	if (_globals[kFlorentNameIsKnown] == 2)
+		_raoulAction = 3;
+
+	if (_scene->_animation[_globals._animationIndexes[3]]->getCurrentFrame() == _raoulFrame)
+		return;
+		
+	_raoulFrame = _scene->_animation[_globals._animationIndexes[3]]->getCurrentFrame();
+	int resetFrame = -1;
+
+	switch (_raoulFrame) {
+	case 9:
+	case 10:
+	case 11:
+	case 34:
+	case 33:
+		if (_raoulFrame == 33)
+			_vm->_gameConv->release();
+
+		switch (_raoulAction) {
+		case 0:
+			resetFrame = _vm->getRandomNumber(7, 9);
+			++_raoulCount;
+
+			if (_raoulCount > 17) {
+				_raoulAction = 1;
+				resetFrame = 8;
+			}
+			break;
+
+		case 1:
+			resetFrame = 8;
+			break;
+
+		case 2:
+			resetFrame = 11;
+			break;
+
+		case 3:
+			resetFrame = 33;
+			break;
+
+		case 4:
+			resetFrame = 38;
+			_raoul_is_up = true;
+			_vm->_gameConv->hold();
+			break;
+
+		case 5:
+			resetFrame = 20;
+			_raoulAction = 1;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 19:
+		if ((_raoulAction == 5) && (!_game._objects.isInInventory(OBJ_SMALL_NOTE))) {
+			resetFrame = 20;
+			_raoulAction = 1;
+		} else if (_raoulAction == 4) {
+			resetFrame = 38;
+			_raoul_is_up = true;
+		} else if (_raoulAction == 0) {
+			resetFrame = 9;
+		} else {
+			resetFrame = 8;
+			_raoulAction = 1;
+		}
+		break;
+
+	case 42:
+		if (_raoulAction == 4) {
+			if (!_prevent_2) {
+				_vm->_gameConv->release();
+			}
+			resetFrame = 33;
+			_raoulAction = 3;
+			_game._player._visible = true;
+			_game.syncTimers(2, 0, 3, _globals._animationIndexes[3]);
+		}
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[3], resetFrame);
+		_raoulFrame = resetFrame;
+	}
+}
+
+void Scene113::handle_animation_13_raoul() {
+	if (_scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame() == _raoulFrame)
+		return;
+
+	_raoulFrame = _scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame();
+	int resetFrame = -1;
+	switch (_raoulFrame) {
+	case 9:
+	case 10:
+	case 11:
+	case 34:
+		switch (_raoulAction) {
+		case 0:
+			resetFrame = _vm->getRandomNumber(7, 9);
+			++_raoulCount;
+
+			if (_raoulCount > 17) {
+				_raoulAction = 1;
+				resetFrame = 8;
+			}
+			break;
+
+		case 1:
+			resetFrame = 8;
+			break;
+
+		case 2:
+			resetFrame = 11;
+			break;
+
+		case 3:
+			resetFrame = 33;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 19:
+		if (_raoulAction == 0)
+			resetFrame = 9;
+		else {
+			resetFrame = 8;
+			_raoulAction = 1;
+		}
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[1], resetFrame);
+		_raoulFrame = resetFrame;
+	}
+}
+
+void Scene113::handle_animation_6_julie() {
+	if (_scene->_animation[_globals._animationIndexes[4]]->getCurrentFrame() == _julieFrame)
+		return;
+
+	_julieFrame = _scene->_animation[_globals._animationIndexes[4]]->getCurrentFrame();
+	int resetFrame = -1;
+	int random;
+
+	switch (_julieFrame) {
+	case 1:
+	case 2:
+	case 3:
+	case 11:
+	case 16:
+	case 17:
+		switch (_julieStatus) {
+		case 0:
+			random = _vm->getRandomNumber(4, 20);
+			break;
+
+		case 1:
+			random = _vm->getRandomNumber(1, 3);
+			++_julieCount;
+			if (_julieCount > 20) {
+				_julieStatus = 0;
+				random = 6;
+			}
+			break;
+
+		default:
+			random = -1;
+			break;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 0;
+			break;
+
+		case 2:
+			resetFrame = 1;
+			break;
+
+		case 3:
+			resetFrame = 2;
+			break;
+
+		case 4:
+			resetFrame = 12;
+			break;
+
+		case 5:
+			resetFrame = 4;
+			break;
+
+		default:
+			resetFrame = 16;
+			break;
+		}
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[4], resetFrame);
+		_julieFrame = resetFrame;
+	}
+}
+
+void Scene113::process_conversation_dead() {
+	switch (_game._trigger) {
+	case 106:
+		_julieStatus = 1;
+		break;
+
+	case 104:
+		_julieStatus = 0;
+		break;
+
+	default:
+		break;
+	}
+
+	_vm->_gameConv->setInterlocutorTrigger(106);
+	_vm->_gameConv->setHeroTrigger(104);
+
+	_julieCount = 0;
+}
+
+void Scene113::process_conversation_florent() {
+	int random;
+
+	switch (_action._activeAction._verbId) {
+	case 3:
+	case 4:
+		if (!_prevent_1) {
+			_globals[kFlorentNameIsKnown] = 1;
+			_vm->_gameConv->setInterlocutorTrigger(82);
+			_scene->_dynamicHotspots.remove(_christineHotspotId2);
+			_christineHotspotId2 = _scene->_dynamicHotspots.add(NOUN_CHRISTINE, VERB_WALK_TO, SYNTAX_SINGULAR_FEM, EXT_NONE, Common::Rect(43, 118, 43 + 15, 118 + 29));
+			_scene->_dynamicHotspots[_christineHotspotId2]._articleNumber = PREP_ON;
+			_scene->_dynamicHotspots.setPosition(_christineHotspotId2, Common::Point(106, 127), FACING_SOUTHWEST);
+			_prevent_1 = true;
+		}
+		break;
+
+	case 19:
+		_florentStatus = 2;
+		_vm->_gameConv->setInterlocutorTrigger(86);
+		break;
+
+	case 25:
+		if (_raoulAction != 3)
+			_raoulAction = 4;
+		break;
+
+	case 26:
+		if (!_prevent_2) {
+			_scene->_sequences.setTimingTrigger(120, 92);
+			_vm->_gameConv->setInterlocutorTrigger(96);
+			_florentStatus = 0;
+			_prevent_2 = true;
+		}
+		break;
+
+	case 27:
+	case 30:
+		_vm->_gameConv->setInterlocutorTrigger(98);
+		break;
+
+	case 28:
+	case 29:
+		_vm->_gameConv->setInterlocutorTrigger(100);
+		break;
+
+	default:
+		break;
+	}
+
+	switch (_game._trigger) {
+	case 62:
+		if ((_action._activeAction._verbId != 3) && (_action._activeAction._verbId != 4) && (_action._activeAction._verbId != 19) &&
+			(_action._activeAction._verbId != 27) && (_action._activeAction._verbId != 28) && (_action._activeAction._verbId != 29)) {
+				if ((_raoulAction != 5) && (_raoulAction != 4) && !_raoul_is_up)
+					_raoulAction = 0;
+
+				if ((_florentStatus != 3) && (_florentStatus != 2))
+					_florentStatus = 1;
+		}
+		break;
+
+	case 66:
+		if ((_florentStatus != 3) &&
+			(_florentStatus != 2)) {
+				random = _vm->getRandomNumber(1,5);
+				if (random == 1)
+					_florentStatus = 0;
+		}
+
+		if ((_raoulAction != 3) && (_raoulAction != 5) && (_raoulAction != 4) && (!_raoul_is_up)) {
+			_raoulAction = 1;
+			random = _vm->getRandomNumber(1, 2);
+			if (random == 1)
+				_raoulAction = 2;
+		}
+		break;
+
+	case 80:
+		_vm->_gameConv->release();
+		_game._player._visible = false;
+		_raoulAction = 1;
+		_game.syncTimers(3, _globals._animationIndexes[3], 2, 0);
+		_scene->setAnimFrame(_globals._animationIndexes[3], 1);
+		break;
+
+	case 82:
+		_florentStatus = 0;
+		_scene->_sequences.setTimingTrigger(120, 84);
+		_vm->_gameConv->hold();
+		break;
+
+	case 84:
+		_game._player.walk(Common::Point(201, 120), FACING_SOUTH);
+		_game._player.setWalkTrigger(80);
+		break;
+
+	case 86:
+		_raoulAction = 5;
+		_vm->_gameConv->hold();
+		break;
+
+	case 92:
+		_game._player.walk(Common::Point(68, 142), FACING_SOUTHWEST);
+		_game._player.setWalkTrigger(94);
+		break;
+
+	case 94:
+		_globals[kStopWalkerDisabled] = true;
+		_globals[kFlorentNameIsKnown] = 2;
+		_vm->_gameConv->release();
+		break;
+
+	case 96:
+		_vm->_gameConv->hold();
+		break;
+
+	case 98:
+		_florentStatus = 3;
+		break;
+
+	case 100:
+		_florentStatus = 1;
+		_globals[kStopWalkerDisabled] = false;
+		break;
+
+	default:
+		break;
+	}
+
+	if ((_action._activeAction._verbId != 3) && (_action._activeAction._verbId != 4) && (_action._activeAction._verbId != 19) &&
+		(_action._activeAction._verbId != 28) && (_action._activeAction._verbId != 29) && (_action._activeAction._verbId != 27) &&
+		(_action._activeAction._verbId != 30) && (_action._activeAction._verbId != 26))
+		_vm->_gameConv->setInterlocutorTrigger(66);
+
+	_vm->_gameConv->setHeroTrigger(62);
+	_raoulCount = 0;
+	_florentCount = 0;
+}
+
+void Scene113::process_conversation_love() {
+	int random;
+
+	switch (_action._activeAction._verbId) {
+	case 1:
+	case 2:
+		if (!_prevent_1) {
+			_vm->_gameConv->setInterlocutorTrigger(82);
+			_prevent_1 = true;
+		}
+		break;
+
+	case 21:
+		if (!_arms_are_out) {
+			_dayStatus = 4;
+			_scene->_sequences.setTimingTrigger(1, 70);
+			_scene->_userInterface.emptyConversationList();
+			_scene->_userInterface.setup(kInputConversation);
+			_scene->_hotspots.activate(NOUN_CHRISTINE, false);
+			_vm->_gameConv->hold();
+		}
+		break;
+
+	case 27:
+		_vm->_sound->command(34);
+		_globals[kLeaveAngelMusicOn] = true;
+		break;
+
+	case 31:
+		if (!_music_is_playing) {
+			_vm->_gameConv->hold();
+			_dayStatus = 7;
+			_music_is_playing = true;
+			_christineHotspotId1 = _scene->_dynamicHotspots.add(NOUN_CHRISTINE, VERB_WALK_TO, SYNTAX_SINGULAR_FEM, EXT_NONE, Common::Rect(0, 0, 0, 0));
+			_scene->_dynamicHotspots[_christineHotspotId1]._articleNumber = PREP_ON;
+			_scene->setDynamicAnim(_christineHotspotId1, _globals._animationIndexes[0], 14);
+			_scene->setDynamicAnim(_christineHotspotId1, _globals._animationIndexes[0], 16);
+		}
+		break;
+	}
+
+	switch (_game._trigger) {
+	case 62:
+		if (_action._activeAction._verbId != 0) {
+			if (_standing_talking) {
+				_dayStatus = 6;
+			} else if (_dayStatus != 4) {
+				_dayStatus = 1;
+				_raoulAction = 0;
+				_day_wants_to_talk = false;
+			}
+		}
+		break;
+
+	case 66:
+		if (_standing_talking) {
+			_dayStatus = 5;
+
+		} else {
+			if (_action._activeAction._verbId == 19) {
+				_dayStatus = 3;
+			} else {
+				_dayStatus = 1;
+				_day_wants_to_talk = true;
+			}
+
+			if (_raoulAction != 3) {
+				_raoulAction = 1;
+				random = _vm->getRandomNumber(1, 2);
+				if (random == 1) {
+					_raoulAction = 2;
+				}
+			}
+		}
+		break;
+
+	case 70:
+		if (_arms_are_out) {
+			_vm->_gameConv->release();
+			_vm->_gameConv->setInterlocutorTrigger(76);
+		}
+		break;
+
+	case 72:
+		if (_right_after_kiss)
+			_vm->_gameConv->release();
+		else
+			_scene->_sequences.setTimingTrigger(1, 72);
+		break;
+
+	case 76:
+		_vm->_gameConv->hold();
+		_scene->_sequences.setTimingTrigger(1, 72);
+		break;
+
+	case 78:
+		if (_arms_are_out) {
+			_vm->_gameConv->release();
+			_vm->_gameConv->setInterlocutorTrigger(76);
+		}
+		break;
+
+	case 80:
+		_vm->_gameConv->release();
+		_game._player._visible = false;
+		_raoulAction = 1;
+		_game.syncTimers(3, _globals._animationIndexes[1], 2, 0);
+		_scene->setAnimFrame(_globals._animationIndexes[1], 1);
+		break;
+
+	case 82:
+		_scene->_sequences.setTimingTrigger(120, 84);
+		_vm->_gameConv->hold();
+		_dayStatus = 1;
+		_day_wants_to_talk = true;
+		break;
+
+	case 84:
+		_game._player.walk(Common::Point(201, 120), FACING_SOUTH);
+		_game._player.setWalkTrigger(80);
+		break;
+
+	default:
+		break;
+	}
+
+	if ((_action._activeAction._verbId != 21) && (_action._activeAction._verbId != 1) && (_action._activeAction._verbId != 2))
+		_vm->_gameConv->setInterlocutorTrigger(66);
+
+	_vm->_gameConv->setHeroTrigger(62);
+
+	_raoulCount = 0;
+	_dayCount = 0;
+	_standCount = 0;
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 05cf173..820cc7d 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -338,6 +338,59 @@ public:
 	virtual void actions();
 };
 
+class Scene113 : public Scene1xx {
+private:
+	bool _standing_talking;
+	bool _day_wants_to_talk;
+	bool _music_is_playing;
+	bool _right_after_kiss;
+	bool _anim_0_running;
+	bool _anim_1_running;
+	bool _anim_2_running;
+	bool _anim_3_running;
+	bool _anim_4_running;
+	bool _prevent_1;
+	bool _prevent_2;
+	bool _raoul_is_up;
+	bool _arms_are_out;
+
+	int _christineHotspotId1;
+	int _christineHotspotId2;
+	int _dayStatus;
+	int _dayFrame;
+	int _dayCount;
+	int _florentStatus;
+	int _florentFrame;
+	int _florentCount;
+	int _julieStatus;
+	int _julieFrame;
+	int _julieCount;
+	int _raoulAction;
+	int _raoulFrame;
+	int _raoulCount;
+	int _lastDayResetFrame;
+	int _standCount;
+
+	void handle_animation_florent();
+	void handle_animation_13_day();
+	void handle_animation_4_raoul();
+	void handle_animation_13_raoul();
+	void handle_animation_6_julie();
+	void process_conversation_dead();
+	void process_conversation_florent();
+	void process_conversation_love();
+
+public:
+	Scene113(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
+
 } // End of namespace Phantom
 } // End of namespace MADS
 
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index d62e333..ea5943c 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -61,6 +61,7 @@ Scene::Scene(MADSEngine *vm)
 	_spritesCount = 0;
 	_variant = 0;
 	_initialVariant = 0;
+	_speechReady = -1;
 
 	_paletteUsageF.push_back(PaletteUsage::UsageEntry(0xF));
 
@@ -432,10 +433,7 @@ void Scene::doFrame() {
 				_sequences.tick();
 
 				// Handle any active animation
-				for (int i = 0; i < 10; i++) {
-					if (_animation[i])
-						_animation[i]->update();
-				}
+				animations_tick();
 			}
 
 			// If the debugget flag is set, show the mouse position
@@ -794,4 +792,13 @@ void Scene::playSpeech(int idx) {
 void Scene::sceneScale(int front_y, int front_scale, int back_y,  int back_scale) {
 	warning("TODO: Scene:scaleRoom");
 }
+
+void Scene::animations_tick() {
+	warning("TODO: Implement _animations as an AnimationList and refactor (and check implementation)");
+	for (int i = 0; i < 10; i++) {
+		if (_animation[i])
+			_animation[i]->update();
+	}
+}
+
 } // End of namespace MADS
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index 9289593..f0b4326 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -129,7 +129,7 @@ public:
 	Common::Point _customDest;
 	Common::Array<PaletteUsage::UsageEntry> _paletteUsageF;
 	Common::Array<PaletteUsage::UsageEntry> _scenePaletteUsage;
-
+	int _speechReady;
 	/**
 	 * Constructor
 	 */
@@ -265,6 +265,7 @@ public:
 	void loadSpeech(int idx);
 	void playSpeech(int idx);
 	void sceneScale(int front_y, int front_scale, int back_y,  int back_scale);
+	void animations_tick();
 };
 
 } // End of namespace MADS


Commit: 5b02ca13163eaacbf930e9626f91b8fbe0851d32
    https://github.com/scummvm/scummvm/commit/5b02ca13163eaacbf930e9626f91b8fbe0851d32
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-20T16:29:20+02:00

Commit Message:
MADS: Phantom: Fix calls to setDynamicAnim in Scene 101

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 2ed2cbf..17b2a8a 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -194,28 +194,25 @@ void Scene101::enter() {
 		_brieAnimId = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(0, 0, 0, 0));
 		_scene->_dynamicHotspots[_brieAnimId]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_brieAnimId, Common::Point(490, 119), FACING_NONE);
-		// FIXME: 2nd parameter is wrong
-		_scene->setDynamicAnim(_brieAnimId, 0, 0);
-		_scene->setDynamicAnim(_brieAnimId, 0, 1);
-		_scene->setDynamicAnim(_brieAnimId, 0, 2);
-		_scene->setDynamicAnim(_brieAnimId, 0, 3);
-		_scene->setDynamicAnim(_brieAnimId, 0, 4);
+		_scene->setDynamicAnim(_brieAnimId, _globals._animationIndexes[0], 0);
+		_scene->setDynamicAnim(_brieAnimId, _globals._animationIndexes[0], 1);
+		_scene->setDynamicAnim(_brieAnimId, _globals._animationIndexes[0], 2);
+		_scene->setDynamicAnim(_brieAnimId, _globals._animationIndexes[0], 3);
+		_scene->setDynamicAnim(_brieAnimId, _globals._animationIndexes[0], 4);
 
 		int tmpIdx = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(0, 0, 0, 0));
 		_scene->_dynamicHotspots[tmpIdx]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(tmpIdx, Common::Point(25, 80), FACING_NONE);
-		//FIXME: 2nd paramater is wrong
-		_scene->setDynamicAnim(tmpIdx, 1, 1);
-		_scene->setDynamicAnim(tmpIdx, 1, 2);
+		_scene->setDynamicAnim(tmpIdx, _globals._animationIndexes[1], 1);
+		_scene->setDynamicAnim(tmpIdx, _globals._animationIndexes[1], 2);
 
 		_talkCounter = 0;
 	} else if (_globals[kBrieTalkStatus] == 1) {
 		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('b', 9), 1);
 		_brieAnimId = _scene->_dynamicHotspots.add(NOUN_MONSIEUR_BRIE, VERB_WALKTO, SYNTAX_SINGULAR_MASC, EXT_NONE, Common::Rect(0, 0, 0, 0));
 		_scene->_dynamicHotspots[_brieAnimId]._articleNumber = PREP_ON;
-		//FIXME: 2nd parameter is wrong
-		_scene->setDynamicAnim(_brieAnimId, 1, 1);
-		_scene->setDynamicAnim(_brieAnimId, 1, 2);
+		_scene->setDynamicAnim(_brieAnimId, _globals._animationIndexes[1], 1);
+		_scene->setDynamicAnim(_brieAnimId, _globals._animationIndexes[1], 2);
 		_anim1Running = true;
 		_talkCounter = 0;
 		_chandelierStatus = 3;
@@ -498,104 +495,107 @@ void Scene101::handleAnimation0() {
 }
 
 void Scene101::handleAnimation1() {
-	int random;
-	int resetFrame;
+	if (_scene->getAnimFrame(_globals._animationIndexes[1]) == _chandelierFrame)
+		return;
 
-	if (_scene->getAnimFrame(_globals._animationIndexes[1]) != _chandelierFrame) {
-		_chandelierFrame = _scene->getAnimFrame(_globals._animationIndexes[1]);
-		resetFrame = -1;
-		switch (_chandelierFrame) {
-		case 1:
-			if (_chandelierStatus == 3)
-				resetFrame = 0;
-			break;
+	_chandelierFrame = _scene->getAnimFrame(_globals._animationIndexes[1]);
+	int resetFrame = -1;
+	switch (_chandelierFrame) {
+	case 1:
+		if (_chandelierStatus == 3)
+			resetFrame = 0;
+		break;
 
-		case 11:
-		case 14:
-		case 17:
-		case 19:
-		case 26:
-		case 44:
-		case 333:
-			if (_talkCounter == _chanStatus) {
-				_chandelierStatus = 0;
-				++_talkCounter;
-				_chanStatus = -1;
-			}
+	case 11:
+	case 14:
+	case 17:
+	case 19:
+	case 26:
+	case 44:
+	case 333:
+		if (_talkCounter == _chanStatus) {
+			_chandelierStatus = 0;
+			++_talkCounter;
+			_chanStatus = -1;
+		}
 
-			if (_talkCounter == _wipeStatus) {
-				_chandelierStatus = 6;
-				++_talkCounter;
-				_wipeStatus = -1;
-			}
+		if (_talkCounter == _wipeStatus) {
+			_chandelierStatus = 6;
+			++_talkCounter;
+			_wipeStatus = -1;
+		}
 
-			if (_startWalkingFl) {
-				if (_vm->_gameConv->_running == 1) {
-					if (_talkCounter > 13)
-						_chandelierStatus = 1;
-				} else
+		if (_startWalkingFl) {
+			if (_vm->_gameConv->_running == 1) {
+				if (_talkCounter > 13)
 					_chandelierStatus = 1;
-			}
+			} else
+				_chandelierStatus = 1;
+		}
 
-			switch (_chandelierStatus) {
-			case 0:
-				resetFrame = 27;
-				_chandelierStatus = 2;
-				break;
+		switch (_chandelierStatus) {
+		case 0:
+			resetFrame = 27;
+			_chandelierStatus = 2;
+			break;
 
-			case 1:
-				_globals[kBrieTalkStatus] = 2;
-				resetFrame = 45;
-				if (_vm->_gameConv->_running == 1)
-					_vm->_gameConv->stop();
-				_scene->_dynamicHotspots.remove(_brieAnimId);
-				_game._player._stepEnabled = false;
-				break;
+		case 1:
+			_globals[kBrieTalkStatus] = 2;
+			resetFrame = 45;
+			if (_vm->_gameConv->_running == 1)
+				_vm->_gameConv->stop();
+			_scene->_dynamicHotspots.remove(_brieAnimId);
+			_game._player._stepEnabled = false;
+			break;
 
-			case 2:
-				random = _vm->getRandomNumber(1, 3);
-				++_talkCounter;
-				if (_talkCounter < 15) {
-					if (random == 1)
-						resetFrame = 12;
-					else if (random == 2)
-						resetFrame = 14;
-					else if (random == 3)
-						resetFrame = 17;
-				} else {
-					_chandelierStatus = 4;
-					resetFrame = 25;
-				}
-				break;
+		case 2:
+			++_talkCounter;
+			if (_talkCounter < 15) {
+				switch (_vm->getRandomNumber(1, 3)) {
+				case 1:
+					resetFrame = 12;
+					break;
 
-			case 4:
+				case 2:
+					resetFrame = 14;
+					break;
+
+				case 3:
+					resetFrame = 17;
+				}
+			} else {
+				_chandelierStatus = 4;
 				resetFrame = 25;
-				break;
+			}
+			break;
 
-			case 5:
-				resetFrame = 21;
-				_chandelierStatus = 2;
-				break;
+		case 4:
+			resetFrame = 25;
+			break;
 
-			case 6:
-				resetFrame = 316;
-				_chandelierStatus = 2;
-				break;
+		case 5:
+			resetFrame = 21;
+			_chandelierStatus = 2;
+			break;
 
-			default:
-				break;
-			}
+		case 6:
+			resetFrame = 316;
+			_chandelierStatus = 2;
 			break;
 
-		case 315:
-			_scene->freeAnimation(1);
+		default:
 			break;
 		}
+		break;
 
-		if (resetFrame >= 0) {
-			_scene->setAnimFrame(_globals._animationIndexes[1], resetFrame);
-			_chandelierFrame = resetFrame;
-		}
+	case 315:
+		_scene->freeAnimation(1);
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[1], resetFrame);
+		_chandelierFrame = resetFrame;
 	}
 }
 


Commit: 3864ad17ac8b45db2976b9bc9bea6aa5fee260a9
    https://github.com/scummvm/scummvm/commit/3864ad17ac8b45db2976b9bc9bea6aa5fee260a9
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-20T16:40:44+02:00

Commit Message:
MADS: Phantom: Some refactoring and renaming

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 17b2a8a..c49d4c1 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -7387,136 +7387,135 @@ void Scene112::handleConversation() {
 }
 
 void Scene112::handleJulieAnimation() {
+	if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == _julieFrame)
+		return;
+
+	_julieFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
 	int random = -1;
-	int resetFrame;
+	int resetFrame = -1;
 
-	if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() != _julieFrame) {
-		_julieFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
-		resetFrame = -1;
+	switch (_julieFrame) {
+	case 1:
+	case 2:
+	case 3:
+	case 22:
+	case 39:
+	case 71:
+	case 107:
+		switch (_julieAction) {
+		case 0:
+			random = _vm->getRandomNumber(4, 6);
+			++_julieCounter;
+			if (_julieCounter > 25)
+				_julieAction = 2;
+			break;
 
-		switch (_julieFrame) {
 		case 1:
-		case 2:
-		case 3:
-		case 22:
-		case 39:
-		case 71:
-		case 107:
-			switch (_julieAction) {
-			case 0:
-				random = _vm->getRandomNumber(4, 6);
-				++_julieCounter;
-				if (_julieCounter > 25)
-					_julieAction = 2;
-				break;
-
-			case 1:
-				random = 3;
-				break;
+			random = 3;
+			break;
 
-			case 2:
+		case 2:
+			random = _vm->getRandomNumber(1, 3);
+			while (_didOptionFl == random)
 				random = _vm->getRandomNumber(1, 3);
-				while (_didOptionFl == random)
-					random = _vm->getRandomNumber(1, 3);
-				_didOptionFl = random;
-				break;
+			_didOptionFl = random;
+			break;
 
-			default:
-				break;
-			}
+		default:
+			break;
+		}
 
-			switch (random) {
-			case 1:
-				resetFrame = 22;
-				break;
+		switch (random) {
+		case 1:
+			resetFrame = 22;
+			break;
 
-			case 2:
-				resetFrame = 39;
-				break;
+		case 2:
+			resetFrame = 39;
+			break;
 
-			case 3:
-				resetFrame = 83;
-				break;
+		case 3:
+			resetFrame = 83;
+			break;
 
-			case 4:
-				resetFrame = 0;
-				break;
+		case 4:
+			resetFrame = 0;
+			break;
 
-			case 5:
-				resetFrame = 1;
-				break;
+		case 5:
+			resetFrame = 1;
+			break;
 
-			case 6:
-				resetFrame = 2;
-				break;
+		case 6:
+			resetFrame = 2;
+			break;
 
-			default:
-				break;
-			}
+		default:
 			break;
-		case 56:
-		case 77:
-		case 83:
+		}
+		break;
+	case 56:
+	case 77:
+	case 83:
+		random = _vm->getRandomNumber(1, 3);
+		while (_didOptionFl == random)
 			random = _vm->getRandomNumber(1, 3);
-			while (_didOptionFl == random)
-				random = _vm->getRandomNumber(1, 3);
-			_didOptionFl = random;
-
-			if ((_julieAction == 0) || (_julieAction == 1))
-				random = 3;
-
-			switch (random) {
-			case 1:
-				resetFrame = 71;
-				break;
+		_didOptionFl = random;
 
-			case 2:
-				resetFrame = 77;
-				break;
+		if ((_julieAction == 0) || (_julieAction == 1))
+			random = 3;
 
-			case 3:
-				resetFrame = 56;
-				break;
+		switch (random) {
+		case 1:
+			resetFrame = 71;
+			break;
 
-			default:
-				break;
-			}
+		case 2:
+			resetFrame = 77;
+			break;
 
+		case 3:
+			resetFrame = 56;
 			break;
 
-		case 95:
-			if (_julieAction == 1)
-				random = 2;
-			else
-				random = 1;
+		default:
+			break;
+		}
 
-			switch (random) {
-			case 1:
-				resetFrame = 95;
-				break;
+		break;
 
-			case 2:
-				resetFrame = 107;
-				break;
+	case 95:
+		if (_julieAction == 1)
+			random = 2;
+		else
+			random = 1;
 
-			default:
-				break;
-			}
+		switch (random) {
+		case 1:
+			resetFrame = 95;
 			break;
 
-		case 130:
-			resetFrame = 95;
-			_julieAction = 2;
+		case 2:
+			resetFrame = 107;
 			break;
 
 		default:
 			break;
 		}
+		break;
 
-		if (resetFrame >= 0) {
-			_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
-			_julieFrame = resetFrame;
-		}
+	case 130:
+		resetFrame = 95;
+		_julieAction = 2;
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
+		_julieFrame = resetFrame;
 	}
 }
 
@@ -8006,16 +8005,16 @@ void Scene113::enter() {
 
 void Scene113::step() {
 	if (_anim_1_running)
-		handle_animation_13_raoul();
+		handleRaoulAnimation2();
 
 	if (_anim_4_running)
-		handle_animation_6_julie();
+		handleJulieAnimation();
 
 	if (_anim_2_running)
-		handle_animation_florent();
+		handleFlorentAnimation();
 
 	if (_anim_3_running) {
-		handle_animation_4_raoul();
+		handleRaoulAnimation();
 
 		if ((!_game._objects.isInInventory(OBJ_SMALL_NOTE)) && (_scene->_animation[_globals._animationIndexes[3]]->getCurrentFrame() == 26)) {
 			_scene->_hotspots.activate(NOUN_SMALL_NOTE, false);
@@ -8037,7 +8036,7 @@ void Scene113::step() {
 	}
 
 	if (_anim_0_running) {
-		handle_animation_13_day();
+		handleDayAnimation();
 
 		if ((_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 95) && (!_arms_are_out)) {
 			_standing_talking = true;
@@ -8082,19 +8081,19 @@ void Scene113::step() {
 
 void Scene113::actions() {
 	if (_vm->_gameConv->_running == 13) {
-		process_conversation_love();
+		handleLoveConversation();
 		_action._inProgress = false;
 		return;
 	}
 
 	if (_vm->_gameConv->_running == 4) {
-		process_conversation_florent();
+		handleFlorentConversation();
 		_action._inProgress = false;
 		return;
 	}
 
 	if (_vm->_gameConv->_running == 6) {
-		process_conversation_dead();
+		handleDeadConversation();
 		_action._inProgress = false;
 		return;
 	}
@@ -8369,7 +8368,7 @@ void Scene113::preActions() {
 	}
 }
 
-void Scene113::handle_animation_florent() {
+void Scene113::handleFlorentAnimation() {
 	if (_scene->_animation[_globals._animationIndexes[2]]->getCurrentFrame() == _florentFrame)
 		return;
 
@@ -8482,7 +8481,7 @@ void Scene113::handle_animation_florent() {
 	}
 }
 
-void Scene113::handle_animation_13_day() {
+void Scene113::handleDayAnimation() {
 	if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == _dayFrame)
 		return;
 
@@ -8629,7 +8628,7 @@ void Scene113::handle_animation_13_day() {
 	}
 }
 
-void Scene113::handle_animation_4_raoul() {
+void Scene113::handleRaoulAnimation() {
 	if (_globals[kFlorentNameIsKnown] == 2)
 		_raoulAction = 3;
 
@@ -8724,7 +8723,7 @@ void Scene113::handle_animation_4_raoul() {
 	}
 }
 
-void Scene113::handle_animation_13_raoul() {
+void Scene113::handleRaoulAnimation2() {
 	if (_scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame() == _raoulFrame)
 		return;
 
@@ -8782,7 +8781,7 @@ void Scene113::handle_animation_13_raoul() {
 	}
 }
 
-void Scene113::handle_animation_6_julie() {
+void Scene113::handleJulieAnimation() {
 	if (_scene->_animation[_globals._animationIndexes[4]]->getCurrentFrame() == _julieFrame)
 		return;
 
@@ -8850,7 +8849,7 @@ void Scene113::handle_animation_6_julie() {
 	}
 }
 
-void Scene113::process_conversation_dead() {
+void Scene113::handleDeadConversation() {
 	switch (_game._trigger) {
 	case 106:
 		_julieStatus = 1;
@@ -8870,7 +8869,7 @@ void Scene113::process_conversation_dead() {
 	_julieCount = 0;
 }
 
-void Scene113::process_conversation_florent() {
+void Scene113::handleFlorentConversation() {
 	int random;
 
 	switch (_action._activeAction._verbId) {
@@ -9010,7 +9009,7 @@ void Scene113::process_conversation_florent() {
 	_florentCount = 0;
 }
 
-void Scene113::process_conversation_love() {
+void Scene113::handleLoveConversation() {
 	int random;
 
 	switch (_action._activeAction._verbId) {
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 820cc7d..8a9ba84 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -371,14 +371,14 @@ private:
 	int _lastDayResetFrame;
 	int _standCount;
 
-	void handle_animation_florent();
-	void handle_animation_13_day();
-	void handle_animation_4_raoul();
-	void handle_animation_13_raoul();
-	void handle_animation_6_julie();
-	void process_conversation_dead();
-	void process_conversation_florent();
-	void process_conversation_love();
+	void handleFlorentAnimation();
+	void handleDayAnimation();
+	void handleRaoulAnimation();
+	void handleRaoulAnimation2();
+	void handleJulieAnimation();
+	void handleDeadConversation();
+	void handleFlorentConversation();
+	void handleLoveConversation();
 
 public:
 	Scene113(MADSEngine *vm);


Commit: 44a28dbd49b4f4b19a609d5447a23f92e80545e5
    https://github.com/scummvm/scummvm/commit/44a28dbd49b4f4b19a609d5447a23f92e80545e5
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-20T16:52:43+02:00

Commit Message:
MADS: Phantom: Move Exit and Climb to verbs. Review calls to isAction, use isObject instead when needed

Changed paths:
    engines/mads/phantom/phantom_scenes.h
    engines/mads/phantom/phantom_scenes1.cpp



diff --git a/engines/mads/phantom/phantom_scenes.h b/engines/mads/phantom/phantom_scenes.h
index c51c11e..3c20b95 100644
--- a/engines/mads/phantom/phantom_scenes.h
+++ b/engines/mads/phantom/phantom_scenes.h
@@ -49,6 +49,7 @@ enum Verb {
 	VERB_CLIMB_DOWN = 0x21,
 	VERB_CLIMB_INTO = 0x22,
 	VERB_CLIMB_THROUGH = 0x23,
+	VERB_EXIT = 0x34,
 	VERB_EXIT_TO = 0x37,
 	VERB_JUMP_INTO = 0x53,
 	VERB_LOCK = 0x5D,
@@ -63,7 +64,8 @@ enum Verb {
 	VERB_WALK_UP = 0x9C,
 	VERB_CLIMB_UP = 0xA5,
 	VERB_WALK_ONTO = 0xA6,
-	VERB_WALK = 0xA7
+	VERB_WALK = 0xA7,
+	VERB_CLIMB = 0x120
 };
 
 enum Noun {
@@ -104,7 +106,6 @@ enum Noun {
 	NOUN_DRESSING_TABLE = 0x31,
 	NOUN_ELEPHANT_PROP = 0x32,
 	NOUN_ENVELOPE = 0x33,
-	NOUN_EXIT = 0x34,
 	NOUN_EXIT_DOWN = 0x35,
 	NOUN_EXIT_SIGN = 0x36,
 	NOUN_EXIT_TO_BACKSTAGE = 0x38,
@@ -325,7 +326,6 @@ enum Noun {
 	NOUN_MIDDLE_LEVEL = 0x11D,
 	NOUN_LOWER_LEVEL = 0x11E,
 	NOUN_LADDER = 0x11F,
-	NOUN_CLIMB = 0x120,
 	NOUN_CHANDELIER_TRAP = 0x121,
 	NOUN_PIECE_OF_WOOD = 0x122,
 	NOUN_CUT_HEMP = 0x123,
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index c49d4c1..a705e7d 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -862,7 +862,7 @@ void Scene103::setup() {
 	_scene->addActiveVocab(NOUN_PROMPTERS_STAND);
 	_scene->addActiveVocab(NOUN_JACQUES);
 	_scene->addActiveVocab(NOUN_GENTLEMAN);
-	_scene->addActiveVocab(NOUN_CLIMB);
+	_scene->addActiveVocab(VERB_CLIMB);
 }
 
 void Scene103::enter() {
@@ -968,7 +968,7 @@ void Scene103::enter() {
 		_scene->_dynamicHotspots[_hotspotPrompt4]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt4, promptPos, promptFacing);
 
-		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 49, 121 + 40, 49 + 30));
+		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 49, 121 + 40, 49 + 30));
 		_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(196, 134), FACING_SOUTHWEST);
 		_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
@@ -1046,7 +1046,7 @@ void Scene103::enter() {
 		_scene->_dynamicHotspots[_hotspotPrompt3]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt3, Common::Point(59, 140), FACING_NORTHWEST);
 
-		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 49, 2 + 40, 49 + 30));
+		_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 49, 2 + 40, 49 + 30));
 		_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
 		_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(79, 132), FACING_SOUTHWEST);
 		_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
@@ -1268,13 +1268,13 @@ void Scene103::preActions() {
 
 	if ((_standPosition != 0) && !_action.isAction(VERB_CLIMB_THROUGH, NOUN_TRAP_DOOR) &&
 		!_action.isAction(VERB_OPEN, NOUN_TRAP_DOOR) &&
-		!_action.isAction(NOUN_CLIMB, NOUN_PROMPTERS_STAND) &&
+		!_action.isAction(VERB_CLIMB, NOUN_PROMPTERS_STAND) &&
 		!_action.isAction(VERB_PUSH, NOUN_TRAP_DOOR) &&
 		!_action.isAction(VERB_LOOK_THROUGH, NOUN_PROMPTERS_BOX) &&
 		!_action.isAction(VERB_PULL, NOUN_TRAP_DOOR)) {
 
 		if (_action.isAction(VERB_PULL) || _action.isAction(VERB_PUSH)) {
-			if (!_action.isAction(NOUN_LEVER) && !_game._trigger)
+			if (!_action.isObject(NOUN_LEVER) && !_game._trigger)
 				_game._player._needToWalk = false;
 		}
 
@@ -1401,7 +1401,7 @@ void Scene103::actions() {
 		return;
 	}
 
-	if ((_action.isAction(NOUN_CLIMB, NOUN_PROMPTERS_STAND) && _standPosition == 0) ||
+	if ((_action.isAction(VERB_CLIMB, NOUN_PROMPTERS_STAND) && _standPosition == 0) ||
 		(_action.isAction(VERB_LOOK_THROUGH, NOUN_PROMPTERS_BOX) && (_standPosition == 0)) ||
 		(_action.isAction(VERB_CLIMB_THROUGH, NOUN_TRAP_DOOR) && (_standPosition == 0))) {
 		if (_globals[kPrompterStandStatus] == 0) {
@@ -1435,7 +1435,7 @@ void Scene103::actions() {
 		}
 	}
 
-	if (_action.isAction(NOUN_CLIMB, NOUN_PROMPTERS_STAND) && (_standPosition != 0)) {
+	if (_action.isAction(VERB_CLIMB, NOUN_PROMPTERS_STAND) && (_standPosition != 0)) {
 		_action._inProgress = false;
 		return;
 	}
@@ -1493,7 +1493,7 @@ void Scene103::actions() {
 						_scene->_dynamicHotspots[_hotspotPrompt4]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt4, Common::Point(171, 142), FACING_NORTHWEST);
 
-						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 49, 121 + 40, 49 + 30));
+						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(121, 49, 121 + 40, 49 + 30));
 						_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(196, 134), FACING_SOUTHWEST);
 						_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
@@ -1568,7 +1568,7 @@ void Scene103::actions() {
 						_scene->_dynamicHotspots[_hotspotLeftFloor2]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotLeftFloor2, Common::Point(80, 135), FACING_NONE);
 
-						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, NOUN_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 49, 2 + 40, 49 + 30));
+						_hotspotPrompt5 = _scene->_dynamicHotspots.add(NOUN_PROMPTERS_STAND, VERB_CLIMB, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(2, 49, 2 + 40, 49 + 30));
 						_scene->_dynamicHotspots[_hotspotPrompt5]._articleNumber = PREP_ON;
 						_scene->_dynamicHotspots.setPosition(_hotspotPrompt5, Common::Point(79, 132), FACING_SOUTHWEST);
 						_scene->_dynamicHotspots.setCursor(_hotspotPrompt5, CURSOR_GO_UP);
@@ -1857,7 +1857,7 @@ void Scene103::actions() {
 	}
 
 	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
-		if (_action.isAction(NOUN_PROMPTERS_STAND)) {
+		if (_action.isObject(NOUN_PROMPTERS_STAND)) {
 			if (_globals[kJacquesStatus] >= 1)
 				_vm->_dialogs->show(10349);
 			else if (_globals[kCurrentYear] == 1993)
@@ -1868,49 +1868,49 @@ void Scene103::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_FLOOR)) {
+		if (_action.isObject(NOUN_FLOOR)) {
 			_vm->_dialogs->show(10313);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_TRAP_CEILING)) {
+		if (_action.isObject(NOUN_TRAP_CEILING)) {
 			_vm->_dialogs->show(10314);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_DOOR)) {
+		if (_action.isObject(NOUN_DOOR)) {
 			_vm->_dialogs->show(10315);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_DOOR_TO_PIT)) {
+		if (_action.isObject(NOUN_DOOR_TO_PIT)) {
 			_vm->_dialogs->show(10316);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WALL)) {
+		if (_action.isObject(NOUN_WALL)) {
 			_vm->_dialogs->show(10317);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PROMPTERS_BOX)) {
+		if (_action.isObject(NOUN_PROMPTERS_BOX)) {
 			_vm->_dialogs->show(10318);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_TRAP_DOOR)) {
+		if (_action.isObject(NOUN_TRAP_DOOR)) {
 			_vm->_dialogs->show(10319);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_JUNK)) {
+		if (_action.isObject(NOUN_JUNK)) {
 			if (_globals[kCurrentYear] == 1993)
 				_vm->_dialogs->show(10320);
 			else
@@ -1919,7 +1919,7 @@ void Scene103::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_CARTON)) {
+		if (_action.isObject(NOUN_CARTON)) {
 			if (_globals[kCurrentYear] == 1993)
 				_vm->_dialogs->show(10321);
 			else
@@ -1928,7 +1928,7 @@ void Scene103::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_GARBAGE_CAN)) {
+		if (_action.isObject(NOUN_GARBAGE_CAN)) {
 			if (_globals[kCurrentYear] == 1993)
 				_vm->_dialogs->show(10322);
 			else
@@ -1937,13 +1937,13 @@ void Scene103::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_CABLE)) {
+		if (_action.isObject(NOUN_CABLE)) {
 			_vm->_dialogs->show(10323);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_JACQUES) || _action.isAction(NOUN_GENTLEMAN)) {
+		if (_action.isObject(NOUN_JACQUES) || _action.isObject(NOUN_GENTLEMAN)) {
 			if (_globals[kJacquesStatus] == 0)
 				_vm->_dialogs->show(10324);
 			else
@@ -1952,37 +1952,37 @@ void Scene103::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_KEY) && _game._objects.isInRoom(OBJ_KEY)) {
+		if (_action.isObject(NOUN_KEY) && _game._objects.isInRoom(OBJ_KEY)) {
 			_vm->_dialogs->show(10326);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAIR_UNIT)) {
+		if (_action.isObject(NOUN_STAIR_UNIT)) {
 			_vm->_dialogs->show(10327);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_EXPOSED_BRICK)) {
+		if (_action.isObject(NOUN_EXPOSED_BRICK)) {
 			_vm->_dialogs->show(10328);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WATER_PIPE)) {
+		if (_action.isObject(NOUN_WATER_PIPE)) {
 			_vm->_dialogs->show(10329);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PROMPTERS_SEAT)) {
+		if (_action.isObject(NOUN_PROMPTERS_SEAT)) {
 			_vm->_dialogs->show(10338);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LEVER)) {
+		if (_action.isObject(NOUN_LEVER)) {
 			_vm->_dialogs->show(10339);
 			_action._inProgress = false;
 			return;
@@ -2668,10 +2668,10 @@ void Scene104::step() {
 }
 
 void Scene104::preActions() {
-	if (_action.isAction(NOUN_EXIT, NOUN_STAGE_LEFT))
+	if (_action.isAction(VERB_EXIT, NOUN_STAGE_LEFT))
 		_game._player._walkOffScreenSceneId = 108;
 
-	if (_action.isAction(NOUN_EXIT, NOUN_STAGE_RIGHT))
+	if (_action.isAction(VERB_EXIT, NOUN_STAGE_RIGHT))
 		_game._player._walkOffScreenSceneId = 107;
 
 	if (_action.isAction(VERB_OPEN, NOUN_TRAP_DOOR) || _action.isAction(VERB_CLOSE, NOUN_TRAP_DOOR))
@@ -2773,61 +2773,61 @@ void Scene104::actions() {
 	}
 
 	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
-		if (_action.isAction(NOUN_STAGE)) {
+		if (_action.isObject(NOUN_STAGE)) {
 			_vm->_dialogs->show(10412);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_APRON)) {
+		if (_action.isObject(NOUN_APRON)) {
 			_vm->_dialogs->show(10413);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PROSCENIUM_ARCH)) {
+		if (_action.isObject(NOUN_PROSCENIUM_ARCH)) {
 			_vm->_dialogs->show(10414);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_ACT_CURTAIN)) {
+		if (_action.isObject(NOUN_ACT_CURTAIN)) {
 			_vm->_dialogs->show(10415);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_ORCHESTRA_PIT)) {
+		if (_action.isObject(NOUN_ORCHESTRA_PIT)) {
 			_vm->_dialogs->show(10416);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CONDUCTORS_STAND)) {
+		if (_action.isObject(NOUN_CONDUCTORS_STAND)) {
 			_vm->_dialogs->show(10417);
 			_action._inProgress = false;
 			return;
 		}
 
-		if ((_action.isAction(NOUN_MUSIC_STAND)) || (_action.isAction(NOUN_MUSIC_STANDS))) {
+		if ((_action.isObject(NOUN_MUSIC_STAND)) || (_action.isObject(NOUN_MUSIC_STANDS))) {
 			_vm->_dialogs->show(10418);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PROMPTERS_BOX)) {
+		if (_action.isObject(NOUN_PROMPTERS_BOX)) {
 			_vm->_dialogs->show(10419);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_TRAP_DOOR)) {
+		if (_action.isObject(NOUN_TRAP_DOOR)) {
 			_vm->_dialogs->show(10420);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_HOUSE)) {
+		if (_action.isObject(NOUN_HOUSE)) {
 			if (_globals[kCurrentYear] == 1881)
 				_vm->_dialogs->show(10421);
 			else
@@ -2837,25 +2837,25 @@ void Scene104::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAGE_LEFT)) {
+		if (_action.isObject(NOUN_STAGE_LEFT)) {
 			_vm->_dialogs->show(10422);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAGE_RIGHT)) {
+		if (_action.isObject(NOUN_STAGE_RIGHT)) {
 			_vm->_dialogs->show(10423);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CHANDELIER)) {
+		if (_action.isObject(NOUN_CHANDELIER)) {
 			_vm->_dialogs->show(10428);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_MONSIEUR_RICHARD)) {
+		if (_action.isObject(NOUN_MONSIEUR_RICHARD)) {
 			_vm->_dialogs->show(10433);
 			_action._inProgress = false;
 			return;
@@ -4004,25 +4004,25 @@ void Scene105::actions() {
 	}
 
 	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
-		if (_action.isAction(NOUN_FLOOR)) {
+		if (_action.isObject(NOUN_FLOOR)) {
 			_vm->_dialogs->show(10512);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CIRCULAR_STAIRCASE)) {
+		if (_action.isObject(NOUN_CIRCULAR_STAIRCASE)) {
 			_vm->_dialogs->show(10513);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LANTERN) && _game._objects.isInRoom(OBJ_LANTERN)) {
+		if (_action.isObject(NOUN_LANTERN) && _game._objects.isInRoom(OBJ_LANTERN)) {
 			_vm->_dialogs->show(10514);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_RED_FRAME) && _game._objects.isInRoom(OBJ_RED_FRAME)){
+		if (_action.isObject(NOUN_RED_FRAME) && _game._objects.isInRoom(OBJ_RED_FRAME)){
 			if (_globals[kCurrentYear] == 1881)
 				_vm->_dialogs->show(10530);
 			else
@@ -4032,25 +4032,25 @@ void Scene105::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_DOOR)) {
+		if (_action.isObject(NOUN_DOOR)) {
 			_vm->_dialogs->show(10516);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WALL)) {
+		if (_action.isObject(NOUN_WALL)) {
 			_vm->_dialogs->show(10517);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PROP_TABLE)) {
+		if (_action.isObject(NOUN_PROP_TABLE)) {
 			_vm->_dialogs->show(10518);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_BEAR_PROP)) {
+		if (_action.isObject(NOUN_BEAR_PROP)) {
 			if (_globals[kCurrentYear] == 1993)
 				_vm->_dialogs->show(10519);
 			else
@@ -4060,13 +4060,13 @@ void Scene105::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_ELEPHANT_PROP)) {
+		if (_action.isObject(NOUN_ELEPHANT_PROP)) {
 			_vm->_dialogs->show(10520);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_COLUMN_PROP)) {
+		if (_action.isObject(NOUN_COLUMN_PROP)) {
 			if (_globals[kCurrentYear] == 1993)
 				_vm->_dialogs->show(10521);
 			else
@@ -4076,7 +4076,7 @@ void Scene105::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_THUNDER_MACHINE)) {
+		if (_action.isObject(NOUN_THUNDER_MACHINE)) {
 			if (_globals[kCurrentYear] == 1993)
 				_vm->_dialogs->show(10522);
 			else
@@ -4086,55 +4086,55 @@ void Scene105::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAIR_UNIT)) {
+		if (_action.isObject(NOUN_STAIR_UNIT)) {
 			_vm->_dialogs->show(10523);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PROP)) {
+		if (_action.isObject(NOUN_PROP)) {
 			_vm->_dialogs->show(10524);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PROPS)) {
+		if (_action.isObject(NOUN_PROPS)) {
 			_vm->_dialogs->show(10525);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_EXIT_SIGN)) {
+		if (_action.isObject(NOUN_EXIT_SIGN)) {
 			_vm->_dialogs->show(10526);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_FLATS)) {
+		if (_action.isObject(NOUN_FLATS)) {
 			_vm->_dialogs->show(10527);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_HEMP)) {
+		if (_action.isObject(NOUN_HEMP)) {
 			_vm->_dialogs->show(10528);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PIPE)) {
+		if (_action.isObject(NOUN_PIPE)) {
 			_vm->_dialogs->show(10529);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_GRAFFITI)) {
+		if (_action.isObject(NOUN_GRAFFITI)) {
 			_vm->_dialogs->show(10531);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LIGHT_FIXTURE)) {
+		if (_action.isObject(NOUN_LIGHT_FIXTURE)) {
 			_vm->_dialogs->show(10535);
 			_action._inProgress = false;
 			return;
@@ -4580,49 +4580,49 @@ void Scene106::actions() {
 	}
 
 	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
-		if (_action.isAction(NOUN_STAGE_RIGHT_WING)) {
+		if (_action.isObject(NOUN_STAGE_RIGHT_WING)) {
 			_vm->_dialogs->show(10611);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAGE_LEFT_WING)) {
+		if (_action.isObject(NOUN_STAGE_LEFT_WING)) {
 			_vm->_dialogs->show(10612);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_IN_TWO)) {
+		if (_action.isObject(NOUN_IN_TWO)) {
 			_vm->_dialogs->show(10613);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CYCLORAMA)) {
+		if (_action.isObject(NOUN_CYCLORAMA)) {
 			_vm->_dialogs->show(10614);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAGE)) {
+		if (_action.isObject(NOUN_STAGE)) {
 			_vm->_dialogs->show(10615);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PEDESTAL)) {
+		if (_action.isObject(NOUN_PEDESTAL)) {
 			_vm->_dialogs->show(10616);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PLANT_PROP)) {
+		if (_action.isObject(NOUN_PLANT_PROP)) {
 			_vm->_dialogs->show(10617);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_SANDBAG)) {
+		if (_action.isObject(NOUN_SANDBAG)) {
 			if (_scene->_customDest.y < 60) {
 				_vm->_dialogs->show(10618);
 				_action._inProgress = false;
@@ -4634,49 +4634,49 @@ void Scene106::actions() {
 			}
 		}
 
-		if (_action.isAction(NOUN_STATUE)) {
+		if (_action.isObject(NOUN_STATUE)) {
 			_vm->_dialogs->show(10619);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CIRCULAR_STAIRCASE)) {
+		if (_action.isObject(NOUN_CIRCULAR_STAIRCASE)) {
 			_vm->_dialogs->show(10620);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_BATTEN)) {
+		if (_action.isObject(NOUN_BATTEN)) {
 			_vm->_dialogs->show(10621);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_DOOR)) {
+		if (_action.isObject(NOUN_DOOR)) {
 			_vm->_dialogs->show(10622);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_BOXES) || _action.isAction(NOUN_BOX)) {
+		if (_action.isObject(NOUN_BOXES) || _action.isObject(NOUN_BOX)) {
 			_vm->_dialogs->show(10623);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_BIG_PROP)) {
+		if (_action.isObject(NOUN_BIG_PROP)) {
 			_vm->_dialogs->show(10624);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CRATE)) {
+		if (_action.isObject(NOUN_CRATE)) {
 			_vm->_dialogs->show(10625);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CASE)) {
+		if (_action.isObject(NOUN_CASE)) {
 			if (_globals[kCurrentYear] == 1881)
 				_vm->_dialogs->show(10638);
 			else
@@ -4686,31 +4686,31 @@ void Scene106::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_VENTILATION_DUCT)) {
+		if (_action.isObject(NOUN_VENTILATION_DUCT)) {
 			_vm->_dialogs->show(10626);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_JUNK)) {
+		if (_action.isObject(NOUN_JUNK)) {
 			_vm->_dialogs->show(10627);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_FLATS)) {
+		if (_action.isObject(NOUN_FLATS)) {
 			_vm->_dialogs->show(10628);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WALL)) {
+		if (_action.isObject(NOUN_WALL)) {
 			_vm->_dialogs->show(10629);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CABLE_HOOK) && _game._objects.isInRoom(OBJ_CABLE_HOOK)) {
+		if (_action.isObject(NOUN_CABLE_HOOK) && _game._objects.isInRoom(OBJ_CABLE_HOOK)) {
 			_vm->_dialogs->show(10639);
 			_action._inProgress = false;
 			return;
@@ -4873,97 +4873,97 @@ void Scene107::actions() {
 	}
 
 	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
-		if (_action.isAction(NOUN_STAGE)) {
+		if (_action.isObject(NOUN_STAGE)) {
 			_vm->_dialogs->show(10711);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_IN_TWO)) {
+		if (_action.isObject(NOUN_IN_TWO)) {
 			_vm->_dialogs->show(10712);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_IN_ONE)) {
+		if (_action.isObject(NOUN_IN_ONE)) {
 			_vm->_dialogs->show(10713);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CYCLORAMA)) {
+		if (_action.isObject(NOUN_CYCLORAMA)) {
 			_vm->_dialogs->show(10714);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_COUNTERWEIGHT_SYSTEM)) {
+		if (_action.isObject(NOUN_COUNTERWEIGHT_SYSTEM)) {
 			_vm->_dialogs->show(10715);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PURCHASE_LINES)) {
+		if (_action.isObject(NOUN_PURCHASE_LINES)) {
 			_vm->_dialogs->show(10716);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LOCKRAIL)) {
+		if (_action.isObject(NOUN_LOCKRAIL)) {
 			_vm->_dialogs->show(10717);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAGE)) {
+		if (_action.isObject(NOUN_STAGE)) {
 			_vm->_dialogs->show(10718);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PROP_TABLE)) {
+		if (_action.isObject(NOUN_PROP_TABLE)) {
 			_vm->_dialogs->show(10719);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_ACT_CURTAIN)) {
+		if (_action.isObject(NOUN_ACT_CURTAIN)) {
 			_vm->_dialogs->show(10720);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LEG)) {
+		if (_action.isObject(NOUN_LEG)) {
 			_vm->_dialogs->show(10721);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_APRON)) {
+		if (_action.isObject(NOUN_APRON)) {
 			_vm->_dialogs->show(10722);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PROSCENIUM_ARCH)) {
+		if (_action.isObject(NOUN_PROSCENIUM_ARCH)) {
 			_vm->_dialogs->show(10723);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAGE)) {
+		if (_action.isObject(NOUN_STAGE)) {
 			_vm->_dialogs->show(10724);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_BACKSTAGE)) {
+		if (_action.isObject(NOUN_BACKSTAGE)) {
 			_vm->_dialogs->show(10725);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_YELLOW_FRAME) && _game._objects.isInRoom(OBJ_YELLOW_FRAME)) {
+		if (_action.isObject(NOUN_YELLOW_FRAME) && _game._objects.isInRoom(OBJ_YELLOW_FRAME)) {
 			if (_globals[kCurrentYear] == 1881)
 				_vm->_dialogs->show(10727);
 			else
@@ -4973,13 +4973,13 @@ void Scene107::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_HEADSET)) {
+		if (_action.isObject(NOUN_HEADSET)) {
 			_vm->_dialogs->show(10728);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WALL)) {
+		if (_action.isObject(NOUN_WALL)) {
 			_vm->_dialogs->show(10730);
 			_action._inProgress = false;
 			return;
@@ -5167,61 +5167,61 @@ void Scene108::actions() {
 	}
 
 	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
-		if (_action.isAction(NOUN_WALL)) {
+		if (_action.isObject(NOUN_WALL)) {
 			_vm->_dialogs->show(10730);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAGE)) {
+		if (_action.isObject(NOUN_STAGE)) {
 			_vm->_dialogs->show(10811);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_IN_TWO)) {
+		if (_action.isObject(NOUN_IN_TWO)) {
 			_vm->_dialogs->show(10812);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_IN_ONE)) {
+		if (_action.isObject(NOUN_IN_ONE)) {
 			_vm->_dialogs->show(10813);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PROSCENIUM_ARCH)) {
+		if (_action.isObject(NOUN_PROSCENIUM_ARCH)) {
 			_vm->_dialogs->show(10814);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_ACT_CURTAIN)) {
+		if (_action.isObject(NOUN_ACT_CURTAIN)) {
 			_vm->_dialogs->show(10815);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LEG)) {
+		if (_action.isObject(NOUN_LEG)) {
 			_vm->_dialogs->show(10816);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CYCLORAMA)) {
+		if (_action.isObject(NOUN_CYCLORAMA)) {
 			_vm->_dialogs->show(10817);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_FLATS)) {
+		if (_action.isObject(NOUN_FLATS)) {
 			_vm->_dialogs->show(10818);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAGEMANAGERS_POST)) {
+		if (_action.isObject(NOUN_STAGEMANAGERS_POST)) {
 			if (_globals[kCurrentYear] == 1993)
 				_vm->_dialogs->show(10819);
 			else
@@ -5231,37 +5231,37 @@ void Scene108::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_STOOL)) {
+		if (_action.isObject(NOUN_STOOL)) {
 			_vm->_dialogs->show(10821);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_BACKSTAGE)) {
+		if (_action.isObject(NOUN_BACKSTAGE)) {
 			_vm->_dialogs->show(10822);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAGE)) {
+		if (_action.isObject(NOUN_STAGE)) {
 			_vm->_dialogs->show(10823);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_HEADSET)) {
+		if (_action.isObject(NOUN_HEADSET)) {
 			_vm->_dialogs->show(10824);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WALL)) {
+		if (_action.isObject(NOUN_WALL)) {
 			_vm->_dialogs->show(10826);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CHARLES) || _action.isAction(NOUN_GENTLEMAN)) {
+		if (_action.isObject(NOUN_CHARLES) || _action.isObject(NOUN_GENTLEMAN)) {
 			_vm->_dialogs->show(10827);
 			_action._inProgress = false;
 			return;
@@ -6016,7 +6016,7 @@ void Scene109::actions() {
 	}
 
 	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
-		if (_action.isAction(NOUN_STAIRCASE)) {
+		if (_action.isObject(NOUN_STAIRCASE)) {
 			if (_currentFloor == 1)
 				_vm->_dialogs->show(10911);
 			else if (_currentFloor == 2)
@@ -6028,55 +6028,55 @@ void Scene109::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_FLOOR)) {
+		if (_action.isObject(NOUN_FLOOR)) {
 			_vm->_dialogs->show(10912);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_BACKSTAGE)) {
+		if (_action.isObject(NOUN_BACKSTAGE)) {
 			_vm->_dialogs->show(10913);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_DOOR)) {
+		if (_action.isObject(NOUN_DOOR)) {
 			_vm->_dialogs->show(10914);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_RAILING)) {
+		if (_action.isObject(NOUN_RAILING)) {
 			_vm->_dialogs->show(10915);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WALL)) {
+		if (_action.isObject(NOUN_WALL)) {
 			_vm->_dialogs->show(10916);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LIGHT_FIXTURE)) {
+		if (_action.isObject(NOUN_LIGHT_FIXTURE)) {
 			_vm->_dialogs->show(10917);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LAMP)) {
+		if (_action.isObject(NOUN_LAMP)) {
 			_vm->_dialogs->show(10918);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_HOLE)) {
+		if (_action.isObject(NOUN_HOLE)) {
 			_vm->_dialogs->show(10919);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CEILING)) {
+		if (_action.isObject(NOUN_CEILING)) {
 			_vm->_dialogs->show(10920);
 			_action._inProgress = false;
 			return;
@@ -6317,31 +6317,31 @@ void Scene110::actions() {
 	}
 
 	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
-		if (_action.isAction(NOUN_FLOOR)) {
+		if (_action.isObject(NOUN_FLOOR)) {
 			_vm->_dialogs->show(11011);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WALL)) {
+		if (_action.isObject(NOUN_WALL)) {
 			_vm->_dialogs->show(11012);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CEILING)) {
+		if (_action.isObject(NOUN_CEILING)) {
 			_vm->_dialogs->show(11013);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAIRWELL)) {
+		if (_action.isObject(NOUN_STAIRWELL)) {
 			_vm->_dialogs->show(11014);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_RIGHT_DOOR)) {
+		if (_action.isObject(NOUN_RIGHT_DOOR)) {
 			if (_globals[kDoneBrieConv203] >= 1)
 				_vm->_dialogs->show(11016);
 			else if (_globals[kChrisFStatus] == 1)
@@ -6353,31 +6353,31 @@ void Scene110::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_LEFT_DOOR)) {
+		if (_action.isObject(NOUN_LEFT_DOOR)) {
 			_vm->_dialogs->show(11016);
 			_action._inProgress = false;
 			return;
 		}
 
-		if ((_action.isAction(NOUN_WASTE_BASKET)) || (_action.isAction(NOUN_TRASH_BUCKET))) {
+		if ((_action.isObject(NOUN_WASTE_BASKET)) || (_action.isObject(NOUN_TRASH_BUCKET))) {
 			_vm->_dialogs->show(11017);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_POSTER)) {
+		if (_action.isObject(NOUN_POSTER)) {
 			_vm->_dialogs->show(11018);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_BULLETIN_BOARD)) {
+		if (_action.isObject(NOUN_BULLETIN_BOARD)) {
 			_vm->_dialogs->show(11019);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PAPER)) {
+		if (_action.isObject(NOUN_PAPER)) {
 			_vm->_dialogs->show(11029);
 			_action._inProgress = false;
 			return;
@@ -6389,7 +6389,7 @@ void Scene110::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_LIGHT_FIXTURE)) {
+		if (_action.isObject(NOUN_LIGHT_FIXTURE)) {
 			if (_globals[kCurrentYear] == 1993)
 				_vm->_dialogs->show(11021);
 			else
@@ -6807,85 +6807,85 @@ void Scene111::actions() {
 	}
 
 	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
-		if (_action.isAction(NOUN_FLOOR)) {
+		if (_action.isObject(NOUN_FLOOR)) {
 			_vm->_dialogs->show(11112);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WALL)) {
+		if (_action.isObject(NOUN_WALL)) {
 			_vm->_dialogs->show(11113);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CEILING)) {
+		if (_action.isObject(NOUN_CEILING)) {
 			_vm->_dialogs->show(11114);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_STAIRWELL)) {
+		if (_action.isObject(NOUN_STAIRWELL)) {
 			_vm->_dialogs->show(11115);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_TABLE)) {
+		if (_action.isObject(NOUN_TABLE)) {
 			_vm->_dialogs->show(11118);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PLANT)) {
+		if (_action.isObject(NOUN_PLANT)) {
 			_vm->_dialogs->show(11119);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_FIRE_AXE)) {
+		if (_action.isObject(NOUN_FIRE_AXE)) {
 			_vm->_dialogs->show(11120);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_HANDLE)) {
+		if (_action.isObject(NOUN_HANDLE)) {
 			_vm->_dialogs->show(11121);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_AXE)) {
+		if (_action.isObject(NOUN_AXE)) {
 			_vm->_dialogs->show(11122);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_DOOR_CHUNKS)) {
+		if (_action.isObject(NOUN_DOOR_CHUNKS)) {
 			_vm->_dialogs->show(11129);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LIGHT)) {
+		if (_action.isObject(NOUN_LIGHT)) {
 			_vm->_dialogs->show(11131);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LAMP)) {
+		if (_action.isObject(NOUN_LAMP)) {
 			_vm->_dialogs->show(11132);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_HOOK)) {
+		if (_action.isObject(NOUN_HOOK)) {
 			_vm->_dialogs->show(11141);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LEFT_DOOR)) {
+		if (_action.isObject(NOUN_LEFT_DOOR)) {
 			if (_globals[kJacquesStatus])
 				_vm->_dialogs->show(11140);
 			else if (_globals[kChristineDoorStatus] == 2)
@@ -6900,7 +6900,7 @@ void Scene111::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_RIGHT_DOOR)) {
+		if (_action.isObject(NOUN_RIGHT_DOOR)) {
 			_vm->_dialogs->show(11117);
 			_action._inProgress = false;
 			return;
@@ -7113,145 +7113,145 @@ void Scene112::actions() {
 	}
 
 	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
-		if (_action.isAction(NOUN_WALL)) {
+		if (_action.isObject(NOUN_WALL)) {
 			_vm->_dialogs->show(11211);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_FLOOR)) {
+		if (_action.isObject(NOUN_FLOOR)) {
 			_vm->_dialogs->show(11212);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_MIRROR)) {
+		if (_action.isObject(NOUN_MIRROR)) {
 			_vm->_dialogs->show(11213);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_BALLET_BAR)) {
+		if (_action.isObject(NOUN_BALLET_BAR)) {
 			_vm->_dialogs->show(11214);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CORRIDOR)) {
+		if (_action.isObject(NOUN_CORRIDOR)) {
 			_vm->_dialogs->show(11215);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_THROW_RUGS)) {
+		if (_action.isObject(NOUN_THROW_RUGS)) {
 			_vm->_dialogs->show(11216);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_DRESSING_SCREEN)) {
+		if (_action.isObject(NOUN_DRESSING_SCREEN)) {
 			_vm->_dialogs->show(11217);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_DRESSING_TABLE)) {
+		if (_action.isObject(NOUN_DRESSING_TABLE)) {
 			_vm->_dialogs->show(11218);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CHAIR)) {
+		if (_action.isObject(NOUN_CHAIR)) {
 			_vm->_dialogs->show(11219);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PLANT)) {
+		if (_action.isObject(NOUN_PLANT)) {
 			_vm->_dialogs->show(11220);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_COAT_RACK)) {
+		if (_action.isObject(NOUN_COAT_RACK)) {
 			_vm->_dialogs->show(11221);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_UMBRELLA)) {
+		if (_action.isObject(NOUN_UMBRELLA)) {
 			_vm->_dialogs->show(11222);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PAINTINGS)) {
+		if (_action.isObject(NOUN_PAINTINGS)) {
 			_vm->_dialogs->show(11223);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_TRASH_BUCKET)) {
+		if (_action.isObject(NOUN_TRASH_BUCKET)) {
 			_vm->_dialogs->show(11224);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_SHELF)) {
+		if (_action.isObject(NOUN_SHELF)) {
 			_vm->_dialogs->show(11225);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CONTAINER)) {
+		if (_action.isObject(NOUN_CONTAINER)) {
 			_vm->_dialogs->show(11226);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_TORN_POSTER)) {
+		if (_action.isObject(NOUN_TORN_POSTER)) {
 			_vm->_dialogs->show(11227);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_POSTER)) {
+		if (_action.isObject(NOUN_POSTER)) {
 			_vm->_dialogs->show(11228);
 			_action._inProgress = false;
 			return;
 		}
 
-		if ((_action.isAction(NOUN_REVIEW)) || (_action.isAction(NOUN_REVIEWS))) {
+		if ((_action.isObject(NOUN_REVIEW)) || (_action.isObject(NOUN_REVIEWS))) {
 			_vm->_dialogs->show(11229);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_JULIE)) {
+		if (_action.isObject(NOUN_JULIE)) {
 			_vm->_dialogs->show(11231);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_COSTUME_RACK)) {
+		if (_action.isObject(NOUN_COSTUME_RACK)) {
 			_vm->_dialogs->show(11232);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LIGHT_FIXTURE)) {
+		if (_action.isObject(NOUN_LIGHT_FIXTURE)) {
 			_vm->_dialogs->show(11233);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WARDROBE)) {
+		if (_action.isObject(NOUN_WARDROBE)) {
 			_vm->_dialogs->show(11234);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WOMAN)) {
+		if (_action.isObject(NOUN_WOMAN)) {
 			_vm->_dialogs->show(11237);
 			_action._inProgress = false;
 			return;
@@ -7259,7 +7259,7 @@ void Scene112::actions() {
 	}
 
 	if (_action.isAction(VERB_TAKE)) {
-		if (_action.isAction(NOUN_WOMAN) || _action.isAction(NOUN_JULIE)) {
+		if (_action.isObject(NOUN_WOMAN) || _action.isObject(NOUN_JULIE)) {
 			_vm->_dialogs->show(11238);
 			_action._inProgress = false;
 			return;
@@ -8137,37 +8137,37 @@ void Scene113::actions() {
 	}
 
 	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
-		if (_action.isAction(NOUN_FLOOR)) {
+		if (_action.isObject(NOUN_FLOOR)) {
 			_vm->_dialogs->show(11312);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_RUG)) {
+		if (_action.isObject(NOUN_RUG)) {
 			_vm->_dialogs->show(11313);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WALL)) {
+		if (_action.isObject(NOUN_WALL)) {
 			_vm->_dialogs->show(11314);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_COUCH)) {
+		if (_action.isObject(NOUN_COUCH)) {
 			_vm->_dialogs->show(11315);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_MURAL)) {
+		if (_action.isObject(NOUN_MURAL)) {
 			_vm->_dialogs->show(11316);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_PAINTING)) {
+		if (_action.isObject(NOUN_PAINTING)) {
 			if (_globals[kCurrentYear] == 1881)
 				_vm->_dialogs->show(11317);
 			else
@@ -8176,25 +8176,25 @@ void Scene113::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_PAINTING)) {
+		if (_action.isObject(NOUN_PAINTING)) {
 			_vm->_dialogs->show(11317);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_DRESSING_TABLE)) {
+		if (_action.isObject(NOUN_DRESSING_TABLE)) {
 			_vm->_dialogs->show(11318);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CHAIR)) {
+		if (_action.isObject(NOUN_CHAIR)) {
 			_vm->_dialogs->show(11319);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_MIRROR)) {
+		if (_action.isObject(NOUN_MIRROR)) {
 			if (_globals[kCurrentYear] == 1993) {
 				_vm->_dialogs->show(11344);
 			} else {
@@ -8204,85 +8204,85 @@ void Scene113::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_FAN)) {
+		if (_action.isObject(NOUN_FAN)) {
 			_vm->_dialogs->show(11321);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_VASE)) {
+		if (_action.isObject(NOUN_VASE)) {
 			_vm->_dialogs->show(11322);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_HAT_RACK)) {
+		if (_action.isObject(NOUN_HAT_RACK)) {
 			_vm->_dialogs->show(11323);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_LIGHT_FIXTURE)) {
+		if (_action.isObject(NOUN_LIGHT_FIXTURE)) {
 			_vm->_dialogs->show(11324);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CEILING)) {
+		if (_action.isObject(NOUN_CEILING)) {
 			_vm->_dialogs->show(11325);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_WARDROBE)) {
+		if (_action.isObject(NOUN_WARDROBE)) {
 			_vm->_dialogs->show(11326);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_DRESSING_SCREEN)) {
+		if (_action.isObject(NOUN_DRESSING_SCREEN)) {
 			_vm->_dialogs->show(11327);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CORRIDOR)) {
+		if (_action.isObject(NOUN_CORRIDOR)) {
 			_vm->_dialogs->show(11328);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_DRESSING_GOWN)) {
+		if (_action.isObject(NOUN_DRESSING_GOWN)) {
 			_vm->_dialogs->show(11330);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_SMALL_NOTE) && _game._objects.isInRoom(OBJ_SMALL_NOTE)) {
+		if (_action.isObject(NOUN_SMALL_NOTE) && _game._objects.isInRoom(OBJ_SMALL_NOTE)) {
 			_vm->_dialogs->show(11349);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CHRISTINE) && _globals[kDoneBrieConv203]) {
+		if (_action.isObject(NOUN_CHRISTINE) && _globals[kDoneBrieConv203]) {
 			_vm->_dialogs->show(11338);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_JULIE)) {
+		if (_action.isObject(NOUN_JULIE)) {
 			_vm->_dialogs->show(11339);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_NOTICE)) {
+		if (_action.isObject(NOUN_NOTICE)) {
 			_vm->_dialogs->show(11347);
 			_action._inProgress = false;
 			return;
 		}
 
-		if (_action.isAction(NOUN_CLOTHES_DUMMY)) {
+		if (_action.isObject(NOUN_CLOTHES_DUMMY)) {
 			if (_globals[kCurrentYear] == 1993)
 				_vm->_dialogs->show(11345);
 			else
@@ -8291,7 +8291,7 @@ void Scene113::actions() {
 			return;
 		}
 
-		if (_action.isAction(NOUN_WOMAN) || _action.isAction(NOUN_CHRISTINE)) {
+		if (_action.isObject(NOUN_WOMAN) || _action.isObject(NOUN_CHRISTINE)) {
 			if (_globals[kCurrentYear] == 1993)
 				_vm->_dialogs->show(11341);
 			else {


Commit: 4e0b3ca04ba90832e7c56420025ea89ba0af86ba
    https://github.com/scummvm/scummvm/commit/4e0b3ca04ba90832e7c56420025ea89ba0af86ba
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-20T22:50:26+02:00

Commit Message:
MADS: Phantom: Implement scene 114

Changed paths:
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index e961000..9ba7ca4 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -69,7 +69,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 113:	// inside dressing room 2
 		return new Scene113(vm);
 	case 114:	// lower floor, storage room
-		return new DummyScene(vm);	// TODO
+		return new Scene114(vm);
 	case 150:	// cutscene
 		return new DummyScene(vm);	// TODO
 
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index a705e7d..7db1616 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -9147,5 +9147,349 @@ void Scene113::handleLoveConversation() {
 
 /*------------------------------------------------------------------------*/
 
+Scene114::Scene114(MADSEngine *vm) : Scene1xx(vm) {
+}
+
+void Scene114::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+}
+
+void Scene114::setup() {
+	if (_globals[kCurrentYear] == 1993)
+		_scene->_initialVariant = 1;
+
+	setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene114::enter() {
+	if (_globals[kCurrentYear] == 1993) {
+		_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('z', -1), false);
+	} else if (_game._objects.isInRoom(OBJ_ROPE) && !_game._objects.isInInventory(OBJ_ROPE_WITH_HOOK)) {
+		_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('f', 0), false);
+		_globals._spriteIndexes[1] = _scene->_sprites.addSprites("*RDR_9", false);
+	}
+
+	_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('a', 0), false);
+
+	if ((_game._objects.isInRoom(OBJ_ROPE)) && (_globals[kCurrentYear] == 1881) && !_game._objects.isInInventory(OBJ_ROPE_WITH_HOOK)) {
+		_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 2);
+	} else
+		_scene->_hotspots.activate(NOUN_ROPE, false);
+
+	if (_globals[kCurrentYear] == 1993) {
+		_scene->_hotspots.activate(NOUN_CYLINDER, false);
+		_scene->_hotspots.activate(NOUN_MANNEQUINS, false);
+		_scene->_hotspots.activate(NOUN_PROP, false);
+		_scene->_hotspots.activate(NOUN_BUST, false);
+		_scene->_hotspots.activate(NOUN_SCAFFOLDING, false);
+		_scene->drawToBackground(_globals._spriteIndexes[0], 1, Common::Point(-32000, -32000), 0, 100);
+	} else {
+		_scene->_hotspots.activate(NOUN_BOXES, false);
+		_scene->_hotspots.activate(NOUN_DINETTE_SET, false);
+		_scene->_hotspots.activate(NOUN_CRATE, false);
+		_scene->_hotspots.activate(NOUN_CASES, false);
+	}
+
+	if ((_scene->_priorSceneId == 105) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+		_game._player._playerPos = Common::Point(218, 123);
+		_game._player._facing = FACING_WEST;
+	}
+
+	sceneEntrySound();
+}
+
+void Scene114::step() {
+}
+
+void Scene114::actions() {
+	if (_action.isAction(VERB_CLIMB_UP, NOUN_CIRCULAR_STAIRCASE)) {
+		switch (_game._trigger) {
+		case 0:
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;
+			_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('u', 1), 1);
+			_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
+			break;
+
+		case 1:
+			_scene->_nextSceneId = 105;
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLIMB_UP, NOUN_CIRCULAR_STAIRCASE)) {
+		_scene->_nextSceneId = 105;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_ROPE) && (_game._objects.isInRoom(OBJ_ROPE) || _game._trigger)) {
+		switch (_game._trigger) {
+		case (0):
+			_globals[kPlayerScore] += 5;
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;  
+			_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 6, 2);
+			_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 3);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 3, 1);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 2);
+			break;
+
+		case 1:
+			_scene->deleteSequence(_globals._sequenceIndexes[2]);
+			_scene->_hotspots.activate(NOUN_ROPE, false);
+			_game._objects.addToInventory(OBJ_ROPE);
+			_vm->_sound->command(26);
+			break;
+
+		case 2:
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[1]); 
+			_game._player._visible = true;
+			_scene->_sequences.setTimingTrigger(20, 3);
+			break;
+
+		case 3:
+			_vm->_dialogs->showItem(OBJ_ROPE, 807, 0);
+			_game._player._stepEnabled = true;
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action._lookFlag) {
+		_vm->_dialogs->show(11410);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isObject(NOUN_FLOOR)) {
+			_vm->_dialogs->show(11411);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_CIRCULAR_STAIRCASE)) {
+			_vm->_dialogs->show(11412);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_ROPE) && _game._objects.isInRoom(OBJ_ROPE)) {
+			_vm->_dialogs->show(11413);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_WALL)) {
+			_vm->_dialogs->show(11414);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_MANNEQUINS)) {
+			_vm->_dialogs->show(11415);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_FLAT)) {
+			_vm->_dialogs->show(11416);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_SCAFFOLDING)) {
+			_vm->_dialogs->show(11417);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_MUMMY_PROP)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(11418);
+			else
+				_vm->_dialogs->show(11433);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_CRATES)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(11419);
+			else
+				_vm->_dialogs->show(11434);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_CRATE)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(11420);
+			else
+				_vm->_dialogs->show(11435);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_CARTONS)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(11421);
+			else
+				_vm->_dialogs->show(11436);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_CARTON)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(11422);
+			else
+				_vm->_dialogs->show(11437);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_PROP)) {
+			_vm->_dialogs->show(11423);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_BUST)) {
+			_vm->_dialogs->show(11424);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_MUG)) {
+			_vm->_dialogs->show(11425);
+			_action._inProgress = false;
+			return;
+		}
+
+		if ((_action.isObject(NOUN_CASES)) || (_action.isObject(NOUN_CASE))) {
+			_vm->_dialogs->show(11426);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_BOXES) || _action.isObject(NOUN_BOX)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(11427);
+			else
+				_vm->_dialogs->show(11439);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_BOX)) {
+			if (_globals[kCurrentYear] == 1881) {
+				_vm->_dialogs->show(11439);
+				_action._inProgress = false;
+				return;
+			}
+		}
+
+		if (_action.isObject(NOUN_DINETTE_SET)) {
+			_vm->_dialogs->show(11428);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_CYLINDER)) {
+			_vm->_dialogs->show(11429);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_CARTONS)) {
+		if (_globals[kCurrentYear] == 1993)
+			_vm->_dialogs->show(11421);
+		else
+			_vm->_dialogs->show(11436);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_CARTON)) {
+		if (_globals[kCurrentYear] == 1993)
+			_vm->_dialogs->show(11422);
+		else
+			_vm->_dialogs->show(11437);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_CRATES)) {
+		if (_globals[kCurrentYear] == 1993)
+			_vm->_dialogs->show(11419);
+		else
+			_vm->_dialogs->show(11434);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_CRATE)) {
+		if (_globals[kCurrentYear] == 1993)
+			_vm->_dialogs->show(11419);
+		else
+			_vm->_dialogs->show(11435);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_CASES)) {
+		_vm->_dialogs->show(11426);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_BOXES) || _action.isAction(VERB_OPEN, NOUN_BOX)) {
+		if (_globals[kCurrentYear] == 1993)
+			_vm->_dialogs->show(11427);
+		else
+			_vm->_dialogs->show(11439);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_MUG)) {
+		_vm->_dialogs->show(11430);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_MUMMY_PROP)) {
+		_vm->_dialogs->show(11431);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TALK_TO, NOUN_MUMMY_PROP)) {
+		_vm->_dialogs->show(11432);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene114::preActions() {
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 8a9ba84..252d393 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -391,6 +391,17 @@ public:
 	virtual void actions();
 };
 
+class Scene114 : public Scene1xx {
+public:
+	Scene114(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
 } // End of namespace Phantom
 } // End of namespace MADS
 


Commit: 0b046f848a984d072c70ebbeeb3eaa030f102a77
    https://github.com/scummvm/scummvm/commit/0b046f848a984d072c70ebbeeb3eaa030f102a77
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-21T10:21:08+02:00

Commit Message:
MADS: Phantom: Add scene 150

Changed paths:
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 9ba7ca4..755a2ad 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -71,7 +71,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 114:	// lower floor, storage room
 		return new Scene114(vm);
 	case 150:	// cutscene
-		return new DummyScene(vm);	// TODO
+		return new Scene150(vm);
 
 	// Scene group #2 (theater entrance, offices, balcony)
 	case 201:	// entrance / ticket office
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 7db1616..a93be72 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -9491,5 +9491,70 @@ void Scene114::preActions() {
 
 /*------------------------------------------------------------------------*/
 
+Scene150::Scene150(MADSEngine *vm) : Scene1xx(vm) {
+}
+
+void Scene150::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+}
+
+void Scene150::setup() {
+	setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene150::enter() {
+	warning("TODO: Switch to letter box view. See definition of MADS_MENU_Y");
+
+	_game._player._stepEnabled = false;
+	_game._player._visible = false;
+
+	if (_scene->_priorSceneId == 113)
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('l', 1), 1);
+	else if (_scene->_priorSceneId == 203) {
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('f', 1), 2);
+		sceneEntrySound();  
+	} else if (_scene->_priorSceneId == 306)
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('e', 1), 4);
+	else if (_scene->_priorSceneId == 208)
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('h', 1), 3);
+	else
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('q', 1), 5);
+}
+
+void Scene150::step() {
+	if (_game._trigger == 1)
+		_scene->_nextSceneId = 203;
+
+	if (_game._trigger == 2)
+		_scene->_nextSceneId = 111;
+
+	if (_game._trigger == 4)
+		_scene->_nextSceneId = 204;
+
+	if (_game._trigger == 3) {
+		_globals[kJacquesStatus] = 1;
+		_scene->_nextSceneId = 205;
+	}
+
+	if (_game._trigger == 5)
+		_game._winStatus = 1;
+
+	if (_scene->_nextSceneId != _scene->_currentSceneId) {
+		byte pal[768];
+		_vm->_palette->getFullPalette(pal);
+		Common::fill(&pal[12], &pal[756], 0);
+		_vm->_palette->setFullPalette(pal);
+	}
+}
+
+void Scene150::actions() {
+}
+
+void Scene150::preActions() {
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index 252d393..e2b4faa 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -402,6 +402,18 @@ public:
 	virtual void preActions();
 	virtual void actions();
 };
+
+class Scene150 : public Scene1xx {
+public:
+	Scene150(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
 } // End of namespace Phantom
 } // End of namespace MADS
 


Commit: 52d035e96228a470fcc978d08ef9fb2b4ea5f500
    https://github.com/scummvm/scummvm/commit/52d035e96228a470fcc978d08ef9fb2b4ea5f500
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-21T18:48:13+02:00

Commit Message:
MADS: Phantom: Implement SequenceList::addStampCycle()

Changed paths:
    engines/mads/sequence.cpp
    engines/mads/sequence.h



diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp
index 61848c0..16e095a 100644
--- a/engines/mads/sequence.cpp
+++ b/engines/mads/sequence.cpp
@@ -551,8 +551,14 @@ void SequenceList::setMotion(int seqIndex, int flags, int deltaX, int deltaY) {
 }
 
 int SequenceList::addStampCycle(int srcSpriteIdx, bool flipped, int sprite) {
-	warning("TODO: SequenceList::addStampCycle");
-	return -1;
+	int id;
+
+	id = addSpriteCycle(srcSpriteIdx, flipped, 32767, 0, 0, 0);
+	if (id >= 0) {
+		setRange(id, sprite, sprite);
+		_entries[id]._animType = ANIMTYPE_STAMP;
+	}
+	return (id);
 }
 
 int SequenceList::setTimingTrigger(int delay, int code) {
diff --git a/engines/mads/sequence.h b/engines/mads/sequence.h
index 900458e..ea479c4 100644
--- a/engines/mads/sequence.h
+++ b/engines/mads/sequence.h
@@ -38,7 +38,7 @@ enum SequenceTrigger {
 	SEQUENCE_TRIGGER_SPRITE = 2		// Trigger when sequence reaches specific sprite
 };
 
-enum SpriteAnimType { ANIMTYPE_NONE = 0, ANIMTYPE_CYCLED = 1, ANIMTYPE_PING_PONG = 2 };
+enum SpriteAnimType { ANIMTYPE_NONE = 0, ANIMTYPE_CYCLED = 1, ANIMTYPE_PING_PONG = 2, ANIMTYPE_STAMP = 9 };
 
 #define SEQUENCE_ENTRY_SUBSET_MAX 5
 


Commit: d7ba77cfe6bba1dc88bf6d87f7829e0dc302e748
    https://github.com/scummvm/scummvm/commit/d7ba77cfe6bba1dc88bf6d87f7829e0dc302e748
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-21T21:08:33+03:00

Commit Message:
MADS: Phantom: Implement loadSpeech() and playSpeech()

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/scene.cpp
    engines/mads/scene.h



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index a93be72..f9f97db 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -8021,7 +8021,6 @@ void Scene113::step() {
 			_game._objects.addToInventory(OBJ_SMALL_NOTE);
 			_scene->deleteSequence(_globals._sequenceIndexes[1]);
 			_vm->_sound->command(26);
-			_scene->_speechReady = -1;
 			_vm->_dialogs->showItem(OBJ_SMALL_NOTE, 806, 2);
 		}
 	}
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index ea5943c..34d9677 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -24,6 +24,7 @@
 #include "mads/scene.h"
 #include "mads/compression.h"
 #include "mads/mads.h"
+#include "mads/audio.h"
 #include "mads/dragonsphere/dragonsphere_scenes.h"
 #include "mads/nebular/nebular_scenes.h"
 #include "mads/phantom/phantom_scenes.h"
@@ -61,7 +62,6 @@ Scene::Scene(MADSEngine *vm)
 	_spritesCount = 0;
 	_variant = 0;
 	_initialVariant = 0;
-	_speechReady = -1;
 
 	_paletteUsageF.push_back(PaletteUsage::UsageEntry(0xF));
 
@@ -782,11 +782,14 @@ void Scene::deleteSequence(int idx) {
 }
 
 void Scene::loadSpeech(int idx) {
-	warning("TODO: Scene::loadSpeech");
+	_vm->_audio->setDefaultSoundGroup();
+	// NOTE: The original actually preloads the speech sample here, but the samples
+	// are so small that it's not really worth it...
 }
 
 void Scene::playSpeech(int idx) {
-	warning("TODO: Scene::playSpeech");
+	_vm->_audio->stop();
+	_vm->_audio->playSound(idx - 1);
 }
 
 void Scene::sceneScale(int front_y, int front_scale, int back_y,  int back_scale) {
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index f0b4326..b818a02 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -129,7 +129,6 @@ public:
 	Common::Point _customDest;
 	Common::Array<PaletteUsage::UsageEntry> _paletteUsageF;
 	Common::Array<PaletteUsage::UsageEntry> _scenePaletteUsage;
-	int _speechReady;
 	/**
 	 * Constructor
 	 */


Commit: d22a997cb24b501d19938d431c8764a4f965d6fd
    https://github.com/scummvm/scummvm/commit/d22a997cb24b501d19938d431c8764a4f965d6fd
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-21T20:17:57+02:00

Commit Message:
MADS: Get rid of SequenceList::setRange, use SequenceList::setAnimRange instead

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/sequence.cpp
    engines/mads/sequence.h



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index f9f97db..5b8abbd 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -1159,7 +1159,7 @@ void Scene103::step() {
 		_scene->deleteSequence(_globals._sequenceIndexes[1]);
 		_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
-		_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 6);
+		_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 6);
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 66);
 		_vm->_sound->command(66);
 		break;
@@ -1188,7 +1188,7 @@ void Scene103::step() {
 		_scene->deleteSequence(_globals._sequenceIndexes[10]);
 		_globals._sequenceIndexes[10] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[10], false, 6, 1);
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 101);
-		_scene->_sequences.setRange(_globals._sequenceIndexes[10], -1, -2);
+		_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], -1, -2);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 4);
 		break;
 
@@ -1214,7 +1214,7 @@ void Scene103::step() {
 				_scene->deleteSequence(_globals._sequenceIndexes[9]);
 				_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 6, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[0], -1, -2);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 105);
 			}
 		} else if (_anim2ActvFl) {
@@ -1225,7 +1225,7 @@ void Scene103::step() {
 				_scene->deleteSequence(_globals._sequenceIndexes[9]);
 				_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 6, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[0], -1, -2);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], -1, -2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 110);
 			}
 		}
@@ -1598,7 +1598,7 @@ void Scene103::actions() {
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;
 				_globals._sequenceIndexes[2] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[2], false, 5, 2);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[2], -1, -2);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 2, 3, 70);
@@ -1620,7 +1620,7 @@ void Scene103::actions() {
 				_scene->deleteSequence(_globals._sequenceIndexes[1]);
 				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[1], -1, -2);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], -1, -2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 71);
 				_vm->_sound->command(66);
 				break;
@@ -1642,7 +1642,7 @@ void Scene103::actions() {
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;
 				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 5, 1);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 4);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 1);
 				break;
@@ -1660,7 +1660,7 @@ void Scene103::actions() {
 			case 2:
 				_scene->deleteSequence(_globals._sequenceIndexes[2]);
 				_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 5, 1);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 4);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[2], false);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 3);
 				break;
@@ -1690,7 +1690,7 @@ void Scene103::actions() {
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
 			_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 5, 2);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[8], 1, 5);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], 1, 5);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 5, 1);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
@@ -1752,7 +1752,7 @@ void Scene103::actions() {
 				_game._player._stepEnabled = false;
 				_globals._sequenceIndexes[11] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[11], false, 6, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[11], 5);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[11], -1, -2);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[11], -1, -2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 0, 0, 1);
 				break;
 
@@ -1779,7 +1779,7 @@ void Scene103::actions() {
 				_game._player._stepEnabled = false;
 				_globals._sequenceIndexes[10] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[10], false, 6, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 4);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[10], -1, -2);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], -1, -2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 1);
 				if (!_sitFl)
 					_game.syncTimers(1, _globals._sequenceIndexes[10], 3, _globals._animationIndexes[5]);
@@ -2692,7 +2692,7 @@ void Scene104::actions() {
 				_game._player._visible = false;
 				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 13);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 16);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 16);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 60);
 				break;
 
@@ -2734,7 +2734,7 @@ void Scene104::actions() {
 			_game._player._stepEnabled = false;
 			_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 7, 1);
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 15);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[3], -1, 4);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], -1, 4);
 			_scene->_sequences.setPosition(_globals._sequenceIndexes[3], _game._player._playerPos);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
@@ -2743,7 +2743,7 @@ void Scene104::actions() {
 		case 1:
 			_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 1, 10);
 			_scene->_sequences.setTimingTrigger(60, 2);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[3], 4, 4);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 4, 4);
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 15);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
 			_scene->_sequences.setMotion(_globals._sequenceIndexes[3], 0, 0, 200);
@@ -3714,7 +3714,7 @@ void Scene105::step() {
 		_scene->deleteSequence(_globals._sequenceIndexes[2]);
 		_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
-		_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 8);
+		_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 8);
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 61);
 		_vm->_sound->command(66);
 		break;
@@ -3830,7 +3830,7 @@ void Scene105::actions() {
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
 			_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 5, 2);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[5], 1, 5);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 5);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 2, 5, 1);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 2);
@@ -3869,7 +3869,7 @@ void Scene105::actions() {
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
 			_globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 5, 2);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 2, 4, 1);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 2);
@@ -3908,7 +3908,7 @@ void Scene105::actions() {
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;
 				_globals._sequenceIndexes[6] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[6], true, 5, 2);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 2, 4, 65);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 2);
@@ -3928,7 +3928,7 @@ void Scene105::actions() {
 				_scene->deleteSequence(_globals._sequenceIndexes[2]);
 				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 8);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 8);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 66);
 				_vm->_sound->command(66);
 				break;
@@ -3951,7 +3951,7 @@ void Scene105::actions() {
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;
 				_globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], true, 5, 1);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 1);
 				break;
@@ -3969,7 +3969,7 @@ void Scene105::actions() {
 			case 2:
 				_scene->deleteSequence(_globals._sequenceIndexes[6]);
 				_globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], true, 5, 1);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[6], 1, 4);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[6], false);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 3);
 				break;
@@ -4305,7 +4305,7 @@ void Scene106::step() {
 		_scene->deleteSequence(_globals._sequenceIndexes[2]);
 		_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
-		_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 5);
+		_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 5);
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 61);
 		break;
 
@@ -4333,7 +4333,7 @@ void Scene106::actions() {
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;
 				_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], false, 5, 2);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[5], 1, 5);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 5);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 2, 5, 1);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 2);
@@ -4372,7 +4372,7 @@ void Scene106::actions() {
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;
 				_globals._sequenceIndexes[5] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[5], true, 5, 2);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[5], 1, 5);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 1, 5);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[5], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[5],
 					2, 5, 1);
@@ -4478,7 +4478,7 @@ void Scene106::actions() {
 			case 0:
 				_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 4, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 2);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 9);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 9);
 				_scene->_sequences.setTimingTrigger(6, 2);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 1);
 				break;
@@ -4522,7 +4522,7 @@ void Scene106::actions() {
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
 			_globals._sequenceIndexes[3] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[3], false, 5, 2);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[3], 1, 4);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 4);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[3], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 2, 4, 65);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[3], 0, 0, 67);
@@ -4533,7 +4533,7 @@ void Scene106::actions() {
 			_scene->deleteSequence(_globals._sequenceIndexes[2]);
 			_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[2], 1, 5);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], 1, 5);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 66);
 			break;
 
@@ -4555,7 +4555,7 @@ void Scene106::actions() {
 			_scene->deleteSequence(_globals._sequenceIndexes[2]);
 			_globals._sequenceIndexes[2] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[2], false, 8, 1);
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 1);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[2], -1, -2);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 69);
 			break;
 
@@ -4831,7 +4831,7 @@ void Scene107::actions() {
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
 			_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 5, 2);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 5);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 5);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 5, 1);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 2);
@@ -5729,7 +5729,7 @@ void Scene109::step() {
 		_scene->deleteSequence(_globals._sequenceIndexes[0]);
 		_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
-		_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 3);
+		_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 3);
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 61);
 		break;
 
@@ -5747,7 +5747,7 @@ void Scene109::step() {
 		_scene->deleteSequence(_globals._sequenceIndexes[1]);
 		_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
-		_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 3);
+		_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 3);
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 66);
 		break;
 
@@ -5947,7 +5947,7 @@ void Scene109::actions() {
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
 			_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], true, 5, 2);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[8], -1, -2);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], -1, -2);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 2);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 4, 75);
@@ -5976,13 +5976,13 @@ void Scene109::actions() {
 			if (_currentFloor == 3) {
 				_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 8, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 3);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 3);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0],
 					0, 0, 76);
 			} else if (_currentFloor == 2) {
 				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 8, 1);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 14);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 3);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 3);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1],
 					0, 0, 76);
 			}
@@ -6177,7 +6177,7 @@ void Scene110::actions() {
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
 			_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 4);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 1);
 			break;
@@ -6195,7 +6195,7 @@ void Scene110::actions() {
 		case 2:
 			_scene->deleteSequence(_globals._sequenceIndexes[1]);
 			_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 4);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], false);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 3);
 			break;
@@ -6227,7 +6227,7 @@ void Scene110::actions() {
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;
 				_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 1);
 				break;
@@ -6245,7 +6245,7 @@ void Scene110::actions() {
 			case 2:
 				_scene->deleteSequence(_globals._sequenceIndexes[1]);
 				_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 5, 1);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], false);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 3);
 				break;
@@ -6271,7 +6271,7 @@ void Scene110::actions() {
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;
 				_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 7, 2);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 4);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 4, 1);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 3);
@@ -6280,7 +6280,7 @@ void Scene110::actions() {
 			case 1:
 				_vm->_sound->command(24);
 				_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 10, 1);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[2], -1, -2);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -1, -2);
 				_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 10);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[2], 0, 0, 2);
 				break;
@@ -6600,7 +6600,7 @@ void Scene111::step() {
 		_globals._sequenceIndexes[5] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[5], false, 7, 1);
 		_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 62);
 		_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 14);
-		_scene->_sequences.setRange(_globals._sequenceIndexes[5], -1, -2);
+		_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], -1, -2);
 		break;
 
 	case 62:
@@ -6653,7 +6653,7 @@ void Scene111::actions() {
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
 			_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 4);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 4);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 1);
 			_action._inProgress = false;
@@ -6673,7 +6673,7 @@ void Scene111::actions() {
 		case 2:
 			_scene->deleteSequence(_globals._sequenceIndexes[0]);
 			_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 4);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 4);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 3);
 			_action._inProgress = false;
@@ -6703,7 +6703,7 @@ void Scene111::actions() {
 				_game._player._stepEnabled = false;
 				_game._player._visible = false;
 				_globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 4);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], true);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 1);
 				_action._inProgress = false;
@@ -6723,7 +6723,7 @@ void Scene111::actions() {
 			case 2:
 				_scene->deleteSequence(_globals._sequenceIndexes[0]);
 				_globals._sequenceIndexes[0] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[0], false, 5, 1);
-				_scene->_sequences.setRange(_globals._sequenceIndexes[0], 1, 4);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[0], 1, 4);
 				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[0], false);
 				_scene->_sequences.setTrigger(_globals._sequenceIndexes[0], 0, 0, 3);
 				_action._inProgress = false;
@@ -9236,7 +9236,7 @@ void Scene114::actions() {
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;  
 			_globals._sequenceIndexes[1] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[1], false, 6, 2);
-			_scene->_sequences.setRange(_globals._sequenceIndexes[1], 1, 3);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 1, 3);
 			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[1], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 2, 3, 1);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[1], 0, 0, 2);
diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp
index 16e095a..669f3c4 100644
--- a/engines/mads/sequence.cpp
+++ b/engines/mads/sequence.cpp
@@ -555,7 +555,7 @@ int SequenceList::addStampCycle(int srcSpriteIdx, bool flipped, int sprite) {
 
 	id = addSpriteCycle(srcSpriteIdx, flipped, 32767, 0, 0, 0);
 	if (id >= 0) {
-		setRange(id, sprite, sprite);
+		setAnimRange(id, sprite, sprite);
 		_entries[id]._animType = ANIMTYPE_STAMP;
 	}
 	return (id);
@@ -566,10 +566,6 @@ int SequenceList::setTimingTrigger(int delay, int code) {
 	return -1;
 }
 
-void SequenceList::setRange(int sequence_id, int first, int last) {
-	warning("TODO: SequenceList::setRange");
-}
-
 int SequenceList::setTrigger(int idx, int trigger_type, int trigger_sprite, int trigger_code) {
 	warning("TODO: SequenceList::setTrigger");
 	return -1;
diff --git a/engines/mads/sequence.h b/engines/mads/sequence.h
index ea479c4..b207cc1 100644
--- a/engines/mads/sequence.h
+++ b/engines/mads/sequence.h
@@ -128,7 +128,6 @@ public:
 
 	int addStampCycle(int srcSpriteIdx, bool flipped, int sprite);
 	int setTimingTrigger(int delay, int code);
-	void setRange(int sequence_id, int first, int last);
 	int setTrigger(int sequence_id, int trigger_type, int trigger_sprite, int trigger_code);
 	void setSeqPlayer(int idx, bool flag);
 };


Commit: d12d110543f0ddd2883c721dad80fa5e39fa2f74
    https://github.com/scummvm/scummvm/commit/d12d110543f0ddd2883c721dad80fa5e39fa2f74
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-21T21:42:24+03:00

Commit Message:
MADS: Phantom: Increase maximum dynamic hotspots to 10, up from 8

Scene 105 in Phantom uses 9 dynamic hotspots

Changed paths:
    engines/mads/hotspots.h



diff --git a/engines/mads/hotspots.h b/engines/mads/hotspots.h
index faabd44..e556c29 100644
--- a/engines/mads/hotspots.h
+++ b/engines/mads/hotspots.h
@@ -54,7 +54,7 @@ public:
 	void synchronize(Common::Serializer &s);
 };
 
-#define DYNAMIC_HOTSPOTS_SIZE 8
+#define DYNAMIC_HOTSPOTS_SIZE 10
 
 #define SYNTAX_SINGULAR               0
 #define SYNTAX_PLURAL                 1


Commit: 51365c11ca5ac79d01601411e634bca34e4a97c4
    https://github.com/scummvm/scummvm/commit/51365c11ca5ac79d01601411e634bca34e4a97c4
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-21T21:42:25+03:00

Commit Message:
MADS: Phantom: Fix loadAnimation and silence warning in animations_tick

Changed paths:
    engines/mads/scene.cpp



diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 34d9677..07e67c0 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -618,15 +618,20 @@ int Scene::loadAnimation(const Common::String &resName, int trigger) {
 	DepthSurface depthSurface;
 	UserInterface interfaceSurface(_vm);
 
-	warning("TODO: Fix loadAnimation");
-	int id = 0;
+	for (int i = 0; i < 10; i++) {
+		if (!_animation[i]) {
+			_animation[i] = Animation::init(_vm, this);
+			_animation[i]->load(interfaceSurface, depthSurface, resName,
+				_vm->_dithering ? ANIMFLAG_DITHER : 0, nullptr, nullptr);
+			_animation[i]->startAnimation(trigger);
+
+			return i;
+		}
+	}
 
-	_animation[id] = Animation::init(_vm, this);
-	_animation[id]->load(interfaceSurface, depthSurface, resName,
-		_vm->_dithering ? ANIMFLAG_DITHER : 0, nullptr, nullptr);
-	_animation[id]->startAnimation(trigger);
+	error("Unable to find an available animation slot");
 
-	return id;
+	return -1;
 }
 
 void Scene::updateCursor() {
@@ -797,7 +802,7 @@ void Scene::sceneScale(int front_y, int front_scale, int back_y,  int back_scale
 }
 
 void Scene::animations_tick() {
-	warning("TODO: Implement _animations as an AnimationList and refactor (and check implementation)");
+	//warning("TODO: Implement _animations as an AnimationList and refactor (and check implementation)");
 	for (int i = 0; i < 10; i++) {
 		if (_animation[i])
 			_animation[i]->update();


Commit: e232c9fdb6f150c361c0a556f3245d9b503d2cbb
    https://github.com/scummvm/scummvm/commit/e232c9fdb6f150c361c0a556f3245d9b503d2cbb
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-21T23:42:33+03:00

Commit Message:
MADS: Phantom: Implement resetFacing()

Changed paths:
    engines/mads/player.cpp



diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp
index 01430b0..1e9ce7e 100644
--- a/engines/mads/player.cpp
+++ b/engines/mads/player.cpp
@@ -56,7 +56,6 @@ Player::Player(MADSEngine *vm)
 	_special = 0;
 	_ticksAmount = 0;
 	_priorTimer = 0;
-	_trigger = 0;
 	_scalingVelocity = false;
 	_spritesChanged = false;
 	_forceRefresh = false;
@@ -816,6 +815,9 @@ void Player::setWalkTrigger(int val) {
 }
 
 void Player::resetFacing(Facing facing) {
-	warning("TODO: Player::resetFacing");
+	_facing = facing;
+	_turnToFacing = facing;
+	selectSeries();
 }
+
 } // End of namespace MADS


Commit: 80dae7b8fcd3e20a0f18d9287a9fc44793f6c38a
    https://github.com/scummvm/scummvm/commit/80dae7b8fcd3e20a0f18d9287a9fc44793f6c38a
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-22T00:42:04+03:00

Commit Message:
MADS: Phantom: Initial work on hotspots with dynamic animations

Changed paths:
    engines/mads/animation.cpp
    engines/mads/animation.h
    engines/mads/hotspots.cpp
    engines/mads/hotspots.h
    engines/mads/scene.cpp



diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp
index e4f44fc..1c492bb 100644
--- a/engines/mads/animation.cpp
+++ b/engines/mads/animation.cpp
@@ -177,6 +177,7 @@ Animation::Animation(MADSEngine *vm, Scene *scene) : _vm(vm), _scene(scene) {
 	_oldFrameEntry = 0;
 	_rgbResult = -1;
 	_palIndex1 = _palIndex2 = -1;
+	_dynamicHotspotIndex = -1;
 }
 
 Animation::~Animation() {
diff --git a/engines/mads/animation.h b/engines/mads/animation.h
index 46ef85c..45e6e3c 100644
--- a/engines/mads/animation.h
+++ b/engines/mads/animation.h
@@ -191,6 +191,7 @@ public:
 	bool _resetFlag;
 	int _currentFrame;
 	int _oldFrameEntry;
+	int _dynamicHotspotIndex;
 
 	static Animation *init(MADSEngine *vm, Scene *scene);
 	/*
diff --git a/engines/mads/hotspots.cpp b/engines/mads/hotspots.cpp
index 526654d..098313e 100644
--- a/engines/mads/hotspots.cpp
+++ b/engines/mads/hotspots.cpp
@@ -27,6 +27,7 @@ namespace MADS {
 
 DynamicHotspot::DynamicHotspot() {
 	_seqIndex = 0;
+	_animIndex = -1;
 	_facing = FACING_NONE;
 	_descId = 0;
 	_verbId = 0;
@@ -74,6 +75,7 @@ int DynamicHotspots::add(int descId, int verbId, int seqIndex, const Common::Rec
 	_entries[idx]._verbId = verbId;
 	_entries[idx]._articleNumber = PREP_IN;
 	_entries[idx]._cursor = CURSOR_NONE;
+	_entries[idx]._animIndex = -1;
 
 	++_count;
 	_changed = true;
@@ -106,6 +108,8 @@ void DynamicHotspots::remove(int index) {
 	if (index >= 0 && _entries[index]._active) {
 		if (_entries[index]._seqIndex >= 0)
 			scene._sequences[_entries[index]._seqIndex]._dynamicHotspotIndex = -1;
+		if (_entries[index]._animIndex >= 0)
+			scene._animation[_entries[index]._animIndex]->_dynamicHotspotIndex = -1;
 		_entries[index]._active = false;
 
 		--_count;
diff --git a/engines/mads/hotspots.h b/engines/mads/hotspots.h
index e556c29..ffd53e5 100644
--- a/engines/mads/hotspots.h
+++ b/engines/mads/hotspots.h
@@ -35,6 +35,7 @@ class DynamicHotspot {
 public:
 	bool _active;
 	int _seqIndex;
+	int _animIndex;
 	Common::Rect _bounds;
 	Common::Point _feetPos;
 	Facing _facing;
@@ -54,7 +55,7 @@ public:
 	void synchronize(Common::Serializer &s);
 };
 
-#define DYNAMIC_HOTSPOTS_SIZE 10
+#define DYNAMIC_HOTSPOTS_SIZE 16
 
 #define SYNTAX_SINGULAR               0
 #define SYNTAX_PLURAL                 1
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 07e67c0..daa50aa 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -771,7 +771,19 @@ int Scene::getAnimFrame(int id) {
 }
 
 void Scene::setDynamicAnim(int id, int anim_id, int segment) {
-	warning("TODO: Scene::setDynamicAnim");
+	if (id >= 0 && id <= DYNAMIC_HOTSPOTS_SIZE && _animation[anim_id]) {
+		_animation[anim_id]->_dynamicHotspotIndex = id;
+		if (_dynamicHotspots[id]._animIndex < 0)
+			_dynamicHotspots[id]._active = false;
+		_dynamicHotspots[id]._animIndex = anim_id;
+
+		// TODO: Anim segments
+
+		// NOTE: Only remove the TODO below when _dynamicHotspotIndex
+		// in the Animation class is actually used in the engine!
+
+		warning("TODO: Scene::setDynamicAnim");
+	}
 }
 
 void Scene::setCamera(Common::Point pos) {


Commit: 9bfa51ef300cf95872ca2325b7bd0d64f85372e6
    https://github.com/scummvm/scummvm/commit/9bfa51ef300cf95872ca2325b7bd0d64f85372e6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-22T02:14:41+03:00

Commit Message:
MADS: Phantom: Expand the existing camera adjustment logic for V2 games

This fixes all of the scenes that expand over the screen (e.g. 101, 104,
109 in Phantom, as well as the several scenes in the Dragonsphere intro).

Also added a new debugger command, "set_camera", which sets the scene
camera to specific coordinates

Changed paths:
    engines/mads/debugger.cpp
    engines/mads/debugger.h
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/scene.cpp
    engines/mads/scene_data.cpp



diff --git a/engines/mads/debugger.cpp b/engines/mads/debugger.cpp
index a6a4d3e..740c19a 100644
--- a/engines/mads/debugger.cpp
+++ b/engines/mads/debugger.cpp
@@ -49,6 +49,7 @@ Debugger::Debugger(MADSEngine *vm) : GUI::Debugger(), _vm(vm) {
 	registerCmd("item", WRAP_METHOD(Debugger, Cmd_Item));
 	registerCmd("play_anim", WRAP_METHOD(Debugger, Cmd_PlayAnim));
 	registerCmd("play_text", WRAP_METHOD(Debugger, Cmd_PlayText));
+	registerCmd("set_camera", WRAP_METHOD(Debugger, Cmd_SetCamera));
 }
 
 static int strToInt(const char *s) {
@@ -391,4 +392,17 @@ bool Debugger::Cmd_PlayText(int argc, const char **argv) {
 	}
 }
 
+bool Debugger::Cmd_SetCamera(int argc, const char **argv) {
+	if (argc != 3) {
+		debugPrintf("Usage: %s <x> <y>\n", argv[0]);
+		return true;
+	} else {
+		int x = strToInt(argv[1]);
+		int y = strToInt(argv[2]);
+		_vm->_game->_scene.setCamera(Common::Point(x, y));
+		_vm->_game->_scene.resetScene();
+		_vm->_game->_scene.drawElements(kTransitionNone, false);
+		return false;
+	}
+}
 } // End of namespace MADS
diff --git a/engines/mads/debugger.h b/engines/mads/debugger.h
index 70b2cad..f6b58ac 100644
--- a/engines/mads/debugger.h
+++ b/engines/mads/debugger.h
@@ -51,6 +51,7 @@ protected:
 	bool Cmd_Item(int argc, const char **argv);
 	bool Cmd_PlayAnim(int argc, const char **argv);
 	bool Cmd_PlayText(int argc, const char **argv);
+	bool Cmd_SetCamera(int argc, const char **argv);
 public:
 	bool _showMousePos;
 public:
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 5b8abbd..0b6f4af 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -254,8 +254,7 @@ void Scene101::step() {
 		}
 	}
 
-	if (!_startSittingFl && (_globals[kBrieTalkStatus] != 2)) {
-		warning("TODO: Add a check on view port x > 200");
+	if (_scene->_posAdjust.x > 200 && !_startSittingFl && (_globals[kBrieTalkStatus] != 2)) {
 		_startSittingFl = true;
 		_game._player.walk(Common::Point(490, 119), FACING_NORTHEAST);
 		_game._player._stepEnabled = false;
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index daa50aa..9fe601e 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -153,6 +153,7 @@ void Scene::loadScene(int sceneId, const Common::String &prefix, bool palFlag) {
 	_sequences.clear();
 	_kernelMessages.clear();
 	_vm->_palette->_paletteUsage.load(&_scenePaletteUsage);
+	setCamera(Common::Point(0, 0));
 
 	int flags = SCENEFLAG_LOAD_SHADOW;
 	if (_vm->_dithering)
@@ -787,7 +788,7 @@ void Scene::setDynamicAnim(int id, int anim_id, int segment) {
 }
 
 void Scene::setCamera(Common::Point pos) {
-	warning("TODO: Scene::setCamera");
+	_posAdjust = pos;
 }
 
 void Scene::drawToBackground(int series_id, int sprite_id, Common::Point pos, int depth, int scale) {
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index e48bcd8..d4610c5 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -422,6 +422,18 @@ void SceneInfo::loadMadsV2Background(int sceneId, const Common::String &resName,
 	assert(screenWidth == _width);
 	assert(screenHeight <= _height);
 
+	// Resize the background surface to hold all of the tiles
+	uint16 newWidth = bgSurface.w;
+	uint16 newHeight = bgSurface.h;
+
+	if (tileWidth < screenWidth && bgSurface.w != tileCount * tileWidth)
+		newWidth = tileCount * tileWidth;
+	if (tileHeight < screenHeight && bgSurface.h != tileCount * tileHeight)
+		newHeight = tileCount * tileHeight;
+
+	if (bgSurface.w != newWidth || bgSurface.h != newHeight)
+		bgSurface.setSize(newWidth, newHeight);
+
 	// --------------------------------------------------------------------------------
 
 	// Get tile data


Commit: fac601ae2ec7efea502d4c75e8f2941ab7ca1c46
    https://github.com/scummvm/scummvm/commit/fac601ae2ec7efea502d4c75e8f2941ab7ca1c46
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-22T03:21:54+03:00

Commit Message:
MADS: Fix typo

Changed paths:
    engines/mads/sequence.cpp



diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp
index 669f3c4..52d5d12 100644
--- a/engines/mads/sequence.cpp
+++ b/engines/mads/sequence.cpp
@@ -259,7 +259,7 @@ bool SequenceList::loadSprites(int seqIndex) {
 			}
 
 			if (seqEntry._flags & 2) {
-				// Check for object having moved off-scren
+				// Check for object having moved off-screen
 				if ((pt.x + width) < 0 || (pt.x + width) >= MADS_SCREEN_WIDTH ||
 						pt.y < 0 || (pt.y - height) >= MADS_SCENE_HEIGHT) {
 					result = true;


Commit: 51d5f6c2b843760615e262f51d1791d9bf10bdf8
    https://github.com/scummvm/scummvm/commit/51d5f6c2b843760615e262f51d1791d9bf10bdf8
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-22T03:23:08+03:00

Commit Message:
MADS: Phantom: Implement deleteSequence()

I've left in a CHECKME for the part of the code I'm not 100% sure.
Unfortunately, this can't really be tested yet until animations
work properly

Changed paths:
    engines/mads/scene.cpp



diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 9fe601e..6101be6 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -796,7 +796,15 @@ void Scene::drawToBackground(int series_id, int sprite_id, Common::Point pos, in
 }
 
 void Scene::deleteSequence(int idx) {
-	warning("TODO: Scene::deleteSequence");
+	if (_sequences[idx]._active && _sequences[idx]._dynamicHotspotIndex >= 0)
+		_dynamicHotspots.remove(_sequences[idx]._dynamicHotspotIndex);
+
+	_sequences[idx]._active = false;
+
+	if (!_sequences[idx]._doneFlag)
+		doFrame();	// FIXME/CHECKME: Is this correct?
+	else
+		_sequences.remove(idx);
 }
 
 void Scene::loadSpeech(int idx) {


Commit: a2bd9b524e1d95cde7d4c5ba3ee7a1bd8bdcc084
    https://github.com/scummvm/scummvm/commit/a2bd9b524e1d95cde7d4c5ba3ee7a1bd8bdcc084
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-22T03:23:52+03:00

Commit Message:
MADS: Phantom: Better checking for scene codes

This allows scene 150 to start

Changed paths:
    engines/mads/phantom/phantom_scenes.cpp



diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 755a2ad..4f87e40 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -170,12 +170,12 @@ Common::String PhantomScene::formAnimName(char sepChar, int suffixNum) {
 /*------------------------------------------------------------------------*/
 
 void SceneInfoPhantom::loadCodes(MSurface &depthSurface, int variant) {
-	// The intro scenes do not have any codes
-	if (_sceneId >= 900)
+	Common::String ext = Common::String::format(".WW%d", variant);
+	Common::String fileName = Resources::formatName(RESPREFIX_RM, _sceneId, ext);
+	if (!Common::File::exists(fileName))
 		return;
 
-	Common::String ext = Common::String::format(".WW%d", variant);
-	File f(Resources::formatName(RESPREFIX_RM, _sceneId, ext));
+	File f(fileName);
 	MadsPack codesPack(&f);
 	Common::SeekableReadStream *stream = codesPack.getItemStream(0);
 


Commit: 6a14396d73bafa2047214c21b3a284b2a647d560
    https://github.com/scummvm/scummvm/commit/6a14396d73bafa2047214c21b3a284b2a647d560
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-22T03:24:14+03:00

Commit Message:
MADS: Dragon: Better checking for scene codes

Changed paths:
    engines/mads/dragonsphere/dragonsphere_scenes.cpp



diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.cpp b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
index 6f5a28b..c24d0e9 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
@@ -201,12 +201,12 @@ Common::String DragonsphereScene::formAnimName(char sepChar, int suffixNum) {
 /*------------------------------------------------------------------------*/
 
 void SceneInfoDragonsphere::loadCodes(MSurface &depthSurface, int variant) {
-	// The intro scenes do not have any codes
-	if (_sceneId >= 900)
+	Common::String ext = Common::String::format(".WW%d", variant);
+	Common::String fileName = Resources::formatName(RESPREFIX_RM, _sceneId, ext);
+	if (!Common::File::exists(fileName))
 		return;
 
-	Common::String ext = Common::String::format(".WW%d", variant);
-	File f(Resources::formatName(RESPREFIX_RM, _sceneId, ext));
+	File f(fileName);
 	MadsPack codesPack(&f);
 	Common::SeekableReadStream *stream = codesPack.getItemStream(0);
 


Commit: 5e6dbbef4c12bc6a0bb3432aeb41506b592bbd19
    https://github.com/scummvm/scummvm/commit/5e6dbbef4c12bc6a0bb3432aeb41506b592bbd19
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-22T15:15:57+02:00

Commit Message:
MADS: Phantom: Add Scene Group 2 generic functions

Changed paths:
  A engines/mads/phantom/phantom_scenes2.cpp
  A engines/mads/phantom/phantom_scenes2.h
    engines/mads/module.mk
    engines/mads/phantom/phantom_scenes.cpp



diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index 9c79068..3bd9ef5 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -7,6 +7,7 @@ MODULE_OBJS := \
 	phantom/globals_phantom.o \
 	phantom/phantom_scenes.o \
 	phantom/phantom_scenes1.o \
+	phantom/phantom_scenes2.o \
 	nebular/dialogs_nebular.o \
 	nebular/game_nebular.o \
 	nebular/globals_nebular.o \
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 4f87e40..162eaa0 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -29,6 +29,7 @@
 #include "mads/phantom/game_phantom.h"
 #include "mads/phantom/phantom_scenes.h"
 #include "mads/phantom/phantom_scenes1.h"
+#include "mads/phantom/phantom_scenes2.h"
 
 namespace MADS {
 
diff --git a/engines/mads/phantom/phantom_scenes2.cpp b/engines/mads/phantom/phantom_scenes2.cpp
new file mode 100644
index 0000000..b4a8248
--- /dev/null
+++ b/engines/mads/phantom/phantom_scenes2.cpp
@@ -0,0 +1,79 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/scummsys.h"
+#include "mads/mads.h"
+#include "mads/conversations.h"
+#include "mads/scene.h"
+#include "mads/phantom/phantom_scenes.h"
+#include "mads/phantom/phantom_scenes2.h"
+
+namespace MADS {
+
+namespace Phantom {
+
+void Scene2xx::setAAName() {
+	_game._aaName = Resources::formatAAName(_globals[kTempInterface]);
+	_vm->_palette->setEntry(254, 43, 47, 51);
+}
+
+void Scene2xx::sceneEntrySound() {
+	if (!_vm->_musicFlag)
+		return;
+
+	switch (_scene->_nextSceneId) {
+	case 206:
+		if (!_globals[kKnockedOverHead])
+			_vm->_sound->command(16);
+		break;
+
+	case 208:
+		_vm->_sound->command(34);
+		break;
+
+	default:
+		if (_scene->_nextSceneId != 250)
+			_vm->_sound->command(16);
+		break;
+	}
+}
+
+void Scene2xx::setPlayerSpritesPrefix() {
+	_vm->_sound->command(5);
+
+	if (_scene->_nextSceneId == 208)
+		_game._player._spritesPrefix = "";
+	else {
+		Common::String oldName = _game._player._spritesPrefix;
+		if (!_game._player._forcePrefix)
+			_game._player._spritesPrefix = "RAL";
+		if (oldName != _game._player._spritesPrefix)
+			_game._player._spritesChanged = true;
+	}
+
+	_game._player._scalingVelocity = true;
+}
+
+/*------------------------------------------------------------------------*/
+
+} // End of namespace Phantom
+} // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes2.h b/engines/mads/phantom/phantom_scenes2.h
new file mode 100644
index 0000000..9ecd7b4
--- /dev/null
+++ b/engines/mads/phantom/phantom_scenes2.h
@@ -0,0 +1,59 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef MADS_PHANTOM_SCENES2_H
+#define MADS_PHANTOM_SCENES2_H
+
+#include "common/scummsys.h"
+#include "common/serializer.h"
+#include "mads/game.h"
+#include "mads/scene.h"
+#include "mads/phantom/phantom_scenes.h"
+
+namespace MADS {
+
+namespace Phantom {
+
+class Scene2xx : public PhantomScene {
+protected:
+	/**
+	 * Plays an appropriate sound when entering a scene
+	 */
+	void sceneEntrySound();
+
+	/**
+	 *Sets the AA file to use for the scene
+	 */
+	void setAAName();
+
+	/**
+	 * Updates the prefix used for getting player sprites for the scene
+	 */
+	void setPlayerSpritesPrefix();
+public:
+	Scene2xx(MADSEngine *vm) : PhantomScene(vm) {}
+};
+
+} // End of namespace Phantom
+} // End of namespace MADS
+
+#endif /* MADS_PHANTOM_SCENES2_H */


Commit: cbbfeb017109c0bebffe05f52ce6360af99e8027
    https://github.com/scummvm/scummvm/commit/cbbfeb017109c0bebffe05f52ce6360af99e8027
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-22T17:11:02+02:00

Commit Message:
MADS: Phantom: Implement scene 201

Changed paths:
    engines/mads/phantom/phantom_scenes.cpp
    engines/mads/phantom/phantom_scenes2.cpp
    engines/mads/phantom/phantom_scenes2.h



diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index 162eaa0..a9ae84e 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -76,7 +76,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 
 	// Scene group #2 (theater entrance, offices, balcony)
 	case 201:	// entrance / ticket office
-		return new DummyScene(vm);	// TODO
+		return new Scene201(vm);
 	case 202:	// outside offices / paintings room
 		return new DummyScene(vm);	// TODO
 	case 203:	// office
diff --git a/engines/mads/phantom/phantom_scenes2.cpp b/engines/mads/phantom/phantom_scenes2.cpp
index b4a8248..eac175c 100644
--- a/engines/mads/phantom/phantom_scenes2.cpp
+++ b/engines/mads/phantom/phantom_scenes2.cpp
@@ -75,5 +75,503 @@ void Scene2xx::setPlayerSpritesPrefix() {
 
 /*------------------------------------------------------------------------*/
 
+Scene201::Scene201(MADSEngine *vm) : Scene2xx(vm) {
+	_anim0ActvFl = false;
+	_anim1ActvFl = false;
+	_needHoldFl = false;
+	_sellerCount = -1;
+	_sellerStatus = -1;
+	_sellerFrame = -1;
+	_raoulFrame = -1;
+	_raoulStatus = -1;
+}
+
+void Scene201::synchronize(Common::Serializer &s) {
+	Scene2xx::synchronize(s);
+
+	s.syncAsByte(_anim0ActvFl);
+	s.syncAsByte(_anim1ActvFl);
+	s.syncAsByte(_needHoldFl);
+	s.syncAsSint16LE(_sellerCount);
+	s.syncAsSint16LE(_sellerStatus);
+	s.syncAsSint16LE(_sellerFrame);
+	s.syncAsSint16LE(_raoulFrame);
+	s.syncAsSint16LE(_raoulStatus);
+}
+
+void Scene201::setup() {
+	setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene201::enter() {
+	if (_scene->_priorSceneId != RETURNING_FROM_LOADING) {
+		_anim0ActvFl = false;
+		_anim1ActvFl = false;
+	}
+
+	_sellerCount = 0;
+	_needHoldFl = false;
+
+	_vm->_gameConv->get(16);
+	_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('x', 0), false);
+	_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('f', 0), false);
+
+	if (_globals[kTicketPeoplePresent]) {
+		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('s', 1), 0);
+		_anim1ActvFl = true;
+		_sellerStatus = 2;
+		_scene->setAnimFrame(_globals._animationIndexes[1], 5);
+	} else {
+		_scene->_hotspots.activate(NOUN_TICKET_SELLER, false);
+		_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+	}
+
+	if (_vm->_gameConv->_restoreRunning == 16) {
+		_game._player._playerPos = Common::Point(72, 101);
+		_game._player._facing = FACING_NORTHWEST;
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('r', 1), 0);
+		_anim0ActvFl = true;
+		_raoulStatus = 1;
+		_game._player._visible = false;
+
+		_vm->_gameConv->run(16);
+		_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+		_vm->_gameConv->exportPointer(&_globals[kChristineToldEnvelope]);
+	}
+
+	if ((_scene->_priorSceneId == 202) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+		_game._player._playerPos = Common::Point(314, 86);
+		_game._player.walk(Common::Point(266, 98), FACING_SOUTHWEST);
+	}
+
+	sceneEntrySound();
+}
+
+void Scene201::step() {
+	if (_anim0ActvFl)
+		handleRaoulAnimation();
+
+	if (_anim1ActvFl)
+		handleSellerAnimation();
+
+	if ((_needHoldFl) && (_vm->_gameConv->_running != 16)) {
+		_game._player._stepEnabled = false;
+		_needHoldFl = false;
+	}
+}
+
+void Scene201::actions() {
+	if (_vm->_gameConv->_running == 16) {
+		handleConversation();
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_ARCHWAY)) {
+		_scene->_nextSceneId = 202;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TALK_TO, NOUN_TICKET_SELLER)) {
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('r', 1), 0);
+		_anim0ActvFl = true;
+		_raoulStatus = 1;
+		_vm->_gameConv->run(16);
+		_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
+		_vm->_gameConv->exportPointer(&_globals[kChristineToldEnvelope]);
+		_game._player._visible = false;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action._lookFlag) {
+		if (_globals[kCurrentYear] == 1993)
+			_vm->_dialogs->show(20110);
+		else
+			_vm->_dialogs->show(20111);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isObject(NOUN_FLOOR)) {
+			_vm->_dialogs->show(20112);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_WALL)) {
+			_vm->_dialogs->show(20113);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_BUST)) {
+			_vm->_dialogs->show(20114);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_PEDESTAL)) {
+			_vm->_dialogs->show(20115);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_BARRIER)) {
+			_vm->_dialogs->show(20116);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_PLACARD)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(20117);
+			else
+				_vm->_dialogs->show(20118);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_TICKET_WINDOW)) {
+			if (_globals[kCurrentYear] == 1993)
+				_vm->_dialogs->show(20119);
+			else
+				_vm->_dialogs->show(20120);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_ARCHWAY)) {
+			_vm->_dialogs->show(20121);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_TICKET_SELLER)) {
+			_vm->_dialogs->show(20123);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_TICKET_SELLER)) {
+		_vm->_dialogs->show(20124);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TALK_TO, NOUN_BUST)) {
+		_vm->_dialogs->show(20122);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene201::preActions() {
+	if ((_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) && _action.isObject(NOUN_PLACARD))
+		_game._player.walk(Common::Point(147, 104), FACING_NORTHWEST);
+}
+
+void Scene201::handleRaoulAnimation() {
+	if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == _raoulFrame)
+		return;
+
+	_raoulFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
+	int random = -1;
+	int resetFrame = -1;
+
+	switch (_raoulFrame) {
+	case 1:
+	case 19:
+	case 49:
+		random = _vm->getRandomNumber(4, 50);
+
+		switch (_raoulStatus) {
+		case 0:
+			random = 1;
+			break;
+
+		case 2:
+			random = 2;
+			_game._player._stepEnabled = false;
+			break;
+
+		case 3:
+			random = 3;
+			break;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 9;
+			_raoulStatus = 1;
+			break;
+
+		case 2:
+			resetFrame = 1;
+			break;
+
+		case 3:
+			_game._player._visible = true;
+			_sellerStatus = 2;
+			_anim0ActvFl = false;
+			resetFrame = 49;
+			_game._player._stepEnabled = true;
+			_needHoldFl = false;
+			break;
+
+		case 4:
+			resetFrame = 19;
+			break;
+
+		default:
+			resetFrame = 0;
+			break;
+
+		}
+		break;
+
+	case 5:
+		_scene->deleteSequence(_globals._sequenceIndexes[1]);
+		_game._objects.addToInventory(OBJ_ENVELOPE);
+		_vm->_sound->command(26);
+		_vm->_dialogs->showItem(OBJ_ENVELOPE, 834, 0);
+		break;
+
+	case 9:
+		_game._player._visible = true;
+		_anim0ActvFl = false;
+		_game._player._stepEnabled = true;
+		resetFrame = 49;
+		break;
+
+	case 23:
+	case 35:
+	case 45:
+		random = _vm->getRandomNumber(3, 70);
+
+		switch (_raoulStatus) {
+		case 0:
+			random = 2;
+			break;
+
+		case 2:
+		case 3:
+			random = 1;
+			break;
+
+		default:
+			break;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 45;
+			break;
+
+		case 2:
+			resetFrame = 23;
+			_raoulStatus = 1;
+			break;
+
+		case 3:
+			resetFrame = 35;
+			break;
+
+		default:
+			resetFrame = 22;
+			break;
+		}
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
+		_raoulFrame = resetFrame;
+	}
+}
+
+void Scene201::handleSellerAnimation() {
+	if (_scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame() == _sellerFrame )
+		return;
+
+	int random = -1;
+	int resetFrame = -1;
+	_sellerFrame = _scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame();
+
+	switch (_sellerFrame ) {
+	case 1:
+	case 2:
+	case 3:
+	case 4:
+	case 5:
+	case 6:
+	case 7:
+	case 10:
+		if (_sellerFrame == 10)
+			_raoulStatus = 2;
+
+		switch (_sellerStatus) {
+		case 0:
+			random = 1;
+			break;
+
+		case 1:
+			random = _vm->getRandomNumber(1, 5);
+			++_sellerCount;
+			if (_sellerCount > 30) {
+				_sellerStatus = 0;
+				random = 6;
+			}
+			break;
+
+		case 2:
+			if (_sellerFrame == 6)
+				random = 6;
+			else if (_sellerFrame == 7)
+				random = 7;
+			else
+				random = _vm->getRandomNumber(6, 7);
+
+			++_sellerCount;
+			if (_sellerCount > 30) {
+				_sellerCount = 0;
+				random = _vm->getRandomNumber(6, 7);
+			}
+			break;
+
+		case 3:
+			random = 8;
+			break;
+
+		default:
+			break;
+		}
+
+		switch (random) {
+		case 1:
+			resetFrame = 0;
+			break;
+
+		case 2:
+			resetFrame = 1;
+			break;
+
+		case 3:
+			resetFrame = 2;
+			break;
+
+		case 4:
+			resetFrame = 3;
+			break;
+
+		case 5:
+			resetFrame = 4;
+			break;
+
+		case 6:
+			resetFrame = 5;
+			break;
+
+		case 7:
+			resetFrame = 6;
+			break;
+
+		case 8:
+			resetFrame = 7;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 9:
+		_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1);
+		_sellerStatus = 2;
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[1], resetFrame);
+		_sellerFrame = resetFrame;
+	}
+}
+
+void Scene201::handleConversation() {
+	int interlocutorFl = false;
+	int heroFl = false;
+
+	switch (_action._activeAction._verbId) {
+	case 4:
+	case 12:
+	case 13:
+	case 14:
+		_vm->_gameConv->setInterlocutorTrigger(90);
+		_needHoldFl = true;
+		interlocutorFl = true;
+		break;
+
+	case 6:
+		_sellerStatus = 3;
+		_needHoldFl = true;
+		interlocutorFl = true;
+		heroFl = true;
+		break;
+
+	default:
+		break;
+	}
+
+	switch (_game._trigger) {
+	case 65:
+		if (_sellerStatus != 3)
+			_sellerStatus = 1;
+		break;
+
+	case 70:
+		if (_sellerStatus != 3) {
+			_sellerStatus = 0;
+			_raoulStatus = 0;
+		}
+		break;
+
+	case 90:
+		_vm->_gameConv->setHeroTrigger(91);
+		heroFl = true;
+		break;
+
+	case 91:
+		_raoulStatus = 3;
+		heroFl = true;
+		interlocutorFl = true;
+		break;
+
+	default:
+		break;
+	}
+
+	if (!heroFl)
+		_vm->_gameConv->setHeroTrigger(70);
+
+	if (!interlocutorFl)
+		_vm->_gameConv->setInterlocutorTrigger(65);
+
+	_sellerCount = 0;
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Phantom
 } // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes2.h b/engines/mads/phantom/phantom_scenes2.h
index 9ecd7b4..e30224e 100644
--- a/engines/mads/phantom/phantom_scenes2.h
+++ b/engines/mads/phantom/phantom_scenes2.h
@@ -53,6 +53,31 @@ public:
 	Scene2xx(MADSEngine *vm) : PhantomScene(vm) {}
 };
 
+class Scene201 : public Scene2xx {
+private:
+	bool _anim0ActvFl;
+	bool _anim1ActvFl;
+	bool _needHoldFl;
+	int _sellerCount;
+	int _sellerStatus;
+	int _sellerFrame;
+	int _raoulFrame;
+	int _raoulStatus;
+
+	void handleSellerAnimation();
+	void handleRaoulAnimation();
+	void handleConversation();
+
+public:
+	Scene201(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
 } // End of namespace Phantom
 } // End of namespace MADS
 


Commit: 9bb46f2af335077bced3efca4fd67c20e8b9d009
    https://github.com/scummvm/scummvm/commit/9bb46f2af335077bced3efca4fd67c20e8b9d009
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-22T17:16:16+02:00

Commit Message:
MADS: Phantom: Some renaming in scene 113

Changed paths:
    engines/mads/phantom/phantom_scenes1.cpp
    engines/mads/phantom/phantom_scenes1.h



diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 0b6f4af..439c6c5 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -7651,19 +7651,19 @@ void Scene112::handleRaoulChair() {
 /*------------------------------------------------------------------------*/
 
 Scene113::Scene113(MADSEngine *vm) : Scene1xx(vm) {
-	_standing_talking = false;
-	_day_wants_to_talk = false;
-	_music_is_playing = false;
-	_right_after_kiss = false;
-	_anim_0_running = false;
-	_anim_1_running = false;
-	_anim_2_running = false;
-	_anim_3_running = false;
-	_anim_4_running = false;
-	_prevent_1 = false;
-	_prevent_2 = false;
-	_raoul_is_up = false;
-	_arms_are_out = false;
+	_standingAndTalking = false;
+	_dayWantsToTalk = false;
+	_musicPlaying = false;
+	_afterKissFl = false;
+	_anim0ActvFl = false;
+	_anim1ActvFl = false;
+	_anim2ActvFl = false;
+	_anim3ActvFl = false;
+	_anim4ActvFl = false;
+	_prevent1 = false;
+	_prevent2 = false;
+	_raoulStandingFl = false;
+	_armsOutFl = false;
 
 	_dayStatus = -1;
 	_raoulAction = -1;
@@ -7685,19 +7685,19 @@ Scene113::Scene113(MADSEngine *vm) : Scene1xx(vm) {
 void Scene113::synchronize(Common::Serializer &s) {
 	Scene1xx::synchronize(s);
 
-	s.syncAsByte(_standing_talking);
-	s.syncAsByte(_day_wants_to_talk);
-	s.syncAsByte(_music_is_playing);
-	s.syncAsByte(_right_after_kiss);
-	s.syncAsByte(_anim_0_running);
-	s.syncAsByte(_anim_1_running);
-	s.syncAsByte(_anim_2_running);
-	s.syncAsByte(_anim_3_running);
-	s.syncAsByte(_anim_4_running);
-	s.syncAsByte(_prevent_1);
-	s.syncAsByte(_prevent_2);
-	s.syncAsByte(_raoul_is_up);
-	s.syncAsByte(_arms_are_out);
+	s.syncAsByte(_standingAndTalking);
+	s.syncAsByte(_dayWantsToTalk);
+	s.syncAsByte(_musicPlaying);
+	s.syncAsByte(_afterKissFl);
+	s.syncAsByte(_anim0ActvFl);
+	s.syncAsByte(_anim1ActvFl);
+	s.syncAsByte(_anim2ActvFl);
+	s.syncAsByte(_anim3ActvFl);
+	s.syncAsByte(_anim4ActvFl);
+	s.syncAsByte(_prevent1);
+	s.syncAsByte(_prevent2);
+	s.syncAsByte(_raoulStandingFl);
+	s.syncAsByte(_armsOutFl);
 
 	s.syncAsSint16LE(_dayStatus);
 	s.syncAsSint16LE(_raoulAction);
@@ -7727,19 +7727,19 @@ void Scene113::setup() {
 
 void Scene113::enter() {
 	if (_scene->_priorSceneId != RETURNING_FROM_LOADING) {
-		_standing_talking = false;
-		_day_wants_to_talk = false;
-		_music_is_playing = false;
-		_right_after_kiss = false;
-		_anim_0_running = false;
-		_anim_1_running = false;
-		_anim_2_running = false;
-		_anim_3_running = false;
-		_anim_4_running = false;
-		_prevent_1 = false;
-		_prevent_2 = false;
-		_raoul_is_up = false;
-		_arms_are_out = false;
+		_standingAndTalking = false;
+		_dayWantsToTalk = false;
+		_musicPlaying = false;
+		_afterKissFl = false;
+		_anim0ActvFl = false;
+		_anim1ActvFl = false;
+		_anim2ActvFl = false;
+		_anim3ActvFl = false;
+		_anim4ActvFl = false;
+		_prevent1 = false;
+		_prevent2 = false;
+		_raoulStandingFl = false;
+		_armsOutFl = false;
 	}
 
 	_scene->_hotspots.activate(NOUN_SMALL_NOTE, false);
@@ -7783,7 +7783,7 @@ void Scene113::enter() {
 		if (_globals[kCurrentYear] == 1881) {
 			if (_dayStatus <= 3) {
 				_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('r', 1), 1);
-				_anim_1_running = true;
+				_anim1ActvFl = true;
 			}
 
 			if (_raoulAction == 3)
@@ -7794,9 +7794,9 @@ void Scene113::enter() {
 				_scene->setAnimFrame(_globals._animationIndexes[1], 8);
 			}
 
-			if (_music_is_playing) {
+			if (_musicPlaying) {
 				_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 2), 0);
-				_anim_0_running = true;
+				_anim0ActvFl = true;
 				_christineHotspotId1 = _scene->_dynamicHotspots.add(NOUN_CHRISTINE, VERB_WALK_TO, SYNTAX_SINGULAR_FEM, EXT_NONE, Common::Rect(0, 0, 0, 0));
 				_scene->_dynamicHotspots[_christineHotspotId1]._articleNumber = PREP_ON;
 				_scene->setDynamicAnim(_christineHotspotId1, _globals._animationIndexes[0], 13);
@@ -7804,7 +7804,7 @@ void Scene113::enter() {
 				_scene->setDynamicAnim(_christineHotspotId1, _globals._animationIndexes[0], 16);
 				_scene->setAnimFrame(_globals._animationIndexes[0], 212);
 				_game._player._visible = true;
-				_anim_1_running = false;
+				_anim1ActvFl = false;
 			} else {
 				switch (_dayStatus) {
 				case 0:
@@ -7812,7 +7812,7 @@ void Scene113::enter() {
 				case 2:
 				case 3:
 					_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 1), 0);
-					_anim_0_running = true;
+					_anim0ActvFl = true;
 					_dayStatus = 2;
 					_scene->setAnimFrame(_globals._animationIndexes[0], 208);
 					_scene->_hotspots.activate(NOUN_CHRISTINE, true);
@@ -7821,7 +7821,7 @@ void Scene113::enter() {
 
 				default:
 					_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 2), 0);
-					_anim_0_running = true;
+					_anim0ActvFl = true;
 					_dayStatus = 7;
 					_game._player._visible = false;
 					_scene->setAnimFrame(_globals._animationIndexes[0], 165);
@@ -7845,7 +7845,7 @@ void Scene113::enter() {
 		} else if ((_globals[kDoneBrieConv203] == 1) || (_globals[kDoneBrieConv203] == 3)) {
 			_globals._animationIndexes[4] = _scene->loadAnimation(formAnimName('x', 1), 1);
 			_julieStatus = 0;
-			_anim_4_running = true;
+			_anim4ActvFl = true;
 			_globals[kMakeBrieLeave203] = true;
 			_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
 			_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, 1);
@@ -7858,13 +7858,13 @@ void Scene113::enter() {
 			_globals._sequenceIndexes[0] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[0], false, 1);
 			_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
 			_globals._animationIndexes[2] = _scene->loadAnimation(formAnimName('f', 1), 1);
-			_anim_2_running = true;
+			_anim2ActvFl = true;
 
 			if (_florentStatus != 3)
 				_florentStatus = 1;
 
 			_globals._animationIndexes[3] = _scene->loadAnimation(formAnimName('r', 1), 1);
-			_anim_3_running = true;
+			_anim3ActvFl = true;
 
 			if (_raoulAction == 3)
 				_scene->setAnimFrame(_globals._animationIndexes[3], 33);
@@ -7906,7 +7906,7 @@ void Scene113::enter() {
 
 			_globals._animationIndexes[4] = _scene->loadAnimation(formAnimName('x', 1), 1);
 			_julieStatus = 0;
-			_anim_4_running = true;
+			_anim4ActvFl = true;
 			_globals[kMakeBrieLeave203] = true;
 			_game._player._playerPos = Common::Point(190, 148);
 			_game._player._facing = FACING_NORTH;
@@ -7926,11 +7926,11 @@ void Scene113::enter() {
 
 			_globals._animationIndexes[2] = _scene->loadAnimation(formAnimName('f', 1), 1);
 			_florentStatus = 1;
-			_anim_2_running = true;
+			_anim2ActvFl = true;
 
 			_globals._animationIndexes[3] = _scene->loadAnimation(formAnimName('r', 1), 1);
 			_raoulAction = 3;
-			_anim_3_running = true;
+			_anim3ActvFl = true;
 			_scene->setAnimFrame(_globals._animationIndexes[3], 33);
 
 			if (_globals[kFlorentNameIsKnown] >= 1) {
@@ -7956,11 +7956,11 @@ void Scene113::enter() {
 	} else if ((_globals[kCurrentYear] == 1881) && (! _globals[kChrisKickedRaoulOut])) {
 		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('r', 1), 1);
 		_raoulAction = 3;
-		_anim_1_running = true;
+		_anim1ActvFl = true;
 		_scene->setAnimFrame(_globals._animationIndexes[1], 33);
 		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 1), 1);
 		_dayStatus = 2;
-		_anim_0_running = true;
+		_anim0ActvFl = true;
 
 		_scene->_hotspots.activate(NOUN_CHRISTINE, true);
 		_scene->_hotspots.activateAtPos(NOUN_CHRISTINE, false, Common::Point(220, 130));
@@ -8003,16 +8003,16 @@ void Scene113::enter() {
 }
 
 void Scene113::step() {
-	if (_anim_1_running)
+	if (_anim1ActvFl)
 		handleRaoulAnimation2();
 
-	if (_anim_4_running)
+	if (_anim4ActvFl)
 		handleJulieAnimation();
 
-	if (_anim_2_running)
+	if (_anim2ActvFl)
 		handleFlorentAnimation();
 
-	if (_anim_3_running) {
+	if (_anim3ActvFl) {
 		handleRaoulAnimation();
 
 		if ((!_game._objects.isInInventory(OBJ_SMALL_NOTE)) && (_scene->_animation[_globals._animationIndexes[3]]->getCurrentFrame() == 26)) {
@@ -8024,28 +8024,28 @@ void Scene113::step() {
 		}
 	}
 
-	if ((_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 86) && (!_prevent_2)) {
+	if ((_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 86) && (!_prevent2)) {
 		_scene->freeAnimation(_globals._animationIndexes[0]);
-		_prevent_2 = true;
+		_prevent2 = true;
 		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d', 2), 0);
 		_scene->setAnimFrame (_globals._animationIndexes[0], 86);
 		_game.syncTimers(3, _globals._animationIndexes[0], 4, 0);
 		_scene->animations_tick();
 	}
 
-	if (_anim_0_running) {
+	if (_anim0ActvFl) {
 		handleDayAnimation();
 
-		if ((_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 95) && (!_arms_are_out)) {
-			_standing_talking = true;
+		if ((_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 95) && (!_armsOutFl)) {
+			_standingAndTalking = true;
 			_dayStatus = 7;
 			_raoulAction = 3;
-			_arms_are_out = true;
+			_armsOutFl = true;
 			_game.syncTimers(3, _globals._animationIndexes[0], 3, _globals._animationIndexes[1]);
 		}
 
-		if ((_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 165) && !_right_after_kiss)
-			_right_after_kiss = true;
+		if ((_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == 165) && !_afterKissFl)
+			_afterKissFl = true;
 	}
 
 	switch (_game._trigger) {
@@ -8293,7 +8293,7 @@ void Scene113::actions() {
 			if (_globals[kCurrentYear] == 1993)
 				_vm->_dialogs->show(11341);
 			else {
-				if (_music_is_playing)
+				if (_musicPlaying)
 					_vm->_dialogs->show(11336);
 				else
 					_vm->_dialogs->show(11342);
@@ -8336,7 +8336,7 @@ void Scene113::preActions() {
 		_game._player.walk(Common::Point(272, 138), FACING_EAST);
 
 	if (! _action.isAction(VERB_EXIT_TO, NOUN_CORRIDOR) && !_globals[kChrisKickedRaoulOut]
-	 && !_action.isAction(VERB_LOOK, NOUN_CHRISTINE) && !_action.isAction(VERB_TAKE, NOUN_CHRISTINE) && _music_is_playing) {
+	 && !_action.isAction(VERB_LOOK, NOUN_CHRISTINE) && !_action.isAction(VERB_TAKE, NOUN_CHRISTINE) && _musicPlaying) {
 		_vm->_gameConv->run(13);
 		_vm->_gameConv->exportPointer(&_globals[kPlayerScore]);
 		_game._player.cancelCommand();
@@ -8518,14 +8518,14 @@ void Scene113::handleDayAnimation() {
 			} else {
 				_dayStatus = 1;
 				resetFrame = 25;
-				_day_wants_to_talk = false;
+				_dayWantsToTalk = false;
 			}
 			break;
 
 		case 1:
-			if (_day_wants_to_talk) {
+			if (_dayWantsToTalk) {
 				_dayStatus = 0;
-				_day_wants_to_talk = false;
+				_dayWantsToTalk = false;
 				resetFrame = 1;
 			} else {
 				resetFrame = 25;
@@ -8569,7 +8569,7 @@ void Scene113::handleDayAnimation() {
 				_dayStatus = 7;
 				resetFrame = 165;
 			}
-			if (_music_is_playing)
+			if (_musicPlaying)
 				resetFrame = 167;
 			break;
 
@@ -8586,13 +8586,13 @@ void Scene113::handleDayAnimation() {
 				resetFrame = 165;
 			}
 
-			if (_music_is_playing)
+			if (_musicPlaying)
 				resetFrame = 167;
 			break;
 
 		case 7:
 			resetFrame = 165;
-			if (_music_is_playing)
+			if (_musicPlaying)
 				resetFrame = 167;
 			break;
 
@@ -8670,7 +8670,7 @@ void Scene113::handleRaoulAnimation() {
 
 		case 4:
 			resetFrame = 38;
-			_raoul_is_up = true;
+			_raoulStandingFl = true;
 			_vm->_gameConv->hold();
 			break;
 
@@ -8690,7 +8690,7 @@ void Scene113::handleRaoulAnimation() {
 			_raoulAction = 1;
 		} else if (_raoulAction == 4) {
 			resetFrame = 38;
-			_raoul_is_up = true;
+			_raoulStandingFl = true;
 		} else if (_raoulAction == 0) {
 			resetFrame = 9;
 		} else {
@@ -8701,7 +8701,7 @@ void Scene113::handleRaoulAnimation() {
 
 	case 42:
 		if (_raoulAction == 4) {
-			if (!_prevent_2) {
+			if (!_prevent2) {
 				_vm->_gameConv->release();
 			}
 			resetFrame = 33;
@@ -8873,14 +8873,14 @@ void Scene113::handleFlorentConversation() {
 	switch (_action._activeAction._verbId) {
 	case 3:
 	case 4:
-		if (!_prevent_1) {
+		if (!_prevent1) {
 			_globals[kFlorentNameIsKnown] = 1;
 			_vm->_gameConv->setInterlocutorTrigger(82);
 			_scene->_dynamicHotspots.remove(_christineHotspotId2);
 			_christineHotspotId2 = _scene->_dynamicHotspots.add(NOUN_CHRISTINE, VERB_WALK_TO, SYNTAX_SINGULAR_FEM, EXT_NONE, Common::Rect(43, 118, 43 + 15, 118 + 29));
 			_scene->_dynamicHotspots[_christineHotspotId2]._articleNumber = PREP_ON;
 			_scene->_dynamicHotspots.setPosition(_christineHotspotId2, Common::Point(106, 127), FACING_SOUTHWEST);
-			_prevent_1 = true;
+			_prevent1 = true;
 		}
 		break;
 
@@ -8895,11 +8895,11 @@ void Scene113::handleFlorentConversation() {
 		break;
 
 	case 26:
-		if (!_prevent_2) {
+		if (!_prevent2) {
 			_scene->_sequences.setTimingTrigger(120, 92);
 			_vm->_gameConv->setInterlocutorTrigger(96);
 			_florentStatus = 0;
-			_prevent_2 = true;
+			_prevent2 = true;
 		}
 		break;
 
@@ -8921,7 +8921,7 @@ void Scene113::handleFlorentConversation() {
 	case 62:
 		if ((_action._activeAction._verbId != 3) && (_action._activeAction._verbId != 4) && (_action._activeAction._verbId != 19) &&
 			(_action._activeAction._verbId != 27) && (_action._activeAction._verbId != 28) && (_action._activeAction._verbId != 29)) {
-				if ((_raoulAction != 5) && (_raoulAction != 4) && !_raoul_is_up)
+				if ((_raoulAction != 5) && (_raoulAction != 4) && !_raoulStandingFl)
 					_raoulAction = 0;
 
 				if ((_florentStatus != 3) && (_florentStatus != 2))
@@ -8937,7 +8937,7 @@ void Scene113::handleFlorentConversation() {
 					_florentStatus = 0;
 		}
 
-		if ((_raoulAction != 3) && (_raoulAction != 5) && (_raoulAction != 4) && (!_raoul_is_up)) {
+		if ((_raoulAction != 3) && (_raoulAction != 5) && (_raoulAction != 4) && (!_raoulStandingFl)) {
 			_raoulAction = 1;
 			random = _vm->getRandomNumber(1, 2);
 			if (random == 1)
@@ -9013,14 +9013,14 @@ void Scene113::handleLoveConversation() {
 	switch (_action._activeAction._verbId) {
 	case 1:
 	case 2:
-		if (!_prevent_1) {
+		if (!_prevent1) {
 			_vm->_gameConv->setInterlocutorTrigger(82);
-			_prevent_1 = true;
+			_prevent1 = true;
 		}
 		break;
 
 	case 21:
-		if (!_arms_are_out) {
+		if (!_armsOutFl) {
 			_dayStatus = 4;
 			_scene->_sequences.setTimingTrigger(1, 70);
 			_scene->_userInterface.emptyConversationList();
@@ -9036,10 +9036,10 @@ void Scene113::handleLoveConversation() {
 		break;
 
 	case 31:
-		if (!_music_is_playing) {
+		if (!_musicPlaying) {
 			_vm->_gameConv->hold();
 			_dayStatus = 7;
-			_music_is_playing = true;
+			_musicPlaying = true;
 			_christineHotspotId1 = _scene->_dynamicHotspots.add(NOUN_CHRISTINE, VERB_WALK_TO, SYNTAX_SINGULAR_FEM, EXT_NONE, Common::Rect(0, 0, 0, 0));
 			_scene->_dynamicHotspots[_christineHotspotId1]._articleNumber = PREP_ON;
 			_scene->setDynamicAnim(_christineHotspotId1, _globals._animationIndexes[0], 14);
@@ -9051,18 +9051,18 @@ void Scene113::handleLoveConversation() {
 	switch (_game._trigger) {
 	case 62:
 		if (_action._activeAction._verbId != 0) {
-			if (_standing_talking) {
+			if (_standingAndTalking) {
 				_dayStatus = 6;
 			} else if (_dayStatus != 4) {
 				_dayStatus = 1;
 				_raoulAction = 0;
-				_day_wants_to_talk = false;
+				_dayWantsToTalk = false;
 			}
 		}
 		break;
 
 	case 66:
-		if (_standing_talking) {
+		if (_standingAndTalking) {
 			_dayStatus = 5;
 
 		} else {
@@ -9070,7 +9070,7 @@ void Scene113::handleLoveConversation() {
 				_dayStatus = 3;
 			} else {
 				_dayStatus = 1;
-				_day_wants_to_talk = true;
+				_dayWantsToTalk = true;
 			}
 
 			if (_raoulAction != 3) {
@@ -9084,14 +9084,14 @@ void Scene113::handleLoveConversation() {
 		break;
 
 	case 70:
-		if (_arms_are_out) {
+		if (_armsOutFl) {
 			_vm->_gameConv->release();
 			_vm->_gameConv->setInterlocutorTrigger(76);
 		}
 		break;
 
 	case 72:
-		if (_right_after_kiss)
+		if (_afterKissFl)
 			_vm->_gameConv->release();
 		else
 			_scene->_sequences.setTimingTrigger(1, 72);
@@ -9103,7 +9103,7 @@ void Scene113::handleLoveConversation() {
 		break;
 
 	case 78:
-		if (_arms_are_out) {
+		if (_armsOutFl) {
 			_vm->_gameConv->release();
 			_vm->_gameConv->setInterlocutorTrigger(76);
 		}
@@ -9121,7 +9121,7 @@ void Scene113::handleLoveConversation() {
 		_scene->_sequences.setTimingTrigger(120, 84);
 		_vm->_gameConv->hold();
 		_dayStatus = 1;
-		_day_wants_to_talk = true;
+		_dayWantsToTalk = true;
 		break;
 
 	case 84:
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
index e2b4faa..d1be6e0 100644
--- a/engines/mads/phantom/phantom_scenes1.h
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -340,19 +340,19 @@ public:
 
 class Scene113 : public Scene1xx {
 private:
-	bool _standing_talking;
-	bool _day_wants_to_talk;
-	bool _music_is_playing;
-	bool _right_after_kiss;
-	bool _anim_0_running;
-	bool _anim_1_running;
-	bool _anim_2_running;
-	bool _anim_3_running;
-	bool _anim_4_running;
-	bool _prevent_1;
-	bool _prevent_2;
-	bool _raoul_is_up;
-	bool _arms_are_out;
+	bool _standingAndTalking;
+	bool _dayWantsToTalk;
+	bool _musicPlaying;
+	bool _afterKissFl;
+	bool _anim0ActvFl;
+	bool _anim1ActvFl;
+	bool _anim2ActvFl;
+	bool _anim3ActvFl;
+	bool _anim4ActvFl;
+	bool _prevent1;
+	bool _prevent2;
+	bool _raoulStandingFl;
+	bool _armsOutFl;
 
 	int _christineHotspotId1;
 	int _christineHotspotId2;


Commit: 2856020c37fd6d216a7be74545d2ac6619124c35
    https://github.com/scummvm/scummvm/commit/2856020c37fd6d216a7be74545d2ac6619124c35
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-22T21:22:37+02:00

Commit Message:
MADS: Dragon: Add generic scene for group 1

Changed paths:
  A engines/mads/dragonsphere/dragonsphere_scenes1.cpp
  A engines/mads/dragonsphere/dragonsphere_scenes1.h
  A engines/mads/dragonsphere/globals_dragonsphere.cpp
  A engines/mads/dragonsphere/globals_dragonsphere.h
    engines/mads/dragonsphere/dragonsphere_scenes.h
    engines/mads/dragonsphere/game_dragonsphere.cpp
    engines/mads/dragonsphere/game_dragonsphere.h
    engines/mads/module.mk



diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.h b/engines/mads/dragonsphere/dragonsphere_scenes.h
index 173cc66..2ecf8e9 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.h
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.h
@@ -29,7 +29,6 @@
 #include "mads/dragonsphere/game_dragonsphere.h"
 //#include "mads/dragonsphere/globals_dragonsphere.h"
 
-
 namespace MADS {
 
 namespace Dragonsphere {
@@ -656,27 +655,6 @@ protected:
 };
 
 // TODO: Temporary, remove once implemented properly
-class Scene1xx : public DragonsphereScene {
-protected:
-	/**
-	 * Plays an appropriate sound when entering a scene
-	 */
-	void sceneEntrySound() {}
-
-	/**
-	 *Sets the AA file to use for the scene
-	 */
-	void setAAName() {}
-
-	/**
-	 * Updates the prefix used for getting player sprites for the scene
-	 */
-	void setPlayerSpritesPrefix() {}
-public:
-	Scene1xx(MADSEngine *vm) : DragonsphereScene(vm) {}
-};
-
-// TODO: Temporary, remove once implemented properly
 class DummyScene : public DragonsphereScene {
 public:
 	DummyScene(MADSEngine *vm) : DragonsphereScene(vm) {
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
new file mode 100644
index 0000000..6635354
--- /dev/null
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
@@ -0,0 +1,209 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/scummsys.h"
+#include "mads/mads.h"
+#include "mads/conversations.h"
+#include "mads/scene.h"
+#include "mads/dragonsphere/dragonsphere_scenes.h"
+#include "mads/dragonsphere/dragonsphere_scenes1.h"
+
+namespace MADS {
+
+namespace Dragonsphere {
+
+void Scene1xx::setAAName() {
+	int interface;
+
+	switch (_scene->_nextSceneId) {
+	case 108:
+	case 109:
+		interface = 3;
+		break;
+	case 110:
+		interface = 5;
+		break;
+	case 113:
+	case 114:
+	case 115:
+	case 117:
+	case 119:
+		interface = 1;
+		break;
+	case 116:
+		interface = 2;
+		break;
+	case 120:
+		interface = 8;
+		break;
+	default:
+		interface = 0;
+		break;
+	}
+
+	_game._aaName = Resources::formatAAName(interface);
+	_vm->_palette->setEntry(254, 56, 47, 32);
+
+}
+
+void Scene1xx::sceneEntrySound() {
+	if (!_vm->_musicFlag)
+		return;
+
+	switch (_scene->_nextSceneId) {
+	case 104:
+		if (_globals[kPlayerPersona] == 1)
+			_vm->_sound->command(44);
+		else
+			_vm->_sound->command(16);
+		break;
+
+	case 106:
+		if (_globals[kEndOfGame])
+			_vm->_sound->command(47);
+		else
+			_vm->_sound->command(16);
+		break;
+
+	case 108:
+		if (_game._visitedScenes.exists(109))
+			_vm->_sound->command(32);
+		else
+			_vm->_sound->command(33);
+		break;
+
+	case 109:
+		_vm->_sound->command(32);
+		break;
+
+	case 110:
+		_vm->_sound->command(37);
+		break;
+
+	case 111:
+		_vm->_sound->command(34);
+		break;
+
+	case 112:
+		_vm->_sound->command(38);
+		break;
+
+	case 113:
+		_vm->_sound->command(5);
+		if (_globals[kPlayerIsSeal])
+			_vm->_sound->command(35);
+		else
+			_vm->_sound->command(36);
+		break;
+
+	case 114:
+		_vm->_sound->command(36);
+		break;
+
+	case 115:
+		_vm->_sound->command(39);
+		break;
+
+	case 116:
+		_vm->_sound->command(40);
+		break;
+
+	case 117:
+		_vm->_sound->command(35);
+		break;
+
+	case 119:
+		_vm->_sound->command(41);
+		break;
+
+	case 120:
+		_vm->_sound->command(46);
+		break;
+
+	default:
+		_vm->_sound->command(16);
+		break;
+	}
+}
+
+void Scene1xx::setPlayerSpritesPrefix() {
+	int darkSceneFl = false;
+	int noPlayerFl = false;
+
+	_vm->_sound->command(5);
+	Common::String oldName = _game._player._spritesPrefix;
+
+	_globals[kPerformDisplacements] = true;
+
+	switch (_scene->_nextSceneId) {
+	case 106:
+		if (_scene->_currentSceneId == 120)
+			noPlayerFl = true;
+		break;
+
+	case 108:
+	case 109:
+	case 114:
+	case 115:
+		darkSceneFl = true;
+		break;
+
+	case 111:
+	case 112:
+	case 117:
+	case 120:
+	case 119:
+		noPlayerFl = true;
+		break;
+
+	case 113:
+		if (!_globals[kPlayerPersona])
+			noPlayerFl = true;
+		darkSceneFl = true;
+		break;
+	}
+
+	if (noPlayerFl || _globals[kNoLoadWalker]) {
+		_game._player._spritesPrefix = "";
+	} else if (!_game._player._forcePrefix) {
+		if (!_globals[kPlayerPersona] || _scene->_nextSceneId == 108 || _scene->_nextSceneId == 109) {
+			if (_scene->_nextSceneId == 113 || _scene->_nextSceneId == 114 || _scene->_nextSceneId == 115 || _scene->_nextSceneId == 116)
+				_game._player._spritesPrefix = "PD";
+			else
+				_game._player._spritesPrefix = "KG";
+		} else
+			_game._player._spritesPrefix = "PD";
+
+		if (darkSceneFl)
+			_game._player._spritesPrefix += "D";
+	}
+
+	if (oldName != _game._player._spritesPrefix)
+		_game._player._spritesChanged = true;
+
+	_game._player._scalingVelocity = true;
+}
+
+/*------------------------------------------------------------------------*/
+
+} // End of namespace Dragonsphere
+} // End of namespace MADS
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.h b/engines/mads/dragonsphere/dragonsphere_scenes1.h
new file mode 100644
index 0000000..4194845
--- /dev/null
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.h
@@ -0,0 +1,59 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef MADS_DRAGON_SCENES1_H
+#define MADS_DRAGON_SCENES1_H
+
+#include "common/scummsys.h"
+#include "common/serializer.h"
+#include "mads/game.h"
+#include "mads/scene.h"
+#include "mads/dragonsphere/dragonsphere_scenes.h"
+
+namespace MADS {
+
+namespace Dragonsphere {
+
+class Scene1xx : public DragonsphereScene {
+protected:
+	/**
+	 * Plays an appropriate sound when entering a scene
+	 */
+	void sceneEntrySound();
+
+	/**
+	 *Sets the AA file to use for the scene
+	 */
+	void setAAName();
+
+	/**
+	 * Updates the prefix used for getting player sprites for the scene
+	 */
+	void setPlayerSpritesPrefix();
+public:
+	Scene1xx(MADSEngine *vm) : DragonsphereScene(vm) {}
+};
+
+} // End of namespace Dragonsphere
+} // End of namespace MADS
+
+#endif /* MADS_DRAGON_SCENES1_H */
diff --git a/engines/mads/dragonsphere/game_dragonsphere.cpp b/engines/mads/dragonsphere/game_dragonsphere.cpp
index b07eab9..f528056 100644
--- a/engines/mads/dragonsphere/game_dragonsphere.cpp
+++ b/engines/mads/dragonsphere/game_dragonsphere.cpp
@@ -28,7 +28,7 @@
 #include "mads/msurface.h"
 #include "mads/dragonsphere/game_dragonsphere.h"
 //#include "mads/nebular/dialogs_nebular.h"
-//#include "mads/nebular/globals_nebular.h"
+#include "mads/dragonsphere/globals_dragonsphere.h"
 #include "mads/dragonsphere/dragonsphere_scenes.h"
 
 namespace MADS {
diff --git a/engines/mads/dragonsphere/game_dragonsphere.h b/engines/mads/dragonsphere/game_dragonsphere.h
index b57f883..290c38d 100644
--- a/engines/mads/dragonsphere/game_dragonsphere.h
+++ b/engines/mads/dragonsphere/game_dragonsphere.h
@@ -26,7 +26,7 @@
 #include "common/scummsys.h"
 #include "mads/game.h"
 #include "mads/globals.h"
-//#include "mads/nebular/globals_nebular.h"
+#include "mads/dragonsphere/globals_dragonsphere.h"
 
 namespace MADS {
 
@@ -88,15 +88,6 @@ enum InventoryObject {
 	OBJ_NEW_BUNDLE = 48
 };
 
-// HACK: A stub for now, remove from here once it's implemented properly
-class DragonsphereGlobals : public Globals {
-public:
-	DragonsphereGlobals() {
-		resize(210);	// Rex has 210 globals
-	}
-	virtual ~DragonsphereGlobals() {}
-};
-
 class GameDragonsphere : public Game {
 	friend class Game;
 protected:
diff --git a/engines/mads/dragonsphere/globals_dragonsphere.cpp b/engines/mads/dragonsphere/globals_dragonsphere.cpp
new file mode 100644
index 0000000..fa05ed9
--- /dev/null
+++ b/engines/mads/dragonsphere/globals_dragonsphere.cpp
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/scummsys.h"
+#include "common/config-manager.h"
+#include "mads/dragonsphere/globals_dragonsphere.h"
+
+namespace MADS {
+
+namespace Dragonsphere {
+
+DragonsphereGlobals::DragonsphereGlobals()
+	: Globals() {
+	// Initialize lists
+	resize(140);
+	_spriteIndexes.resize(30);
+	_sequenceIndexes.resize(30);
+	_animationIndexes.resize(30);
+}
+
+void DragonsphereGlobals::synchronize(Common::Serializer &s) {
+	Globals::synchronize(s);
+
+	_spriteIndexes.synchronize(s);
+	_sequenceIndexes.synchronize(s);
+	_animationIndexes.synchronize(s);
+}
+
+
+} // End of namespace Dragonsphere
+
+} // End of namespace MADS
diff --git a/engines/mads/dragonsphere/globals_dragonsphere.h b/engines/mads/dragonsphere/globals_dragonsphere.h
new file mode 100644
index 0000000..cc0e42e
--- /dev/null
+++ b/engines/mads/dragonsphere/globals_dragonsphere.h
@@ -0,0 +1,184 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef MADS_GLOBALS_DRAGONSPHERE_H
+#define MADS_GLOBALS_DRAGONSPHERE_H
+
+#include "common/scummsys.h"
+#include "common/array.h"
+#include "mads/game.h"
+#include "mads/resources.h"
+
+namespace MADS {
+
+namespace Dragonsphere {
+
+enum GlobalId {
+	// Global variables
+
+	kWalkerTiming           = 0,
+	kWalkerTiming2			= 1,
+	kPlayerPersona = 10,
+	kPlayerScore = 11,
+	kDragonHighScene = 12,
+	kDragonMyScene = 13,
+	kNoLoadWalker = 14,
+	kPlayerScoreFlags = 15,
+	kSorcerorDefeated = 16,
+	kPreRoom = 17,
+	kPerformDisplacements = 18,
+
+	kKingStatus = 20,
+	kWardStatus = 21,
+	kTalkedToSoptus = 22,
+	kTalkedToShifter = 23,
+	kAmuletStatus = 24,
+	kBooksStatus = 25,
+	kTapestryStatus = 26,
+	kTalkedToMerchant = 27,
+	kCanViewCrownHole = 28,
+	kTalkedToStatus = 29,
+
+	kGuardPidStatus = 30,
+	kCrawledOutOfBed101 = 31,
+	kStatueIsOnStairway114 = 32,
+	kDogIsAsleep = 33,
+	kCrystalBallDead = 34,
+	kThrewBone = 35,
+	kWoodenDoorOpen = 36,
+	kKingIsInStairwell = 37,
+	kLlanieStatus = 38,
+	kNoTalkToGuard = 39,
+
+	kObjectGiven201 = 40,
+	kKingGotStabbed = 41,
+	kGivenObjectBefore = 42,
+	kGuardsAreAsleep = 43,
+	kDomeUp = 44,
+	kTalkedToWise = 45,
+	kDollGiven = 46,
+	kResetConv = 47,
+	kTalkedToGreta = 48,
+	kSlimeHealed = 49,
+
+	kDanceMusicOn = 50,
+	kPlayerIsSeal = 51,
+	kVinesHavePlayer = 52,
+	kEndOfGame = 53,
+	kResetConv2 = 54,
+	kInvokedFrom111 = 55,
+
+	kSaveWinsInDesert = 60,
+	kBubblesUpIn301 = 61,
+	kBubbleWontAttack = 62,
+	kPidLookedAtDoll = 63,
+
+	kOasis = 80,
+	kFireHoles = 81,
+	kDesertRoom = 82,
+	kFromDirection = 83,
+	kDesertCounter = 84,
+	kMoveDirection409 = 85,
+	kHealVerbsVisible = 86,
+	kGrapesHaveGrown = 87,
+	kPidTalkShamon = 88,
+	kPidJustDied = 89,
+
+	kGrapesAreDead = 90,
+	kRocIsChewingDates = 91,
+	kWinsInDesert = 92,
+	kWinsTillPrize = 93,
+	kPidHasBeenHealedSop = 94,
+	kGamePoints = 95,
+	kDancePoints = 96,
+	kCluePoints = 97,
+	kPrizesOwedToPlayer = 98,
+	kObjectFlags = 99,
+
+	kWaterfallDiverted = 100,
+	kShakStatus = 101,
+	kMaxGridValue = 102,
+	kMoveDirection510 = 103,
+	kShak506Angry = 104,
+	kMonsterIsDead = 105,
+	kDoneTalkingLani502 = 106,
+	kFoundLani504 = 107,
+	kSaidUseSwordShak = 108,
+	kGobletFilledSoporific = 109,
+
+	kBeenIn504AsPid = 110,
+	kSeenLaniDeadFirstTime = 111,
+	kSaidPoemIn504 = 112,
+	kTriedToHealLlanie504 = 113,
+	kPutBundleOnLlanie504 = 114,
+	kMake504Empty = 115,
+	kHasTakenMud = 116,
+	kPlatformClicked606 = 117,
+	kHadSpiritBundle = 118,
+
+	kMudIsInEye603 = 120,
+	kRopeIsAlive = 121,
+	kRatCageIsOpen = 122,
+	kFlaskOnPlate = 123,
+	kFluidIsDripping = 124,
+	kHoleIsIn607 = 125,
+	kRopeIsHangingIn607 = 126,
+	kObjectIsInFreezer605 = 127,
+	kObjectImitated = 128,
+	kHasRed = 129,
+
+	kHasYellow = 130,
+	kHasBlue = 131,
+	kWizardDead = 132,
+	kVineWillGrab = 133,
+	kFloorIsCool = 134,
+	kRatMelted = 135,
+	kDoorIsCool = 136,
+	kUsedElevator = 137,
+	kBeenOnTopFloor = 138,
+	kTorchIsIn609 = 139,
+
+	kGridPosition = 140
+	};
+
+class DragonsphereGlobals : public Globals {
+public:
+	SynchronizedList _spriteIndexes;
+	SynchronizedList _sequenceIndexes;
+	SynchronizedList _animationIndexes;
+public:
+	/**
+	 * Constructor
+	 */
+	DragonsphereGlobals();
+
+	/**
+	* Synchronize the globals data
+	*/
+	virtual void synchronize(Common::Serializer &s);
+};
+
+} // End of namespace Dragonsphere
+
+} // End of namespace MADS
+
+#endif /* MADS_GLOBALS_DRAGONSPHERE_H */
diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index 3bd9ef5..998e09b 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -3,6 +3,8 @@ MODULE := engines/mads
 MODULE_OBJS := \
 	dragonsphere/game_dragonsphere.o \
 	dragonsphere/dragonsphere_scenes.o \
+	dragonsphere/dragonsphere_scenes1.o \
+	dragonsphere/globals_dragonsphere.o \
 	phantom/game_phantom.o \
 	phantom/globals_phantom.o \
 	phantom/phantom_scenes.o \


Commit: 43065c9ee26bd0f82da0fe00cb6309c77acc029e
    https://github.com/scummvm/scummvm/commit/43065c9ee26bd0f82da0fe00cb6309c77acc029e
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-22T22:15:57+02:00

Commit Message:
MADS: Dragon: Implement scene 101

Changed paths:
    engines/mads/dragonsphere/dragonsphere_scenes.cpp
    engines/mads/dragonsphere/dragonsphere_scenes1.cpp
    engines/mads/dragonsphere/dragonsphere_scenes1.h



diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.cpp b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
index c24d0e9..0f0fb5c 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
@@ -28,6 +28,7 @@
 #include "mads/scene.h"
 #include "mads/dragonsphere/game_dragonsphere.h"
 #include "mads/dragonsphere/dragonsphere_scenes.h"
+#include "mads/dragonsphere/dragonsphere_scenes1.h"
 
 namespace MADS {
 
@@ -42,7 +43,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	switch (scene._nextSceneId) {
 	// Scene group #1 (Castle, river and caves)
 	case 101:	// king's bedroom
-		return new DummyScene(vm);	// TODO
+		return new Scene101(vm);
 	case 102:	// queen's bedroom
 		return new DummyScene(vm);	// TODO
 	case 103:	// outside king's bedroom
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
index 6635354..6f107df 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
@@ -205,5 +205,39 @@ void Scene1xx::setPlayerSpritesPrefix() {
 
 /*------------------------------------------------------------------------*/
 
+Scene101::Scene101(MADSEngine *vm) : Scene1xx(vm) {
+}
+
+void Scene101::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+}
+
+void Scene101::setup() {
+	setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene101::enter() {
+	sceneEntrySound();
+}
+
+void Scene101::step() {
+}
+
+void Scene101::actions() {
+	if (_action.isObject(NOUN_BED)) {
+		int sprIdx = _scene->_sprites.addSprites("*ob001i", false);
+		int seqIdx = _scene->_sequences.addStampCycle(sprIdx, false, 1);
+		_scene->_sequences.setDepth(seqIdx, 0);
+		_scene->_sequences.setPosition(seqIdx, Common::Point(10, 50));
+		_action._inProgress = false;
+	}
+}
+
+void Scene101::preActions() {
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Dragonsphere
 } // End of namespace MADS
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.h b/engines/mads/dragonsphere/dragonsphere_scenes1.h
index 4194845..023a789 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.h
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.h
@@ -53,6 +53,17 @@ public:
 	Scene1xx(MADSEngine *vm) : DragonsphereScene(vm) {}
 };
 
+class Scene101 : public Scene1xx {
+public:
+	Scene101(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
 } // End of namespace Dragonsphere
 } // End of namespace MADS
 


Commit: 91bc69b1a30e4146bd0c135358249dd7bb436e99
    https://github.com/scummvm/scummvm/commit/91bc69b1a30e4146bd0c135358249dd7bb436e99
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-22T23:23:06+03:00

Commit Message:
MADS: Phantom: Some initial work on reading conversation files

Changed paths:
    engines/mads/conversations.cpp



diff --git a/engines/mads/conversations.cpp b/engines/mads/conversations.cpp
index ada740d..6b1b44d 100644
--- a/engines/mads/conversations.cpp
+++ b/engines/mads/conversations.cpp
@@ -22,9 +22,25 @@
 
 #include "mads/conversations.h"
 #include "mads/mads.h"
+#include "mads/compression.h"
+#include "common/file.h"
 
 namespace MADS {
 
+struct ConvData {
+	uint16 nodes;
+	uint16 unk1;
+	uint16 messages;
+	uint16 unk2;
+	uint16 unk3;
+	uint16 imports;
+	uint16 speakers;
+	Common::List<Common::String> portraits;
+	Common::String speechFile;
+};
+
+#define MAX_SPEAKERS 5
+
 GameConversation::GameConversation(MADSEngine *vm)
 	: _vm(vm) {
 	_running = _restoreRunning = 0;
@@ -34,6 +50,58 @@ GameConversation::~GameConversation() {
 }
 
 void GameConversation::get(int id) {
+	Common::File inFile;
+	Common::String fileName = Common::String::format("CONV%03d.CNV", id);
+	inFile.open(fileName);
+	MadsPack convFileUnpacked(&inFile);
+	Common::SeekableReadStream *convFile = convFileUnpacked.getItemStream(0);
+
+	char buffer[16];
+
+	ConvData conv;
+
+	// Section 0: Header
+	conv.nodes = convFile->readUint16LE();
+	conv.unk1 = convFile->readUint16LE();
+	conv.messages = convFile->readUint16LE();
+	conv.unk2 = convFile->readUint16LE();
+	conv.unk3 = convFile->readUint16LE();
+	conv.imports = convFile->readUint16LE();
+	conv.speakers = convFile->readUint16LE();
+
+	debug("Conv %d has %d nodes, %d messages, %d imports and %d speakers", id, conv.nodes, conv.messages, conv.imports, conv.speakers);
+
+	for (uint16 i = 0; i < MAX_SPEAKERS; i++) {
+		convFile->read(buffer, 16);
+		Common::String portrait = buffer;
+		debug("Speaker %d, portrait %s", i, portrait.c_str());
+		conv.portraits.push_back(portrait);
+	}
+
+	for (uint16 i = 0; i < MAX_SPEAKERS; i++) {
+		convFile->skip(2);
+	}
+
+	convFile->read(buffer, 14);
+	conv.speechFile = Common::String(buffer);
+	debug("Speech file %s", conv.speechFile.c_str());
+
+	convFile->skip(32);	// unknown bytes
+
+	// Section 1
+	convFile = convFileUnpacked.getItemStream(1);
+
+	for (uint16 i = 0; i < conv.nodes; i++) {
+		uint16 nodeIndex = convFile->readUint16LE();
+		debug("Node %d, index %d", i, nodeIndex);
+		convFile->skip(2);	// 01 00
+		convFile->skip(6);
+	}
+
+	// TODO: Read the rest of the sections
+
+	inFile.close();
+
 	warning("TODO GameConversation::get");
 }
 


Commit: 0f27b68d579319f26d358da094f7ab180b8df312
    https://github.com/scummvm/scummvm/commit/0f27b68d579319f26d358da094f7ab180b8df312
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-10-22T23:23:07+03:00

Commit Message:
MADS: Phantom: Disable auto camera adjust code for V2 games, for now

Changed paths:
    engines/mads/animation.cpp



diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp
index 1c492bb..0b0e28a 100644
--- a/engines/mads/animation.cpp
+++ b/engines/mads/animation.cpp
@@ -464,21 +464,25 @@ void Animation::update() {
 		scene._spriteSlots.fullRefresh();
 	}
 
-	// Handle any offset adjustment for sprites as of this frame
-	bool paChanged = false;
-	if (scene._posAdjust.x != misc._posAdjust.x) {
-		scene._posAdjust.x = misc._posAdjust.x;
-		paChanged = true;
-	}
-	if (scene._posAdjust.y != misc._posAdjust.y) {
-		scene._posAdjust.y = misc._posAdjust.y;
-		paChanged = true;
-	}
+	bool isV2 = (_vm->getGameID() != GType_RexNebular);
+	if (!isV2) {
+		// Handle any offset adjustment for sprites as of this frame
+		// FIXME: This doesn't work properly for Phantom scene 101
+		bool paChanged = false;
+		if (scene._posAdjust.x != misc._posAdjust.x) {
+			scene._posAdjust.x = misc._posAdjust.x;
+			paChanged = true;
+		}
+		if (scene._posAdjust.y != misc._posAdjust.y) {
+			scene._posAdjust.y = misc._posAdjust.y;
+			paChanged = true;
+		}
 
-	if (paChanged) {
-		int newIndex = scene._spriteSlots.add();
-		scene._spriteSlots[newIndex]._seqIndex = -1;
-		scene._spriteSlots[newIndex]._flags = IMG_REFRESH;
+		if (paChanged) {
+			int newIndex = scene._spriteSlots.add();
+			scene._spriteSlots[newIndex]._seqIndex = -1;
+			scene._spriteSlots[newIndex]._flags = IMG_REFRESH;
+		}
 	}
 
 	// Main frame animation loop - frames get animated by being placed, as necessary, into the


Commit: 796b04d3cdc95986be03fab6eb66d50138942cfc
    https://github.com/scummvm/scummvm/commit/796b04d3cdc95986be03fab6eb66d50138942cfc
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-23T00:28:47+02:00

Commit Message:
MADS: Dragon: Implement scene 102

Changed paths:
    engines/mads/dragonsphere/dragonsphere_scenes.cpp
    engines/mads/dragonsphere/dragonsphere_scenes.h
    engines/mads/dragonsphere/dragonsphere_scenes1.cpp
    engines/mads/dragonsphere/dragonsphere_scenes1.h



diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.cpp b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
index 0f0fb5c..c0781f5 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
@@ -45,7 +45,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 101:	// king's bedroom
 		return new Scene101(vm);
 	case 102:	// queen's bedroom
-		return new DummyScene(vm);	// TODO
+		return new Scene102(vm);
 	case 103:	// outside king's bedroom
 		return new DummyScene(vm);	// TODO
 	case 104:	// fireplace / bookshelf
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.h b/engines/mads/dragonsphere/dragonsphere_scenes.h
index 2ecf8e9..a3bc22c 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.h
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.h
@@ -33,24 +33,34 @@ namespace MADS {
 
 namespace Dragonsphere {
 
+enum Verb {
+	VERB_LOOK = 0x3,
+	VERB_TAKE = 0x4,
+	VERB_PUSH = 0x5,
+	VERB_OPEN = 0x6,
+	VERB_PUT = 0x7,
+	VERB_TALK_TO = 0x8,
+	VERB_GIVE = 0x9,
+	VERB_PULL = 0xA,
+	VERB_CLOSE = 0xB,
+	VERB_THROW = 0xC,
+	VERB_WALK_TO = 0xD,
+	VERB_WALK_ACROSS = 0x11,
+	VERB_WALK_BEHIND = 0x1C,
+	VERB_LOOK_AT = 0x1E,
+	VERB_WALK_THROUGH = 0x25,
+	VERB_WALK_INTO = 0x27,
+	VERB_WALK_DOWN = 0xA9,
+	VERB_WALK = 0x1CB,
+	VERB_WALK_AROUND = 0x221
+};
+
 enum Noun {
 	NOUN_GAME = 0x1,
 	NOUN_QSAVE = 0x2,
-	NOUN_LOOK = 0x3,
-	NOUN_TAKE = 0x4,
-	NOUN_PUSH = 0x5,
-	NOUN_OPEN = 0x6,
-	NOUN_PUT = 0x7,
-	NOUN_TALK_TO = 0x8,
-	NOUN_GIVE = 0x9,
-	NOUN_PULL = 0xA,
-	NOUN_CLOSE = 0xB,
-	NOUN_THROW = 0xC,
-	NOUN_WALK_TO = 0xD,
 	NOUN_NOTHING = 0xE,
 	NOUN_ = 0xF,
 	NOUN_FLOOR = 0x10,
-	NOUN_WALK_ACROSS = 0x11,
 	NOUN_RUG = 0x12,
 	NOUN_CARPET = 0x13,
 	NOUN_WALL = 0x14,
@@ -61,18 +71,14 @@ enum Noun {
 	NOUN_NIGHTSTAND = 0x19,
 	NOUN_TAPESTRY = 0x1A,
 	NOUN_DRESSING_SCREEN = 0x1B,
-	NOUN_WALK_BEHIND = 0x1C,
 	NOUN_ROYAL_CREST = 0x1D,
-	NOUN_LOOK_AT = 0x1E,
 	NOUN_WASHBASIN = 0x1F,
 	NOUN_WASH_AT = 0x20,
 	NOUN_BOOK = 0x21,
 	NOUN_FIREPLACE = 0x22,
 	NOUN_FIREPLACE_SCREEN = 0x23,
 	NOUN_DOOR_TO_QUEENS_ROOM = 0x24,
-	NOUN_WALK_THROUGH = 0x25,
 	NOUN_HALL_TO_SOUTH = 0x26,
-	NOUN_WALK_INTO = 0x27,
 	NOUN_WALL_PLAQUE = 0x28,
 	NOUN_DECORATION = 0x29,
 	NOUN_SWORDS = 0x2A,
@@ -202,7 +208,6 @@ enum Noun {
 	NOUN_DOOR = 0xA6,
 	NOUN_WALL_SWITCH = 0xA7,
 	NOUN_STAIRS = 0xA8,
-	NOUN_WALK_DOWN = 0xA9,
 	NOUN_EDGE_OF_ABYSS = 0xAA,
 	NOUN_COURTYARD = 0xAB,
 	NOUN_ROCK = 0xAC,
@@ -492,7 +497,6 @@ enum Noun {
 	NOUN_PATH_TO_HIGHTOWER = 0x1C8,
 	NOUN_SPIRIT_PLANE = 0x1C9,
 	NOUN_SPIRIT_TREE = 0x1CA,
-	NOUN_WALK = 0x1CB,
 	NOUN_REMAINS = 0x1CC,
 	NOUN_DOORWAY_TO_ELEVATOR = 0x1CD,
 	NOUN_DRAGON_DOOR = 0x1CE,
@@ -578,7 +582,6 @@ enum Noun {
 	NOUN_SHIFTER_VILLAGE = 0x21E,
 	NOUN_SLATHAN_SKY = 0x21F,
 	NOUN_SHIFTER = 0x220,
-	NOUN_WALK_AROUND = 0x221,
 	NOUN_WRECKED_BRIDGE = 0x222,
 	NOUN_SHACK = 0x223,
 	NOUN_WRECKED_SHACK = 0x224,
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
index 6f107df..5b5aa72 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
@@ -239,5 +239,429 @@ void Scene101::preActions() {
 
 /*------------------------------------------------------------------------*/
 
+Scene102::Scene102(MADSEngine *vm) : Scene1xx(vm) {
+	_diaryHotspotIdx1 = -1;
+	_diaryHotspotIdx2 = -1;
+	_diaryFrame = -1;
+	_animRunning = -1;
+}
+
+void Scene102::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+	s.syncAsSint16LE(_diaryHotspotIdx1);
+	s.syncAsSint16LE(_diaryHotspotIdx2);
+	s.syncAsSint16LE(_diaryFrame);
+	s.syncAsSint16LE(_animRunning);
+}
+
+void Scene102::setup() {
+	setPlayerSpritesPrefix();
+	setAAName();
+
+	_scene->addActiveVocab(NOUN_DIARIES);
+	_scene->addActiveVocab(VERB_WALK_TO);
+}
+
+void Scene102::enter() {
+	_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('p', 0), false);
+	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('p', 1), false);
+	_globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('y', 0), false);
+	_globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('y', 1), false);
+	_globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('x', -1), false);
+	_globals._spriteIndexes[7] = _scene->_sprites.addSprites("*KGRD_6", false);
+	_globals._spriteIndexes[8] = _scene->_sprites.addSprites(formAnimName('y', 2), false);
+
+	_globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 7, 0, 0, 0);
+	_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 7, 0, 0, 0);
+	_globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 7, 0, 0, 0);
+
+	_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, -1);
+	_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 12);
+	_diaryHotspotIdx1 = _scene->_dynamicHotspots.add(NOUN_DIARIES, VERB_WALK_TO, SYNTAX_PLURAL, _globals._sequenceIndexes[1], Common::Rect(0, 0, 0, 0));
+	_scene->_dynamicHotspots.setPosition(_diaryHotspotIdx1, Common::Point(47, 123), FACING_NORTHWEST);
+
+	_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, -1);
+	_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 12);
+	_diaryHotspotIdx2 = _scene->_dynamicHotspots.add(NOUN_DIARIES, VERB_WALK_TO, SYNTAX_PLURAL, _globals._sequenceIndexes[2], Common::Rect(0, 0, 0, 0));
+	_scene->_dynamicHotspots.setPosition(_diaryHotspotIdx2, Common::Point(47, 123), FACING_NORTHWEST);
+
+	if (_scene->_priorSceneId == 103) {
+		_game._player._playerPos = Common::Point(170, 152);
+		_game._player._facing = FACING_NORTHWEST;
+		_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 5);
+	} else if (_scene->_priorSceneId != RETURNING_FROM_LOADING) {
+		_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -2);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 5);
+		_game._player.firstWalk(Common::Point(-10, 130), FACING_EAST, Common::Point(35, 144), FACING_EAST, false);
+		_game._player.setWalkTrigger(70);
+	} else {
+		_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 5);
+	}
+
+	sceneEntrySound();
+}
+
+void Scene102::step() {
+	int resetFrame;
+
+	if ((_animRunning == 1) && _scene->_animation[_globals._animationIndexes[0]]) {
+		if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() != _diaryFrame) {
+			_diaryFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
+			resetFrame = -1;
+
+			switch (_diaryFrame) {
+			case 6:
+				_scene->deleteSequence(_globals._sequenceIndexes[1]);
+				_game.syncTimers(1, _globals._sequenceIndexes[1], 3, _globals._animationIndexes[0]);
+				break;
+
+			case 10:
+				_vm->_sound->command(65);
+				break;
+
+			case 26:
+				_vm->_dialogs->show(10210);
+				_vm->_dialogs->show(10211);
+				_vm->_dialogs->show(10212);
+				break;
+
+			default:
+				break;
+			}
+
+			if (resetFrame >= 0) {
+				if (resetFrame != _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame()) {
+					_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
+					_diaryFrame = resetFrame;
+				}
+			}
+		}
+	}
+
+	if ((_animRunning == 2) && _scene->_animation[_globals._animationIndexes[0]]) {
+		if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() != _diaryFrame) {
+			_diaryFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
+			resetFrame = -1;
+
+			switch (_diaryFrame) {
+			case 6:
+				_scene->deleteSequence(_globals._sequenceIndexes[2]);
+				_game.syncTimers(1, _globals._sequenceIndexes[2], 3, _globals._animationIndexes[0]);
+				break;
+
+			case 26:
+				_vm->_dialogs->show(10213);
+				_vm->_dialogs->show(10214);
+				break;
+
+			default:
+				break;
+			}
+
+			if (resetFrame >= 0) {
+				if (resetFrame != _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame()) {
+					_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
+					_diaryFrame = resetFrame;
+				}
+			}
+		}
+	}
+
+	if (_game._trigger >= 70) {
+		switch (_game._trigger) {
+		case 70:
+			_scene->deleteSequence(_globals._sequenceIndexes[6]);
+			_vm->_sound->command(25);
+			_globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], false, 9, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 5);
+			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 71);
+			break;
+
+		case 71: {
+			int idx = _globals._sequenceIndexes[6];
+			_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[6], -2);
+			_game.syncTimers(1, _globals._sequenceIndexes[6], 1, idx);
+			_game._player._stepEnabled = true;
+			}
+			break;
+
+		default:
+			break;
+		}
+	}
+}
+
+void Scene102::actions() {
+	if (_action._lookFlag) {
+		_vm->_dialogs->show(10201);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_KINGS_ROOM) || _action.isAction(VERB_OPEN, NOUN_DOOR_TO_KINGS_ROOM) || _action.isAction(VERB_PULL, NOUN_DOOR_TO_KINGS_ROOM)) {
+		switch (_game._trigger) {
+		case 0:
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;
+			_globals._sequenceIndexes[7] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[7], true, 8, 2);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[7],true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 2, 2, 1);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 0, 0, 3);
+			break;
+
+		case 1:
+			_scene->deleteSequence(_globals._sequenceIndexes[6]);
+			_vm->_sound->command(24);
+			_globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 9, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 5);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 2);
+			break;
+
+		case 2: {
+			int idx = _globals._sequenceIndexes[6];
+			_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, 5);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 5);
+			_game.syncTimers(1, _globals._sequenceIndexes[6], 1, idx);
+			}
+			break;
+
+		case 3:
+			_game._player._visible = true;
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[7]);
+			_game._player.walk(Common::Point(0, 130), FACING_WEST);
+			_game._player._walkOffScreenSceneId = 101;
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_HALLWAY) || _action.isAction(VERB_OPEN, NOUN_DOOR_TO_HALLWAY) || _action.isAction(VERB_PULL, NOUN_DOOR_TO_HALLWAY)) {
+		_scene->_nextSceneId = 103;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_DIARIES) || _action.isAction(VERB_OPEN, NOUN_DIARIES)) {
+		switch (_game._trigger) {
+		case 0:
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;
+			_animRunning = 1;
+			_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('B',-1), 1);
+			_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
+			break;
+
+		case 1:
+			_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, -1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 12);
+			_diaryHotspotIdx1 = _scene->_dynamicHotspots.add(NOUN_DIARIES, VERB_WALK_TO, SYNTAX_PLURAL, _globals._sequenceIndexes[1], Common::Rect(0, 0, 0, 0));
+			_scene->_dynamicHotspots.setPosition(_diaryHotspotIdx1, Common::Point(47, 123), FACING_NORTHWEST);
+			_game._player._visible = true;
+			_game.syncTimers(2, 0, 3, _globals._animationIndexes[0]);
+			_scene->_sequences.setTimingTrigger(6, 2);
+			break;
+
+		case 2:
+			_game._player.walk(Common::Point(51, 121), FACING_NORTHWEST);
+			_game._player.setWalkTrigger(3);
+			break;
+
+		case 3:
+			_game._player._visible = false;
+			_animRunning = 2;
+			_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('A',-1), 4);
+			_game.syncTimers(3, _globals._animationIndexes[0], 2, 0);
+			break;
+
+		case 4:
+			_globals._sequenceIndexes[2] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[2], false, -1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 12);
+			_diaryHotspotIdx2 = _scene->_dynamicHotspots.add(NOUN_DIARIES, VERB_WALK_TO, SYNTAX_PLURAL, _globals._sequenceIndexes[2], Common::Rect(0, 0, 0, 0));
+			_scene->_dynamicHotspots.setPosition(_diaryHotspotIdx2, Common::Point(47, 123), FACING_NORTHWEST);
+			_game._player._visible = true;
+			_game._player._stepEnabled = true;
+			_game.syncTimers(2, 0, 3, _globals._animationIndexes[0]);
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isObject(NOUN_FIREPLACE)) {
+			_vm->_dialogs->show(10202);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_BED)) {
+			_vm->_dialogs->show(10203);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_SHUTTERS)) {
+			_vm->_dialogs->show(10204);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_RUG)) {
+			_vm->_dialogs->show(10206);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_BOOKCASE)) {
+			_vm->_dialogs->show(10208);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_DIARIES)) {
+			_vm->_dialogs->show(10209);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_DOOR_TO_KINGS_ROOM)) {
+			_vm->_dialogs->show(10215);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_FLOWERS)) {
+			_vm->_dialogs->show(10216);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_WINDOW)) {
+			_vm->_dialogs->show(10217);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_WOOD_BASKET)) {
+			_vm->_dialogs->show(10219);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_FIREPLACE_SCREEN)) {
+			_vm->_dialogs->show(10220);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_NIGHTSTAND)) {
+			_vm->_dialogs->show(10222);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_DOOR_TO_HALLWAY)) {
+			_vm->_dialogs->show(10223);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_CHEST)) {
+			_vm->_dialogs->show(10224);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_TAPESTRY)) {
+			_vm->_dialogs->show(10226);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_SCONCE)) {
+			_vm->_dialogs->show(10227);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_FLOOR)) {
+			_vm->_dialogs->show(10228);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_WALL)) {
+			_vm->_dialogs->show(10229);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_DECORATION)) {
+			_vm->_dialogs->show(10230);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_CEILING)) {
+			_vm->_dialogs->show(10231);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_CHEST)) {
+		_vm->_dialogs->show(10224);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_FLOWERS)) {
+		_vm->_dialogs->show(10225);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_WINDOW)) {
+		_vm->_dialogs->show(10218);
+		_action._inProgress = false;
+		return;
+	}
+
+	if ((_action.isAction(VERB_PUSH) || _action.isAction(VERB_PULL)) && _action.isObject(NOUN_FIREPLACE_SCREEN)) {
+		_vm->_dialogs->show(10221);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_SHUTTERS)) {
+		_vm->_dialogs->show(10205);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_PULL, NOUN_RUG)) {
+		_vm->_dialogs->show(10207);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene102::preActions() {
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Dragonsphere
 } // End of namespace MADS
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.h b/engines/mads/dragonsphere/dragonsphere_scenes1.h
index 023a789..ac82669 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.h
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.h
@@ -64,6 +64,24 @@ public:
 	virtual void preActions();
 	virtual void actions();
 };
+
+class Scene102 : public Scene1xx {
+private:
+	int _diaryHotspotIdx1;
+	int _diaryHotspotIdx2;
+	int _diaryFrame;
+	int _animRunning;
+
+public:
+	Scene102(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
 } // End of namespace Dragonsphere
 } // End of namespace MADS
 


Commit: d26bc1937dbb7aedd2b11f729e3e114fbf38d608
    https://github.com/scummvm/scummvm/commit/d26bc1937dbb7aedd2b11f729e3e114fbf38d608
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-23T10:50:55+02:00

Commit Message:
MADS: Dragon: Implement scene 103

Changed paths:
    engines/mads/dragonsphere/dragonsphere_scenes.cpp
    engines/mads/dragonsphere/dragonsphere_scenes1.cpp
    engines/mads/dragonsphere/dragonsphere_scenes1.h



diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.cpp b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
index c0781f5..23647ed 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
@@ -47,7 +47,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 102:	// queen's bedroom
 		return new Scene102(vm);
 	case 103:	// outside king's bedroom
-		return new DummyScene(vm);	// TODO
+		return new Scene103(vm);
 	case 104:	// fireplace / bookshelf
 		return new DummyScene(vm);	// TODO
 	case 105:	// dining room
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
index 5b5aa72..14849fa 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
@@ -272,9 +272,9 @@ void Scene102::enter() {
 	_globals._spriteIndexes[7] = _scene->_sprites.addSprites("*KGRD_6", false);
 	_globals._spriteIndexes[8] = _scene->_sprites.addSprites(formAnimName('y', 2), false);
 
-	_globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 7, 0, 0, 0);
-	_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 7, 0, 0, 0);
-	_globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 7, 0, 0, 0);
+	_globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 7, 0);
+	_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 7, 0);
+	_globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 7, 0);
 
 	_globals._sequenceIndexes[1] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[1], false, -1);
 	_scene->_sequences.setDepth(_globals._sequenceIndexes[1], 12);
@@ -663,5 +663,400 @@ void Scene102::preActions() {
 
 /*------------------------------------------------------------------------*/
 
+Scene103::Scene103(MADSEngine *vm) : Scene1xx(vm) {
+}
+
+void Scene103::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+}
+
+void Scene103::setup() {
+	setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene103::enter() {
+	_vm->_disableFastwalk = true;
+
+	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('y', 1), false);
+	_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('y', 2), false);
+	_globals._spriteIndexes[8] = _scene->_sprites.addSprites(formAnimName('y', 7), false);
+	_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('y', 0), false);
+	_globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('y', 3), false);
+	_globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('y', 4), false);
+	_globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('y', 5), false);
+	_globals._spriteIndexes[7] = _scene->_sprites.addSprites(formAnimName('y', 6), false);
+	_globals._spriteIndexes[9] = _scene->_sprites.addSprites(formAnimName('x', 0), false);
+	_globals._spriteIndexes[10] = _scene->_sprites.addSprites(formAnimName('x', 1), false);
+	_globals._spriteIndexes[11] = _scene->_sprites.addSprites("*KGRD_9", false);
+
+	_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 7, 0, 0);
+	_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 7, 0, 4);
+	_globals._sequenceIndexes[8] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[8], false, 7, 0, 0);
+	_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 7, 0, 0);
+	_globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 7, 0, 3);
+	_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 7, 0, 2);
+	_globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 7, 0, 0);
+	_globals._sequenceIndexes[7] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[7], false, 7, 0, 5);
+
+	if ((_scene->_priorSceneId == 104) || (_scene->_priorSceneId == 105)) {
+		_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 8);
+		_globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 8);
+	}
+
+	if (_scene->_priorSceneId == 102) {
+		_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 6);
+		_globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -2);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 14);
+		_scene->setCamera(Common::Point(320, 0));
+		_game._player.walk(Common::Point(482, 128), FACING_SOUTH);
+		_game._player.firstWalk(Common::Point(471, 108), FACING_SOUTH, Common::Point(482, 128), FACING_SOUTH, false);
+		_game._player.setWalkTrigger(72);
+	} else if (_scene->_priorSceneId == 104) {
+		_game._player._playerPos = Common::Point(130, 152);
+		_game._player._facing = FACING_NORTHEAST;
+	} else if (_scene->_priorSceneId == 105) {
+		_game._player._playerPos = Common::Point(517, 152);
+		_game._player._facing = FACING_NORTHWEST;
+		_scene->setCamera(Common::Point(320, 0));
+	} else if ((_scene->_priorSceneId == 101) || (_scene->_priorSceneId != RETURNING_FROM_LOADING)) {
+		_globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 6);
+		_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -2);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 14);
+		_game._player.firstWalk(Common::Point(173, 108), FACING_SOUTH, Common::Point(162, 127), FACING_SOUTH, false);
+		_game._player.setWalkTrigger(70);
+	} else {
+		_globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 6);
+		_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 6);
+	}
+
+	sceneEntrySound();
+}
+
+void Scene103::step() {
+	switch (_game._trigger) {
+	case 70:
+		_scene->deleteSequence(_globals._sequenceIndexes[9]);
+		_vm->_sound->command(25);
+		_globals._sequenceIndexes[9] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[9], false, 6, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 6);
+		_scene->_sequences.setAnimRange(_globals._sequenceIndexes[9], 1, 3);
+		_scene->_sequences.setTrigger(_globals._sequenceIndexes[9], 0, 0, 71);
+		break;
+
+	case 71: {
+		int tmpIdx = _globals._sequenceIndexes[9];
+		_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 6);
+		_game.syncTimers(1, _globals._sequenceIndexes[9], 1, tmpIdx);
+		_game._player._stepEnabled = true;
+		}
+		break;
+
+	case 72:
+		_scene->deleteSequence(_globals._sequenceIndexes[10]);
+		_vm->_sound->command(25);
+		_globals._sequenceIndexes[10] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[10], false, 6, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 6);
+		_scene->_sequences.setAnimRange(_globals._sequenceIndexes[10], 1, 3);
+		_scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 73);
+		break;
+
+	case 73: {
+		int tmpIdx = _globals._sequenceIndexes[10];
+		_globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 6);
+		_game.syncTimers(1, _globals._sequenceIndexes[10], 1, tmpIdx);
+		_game._player._stepEnabled = true;
+		}
+		break;
+
+	default:
+		break;
+	}
+}
+
+void Scene103::actions() {
+	if (_action._lookFlag) {
+		_vm->_dialogs->show(10301);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_KINGS_ROOM) || _action.isAction(VERB_OPEN, NOUN_DOOR_TO_KINGS_ROOM) || _action.isAction(VERB_PULL, NOUN_DOOR_TO_KINGS_ROOM)) {
+		switch (_game._trigger) {
+		case 0:
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;
+			_globals._sequenceIndexes[11] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[11], false, 7, 2);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[11],true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 2, 2, 1);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 0, 0, 3);
+			break;
+
+		case 1:
+			_scene->deleteSequence(_globals._sequenceIndexes[9]);
+			_vm->_sound->command(24);
+			_globals._sequenceIndexes[9] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[9], false, 7, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 8);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[9], 0, 0, 2);
+			break;
+
+		case 2: {
+			int tmpIdx = _globals._sequenceIndexes[9];
+			_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -2);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 14);
+			_game.syncTimers(1, _globals._sequenceIndexes[9], 1, tmpIdx);
+			}
+			break;
+
+		case 3:
+			_game._player._visible = true;
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[11]);
+			_scene->_sequences.setTimingTrigger(1,4);
+			break;
+
+		case 4:
+			_game._player.walk(Common::Point(173, 108), FACING_NORTH);
+			_game._player.setWalkTrigger(5);
+			break;
+
+		case 5:
+			_scene->deleteSequence(_globals._sequenceIndexes[9]);
+			_vm->_sound->command(25);
+			_globals._sequenceIndexes[9] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[9], false, 7, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 1);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[9], 0, 0, 6);
+			break;
+
+		case 6: {
+			int tmpIdx = _globals._sequenceIndexes[9];
+			_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 1);
+			_game.syncTimers(1, _globals._sequenceIndexes[9], 1, tmpIdx);
+			_scene->_sequences.setTimingTrigger(6, 7);
+			}
+			break;
+
+		case 7:
+			_scene->_nextSceneId = 101;
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_QUEENS_ROOM) || _action.isAction(VERB_OPEN, NOUN_DOOR_TO_QUEENS_ROOM) || _action.isAction(VERB_PULL, NOUN_DOOR_TO_QUEENS_ROOM)) {
+		switch (_game._trigger) {
+		case 0:
+			_game._player._stepEnabled = false;
+			_game._player._visible = false;
+			_globals._sequenceIndexes[11] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[11], true, 7, 2);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[11],true);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 2, 2, 1);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 0, 0, 3);
+			break;
+
+		case 1:
+			_scene->deleteSequence(_globals._sequenceIndexes[10]);
+			_vm->_sound->command(24);
+			_globals._sequenceIndexes[10] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[10], false, 7, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 8);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 2);
+			break;
+
+		case 2: {
+			int tmpIdx = _globals._sequenceIndexes[10];
+			_globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -2);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 14);
+			_game.syncTimers(1, _globals._sequenceIndexes[10], 1, tmpIdx);
+			}
+			break;
+
+		case 3:
+			_game._player._visible = true;
+			_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[11]);
+			_scene->_sequences.setTimingTrigger(1,4);
+			break;
+
+		case 4:
+			_game._player.walk(Common::Point(471, 108), FACING_NORTH);
+			_game._player.setWalkTrigger(5);
+			break;
+
+		case 5:
+			_scene->deleteSequence(_globals._sequenceIndexes[10]);
+			_vm->_sound->command(25);
+			_globals._sequenceIndexes[10] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[10], false, 7, 1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1);
+			_scene->_sequences.setTrigger(_globals._sequenceIndexes[10], 0, 0, 6);
+			break;
+
+		case 6: {
+			int tmpIdx = _globals._sequenceIndexes[10];
+			_globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 1);
+			_game.syncTimers(1, _globals._sequenceIndexes[10], 1, tmpIdx);
+			_scene->_sequences.setTimingTrigger(6, 7);
+			}
+			break;
+
+		case 7:
+			_scene->_nextSceneId = 102;
+			break;
+
+		default:
+			break;
+		}
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_MEETING_ROOM) || _action.isAction(VERB_OPEN, NOUN_DOOR_TO_MEETING_ROOM) || _action.isAction(VERB_PULL, NOUN_DOOR_TO_MEETING_ROOM)) {
+		_scene->_nextSceneId = 104;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_BALLROOM) || _action.isAction(VERB_OPEN, NOUN_DOOR_TO_BALLROOM) || _action.isAction(VERB_PULL, NOUN_DOOR_TO_BALLROOM)) {
+		_scene->_nextSceneId = 105;
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isObject(NOUN_TAPESTRY)) {
+			if ((_scene->_customDest.x <= 75) && (_scene->_customDest.y <= 130))
+				_vm->_dialogs->show(10302);
+			else
+				_vm->_dialogs->show(10303);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_COAT_OF_ARMS)) {
+			_vm->_dialogs->show(10305);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_DOOR_TO_QUEENS_ROOM)) {
+			_vm->_dialogs->show(10307);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_DOOR_TO_KINGS_ROOM)) {
+			_vm->_dialogs->show(10308);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_CEDAR_CHEST)) {
+			_vm->_dialogs->show(10309);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_TABLE)) {
+			_vm->_dialogs->show(10311);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_SMALL_WINDOW)) {
+			_vm->_dialogs->show(10312);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_LARGE_WINDOW)) {
+			_vm->_dialogs->show(10314);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_BATTLE_AXES)) {
+			_vm->_dialogs->show(10315);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_BUST_ON_WALL)) {
+			_vm->_dialogs->show(10317);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_DECORATION)) {
+			_vm->_dialogs->show(10320);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_WALL_PLAQUE)) {
+			_vm->_dialogs->show(10322);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_DOOR_TO_BALLROOM)) {
+			_vm->_dialogs->show(10323);
+			_action._inProgress = false;
+			return;
+		}
+
+		if (_action.isObject(NOUN_DOOR_TO_MEETING_ROOM)) {
+			_vm->_dialogs->show(10324);
+			_action._inProgress = false;
+			return;
+		}
+	}
+
+	if ((_action.isAction(VERB_TAKE) || _action.isAction(VERB_PULL)) && _action.isObject(NOUN_BATTLE_AXES)) {
+		_vm->_dialogs->show(10316);
+		_action._inProgress = false;
+		return;
+	}
+
+	if ((_action.isAction(VERB_PUSH) || _action.isAction(VERB_PULL)) && _action.isObject(NOUN_TAPESTRY)) {
+		_vm->_dialogs->show(10304);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_PULL, NOUN_COAT_OF_ARMS)) {
+		_vm->_dialogs->show(10306);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_CEDAR_CHEST)) {
+		_vm->_dialogs->show(10310);
+		_action._inProgress = false;
+		return;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_SMALL_WINDOW) || _action.isAction(VERB_OPEN, NOUN_LARGE_WINDOW)) {
+		_vm->_dialogs->show(10313);
+		_action._inProgress = false;
+		return;
+	}
+}
+
+void Scene103::preActions() {
+}
+
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Dragonsphere
 } // End of namespace MADS
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.h b/engines/mads/dragonsphere/dragonsphere_scenes1.h
index ac82669..9e723ca 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.h
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.h
@@ -82,6 +82,18 @@ public:
 	virtual void preActions();
 	virtual void actions();
 };
+
+class Scene103 : public Scene1xx {
+public:
+	Scene103(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
 } // End of namespace Dragonsphere
 } // End of namespace MADS
 


Commit: 85c45c210ea3939f34dd0921590d08f9053d9e77
    https://github.com/scummvm/scummvm/commit/85c45c210ea3939f34dd0921590d08f9053d9e77
Author: Strangerke (strangerke at scummvm.org)
Date: 2015-10-24T12:38:31+02:00

Commit Message:
MADS: Dragon: Implement scene 104

Changed paths:
    engines/mads/conversations.cpp
    engines/mads/conversations.h
    engines/mads/dragonsphere/dragonsphere_scenes.cpp
    engines/mads/dragonsphere/dragonsphere_scenes.h
    engines/mads/dragonsphere/dragonsphere_scenes1.cpp
    engines/mads/dragonsphere/dragonsphere_scenes1.h
    engines/mads/dragonsphere/game_dragonsphere.h



diff --git a/engines/mads/conversations.cpp b/engines/mads/conversations.cpp
index 6b1b44d..10ce41d 100644
--- a/engines/mads/conversations.cpp
+++ b/engines/mads/conversations.cpp
@@ -44,6 +44,7 @@ struct ConvData {
 GameConversation::GameConversation(MADSEngine *vm)
 	: _vm(vm) {
 	_running = _restoreRunning = 0;
+	_nextStartNode = nullptr;
 }
 
 GameConversation::~GameConversation() {
@@ -142,4 +143,11 @@ void GameConversation::release() {
 	warning("TODO: GameConversation::release");
 }
 
+void GameConversation::reset(int id) {
+	warning("TODO: GameConversation::reset");
+}
+
+void GameConversation::abortConv() {
+	warning("TODO: GameConversation::abort");
+}
 } // End of namespace MADS
diff --git a/engines/mads/conversations.h b/engines/mads/conversations.h
index 48d054f..c4bf06e 100644
--- a/engines/mads/conversations.h
+++ b/engines/mads/conversations.h
@@ -42,6 +42,7 @@ public:
 	 */
 	virtual ~GameConversation();
 
+	int* _nextStartNode;
 	int* getVariable(int idx);
 
 	void get(int id);
@@ -53,6 +54,8 @@ public:
 	void setInterlocutorTrigger(int val);
 	void hold();
 	void release();
+	void reset(int id);
+	void abortConv();
 
 	int _running;
 	int _restoreRunning;
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.cpp b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
index 23647ed..b43f7af 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
@@ -49,7 +49,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	case 103:	// outside king's bedroom
 		return new Scene103(vm);
 	case 104:	// fireplace / bookshelf
-		return new DummyScene(vm);	// TODO
+		return new Scene104(vm);
 	case 105:	// dining room
 		return new DummyScene(vm);	// TODO
 	case 106:	// throne room
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.h b/engines/mads/dragonsphere/dragonsphere_scenes.h
index a3bc22c..e9b4871 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes.h
+++ b/engines/mads/dragonsphere/dragonsphere_scenes.h
@@ -50,6 +50,17 @@ enum Verb {
 	VERB_LOOK_AT = 0x1E,
 	VERB_WALK_THROUGH = 0x25,
 	VERB_WALK_INTO = 0x27,
+	VERB_INVOKE = 0x2F,
+	VERB_ATTACK = 0x39,
+	VERB_CARVE_UP = 0x3A,
+	VERB_THRUST = 0x57,
+	VERB_POUR = 0x62,
+	VERB_POUR_CONTENTS_OF = 0x63,
+	VERB_DRINK = 0x64,
+	VERB_SHIFT_SELF = 0x73,
+	VERB_SHIFT_INTO_BEAR = 0x74,
+	VERB_SHIFT_INTO_SEAL = 0x75,
+	VERB_SHIFT_INTO_SNAKE = 0x76,
 	VERB_WALK_DOWN = 0xA9,
 	VERB_WALK = 0x1CB,
 	VERB_WALK_AROUND = 0x221
@@ -86,7 +97,6 @@ enum Noun {
 	NOUN_BUST_ON_WALL = 0x2C,
 	NOUN_WALL_ARCH = 0x2D,
 	NOUN_SIGNET_RING = 0x2E,
-	NOUN_INVOKE = 0x2F,
 	NOUN_POLISH = 0x30,
 	NOUN_GANGBANG = 0x31,
 	NOUN_BIRD_FIGURINE = 0x32,
@@ -96,8 +106,6 @@ enum Noun {
 	NOUN_MAKE_NOISE = 0x36,
 	NOUN_SHIELDSTONE = 0x37,
 	NOUN_SWORD = 0x38,
-	NOUN_ATTACK = 0x39,
-	NOUN_CARVE_UP = 0x3A,
 	NOUN_GOBLET = 0x3B,
 	NOUN_FILL = 0x3C,
 	NOUN_DRINK_FROM = 0x3D,
@@ -126,7 +134,6 @@ enum Noun {
 	NOUN_MAGIC_BELT = 0x54,
 	NOUN_ADJUST = 0x55,
 	NOUN_AMULET = 0x56,
-	NOUN_THRUST = 0x57,
 	NOUN_MUD = 0x58,
 	NOUN_FEEL = 0x59,
 	NOUN_TASTE = 0x5A,
@@ -137,9 +144,6 @@ enum Noun {
 	NOUN_FLASK = 0x5F,
 	NOUN_FLASK_FULL_OF_ACID = 0x60,
 	NOUN_POUR_CONTENTS = 0x61,
-	NOUN_POUR = 0x62,
-	NOUN_POUR_CONTENTS_OF = 0x63,
-	NOUN_DRINK = 0x64,
 	NOUN_ROPE = 0x65,
 	NOUN_TIE = 0x66,
 	NOUN_POWER_VACUUM_STONE = 0x67,
@@ -154,10 +158,6 @@ enum Noun {
 	NOUN_BLACK_SPHERE = 0x70,
 	NOUN_SOPTUS_SOPORIFIC = 0x71,
 	NOUN_SHIFTER_RING = 0x72,
-	NOUN_SHIFT_SELF = 0x73,
-	NOUN_SHIFT_INTO_BEAR = 0x74,
-	NOUN_SHIFT_INTO_SEAL = 0x75,
-	NOUN_SHIFT_INTO_SNAKE = 0x76,
 	NOUN_REVERT = 0x77,
 	NOUN_MEDICINE_BUNDLE = 0x78,
 	NOUN_SHAKE = 0x79,
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
index 14849fa..61e64b5 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
@@ -409,7 +409,7 @@ void Scene102::actions() {
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
 			_globals._sequenceIndexes[7] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[7], true, 8, 2);
-			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[7],true);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[7], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 2, 2, 1);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 0, 0, 3);
 			break;
@@ -795,7 +795,7 @@ void Scene103::actions() {
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
 			_globals._sequenceIndexes[11] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[11], false, 7, 2);
-			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[11],true);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[11], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 2, 2, 1);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 0, 0, 3);
 			break;
@@ -861,7 +861,7 @@ void Scene103::actions() {
 			_game._player._stepEnabled = false;
 			_game._player._visible = false;
 			_globals._sequenceIndexes[11] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[11], true, 7, 2);
-			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[11],true);
+			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[11], true);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 2, 2, 1);
 			_scene->_sequences.setTrigger(_globals._sequenceIndexes[11], 0, 0, 3);
 			break;
@@ -1058,5 +1058,1993 @@ void Scene103::preActions() {
 
 /*------------------------------------------------------------------------*/
 
+Scene104::Scene104(MADSEngine *vm) : Scene1xx(vm) {
+	_anim0ActvFl = false;
+	_anim1ActvFl = false;
+	_anim2ActvFl = false;
+	_anim3ActvFl = false;
+	_anim4ActvFl = false;
+	_anim5ActvFl = false;
+	_activateTimerFl = false;
+	_wasBearFl = false;
+	_amuletWorksFl = false;
+	_pidDrawnSword = false;
+	_anim6ActvFl = false;
+
+	_animationRunning = -1;
+	_deathTimer = -1;
+	_deathFrame = -1;
+	_doorwayHotspotId = -1;
+
+	_kingStatus = -1;
+	_kingFrame = -1;
+	_kingCount = -1;
+	_macCount = -1;
+	_macFrame = -1;
+	_macStatus = -1;
+	_queenStatus = -1;
+	_queenFrame = -1;
+	_queenCount = -1;
+	_pidStatus = -1;
+	_pidFrame = -1;
+	_pidCount = -1;
+	_twinklesFrame = -1;
+	_twinklesStatus = -1;
+	_twinklesCount = -1;
+
+	_tapestryFrame = -1;
+	_clock = -1;
+}
+
+void Scene104::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+	s.syncAsByte(_anim0ActvFl);
+	s.syncAsByte(_anim1ActvFl);
+	s.syncAsByte(_anim2ActvFl);
+	s.syncAsByte(_anim3ActvFl);
+	s.syncAsByte(_anim4ActvFl);
+	s.syncAsByte(_anim5ActvFl);
+	s.syncAsByte(_activateTimerFl);
+	s.syncAsByte(_wasBearFl);
+	s.syncAsByte(_amuletWorksFl);
+	s.syncAsByte(_pidDrawnSword);
+	s.syncAsByte(_anim6ActvFl);
+
+	s.syncAsSint16LE(_animationRunning);
+	s.syncAsSint16LE(_deathTimer);
+	s.syncAsSint16LE(_deathFrame);
+	s.syncAsSint16LE(_doorwayHotspotId);
+
+	s.syncAsSint16LE(_kingStatus);
+	s.syncAsSint16LE(_kingFrame);
+	s.syncAsSint16LE(_kingCount);
+	s.syncAsSint16LE(_queenStatus);
+	s.syncAsSint16LE(_queenFrame);
+	s.syncAsSint16LE(_queenCount);
+	s.syncAsSint16LE(_macStatus);
+	s.syncAsSint16LE(_macFrame);
+	s.syncAsSint16LE(_macCount);
+	s.syncAsSint16LE(_pidStatus);
+	s.syncAsSint16LE(_pidFrame);
+	s.syncAsSint16LE(_pidCount);
+	s.syncAsSint16LE(_twinklesStatus);
+	s.syncAsSint16LE(_twinklesFrame);
+	s.syncAsSint16LE(_twinklesCount);
+
+	s.syncAsSint16LE(_tapestryFrame);
+	s.syncAsSint32LE(_clock);
+}
+
+void Scene104::setup() {
+	if (_scene->_currentSceneId == 119)
+		_globals[kNoLoadWalker] = true;
+
+	setPlayerSpritesPrefix();
+	setAAName();
+
+	_scene->addActiveVocab(NOUN_DOORWAY);
+	_scene->addActiveVocab(NOUN_QUEEN_MOTHER);
+	_scene->addActiveVocab(NOUN_KING);
+}
+
+void Scene104::enter() {
+	_vm->_gameConv->get(1);
+
+	if (_globals[kPlayerPersona] == 1) {
+		_scene->_sprites.addSprites(formAnimName('e', 8), false);
+		_scene->_sprites.addSprites(formAnimName('b', 5), false);
+	}
+
+	_scene->_hotspots.activate(NOUN_MACMORN, false);
+
+	if (_scene->_priorSceneId != RETURNING_FROM_LOADING) {
+		_animationRunning = 0;
+		_anim0ActvFl = false;
+		_anim1ActvFl = false;
+		_anim2ActvFl = false;
+		_anim3ActvFl = false;
+		_anim4ActvFl = false;
+		_anim5ActvFl = false;
+		_kingCount = 0;
+		_macCount = 0;
+		_queenCount = 0;
+		_twinklesCount = 0;
+		_deathTimer = 0;
+		_clock = 0;
+		_activateTimerFl = false;
+		_wasBearFl = false;
+		_amuletWorksFl = false;
+		_pidDrawnSword = false;
+	}
+
+	_anim6ActvFl = false;
+
+	_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('x', 0), false);
+	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('x', 1), false);
+	_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('x', 2), false);
+	_globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('x', 3), false);
+	_globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('x', 5), false);
+
+	_globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('x', 4), false);
+	if (_globals[kNoLoadWalker]) {
+		_scene->drawToBackground(_globals._spriteIndexes[6], 5, Common::Point(-32000, -32000), 0, 100);
+		_scene->_sprites.remove(_globals._spriteIndexes[6]);
+	}
+
+	if (_globals[kPlayerPersona] == 0) {
+		_scene->_hotspots.activateAtPos(NOUN_TABLE, false, Common::Point(139, 132));
+
+		_globals._spriteIndexes[7] = _scene->_sprites.addSprites("*KGRD_8", false);
+		_globals._spriteIndexes[8] = _scene->_sprites.addSprites("*KGRM1_8", false);
+		_globals._spriteIndexes[11] = _scene->_sprites.addSprites(formAnimName('y', 5), false);
+		_globals._spriteIndexes[10] = _scene->_sprites.addSprites(formAnimName('y', 4), false);
+		_globals._spriteIndexes[12] = _scene->_sprites.addSprites(formAnimName('y', 1), false);
+
+		if (_globals[kTapestryStatus] == 0 || _globals[kTapestryStatus] == 2) {
+			_scene->_hotspots.activate(NOUN_WALL_PANEL, false);
+			_scene->_hotspots.activate(NOUN_SECRET_DOOR, false);
+			_globals._sequenceIndexes[11] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[11], false, -1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[11], 6);
+		} else {
+			_globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -1);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 6);
+			_scene->_hotspots.activateAtPos(NOUN_TAPESTRY, false, Common::Point(310, 70));
+		}
+
+		if (_globals[kBooksStatus] == 1 || _globals[kBooksStatus] == 3) {
+			if (_globals[kTapestryStatus] == 1 || _globals[kTapestryStatus] == 3)
+				_scene->_hotspots.activate(NOUN_SECRET_DOOR, false);
+		} else if (_globals[kBooksStatus] == 2 || _globals[kBooksStatus] == 4) {
+			_globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, -2);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 8);
+
+			if (_globals[kTapestryStatus] == 1 || _globals[kTapestryStatus] == 3) {
+				_scene->_hotspots.activate(NOUN_WALL_PANEL, false);
+				_scene->_hotspots.activate(NOUN_SECRET_DOOR, true);
+			}
+		}
+	} else {
+		_globals._spriteIndexes[14] = _scene->_sprites.addSprites(formAnimName('e', 5), false);
+		_scene->_sprites.addSprites(formAnimName('b', 0), false);
+		_globals._spriteIndexes[13] = _scene->_sprites.addSprites(formAnimName('b', 3), false);
+		_scene->_hotspots.activateAtPos(NOUN_TABLE, false, Common::Point(140, 107));
+		_scene->_hotspots.activateAtPos(NOUN_TABLE, true, Common::Point(139, 132));
+		_globals._spriteIndexes[10] = _scene->_sprites.addSprites(formAnimName('y', 4), false);
+
+		if (_globals[kNoLoadWalker]) {
+			_scene->drawToBackground(_globals._spriteIndexes[10], 1, Common::Point(-32000, -32000), 0, 100);
+			_scene->_sprites.remove(_globals._spriteIndexes[10]);
+		}
+
+		_globals._spriteIndexes[9] = _scene->_sprites.addSprites(formAnimName('y', 3), false);
+		_globals._sequenceIndexes[9] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[9], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[9], 8);
+		_doorwayHotspotId = _scene->_dynamicHotspots.add(NOUN_DOORWAY, VERB_WALK_THROUGH, SYNTAX_SINGULAR, _globals._sequenceIndexes[9], Common::Rect(0, 0, 0, 0));
+		_scene->_dynamicHotspots.setPosition(_doorwayHotspotId, Common::Point(295, 145), FACING_NORTHEAST);
+
+		_globals[kBooksStatus] = 0;
+		_scene->_hotspots.activateAtPos(NOUN_TAPESTRY, false, Common::Point(310, 70));
+	}
+
+	if (_globals[kBooksStatus] == 0)
+		_scene->_hotspots.activate(NOUN_BOOKS, false);
+
+	_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 7, 0, 5);
+	_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 7, 0);
+	_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 7, 0);
+	_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+	_globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 7, 0);
+
+
+	if (_globals[kPlayerPersona] == 0) {
+		_globals._sequenceIndexes[5] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[5], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 4);
+	}
+
+	if (_scene->_priorSceneId == 106) {
+		_game._player._playerPos = Common::Point(201, 152);
+		_game._player._facing = FACING_NORTHWEST;
+		_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 14);
+	} else if ((_scene->_priorSceneId == 119) || (_scene->_priorSceneId == 104)) {
+		_game._player._visible = false;
+		_game._player._stepEnabled = false;
+
+		_globals._sequenceIndexes[5] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[5], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 4);
+		_scene->_sequences.setTimingTrigger(60, 77);
+
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('k', 1), 0);
+		_anim0ActvFl = true;
+		_kingStatus = 2;
+		_scene->setAnimFrame(_globals._animationIndexes[0], 22);
+
+		_globals._animationIndexes[2] = _scene->loadAnimation(formAnimName('q', 1), 0);
+		_anim2ActvFl = true;
+		_queenStatus = 0;
+
+		_globals._sequenceIndexes[14] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[14], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[14], 6);
+
+		_globals._animationIndexes[4] = _scene->loadAnimation(formAnimName('p', 1), 79);
+
+		int idx = _scene->_dynamicHotspots.add(NOUN_QUEEN_MOTHER, VERB_WALK_TO, SYNTAX_FEM_NOT_PROPER, EXT_NONE, Common::Rect(0, 0, 0, 0));
+		_scene->_dynamicHotspots[idx]._articleNumber = PREP_ON;
+		_scene->setDynamicAnim(idx, _globals._animationIndexes[2], 0);
+
+		_scene->_hotspots.activate(NOUN_MACMORN, true);
+
+		idx = _scene->_dynamicHotspots.add(NOUN_KING, VERB_WALK_TO, SYNTAX_MASC_NOT_PROPER, EXT_NONE, Common::Rect(0, 0, 0, 0));
+		_scene->_dynamicHotspots[idx]._articleNumber = PREP_ON;
+		_scene->setDynamicAnim(idx, _globals._animationIndexes[0], 0);
+	} else if (_scene->_priorSceneId != RETURNING_FROM_LOADING) {
+		_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -2);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 14);
+		_game._player.firstWalk(Common::Point(77, 93), FACING_SOUTH, Common::Point(74, 107), FACING_SOUTH, false);
+		_game._player.setWalkTrigger(70);
+	} else if (_globals[kNoLoadWalker]) {
+		_game._player._visible = false;
+		_game._player._stepEnabled = false;
+
+		_globals._sequenceIndexes[5] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[5], false, -2);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 1);
+
+		_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('k', 1), 0);
+		_anim0ActvFl = true;
+		_kingStatus = 0;
+		_scene->setAnimFrame(_globals._animationIndexes[0], 14);
+
+		_globals._animationIndexes[2] = _scene->loadAnimation(formAnimName('q', 1), 0);
+		_anim2ActvFl = true;
+		_queenStatus = 0;
+
+		_globals._animationIndexes[4] = _scene->loadAnimation(formAnimName('p', 2), 0);
+		_anim4ActvFl = true;
+		_pidStatus = 0;
+		if (_amuletWorksFl)
+			_scene->setAnimFrame(_globals._animationIndexes[4], 89);
+
+		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('m', 1), 0);
+		_anim1ActvFl = true;
+		_macStatus = 0;
+		_scene->setAnimFrame(_globals._animationIndexes[1], 25);
+
+		int idx = _scene->_dynamicHotspots.add(NOUN_QUEEN_MOTHER, VERB_WALK_TO, SYNTAX_FEM_NOT_PROPER, EXT_NONE, Common::Rect(0, 0, 0, 0));
+		_scene->_dynamicHotspots[idx]._articleNumber = PREP_ON;
+		_scene->setDynamicAnim(idx, _globals._animationIndexes[2], 0);
+
+		_scene->_hotspots.activate(NOUN_MACMORN, true);
+
+		idx = _scene->_dynamicHotspots.add(NOUN_KING, VERB_WALK_TO, SYNTAX_MASC_NOT_PROPER, EXT_NONE, Common::Rect(0, 0, 0, 0));
+		_scene->_dynamicHotspots[idx]._articleNumber = PREP_ON;
+		_scene->setDynamicAnim(idx, _globals._animationIndexes[0], 0);
+
+		if (_vm->_gameConv->_restoreRunning == 1) {
+			_game._player._stepEnabled = false;
+			_vm->_gameConv->run(1);
+			_vm->_gameConv->exportValue(0);
+			_vm->_gameConv->exportValue(0);
+			_vm->_gameConv->exportValue(0);
+			if (_globals[kLlanieStatus] != 2)
+				_vm->_gameConv->exportValue(1);
+			else
+				_vm->_gameConv->exportValue(0);
+		} else {
+			_activateTimerFl = true;
+			_deathTimer = 0;
+			_clock = 0;
+			_game._player._stepEnabled = true;
+		}
+	} else {
+		_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 12);
+	}
+
+	sceneEntrySound();
+}
+
+void Scene104::step() {
+	if (_anim0ActvFl)
+		handleKingAnimation();
+
+	if (_anim1ActvFl)
+		handleMacAnimation1();
+
+	if (_anim2ActvFl)
+		handleQueenAnimation();
+
+	if (_anim3ActvFl)
+		handleTwinklesAnimation();
+
+	if (_anim4ActvFl)
+		handlePidAnimation();
+
+	if (_anim5ActvFl)
+		handleMacAnimation2();
+
+	if (_anim6ActvFl)
+		handleDeathAnimation();
+
+	if ((_animationRunning == 1) && _scene->_animation[_globals._animationIndexes[0]]) {
+		if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() != _tapestryFrame) {
+			_tapestryFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
+			int resetFrame = -1;
+
+			if (_tapestryFrame == 13) {
+				_game._player._visible = true;
+				_game.syncTimers(2, 0, 3, _globals._animationIndexes[0]);
+			}
+
+			if ((resetFrame >= 0) && (resetFrame != _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame())) {
+				_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
+				_tapestryFrame = resetFrame;
+			}
+		}
+	}
+
+	switch (_game._trigger) {
+	case 70:
+		_scene->deleteSequence(_globals._sequenceIndexes[6]);
+		_vm->_sound->command(25);
+		_globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], false, 6, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 14);
+		_scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 4);
+		_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 71);
+		break;
+
+	case 71: {
+		int idx = _globals._sequenceIndexes[6];
+		_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 14);
+		_game.syncTimers(1, _globals._sequenceIndexes[6], 1, idx);
+		_game._player._stepEnabled = true;
+		}
+		break;
+	}
+
+	if (_game._trigger == 77)
+		_kingStatus = 0;
+
+	if (_game._trigger == 79) {
+		_scene->freeAnimation(_globals._animationIndexes[4]);
+
+		_globals._animationIndexes[4] = _scene->loadAnimation(formAnimName('p', 2), 0);
+		_anim4ActvFl = true;
+		_pidStatus = 0;
+		_game.syncTimers(3, _globals._animationIndexes[4], 4, 0);
+
+		_scene->deleteSequence(_globals._sequenceIndexes[14]);
+		_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('m', 1), 0);
+		_anim1ActvFl = true;
+		_macStatus = 0;
+
+		_game._player._stepEnabled = false;
+		_vm->_gameConv->run(1);
+		_vm->_gameConv->exportValue(0);
+		_vm->_gameConv->exportValue(0);
+		_vm->_gameConv->exportValue(0);
+
+		if (_globals[kLlanieStatus] != 2)
+			_vm->_gameConv->exportValue(1);
+		else
+			_vm->_gameConv->exportValue(0);
+	}
+
+	if (_game._trigger == 85) {
+		_vm->_sound->command(100);
+		_globals._sequenceIndexes[5] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[5], false, -2);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 1);
+	}
+
+	if (_activateTimerFl) {
+		long clockDiff = _scene->_frameStartTime - _clock;
+		if ((clockDiff >= 0) && (clockDiff <= 4))
+			_deathTimer += clockDiff;
+		else
+			_deathTimer += 1;
+
+		_clock = _scene->_frameStartTime;
+
+		if (_deathTimer >= 1300) {
+			_activateTimerFl = false;
+			if (_pidDrawnSword) {
+				_pidStatus = 6;
+				_vm->_gameConv->run(1);
+				_vm->_gameConv->exportValue(0);
+				_vm->_gameConv->exportValue(1);
+				_vm->_gameConv->exportValue(0);
+				if (_globals[kLlanieStatus] != 2)
+					_vm->_gameConv->exportValue(1);
+				else
+					_vm->_gameConv->exportValue(0);
+				_vm->_gameConv->hold();
+			} else
+				_pidStatus = 8;
+
+			_game._player._stepEnabled = false;
+		}
+	}
+
+
+	if ((_globals[kTapestryStatus] == 1 || _globals[kTapestryStatus] == 3)
+		&& (_globals[kBooksStatus] == 2 || _globals[kBooksStatus] == 4))
+		_globals[kCanViewCrownHole] = true;
+
+	if (_game._trigger == 95) {
+		_vm->_gameConv->reset(1);
+		_vm->_dialogs->show(10466);
+		_globals[kNoLoadWalker] = false;
+		_scene->_nextSceneId = 119;
+	}
+}
+
+void Scene104::actions() {
+	if (_vm->_gameConv->_running == 1) {
+		handleFinalConversation();
+		goto handled;
+	}
+
+	if (_action._lookFlag) {
+		if (_globals[kPlayerPersona] == 0)
+			_vm->_dialogs->show(10401);
+		else
+			_vm->_dialogs->show(10437);
+
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_THRONE_ROOM) || _action.isAction(VERB_OPEN, NOUN_DOOR_TO_THRONE_ROOM) || _action.isAction(VERB_PULL, NOUN_DOOR_TO_THRONE_ROOM)) {
+		if (_globals[kPlayerPersona] == 0)
+			_scene->_nextSceneId = 106;
+		else
+			_vm->_dialogs->show(10434);
+
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_HALLWAY) || _action.isAction(VERB_OPEN, NOUN_DOOR_TO_HALLWAY) || _action.isAction(VERB_PULL, NOUN_DOOR_TO_HALLWAY)) {
+		if (_globals[kPlayerPersona] == 0) {
+			switch (_game._trigger) {
+			case 0:
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_globals._sequenceIndexes[7] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[7], false, 8, 2);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[7], true);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 2, 2, 1);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[7], 0, 0, 3);
+				break;
+
+			case 1:
+				_scene->deleteSequence(_globals._sequenceIndexes[6]);
+				_vm->_sound->command(24);
+				_globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 6, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 14);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 2);
+				break;
+
+			case 2: {
+				int tmpIdx = _globals._sequenceIndexes[6];
+				_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -2);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 14);
+				_game.syncTimers(1, _globals._sequenceIndexes[6], 1, tmpIdx);
+				}
+				break;
+
+			case 3:
+				_game._player._visible = true;
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[7]);
+				_scene->_sequences.setTimingTrigger(1,4);
+				break;
+
+			case 4:
+				_game._player.walk(Common::Point(77, 93), FACING_NORTH);
+				_game._player.setWalkTrigger(5);
+				break;
+
+			case 5:
+				_scene->deleteSequence(_globals._sequenceIndexes[6]);
+				_vm->_sound->command(25);
+				_globals._sequenceIndexes[6] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[6], false, 7, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 1);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[6], 0, 0, 6);
+				break;
+
+			case 6: {
+				int tmpIdx = _globals._sequenceIndexes[6];
+				_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 1);
+				_game.syncTimers(1, _globals._sequenceIndexes[6], 1, tmpIdx);
+				_scene->_sequences.setTimingTrigger(6, 7);
+				}
+				break;
+
+			case 7:
+				_scene->_nextSceneId = 103;
+				break;
+
+			default:
+				break;
+			}
+		} else
+			_vm->_dialogs->show(10434);
+
+		goto handled;
+	}
+
+	if ((_action.isAction(VERB_PULL) || _action.isAction(VERB_TAKE) || _action.isAction(VERB_OPEN)) && _action.isObject(NOUN_BOOKS)) {
+		if ((_globals[kBooksStatus] == 1) || (_globals[kBooksStatus] == 3) || _game._trigger) {
+			switch (_game._trigger) {
+			case 0:
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 8, 2);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], -1, 3);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 3, 1);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 3);
+				break;
+
+			case 1:
+				_globals._sequenceIndexes[12] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[12], false, 6, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 8);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[12], 0, 0, 2);
+				break;
+
+			case 2: {
+				int tmpIdx = _globals._sequenceIndexes[12];
+				_globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, -2);
+				_game.syncTimers(1, _globals._sequenceIndexes[12], 1, tmpIdx);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 8);
+				if ((_globals[kTapestryStatus] == 1) || (_globals[kTapestryStatus] == 3)) {
+					_scene->_hotspots.activate(NOUN_WALL_PANEL, false);
+					_scene->_hotspots.activate(NOUN_SECRET_DOOR, true);
+				}
+				}
+				break;
+
+			case 3:
+				_game._player._visible = true;
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]);
+				_scene->_sequences.setTimingTrigger(5, 4);
+				break;
+
+			case 4:
+				if (_globals[kBooksStatus] == 1) {
+					_globals[kPlayerScore] += 2;
+					_globals[kBooksStatus] = 2;
+					if ((_globals[kTapestryStatus] == 1) || (_globals[kTapestryStatus] == 3))
+						_vm->_dialogs->show(10428);
+					else {
+						_vm->_sound->command(94);
+						_vm->_sound->command(67);
+						_vm->_dialogs->show(10427);
+					}
+				} else {
+					_vm->_sound->command(94);
+					_vm->_sound->command(67);
+					_globals[kBooksStatus] = 4;
+				}
+				_game._player._stepEnabled = true;
+				break;
+
+			default:
+				break;
+			}
+			goto handled;
+		}
+	}
+
+	if (_action.isAction(VERB_PUSH, NOUN_BOOKS)) {
+		if ((_globals[kBooksStatus] == 2) || (_globals[kBooksStatus] == 4)) {
+			switch (_game._trigger) {
+			case 0:
+				_game._player._stepEnabled = false;
+				_game._player._visible = false;
+				_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], false, 8, 2);
+				_scene->_sequences.setAnimRange(_globals._sequenceIndexes[8], -1, 3);
+				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 2, 3, 1);
+				_scene->_sequences.setTrigger(_globals._sequenceIndexes[8], 0, 0, 3);
+				break;
+
+			case 1:
+				_vm->_sound->command(94);
+				_vm->_sound->command(67);
+				_scene->deleteSequence(_globals._sequenceIndexes[12]);
+				_globals._sequenceIndexes[12] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[12], false, 6, 1);
+				_scene->_sequences.setDepth(_globals._sequenceIndexes[12], 8);
+				_scene->_sequences.setTimingTrigger(6, 2);
+				break;
+
+			case 2:
+				if ((_globals[kTapestryStatus] == 1) || (_globals[kTapestryStatus] == 3)) {
+					_scene->_hotspots.activate(NOUN_WALL_PANEL, true);
+					_scene->_hotspots.activate(NOUN_SECRET_DOOR, false);
+				}
+				break;
+
+			case 3:
+				_game._player._visible = true;
+				_game.syncTimers(2, 0, 1, _globals._sequenceIndexes[8]);
+				_scene->_sequences.setTimingTrigger(5, 4);
+				break;
+
+			case 4:
+				if (_globals[kBooksStatus] == 2)
+					_vm->_dialogs->show(10429);
+				_globals[kBooksStatus] = 3;
+				_game._player._stepEnabled = true;
+				break;
+
+			default:
+				break;
+			}
+			goto handled;
+		}
+	}
+
+	if ((_action.isAction(VERB_PULL) || _action.isAction(VERB_OPEN) || _action.isAction(VERB_PUSH)) && _action.isObject(NOUN_TAPESTRY)) {
+		if (_globals[kPlayerPersona] == 0) {
+			if (_scene->_customDest.x >= 279) {
+				if ((_globals[kTapestryStatus] == 0) || (_globals[kTapestryStatus] == 2)) {
+					switch (_game._trigger) {
+					case 0:
+						_scene->deleteSequence(_globals._sequenceIndexes[11]);
+						_game._player._stepEnabled = false;
+						_game._player._visible = false;
+						_animationRunning = 1;
+						_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('a',-1), 1);
+						break;
+
+					case 1:
+						_game._player._visible = true;
+						_game.syncTimers(2, 0, 3, _globals._animationIndexes[0]);
+						_globals._sequenceIndexes[10] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[10], false, -1);
+						_scene->_sequences.setDepth(_globals._sequenceIndexes[10], 6);
+						_scene->_hotspots.activateAtPos(NOUN_TAPESTRY, true, Common::Point(290, 20));
+						_scene->_hotspots.activateAtPos(NOUN_TAPESTRY, false, Common::Point(310, 70));
+						if ((_globals[kBooksStatus] == 2) || (_globals[kBooksStatus] == 4)) {
+							_scene->_hotspots.activate(NOUN_WALL_PANEL, false);
+							_scene->_hotspots.activate(NOUN_SECRET_DOOR, true);
+						} else {
+							_scene->_hotspots.activate(NOUN_WALL_PANEL, true);
+							_scene->_hotspots.activate(NOUN_SECRET_DOOR, false);
+						}
+						_scene->_sequences.setTimingTrigger(6, 2);
+						break;
+
+					case 2:
+						if (_globals[kTapestryStatus] == 0) {
+							_globals[kTapestryStatus] = 1;
+							_globals[kPlayerScore] += 2;
+							if (_globals[kBooksStatus] == 0 || _globals[kBooksStatus] == 1 || _globals[kBooksStatus] == 3)
+								_vm->_dialogs->show(10424);
+							else if (_globals[kBooksStatus] == 2 || _globals[kBooksStatus] == 4)
+								_vm->_dialogs->show(10425);
+						} else
+							_globals[kTapestryStatus] = 3;
+
+						_game._player._stepEnabled = true;
+						break;
+
+					default:
+						break;
+					}
+				}
+			} else
+				_vm->_dialogs->show(10404);
+		} else
+			_vm->_dialogs->show(10445);
+
+		goto handled;
+	}
+
+	if ((_action.isAction(VERB_PULL) || _action.isAction(VERB_CLOSE) || _action.isAction(VERB_PUSH)) && _action.isObject(NOUN_TAPESTRY)) {
+		if (_globals[kPlayerPersona] == 0) {
+			if (_scene->_customDest.x >= 279) {
+				if (_globals[kTapestryStatus] == 1 || _globals[kTapestryStatus] == 3) {
+					switch (_game._trigger) {
+					case 0:
+						_game._player._stepEnabled = false;
+						_game._player._visible = false;
+						_scene->deleteSequence(_globals._sequenceIndexes[10]);
+						_animationRunning = 2;
+						_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('d',-1), 1);
+						break;
+
+					case 1:
+						_game._player._visible = true;
+						_game.syncTimers(2, 0, 3, _globals._animationIndexes[0]);
+						_globals._sequenceIndexes[11] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[11], false, -1);
+						_scene->_sequences.setDepth(_globals._sequenceIndexes[11], 6);
+						_scene->_hotspots.activateAtPos(NOUN_TAPESTRY, false, Common::Point(290, 20));
+						_scene->_hotspots.activateAtPos(NOUN_TAPESTRY, true, Common::Point(310, 70));
+						_scene->_hotspots.activate(NOUN_SECRET_DOOR, false);
+						_scene->_hotspots.activate(NOUN_WALL_PANEL, false);
+						_scene->_sequences.setTimingTrigger(6, 2);
+						break;
+
+					case 2:
+						_globals[kTapestryStatus] = 2;
+						_game._player._stepEnabled = true;
+						break;
+
+					default:
+						break;
+					}
+					goto handled;
+				}
+			}
+		} else {
+			_vm->_dialogs->show(10445);
+			goto handled;
+		}
+	}
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isObject(NOUN_BOOKS) || _action.isObject(NOUN_BOOKSHELF)) {
+			if (_globals[kPlayerPersona] == 0) {
+				switch (_globals[kBooksStatus]) {
+				case 0:
+					_scene->_hotspots.activate(NOUN_BOOKS, true);
+					_globals[kBooksStatus] = 1;
+					_vm->_dialogs->show(10418);
+					goto handled;
+
+				case 1:
+					_vm->_dialogs->show(10418);
+					goto handled;
+
+				case 2:
+				case 4:
+					_vm->_dialogs->show(10419);
+					goto handled;
+
+				case 3:
+					_vm->_dialogs->show(10420);
+					goto handled;
+
+				default:
+					break;
+				}
+			} else {
+				_vm->_dialogs->show(10439);
+				goto handled;
+			}
+		}
+
+		if (_action.isObject(NOUN_FIREPLACE)) {
+			if (_globals[kPlayerPersona] == 0)
+				_vm->_dialogs->show(10402);
+			else
+				_vm->_dialogs->show(10438);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_TAPESTRY)) {
+			if (_globals[kPlayerPersona] == 0) {
+				if (_scene->_customDest.x >= 209 && _scene->_customDest.x <= 278)
+					_vm->_dialogs->show(10403);
+				else if (_scene->_customDest.x >= 107 && _scene->_customDest.x <= 190)
+						_vm->_dialogs->show(10422);
+				else if (_globals[kTapestryStatus] == 1 || _globals[kTapestryStatus] == 3)
+					_vm->_dialogs->show(10460);
+				else
+					_vm->_dialogs->show(10423);
+			} else
+				_vm->_dialogs->show(10439);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_RUG)) {
+			if (_globals[kPlayerPersona] == 0)
+				_vm->_dialogs->show(10405);
+			else
+				_vm->_dialogs->show(10439);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_FIREPLACE_SCREEN)) {
+			if (_globals[kPlayerPersona] == 0)
+				_vm->_dialogs->show(10407);
+			else
+				_vm->_dialogs->show(10439);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_DOOR_TO_THRONE_ROOM)) {
+			if (_globals[kPlayerPersona] == 0)
+				_vm->_dialogs->show(10409);
+			else
+				_vm->_dialogs->show(10434);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_SCONCE)) {
+			if (_globals[kPlayerPersona] == 0)
+				_vm->_dialogs->show(10410);
+			else
+				_vm->_dialogs->show(10440);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_WOOD_BASKET)) {
+			if (_globals[kPlayerPersona] == 0)
+				_vm->_dialogs->show(10411);
+			else
+				_vm->_dialogs->show(10439);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_TROPHY)) {
+			if (_globals[kPlayerPersona] == 0)
+				_vm->_dialogs->show(10412);
+			else
+				_vm->_dialogs->show(10441);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_READING_BENCH)) {
+			if (_globals[kPlayerPersona] == 0)
+				_vm->_dialogs->show(10414);
+			else
+				_vm->_dialogs->show(10439);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_LOVESEAT)) {
+			if (_globals[kPlayerPersona] == 0)
+				_vm->_dialogs->show(10416);
+			else
+				_vm->_dialogs->show(10439);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_DOOR_TO_HALLWAY)) {
+			if (_globals[kPlayerPersona] == 0)
+				_vm->_dialogs->show(10421);
+			else
+				_vm->_dialogs->show(10434);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_SECRET_DOOR)) {
+			_vm->_dialogs->show(10430);
+			goto handled;
+		}
+
+		if ((_action.isObject(NOUN_DOORWAY) || _action.isAction(VERB_WALK_THROUGH, NOUN_DOORWAY) || _action.isAction(VERB_OPEN, NOUN_DOORWAY)) && (_globals[kPlayerPersona] == 1)) {
+			_vm->_dialogs->show(10432);
+			goto handled;
+		}
+
+		if (_action.isAction(VERB_LOOK, NOUN_WALL_PANEL)) {
+			if ((_globals[kBooksStatus] == 0) || (_globals[kBooksStatus] == 1))
+				_vm->_dialogs->show(10435);
+			else
+				_vm->_dialogs->show(10436);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_KING) && _globals[kPlayerPersona] == 1) {
+			_vm->_dialogs->show(10443);
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_MUSIC_BOX) && _globals[kNoLoadWalker]) {
+			_vm->_dialogs->showItem(OBJ_MAGIC_MUSIC_BOX, 843, 0);
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_MACMORN) && (_globals[kPlayerPersona] == 1)) {
+			_vm->_dialogs->show(10444);
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_TABLE)) {
+			if (_globals[kPlayerPersona] == 1)
+				_vm->_dialogs->show(10455);
+			else if (_scene->_customDest.x < 174)
+				_vm->_dialogs->show(10451);
+			else
+				_vm->_dialogs->show(10448);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_DECORATION)) {
+			if (_globals[kPlayerPersona] == 1)
+				_vm->_dialogs->show(10439);
+			else
+				_vm->_dialogs->show(10449);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_SWORD)) {
+			if (_globals[kPlayerPersona] == 1)
+				_vm->_dialogs->show(10439);
+			else
+				_vm->_dialogs->show(10450);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_FLOOR) && (_globals[kPlayerPersona] == 1)) {
+			_vm->_dialogs->show(10439);
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_WALL) && (_globals[kPlayerPersona] == 1)) {
+			_vm->_dialogs->show(10439);
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_CANDLESTICK)) {
+			if (_globals[kPlayerPersona] == 1)
+				_vm->_dialogs->show(10439);
+			else
+				_vm->_dialogs->show(10461);
+
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_QUEEN_MOTHER)) {
+			_vm->_dialogs->show(10456);
+			goto handled;
+		}
+
+		if (_action.isObject(NOUN_MACMORN)) {
+			_vm->_dialogs->show(10444);
+			goto handled;
+		}
+	}
+
+	if ((_action.isAction(VERB_PUSH) || _action.isAction(VERB_PULL)) && _action.isObject(NOUN_RUG)) {
+		if (_globals[kPlayerPersona] == 0)
+			_vm->_dialogs->show(10406);
+		else
+			_vm->_dialogs->show(10445);
+
+		goto handled;
+	}
+
+	if ((_action.isAction(VERB_PUSH) || _action.isAction(VERB_PULL)) && _action.isObject(NOUN_FIREPLACE_SCREEN)) {
+		if (_globals[kPlayerPersona] == 0)
+			_vm->_dialogs->show(10408);
+		else
+			_vm->_dialogs->show(10445);
+
+		goto handled;
+	}
+
+	if ((_action.isAction(VERB_PUSH) || _action.isAction(VERB_PULL)) && _action.isObject(NOUN_TROPHY)) {
+		if (_globals[kPlayerPersona] == 0)
+			_vm->_dialogs->show(10413);
+		else
+			_vm->_dialogs->show(10445);
+
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_READING_BENCH)) {
+		if (_globals[kPlayerPersona] == 0)
+			_vm->_dialogs->show(10415);
+		else
+			_vm->_dialogs->show(10445);
+
+		goto handled;
+	}
+
+	if ((_action.isAction(VERB_PUSH) || _action.isAction(VERB_PULL)) && _action.isObject(NOUN_LOVESEAT)) {
+		if (_globals[kPlayerPersona] == 0)
+			_vm->_dialogs->show(10417);
+		else
+			_vm->_dialogs->show(10445);
+
+		goto handled;
+	}
+
+	if ((_action.isAction(VERB_OPEN) || _action.isAction(VERB_PUSH) || _action.isAction(VERB_PULL)) && (_action.isObject(NOUN_SECRET_DOOR) || _action.isObject(NOUN_WALL_PANEL))) {
+		_vm->_dialogs->show(10431);
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_INVOKE, NOUN_SIGNET_RING) && (_globals[kPlayerPersona] == 1)) {
+		_vm->_dialogs->show(10433);
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_PUT, NOUN_TENTACLE_PARTS, NOUN_WALL_PANEL) && (_globals[kPlayerPersona] == 0)) {
+		_vm->_dialogs->show(10446);
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_SHIFT_INTO_BEAR) && _anim0ActvFl) {
+		if (_wasBearFl)
+			_vm->_dialogs->show(10457);
+		else if (_amuletWorksFl)
+			_vm->_dialogs->show(10459);
+		else {
+			_wasBearFl = true;
+			_globals[kPlayerScore] += 2;
+			_vm->_gameConv->run(1);
+			_vm->_gameConv->exportValue(1);
+			_vm->_gameConv->exportValue(0);
+			_vm->_gameConv->exportValue(0);
+			if (_globals[kLlanieStatus] != 2)
+				_vm->_gameConv->exportValue(1);
+			else
+				_vm->_gameConv->exportValue(0);
+		}
+		goto handled;
+	}
+
+	if ((_action.isAction(VERB_ATTACK, NOUN_SWORD, NOUN_MACMORN) || _action.isAction(VERB_CARVE_UP, NOUN_SWORD, NOUN_MACMORN) || _action.isAction(VERB_THRUST, NOUN_SWORD, NOUN_MACMORN) || _action.isAction(VERB_TAKE, NOUN_SWORD)) && _anim0ActvFl) {
+		_activateTimerFl = false;
+		_pidStatus = 6;
+
+		if (!_amuletWorksFl) {
+			_globals[kPlayerScore] += 5;
+			_vm->_gameConv->run(1);
+			_vm->_gameConv->exportValue(0);
+			_vm->_gameConv->exportValue(1);
+			_vm->_gameConv->exportValue(0);
+			if (_globals[kLlanieStatus] != 2)
+				_vm->_gameConv->exportValue(1);
+			else
+				_vm->_gameConv->exportValue(0);
+
+			_vm->_gameConv->hold();
+		} else {
+			_macStatus = 6;
+			_game._player._stepEnabled = false;
+		}
+		_amuletWorksFl = true;
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_INVOKE, NOUN_AMULET) && _anim0ActvFl) {
+		if (_amuletWorksFl) {
+			_activateTimerFl = false;
+			_pidStatus = 5;
+			_globals[kPlayerScore] += 15;
+			_globals[kAmuletStatus] = 2;
+			_game._player._stepEnabled = false;
+
+			_scene->freeAnimation(_globals._animationIndexes[1]);
+
+			_globals._sequenceIndexes[14] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[14], false, -2);
+			_scene->_sequences.setDepth(_globals._sequenceIndexes[14], 6);
+			_game.syncTimers(1, _globals._sequenceIndexes[14], 4, 0);
+
+			_globals._spriteIndexes[15] = _scene->_sprites.addSprites(formAnimName('e', 3), 0x1000 | 0x2000);
+			_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('m', 2), 0);
+			_anim1ActvFl = false;
+			_anim5ActvFl = true;
+		} else
+			_vm->_dialogs->showItem(OBJ_AMULET, 945, 0);
+
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_ATTACK, NOUN_SWORD, NOUN_QUEEN_MOTHER) || _action.isAction(VERB_CARVE_UP, NOUN_SWORD, NOUN_QUEEN_MOTHER) || _action.isAction(VERB_THRUST, NOUN_SWORD, NOUN_QUEEN_MOTHER)) {
+		_vm->_dialogs->show(10458);
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_TALK_TO, NOUN_MACMORN)) {
+		_vm->_dialogs->show(10464);
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_TALK_TO, NOUN_QUEEN_MOTHER)) {
+		_vm->_dialogs->show(10463);
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_TALK_TO, NOUN_KING)) {
+		_vm->_dialogs->show(10465);
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_POUR_CONTENTS_OF, NOUN_MACMORN)) {
+		_vm->_dialogs->show(10462);
+		goto handled;
+	}
+
+
+	if (_anim2ActvFl && (_action.isAction(VERB_WALK_ACROSS) || _action.isAction(VERB_WALK_TO))) {
+		_vm->_dialogs->show(10445);
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_TAKE, NOUN_CANDLESTICK)) {
+		_vm->_dialogs->show(10468);
+		goto handled;
+	}
+
+	if (_action.isAction(VERB_OPEN, NOUN_MUSIC_BOX) && _globals[kNoLoadWalker]) {
+		_vm->_dialogs->show(10470);
+		goto handled;
+	}
+
+	goto done;
+
+handled:
+	_action._inProgress = false;
+
+done:
+	;
+}
+
+void Scene104::preActions() {
+	if ((_action.isAction(VERB_PULL) || _action.isAction(VERB_OPEN) || _action.isAction(VERB_CLOSE) || _action.isAction(VERB_PUSH))
+	 && _action.isObject(NOUN_TAPESTRY) && (_scene->_customDest.x > 280))
+		_game._player.walk(Common::Point(295, 145), FACING_NORTHEAST);
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_THRONE_ROOM)
+	 || _action.isAction(VERB_WALK_THROUGH, NOUN_DOOR_TO_HALLWAY)
+	 || _action.isAction(VERB_WALK_THROUGH, NOUN_DOORWAY)
+	 || ((_action.isAction(VERB_PULL) || _action.isAction(VERB_OPEN) || _action.isAction(VERB_PUSH)) && _action.isObject(NOUN_TAPESTRY))
+	 || ((_action.isAction(VERB_PULL) || _action.isAction(VERB_CLOSE) || _action.isAction(VERB_PUSH)) && _action.isObject(NOUN_TAPESTRY))
+	 || ((_action.isAction(VERB_PUSH) || _action.isAction(VERB_PULL))
+		 && (_action.isObject(NOUN_RUG) || _action.isObject(NOUN_FIREPLACE_SCREEN) || _action.isObject(NOUN_TROPHY) || _action.isObject(NOUN_LOVESEAT)))
+	 || _action.isAction(VERB_OPEN, NOUN_READING_BENCH)) {
+		if (_globals[kPlayerPersona] == 1)
+			_game._player.cancelWalk();
+	}
+
+	if (_globals[kNoLoadWalker])
+		_game._player._needToWalk = false;
+}
+
+void Scene104::handleFinalConversation() {
+	bool interlocutorFl = false;
+	bool heroFl = false;
+
+	switch (_action._activeAction._verbId) {
+	case 11:
+		_deathTimer = 0;
+		_clock = 0;
+		_activateTimerFl = true;
+		interlocutorFl = true;
+		heroFl = true;
+		break;
+
+	case 14:
+		if (!_game._trigger)
+			_macStatus = 3;
+
+		interlocutorFl = true;
+		heroFl = true;
+		break;
+
+	case 17:
+		_pidStatus = 3;
+		_vm->_gameConv->hold();
+		interlocutorFl = true;
+		heroFl = true;
+		break;
+
+	case 20:
+		if (!_game._trigger)
+			_macStatus = 2;
+		interlocutorFl = true;
+		heroFl = true;
+		break;
+
+	case 30:
+		*_vm->_gameConv->_nextStartNode = 31;
+		_vm->_gameConv->abortConv();
+
+		if (_globals[kLlanieStatus] == 2) {
+			_globals._animationIndexes[3] = _scene->loadAnimation(formAnimName('l', 1), 0);
+			_anim3ActvFl = true;
+			_twinklesStatus = 1;
+		}
+		break;
+
+	case 38:
+		_globals[kEndOfGame] = true;
+		_scene->_nextSceneId = 106;
+		break;
+
+	default:
+		break;
+	}
+
+	switch (_game._trigger) {
+	case 81:
+		switch (_action._activeAction._verbId) {
+		case 0:
+		case 2:
+		case 4:
+		case 5:
+		case 7:
+		case 8:
+		case 11:
+		case 17:
+			if (_macStatus == 0)
+				_macStatus = 1;
+
+			_pidStatus = 0;
+			if (_queenStatus != 2)
+				_queenStatus = 0;
+
+			_kingStatus = 0;
+			break;
+
+		case 1:
+		case 3:
+		case 6:
+		case 20:
+		case 22:
+		case 24:
+		case 26:
+		case 28:
+		case 32:
+		case 34:
+		case 39:
+		case 41:
+		case 43:
+			_kingStatus = 1;
+			_pidStatus = 0;
+			if (_queenStatus != 2)
+				_queenStatus = 0;
+
+			if (_macStatus == 1)
+				_macStatus = 0;
+
+			break;
+
+		case 21:
+		case 23:
+		case 25:
+		case 27:
+		case 35:
+		case 40:
+		case 42:
+			if (_queenStatus != 2)
+				_queenStatus = 1;
+
+			_pidStatus = 0;
+			if (_macStatus == 1)
+				_macStatus = 0;
+
+			_kingStatus = 0;
+			break;
+
+		case 31:
+		case 33:
+			_twinklesStatus = 1;
+			_pidStatus = 0;
+			if (_queenStatus != 2)
+				_queenStatus = 0;
+
+			if (_macStatus == 1)
+				_macStatus = 0;
+
+			_kingStatus = 0;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 83:
+		if ((_action._activeAction._verbId == 8) || (_action._activeAction._verbId == 11))
+			_pidStatus = 2;
+		else
+			_pidStatus = 1;
+
+		if (_macStatus == 1)
+			_macStatus = 0;
+
+		if (_queenStatus != 2)
+			_queenStatus = 0;
+
+		_kingStatus = 0;
+		break;
+
+	default:
+		break;
+	}
+
+	if (!heroFl)
+		_vm->_gameConv->setHeroTrigger(83);
+
+	if (!interlocutorFl)
+		_vm->_gameConv->setInterlocutorTrigger(81);
+
+	_kingCount = 0;
+	_queenCount = 0;
+	_macCount = 0;
+	_twinklesCount = 0;
+	_pidCount = 0;
+}
+
+void Scene104::handleKingAnimation() {
+	if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() == _kingFrame)
+		return;
+
+	_kingFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
+	int resetFrame = -1;
+
+	switch (_kingFrame) {
+	case 14:
+	case 21:
+		switch (_kingStatus) {
+		case 0:
+			if (_kingCount > _vm->getRandomNumber(40, 50)) {
+				_kingCount = 0;
+				if (_vm->getRandomNumber(1,2) == 1)
+					resetFrame = 13;
+				else
+					resetFrame = 14;
+			} else {
+				++_kingCount;
+				resetFrame = 13;
+			}
+			break;
+
+		case 1:
+			resetFrame = 14;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 16:
+	case 17:
+	case 18:
+	case 19:
+		switch (_kingStatus) {
+		case 0:
+			if (_kingCount > _vm->getRandomNumber(40, 50)) {
+				_kingCount = 0;
+				if (_vm->getRandomNumber(1,2) == 1)
+					resetFrame = 15;
+				else
+					resetFrame = 19;
+			} else {
+				++_kingCount;
+				resetFrame = 15;
+			}
+			break;
+
+		case 1:
+			resetFrame = _vm->getRandomNumber(16, 18);
+			++_kingCount;
+			if (_kingCount > 15) {
+				_kingStatus = 0;
+				_kingCount = 0;
+				resetFrame = 15;
+			}
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 22:
+		if (_kingStatus == 2)
+			resetFrame = 21;
+		else
+			resetFrame = 0;
+
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
+		_kingFrame = resetFrame;
+	}
+}
+
+
+void Scene104::handleMacAnimation1() {
+	if (_scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame() == _macFrame)
+		return;
+
+	_macFrame = _scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame();
+	int resetFrame = -1;
+
+	switch (_macFrame) {
+	case 1:
+	case 2:
+	case 7:
+		switch (_macStatus) {
+		case 0:
+			resetFrame = 0;
+			break;
+
+		case 1:
+			if (_macCount == 0) {
+				if (_vm->getRandomNumber(1,2) == 1)
+					resetFrame = 2;
+				else
+					resetFrame = 1;
+
+				++_macCount;
+			} else {
+				resetFrame = _vm->getRandomNumber(0, 1);
+				++_macCount;
+				if (_macCount > 15) {
+					_macStatus = 0;
+					_macCount = 0;
+					resetFrame = 0;
+				}
+			}
+			break;
+
+		case 2:
+			resetFrame = 90;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 3:
+	case 4:
+	case 5:
+		switch (_macStatus) {
+		case 0:
+		case 2:
+		case 3:
+		case 4:
+			resetFrame = 5;
+			break;
+
+		case 1:
+			if (_macCount == 0) {
+				if (_vm->getRandomNumber(1,2) == 1)
+					resetFrame = 5;
+				else
+					resetFrame = 3;
+
+				++_macCount;
+
+			} else {
+				resetFrame = _vm->getRandomNumber(3, 4);
+				++_macCount;
+				if (_macCount > 15) {
+					_macStatus = 0;
+					_macCount = 0;
+					resetFrame = 5;
+				}
+			}
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 25:
+		_game._player._stepEnabled = true;
+		break;
+
+	case 26:
+	case 90:
+	case 174:
+		switch (_macStatus) {
+		case 3:
+			resetFrame = 76;
+			_macStatus = 0;
+			_game._player._stepEnabled = false;
+			break;
+
+		case 4:
+			break;
+
+		case 5:
+			resetFrame = 147;
+			_macStatus = 0;
+			break;
+
+		case 6:
+			_pidFrame = 105;
+			resetFrame = 26;
+			_scene->setAnimFrame(_globals._animationIndexes[4], 105);
+			_game.syncTimers(3, _globals._animationIndexes[4], 3, _globals._animationIndexes[1]);
+			break;
+
+		default:
+			resetFrame = 25;
+			break;
+		}
+		break;
+
+	case 36:
+		_globals._sequenceIndexes[13] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[13], false, -1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[13], 13);
+		break;
+
+	case 37:
+		_scene->setAnimFrame(_globals._animationIndexes[4], 89);
+		_pidFrame = 89;
+		_pidStatus = 7;
+		_game.syncTimers(3, _globals._animationIndexes[4], 3, _globals._animationIndexes[1]);
+		break;
+
+	case 76:
+		_vm->_gameConv->reset(1);
+		_vm->_dialogs->show(10467);
+		_globals[kNoLoadWalker] = false;
+		_scene->_nextSceneId = 119;
+		break;
+
+	case 82:
+		_pidStatus = 4;
+		break;
+
+	case 97:
+		_activateTimerFl = true;
+		_scene->deleteSequence(_globals._sequenceIndexes[5]);
+		_globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 10, 1);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 1);
+		_scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], -1, -2);
+		_scene->_sequences.setTrigger(_globals._sequenceIndexes[5], 0, 0, 85);
+		break;
+
+	case 112:
+		resetFrame = 8;
+		_macStatus = 0;
+		break;
+
+	case 162:
+		_vm->_gameConv->release();
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[1], resetFrame);
+		_macFrame = resetFrame;
+	}
+}
+
+
+void Scene104::handleMacAnimation2() {
+
+	if (_scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame() == _macFrame)
+		return;
+
+	_macFrame = _scene->_animation[_globals._animationIndexes[1]]->getCurrentFrame();
+	int resetFrame = -1;
+
+	switch (_macFrame) {
+	case 1:
+		if (_macStatus != 4)
+			resetFrame = 0;
+		break;
+
+	case 2:
+		_scene->deleteSequence(_globals._sequenceIndexes[14]);
+		_game.syncTimers(1, _globals._sequenceIndexes[14], 3, _globals._animationIndexes[1]);
+		break;
+
+	case 37:
+		_scene->freeAnimation(_globals._animationIndexes[1]);
+		_scene->_sprites.remove(_globals._spriteIndexes[15]);
+		_anim5ActvFl = false;
+		resetFrame = -1;
+
+		_vm->_dialogs->show(10426);
+		_vm->_sound->command(45);
+		_vm->_gameConv->run(1);
+		_vm->_gameConv->exportValue(0);
+		_vm->_gameConv->exportValue(0);
+		_vm->_gameConv->exportValue(1);
+		if (_globals[kLlanieStatus] != 2)
+			_vm->_gameConv->exportValue(1);
+		else
+			_vm->_gameConv->exportValue(0);
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[1], resetFrame);
+		_macFrame = resetFrame;
+	}
+}
+
+void Scene104::handleQueenAnimation() {
+	if (_scene->_animation[_globals._animationIndexes[2]]->getCurrentFrame() == _queenFrame)
+		return;
+
+	_queenFrame = _scene->_animation[_globals._animationIndexes[2]]->getCurrentFrame();
+	int resetFrame = -1;
+
+	switch (_queenFrame) {
+	case 1:
+	case 8:
+	case 15:
+	case 24:
+		switch (_queenStatus) {
+		case 0:
+			if (_queenCount > _vm->getRandomNumber(40, 50)) {
+				_queenCount = 0;
+				if (_vm->getRandomNumber(1,2) == 1)
+					resetFrame = 0;
+				else
+					resetFrame = 8;
+			} else {
+				++_queenCount;
+				resetFrame = 0;
+			}
+			break;
+
+		case 1:
+			if (_vm->getRandomNumber(1,2) == 1)
+				resetFrame = 1;
+			else
+				resetFrame = 15;
+
+			_queenStatus = 0;
+			break;
+
+		case 2:
+			resetFrame = 8;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 12:
+	case 29:
+		switch (_queenStatus) {
+		case 0:
+			if (_queenCount > _vm->getRandomNumber(40, 50)) {
+				_queenCount = 0;
+				if (_vm->getRandomNumber(1,2) == 1)
+					resetFrame = 11;
+				else
+					resetFrame = 12;
+			} else {
+				++_queenCount;
+				resetFrame = 11;
+			}
+			break;
+
+		case 1:
+			resetFrame = 12;
+			break;
+
+		case 2:
+			resetFrame = 24;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 27:
+		switch (_queenStatus) {
+		case 0:
+		case 1:
+			resetFrame = 27;
+			break;
+
+		case 2:
+			resetFrame = 26;
+			break;
+
+		case 3:
+			resetFrame = 27;
+			_queenStatus = 0;
+			break;
+
+		default:
+			break;
+		}
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[2], resetFrame);
+		_queenFrame = resetFrame;
+	}
+}
+
+void Scene104::handleTwinklesAnimation() {
+	if (_scene->_animation[_globals._animationIndexes[3]]->getCurrentFrame() == _twinklesFrame)
+		return;
+
+	_twinklesFrame = _scene->_animation[_globals._animationIndexes[3]]->getCurrentFrame();
+	int resetFrame = -1;
+
+	switch (_twinklesFrame) {
+	case 1:
+		if (_twinklesStatus == 2)
+			resetFrame = 0;
+		break;
+
+	case 10:
+		_queenStatus = 2;
+		break;
+
+	case 28:
+		_vm->_gameConv->run(1);
+		_vm->_gameConv->exportValue(0);
+		_vm->_gameConv->exportValue(0);
+		_vm->_gameConv->exportValue(1);
+		if (_globals[kLlanieStatus] != 2)
+			_vm->_gameConv->exportValue(1);
+		else
+			_vm->_gameConv->exportValue(0);
+		break;
+
+	case 36:
+		_queenStatus = 3;
+		break;
+
+	case 37:
+	case 38:
+	case 47:
+		switch (_twinklesStatus) {
+		case 0:
+			if (_twinklesFrame != 37 && _twinklesFrame != 38)
+				_twinklesFrame = 38;
+
+			if (_twinklesCount > _vm->getRandomNumber(40, 50)) {
+				_twinklesCount = 0;
+				if (_vm->getRandomNumber(1, 2) == 1)
+					resetFrame = 36;
+				else
+					resetFrame = 37;
+			} else {
+				++_twinklesCount;
+				resetFrame = _twinklesFrame - 1;
+			}
+			break;
+
+		case 1:
+			resetFrame = 38;
+			_twinklesStatus = 0;
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[3], resetFrame);
+		_twinklesFrame = resetFrame;
+	}
+}
+
+void Scene104::handleDeathAnimation() {
+	if (_scene->_animation[_globals._animationIndexes[4]]->getCurrentFrame() == _deathFrame)
+		return;
+
+	_deathFrame = _scene->_animation[_globals._animationIndexes[4]]->getCurrentFrame();
+	int resetFrame = -1;
+
+	if (_deathFrame == 11)
+		_scene->playSpeech(7);
+	else if (_deathFrame == 17)
+		_scene->playSpeech(6);
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[4], resetFrame);
+		_deathFrame = resetFrame;
+	}
+}
+
+void Scene104::handlePidAnimation() {
+	if (_scene->_animation[_globals._animationIndexes[4]]->getCurrentFrame() == _pidFrame)
+		return;
+
+	_pidFrame = _scene->_animation[_globals._animationIndexes[4]]->getCurrentFrame();
+	int resetFrame = -1;
+
+	switch (_pidFrame) {
+	case 1:
+	case 2:
+	case 3:
+	case 9:
+	case 47:
+	case 81:
+		switch (_pidStatus) {
+		case 0:
+			resetFrame = 0;
+			break;
+
+		case 1:
+			resetFrame = _vm->getRandomNumber(0, 2);
+			++_pidCount;
+			if (_pidCount > 20) {
+				_pidStatus = 0;
+				_pidCount = 0;
+				resetFrame = 0;
+			}
+			break;
+
+		case 2:
+			resetFrame = 3;
+			break;
+
+		case 3:
+			_activateTimerFl = false;
+			resetFrame = 10;
+			break;
+
+		case 5:
+			_game._player._stepEnabled = false;
+			_activateTimerFl = false;
+			resetFrame = 47;
+			_pidStatus = 0;
+			break;
+
+		case 6:
+			resetFrame = 81;
+			break;
+
+		case 8:
+			_scene->freeAnimation(_globals._animationIndexes[1]);
+			_scene->freeAnimation(_globals._animationIndexes[4]);
+			_anim1ActvFl = false;
+			_anim4ActvFl = false;
+			_globals._animationIndexes[4] = _scene->loadAnimation(formAnimName('d', 2), 95);
+			_anim6ActvFl = true;
+			_game.syncTimers(3, _globals._animationIndexes[4], 4, 0);
+			break;
+
+		default:
+			break;
+		}
+		break;
+
+	case 4:
+	case 5:
+	case 6:
+	case 7:
+		if (_pidStatus == 2) {
+			resetFrame = _vm->getRandomNumber(4, 6);
+			++_pidCount;
+			if (_pidCount > 20) {
+				_pidStatus = 0;
+				_pidCount = 0;
+				resetFrame = 7;
+			}
+		} else
+			resetFrame = 7;
+		break;
+
+	case 24:
+		_vm->_gameConv->release();
+		break;
+
+	case 25:
+		if (_pidStatus == 4) {
+			resetFrame = 25;
+			_pidStatus = 0;
+		} else
+			resetFrame = 24;
+		break;
+
+	case 46:
+		_activateTimerFl = true;
+		_clock = 0;
+		_deathTimer = 0;
+		_game._player._stepEnabled = true;
+		break;
+
+	case 60:
+		resetFrame = 107;
+		break;
+
+	case 62:
+		_macStatus = 4;
+		break;
+
+	case 88:
+		if (_deathTimer < 1300)
+			_macStatus = 5;
+		break;
+
+	case 89:
+		if (_pidStatus == 5) {
+			resetFrame = 55;
+			_pidStatus = 0;
+		} else if (_deathTimer >= 1300)
+			_macStatus = 6;
+		else {
+			_pidDrawnSword = true;
+			resetFrame = 88;
+		}
+		break;
+
+	case 91:
+		_scene->playSpeech(7);
+		break;
+
+	case 95:
+		_scene->playSpeech(6);
+		break;
+
+	case 105:
+		resetFrame = 104;
+		break;
+
+	case 106:
+		if (_pidStatus == 7)
+			resetFrame = 89;
+		else
+			resetFrame = 105;
+		break;
+
+	case 111:
+		resetFrame = 60;
+		break;
+
+	default:
+		break;
+	}
+
+	if (resetFrame >= 0) {
+		_scene->setAnimFrame(_globals._animationIndexes[4], resetFrame);
+		_pidFrame = resetFrame;
+	}
+}
+/*------------------------------------------------------------------------*/
+
 } // End of namespace Dragonsphere
 } // End of namespace MADS
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.h b/engines/mads/dragonsphere/dragonsphere_scenes1.h
index 9e723ca..9b56e84 100644
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.h
+++ b/engines/mads/dragonsphere/dragonsphere_scenes1.h
@@ -94,6 +94,63 @@ public:
 	virtual void preActions();
 	virtual void actions();
 };
+
+class Scene104 : public Scene1xx {
+private:
+	bool _anim0ActvFl;
+	bool _anim1ActvFl;
+	bool _anim2ActvFl;
+	bool _anim3ActvFl;
+	bool _anim4ActvFl;
+	bool _anim5ActvFl;
+	bool _anim6ActvFl;
+	bool _activateTimerFl;
+	bool _wasBearFl;
+	bool _amuletWorksFl;
+	bool _pidDrawnSword;
+	in