[Scummvm-git-logs] scummvm master -> dd300871b813c35e555d1f656b999a56c536b4f4

dreammaster noreply at scummvm.org
Sun Apr 26 21:33:07 UTC 2026


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

Summary:
5595fdb9e6 MADS: DRAGONSPHERE: Skeleton engine
f535d1d9fc MADS: DRAGONSPHERE: Added globals
dd300871b8 MADS: PHANTOM: Some remaining gcc warning fixes


Commit: 5595fdb9e6b029f31e53bda56065a9bf97c62c1b
    https://github.com/scummvm/scummvm/commit/5595fdb9e6b029f31e53bda56065a9bf97c62c1b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-04-27T07:31:49+10:00

Commit Message:
MADS: DRAGONSPHERE: Skeleton engine

Changed paths:
  A engines/mads/madsv2/dragonsphere/dragonsphere.cpp
  A engines/mads/madsv2/dragonsphere/dragonsphere.h
  R engines/mads/dragonsphere/dragonsphere_scenes.cpp
  R engines/mads/dragonsphere/dragonsphere_scenes.h
  R engines/mads/dragonsphere/dragonsphere_scenes1.cpp
  R engines/mads/dragonsphere/dragonsphere_scenes1.h
  R engines/mads/dragonsphere/game_dragonsphere.cpp
  R engines/mads/dragonsphere/game_dragonsphere.h
  R engines/mads/dragonsphere/globals_dragonsphere.cpp
  R engines/mads/dragonsphere/globals_dragonsphere.h
    engines/mads/core/game.cpp
    engines/mads/core/scene.cpp
    engines/mads/core/scene_data.cpp
    engines/mads/metaengine.cpp
    engines/mads/module.mk


diff --git a/engines/mads/core/game.cpp b/engines/mads/core/game.cpp
index f15adaca6e4..a914105ac44 100644
--- a/engines/mads/core/game.cpp
+++ b/engines/mads/core/game.cpp
@@ -34,9 +34,6 @@
 #include "mads/core/msurface.h"
 #include "mads/core/resources.h"
 #include "mads/nebular/game_nebular.h"
