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

bluegr bluegr at gmail.com
Sat Jul 4 00:53:48 CEST 2015


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

Summary:
3f119aab0e FULLPIPE: Fix a warning
5311191687 SAGA: Add support for the scene descriptors of the ITE DOS demo
a95d22a2cd SAGA: Initial work on the DOS ITE demo
d7e0f8f4c1 MADS: V2: The two new hotspot fields refer to the cursor and the syntax
ca6612e151 MADS: Phantom: Initial work on game globals
4248054304 MADS: V2: The intro scenes do not have any codes
a211aeffca MADS: V2: Re-enable sprite drawing
972e7e313e MADS: V2: Initial work on verbs for Phantom
4d501c79e0 MADS: V2: Initial work on Phantom scenes 101 and 102
b6aa297fc8 TONY: Fix inclusion of util.h


Commit: 3f119aab0ec20aa05aafdd6ac55d525dbf3b6368
    https://github.com/scummvm/scummvm/commit/3f119aab0ec20aa05aafdd6ac55d525dbf3b6368
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-04T01:51:44+03:00

Commit Message:
FULLPIPE: Fix a warning

Changed paths:
    engines/fullpipe/motion.cpp



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 9573e05..5845ad1 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -1232,7 +1232,7 @@ MessageQueue *MovGraph::method50(StaticANIObject *ani, MovArr *movarr, int stati
 		return 0;
 
 	uint idx;
-	int movidx;
+	int movidx = 0;
 	bool done = false;
 
 	for (idx = 0; idx <= _items.size() && !done; idx++) {


Commit: 5311191687b678fda4a3379f5b79bc735329f35b
    https://github.com/scummvm/scummvm/commit/5311191687b678fda4a3379f5b79bc735329f35b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-04T01:51:45+03:00

Commit Message:
SAGA: Add support for the scene descriptors of the ITE DOS demo

Changed paths:
    engines/saga/scene.cpp



diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index 4fa15d0..efd4c37 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -866,15 +866,13 @@ void Scene::loadSceneDescriptor(uint32 resourceId) {
 
 	_sceneDescription.reset();
 
-	if (resourceId == 0) {
+	if (resourceId == 0)
 		return;
-	}
 
 	_vm->_resource->loadResource(_sceneContext, resourceId, sceneDescriptorData);
+	ByteArrayReadStreamEndian readS(sceneDescriptorData, _sceneContext->isBigEndian());
 
-	if (sceneDescriptorData.size() == 16) {
-		ByteArrayReadStreamEndian readS(sceneDescriptorData, _sceneContext->isBigEndian());
-
+	if (sceneDescriptorData.size() == 14 || sceneDescriptorData.size() == 16) {
 		_sceneDescription.flags = readS.readSint16();
 		_sceneDescription.resourceListResourceId = readS.readSint16();
 		_sceneDescription.endSlope = readS.readSint16();
@@ -882,7 +880,10 @@ void Scene::loadSceneDescriptor(uint32 resourceId) {
 		_sceneDescription.scriptModuleNumber = readS.readUint16();
 		_sceneDescription.sceneScriptEntrypointNumber = readS.readUint16();
 		_sceneDescription.startScriptEntrypointNumber = readS.readUint16();
-		_sceneDescription.musicResourceId = readS.readSint16();
+		if (sceneDescriptorData.size() == 16)
+			_sceneDescription.musicResourceId = readS.readSint16();
+	} else {
+		warning("Scene::loadSceneDescriptor: Unknown scene descriptor data size (%d)", sceneDescriptorData.size());
 	}
 }
 


Commit: a95d22a2cdd5bcc5c2483422be3194d1050e0fa4
    https://github.com/scummvm/scummvm/commit/a95d22a2cdd5bcc5c2483422be3194d1050e0fa4
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-04T01:51:45+03:00

Commit Message:
SAGA: Initial work on the DOS ITE demo

Changed paths:
    engines/saga/detection_tables.h
    engines/saga/introproc_ite.cpp
    engines/saga/music.cpp
    engines/saga/saga.h
    engines/saga/scene.h
    engines/saga/script.cpp



diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index 2f72e7a..e541f3a 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -192,9 +192,9 @@ static const SAGAGameDescription gameDescriptions[] = {
 			ADGF_DEMO,
 			GUIO1(GUIO_NOSPEECH)
 		},
-		GID_ITE, // Game id
-		GF_OLD_ITE_DOS, // features
-		ITE_DEFAULT_SCENE, // Starting scene number
+		GID_ITE,
+		GF_ITE_DOS_DEMO,
+		ITE_DEFAULT_SCENE,
 		&ITEDemo_Resources,
 		ARRAYSIZE(ITEDEMO_GameFonts),
 		ITEDEMO_GameFonts,
diff --git a/engines/saga/introproc_ite.cpp b/engines/saga/introproc_ite.cpp
index 0b129db..3c10cbe 100644
--- a/engines/saga/introproc_ite.cpp
+++ b/engines/saga/introproc_ite.cpp
@@ -59,6 +59,11 @@ namespace Saga {
 #define RID_ITE_FAIREPATH_SCENE 1564
 #define RID_ITE_FAIRETENT_SCENE 1567
 
+// Intro scenes - DOS demo
+#define RID_ITE_INTRO_ANIM_SCENE_DOS_DEMO 298
+#define RID_ITE_CAVE_SCENE_DOS_DEMO 302
+#define RID_ITE_VALLEY_SCENE_DOS_DEMO 310
+
 // ITE intro music
 #define MUSIC_INTRO 9
 #define MUSIC_TITLE_THEME 10
@@ -75,22 +80,24 @@ LoadSceneParams ITE_IntroList[] = {
 	{RID_ITE_FAIRETENT_SCENE, kLoadByResourceId, Scene::SC_ITEIntroFaireTentProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}
 };
 
-int Scene::ITEStartProc() {
-	size_t scenesCount;
-	size_t i;
+LoadSceneParams ITE_DOS_Demo_IntroList[] = {
+	{RID_ITE_INTRO_ANIM_SCENE_DOS_DEMO, kLoadByResourceId, Scene::SC_ITEIntroAnimProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE},
+	{RID_ITE_CAVE_SCENE_DOS_DEMO, kLoadByResourceId, Scene::SC_ITEIntroCaveDemoProc, false, kTransitionFade, 0, NO_CHAPTER_CHANGE},
+	{RID_ITE_VALLEY_SCENE_DOS_DEMO, kLoadByResourceId, Scene::SC_ITEIntroValleyProc, false, kTransitionFade, 0, NO_CHAPTER_CHANGE},
+};
 
+int Scene::ITEStartProc() {
 	LoadSceneParams firstScene;
 	LoadSceneParams tempScene;
+	bool dosDemo = (_vm->getFeatures() & GF_ITE_DOS_DEMO);
+	int scenesCount = (!dosDemo) ? ARRAYSIZE(ITE_IntroList) : ARRAYSIZE(ITE_DOS_Demo_IntroList);
 
-	scenesCount = ARRAYSIZE(ITE_IntroList);
-
-	for (i = 0; i < scenesCount; i++) {
-		tempScene = ITE_IntroList[i];
+	for (int i = 0; i < scenesCount; i++) {
+		tempScene = (!dosDemo) ? ITE_IntroList[i] : ITE_DOS_Demo_IntroList[i];
 		tempScene.sceneDescriptor = _vm->_resource->convertResourceId(tempScene.sceneDescriptor);
 		_vm->_scene->queueScene(tempScene);
 	}
 
-
 	firstScene.loadFlag = kLoadBySceneNumber;
 	firstScene.sceneDescriptor = _vm->getStartSceneNumber();
 	firstScene.sceneSkipTarget = true;
@@ -437,6 +444,53 @@ int Scene::ITEIntroCaveCommonProc(int param, int caveScene) {
 	return 0;
 }
 
+int Scene::ITEIntroCaveDemoProc(int param) {
+	Event event;
+	EventColumns *eventColumns = NULL;
+
+	switch (param) {
+	case SCENE_BEGIN:
+		// Begin palette cycling animation for candles
+		event.type = kEvTOneshot;
+		event.code = kPalAnimEvent;
+		event.op = kEventCycleStart;
+		event.time = 0;
+		eventColumns = _vm->_events->chain(eventColumns, event);
+
+		// Queue narrator dialogue list
+		for (int i = 0; i < 11; i++) {
+			// Play voice
+			event.type = kEvTOneshot;
+			event.code = kVoiceEvent;
+			event.op = kEventPlay;
+			event.param = i;
+			event.time = _vm->_sndRes->getVoiceLength(i);
+			_vm->_events->chain(eventColumns, event);
+		}
+
+		// End scene after last dialogue over
+		event.type = kEvTOneshot;
+		event.code = kSceneEvent;
+		event.op = kEventEnd;
+		event.time = INTRO_VOICE_PAD;
+		_vm->_events->chain(eventColumns, event);
+
+		break;
+	case SCENE_END:
+		break;
+
+	default:
+		warning("Illegal scene procedure parameter");
+		break;
+	}
+
+	return 0;
+}
+
+int Scene::SC_ITEIntroCaveDemoProc(int param, void *refCon) {
+	return ((Scene *)refCon)->ITEIntroCaveDemoProc(param);
+}
+
 // Handles first introductory cave painting scene
 int Scene::SC_ITEIntroCave1Proc(int param, void *refCon) {
 	return ((Scene *)refCon)->ITEIntroCaveCommonProc(param, 1);
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index 71d061a..5bff06d 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -273,7 +273,11 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
 
 	debug(2, "Music::play %d, %d", resourceId, flags);
 
-	if (isPlaying() && _trackNumber == resourceId) {
+	if (isPlaying() && _trackNumber == resourceId)
+		return;
+
+	if (_vm->getFeatures() & GF_ITE_DOS_DEMO) {
+		warning("TODO: Music::play %d, %d for ITE DOS demo", resourceId, flags);
 		return;
 	}
 
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 6077e55..9c7b2f5 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -137,9 +137,7 @@ enum GameFileTypes {
 
 enum GameFeatures {
 	GF_ITE_FLOPPY        = 1 << 0,
-#if 0
-	GF_OLD_ITE_DOS       = 1 << 1,     // Currently unused
-#endif
+	GF_ITE_DOS_DEMO      = 1 << 1,
 	GF_EXTRA_ITE_CREDITS = 1 << 2,
 	GF_8BIT_UNSIGNED_PCM = 1 << 3
 };
diff --git a/engines/saga/scene.h b/engines/saga/scene.h
index 410713c..1a710cf 100644
--- a/engines/saga/scene.h
+++ b/engines/saga/scene.h
@@ -400,12 +400,14 @@ class Scene {
 	static int SC_ITEIntroTreeHouseProc(int param, void *refCon);
 	static int SC_ITEIntroFairePathProc(int param, void *refCon);
 	static int SC_ITEIntroFaireTentProc(int param, void *refCon);
+	static int SC_ITEIntroCaveDemoProc(int param, void *refCon);
 
  private:
 	EventColumns *queueIntroDialogue(EventColumns *eventColumns, int n_dialogues, const IntroDialogue dialogue[]);
 	EventColumns *queueCredits(int delta_time, int duration, int n_credits, const IntroCredit credits[]);
 	int ITEIntroAnimProc(int param);
 	int ITEIntroCaveCommonProc(int param, int caveScene);
+	int ITEIntroCaveDemoProc(int param);
 	int ITEIntroValleyProc(int param);
 	int ITEIntroTreeHouseProc(int param);
 	int ITEIntroFairePathProc(int param);
diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp
index 94b26c8..3cc6586 100644
--- a/engines/saga/script.cpp
+++ b/engines/saga/script.cpp
@@ -977,19 +977,15 @@ void Script::opSpeak(SCRIPTOP_PARAMS) {
 
 	// now data contains last string index
 
-#if 0
-	if (_vm->getFeatures() & GF_OLD_ITE_DOS) { // special ITE dos
+	if (_vm->getFeatures() & GF_ITE_DOS_DEMO) {
 		if ((_vm->_scene->currentSceneNumber() == ITE_DEFAULT_SCENE) &&
 			(iparam1 >= 288) && (iparam1 <= (RID_SCENE1_VOICE_END - RID_SCENE1_VOICE_START + 288))) {
 			sampleResourceId = RID_SCENE1_VOICE_START + iparam1 - 288;
 		}
 	} else {
-#endif
 		if (thread->_voiceLUT->size() > uint16(first))
 			sampleResourceId = (*thread->_voiceLUT)[uint16(first)];
-#if 0
 	}
-#endif
 
 	if (sampleResourceId < 0 || sampleResourceId > 4000)
 		sampleResourceId = -1;


Commit: d7e0f8f4c19c57bf856b852c997ef49acbe26adb
    https://github.com/scummvm/scummvm/commit/d7e0f8f4c19c57bf856b852c997ef49acbe26adb
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-04T01:51:46+03:00

Commit Message:
MADS: V2: The two new hotspot fields refer to the cursor and the syntax

Changed paths:
    engines/mads/hotspots.cpp



diff --git a/engines/mads/hotspots.cpp b/engines/mads/hotspots.cpp
index bd28645..8afef2e 100644
--- a/engines/mads/hotspots.cpp
+++ b/engines/mads/hotspots.cpp
@@ -193,9 +193,8 @@ Hotspot::Hotspot(Common::SeekableReadStream &f, bool isV2) {
 	_active = f.readByte() != 0;
 	_cursor = (CursorType)f.readByte();
 	if (isV2) {
-		// This looks to be some sort of bitmask. Perhaps it signifies
-		// the valid verbs for this hotspot
-		f.skip(2);		// unknown
+		f.skip(1);		// cursor
+		f.skip(1);		// syntax
 	}
 	_vocabId = f.readUint16LE();
 	_verbId = f.readUint16LE();


Commit: ca6612e1512ae46f543dbd308db7b6849bb050ab
    https://github.com/scummvm/scummvm/commit/ca6612e1512ae46f543dbd308db7b6849bb050ab
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-04T01:51:46+03:00

Commit Message:
MADS: Phantom: Initial work on game globals

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



diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index fc04a2f..62592c0 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -4,6 +4,7 @@ MODULE_OBJS := \
 	dragonsphere/game_dragonsphere.o \
 	dragonsphere/dragonsphere_scenes.o \
 	phantom/game_phantom.o \
+	phantom/globals_phantom.o \
 	phantom/phantom_scenes.o \
 	nebular/dialogs_nebular.o \
 	nebular/game_nebular.o \
diff --git a/engines/mads/phantom/game_phantom.cpp b/engines/mads/phantom/game_phantom.cpp
index cbeb6b0..592a108 100644
--- a/engines/mads/phantom/game_phantom.cpp
+++ b/engines/mads/phantom/game_phantom.cpp
@@ -28,7 +28,7 @@
 #include "mads/msurface.h"
 #include "mads/phantom/game_phantom.h"
 //#include "mads/nebular/dialogs_nebular.h"
-//#include "mads/nebular/globals_nebular.h"
+#include "mads/phantom/globals_phantom.h"
 #include "mads/phantom/phantom_scenes.h"
 
 namespace MADS {
@@ -52,29 +52,74 @@ void GamePhantom::startGame() {
 void GamePhantom::initializeGlobals() {
 	_globals.reset();
 
-	warning("TODO: sub_316DA()");
+	// TODO: Catacombs setup
 
 	_player._facing = FACING_NORTH;
 	_player._turnToFacing = FACING_NORTH;
 
-	/* Section #1 variables */
-	// TODO
-
-	/* Section #2 variables */
-	// TODO
-
-	/* Section #3 variables */
-	// TODO
-
-	/* Section #4 variables */
-	// TODO
-
-	/* Section #5 variables */
-	// TODO
-
-	/* Section #9 variables */
-	// TODO
-
+	_globals[kTempVar]                 = false;
+	_globals[kRoom103104Transition]    = 1;		// new room
+	_globals[kCurrentYear]             = 1993;
+	_globals[kTrapDoorStatus]          = 0;		// open
+	_globals[kChristineDoorStatus]     = 0;		// Christine is in her room
+	_globals[kSandbagStatus]           = 0;		// sandbag is secure
+	_globals[kJacquesStatus]           = 0;		// alive
+	_globals[kChrisFStatus]            = 1;		// Christine F. is alive in 1993
+	_globals[kBrieTalkStatus]          = 0;		// before Brie motions
+	_globals[kPanelIn206]              = 0;		// not discovered
+	_globals[kFightStatus]             = 0;
+	_globals[kJuliesDoor]              = 1;		// cracked open
+	_globals[kPrompterStandStatus]     = 0;
+	_globals[kChrisDStatus]            = 0;		// before love
+	_globals[kJulieNameIsKnown]        = 0;
+	_globals[kDoorsIn205]              = 0;		// both locked
+	_globals[kMadameGiryLocation]      = 1;		// middle
+	_globals[kTicketPeoplePresent]     = 0;
+	_globals[kCoffinStatus]            = 0;		// closed and locked
+	_globals[kDoneBrieConv203]         = 0;
+	_globals[kFlorentNameIsKnown]      = 0;
+	_globals[kDegasNameIsKnown]        = 0;
+	_globals[kMadameGiryShowsUp]       = false;
+	_globals[kJacquesNameIsKnown]      = 0;
+	_globals[kCharlesNameIsKnown]      = false;
+	_globals[kTopFloorLocked]          = true;
+	_globals[kMadameNameIsKnown]       = 0;
+	_globals[kChrisKickedRaoulOut]     = false;
+	_globals[kLookedAtCase]            = false;
+	_globals[kRingIsOnFinger]          = false;
+	_globals[kHeListened]              = false;
+	_globals[kKnockedOverHead]         = false;
+	_globals[kObservedPhan104]         = false;
+	_globals[kReadBook]                = false;
+	_globals[kCanFindBookInLibrary]    = false;
+	_globals[kLookedAtSkullFace]       = false;
+	_globals[kScannedBookcase]         = false;
+	_globals[kRanConvIn205]            = false;
+	_globals[kDoneRichConv203]         = false;
+	_globals[kHintThatDaaeIsHome1]     = false;
+	_globals[kHintThatDaaeIsHome2]     = false;
+	_globals[kMakeBrieLeave203]        = false;
+	_globals[kMakeRichLeave203]        = false;
+	_globals[kCameFromFade]            = false;
+	_globals[kChristineToldEnvelope]   = false;
+	_globals[kLeaveAngelMusicOn]       = false;
+	_globals[kDoorIn409IsOpen]         = false;
+	_globals[kUnknown]                 = false;
+	_globals[kCobwebIsCut]             = false;
+	_globals[kChristineIsInBoat]       = false;
+	_globals[kRightDoorIsOpen504]      = false;
+	_globals[kChrisLeft505]            = false;
+	_globals[kChrisWillTakeSeat]       = true;
+	_globals[kFlickedLever1]           = 0;
+	_globals[kFlickedLever2]           = 0;
+	_globals[kFlickedLever3]           = 0;
+	_globals[kFlickedLever4]           = 0;
+	_globals[kPlayerScore]             = 0;
+	_globals[kPlayerScoreFlags]        = 0;
+
+	_globals[kMusicSelected] = _vm->getRandomNumber(1, 4);
+
+	_player._spritesPrefix = "RAL";	// Fixed prefix
 	Player::preloadSequences("RAL", 1);
 }
 
@@ -106,6 +151,11 @@ void GamePhantom::checkShowDialog() {
 	// TODO: Copied from Nebular
 	if (_vm->_dialogs->_pendingDialog && _player._stepEnabled && !_globals[5]) {
 		_player.releasePlayerSprites();
+
+		// HACK: Skip the main menu (since it'll then try to show Rex's main menu)
+		if (_vm->_dialogs->_pendingDialog == DIALOG_MAIN_MENU)
+			_vm->_dialogs->_pendingDialog = DIALOG_NONE;
+
 		_vm->_dialogs->showDialog();
 		_vm->_dialogs->_pendingDialog = DIALOG_NONE;
 	}
diff --git a/engines/mads/phantom/game_phantom.h b/engines/mads/phantom/game_phantom.h
index 5504054..44b2321 100644
--- a/engines/mads/phantom/game_phantom.h
+++ b/engines/mads/phantom/game_phantom.h
@@ -26,7 +26,7 @@
 #include "common/scummsys.h"
 #include "mads/game.h"
 #include "mads/globals.h"
-//#include "mads/nebular/globals_nebular.h"
+#include "mads/phantom/globals_phantom.h"
 
 namespace MADS {
 
@@ -64,15 +64,6 @@ enum InventoryObject {
 	OBJ_OAR = 24
 };
 
-// HACK: A stub for now, remove from here once it's implemented properly
-class PhantomGlobals : public Globals {
-public:
-	PhantomGlobals() {
-		resize(210);	// Rex has 210 globals
-	}
-	virtual ~PhantomGlobals() {}
-};
-
 class GamePhantom : public Game {
 	friend class Game;
 protected:
diff --git a/engines/mads/phantom/globals_phantom.cpp b/engines/mads/phantom/globals_phantom.cpp
new file mode 100644
index 0000000..e0db0a1
--- /dev/null
+++ b/engines/mads/phantom/globals_phantom.cpp
@@ -0,0 +1,49 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/scummsys.h"
+#include "common/config-manager.h"
+#include "mads/phantom/globals_phantom.h"
+
+namespace MADS {
+
+namespace Phantom {
+
+PhantomGlobals::PhantomGlobals()
+	: Globals() {
+	// Initialize lists
+	resize(210);
+	_spriteIndexes.resize(30);
+	_sequenceIndexes.resize(30);
+}
+
+void PhantomGlobals::synchronize(Common::Serializer &s) {
+	Globals::synchronize(s);
+
+	_spriteIndexes.synchronize(s);
+	_sequenceIndexes.synchronize(s);
+}
+
+
+} // End of namespace Phantom
+
+} // End of namespace MADS
diff --git a/engines/mads/phantom/globals_phantom.h b/engines/mads/phantom/globals_phantom.h
new file mode 100644
index 0000000..c23b53c
--- /dev/null
+++ b/engines/mads/phantom/globals_phantom.h
@@ -0,0 +1,143 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef MADS_GLOBALS_PHANTOM_H
+#define MADS_GLOBALS_PHANTOM_H
+
+#include "common/scummsys.h"
+#include "common/array.h"
+#include "mads/game.h"
+#include "mads/resources.h"
+
+namespace MADS {
+
+namespace Phantom {
+
+enum GlobalId {
+	// Global variables
+
+	kWalkerTiming           = 0,
+	kWalkerTiming2			= 1,
+	kStopWalkerDisabled		= 2,	// disable walker idle animations
+	kTempInterface          = 3,
+	kWalkerConverse         = 4,	// conversation started with an NPC
+	kWalkerConverseState    = 5,
+	kWalkerConverseNow      = 6,
+
+	kCurrentYear            = 10,	// current year (1881 or 1993)
+	kMusicSelected          = 11,
+	kPlayerScore            = 12,
+	kPlayerScoreFlags       = 13,
+	kDoneBrieConv203        = 14,
+	kLanternStatus          = 15,
+
+	// Section #1 variables
+	kLeaveAngelMusicOn      = 19,
+	kTrapDoorStatus         = 20,
+	kChristineDoorStatus    = 21,
+	kSandbagStatus          = 22,
+	kChrisFStatus           = 23,
+	kBrieTalkStatus         = 24,
+	kJuliesDoor             = 25,
+	kPrompterStandStatus    = 26,
+	kChrisDStatus           = 27,
+	kJulieNameIsKnown       = 28,
+	kChrisKickedRaoulOut    = 29,
+	kJacquesNameIsKnown     = 30,
+	kJacquesStatus          = 31,
+	kFlorentNameIsKnown     = 32,
+	kCharlesNameIsKnown     = 33,
+	kRoom103104Transition   = 34,
+	kObservedPhan104        = 35,
+	kDeathLocation          = 36,
+	kMakeBrieLeave203       = 37,
+	kHintThatDaaeIsHome1    = 38,
+	kHintThatDaaeIsHome2    = 39,
+
+	// Section #2 variables
+	kChristineToldEnvelope  = 40,
+	kReadBook               = 41,
+	kScannedBookcase        = 42,
+	kRanConvIn205           = 43,
+	kDoorsIn205             = 44,
+	kPanelIn206             = 45,
+	kMadameNameIsKnown      = 46,
+	kMadameGiryLocation     = 47,
+	kLookedAtCase           = 48,
+	kMadameGiryShowsUp      = 49,
+	kDoneRichConv203        = 50,
+	kCameFromFade           = 51,
+	kTicketPeoplePresent    = 52,
+	kDegasNameIsKnown       = 53,
+	kTempVar                = 54,
+	kFlickedLever1          = 55,
+	kFlickedLever2          = 56,
+	kFlickedLever3          = 57,
+	kFlickedLever4          = 58,
+
+	// Section #3 Variables
+	kTopFloorLocked         = 60,
+
+	// Section #4 Variables
+	kCatacombsRoom          = 80,
+	// TODO
+	kDoorIn409IsOpen        = 93,
+	kUnknown                = 94,	// TODO
+	kCobwebIsCut            = 95,
+
+	// Section #5 Variables
+	kChristineIsInBoat      = 100,
+	kChrisWillTakeSeat      = 101,
+	kRightDoorIsOpen504     = 102,
+	kCoffinStatus           = 103,
+	kChrisLeft505           = 104,
+	kKnockedOverHead        = 105,
+	kFightStatus            = 106,
+	kHeListened             = 107,
+	kCanFindBookInLibrary   = 108,
+	kRingIsOnFinger         = 109,
+	kLookedAtSkullFace      = 110,
+	kCableHookWasSeparate   = 111,
+	kMakeRichLeave203       = 112
+};
+
+class PhantomGlobals : public Globals {
+public:
+	SynchronizedList _spriteIndexes;
+	SynchronizedList _sequenceIndexes;
+public:
+	/**
+	 * Constructor
+	 */
+	PhantomGlobals();
+
+	/**
+	* Synchronize the globals data
+	*/
+	virtual void synchronize(Common::Serializer &s);
+};
+
+} // End of namespace Phantom
+
+} // End of namespace MADS
+
+#endif /* MADS_GLOBALS_PHANTOM_H */


Commit: 42480543044c18f955be5a342eda758f3716b3e5
    https://github.com/scummvm/scummvm/commit/42480543044c18f955be5a342eda758f3716b3e5
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-04T01:51:46+03:00

Commit Message:
MADS: V2: The intro scenes do not have any codes

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



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


Commit: a211aeffcaa7bdb6da63c8f1397724521ecabd02
    https://github.com/scummvm/scummvm/commit/a211aeffcaa7bdb6da63c8f1397724521ecabd02
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-04T01:51:47+03:00

Commit Message:
MADS: V2: Re-enable sprite drawing

Changed paths:
    engines/mads/scene.cpp



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


Commit: 972e7e313e170521cf624ee6e93ccf87eadeb225
    https://github.com/scummvm/scummvm/commit/972e7e313e170521cf624ee6e93ccf87eadeb225
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-04T01:51:47+03:00

Commit Message:
MADS: V2: Initial work on verbs for Phantom

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



diff --git a/engines/mads/phantom/phantom_scenes.h b/engines/mads/phantom/phantom_scenes.h
index 0e22610..f1ad27a 100644
--- a/engines/mads/phantom/phantom_scenes.h
+++ b/engines/mads/phantom/phantom_scenes.h
@@ -34,20 +34,39 @@ namespace MADS {
 
 namespace Phantom {
 
+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_CLIMB_DOWN = 0x21,
+	VERB_CLIMB_INTO = 0x22,
+	VERB_CLIMB_THROUGH = 0x23,
+	VERB_JUMP_INTO = 0x53,
+	VERB_LOOK_AT = 0x60,
+	VERB_LOOK_THROUGH = 0x61,
+	VERB_TURN_OFF = 0x95,
+	VERB_TURN_ON = 0x96,
+	VERB_UNLOCK = 0x97,
+	VERB_WALK_ACROSS = 0x99,
+	VERB_WALK_DOWN = 0x9A,
+	VERB_WALK_THROUGH = 0x9B,
+	VERB_WALK_UP = 0x9C,
+	VERB_CLIMB_UP = 0xA5,
+	VERB_WALK_ONTO = 0xA6,
+	VERB_WALK = 0xA7,
+};
+
 enum Noun {
 	NOUN_GAME = 0x1,
 	NOUN_QSAVE = 0x2,
-	NOUN_LOOK = 0x3,
-	NOUN_TAKE = 0x4,
-	NOUN_PUSH = 0x5,
-	NOUN_OPEN = 0x6,
-	NOUN_PUT = 0x7,
-	NOUN_TALK_TO = 0x8,
-	NOUN_GIVE = 0x9,
-	NOUN_PULL = 0xA,
-	NOUN_CLOSE = 0xB,
-	NOUN_THROW = 0xC,
-	NOUN_WALK_TO = 0xD,
 	NOUN_ = 0xE,
 	NOUN_IN_ONE = 0xF,
 	NOUN_IN_TWO = 0x10,
@@ -67,9 +86,6 @@ enum Noun {
 	NOUN_CEILING = 0x1E,
 	NOUN_CHAIR = 0x1F,
 	NOUN_CIRCULAR_STAIRCASE = 0x20,
-	NOUN_CLIMB_DOWN = 0x21,
-	NOUN_CLIMB_INTO = 0x22,
-	NOUN_CLIMB_THROUGH = 0x23,
 	NOUN_COLUMN_PROP = 0x24,
 	NOUN_CONDUCTORS_STAND = 0x25,
 	NOUN_CORRIDOR = 0x26,
@@ -117,7 +133,6 @@ enum Noun {
 	NOUN_HOUSE = 0x50,
 	NOUN_IN_ONE2 = 0x51,
 	NOUN_IN_TWO2 = 0x52,
-	NOUN_JUMP_INTO = 0x53,
 	NOUN_JUNK = 0x54,
 	NOUN_KEY = 0x55,
 	NOUN_LAMP = 0x56,
@@ -130,8 +145,6 @@ enum Noun {
 	NOUN_LOCK = 0x5D,
 	NOUN_LOCKING_RAIL = 0x5E,
 	NOUN_LOCKRAIL = 0x5F,
-	NOUN_LOOK_AT = 0x60,
-	NOUN_LOOK_THROUGH = 0x61,
 	NOUN_MANNEQUINS = 0x62,
 	NOUN_MIRROR = 0x63,
 	NOUN_MUMMY_PROP = 0x64,
@@ -183,14 +196,7 @@ enum Noun {
 	NOUN_TICKET = 0x92,
 	NOUN_TRAP_CEILING = 0x93,
 	NOUN_TRAP_DOOR = 0x94,
-	NOUN_TURN_OFF = 0x95,
-	NOUN_TURN_ON = 0x96,
-	NOUN_UNLOCK = 0x97,
 	NOUN_URN = 0x98,
-	NOUN_WALK_ACROSS = 0x99,
-	NOUN_WALK_DOWN = 0x9A,
-	NOUN_WALK_THROUGH = 0x9B,
-	NOUN_WALK_UP = 0x9C,
 	NOUN_WALL = 0x9D,
 	NOUN_WARDROBE = 0x9E,
 	NOUN_WASTE_BASKET = 0x9F,
@@ -199,9 +205,6 @@ enum Noun {
 	NOUN_WEDDING_RING = 0xA2,
 	NOUN_YELLOW_FRAME = 0xA3,
 	NOUN_PROP = 0xA4,
-	NOUN_CLIMB_UP = 0xA5,
-	NOUN_WALK_ONTO = 0xA6,
-	NOUN_WALK = 0xA7,
 	NOUN_LEFT_DOOR = 0xA8,
 	NOUN_RIGHT_DOOR = 0xA9,
 	NOUN_DOOR_TO_PIT = 0xAA,


Commit: 4d501c79e0334e8e26ca4d0d1c174bec7b116e55
    https://github.com/scummvm/scummvm/commit/4d501c79e0334e8e26ca4d0d1c174bec7b116e55
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-04T01:51:47+03:00

Commit Message:
MADS: V2: Initial work on Phantom scenes 101 and 102

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



diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index 62592c0..7cb7a91 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -6,6 +6,7 @@ MODULE_OBJS := \
 	phantom/game_phantom.o \
 	phantom/globals_phantom.o \
 	phantom/phantom_scenes.o \
+	phantom/phantom_scenes1.o \
 	nebular/dialogs_nebular.o \
 	nebular/game_nebular.o \
 	nebular/globals_nebular.o \
diff --git a/engines/mads/phantom/phantom_scenes.cpp b/engines/mads/phantom/phantom_scenes.cpp
index afacde7..f7f4d15 100644
--- a/engines/mads/phantom/phantom_scenes.cpp
+++ b/engines/mads/phantom/phantom_scenes.cpp
@@ -28,6 +28,7 @@
 #include "mads/scene.h"
 #include "mads/phantom/game_phantom.h"
 #include "mads/phantom/phantom_scenes.h"
+#include "mads/phantom/phantom_scenes1.h"
 
 namespace MADS {
 
@@ -42,9 +43,9 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
 	switch (scene._nextSceneId) {
 	// Scene group #1 (theater, stage and dressing rooms)
 	case 101:	// seats
-		return new DummyScene(vm);	// TODO
+		return new Scene101(vm);
 	case 102:	// music stands
-		return new DummyScene(vm);	// TODO
+		return new Scene102(vm);
 	case 103:	// below stage
 		return new DummyScene(vm);	// TODO
 	case 104:	// stage
diff --git a/engines/mads/phantom/phantom_scenes.h b/engines/mads/phantom/phantom_scenes.h
index f1ad27a..87132b7 100644
--- a/engines/mads/phantom/phantom_scenes.h
+++ b/engines/mads/phantom/phantom_scenes.h
@@ -49,6 +49,7 @@ enum Verb {
 	VERB_CLIMB_DOWN = 0x21,
 	VERB_CLIMB_INTO = 0x22,
 	VERB_CLIMB_THROUGH = 0x23,
+	VERB_EXIT_TO = 0x37,
 	VERB_JUMP_INTO = 0x53,
 	VERB_LOOK_AT = 0x60,
 	VERB_LOOK_THROUGH = 0x61,
@@ -105,7 +106,6 @@ enum Noun {
 	NOUN_EXIT = 0x34,
 	NOUN_EXIT_DOWN = 0x35,
 	NOUN_EXIT_SIGN = 0x36,
-	NOUN_EXIT_TO = 0x37,
 	NOUN_EXIT_TO_BACKSTAGE = 0x38,
 	NOUN_EXIT_TO_CELLAR = 0x39,
 	NOUN_EXIT_TO_CORRIDOR = 0x3A,
@@ -485,27 +485,6 @@ protected:
 };
 
 // TODO: Temporary, remove once implemented properly
-class Scene1xx : public PhantomScene {
-protected:
-	/**
-	 * Plays an appropriate sound when entering a scene
-	 */
-	void sceneEntrySound() {}
-
-	/**
-	 *Sets the AA file to use for the scene
-	 */
-	void setAAName() {}
-
-	/**
-	 * Updates the prefix used for getting player sprites for the scene
-	 */
-	void setPlayerSpritesPrefix() {}
-public:
-	Scene1xx(MADSEngine *vm) : PhantomScene(vm) {}
-};
-
-// TODO: Temporary, remove once implemented properly
 class DummyScene : public PhantomScene {
 public:
 	DummyScene(MADSEngine *vm) : PhantomScene(vm) {
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
new file mode 100644
index 0000000..2d991fd
--- /dev/null
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -0,0 +1,282 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/scummsys.h"
+#include "mads/mads.h"
+#include "mads/scene.h"
+#include "mads/phantom/phantom_scenes.h"
+#include "mads/phantom/phantom_scenes1.h"
+
+namespace MADS {
+
+namespace Phantom {
+
+void Scene1xx::setAAName() {
+	// TODO
+	//int idx = 0;
+	//_game._aaName = Resources::formatAAName(idx);
+}
+
+void Scene1xx::sceneEntrySound() {
+	// TODO
+}
+
+/*------------------------------------------------------------------------*/
+
+Scene101::Scene101(MADSEngine *vm) : Scene1xx(vm) {
+
+}
+
+void Scene101::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+}
+
+void Scene101::setup() {
+	//setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene101::enter() {
+	// TODO
+
+	if (_globals[kCurrentYear] == 1993) {
+		_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('z', -1));
+		// TODO
+		//_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+	} else {
+		// TODO
+	}
+
+	// TODO
+}
+
+void Scene101::step() {
+	// TODO
+}
+
+void Scene101::preActions() {
+	if (_action.isAction(VERB_EXIT_TO, NOUN_ORCHESTRA_PIT)) {
+		// TODO: Handle Brie
+		_game._player._walkOffScreenSceneId = 102;
+	} else if (_action.isAction(VERB_EXIT_TO, NOUN_GRAND_FOYER)) {
+		// TODO: Handle Brie
+		_game._player._walkOffScreenSceneId = 202;
+	} else if (_action.isAction(VERB_TAKE, NOUN_MONSIEUR_BRIE)) {
+		_vm->_dialogs->show(10121);
+	} else if (_action.isAction(VERB_TALK_TO, NOUN_MONSIEUR_BRIE)) {
+		if (_globals[kBrieTalkStatus] == 2)
+			_game._player._needToWalk = false;
+	}
+
+	// TODO
+}
+
+void Scene101::actions() {
+	// TODO: Brie conversation
+
+	// TODO: Look around
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isObject(NOUN_AISLE)) {
+			_vm->_dialogs->show(10112);
+		} else if (_action.isObject(NOUN_CHANDELIER)) {
+			_vm->_dialogs->show(10113);
+		} else if (_action.isObject(NOUN_BACK_WALL)) {
+			_vm->_dialogs->show(10114);
+		} else if (_action.isObject(NOUN_SIDE_WALL)) {
+			_vm->_dialogs->show(10115);
+		} else if (_action.isObject(NOUN_SEATS)) {
+			// TODO: Finish this
+			_vm->_dialogs->show(10116);
+		} else if (_action.isObject(NOUN_GRAND_FOYER)) {
+			_vm->_dialogs->show(10117);
+		} else if (_action.isObject(NOUN_ORCHESTRA_PIT)) {
+			_vm->_dialogs->show(10118);
+		} else if (_action.isObject(NOUN_MONSIEUR_BRIE)) {
+			_vm->_dialogs->show(10120);
+		}
+
+		_game._player._stepEnabled = true;
+	} else if (_action.isAction(VERB_TALK_TO, NOUN_MONSIEUR_BRIE)) {
+		if (_globals[kBrieTalkStatus] == 2)
+			_vm->_dialogs->show(10122);
+		_game._player._stepEnabled = true;
+	} else if (_action.isAction(VERB_TAKE, NOUN_MONSIEUR_BRIE)) {
+		_game._player._stepEnabled = true;
+	}
+}
+
+/*------------------------------------------------------------------------*/
+
+Scene102::Scene102(MADSEngine *vm) : Scene1xx(vm) {
+	_animRunningFl = false;
+}
+
+void Scene102::synchronize(Common::Serializer &s) {
+	Scene1xx::synchronize(s);
+
+	s.syncAsByte(_animRunningFl);
+}
+
+void Scene102::setup() {
+	//setPlayerSpritesPrefix();
+	setAAName();
+}
+
+void Scene102::enter() {
+	_animRunningFl = false;
+
+	_globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('x', 0));
+	_globals._spriteIndexes[3] = _scene->_sprites.addSprites("*RAL86");
+
+	if (_globals[kCurrentYear] == 1993) {
+		_globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('z', -1));
+		// TODO
+		//_scene->_sequences.setDepth(_globals._sequenceIndexes[0], 14);
+	} else {
+		// TODO
+	}
+
+	if (_scene->_priorSceneId == 101) {
+		_game._player._playerPos = Common::Point(97, 79);
+		_game._player._facing = FACING_SOUTHEAST;
+		// TODO
+		_game._player.walk(Common::Point(83, 87), FACING_SOUTHEAST);
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+	} else if (_scene->_priorSceneId == 104) {
+		// Player fell from pit -> death
+		// TODO
+	} else if (_scene->_priorSceneId == 103 || _scene->_priorSceneId != -1) {
+		_game._player._playerPos = Common::Point(282, 145);
+		_game._player._facing = FACING_WEST;
+		_animRunningFl = true;
+		// TODO: Door closing animation
+	} else if (_scene->_priorSceneId == -1) {
+		// TODO
+		_scene->_sequences.setDepth(_globals._sequenceIndexes[2], 14);
+	}
+
+	sceneEntrySound();
+}
+
+void Scene102::step() {
+	if (_game._trigger == 60) {		// Door closes
+		// TODO
+		_animRunningFl = false;
+	} else if (_game._trigger == 65) {		// Death
+		// TODO
+		_scene->_currentSceneId = 104;
+	}
+}
+
+void Scene102::preActions() {
+	if (_action.isAction(VERB_OPEN, NOUN_ORCHESTRA_DOOR) || _action.isAction(VERB_PUSH, NOUN_ORCHESTRA_DOOR)) {
+		_game._player.walk(Common::Point(282, 145), FACING_EAST);
+	}
+}
+
+void Scene102::actions() {
+	if (_action.isAction(VERB_WALK_DOWN, NOUN_AISLE)) {
+		_scene->_nextSceneId = 101;
+		_game._player._stepEnabled = true;
+	}
+
+	if (_action.isAction(VERB_WALK_THROUGH, NOUN_ORCHESTRA_DOOR) ||
+		_action.isAction(VERB_PUSH, NOUN_ORCHESTRA_DOOR) ||
+		_action.isAction(VERB_OPEN, NOUN_ORCHESTRA_DOOR)) {
+		if (_animRunningFl) {
+			// TODO
+		} else {
+			_scene->_nextSceneId = 103;		// FIXME: temporary HACK - remove!
+
+			switch (_game._trigger) {
+			case 70:	// try again
+			case 0:
+				// TODO
+				break;
+			case 1:
+				_scene->_nextSceneId = 103;
+				break;
+			}
+		}
+
+		_game._player._stepEnabled = true;
+	}
+
+	// TODO: Look around
+
+	if (_action.isAction(VERB_LOOK) || _action.isAction(VERB_LOOK_AT)) {
+		if (_action.isObject(NOUN_PIT))
+			_vm->_dialogs->show(10211);
+		else if (_action.isObject(NOUN_SEATS))
+			if (_globals[kCurrentYear] == 1881)
+				_vm->_dialogs->show(10212);
+			else
+				_vm->_dialogs->show(10230);
+		else if (_action.isObject(NOUN_ORCHESTRA_DOOR))
+			_vm->_dialogs->show(10213);
+		else if (_action.isObject(NOUN_CONDUCTORS_STAND))
+			_vm->_dialogs->show(10214);
+		else if (_action.isObject(NOUN_MUSIC_STAND) || _action.isObject(NOUN_MUSIC_STANDS))
+			_vm->_dialogs->show(10215);
+		else if (_action.isObject(NOUN_PROMPTERS_BOX))
+			_vm->_dialogs->show(10217);
+		else if (_action.isObject(NOUN_STAGE))
+			_vm->_dialogs->show(10218);
+		else if (_action.isObject(NOUN_APRON))
+			_vm->_dialogs->show(10219);
+		else if (_action.isObject(NOUN_SIDE_WALL))
+			_vm->_dialogs->show(10220);
+		else if (_action.isObject(NOUN_FOLDING_CHAIRS))
+			_vm->_dialogs->show(10221);
+		else if (_action.isObject(NOUN_AISLE))
+			_vm->_dialogs->show(10222);
+		else if (_action.isObject(NOUN_PROSCENIUM_ARCH))
+			_vm->_dialogs->show(10223);
+		else if (_action.isObject(NOUN_ACT_CURTAIN))
+			_vm->_dialogs->show(10224);
+		else if (_action.isObject(NOUN_IN_ONE))
+			_vm->_dialogs->show(10225);
+		else if (_action.isObject(NOUN_IN_TWO))
+			_vm->_dialogs->show(10226);
+		else if (_action.isObject(NOUN_LEG))
+			_vm->_dialogs->show(10227);
+		else if (_action.isObject(NOUN_CHANDELIER))
+			_vm->_dialogs->show(10231);
+		else
+			return;
+
+		_game._player._stepEnabled = true;
+	}
+
+	if (_action.isAction(VERB_CLOSE, NOUN_ORCHESTRA_DOOR)) {
+		_vm->_dialogs->show(10228);
+		_game._player._stepEnabled = true;
+	}
+}
+
+
+/*------------------------------------------------------------------------*/
+
+} // End of namespace Phantom
+} // End of namespace MADS
diff --git a/engines/mads/phantom/phantom_scenes1.h b/engines/mads/phantom/phantom_scenes1.h
new file mode 100644
index 0000000..0f5f56a
--- /dev/null
+++ b/engines/mads/phantom/phantom_scenes1.h
@@ -0,0 +1,89 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef MADS_PHANTOM_SCENES1_H
+#define MADS_PHANTOM_SCENES1_H
+
+#include "common/scummsys.h"
+#include "common/serializer.h"
+#include "mads/game.h"
+#include "mads/scene.h"
+#include "mads/phantom/phantom_scenes.h"
+
+namespace MADS {
+
+namespace Phantom {
+
+class Scene1xx : public PhantomScene {
+protected:
+	/**
+	 * Plays an appropriate sound when entering a scene
+	 */
+	void sceneEntrySound();
+
+	/**
+	 *Sets the AA file to use for the scene
+	 */
+	void setAAName();
+
+	/**
+	 * Updates the prefix used for getting player sprites for the scene
+	 */
+	void setPlayerSpritesPrefix();
+public:
+	Scene1xx(MADSEngine *vm) : PhantomScene(vm) {}
+};
+
+class Scene101 : public Scene1xx {
+private:
+	// TODO
+
+public:
+	Scene101(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
+
+class Scene102 : public Scene1xx {
+private:
+	bool _animRunningFl;
+
+public:
+	Scene102(MADSEngine *vm);
+	virtual void synchronize(Common::Serializer &s);
+
+	virtual void setup();
+	virtual void enter();
+	virtual void step();
+	virtual void preActions();
+	virtual void actions();
+};
+
+} // End of namespace Phantom
+} // End of namespace MADS
+
+#endif /* MADS_PHANTOM_SCENES1_H */


Commit: b6aa297fc8596e73177ec0bf76be0b4c039e3eb1
    https://github.com/scummvm/scummvm/commit/b6aa297fc8596e73177ec0bf76be0b4c039e3eb1
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-04T01:51:48+03:00

Commit Message:
TONY: Fix inclusion of util.h

Changed paths:
    engines/tony/window.cpp



diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp
index 3b36874..d312d58 100644
--- a/engines/tony/window.cpp
+++ b/engines/tony/window.cpp
@@ -28,7 +28,7 @@
 
 #include "common/scummsys.h"
 #include "graphics/surface.h"
-#include "util.h"
+#include "engines/util.h"
 #include "tony/window.h"
 #include "tony/game.h"
 #include "tony/tony.h"






More information about the Scummvm-git-logs mailing list