-#ifdef ENABLE_MADSV2
-#include "mads/dragonsphere/game_dragonsphere.h"
-#endif
 
 namespace MADS {
 
@@ -44,10 +41,6 @@ Game *Game::init(RexNebularEngine *vm) {
 	switch (vm->getGameID()) {
 	case GType_RexNebular:
 		return new Nebular::GameNebular(vm);
-#ifdef ENABLE_MADSV2
-	case GType_Dragonsphere:
-		return new Dragonsphere::GameDragonsphere(vm);
-#endif
 	default:
 		error("Game::init(): Unknown game");
 	}
diff --git a/engines/mads/core/scene.cpp b/engines/mads/core/scene.cpp
index deb5a105690..e5e3c50767f 100644
--- a/engines/mads/core/scene.cpp
+++ b/engines/mads/core/scene.cpp
@@ -25,9 +25,6 @@
 #include "mads/nebular/nebular.h"
 #include "mads/core/audio.h"
 #include "mads/nebular/nebular_scenes.h"
-#ifdef ENABLE_MADSV2
-#include "mads/dragonsphere/dragonsphere_scenes.h"
-#endif
 
 namespace MADS {
 
@@ -129,11 +126,6 @@ void Scene::loadSceneLogic() {
 	case GType_RexNebular:
 		_sceneLogic = Nebular::SceneFactory::createScene(_vm);
 		break;
-#ifdef ENABLE_MADSV2
-	case GType_Dragonsphere:
-		_sceneLogic = Dragonsphere::SceneFactory::createScene(_vm);
-		break;
-#endif
 	default:
 		error("Scene logic: Unknown game");
 	}
diff --git a/engines/mads/core/scene_data.cpp b/engines/mads/core/scene_data.cpp
index 6cc71b32357..55679e2ceba 100644
--- a/engines/mads/core/scene_data.cpp
+++ b/engines/mads/core/scene_data.cpp
@@ -26,9 +26,6 @@
 #include "mads/core/screen.h"
 #include "mads/core/resources.h"
 #include "mads/nebular/nebular_scenes.h"
-#ifdef ENABLE_MADSV2
-#include "mads/dragonsphere/dragonsphere_scenes.h"
-#endif
 
 namespace MADS {
 
@@ -116,10 +113,6 @@ SceneInfo *SceneInfo::init(RexNebularEngine *vm) {
 	switch (vm->getGameID()) {
 	case GType_RexNebular:
 		return new Nebular::SceneInfoNebular(vm);
-#ifdef ENABLE_MADSV2
-	case GType_Dragonsphere:
-		return new Dragonsphere::SceneInfoDragonsphere(vm);
-#endif
 	default:
 		error("SceneInfo: Unknown game");
 	}
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.cpp b/engines/mads/dragonsphere/dragonsphere_scenes.cpp
deleted file mode 100644
index 5b76cd28bd6..00000000000
--- a/engines/mads/dragonsphere/dragonsphere_scenes.cpp
+++ /dev/null
@@ -1,236 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/config-manager.h"
-#include "mads/nebular/nebular.h"
-#include "mads/core/compression.h"
-#include "mads/core/resources.h"
-#include "mads/core/scene.h"
-#include "mads/dragonsphere/game_dragonsphere.h"
-#include "mads/dragonsphere/dragonsphere_scenes.h"
-#include "mads/dragonsphere/dragonsphere_scenes1.h"
-
-namespace MADS {
-namespace Dragonsphere {
-
-SceneLogic *SceneFactory::createScene(RexNebularEngine *vm) {
-	Scene &scene = vm->_game->_scene;
-
-	// TODO
-	//scene.addActiveVocab(NOUN_DROP);
-
-	switch (scene._nextSceneId) {
-	// Scene group #1 (Castle, river and caves)
-	case 101:	// king's bedroom
-		return new Scene101(vm);
-	case 102:	// queen's bedroom
-		return new Scene102(vm);
-	case 103:	// outside king's bedroom
-		return new Scene103(vm);
-	case 104:	// fireplace / bookshelf
-		return new Scene104(vm);
-	case 105:	// dining room
-		return new Scene105(vm);
-	case 106:	// throne room
-		return new DummyScene(vm);	// TODO
-	case 107:	// council chamber
-		return new DummyScene(vm);	// TODO
-	case 108:	// dungeon, cell entrance
-		return new DummyScene(vm);	// TODO
-	case 109:	// cell
-		return new DummyScene(vm);	// TODO
-	case 110:	// outside castle, merchants and well
-		return new DummyScene(vm);	// TODO
-	case 111:	// Dragonsphere closeup
-		return new DummyScene(vm);	// TODO
-	case 112:	// well descend
-		return new DummyScene(vm);	// TODO
-	case 113:	// bottom of well, river and trap door
-		return new DummyScene(vm);	// TODO
-	case 114:	// cave
-		return new DummyScene(vm);	// TODO
-	case 115:	// cave with passageway to west
-		return new DummyScene(vm);	// TODO
-	case 116:	// cave with pedestral
-		return new DummyScene(vm);	// TODO
-	case 117:	// river
-		return new DummyScene(vm);	// TODO
-	case 118:	// castle courtyard and gate
-		return new DummyScene(vm);	// TODO
-	case 119:	// castle stairs
-		return new DummyScene(vm);	// TODO
-	case 120:	// map
-		return new DummyScene(vm);	// TODO
-
-	// Scene group #2 (Slathan ni Patan, land of shapeshifters)
-	case 201:	// guardhouse, entrance to Slathan ni Patan
-		return new DummyScene(vm);	// TODO
-	case 203:	// forest
-		return new DummyScene(vm);	// TODO
-	case 204:	// cave
-		return new DummyScene(vm);	// TODO
-	case 205:	// outside village
-		return new DummyScene(vm);	// TODO
-	case 206:	// village
-		return new DummyScene(vm);	// TODO
-
-	// Scene group #3 (Brynn-Fann, Land of faeries)
-	case 301:	// maze entrance
-		return new DummyScene(vm);	// TODO
-	case 302:	// maze
-		return new DummyScene(vm);	// TODO
-	case 303:	// toads
-		return new DummyScene(vm);	// TODO
-
-	// Scene group #4 (The Desert)
-	case 401:	// desert
-		return new DummyScene(vm);	// TODO
-	case 402:	// desert
-		return new DummyScene(vm);	// TODO
-	case 403:	// desert
-		return new DummyScene(vm);	// TODO
-	case 404:	// desert with dunes
-		return new DummyScene(vm);	// TODO
-	case 405:	// oasis
-		return new DummyScene(vm);	// TODO
-	case 406:	// inside tent
-		return new DummyScene(vm);	// TODO
-	case 407:	// gem sack closeup
-		return new DummyScene(vm);	// TODO
-	case 408:	// spirit plane
-		return new DummyScene(vm);	// TODO
-	case 409:	// spirit plane top down view, disks
-		return new DummyScene(vm);	// TODO
-	case 410:	// snake pit and spirit tree
-		return new DummyScene(vm);	// TODO
-	case 411:	// nest
-		return new DummyScene(vm);	// TODO
-	case 412:	// desert
-		return new DummyScene(vm);	// TODO
-	case 454:	// cutscene
-		return new DummyScene(vm);	// TODO
-
-	// Scene group #5 (The Mountain)
-	case 501:	// base of mountain / wall
-		return new DummyScene(vm);	// TODO
-	case 502:	// base of mountain
-		return new DummyScene(vm);	// TODO
-	case 503:	// waterfall
-		return new DummyScene(vm);	// TODO
-	case 504:	// hermit's cave
-		return new DummyScene(vm);	// TODO
-	case 505:	// rock trees
-		return new DummyScene(vm);	// TODO
-	case 506:	// nest
-		return new DummyScene(vm);	// TODO
-	case 507:	// above nest
-		return new DummyScene(vm);	// TODO
-	case 508:	// ledge, right
-		return new DummyScene(vm);	// TODO
-	case 509:	// ledge, left
-		return new DummyScene(vm);	// TODO
-	case 510:	// nest top down view and pillars
-		return new DummyScene(vm);	// TODO
-	case 511:	// pillars
-		return new DummyScene(vm);	// TODO
-	case 512:	// nest
-		return new DummyScene(vm);	// TODO
-	case 557:	// cutscene
-		return new DummyScene(vm);	// TODO
-
-	// Scene group #6 (The Tower)
-	case 601:	// ??? (tile count mismatch)
-		return new DummyScene(vm);	// TODO
-	case 603:	// eye chamber
-		return new DummyScene(vm);	// TODO
-	case 604:	// room of magic
-		return new DummyScene(vm);	// TODO
-	case 605:	// science room
-		return new DummyScene(vm);	// TODO
-	case 606:	// doorway
-		return new DummyScene(vm);	// TODO
-	case 607:	// prison
-		return new DummyScene(vm);	// TODO
-	case 609:	// stone pedestral chamber
-		return new DummyScene(vm);	// TODO
-	case 612:	// infernal machine room
-		return new DummyScene(vm);	// TODO
-	case 613:	// room with lava floor
-		return new DummyScene(vm);	// TODO
-	case 614:	// sorcerer's room
-		return new DummyScene(vm);	// TODO
-
-	default:
-		error("Invalid scene %d called", scene._nextSceneId);
-	}
-}
-
-/*------------------------------------------------------------------------*/
-
-DragonsphereScene::DragonsphereScene(RexNebularEngine *vm) : SceneLogic(vm),
-		_globals(static_cast<GameDragonsphere *>(vm->_game)->_globals),
-		_game(*static_cast<GameDragonsphere *>(vm->_game)),
-		_action(vm->_game->_scene._action) {
-}
-
-Common::Path DragonsphereScene::formAnimName(char sepChar, int suffixNum) {
-	return Resources::formatName(_scene->_currentSceneId, sepChar, suffixNum,
-		EXT_NONE, "");
-}
-
-/*------------------------------------------------------------------------*/
-
-void SceneInfoDragonsphere::loadCodes(BaseSurface &depthSurface, int variant) {
-	Common::String ext = Common::String::format(".WW%d", variant);
-	Common::Path fileName = Resources::formatName(RESPREFIX_RM, _sceneId, ext);
-	if (!Common::File::exists(fileName))
-		return;
-
-	File f(fileName);
-	MadsPack codesPack(&f);
-	Common::SeekableReadStream *stream = codesPack.getItemStream(0);
-
-	loadCodes(depthSurface, stream);
-
-	delete stream;
-	f.close();
-}
-
-void SceneInfoDragonsphere::loadCodes(BaseSurface &depthSurface, Common::SeekableReadStream *stream) {
-	byte *destP = (byte *)depthSurface.getPixels();
-	byte *walkMap = new byte[stream->size()];
-	stream->read(walkMap, stream->size());
-
-	for (int y = 0; y < 156; ++y) {
-		for (int x = 0; x < 320; ++x) {
-			int offset = x + (y * 320);
-			if ((walkMap[offset / 8] << (offset % 8)) & 0x80)
-				*destP++ = 1;		// walkable
-			else
-				*destP++ = 0;
-		}
-	}
-
-	delete[] walkMap;
-}
-
-} // namespace Dragonsphere
-} // namespace MADS
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.h b/engines/mads/dragonsphere/dragonsphere_scenes.h
deleted file mode 100644
index 4bc5a6ef276..00000000000
--- a/engines/mads/dragonsphere/dragonsphere_scenes.h
+++ /dev/null
@@ -1,671 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef MADS_DRAGONSPHERE_SCENES_H
-#define MADS_DRAGONSPHERE_SCENES_H
-
-#include "mads/core/scene.h"
-#include "mads/dragonsphere/game_dragonsphere.h"
-//#include "mads/dragonsphere/globals_dragonsphere.h"
-
-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_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
-};
-
-enum Noun {
-	NOUN_GAME = 0x1,
-	NOUN_QSAVE = 0x2,
-	NOUN_NOTHING = 0xE,
-	NOUN_ = 0xF,
-	NOUN_FLOOR = 0x10,
-	NOUN_RUG = 0x12,
-	NOUN_CARPET = 0x13,
-	NOUN_WALL = 0x14,
-	NOUN_BED = 0x15,
-	NOUN_PILLOW = 0x16,
-	NOUN_CHEST = 0x17,
-	NOUN_WINDOW = 0x18,
-	NOUN_NIGHTSTAND = 0x19,
-	NOUN_TAPESTRY = 0x1A,
-	NOUN_DRESSING_SCREEN = 0x1B,
-	NOUN_ROYAL_CREST = 0x1D,
-	NOUN_WASHBASIN = 0x1F,
-	NOUN_WASH_AT = 0x20,
-	NOUN_BOOK = 0x21,
-	NOUN_FIREPLACE = 0x22,
-	NOUN_FIREPLACE_SCREEN = 0x23,
-	NOUN_DOOR_TO_QUEENS_ROOM = 0x24,
-	NOUN_HALL_TO_SOUTH = 0x26,
-	NOUN_WALL_PLAQUE = 0x28,
-	NOUN_DECORATION = 0x29,
-	NOUN_SWORDS = 0x2A,
-	NOUN_WALL_SCONCE = 0x2B,
-	NOUN_BUST_ON_WALL = 0x2C,
-	NOUN_WALL_ARCH = 0x2D,
-	NOUN_SIGNET_RING = 0x2E,
-	NOUN_POLISH = 0x30,
-	NOUN_GANGBANG = 0x31,
-	NOUN_BIRD_FIGURINE = 0x32,
-	NOUN_RUB = 0x33,
-	NOUN_BIRDCALL = 0x34,
-	NOUN_USE = 0x35,
-	NOUN_MAKE_NOISE = 0x36,
-	NOUN_SHIELDSTONE = 0x37,
-	NOUN_SWORD = 0x38,
-	NOUN_GOBLET = 0x3B,
-	NOUN_FILL = 0x3C,
-	NOUN_DRINK_FROM = 0x3D,
-	NOUN_BONE = 0x3E,
-	NOUN_GNAW = 0x3F,
-	NOUN_FRUIT = 0x40,
-	NOUN_EAT = 0x41,
-	NOUN_DOLL = 0x42,
-	NOUN_PLAY_WITH = 0x43,
-	NOUN_HEAL = 0x44,
-	NOUN_HEAL_THYSELF = 0x45,
-	NOUN_HEAL_SELF = 0x46,
-	NOUN_POLYSTONE = 0x47,
-	NOUN_MIMIC = 0x48,
-	NOUN_RED_POWERSTONE = 0x49,
-	NOUN_YELLOW_POWERSTONE = 0x4A,
-	NOUN_BLUE_POWERSTONE = 0x4B,
-	NOUN_KEY_CROWN = 0x4C,
-	NOUN_WEAR = 0x4D,
-	NOUN_DATES = 0x4E,
-	NOUN_STATUE = 0x4F,
-	NOUN_BOTTLE_OF_FLIES = 0x50,
-	NOUN_LISTEN_TO = 0x51,
-	NOUN_SOUL_EGG = 0x52,
-	NOUN_BREAK = 0x53,
-	NOUN_MAGIC_BELT = 0x54,
-	NOUN_ADJUST = 0x55,
-	NOUN_AMULET = 0x56,
-	NOUN_MUD = 0x58,
-	NOUN_FEEL = 0x59,
-	NOUN_TASTE = 0x5A,
-	NOUN_FEATHERS = 0x5B,
-	NOUN_TICKLE = 0x5C,
-	NOUN_TORCH = 0x5D,
-	NOUN_WAVE = 0x5E,
-	NOUN_FLASK = 0x5F,
-	NOUN_FLASK_FULL_OF_ACID = 0x60,
-	NOUN_POUR_CONTENTS = 0x61,
-	NOUN_ROPE = 0x65,
-	NOUN_TIE = 0x66,
-	NOUN_POWER_VACUUM_STONE = 0x67,
-	NOUN_TAKE_MAGIC_FROM = 0x68,
-	NOUN_DEAD_RAT = 0x69,
-	NOUN_PET = 0x6A,
-	NOUN_MAP = 0x6B,
-	NOUN_FOLD = 0x6C,
-	NOUN_CRYSTAL_BALL = 0x6D,
-	NOUN_GAZE_INTO = 0x6E,
-	NOUN_INVOKE_POWER_OF = 0x6F,
-	NOUN_BLACK_SPHERE = 0x70,
-	NOUN_SOPTUS_SOPORIFIC = 0x71,
-	NOUN_SHIFTER_RING = 0x72,
-	NOUN_REVERT = 0x77,
-	NOUN_MEDICINE_BUNDLE = 0x78,
-	NOUN_SHAKE = 0x79,
-	NOUN_PARTLY_BUILT_BUNDLE = 0x7A,
-	NOUN_RATSICLE = 0x7B,
-	NOUN_LICK = 0x7C,
-	NOUN_TENTACLE_PARTS = 0x7D,
-	NOUN_CHEW = 0x7E,
-	NOUN_TELEPORT_DOOR = 0x7F,
-	NOUN_UNROLL = 0x80,
-	NOUN_RARE_COIN = 0x81,
-	NOUN_ADMIRE = 0x82,
-	NOUN_CRYSTAL_FLOWER = 0x83,
-	NOUN_DIAMOND_DUST = 0x84,
-	NOUN_RUBY_RING = 0x85,
-	NOUN_GOLD_NUGGET = 0x86,
-	NOUN_MAGIC_MUSIC_BOX = 0x87,
-	NOUN_EMERALD = 0x88,
-	NOUN_PIECE_OF_PAPER = 0x89,
-	NOUN_SPEAK_WORDS_ON = 0x8A,
-	NOUN_VORTEX_STONE = 0x8B,
-	NOUN_RUG2 = 0x8C,
-	NOUN_FIREPLACE_SCREEN2 = 0x8D,
-	NOUN_BUST_ON_WALL2 = 0x8E,
-	NOUN_LOOK_AT2 = 0x8F,
-	NOUN_DRAGON = 0x90,
-	NOUN_DRAGONSPHERE = 0x91,
-	NOUN_TOUCH = 0x92,
-	NOUN_THRONE_ROOM = 0x93,
-	NOUN_RETURN_TO = 0x94,
-	NOUN_CAVE = 0x95,
-	NOUN_PASSAGEWAY_TO_WEST = 0x96,
-	NOUN_PASSAGEWAY_TO_EAST = 0x97,
-	NOUN_CAVE_FLOOR = 0x98,
-	NOUN_STONE_COLUMN = 0x99,
-	NOUN_ABYSS = 0x9A,
-	NOUN_LOOK_INTO = 0x9B,
-	NOUN_CASTLE = 0x9C,
-	NOUN_CASTLE_GATE = 0x9D,
-	NOUN_GROUND = 0x9E,
-	NOUN_BARREL = 0x9F,
-	NOUN_BARRELS = 0xA0,
-	NOUN_HAYSTACK = 0xA1,
-	NOUN_ROOT_THROUGH = 0xA2,
-	NOUN_BATTLEMENTS = 0xA3,
-	NOUN_GATE_TO_THRONE_ROOM = 0xA4,
-	NOUN_CASTLE_WALL = 0xA5,
-	NOUN_DOOR = 0xA6,
-	NOUN_WALL_SWITCH = 0xA7,
-	NOUN_STAIRS = 0xA8,
-	NOUN_EDGE_OF_ABYSS = 0xAA,
-	NOUN_COURTYARD = 0xAB,
-	NOUN_ROCK = 0xAC,
-	NOUN_CAVE_CEILING = 0xAD,
-	NOUN_CAVE_WALL = 0xAE,
-	NOUN_BRAZIER = 0xAF,
-	NOUN_DOOR_TO_THRONE_ROOM = 0xB0,
-	NOUN_GO_THROUGH = 0xB1,
-	NOUN_DINING_TABLE = 0xB2,
-	NOUN_ACTIVATE = 0xB3,
-	NOUN_BATTLEMENT = 0xB4,
-	NOUN_DOOR_TO_GAURDROOM = 0xB5,
-	NOUN_DUNGEON_FLOOR = 0xB6,
-	NOUN_DUNGEON_WALLS = 0xB7,
-	NOUN_DUNGEON_CEILING = 0xB8,
-	NOUN_BEDDING = 0xB9,
-	NOUN_FLOOR_GRATE = 0xBA,
-	NOUN_MANACLES = 0xBB,
-	NOUN_CALENDAR = 0xBC,
-	NOUN_DOOR_TO_GUARDROOM = 0xBD,
-	NOUN_DOOR_TO_COUNCIL_ROOM = 0xBE,
-	NOUN_GUARD_STATION = 0xBF,
-	NOUN_DOOR_TO_DUNGEON_CELL = 0xC0,
-	NOUN_DOORWAY_TO_CELL = 0xC1,
-	NOUN_DUNGEON_DOOR = 0xC2,
-	NOUN_DUNGEON_WALL = 0xC3,
-	NOUN_CEILING = 0xC4,
-	NOUN_DOOR_TO_HALLWAY = 0xC5,
-	NOUN_TABLE = 0xC6,
-	NOUN_BOOKSHELF = 0xC7,
-	NOUN_TROPHY = 0xC8,
-	NOUN_READING_BENCH = 0xC9,
-	NOUN_CHAIR = 0xCA,
-	NOUN_LOVESEAT = 0xCB,
-	NOUN_WOOD_BASKET = 0xCC,
-	NOUN_STOOL = 0xCD,
-	NOUN_GUARD_STOOL = 0xCE,
-	NOUN_ROCKS = 0xCF,
-	NOUN_DIVIDING_WALL = 0xD0,
-	NOUN_ARCHWAY = 0xD1,
-	NOUN_MARKET_GROUNDS = 0xD2,
-	NOUN_HEDGE = 0xD3,
-	NOUN_SKY = 0xD4,
-	NOUN_PLAINS = 0xD5,
-	NOUN_FIELDS = 0xD6,
-	NOUN_GATE_TO_COURTYARD = 0xD7,
-	NOUN_ROAD_TO_EAST = 0xD8,
-	NOUN_TREES = 0xD9,
-	NOUN_CLOUDS = 0xDA,
-	NOUN_MERCHANTS_STALL = 0xDB,
-	NOUN_WELL = 0xDC,
-	NOUN_DOWN_WELL = 0xDD,
-	NOUN_GO = 0xDE,
-	NOUN_GO_DOWN = 0xDF,
-	NOUN_CRANK = 0xE0,
-	NOUN_BUCKET = 0xE1,
-	NOUN_JUMP_DOWN = 0xE2,
-	NOUN_WALLS = 0xE3,
-	NOUN_DOORWAY_TO_SOUTH = 0xE4,
-	NOUN_PEDESTAL = 0xE5,
-	NOUN_DOOR_TO_NORTH = 0xE6,
-	NOUN_PAINTING = 0xE7,
-	NOUN_DOCUMENT = 0xE8,
-	NOUN_INK_BOTTLE = 0xE9,
-	NOUN_QUILL_PEN = 0xEA,
-	NOUN_CHANDELIER = 0xEB,
-	NOUN_COUNCIL_TABLE = 0xEC,
-	NOUN_CANDLESTICK = 0xED,
-	NOUN_DESK = 0xEE,
-	NOUN_TURN = 0xEF,
-	NOUN_POLE = 0xF0,
-	NOUN_THE_SCENE = 0xF1,
-	NOUN_LEAVE = 0xF2,
-	NOUN_END_TABLE = 0xF3,
-	NOUN_BATTLE_AXES = 0xF4,
-	NOUN_DOOR_TO_KINGS_ROOM = 0xF5,
-	NOUN_COAT_OF_ARMS = 0xF6,
-	NOUN_LARGE_WINDOW = 0xF7,
-	NOUN_SMALL_WINDOW = 0xF8,
-	NOUN_DOOR_TO_MEETING_ROOM = 0xF9,
-	NOUN_DOOR_TO_BALLROOM = 0xFA,
-	NOUN_FLOWERS = 0xFB,
-	NOUN_SHUTTERS = 0xFC,
-	NOUN_BOOKCASE = 0xFD,
-	NOUN_DOOR_TO_COURTYARD = 0xFE,
-	NOUN_PLATFORM = 0xFF,
-	NOUN_STEP = 0x100,
-	NOUN_RED_CARPET = 0x101,
-	NOUN_KINGS_THRONE = 0x102,
-	NOUN_SIT_IN = 0x103,
-	NOUN_QUEENS_THRONE = 0x104,
-	NOUN_TRAPDOOR = 0x105,
-	NOUN_GRATE = 0x106,
-	NOUN_RIVER = 0x107,
-	NOUN_DIARIES = 0x108,
-	NOUN_SWIM_DOWN = 0x109,
-	NOUN_SCULLERY_MAID = 0x10A,
-	NOUN_DOORWAY_TO_DUNGEON = 0x10B,
-	NOUN_WARD = 0x10C,
-	NOUN_DARKNESS_BEAST = 0x10D,
-	NOUN_BEAST = 0x10E,
-	NOUN_PUT_MAGIC_INTO = 0x10F,
-	NOUN_GUARD = 0x110,
-	NOUN_CROWN = 0x111,
-	NOUN_BOOKS = 0x112,
-	NOUN_SECRET_DOOR = 0x113,
-	NOUN_WALL_PANEL = 0x114,
-	NOUN_DOORWAY = 0x115,
-	NOUN_FAERIE = 0x116,
-	NOUN_SOPTUS_ECLIPTUS = 0x117,
-	NOUN_GUARD_CAPTAIN = 0x118,
-	NOUN_MERCHANT = 0x119,
-	NOUN_SHAPECHANGER = 0x11A,
-	NOUN_RED_STONE = 0x11B,
-	NOUN_YELLOW_STONE = 0x11C,
-	NOUN_BLUE_STONE = 0x11D,
-	NOUN_FLIES = 0x11E,
-	NOUN_FLASK_OF_ACID = 0x11F,
-	NOUN_PARTIAL_BUNDLE = 0x120,
-	NOUN_SOPORIFIC = 0x121,
-	NOUN_PARCHMENT = 0x122,
-	NOUN_KING = 0x123,
-	NOUN_MACMORN = 0x124,
-	NOUN_MOUNTAINSIDE = 0x125,
-	NOUN_PATH_TO_SOUTH = 0x126,
-	NOUN_ROUGH_STONE = 0x127,
-	NOUN_CLIMB_UP = 0x128,
-	NOUN_LARGE_ROCK = 0x129,
-	NOUN_SMALL_ROCK = 0x12A,
-	NOUN_PATH_TO_WEST = 0x12B,
-	NOUN_CAVE_ENTRANCE = 0x12C,
-	NOUN_PALLET = 0x12D,
-	NOUN_BLANKET = 0x12E,
-	NOUN_FIREPIT = 0x12F,
-	NOUN_FLAT_STONE = 0x130,
-	NOUN_MOVE = 0x131,
-	NOUN_SPIRIT_BUNDLE = 0x132,
-	NOUN_TRAIL_LEADING_UP = 0x133,
-	NOUN_FOLLOW = 0x134,
-	NOUN_TRAIL_LEADING_DOWN = 0x135,
-	NOUN_NEST = 0x136,
-	NOUN_REACH_IN = 0x137,
-	NOUN_TRAIL_LEADING_WEST = 0x138,
-	NOUN_PATH_TO_EAST = 0x139,
-	NOUN_WATERFALL = 0x13A,
-	NOUN_PUDDLE = 0x13B,
-	NOUN_EDGE_OF_CLIFF = 0x13C,
-	NOUN_LEDGE = 0x13D,
-	NOUN_CLIMB_DOWN = 0x13E,
-	NOUN_LANDING = 0x13F,
-	NOUN_BOULDERS = 0x140,
-	NOUN_ROCK_TUMBLE = 0x141,
-	NOUN_ROCK_TREE = 0x142,
-	NOUN_PILLAR = 0x143,
-	NOUN_JUMP_TO = 0x144,
-	NOUN_CLIFF = 0x145,
-	NOUN_PILLARS = 0x146,
-	NOUN_SPECIAL_ROCK = 0x147,
-	NOUN_GAZE_UPON = 0x148,
-	NOUN_SCONCE = 0x149,
-	NOUN_LADDER = 0x14A,
-	NOUN_STAIRWAY = 0x14B,
-	NOUN_MECHANISM = 0x14C,
-	NOUN_SPEARHEADS = 0x14D,
-	NOUN_TRAP_DOOR = 0x14E,
-	NOUN_SWIM = 0x14F,
-	NOUN_DOWN_RIVER = 0x150,
-	NOUN_SWIM_UP = 0x151,
-	NOUN_UP_RIVER = 0x152,
-	NOUN_SHORE = 0x153,
-	NOUN_SWIM_TO = 0x154,
-	NOUN_SWIM_TOWARDS = 0x155,
-	NOUN_KING_CALLASH = 0x156,
-	NOUN_KINGS_THRONE2 = 0x157,
-	NOUN_KING2 = 0x158,
-	NOUN_GROTTO = 0x159,
-	NOUN_CLIMB_THROUGH = 0x15A,
-	NOUN_QUEEN_MOTHER = 0x15B,
-	NOUN_MACMORN2 = 0x15C,
-	NOUN_SMALL_LEDGE = 0x15D,
-	NOUN_MACMORN3 = 0x15E,
-	NOUN_TO_110 = 0x15F,
-	NOUN_TO_KITTY_HEAVEN = 0x160,
-	NOUN_KITTY_HEAVEN = 0x161,
-	NOUN_ROOM_110 = 0x162,
-	NOUN_LLANIE = 0x163,
-	NOUN_CW = 0x164,
-	NOUN_HERMIT = 0x165,
-	NOUN_TROU = 0x166,
-	NOUN_SHAK = 0x167,
-	NOUN_ROOM_501 = 0x168,
-	NOUN_MOON = 0x169,
-	NOUN_UFO = 0x16A,
-	NOUN_SIT_ON = 0x16B,
-	NOUN_STRANGER = 0x16C,
-	NOUN_TOWER_DOOR = 0x16D,
-	NOUN_DOOR_TO_EAST = 0x16E,
-	NOUN_DOOR_TO_WEST = 0x16F,
-	NOUN_EYE = 0x170,
-	NOUN_DOORWAY_TO_EAST = 0x171,
-	NOUN_DOORWAY_TO_WEST = 0x172,
-	NOUN_SKULL = 0x173,
-	NOUN_DOOR_TO_MAGIC_ROOM = 0x174,
-	NOUN_ANCIENT_BARREL = 0x175,
-	NOUN_COBWEBS = 0x176,
-	NOUN_SHELF = 0x177,
-	NOUN_MUSTY_CHART = 0x178,
-	NOUN_LAB_TABLE = 0x179,
-	NOUN_PETCOCK = 0x17A,
-	NOUN_NOZZLE = 0x17B,
-	NOUN_TUBING = 0x17C,
-	NOUN_BEAKER = 0x17D,
-	NOUN_FLAME = 0x17E,
-	NOUN_METAL_PLATE = 0x17F,
-	NOUN_SHAFT_OF_LIGHT = 0x180,
-	NOUN_CABINET = 0x181,
-	NOUN_BALANCE = 0x182,
-	NOUN_CAGE = 0x183,
-	NOUN_FREEZER = 0x184,
-	NOUN_CONTENTS_OF_FREEZER = 0x185,
-	NOUN_CAGE_WITH_RATS = 0x186,
-	NOUN_DOOR_TO_SOUTH = 0x187,
-	NOUN_TRAIL_OF_GREEN_SLIME = 0x188,
-	NOUN_NECK_LOCK = 0x189,
-	NOUN_BENCH = 0x18A,
-	NOUN_SKELETON = 0x18B,
-	NOUN_LEG_CLAMPS = 0x18C,
-	NOUN_LEG_LOCK = 0x18D,
-	NOUN_WAIST_LOCK = 0x18E,
-	NOUN_NER_TOM = 0x18F,
-	NOUN_BELT = 0x190,
-	NOUN_JUMP_INTO = 0x191,
-	NOUN_CLOSET = 0x192,
-	NOUN_DOOR_TO_EYE_CHAMBER = 0x193,
-	NOUN_DRESSER = 0x194,
-	NOUN_SCROLL = 0x195,
-	NOUN_WITCH_PARAPHERNALIA = 0x196,
-	NOUN_SHELVES = 0x197,
-	NOUN_MAGIC_TOMES = 0x198,
-	NOUN_MAGIC_PARAPHERNALIA = 0x199,
-	NOUN_BOOK_OF_MAGIC = 0x19A,
-	NOUN_HOURGLASS = 0x19B,
-	NOUN_STONE_SPHERE = 0x19C,
-	NOUN_SHADOW_OF_WINDOW = 0x19D,
-	NOUN_MUSIC_BOX = 0x19E,
-	NOUN_LARGE_SPIDER_WEB = 0x19F,
-	NOUN_INFERNAL_MACHINE = 0x1A0,
-	NOUN_WATER_SOURCE = 0x1A1,
-	NOUN_FLOW_OF_WATER = 0x1A2,
-	NOUN_RETORT = 0x1A3,
-	NOUN_DOORWAY_TO_CORRIDOR = 0x1A4,
-	NOUN_TELESCOPE = 0x1A5,
-	NOUN_STRANGE_MAP = 0x1A6,
-	NOUN_CIRCLE_OF_SPHERES = 0x1A7,
-	NOUN_STONE_BED = 0x1A8,
-	NOUN_DRAGON_SCULPTURE = 0x1A9,
-	NOUN_RAT = 0x1AA,
-	NOUN_RAT_CAGE = 0x1AB,
-	NOUN_DOWN_BUTTON = 0x1AC,
-	NOUN_DOOR_TO_MACHINE_ROOM = 0x1AD,
-	NOUN_STRANGE_PORTAL = 0x1AE,
-	NOUN_DOOR_FRAME = 0x1AF,
-	NOUN_ELEVATOR_HOLE = 0x1B0,
-	NOUN_UP_BUTTON = 0x1B1,
-	NOUN_DOORWAY_TO_DARK_ROOM = 0x1B2,
-	NOUN_BIG_SKULL = 0x1B3,
-	NOUN_ELEVATOR_PLATFORM = 0x1B4,
-	NOUN_BUTTON = 0x1B5,
-	NOUN_TOP_BUTTON = 0x1B6,
-	NOUN_BOTTOM_BUTTON = 0x1B7,
-	NOUN_TELEPORTAL = 0x1B8,
-	NOUN_EYE_CHAMBER_DOORWAY = 0x1B9,
-	NOUN_MACHINE_ROOM_DOORWAY = 0x1BA,
-	NOUN_GLOWING_FLOOR = 0x1BB,
-	NOUN_BRYNN_FANN = 0x1BC,
-	NOUN_GRAN_CALLAHACH = 0x1BD,
-	NOUN_SLATHAN_NI_PATAN = 0x1BE,
-	NOUN_HIGHTOWER = 0x1BF,
-	NOUN_SOPTUS_ECLIPTUS2 = 0x1C0,
-	NOUN_TOWER = 0x1C1,
-	NOUN_MOUNTAIN_PATH = 0x1C2,
-	NOUN_PATH_BEHIND_TOWER = 0x1C3,
-	NOUN_VINES = 0x1C4,
-	NOUN_SLATHAN_NI_PATAN2 = 0x1C5,
-	NOUN_SICK = 0x1C6,
-	NOUN_PATH_AROUND_TOWER = 0x1C7,
-	NOUN_PATH_TO_HIGHTOWER = 0x1C8,
-	NOUN_SPIRIT_PLANE = 0x1C9,
-	NOUN_SPIRIT_TREE = 0x1CA,
-	NOUN_REMAINS = 0x1CC,
-	NOUN_DOORWAY_TO_ELEVATOR = 0x1CD,
-	NOUN_DRAGON_DOOR = 0x1CE,
-	NOUN_DRAGON_BONES = 0x1CF,
-	NOUN_IRON_FLOOR = 0x1D0,
-	NOUN_HOLE = 0x1D1,
-	NOUN_STONE = 0x1D2,
-	NOUN_HOMEMADE_BUNDLE = 0x1D3,
-	NOUN_LEFT = 0x1D4,
-	NOUN_RIGHT = 0x1D5,
-	NOUN_UP = 0x1D6,
-	NOUN_DOWN = 0x1D7,
-	NOUN_WEST = 0x1D8,
-	NOUN_DESERT_TO_WEST = 0x1D9,
-	NOUN_CROSS = 0x1DA,
-	NOUN_DESERT_TO_EAST = 0x1DB,
-	NOUN_DESERT_TO_SOUTH = 0x1DC,
-	NOUN_DESERT_TO_NORTH = 0x1DD,
-	NOUN_DESERT = 0x1DE,
-	NOUN_POWERSTONE = 0x1DF,
-	NOUN_BONES = 0x1E0,
-	NOUN_TENT = 0x1E1,
-	NOUN_BUSH = 0x1E2,
-	NOUN_SANWE = 0x1E3,
-	NOUN_TANGLE = 0x1E4,
-	NOUN_SAND = 0x1E5,
-	NOUN_MAGIC_GRAPES = 0x1E6,
-	NOUN_ROCS_NEST = 0x1E7,
-	NOUN_GRAPE_VINE = 0x1E8,
-	NOUN_STRANGE_SQUARE = 0x1E9,
-	NOUN_WATER_SPHERE = 0x1EA,
-	NOUN_EAST_END_OF_ISLAND = 0x1EB,
-	NOUN_ISLAND = 0x1EC,
-	NOUN_SECRET_MESSAGE = 0x1ED,
-	NOUN_FIND = 0x1EE,
-	NOUN_SAND_NEAR_STONES = 0x1EF,
-	NOUN_DESERT_SKY = 0x1F0,
-	NOUN_POOL = 0x1F1,
-	NOUN_PALM_TREE = 0x1F2,
-	NOUN_OASIS = 0x1F3,
-	NOUN_LEAN_TO = 0x1F4,
-	NOUN_TRADER = 0x1F5,
-	NOUN_SIGN = 0x1F6,
-	NOUN_WATER_FLOW = 0x1F7,
-	NOUN_FLOATING_DISK = 0x1F8,
-	NOUN_GNARLED_ROOT = 0x1F9,
-	NOUN_SNAKE_PIT = 0x1FA,
-	NOUN_MARKER = 0x1FB,
-	NOUN_SHAMAN = 0x1FC,
-	NOUN_GUARDHOUSE = 0x1FD,
-	NOUN_BONE_TREE = 0x1FE,
-	NOUN_EAR_ROCK = 0x1FF,
-	NOUN_MOUTH_ROCK = 0x200,
-	NOUN_NOSE_ROCK = 0x201,
-	NOUN_NEW_BUNDLE = 0x202,
-	NOUN_LIZARD = 0x203,
-	NOUN_ROC = 0x204,
-	NOUN_ROCS_NEST2 = 0x205,
-	NOUN_SELECT = 0x206,
-	NOUN_PURPLE_GEM = 0x207,
-	NOUN_PURPLE_STONE = 0x208,
-	NOUN_GREEN_STONE = 0x209,
-	NOUN_PATH = 0x20A,
-	NOUN_GUARDS = 0x20B,
-	NOUN_LAMP = 0x20C,
-	NOUN_SCIMITAR = 0x20D,
-	NOUN_SITTING_PILLOW = 0x20E,
-	NOUN_WATER_GOURD = 0x20F,
-	NOUN_JAR = 0x210,
-	NOUN_TENT_POLE = 0x211,
-	NOUN_EXIT = 0x212,
-	NOUN_PARAPHERNALIA = 0x213,
-	NOUN_SLATHAN_NI_PATAN3 = 0x214,
-	NOUN_EYE_ROCK = 0x215,
-	NOUN_BODY_TREE = 0x216,
-	NOUN_CLEARING = 0x217,
-	NOUN_TENTACLES = 0x218,
-	NOUN_SPELL_SHIELD = 0x219,
-	NOUN_POOL_MONSTER = 0x21A,
-	NOUN_SHIFTER_BOULDER = 0x21B,
-	NOUN_DEAD_TREE = 0x21C,
-	NOUN_PIT = 0x21D,
-	NOUN_SHIFTER_VILLAGE = 0x21E,
-	NOUN_SLATHAN_SKY = 0x21F,
-	NOUN_SHIFTER = 0x220,
-	NOUN_WRECKED_BRIDGE = 0x222,
-	NOUN_SHACK = 0x223,
-	NOUN_WRECKED_SHACK = 0x224,
-	NOUN_WISE_SHIFTER = 0x225,
-	NOUN_GRASS = 0x226,
-	NOUN_ENTRANCE_TO_MAZE = 0x227,
-	NOUN_TOPIARY_TOAD = 0x228,
-	NOUN_BOULDER = 0x229,
-	NOUN_MUSHROOM = 0x22A,
-	NOUN_SLATHAN_SKY2 = 0x22B,
-	NOUN_GRETA = 0x22C,
-	NOUN_TREE_STUMP = 0x22D,
-	NOUN_SANCTUARY_WOODS = 0x22E,
-	NOUN_TOADS = 0x22F,
-	NOUN_DOOFUS = 0x230,
-	NOUN_SHIFTING_MONSTER = 0x231,
-	NOUN_SPRITE = 0x232,
-	NOUN_MAZE = 0x233,
-	NOUN_TOPIARY_TOADSTOOL = 0x234,
-	NOUN_TOPIARY_GARGOYLE = 0x235,
-	NOUN_TOPIARY_DRAGON = 0x236,
-	NOUN_GUARDIAN = 0x237,
-	NOUN_BUTTERFLY_KING = 0x238,
-	NOUN_ROBE = 0x239,
-	NOUN_CEDAR_CHEST = 0x23A,
-	NOUN_DRAGONSPHERE2 = 0x23B,
-	NOUN_PATH_TO_HIGHTOWER2 = 0x23C,
-	NOUN_CALIPH = 0x23D
-};
-
-class SceneFactory {
-public:
-	static SceneLogic *createScene(RexNebularEngine *vm);
-};
-
-/**
- * Specialized base class for Dragonsphere game scenes
- */
-class DragonsphereScene : public SceneLogic {
-protected:
-	DragonsphereGlobals &_globals;
-	GameDragonsphere &_game;
-	MADSAction &_action;
-
-	/**
-	 * Forms an animation resource name
-	 */
-	Common::Path formAnimName(char sepChar, int suffixNum);
-
-	/**
-	 * Plays appropriate sound for entering varous rooms
-	 */
-	void lowRoomsEntrySound();
-public:
-	/**
-	 * Constructor
-	 */
-	DragonsphereScene(RexNebularEngine *vm);
-
-	void sub7178C();
-};
-
-class SceneInfoDragonsphere : public SceneInfo {
-	friend class SceneInfo;
-protected:
-	void loadCodes(BaseSurface &depthSurface, int variant) override;
-
-	void loadCodes(BaseSurface &depthSurface, Common::SeekableReadStream *stream) override;
-
-	/**
-	* Constructor
-	*/
-	SceneInfoDragonsphere(RexNebularEngine *vm) : SceneInfo(vm) {}
-};
-
-// TODO: Temporary, remove once implemented properly
-class DummyScene : public DragonsphereScene {
-public:
-	DummyScene(RexNebularEngine *vm) : DragonsphereScene(vm) {
-		warning("Unimplemented scene");
-	}
-
-	void setup() override {}
-	void enter() override {}
-	void actions() override {}
-};
-
-} // namespace Dragonsphere
-} // namespace MADS
-
-#endif
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
deleted file mode 100644
index ac43e50ea5b..00000000000
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp
+++ /dev/null
@@ -1,3690 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "mads/nebular/nebular.h"
-#include "mads/core/conversations.h"
-#include "mads/core/scene.h"
-#include "mads/dragonsphere/dragonsphere_scenes.h"
-#include "mads/dragonsphere/dragonsphere_scenes1.h"
-
-namespace MADS {
-namespace Dragonsphere {
-
-void Scene1xx::setAAName() {
-	int idx;
-
-	switch (_scene->_nextSceneId) {
-	case 108:
-	case 109:
-		idx = 3;
-		break;
-	case 110:
-		idx = 5;
-		break;
-	case 113:
-	case 114:
-	case 115:
-	case 117:
-	case 119:
-		idx = 1;
-		break;
-	case 116:
-		idx = 2;
-		break;
-	case 120:
-		idx = 8;
-		break;
-	default:
-		idx = 0;
-		break;
-	}
-
-	_game._aaName = Resources::formatAAName(idx);
-	_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;
-
-	default:
-		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;
-}
-
-/*------------------------------------------------------------------------*/
-
-Scene101::Scene101(RexNebularEngine *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");
-		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() {
-}
-
-/*------------------------------------------------------------------------*/
-
-Scene102::Scene102(RexNebularEngine *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));
-	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('p', 1));
-	_globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('y', 0));
-	_globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('y', 1));
-	_globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('x', -1));
-	_globals._spriteIndexes[7] = _scene->_sprites.addSprites("*KGRD_6");
-	_globals._spriteIndexes[8] = _scene->_sprites.addSprites(formAnimName('y', 2));
-
-	_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);
-	_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() {
-	if ((_animRunning == 1) && _scene->_animation[_globals._animationIndexes[0]]) {
-		if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() != _diaryFrame) {
-			_diaryFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
-
-			switch (_diaryFrame) {
-			case 6:
-				_scene->deleteSequence(_globals._sequenceIndexes[1]);
-				_game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[1], SYNC_ANIM, _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 ((_animRunning == 2) && _scene->_animation[_globals._animationIndexes[0]]) {
-		if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() != _diaryFrame) {
-			_diaryFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
-
-			switch (_diaryFrame) {
-			case 6:
-				_scene->deleteSequence(_globals._sequenceIndexes[2]);
-				_game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[2], SYNC_ANIM, _globals._animationIndexes[0]);
-				break;
-
-			case 26:
-				_vm->_dialogs->show(10213);
-				_vm->_dialogs->show(10214);
-				break;
-
-			default:
-				break;
-			}
-		}
-	}
-
-	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.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 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(SYNC_SEQ, _globals._sequenceIndexes[6], SYNC_SEQ, 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.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_SPRITE, 2, 1);
-			_scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 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.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 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(SYNC_SEQ, _globals._sequenceIndexes[6], SYNC_SEQ, idx);
-			}
-			break;
-
-		case 3:
-			_game._player._visible = true;
-			_game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _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(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 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(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]);
-			_scene->_sequences.addTimer(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(SYNC_ANIM, _globals._animationIndexes[0], SYNC_PLAYER, 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(SYNC_PLAYER, 0, SYNC_ANIM, _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() {
-}
-
-/*------------------------------------------------------------------------*/
-
-Scene103::Scene103(RexNebularEngine *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));
-	_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('y', 2));
-	_globals._spriteIndexes[8] = _scene->_sprites.addSprites(formAnimName('y', 7));
-	_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('y', 0));
-	_globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('y', 3));
-	_globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('y', 4));
-	_globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('y', 5));
-	_globals._spriteIndexes[7] = _scene->_sprites.addSprites(formAnimName('y', 6));
-	_globals._spriteIndexes[9] = _scene->_sprites.addSprites(formAnimName('x', 0));
-	_globals._spriteIndexes[10] = _scene->_sprites.addSprites(formAnimName('x', 1));
-	_globals._spriteIndexes[11] = _scene->_sprites.addSprites("*KGRD_9");
-
-	_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.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 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(SYNC_SEQ, _globals._sequenceIndexes[9], SYNC_SEQ, 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.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 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(SYNC_SEQ, _globals._sequenceIndexes[10], SYNC_SEQ, 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.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_SPRITE, 2, 1);
-			_scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 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.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 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(SYNC_SEQ, _globals._sequenceIndexes[9], SYNC_SEQ, tmpIdx);
-			}
-			break;
-
-		case 3:
-			_game._player._visible = true;
-			_game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[11]);
-			_scene->_sequences.addTimer(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.addSubEntry(_globals._sequenceIndexes[9], SEQUENCE_TRIGGER_EXPIRE, 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(SYNC_SEQ, _globals._sequenceIndexes[9], SYNC_SEQ, tmpIdx);
-			_scene->_sequences.addTimer(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.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_SPRITE, 2, 1);
-			_scene->_sequences.addSubEntry(_globals._sequenceIndexes[11], SEQUENCE_TRIGGER_EXPIRE, 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.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 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(SYNC_SEQ, _globals._sequenceIndexes[10], SYNC_SEQ, tmpIdx);
-			}
-			break;
-
-		case 3:
-			_game._player._visible = true;
-			_game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[11]);
-			_scene->_sequences.addTimer(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.addSubEntry(_globals._sequenceIndexes[10], SEQUENCE_TRIGGER_EXPIRE, 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(SYNC_SEQ, _globals._sequenceIndexes[10], SYNC_SEQ, tmpIdx);
-			_scene->_sequences.addTimer(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() {
-}
-
-/*------------------------------------------------------------------------*/
-
-Scene104::Scene104(RexNebularEngine *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->load(1);
-
-	if (_globals[kPlayerPersona] == 1) {
-		_scene->_sprites.addSprites(formAnimName('e', 8));
-		_scene->_sprites.addSprites(formAnimName('b', 5));
-	}
-
-	_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));
-	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('x', 1));
-	_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('x', 2));
-	_globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('x', 3));
-	_globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('x', 5));
-	_globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('x', 4));
-
-	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");
-		_globals._spriteIndexes[8] = _scene->_sprites.addSprites("*KGRM1_8");
-		_globals._spriteIndexes[11] = _scene->_sprites.addSprites(formAnimName('y', 5));
-		_globals._spriteIndexes[10] = _scene->_sprites.addSprites(formAnimName('y', 4));
-		_globals._spriteIndexes[12] = _scene->_sprites.addSprites(formAnimName('y', 1));
-
-		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));
-		_scene->_sprites.addSprites(formAnimName('b', 0));
-		_globals._spriteIndexes[13] = _scene->_sprites.addSprites(formAnimName('b', 3));
-		_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));
-
-		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));
-		_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.addTimer(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();
-
-			if (_tapestryFrame == 13) {
-				_game._player._visible = true;
-				_game.syncTimers(SYNC_PLAYER, 0, SYNC_ANIM, _globals._animationIndexes[0]);
-			}
-		}
-	}
-
-	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.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 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(SYNC_SEQ, _globals._sequenceIndexes[6], SYNC_SEQ, idx);
-		_game._player._stepEnabled = true;
-		}
-		break;
-
-	default:
-		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(SYNC_ANIM, _globals._animationIndexes[4], SYNC_CLOCK, 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->activeConvId() == 1) {
-		handleFinalConversation();
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action._lookFlag) {
-		if (_globals[kPlayerPersona] == 0)
-			_vm->_dialogs->show(10401);
-		else
-			_vm->_dialogs->show(10437);
-
-		_action._inProgress = false;
-		return;
-	}
-
-	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);
-
-		_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)) {
-		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.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_SPRITE, 2, 1);
-				_scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 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.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 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(SYNC_SEQ, _globals._sequenceIndexes[6], SYNC_SEQ, tmpIdx);
-				}
-				break;
-
-			case 3:
-				_game._player._visible = true;
-				_game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[7]);
-				_scene->_sequences.addTimer(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.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 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(SYNC_SEQ, _globals._sequenceIndexes[6], SYNC_SEQ, tmpIdx);
-				_scene->_sequences.addTimer(6, 7);
-				}
-				break;
-
-			case 7:
-				_scene->_nextSceneId = 103;
-				break;
-
-			default:
-				break;
-			}
-		} else
-			_vm->_dialogs->show(10434);
-
-		_action._inProgress = false;
-		return;
-	}
-
-	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.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 3, 1);
-				_scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 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.addSubEntry(_globals._sequenceIndexes[12], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
-				break;
-
-			case 2: {
-				int tmpIdx = _globals._sequenceIndexes[12];
-				_globals._sequenceIndexes[12] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[12], false, -2);
-				_game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[12], SYNC_SEQ, 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(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]);
-				_scene->_sequences.addTimer(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;
-			}
-			_action._inProgress = false;
-			return;
-		}
-	}
-
-	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.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 3, 1);
-				_scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 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.addTimer(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(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]);
-				_scene->_sequences.addTimer(5, 4);
-				break;
-
-			case 4:
-				if (_globals[kBooksStatus] == 2)
-					_vm->_dialogs->show(10429);
-				_globals[kBooksStatus] = 3;
-				_game._player._stepEnabled = true;
-				break;
-
-			default:
-				break;
-			}
-			_action._inProgress = false;
-			return;
-		}
-	}
-
-	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(SYNC_PLAYER, 0, SYNC_ANIM, _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.addTimer(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);
-
-		_action._inProgress = false;
-		return;
-	}
-
-	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(SYNC_PLAYER, 0, SYNC_ANIM, _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.addTimer(6, 2);
-						break;
-
-					case 2:
-						_globals[kTapestryStatus] = 2;
-						_game._player._stepEnabled = true;
-						break;
-
-					default:
-						break;
-					}
-					_action._inProgress = false;
-					return;
-				}
-			}
-		} else {
-			_vm->_dialogs->show(10445);
-			_action._inProgress = false;
-			return;
-		}
-	}
-
-	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);
-					_action._inProgress = false;
-					return;
-
-				case 1:
-					_vm->_dialogs->show(10418);
-					_action._inProgress = false;
-					return;
-
-				case 2:
-				case 4:
-					_vm->_dialogs->show(10419);
-					_action._inProgress = false;
-					return;
-
-				case 3:
-					_vm->_dialogs->show(10420);
-					_action._inProgress = false;
-					return;
-
-				default:
-					break;
-				}
-			} else {
-				_vm->_dialogs->show(10439);
-				_action._inProgress = false;
-				return;
-			}
-		}
-
-		if (_action.isObject(NOUN_FIREPLACE)) {
-			if (_globals[kPlayerPersona] == 0)
-				_vm->_dialogs->show(10402);
-			else
-				_vm->_dialogs->show(10438);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		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);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_RUG)) {
-			if (_globals[kPlayerPersona] == 0)
-				_vm->_dialogs->show(10405);
-			else
-				_vm->_dialogs->show(10439);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_FIREPLACE_SCREEN)) {
-			if (_globals[kPlayerPersona] == 0)
-				_vm->_dialogs->show(10407);
-			else
-				_vm->_dialogs->show(10439);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_DOOR_TO_THRONE_ROOM)) {
-			if (_globals[kPlayerPersona] == 0)
-				_vm->_dialogs->show(10409);
-			else
-				_vm->_dialogs->show(10434);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_SCONCE)) {
-			if (_globals[kPlayerPersona] == 0)
-				_vm->_dialogs->show(10410);
-			else
-				_vm->_dialogs->show(10440);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_WOOD_BASKET)) {
-			if (_globals[kPlayerPersona] == 0)
-				_vm->_dialogs->show(10411);
-			else
-				_vm->_dialogs->show(10439);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_TROPHY)) {
-			if (_globals[kPlayerPersona] == 0)
-				_vm->_dialogs->show(10412);
-			else
-				_vm->_dialogs->show(10441);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_READING_BENCH)) {
-			if (_globals[kPlayerPersona] == 0)
-				_vm->_dialogs->show(10414);
-			else
-				_vm->_dialogs->show(10439);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_LOVESEAT)) {
-			if (_globals[kPlayerPersona] == 0)
-				_vm->_dialogs->show(10416);
-			else
-				_vm->_dialogs->show(10439);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_DOOR_TO_HALLWAY)) {
-			if (_globals[kPlayerPersona] == 0)
-				_vm->_dialogs->show(10421);
-			else
-				_vm->_dialogs->show(10434);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_SECRET_DOOR)) {
-			_vm->_dialogs->show(10430);
-			_action._inProgress = false;
-			return;
-		}
-
-		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);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isAction(VERB_LOOK, NOUN_WALL_PANEL)) {
-			if ((_globals[kBooksStatus] == 0) || (_globals[kBooksStatus] == 1))
-				_vm->_dialogs->show(10435);
-			else
-				_vm->_dialogs->show(10436);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_KING) && _globals[kPlayerPersona] == 1) {
-			_vm->_dialogs->show(10443);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_MUSIC_BOX) && _globals[kNoLoadWalker]) {
-			_vm->_dialogs->showItem(OBJ_MAGIC_MUSIC_BOX, 843, 0);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_MACMORN) && (_globals[kPlayerPersona] == 1)) {
-			_vm->_dialogs->show(10444);
-			_action._inProgress = false;
-			return;
-		}
-
-		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);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_DECORATION)) {
-			if (_globals[kPlayerPersona] == 1)
-				_vm->_dialogs->show(10439);
-			else
-				_vm->_dialogs->show(10449);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_SWORD)) {
-			if (_globals[kPlayerPersona] == 1)
-				_vm->_dialogs->show(10439);
-			else
-				_vm->_dialogs->show(10450);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_FLOOR) && (_globals[kPlayerPersona] == 1)) {
-			_vm->_dialogs->show(10439);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_WALL) && (_globals[kPlayerPersona] == 1)) {
-			_vm->_dialogs->show(10439);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_CANDLESTICK)) {
-			if (_globals[kPlayerPersona] == 1)
-				_vm->_dialogs->show(10439);
-			else
-				_vm->_dialogs->show(10461);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_QUEEN_MOTHER)) {
-			_vm->_dialogs->show(10456);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_MACMORN)) {
-			_vm->_dialogs->show(10444);
-			_action._inProgress = false;
-			return;
-		}
-	}
-
-	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);
-
-		_action._inProgress = false;
-		return;
-	}
-
-	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);
-
-		_action._inProgress = false;
-		return;
-	}
-
-	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);
-
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action.isAction(VERB_OPEN, NOUN_READING_BENCH)) {
-		if (_globals[kPlayerPersona] == 0)
-			_vm->_dialogs->show(10415);
-		else
-			_vm->_dialogs->show(10445);
-
-		_action._inProgress = false;
-		return;
-	}
-
-	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);
-
-		_action._inProgress = false;
-		return;
-	}
-
-	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);
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action.isAction(VERB_INVOKE, NOUN_SIGNET_RING) && (_globals[kPlayerPersona] == 1)) {
-		_vm->_dialogs->show(10433);
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action.isAction(VERB_PUT, NOUN_TENTACLE_PARTS, NOUN_WALL_PANEL) && (_globals[kPlayerPersona] == 0)) {
-		_vm->_dialogs->show(10446);
-		_action._inProgress = false;
-		return;
-	}
-
-	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);
-		}
-		_action._inProgress = false;
-		return;
-	}
-
-	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;
-		_action._inProgress = false;
-		return;
-	}
-
-	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(SYNC_SEQ, _globals._sequenceIndexes[14], SYNC_CLOCK, 0);
-
-			_globals._spriteIndexes[15] = _scene->_sprites.addSprites(formAnimName('e', 3), PALFLAG_ALL_TO_CLOSEST | PALFLAG_ANY_TO_CLOSEST);
-			_globals._animationIndexes[1] = _scene->loadAnimation(formAnimName('m', 2), 0);
-			_anim1ActvFl = false;
-			_anim5ActvFl = true;
-		} else
-			_vm->_dialogs->showItem(OBJ_AMULET, 945, 0);
-
-		_action._inProgress = false;
-		return;
-	}
-
-	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);
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action.isAction(VERB_TALK_TO, NOUN_MACMORN)) {
-		_vm->_dialogs->show(10464);
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action.isAction(VERB_TALK_TO, NOUN_QUEEN_MOTHER)) {
-		_vm->_dialogs->show(10463);
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action.isAction(VERB_TALK_TO, NOUN_KING)) {
-		_vm->_dialogs->show(10465);
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action.isAction(VERB_POUR_CONTENTS_OF, NOUN_MACMORN)) {
-		_vm->_dialogs->show(10462);
-		_action._inProgress = false;
-		return;
-	}
-
-
-	if (_anim2ActvFl && (_action.isAction(VERB_WALK_ACROSS) || _action.isAction(VERB_WALK_TO))) {
-		_vm->_dialogs->show(10445);
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action.isAction(VERB_TAKE, NOUN_CANDLESTICK)) {
-		_vm->_dialogs->show(10468);
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action.isAction(VERB_OPEN, NOUN_MUSIC_BOX) && _globals[kNoLoadWalker]) {
-		_vm->_dialogs->show(10470);
-		_action._inProgress = false;
-		return;
-	}
-}
-
-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->setStartNode(31);
-		_vm->_gameConv->stop();
-
-		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(SYNC_ANIM, _globals._animationIndexes[4], SYNC_ANIM, _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(SYNC_ANIM, _globals._animationIndexes[4], SYNC_ANIM, _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.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 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(SYNC_SEQ, _globals._sequenceIndexes[14], SYNC_ANIM, _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;
-
-	default:
-		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();
-
-	if (_deathFrame == 11)
-		_scene->playSpeech(7);
-	else if (_deathFrame == 17)
-		_scene->playSpeech(6);
-}
-
-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(SYNC_ANIM, _globals._animationIndexes[4], SYNC_CLOCK, 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;
-	}
-}
-/*------------------------------------------------------------------------*/
-
-Scene105::Scene105(RexNebularEngine *vm) : Scene1xx(vm) {
-	_maidTalkingFl = false;
-	_sitUpFl = false;
-	_goodNumberFl = false;
-
-	_maidFrame = -1;
-	_newStatus = -1;
-	_previousStatus = -1;
-	_maidHotspotId1 = -1;
-	_maidHotspotId2 = -1;
-	_bucketHotspotId = -1;
-	_boneHotspotId = -1;
-	_gobletHotspotId = -1;
-}
-
-void Scene105::synchronize(Common::Serializer &s) {
-	Scene1xx::synchronize(s);
-
-	s.syncAsByte(_maidTalkingFl);
-	s.syncAsByte(_sitUpFl);
-	s.syncAsByte(_goodNumberFl);
-
-	s.syncAsSint16LE(_maidFrame);
-	s.syncAsSint16LE(_newStatus);
-	s.syncAsSint16LE(_previousStatus);
-	s.syncAsSint16LE(_maidHotspotId1);
-	s.syncAsSint16LE(_maidHotspotId2);
-	s.syncAsSint16LE(_bucketHotspotId);
-	s.syncAsSint16LE(_boneHotspotId);
-	s.syncAsSint16LE(_gobletHotspotId);
-}
-
-void Scene105::setup() {
-	setPlayerSpritesPrefix();
-	setAAName();
-
-	_scene->addActiveVocab(NOUN_SCULLERY_MAID);
-	_scene->addActiveVocab(NOUN_BUCKET);
-	_scene->addActiveVocab(VERB_WALK_TO);
-	_scene->addActiveVocab(NOUN_BONE);
-	_scene->addActiveVocab(NOUN_GOBLET);
-}
-
-void Scene105::enter() {
-	_globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('x', 0));
-	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('x', 1));
-	_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('x', 2));
-	_globals._spriteIndexes[4] = _scene->_sprites.addSprites("*KGRD_8");
-
-	_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 7, 0);
-	_globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 7, 0, 3);
-
-	_maidHotspotId1 = _scene->_dynamicHotspots.add(NOUN_SCULLERY_MAID, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(189, 123, 189 + 25, 123 + 11));
-	_scene->_dynamicHotspots.setPosition(_maidHotspotId1, Common::Point(174, 151), FACING_NORTHEAST);
-	_scene->_dynamicHotspots[_maidHotspotId1]._articleNumber = PREP_ON;
-
-	_maidHotspotId2 = _scene->_dynamicHotspots.add(NOUN_SCULLERY_MAID, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(189, 134, 189 + 38, 134 + 9));
-	_scene->_dynamicHotspots.setPosition(_maidHotspotId2, Common::Point(174, 151), FACING_NORTHEAST);
-	_scene->_dynamicHotspots[_maidHotspotId2]._articleNumber = PREP_ON;
-
-	_bucketHotspotId = _scene->_dynamicHotspots.add(NOUN_BUCKET, VERB_WALK_TO, SYNTAX_SINGULAR, EXT_NONE, Common::Rect(176, 137, 176 + 10, 137 + 8));
-	_scene->_dynamicHotspots.setPosition(_bucketHotspotId, Common::Point(174, 151), FACING_NORTHEAST);
-
-	if (_game._objects.isInRoom(OBJ_GOBLET)) {
-		_globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('p', 1));
-		_globals._spriteIndexes[8] = _scene->_sprites.addSprites("*KGRM_6");
-		_globals._sequenceIndexes[5] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[5], false, -1);
-		_gobletHotspotId = _scene->_dynamicHotspots.add(NOUN_GOBLET, VERB_WALK_TO, SYNTAX_SINGULAR, _globals._sequenceIndexes[5], Common::Rect(0, 0, 0, 0));
-		_scene->_sequences.setDepth(_globals._sequenceIndexes[5], 6);
-		_scene->_dynamicHotspots.setPosition(_gobletHotspotId, Common::Point(63, 142), FACING_WEST);
-	}
-
-	if (_game._objects.isInRoom(OBJ_BONE)) {
-		_globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('p', 0));
-		_globals._spriteIndexes[7] = _scene->_sprites.addSprites("*KGRL_6");
-		_globals._sequenceIndexes[6] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[6], false, -1);
-		_boneHotspotId = _scene->_dynamicHotspots.add(NOUN_BONE, VERB_WALK_TO, SYNTAX_SINGULAR, _globals._sequenceIndexes[6], Common::Rect(0, 0, 0, 0));
-		_scene->_sequences.setDepth(_globals._sequenceIndexes[6], 6);
-		_scene->_dynamicHotspots.setPosition(_boneHotspotId, Common::Point(255, 145), FACING_EAST);
-	}
-
-	_vm->_gameConv->load(2);
-	_newStatus = 1;
-	_previousStatus = 0;
-	_maidTalkingFl = false;
-	_sitUpFl = false;
-	_goodNumberFl = false;
-	_globals._animationIndexes[0] = _scene->loadAnimation(formAnimName('A',-1), 1);
-
-
-	if (_scene->_priorSceneId == 106) {
-		_game._player._playerPos = Common::Point(104, 152);
-		_game._player._facing = FACING_NORTHEAST;
-		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, -1);
-		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 12);
-	} else if (_scene->_priorSceneId != RETURNING_FROM_LOADING) {
-		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, 6);
-		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 12);
-		_game._player.firstWalk(Common::Point(120, 96), FACING_SOUTH, Common::Point(117, 108), FACING_SOUTH, false);
-		_game._player.setWalkTrigger(70);
-	} else {
-		_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, -1);
-		_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 15);
-	}
-
-	sceneEntrySound();
-}
-
-void Scene105::step() {
-	if (_scene->_animation[_globals._animationIndexes[0]]) {
-		if (_scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame() != _maidFrame) {
-			_maidFrame = _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame();
-			int resetFrame = -1;
-
-			if (_sitUpFl && !_maidTalkingFl) {
-				_previousStatus = _newStatus;
-				_newStatus = 4;
-			}
-
-			if (_maidTalkingFl) {
-				_previousStatus = _newStatus;
-				_newStatus = 5;
-			}
-
-			switch (_maidFrame) {
-			case 16:
-				if (_newStatus == 1) {
-					_goodNumberFl = false;
-					while (!_goodNumberFl)
-						setRandomStatus();
-				}
-
-				if (_newStatus == 1)
-					resetFrame = 1;
-				else if ((_newStatus == 3 && !_sitUpFl) || _newStatus == 4)
-					resetFrame = 53;
-				else if ((_newStatus == 3) && (_sitUpFl))
-					resetFrame = 24;
-				break;
-
-			case 24:
-				if (_newStatus == 2) {
-					_goodNumberFl = false;
-					while (!_goodNumberFl)
-						setRandomStatus();
-				}
-
-				if ((_newStatus == 3) || (_newStatus == 5))
-					resetFrame = 53;
-				else if (_newStatus == 1)
-					resetFrame = 56;
-				else if (_newStatus == 4)
-					resetFrame = 53;
-
-				break;
-
-			case 32:
-				if (_newStatus == 3) {
-					_goodNumberFl = false;
-					while (!_goodNumberFl)
-						setRandomStatus();
-				}
-
-				if ((_newStatus == 1) || (_newStatus == 2))
-					resetFrame = 57;
-				else if (_newStatus == 4)
-					resetFrame = 55;
-				break;
-
-			case 53:
-				_maidTalkingFl = false;
-				_goodNumberFl = false;
-				while (!_goodNumberFl)
-					setRandomStatus();
-
-				if (_newStatus == 1)
-					resetFrame = 60;
-				else if (_newStatus == 2)
-					resetFrame = 57;
-				else if (_newStatus == 3)
-					resetFrame = 63;
-				else if (_newStatus == 4)
-					resetFrame = 55;
-				break;
-
-			case 56:
-				if (_newStatus == 4) {
-					_goodNumberFl = false;
-					while (!_goodNumberFl)
-						setRandomWipebrow();
-				}
-
-				if (_newStatus == 4)
-					resetFrame = 55;
-				else if (_newStatus == 5)
-					resetFrame = 32;
-				else if (_newStatus == 3)
-					resetFrame = 24;
-				break;
-
-			case 57:
-				if (_newStatus == 1)
-					resetFrame = 1;
-				break;
-
-			case 60:
-				if (_newStatus == 1)
-					resetFrame = 1;
-				else if (_newStatus == 2)
-					resetFrame = 16;
-				break;
-
-			case 63:
-				if (_newStatus == 1)
-					resetFrame = 1;
-				break;
-
-			case 64:
-				resetFrame = 24;
-				break;
-
-			default:
-				break;
-			}
-
-			if ((resetFrame >= 0) && (resetFrame != _scene->_animation[_globals._animationIndexes[0]]->getCurrentFrame())) {
-				_scene->setAnimFrame(_globals._animationIndexes[0], resetFrame);
-				_maidFrame = resetFrame;
-			}
-		}
-	}
-
-	if (_game._trigger >= 70) {
-		switch (_game._trigger) {
-		case 70:
-			_scene->deleteSequence(_globals._sequenceIndexes[3]);
-			_vm->_sound->command(25);
-			_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 6, 1);
-			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 12);
-			_scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 5);
-			_scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 71);
-			break;
-
-		case 71: {
-			int seqIdx = _globals._sequenceIndexes[3];
-			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, -1);
-			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 15);
-			_game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[3], SYNC_SEQ, seqIdx);
-			_game._player._stepEnabled = true;
-			}
-			break;
-
-		default:
-			break;
-		}
-	}
-}
-
-void Scene105::actions() {
-	if (_action._lookFlag) {
-		_vm->_dialogs->show(10501);
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_vm->_gameConv->activeConvId() == 2) {
-		handleConversation();
-		_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)) {
-		switch (_game._trigger) {
-		case 0:
-			_game._player._stepEnabled = false;
-			_game._player._visible = false;
-			_globals._sequenceIndexes[4] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[4], false, 8, 2);
-			_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[4],true);
-			_scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_SPRITE, 2, 1);
-			_scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
-			break;
-
-		case 1:
-			_scene->deleteSequence(_globals._sequenceIndexes[3]);
-			_vm->_sound->command(24);
-			_globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 6, 1);
-			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 12);
-			_scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
-			break;
-
-		case 2: {
-			int seqIdx = _globals._sequenceIndexes[3];
-			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, -2);
-			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 12);
-			_game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[3], SYNC_SEQ, seqIdx);
-			}
-			break;
-
-		case 3:
-			_game._player._visible = true;
-			_game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[4]);
-			_scene->_sequences.addTimer(1,4);
-			break;
-
-		case 4:
-			_game._player.walk(Common::Point(120, 96), FACING_NORTH);
-			_game._player.setWalkTrigger(5);
-			break;
-
-		case 5:
-			_scene->deleteSequence(_globals._sequenceIndexes[3]);
-			_vm->_sound->command(25);
-			_globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 7, 1);
-			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 1);
-			_scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 6);
-			break;
-
-		case 6: {
-			int seqIdx = _globals._sequenceIndexes[3];
-			_globals._sequenceIndexes[3] = _scene->_sequences.addStampCycle(_globals._spriteIndexes[3], false, -1);
-			_scene->_sequences.setDepth(_globals._sequenceIndexes[3], 1);
-			_game.syncTimers(SYNC_SEQ, _globals._sequenceIndexes[3], SYNC_SEQ, seqIdx);
-			_scene->_sequences.addTimer(6, 7);
-			}
-			break;
-
-		case 7:
-			_scene->_nextSceneId = 103;
-			break;
-
-		default:
-			break;
-		}
-		_action._inProgress = false;
-		return;
-	}
-
-	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)) {
-		_scene->_nextSceneId = 106;
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action.isAction(VERB_TALK_TO, NOUN_SCULLERY_MAID)) {
-		_vm->_gameConv->run(2);
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action.isAction(VERB_TAKE, NOUN_GOBLET)) {
-		if (_game._trigger || !_game._objects.isInInventory(OBJ_GOBLET)) {
-			switch (_game._trigger) {
-			case 0:
-				_game._player._stepEnabled = false;
-				_game._player._visible = false;
-				_globals._sequenceIndexes[8] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[8], true, 6, 2);
-				_scene->_sequences.setAnimRange (_globals._sequenceIndexes[8], 1, 7);
-				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[8], true);
-				_scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_SPRITE, 7, 1);
-				_scene->_sequences.addSubEntry(_globals._sequenceIndexes[8], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
-				break;
-
-			case 1:
-				_scene->deleteSequence (_globals._sequenceIndexes[5]);
-				_scene->_dynamicHotspots.remove(_gobletHotspotId);
-				_vm->_sound->command(26);
-				_game._objects.addToInventory(OBJ_GOBLET);
-				_vm->_dialogs->showItem(OBJ_GOBLET, 10519, 0);
-				break;
-
-			case 2:
-				_game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[8]);
-				_globals[kPlayerScore] += 1;
-				_game._player._visible = true;
-				_game._player._stepEnabled = true;
-				break;
-
-			default:
-				break;
-			}
-			_action._inProgress = false;
-			return;
-		}
-	}
-
-	if (_action.isAction(VERB_TAKE, NOUN_BONE) && _action._mainObjectSource == CAT_HOTSPOT) {
-		if (_game._trigger || !_game._objects.isInInventory(OBJ_BONE)) {
-			switch (_game._trigger) {
-			case 0:
-				_game._player._stepEnabled = false;
-				_game._player._visible = false;
-				_globals._sequenceIndexes[7] = _scene->_sequences.startPingPongCycle(_globals._spriteIndexes[7], false, 6, 2);
-				_scene->_sequences.setSeqPlayer(_globals._sequenceIndexes[7], true);
-				_scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_SPRITE, 6, 1);
-				_scene->_sequences.addSubEntry(_globals._sequenceIndexes[7], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
-				break;
-
-			case 1:
-				_scene->deleteSequence (_globals._sequenceIndexes[6]);
-				_vm->_sound->command(26);
-				_scene->_dynamicHotspots.remove(_boneHotspotId);
-				_game._objects.addToInventory(OBJ_BONE);
-				_vm->_dialogs->showItem(OBJ_BONE, 10520, 0);
-				break;
-
-			case 2:
-				_game.syncTimers(SYNC_PLAYER, 0, SYNC_SEQ, _globals._sequenceIndexes[7]);
-				if (!(_globals[kPlayerScoreFlags] & 2048)) {
-					_globals[kPlayerScoreFlags] |= 2048;
-					_globals[kPlayerScore] += 1;
-				}
-				_game._player._visible = true;
-				_game._player._stepEnabled = true;
-				break;
-
-			default:
-				break;
-			}
-			_action._inProgress = false;
-			return;
-		}
-	}
-
-	if (_action.isAction(VERB_TAKE, NOUN_BONE) && _game._objects.isInInventory(OBJ_BONE) && (_action._mainObjectSource == CAT_HOTSPOT)) {
-		_vm->_dialogs->show(40112);
-		_action._inProgress = false;
-		return;
-	}
-
-	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
-
-		if (_action.isObject(NOUN_FLOOR)) {
-			_vm->_dialogs->show(10502);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_BRAZIER)) {
-			_vm->_dialogs->show(10503);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_DINING_TABLE)) {
-			if (_scene->_customDest.x <= 98) {
-				if (_game._objects[OBJ_GOBLET]._roomNumber == _scene->_currentSceneId)
-					_vm->_dialogs->show(10505);
-				else
-					_vm->_dialogs->show(10522);
-			} else
-				_vm->_dialogs->show(10504);
-
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_CHAIR)) {
-			_vm->_dialogs->show(10507);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_WINDOW)) {
-			_vm->_dialogs->show(10508);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_TAPESTRY)) {
-			_vm->_dialogs->show(10509);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_DOOR_TO_THRONE_ROOM)) {
-			_vm->_dialogs->show(10511);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_WALL)) {
-			_vm->_dialogs->show(10512);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_DOOR_TO_HALLWAY)) {
-			_vm->_dialogs->show(10513);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_DIVIDING_WALL)) {
-			_vm->_dialogs->show(10514);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_CEILING)) {
-			_vm->_dialogs->show(10515);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_SCULLERY_MAID)) {
-			_vm->_dialogs->show(10516);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_GOBLET) && _game._objects.isInRoom(OBJ_GOBLET)) {
-			_vm->_dialogs->show(10517);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_BONE) && _game._objects.isInRoom(OBJ_BONE)) {
-			_vm->_dialogs->show(10518);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_SCONCE)) {
-			_vm->_dialogs->show(10524);
-			_action._inProgress = false;
-			return;
-		}
-
-		if (_action.isObject(NOUN_BUCKET)) {
-			_vm->_dialogs->show(10521);
-			_action._inProgress = false;
-			return;
-		}
-	}
-
-	if (_action.isAction(VERB_TAKE, NOUN_SCULLERY_MAID)) {
-		_vm->_dialogs->show(30);
-		_action._inProgress = false;
-		return;
-	}
-
-	if ((_action.isAction(VERB_PUSH) || _action.isAction(VERB_PULL)) && _action.isObject(NOUN_DINING_TABLE)) {
-		_vm->_dialogs->show(10506);
-		_action._inProgress = false;
-		return;
-	}
-
-	if ((_action.isAction(VERB_PUSH) || _action.isAction(VERB_PULL)) && _action.isObject(NOUN_TAPESTRY)) {
-		_vm->_dialogs->show(10510);
-		_action._inProgress = false;
-		return;
-	}
-}
-
-void Scene105::preActions() {
-	if (_action.isAction(VERB_TALK_TO, NOUN_SCULLERY_MAID))
-		_sitUpFl = true;
-}
-
-void Scene105::setRandomStatus() {
-	_previousStatus = _newStatus;
-	int rndVal = _vm->getRandomNumber(1, 30);
-	if (rndVal < 20) {
-		_newStatus = 1;
-		_goodNumberFl = true;
-	} else if ((rndVal > 19) && (rndVal < 27) && (_previousStatus != 2)) {
-		_newStatus = 2;
-		_goodNumberFl = true;
-	} else if (_previousStatus != 3) {
-		_newStatus = 3;
-		_goodNumberFl = true;
-	}
-}
-
-void Scene105::setRandomWipebrow() {
-	_previousStatus = _newStatus;
-
-	if (_vm->getRandomNumber(1, 100) < 100) {
-		_newStatus = 4;
-		_goodNumberFl = true;
-	} else if (_previousStatus != 3) {
-		_newStatus = 3;
-		_goodNumberFl = true;
-	}
-}
-
-void Scene105::handleConversation() {
-	if ((_action._activeAction._verbId == 0) && !_sitUpFl)
-		_sitUpFl = true;
-
-	if ((_action._activeAction._verbId == 1) || (_action._activeAction._verbId == 2)) {
-		switch (_game._trigger) {
-		case 0:
-			_vm->_gameConv->setInterlocutorTrigger(1);
-			break;
-
-		case 1:
-			_maidTalkingFl = true;
-			_sitUpFl = false;
-			_vm->_gameConv->setHeroTrigger(2);
-			break;
-
-		case 2:
-			_maidTalkingFl = false;
-			break;
-
-		default:
-			break;
-		}
-	}
-}
-
-/*------------------------------------------------------------------------*/
-
-} // namespace Dragonsphere
-} // namespace MADS
diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.h b/engines/mads/dragonsphere/dragonsphere_scenes1.h
deleted file mode 100644
index f31e0df28c5..00000000000
--- a/engines/mads/dragonsphere/dragonsphere_scenes1.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef MADS_DRAGON_SCENES1_H
-#define MADS_DRAGON_SCENES1_H
-
-#include "common/serializer.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(RexNebularEngine *vm) : DragonsphereScene(vm) {}
-};
-
-class Scene101 : public Scene1xx {
-public:
-	Scene101(RexNebularEngine *vm);
-	void synchronize(Common::Serializer &s) override;
-
-	void setup() override;
-	void enter() override;
-	void step() override;
-	void preActions() override;
-	void actions() override;
-};
-
-class Scene102 : public Scene1xx {
-private:
-	int _diaryHotspotIdx1;
-	int _diaryHotspotIdx2;
-	int _diaryFrame;
-	int _animRunning;
-
-public:
-	Scene102(RexNebularEngine *vm);
-	void synchronize(Common::Serializer &s) override;
-
-	void setup() override;
-	void enter() override;
-	void step() override;
-	void preActions() override;
-	void actions() override;
-};
-
-class Scene103 : public Scene1xx {
-public:
-	Scene103(RexNebularEngine *vm);
-	void synchronize(Common::Serializer &s) override;
-
-	void setup() override;
-	void enter() override;
-	void step() override;
-	void preActions() override;
-	void actions() override;
-};
-
-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;
-	int _animationRunning;
-	int _deathTimer;
-	int _deathFrame;
-	int _doorwayHotspotId;
-
-	int _kingStatus;
-	int _kingFrame;
-	int _kingCount;
-	int _queenStatus;
-	int _queenFrame;
-	int _queenCount;
-	int _pidStatus;
-	int _pidFrame;
-	int _pidCount;
-	int _macStatus;
-	int _macFrame;
-	int _macCount;
-	int _twinklesStatus;
-	int _twinklesFrame;
-	int _twinklesCount;
-	int _tapestryFrame;
-
-	int32 _clock;
-
-	void handleFinalConversation();
-	void handleKingAnimation();
-	void handleMacAnimation1();
-	void handleMacAnimation2();
-	void handleQueenAnimation();
-	void handleTwinklesAnimation();
-	void handleDeathAnimation();
-	void handlePidAnimation();
-
-public:
-	Scene104(RexNebularEngine *vm);
-	void synchronize(Common::Serializer &s) override;
-
-	void setup() override;
-	void enter() override;
-	void step() override;
-	void preActions() override;
-	void actions() override;
-};
-
-class Scene105 : public Scene1xx {
-private:
-	bool _maidTalkingFl;
-	bool _sitUpFl;
-	bool _goodNumberFl;
-
-	int _maidFrame;
-	int _maidHotspotId1;
-	int _maidHotspotId2;
-	int _newStatus;
-	int _previousStatus;
-	int _bucketHotspotId;
-	int _boneHotspotId;
-	int _gobletHotspotId;
-
-	void setRandomStatus();
-	void setRandomWipebrow();
-	void handleConversation();
-
-public:
-	Scene105(RexNebularEngine *vm);
-	void synchronize(Common::Serializer &s) override;
-
-	void setup() override;
-	void enter() override;
-	void step() override;
-	void preActions() override;
-	void actions() override;
-};
-
-} // namespace Dragonsphere
-} // namespace MADS
-
-#endif
diff --git a/engines/mads/dragonsphere/game_dragonsphere.cpp b/engines/mads/dragonsphere/game_dragonsphere.cpp
deleted file mode 100644
index e41d122b46a..00000000000
--- a/engines/mads/dragonsphere/game_dragonsphere.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/config-manager.h"
-#include "mads/nebular/nebular.h"
-#include "mads/core/game.h"
-#include "mads/core/screen.h"
-#include "mads/core/msurface.h"
-#include "mads/dragonsphere/game_dragonsphere.h"
-//#include "mads/nebular/dialogs_nebular.h"
-#include "mads/dragonsphere/globals_dragonsphere.h"
-#include "mads/dragonsphere/dragonsphere_scenes.h"
-
-namespace MADS {
-namespace Dragonsphere {
-
-GameDragonsphere::GameDragonsphere(RexNebularEngine *vm)
-	: Game(vm) {
-	_surface = new MSurface(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
-	_storyMode = STORYMODE_NAUGHTY;
-}
-
-void GameDragonsphere::startGame() {
-	_scene._priorSceneId = 0;
-	_scene._currentSceneId = -1;
-	_scene._nextSceneId = 101;
-
-	initializeGlobals();
-}
-
-void GameDragonsphere::initializeGlobals() {
-	//int count, count2;
-	//int bad;
-
-	_globals.reset();
-	//_globals[kTalkInanimateCount] = 8;
-
-	/* Section #1 variables */
-	// TODO
-
-	/* Section #2 variables */
-	// TODO
-
-	/* Section #3 variables */
-	// TODO
-
-	/* Section #4 variables */
-	// TODO
-
-	/* Section #5 variables */
-	// TODO
-
-	/* Section #6 variables */
-	// TODO
-
-	/* Section #9 variables */
-	// TODO
-
-	_player._facing = FACING_NORTH;
-	_player._turnToFacing = FACING_NORTH;
-
-	//Player::preloadSequences("RXM", 1);
-	//Player::preloadSequences("ROX", 1);
-}
-
-void GameDragonsphere::setSectionHandler() {
-	delete _sectionHandler;
-
-	switch (_sectionNumber) {
-	case 1:
-		_sectionHandler = new Section1Handler(_vm);
-		break;
-	case 2:
-		_sectionHandler = new Section2Handler(_vm);
-		break;
-	case 3:
-		_sectionHandler = new Section3Handler(_vm);
-		break;
-	case 4:
-		_sectionHandler = new Section4Handler(_vm);
-		break;
-	case 5:
-		_sectionHandler = new Section5Handler(_vm);
-		break;
-	case 6:
-		_sectionHandler = new Section6Handler(_vm);
-		break;
-	case 7:
-		_sectionHandler = new Section7Handler(_vm);
-		break;
-	case 8:
-		_sectionHandler = new Section8Handler(_vm);
-		break;
-	default:
-		break;
-	}
-}
-
-void GameDragonsphere::checkShowDialog() {
-	// TODO: Copied from Nebular
-	if (_vm->_dialogs->_pendingDialog && _player._stepEnabled && !_globals[5]) {
-		_player.releasePlayerSprites();
-		_vm->_dialogs->showDialog();
-		_vm->_dialogs->_pendingDialog = DIALOG_NONE;
-	}
-}
-
-void GameDragonsphere::doObjectAction() {
-	// TODO: Copied from Nebular
-	//Scene &scene = _scene;
-	MADSAction &action = _scene._action;
-	//Dialogs &dialogs = *_vm->_dialogs;
-	//int id;
-
-	action._inProgress = false;
-}
-
-void GameDragonsphere::unhandledAction() {
-	// TODO
-}
-
-void GameDragonsphere::step() {
-	if (_player._visible && _player._stepEnabled && !_player._moving &&
-		(_player._facing == _player._turnToFacing)) {
-
-		// TODO
-	}
-
-}
-
-void GameDragonsphere::synchronize(Common::Serializer &s, bool phase1) {
-	Game::synchronize(s, phase1);
-
-	// TODO: Copied from Nebular
-	if (!phase1) {
-		_globals.synchronize(s);
-	}
-}
-
-} // namespace Dragonsphere
-} // namespace MADS
diff --git a/engines/mads/dragonsphere/game_dragonsphere.h b/engines/mads/dragonsphere/game_dragonsphere.h
deleted file mode 100644
index 83cc23b33c8..00000000000
--- a/engines/mads/dragonsphere/game_dragonsphere.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef MADS_GAME_DRAGONSPHERE_H
-#define MADS_GAME_DRAGONSPHERE_H
-
-#include "mads/core/game.h"
-#include "mads/core/globals.h"
-#include "mads/dragonsphere/globals_dragonsphere.h"
-
-namespace MADS {
-namespace Dragonsphere {
-
-// TODO: Adapt for Dragonsphere's difficulty setting
-enum StoryMode { STORYMODE_NAUGHTY = 1, STORYMODE_NICE = 2 };
-
-enum InventoryObject {
-	OBJ_NONE = -1,
-	OBJ_SIGNET_RING = 0,
-	OBJ_BIRD_FIGURINE = 1,
-	OBJ_BIRDCALL = 2,
-	OBJ_SHIELDSTONE = 3,
-	OBJ_SWORD = 4,
-	OBJ_GOBLET = 5,
-	OBJ_BONE = 6,
-	OBJ_FRUIT = 7,
-	OBJ_DOLL = 8,
-	OBJ_POLYSTONE = 9,
-	OBJ_RED_STONE = 10,
-	OBJ_YELLOW_STONE = 11,
-	OBJ_BLUE_STONE = 12,
-	OBJ_KEY_CROWN = 13,
-	OBJ_DATES = 14,
-	OBJ_STATUE = 15,
-	OBJ_FLIES = 16,
-	OBJ_SOUL_EGG = 17,
-	OBJ_MAGIC_BELT = 18,
-	OBJ_AMULET = 19,
-	OBJ_MUD = 20,
-	OBJ_FEATHERS = 21,
-	OBJ_TORCH = 22,
-	OBJ_FLASK = 23,
-	OBJ_FLASK_OF_ACID = 24,
-	OBJ_ROPE = 25,
-	OBJ_VORTEX_STONE = 26,
-	OBJ_DEAD_RAT = 27,
-	OBJ_MAP = 28,
-	OBJ_CRYSTAL_BALL = 29,
-	OBJ_BLACK_SPHERE = 30,
-	OBJ_SOPORIFIC = 31,
-	OBJ_SHIFTER_RING = 32,
-	OBJ_SPIRIT_BUNDLE = 33,
-	OBJ_PARTIAL_BUNDLE = 34,
-	OBJ_RATSICLE = 35,
-	OBJ_TENTACLE_PARTS = 36,
-	OBJ_TELEPORT_DOOR = 37,
-	OBJ_RARE_COIN = 38,
-	OBJ_CRYSTAL_FLOWER = 39,
-	OBJ_DIAMOND_DUST = 40,
-	OBJ_RUBY_RING = 41,
-	OBJ_GOLD_NUGGET = 42,
-	OBJ_MAGIC_MUSIC_BOX = 43,
-	OBJ_EMERALD = 44,
-	OBJ_PARCHMENT = 45,
-	OBJ_GAME = 46,
-	OBJ_GAME2 = 47,
-	OBJ_NEW_BUNDLE = 48
-};
-
-class GameDragonsphere : public Game {
-	friend class Game;
-protected:
-	GameDragonsphere(RexNebularEngine *vm);
-
-	void startGame() override;
-
-	void initializeGlobals() override;
-
-	void setSectionHandler() override;
-
-	void checkShowDialog() override;
-public:
-	DragonsphereGlobals _globals;
-	StoryMode _storyMode;
-
-	Globals &globals() override { return _globals; }
-
-	void doObjectAction() override;
-
-	void unhandledAction() override;
-
-	void step() override;
-
-	void synchronize(Common::Serializer &s, bool phase1) override;
-};
-
-
-class Section1Handler : public SectionHandler {
-public:
-	Section1Handler(RexNebularEngine *vm) : SectionHandler(vm) {}
-
-	// TODO: Properly implement handler methods
-	void preLoadSection() override {}
-	void sectionPtr2() override {}
-	void postLoadSection() override {}
-};
-
-// TODO: Properly implement handler classes
-typedef Section1Handler Section2Handler;
-typedef Section1Handler Section3Handler;
-typedef Section1Handler Section4Handler;
-typedef Section1Handler Section5Handler;
-typedef Section1Handler Section6Handler;
-typedef Section1Handler Section7Handler;
-typedef Section1Handler Section8Handler;
-
-} // namespace Dragonsphere
-} // namespace MADS
-
-#endif
diff --git a/engines/mads/dragonsphere/globals_dragonsphere.h b/engines/mads/dragonsphere/globals_dragonsphere.h
deleted file mode 100644
index 4d99cc25363..00000000000
--- a/engines/mads/dragonsphere/globals_dragonsphere.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/* 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef MADS_GLOBALS_DRAGONSPHERE_H
-#define MADS_GLOBALS_DRAGONSPHERE_H
-
-#include "mads/core/game.h"
-#include "mads/core/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);
-};
-
-} // namespace Dragonsphere
-} // namespace MADS
-
-#endif
diff --git a/engines/mads/madsv2/dragonsphere/dragonsphere.cpp b/engines/mads/madsv2/dragonsphere/dragonsphere.cpp
new file mode 100644
index 00000000000..c179abdcefb
--- /dev/null
+++ b/engines/mads/madsv2/dragonsphere/dragonsphere.cpp
@@ -0,0 +1,175 @@
+/* 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 3 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, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "engines/util.h"
+#include "mads/madsv2/console.h"
+#include "mads/madsv2/dragonsphere/dragonsphere.h"
+#include "mads/madsv2/core/game.h"
+#include "mads/madsv2/core/imath.h"
+#include "mads/madsv2/core/kernel.h"
+#include "mads/madsv2/core/screen.h"
+
+namespace MADS {
+namespace MADSV2 {
+namespace Dragonsphere {
+
+Common::Error DragonsphereEngine::run() {
+	initGraphics(320, 200);
+	_screen = new Graphics::Screen();
+	scr_live.data = (byte *)_screen->getPixels();
+
+	// Create a debugger console
+	setDebugger(new Console());
+
+	// Set up sound manager
+	_soundManager = nullptr; // new DragonsphereSoundManager(_mixer, _soundFlag);
+	//_soundManager->validate();
+
+	// Run the game
+	// TODO
+
+	return Common::kNoError;
+}
+
+void DragonsphereEngine::global_init_code() {
+
+}
+
+void DragonsphereEngine::section_music(int section_num) {
+
+}
+
+void DragonsphereEngine::global_object_sprite() {
+
+}
+
+void DragonsphereEngine::stop_walker_basic() {
+	int random;
+	int count;
+	int how_many;
+
+	random = imath_random(1, 30000);
+
+	switch (player.facing) {
+	case FACING_SOUTH:
+		if (random < 500) {
+			how_many = imath_random(4, 10);
+			for (count = 0; count < how_many; count++) {
+				player_add_stop_walker((random < 250) ? 1 : 2, 0);
+			}
+		} else if (random < 750) {
+			for (count = 0; count < 4; count++) {
+				player_add_stop_walker(1, 0);
+			}
+
+			player_add_stop_walker(0, 0);
+
+			for (count = 0; count < 4; count++) {
+				player_add_stop_walker(2, 0);
+			}
+
+			player_add_stop_walker(0, 0);
+		}
+		break;
+
+	case FACING_SOUTHEAST:
+	case FACING_SOUTHWEST:
+	case FACING_NORTHEAST:
+	case FACING_NORTHWEST:
+		if (random < 150) {
+			player_add_stop_walker(-1, 0);
+			player_add_stop_walker(1, 0);
+			for (count = 0; count < 6; count++) {
+				player_add_stop_walker(0, 0);
+			}
+		}
+		break;
+
+	case FACING_EAST:
+	case FACING_WEST:
+		if (random < 250) {
+			player_add_stop_walker(-1, 0);
+			how_many = imath_random(2, 6);
+			for (count = 0; count < how_many; count++) {
+				player_add_stop_walker(2, 0);
+			}
+			player_add_stop_walker(1, 0);
+			player_add_stop_walker(0, 0);
+			player_add_stop_walker(0, 0);
+		} else if (random < 500) {
+			WRITE_LE_UINT32(&global[walker_timing], kernel.clock);
+		}
+		break;
+
+	case FACING_NORTH:
+		if (random < 250) {
+			player_add_stop_walker(-1, 0);
+			how_many = imath_random(3, 7);
+			for (count = 0; count < how_many; count++) {
+				player_add_stop_walker(2, 0);
+			}
+			player_add_stop_walker(1, 0);
+			player_add_stop_walker(0, 0);
+		}
+		break;
+
+	}
+}
+
+void DragonsphereEngine::stop_walker_tricks() {
+
+}
+
+void DragonsphereEngine::global_section_constructor() {
+
+}
+
+void DragonsphereEngine::syncRoom(Common::Serializer &s) {
+
+}
+
+void DragonsphereEngine::global_daemon_code() {
+
+}
+
+void DragonsphereEngine::global_pre_parser_code() {
+
+}
+
+void DragonsphereEngine::global_parser_code() {
+
+}
+
+void DragonsphereEngine::global_error_code() {
+
+}
+
+void DragonsphereEngine::global_room_init() {
+
+}
+
+void DragonsphereEngine::global_sound_driver() {
+
+}
+
+} // namespace Dragonsphere
+} // namespace MADSV2
+} // namespace MADS
diff --git a/engines/mads/dragonsphere/globals_dragonsphere.cpp b/engines/mads/madsv2/dragonsphere/dragonsphere.h
similarity index 52%
rename from engines/mads/dragonsphere/globals_dragonsphere.cpp
rename to engines/mads/madsv2/dragonsphere/dragonsphere.h
index 69523247d75..5a9233b2a23 100644
--- a/engines/mads/dragonsphere/globals_dragonsphere.cpp
+++ b/engines/mads/madsv2/dragonsphere/dragonsphere.h
@@ -19,27 +19,42 @@
  *
  */
 
-#include "mads/dragonsphere/globals_dragonsphere.h"
+#ifndef MADS_DRAGONSPHERE_H
+#define MADS_DRAGONSPHERE_H
+
+#include "mads/madsv2/engine.h"
 
 namespace MADS {
+namespace MADSV2 {
 namespace Dragonsphere {
 
-DragonsphereGlobals::DragonsphereGlobals()
-	: Globals() {
-	// Initialize lists
-	resize(140);
-	_spriteIndexes.resize(30);
-	_sequenceIndexes.resize(30);
-	_animationIndexes.resize(30);
-}
+class DragonsphereEngine : public MADSV2Engine {
+private:
+	static void global_object_sprite();
+	static void stop_walker_basic();
+	static void stop_walker_tricks();
+
+public:
+	DragonsphereEngine(OSystem *syst, const MADSGameDescription *gameDesc) :
+		MADSV2Engine(syst, gameDesc) {}
+	~DragonsphereEngine() override {}
 
-void DragonsphereGlobals::synchronize(Common::Serializer &s) {
-	Globals::synchronize(s);
+	Common::Error run() override;
+	void syncRoom(Common::Serializer &s) override;
 
-	_spriteIndexes.synchronize(s);
-	_sequenceIndexes.synchronize(s);
-	_animationIndexes.synchronize(s);
-}
+	void global_init_code() override;
+	void section_music(int section_num) override;
+	void global_section_constructor() override;
+	void global_daemon_code() override;
+	void global_pre_parser_code() override;
+	void global_parser_code() override;
+	void global_error_code() override;
+	void global_room_init() override;
+	void global_sound_driver() override;
+};
 
 } // namespace Dragonsphere
+} // namespace MADSV2
 } // namespace MADS
+
+#endif
diff --git a/engines/mads/metaengine.cpp b/engines/mads/metaengine.cpp
index f4e44fa2153..f358e3c348f 100644
--- a/engines/mads/metaengine.cpp
+++ b/engines/mads/metaengine.cpp
@@ -41,6 +41,7 @@
 #include "mads/detection.h"
 #ifdef ENABLE_MADSV2
 #include "mads/madsv2/phantom/phantom.h"
+#include "mads/madsv2/dragonsphere/dragonsphere.h"
 #include "mads/madsv2/forest/forest.h"
 #endif
 
@@ -221,6 +222,8 @@ Common::Error MADSMetaEngine::createInstance(OSystem *syst, Engine **engine, con
 		*engine = new MADS::MADSV2::Phantom::PhantomEngine(syst, desc);
 	else if (desc->gameID == MADS::GType_Forest)
 		*engine = new MADS::MADSV2::Forest::ForestEngine(syst, desc);
+	else if (desc->gameID == MADS::GType_Dragonsphere)
+		*engine = new MADS::MADSV2::Dragonsphere::DragonsphereEngine(syst, desc);
 	else
 #endif
 
diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index 1f6715cbad8..b0ef72533bf 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -54,10 +54,6 @@ MODULE_OBJS := \
 
 ifdef ENABLE_MADSV2
 MODULE_OBJS += \
-	dragonsphere/game_dragonsphere.o \
-	dragonsphere/dragonsphere_scenes.o \
-	dragonsphere/dragonsphere_scenes1.o \
-	dragonsphere/globals_dragonsphere.o \
 	madsv2/console.o \
 	madsv2/engine.o \
 	madsv2/core/anim.o \
@@ -179,6 +175,7 @@ MODULE_OBJS += \
 	madsv2/phantom/menus.o \
 	madsv2/phantom/main.o \
 	madsv2/phantom/sound_phantom.o \
+	madsv2/dragonsphere/dragonsphere.o \
 	madsv2/forest/forest.o
 endif
 


Commit: f535d1d9fccbd8f87d00db1c5f9342370b3e6c08
    https://github.com/scummvm/scummvm/commit/f535d1d9fccbd8f87d00db1c5f9342370b3e6c08
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-04-27T07:31:49+10:00

Commit Message:
MADS: DRAGONSPHERE: Added globals

Changed paths:
  A engines/mads/madsv2/dragonsphere/global.cpp
  A engines/mads/madsv2/dragonsphere/global.h
    engines/mads/module.mk


diff --git a/engines/mads/madsv2/dragonsphere/global.cpp b/engines/mads/madsv2/dragonsphere/global.cpp
new file mode 100644
index 00000000000..04b3d4f658e
--- /dev/null
+++ b/engines/mads/madsv2/dragonsphere/global.cpp
@@ -0,0 +1,90 @@
+/* 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 3 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, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "mads/madsv2/dragonsphere/global.h"
+#include "mads/madsv2/core/game.h"
+#include "mads/madsv2/core/kernel.h"
+#include "mads/madsv2/core/error.h"
+
+namespace MADS {
+namespace MADSV2 {
+namespace Dragonsphere {
+
+namespace Rooms {
+
+// Section preloads
+extern void section_1_preload();
+extern void section_2_preload();
+extern void section_3_preload();
+extern void section_4_preload();
+extern void section_5_preload();
+extern void section_6_preload();
+extern void section_9_preload();
+
+} // namespace Rooms
+
+void global_section_constructor() {
+	section_preload_code_pointer = NULL;
+	section_room_constructor = NULL;
+	section_init_code_pointer = NULL;
+	section_parser_code_pointer = NULL;
+	section_daemon_code_pointer = NULL;
+
+	room_preload_code_pointer = NULL;
+	room_init_code_pointer = NULL;
+	room_daemon_code_pointer = NULL;
+	room_pre_parser_code_pointer = NULL;
+	room_parser_code_pointer = NULL;
+	room_error_code_pointer = NULL;
+	room_shutdown_code_pointer = NULL;
+
+	switch (new_section) {
+	case 1:
+		section_preload_code_pointer = Rooms::section_1_preload;
+		break;
+	case 2:
+		section_preload_code_pointer = Rooms::section_2_preload;
+		break;
+	case 3:
+		section_preload_code_pointer = Rooms::section_3_preload;
+		break;
+	case 4:
+		section_preload_code_pointer = Rooms::section_4_preload;
+		break;
+	case 5:
+		section_preload_code_pointer = Rooms::section_5_preload;
+		break;
+	case 6:
+		section_preload_code_pointer = Rooms::section_5_preload;
+		break;
+	case 9:
+		section_preload_code_pointer = Rooms::section_9_preload;
+		break;
+	}
+}
+
+void sync_room(Common::Serializer &s) {
+	// TODO
+}
+
+} // namespace Dragonsphere
+} // namespace MADSV2
+} // namespace MADS
diff --git a/engines/mads/madsv2/dragonsphere/global.h b/engines/mads/madsv2/dragonsphere/global.h
new file mode 100644
index 00000000000..7305ef04046
--- /dev/null
+++ b/engines/mads/madsv2/dragonsphere/global.h
@@ -0,0 +1,272 @@
+/* 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 3 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, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef MADS_DRAGONSPHERE_GLOBAL_H
+#define MADS_DRAGONSPHERE_GLOBAL_H
+
+#include "common/serializer.h"
+#include "mads/madsv2/core/vocabh.h"
+
+namespace MADS {
+namespace MADSV2 {
+namespace Dragonsphere {
+
+enum {
+// -------------------- System variables ---------------------
+
+	walker_timing                   =   0,   // Stop walker timing (long)
+	walker_timing_2                 =   1,
+
+// ----------------- Global to all sections ------------------
+
+	player_persona                  =  10,  // Player is King or Pid
+	player_score                    =  11,  // player's score of the game
+	dragon_high_scene               =  12,  // Keeps track of which animation
+	dragon_my_scene                 =  13,  // to show in rm111 of cracking dragonsphere
+	no_load_walker                  =  14,  // if T, will not load walker in section code
+	player_score_flags              =  15,  // 16 flags for checking if player increased score
+	sorceror_defeated               =  16,  // T if you defeat the Sorceror
+	pre_room                        =  17,  // used in 120
+	perform_displacements           =  18,  // if T, will do displacements
+
+// ------------------- Section 1  20 - 39 --------------------
+
+	king_status                     =  20,  // If king captive or not
+	ward_status                     =  21,  // If ward is blocking emerald 
+	talked_to_soptus                =  22,  // T if talked to soptus in 110
+	talked_to_shifter               =  23,  // T if talked to shifter in 110
+	amulet_status                   =  24,  // status of amulet  
+	books_status                    =  25,  // status of books in rm104 part 1
+	tapestry_status                 =  26,  // status of tapestry in rm104 part 1  
+	talked_to_merchant              =  27,  // T if talked to merchant in 110
+	can_view_crown_hole             =  28,  // T if can view crown hole in secret door in 104
+	talked_to_status                =  29,  // point keeper for rm110 how many talked to
+	guard_pid_status                =  30,  // from rm112 actions, indicates whether or not to kill pid
+											// how many times she talks to him*/
+	crawled_out_of_bed_101          =  31,  // T if King got up from bed in opening scene
+	statue_is_on_stairway_114       =  32,  // T if status has been placed on stairway in 114
+	dog_is_asleep                   =  33,  // T if dog is asleep in 115
+	crystal_ball_dead               =  34,  // T if crystal ball has been used already
+	threw_bone                      =  35,  // T if Pid throw bone to dog
+	wooden_door_open                =  36,  // T if wooden door is open in 119
+	king_is_in_stairwell            =  37,  // T if king is in stairwell (119)
+	llanie_status                   =  38,  // Either BEFORE_FALL, SHE_FELL, or IS_SAVED
+	no_talk_to_guard                =  39,  // Temporary
+
+// ------------------- Section 2  40 - 59 --------------------
+
+	object_given_201                =  40,  // object king gave guards in 201 
+	king_got_stabbed                =  41,  // T if king got stabbed in 201
+	given_object_before             =  42,  // T if king gave object in 201 before
+	guards_are_asleep               =  43,  // T if guards in 201 are asleep from soporific
+	dome_up                         =  44,  // T if shield is over pool monster
+	talked_to_wise                  =  45,  // T if talked to wise shifter in 203
+	doll_given                      =  46,  // T if doll was given in cave of shifting dreams
+	reset_conv                      =  47,  // if T, will reset conv in 201 init
+	talked_to_greta                 =  48,  // T if talked to Greta in 206
+	slime_healed                    =  49,  // T if slime is healed in 205
+	dance_music_on                  =  50,  // T if belly dance music is on in 406
+	player_is_seal                  =  51,  // T if player is seal in 113
+	vines_have_player               =  52,  // T if vines have player in custody
+	end_of_game                     =  53,  // T if end of game
+	reset_conv_2                    =  54,  // if T, will reset conv in 201 init
+	invoked_from_111                =  55,  // T if invoked signet ring when room == 111
+
+// ------------------- Section 3  60 - 79 --------------------
+
+	save_wins_in_desert             =  60,   // save these variables incase pid dies in 406
+	bubbles_up_in_301               =  61,   // T if bubbles block maze entrance in 301
+	bubble_wont_attack              =  62,   // if T, bubble in 302 won't attack player
+	pid_looked_at_doll              =  63,   // T if pid looked at doll
+
+// ------------------- Section 4  80 - 99 --------------------
+
+	oasis                           =  80,   // The location of the oasis (1-36)
+	fire_holes                      =  81,   // The location of the fire holes (1-36)
+	desert_room                     =  82,   // The location (1-36) of player
+	from_direction                  =  83,   // Holds direction that he will come into room from
+	desert_counter                  =  84,   // number of moves across desert
+	move_direction_409              =  85,   // true if counting up, false if counting down
+	heal_verbs_visible              =  86,   // T if verbs for pid doll should be displayed
+	grapes_have_grown               =  87,   // holds status of grapes in 411
+	pid_talk_shamon                 =  88,   // T if pid talked to shamon
+	pid_just_died                   =  89,   // T if pid just got impaled by roc || drank shit in 406
+	grapes_are_dead                 =  90,   // T if grapes will not grow anymore
+	roc_is_chewing_dates            =  91,   // T if roc is chewing dates in 411
+	wins_in_desert                  =  92,   // # of wins in game
+	wins_till_prize                 =  93,   // # wins needed for prize
+	pid_has_been_healed_sop         =  94,   // T if pid drank soporific to be healed in 406
+	game_points                     =  95,   // used in co 40, 41
+	dance_points                    =  96,   // used in co 40, 41
+	clue_points                     =  97,   // used in co 40, 41
+	prizes_owed_to_player           =  98,   // ++'d in co 50 when player wins prize
+	object_flags                    =  99,   // bit flags for what objects pid has when enter tent 1st time
+
+// ------------------ Section 5  100 - 119 -------------------
+
+	waterfall_diverted              = 100,  // T if the waterfall has been diverted
+	shak_status                     = 101,  // Either SHAK_NEVER_MET or SHAK_MET
+	max_grid_value                  = 102,  // holds the position in the array of the last
+											// tower that Pid steps on in 510
+	move_direction_510				= 103,  // true if counting up, false if counting down
+	shak_506_angry					= 104,  // T if conv in 506 ended on angry note
+	monster_is_dead					= 105,  // T if cliff monster is dead (and now in 503)
+	done_talking_lani_502			= 106,  // T if talked to Llanie in 502
+	found_lani_504					= 107,  // T if we saw llanie in cave in 504
+	said_use_sword_shak				= 108,  // T if player tried to attack shak w/sword in 509
+	goblet_filled_soporific			= 109,  // T if goblet has been filled with soporific
+	been_in_504_as_pid				= 110,  // T if player has been in 504 as pid
+	seen_lani_dead_1st_time			= 111,  // T if player (king) has been in 504 after lani fell
+	said_poem_in_504				= 112,  // T if player said poem correctly in front of llanie in 504
+	tried_to_heal_llanie_504		= 113,  // T if player tried to heal llanie in 504
+	put_bundle_on_llanie_504		= 114,  // T if player put spirit or new bundle on dead llanie in 504
+	make_504_empty					= 115,  // T if nobody will be in room 504. Set to T in 120, 110, & 508
+	has_taken_mud					= 116,  // T if player has taken mud ever
+	platform_clicked_606			= 117,  // T if platform clicked in 606
+	had_spirit_bundle				= 118,  // T if player ever had spirit bundle (from 614)
+
+// ------------------ Section 6  120 - 139 -------------------
+
+	mud_is_in_eye_603               = 120,	// T if mud has been thrown in eye in 603
+	rope_is_alive                   = 121,	// T if rope is in snake form
+	rat_cage_is_open                = 122,	// T if rat has been let out in 605
+	flask_on_plate                  = 123,	// either NONE, YES_EMPTY, or YES_ACID
+	fluid_is_dripping               = 124,	// T if fluid is dripping onto hot plate in 605
+	hole_is_in_607                  = 125,	// T if a hole has been created on floor in 607  
+	rope_is_hanging_in_607          = 126,	// T if rope is hanging from ceiling in 607  
+	object_is_in_freezer_605        = 127,	// T if any object is in freezer
+	object_imitated                 = 128,	// holds number of object that polystone has imitated (a powerstone)
+	has_red                         = 129,	// T if player came into 614 with red powerstone
+	has_yellow                      = 130,	// T if player came into 614 with yellow powerstone
+	has_blue                        = 131,	// T if player came into 614 with blue powerstone
+	wizard_dead                     = 132,	// T if wizard is dead in 614
+	vine_will_grab                  = 133,	// if T, vine will grab king in 601
+	floor_is_cool                   = 134,	// T if floor in 613 has been cooled
+	rat_melted                      = 135,	// T if rat melted in 613
+	door_is_cool                    = 136,	// T if teleportal door in 606 is cool
+	used_elevator                   = 137,	// T if player used elevator in 606
+	been_on_top_floor               = 138,	// T if player has been on top floor in 606
+	torch_is_in_609                 = 139,	// T if torch is in 609
+
+// --------------------- Grid variables ----------------------
+
+	grid_position                       = 140
+};
+
+/* Global macros */
+
+#define PLAYER_IS_KING                  0   /* Who the player is */
+#define PLAYER_IS_PID                   1
+
+#define SCORE_LOOK_SPHERE_106           1
+#define SCORE_READ_BOOK_101             2
+#define SCORE_SHIFT_INTO_SEAL_113       4   
+#define SCORE_PUSH_BUTTON_119           8   
+#define SCORE_WEAR_CROWN_119            16  
+#define SCORE_MAKE_ACID_DRIP_605        32  
+#define SCORE_CROSS_PILLARS             64  
+#define SCORE_ENTER_609                 128  
+#define SCORE_CROSS_SKY                 256 
+#define SCORE_JUMP_INTO_WELL            512 
+#define SCORE_MAKE_NOISE_BIRDCALL       1024
+#define SCORE_TAKE_BONE                 2048
+
+/* section 1 macros */
+#define KING_CAPTIVE                    0   /* various states of king */
+#define KING_WITHOUT_SOUL               1
+#define KING_WITH_SOUL                  2
+
+#define WARD_PRESENT                    0   /* status of ward in room 113*/
+#define WARD_GONE                       1     
+
+#define AMULET_NOT_CORRECT_TIME         0   /* can't invoke amulet yet */
+#define AMULET_CORRECT_TIME             1   /* ready to invoke         */
+#define AMULET_USED                     2   /* have invoked amulet     */
+
+#define BOOKS_NOT_PRESENT               0   /* rm104 part 1 books not there */
+#define BOOKS_PRESENT                   1   /* books hotspot there */
+#define BOOKS_PULLED                    2   /* books pulled, secret door there */
+#define BOOKS_PRESENT2                  3   /* books hotspot there, already pulled once */ 
+#define BOOKS_PULLED2                   4   /* books pulled for 2nd time */
+
+#define TAPESTRY_CLOSED                 0   /* tapestry has never been pulled */
+#define TAPESTRY_OPENED                 1   /* tapestry opened for 1st time */
+#define TAPESTRY_CLOSED2                2   /* tapestry closed 2nd time */
+#define TAPESTRY_OPENED2                3   /* tapestry opened for 2nd time */
+
+#define TALKED_TO_NONE                  0   /* how many talked to in rm110 */
+#define TALKED_FAERIE                   1
+#define TALKED_SOPTUS                   2
+#define TALKED_SLATHAN                  3
+#define TALKED_MERCHANT                 4
+#define TALKED_FAERIE_SOPTUS            5
+#define TALKED_FAERIE_SLATHAN           6
+#define TALKED_FAERIE_MERCHANT          7
+#define TALKED_SOPTUS_SLATHAN           8
+#define TALKED_SOPTUS_MERCHANT          9
+#define TALKED_SLATHAN_MERCHANT        10
+#define TALKED_FAERIE_SOPTUS_SLATHAN   11 
+#define TALKED_FAERIE_SOPTUS_MERCHANT  12
+#define TALKED_FAERIE_SLATHAN_MERCHANT 13
+#define TALKED_SOPTUS_SLATHAN_MERCHANT 14
+#define TALKED_TO_ALL                  15
+
+#define STAIRWAY_STATUE                 1   /* used with global[statue_is_on_stairway_104] */
+#define STAIRWAY_CRYSTAL_BALL           2
+
+#define GUARD_NEVER_HEALED              0
+#define GUARD_IS_HEALED                 1
+#define GUARD_IS_UNHEALED               2
+
+#define BEFORE_FALL                     0
+#define SHE_FELL                        1
+#define IS_SAVED                        2
+
+#define SHAK_NEVER_MET                  0
+#define SHAK_MET                        1
+
+#define NONE                            0
+#define YES_EMPTY                       1
+#define YES_ACID                        2
+
+#define FREEZER                         70
+
+#define NEVER_USED_FREEZER              0
+#define HAS_USED_FREEZER                1
+#define HAS_USED_AND_EMPTY              2
+
+#define FROM_SOUTH                      0    /* used for global[from_direction] */
+#define FROM_EAST                       1
+#define FROM_NORTH                      2
+#define FROM_WEST                       3
+
+#define GRAPES_NOT_THERE                0
+#define GRAPES_GROWING                  1  /* is for global[grapes_have_grown] in 411 */
+#define GRAPES_GROWN                    2
+
+extern void global_section_constructor();
+extern void sync_room(Common::Serializer &s);
+
+} // namespace Dragonsphere
+} // namespace MADSV2
+} // namespace MADS
+
+#endif
diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index b0ef72533bf..12582d836a3 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -176,6 +176,7 @@ MODULE_OBJS += \
 	madsv2/phantom/main.o \
 	madsv2/phantom/sound_phantom.o \
 	madsv2/dragonsphere/dragonsphere.o \
+	madsv2/dragonsphere/global.o \
 	madsv2/forest/forest.o
 endif
 


Commit: dd300871b813c35e555d1f656b999a56c536b4f4
    https://github.com/scummvm/scummvm/commit/dd300871b813c35e555d1f656b999a56c536b4f4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-04-27T07:31:49+10:00

Commit Message:
MADS: PHANTOM: Some remaining gcc warning fixes

Changed paths:
    engines/mads/madsv2/core/dialog.cpp
    engines/mads/madsv2/core/kernel.h
    engines/mads/madsv2/core/sprite_0.cpp


diff --git a/engines/mads/madsv2/core/dialog.cpp b/engines/mads/madsv2/core/dialog.cpp
index 10f7111ec7a..486cd1f758e 100644
--- a/engines/mads/madsv2/core/dialog.cpp
+++ b/engines/mads/madsv2/core/dialog.cpp
@@ -1352,6 +1352,7 @@ static void dialog_show_message(DialogPtr dialog, ItemPtr item) {
 	mouse_show();
 }
 
+#if 0
 /**
  * Clears a message previously output with dialog_show_message ().
  * Currently, the only kind of message that could change (and thus
@@ -1377,6 +1378,7 @@ static void dialog_clear_message(DialogPtr dialog, ItemPtr item) {
 
 	mouse_show();
 }
+#endif
 
 /**
  * Displays (and updates) a checkbox item
diff --git a/engines/mads/madsv2/core/kernel.h b/engines/mads/madsv2/core/kernel.h
index 3a63a240335..8362eeafb2f 100644
--- a/engines/mads/madsv2/core/kernel.h
+++ b/engines/mads/madsv2/core/kernel.h
@@ -227,7 +227,7 @@ typedef struct {
 	byte prep;
 	byte cursor;
 	byte syntax;
-	char auto_anim;
+	int8 auto_anim;
 	byte auto_segment[KERNEL_DYNAMIC_MAX_SEGMENTS];
 } KernelDynamicHotSpot;
 
diff --git a/engines/mads/madsv2/core/sprite_0.cpp b/engines/mads/madsv2/core/sprite_0.cpp
index bf7975b06da..74140ed7440 100644
--- a/engines/mads/madsv2/core/sprite_0.cpp
+++ b/engines/mads/madsv2/core/sprite_0.cpp
@@ -658,8 +658,9 @@ pixel_RLE:
 
 						/* pixel_RLE_run_yesdraw */
 						if (run_value != SS_SKIP) {
+#if !attribute
 							byte out_byte = run_value;
-
+#endif
 #if three_d
 							{
 								byte depth_code;




More information about the Scummvm-git-logs mailing list