[Scummvm-cvs-logs] scummvm master -> 0c2dfd2efca1bee7babf9c6acadaca052e1aae25

dreammaster dreammaster at scummvm.org
Mon Sep 12 13:57:15 CEST 2011


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

Summary:
0c2dfd2efc TSAGE: Implemented Scene 800 - Jamison & Ryan


Commit: 0c2dfd2efca1bee7babf9c6acadaca052e1aae25
    https://github.com/scummvm/scummvm/commit/0c2dfd2efca1bee7babf9c6acadaca052e1aae25
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-09-12T04:51:22-07:00

Commit Message:
TSAGE: Implemented Scene 800 - Jamison & Ryan

Changed paths:
  A engines/tsage/blue_force/blueforce_scenes8.cpp
  A engines/tsage/blue_force/blueforce_scenes8.h
    engines/tsage/blue_force/blueforce_logic.cpp
    engines/tsage/blue_force/blueforce_speakers.cpp
    engines/tsage/blue_force/blueforce_speakers.h
    engines/tsage/core.cpp
    engines/tsage/core.h
    engines/tsage/module.mk



diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp
index 0a64e90..c8a647f 100644
--- a/engines/tsage/blue_force/blueforce_logic.cpp
+++ b/engines/tsage/blue_force/blueforce_logic.cpp
@@ -26,6 +26,7 @@
 #include "tsage/blue_force/blueforce_scenes1.h"
 #include "tsage/blue_force/blueforce_scenes3.h"
 #include "tsage/blue_force/blueforce_scenes6.h"
+#include "tsage/blue_force/blueforce_scenes8.h"
 #include "tsage/scenes.h"
 #include "tsage/tsage.h"
 #include "tsage/graphics.h"
@@ -125,6 +126,8 @@ Scene *BlueForceGame::createScene(int sceneNumber) {
 	case 710:
 		error("Scene group 7 not implemented");
 	case 800:
+		// Jamison & Ryan
+		return new Scene800();
 	case 810:
 	case 820:
 	case 830:
diff --git a/engines/tsage/blue_force/blueforce_scenes8.cpp b/engines/tsage/blue_force/blueforce_scenes8.cpp
new file mode 100644
index 0000000..5833050
--- /dev/null
+++ b/engines/tsage/blue_force/blueforce_scenes8.cpp
@@ -0,0 +1,361 @@
+/* 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 "tsage/blue_force/blueforce_scenes8.h"
+#include "tsage/blue_force/blueforce_dialogs.h"
+#include "tsage/scenes.h"
+#include "tsage/tsage.h"
+#include "tsage/staticres.h"
+
+namespace TsAGE {
+
+namespace BlueForce {
+
+/*--------------------------------------------------------------------------
+ * Scene 800 - Jamison & Ryan
+ *
+ *--------------------------------------------------------------------------*/
+
+bool Scene800::Item1::startAction(CursorType action, Event &event) {
+	if (action == CURSOR_LOOK) {
+		SceneItem::display2(800, 11);
+		return true;
+	} else {
+		return SceneHotspot::startAction(action, event);
+	}
+}
+
+bool Scene800::Item2::startAction(CursorType action, Event &event) {
+	if (action == CURSOR_LOOK) {
+		SceneItem::display2(800, 1);
+		return true;
+	} else {
+		return SceneHotspot::startAction(action, event);
+	}
+}
+
+/*--------------------------------------------------------------------------*/
+
+bool Scene800::Doorway::startAction(CursorType action, Event &event) {
+	Scene800 *scene = (Scene800 *)BF_GLOBALS._sceneManager._scene;
+
+	switch (action) {
+	case CURSOR_LOOK:
+		SceneItem::display2(800, 4);
+		return true;
+	case CURSOR_USE:
+		if (BF_GLOBALS._dayNumber == 5)
+			SceneItem::display2(800, 14);
+		else if (BF_GLOBALS._dayNumber < 2)
+			SceneItem::display2(800, BF_GLOBALS.getFlag(onDuty) ? 6 : 15);
+		else if (((BF_INVENTORY.getObjectScene(INV_SCHEDULE) == 1) && (BF_GLOBALS._dayNumber == 3)) ||
+				(BF_GLOBALS._bookmark == bDoneWithIsland))
+			SceneItem::display(800, 5);
+		else {
+			if (BF_GLOBALS.getFlag(fWithLyle)) {
+				ADD_PLAYER_MOVER_NULL(scene->_lyle, 277, 145);
+			}
+
+			BF_GLOBALS._player.disableControl();
+			scene->_sceneMode = 8000;
+			setAction(&scene->_sequenceManager, scene, 8000, &BF_GLOBALS._player, this, NULL);
+		}
+		return true;
+	default:
+		return NamedObject::startAction(action, event);
+	}
+}
+
+bool Scene800::Car1::startAction(CursorType action, Event &event) {
+	Scene800 *scene = (Scene800 *)BF_GLOBALS._sceneManager._scene;
+
+	switch (action) {
+	case CURSOR_LOOK:
+		SceneItem::display2(800, 2);
+		return true;
+	case CURSOR_USE:
+		SceneItem::display2(800, 3);
+		return true;
+	case INV_TICKET_BOOK:
+		if (BF_GLOBALS.getFlag(ticketVW))
+			SceneItem::display2(800, 12);
+		else if (!BF_GLOBALS.getFlag(onDuty))
+			SceneItem::display2(800, 13);
+		else {
+			BF_GLOBALS.setFlag(ticketVW);
+			BF_GLOBALS._player.disableControl();
+			BF_GLOBALS._uiElements.addScore(30);
+			scene->_sceneMode = 8005;
+			scene->setAction(&scene->_action1);
+		}
+		return true;
+	default:
+		return NamedObject::startAction(action, event);
+	}
+}
+
+bool Scene800::Motorcycle::startAction(CursorType action, Event &event) {
+	Scene800 *scene = (Scene800 *)BF_GLOBALS._sceneManager._scene;
+
+	switch (action) {
+	case CURSOR_LOOK:
+		SceneItem::display2(800, 0);
+		return true;
+	case CURSOR_USE:
+		if (BF_GLOBALS.getFlag(fWithLyle))
+			SceneItem::display2(800, 8);
+		else {
+			BF_GLOBALS._player.disableControl();
+			scene->_sceneMode = 8002;
+			setAction(&scene->_sequenceManager, scene, 8002, &BF_GLOBALS._player, this, NULL);
+		}
+		return true;
+	default:
+		return NamedObject::startAction(action, event);
+	}
+}
+
+bool Scene800::Lyle::startAction(CursorType action, Event &event) {
+	Scene800 *scene = (Scene800 *)BF_GLOBALS._sceneManager._scene;
+
+	switch (action) {
+	case CURSOR_LOOK:
+		SceneItem::display2(800, 7);
+		return true;
+	case CURSOR_TALK:
+		BF_GLOBALS._player.disableControl();
+		scene->_sceneMode = 8001;
+		scene->_stripManager.start(8003, scene);
+		return true;
+	default:
+		return NamedObject::startAction(action, event);
+	}
+}
+
+bool Scene800::Car2::startAction(CursorType action, Event &event) {
+	Scene800 *scene = (Scene800 *)BF_GLOBALS._sceneManager._scene;
+
+	switch (action) {
+	case CURSOR_LOOK:
+		SceneItem::display2(800, 9);
+		return true;
+	case CURSOR_USE:
+		if (!BF_GLOBALS.getFlag(fWithLyle))
+			SceneItem::display2(800, 10);
+		else {
+			BF_GLOBALS._player.disableControl();
+			scene->_sceneMode = 8003;
+			setAction(&scene->_sequenceManager, scene, 8003, &BF_GLOBALS._player, &scene->_lyle, NULL);
+		}
+		return true;
+	default:
+		return NamedObject::startAction(action, event);
+	}
+}
+
+/*--------------------------------------------------------------------------*/
+
+void Scene800::Action1::signal() {
+	Scene800 *scene = (Scene800 *)BF_GLOBALS._sceneManager._scene;
+
+	switch (_actionIndex++) {
+	case 0: {
+		BF_GLOBALS._player.disableControl();
+		ADD_PLAYER_MOVER_THIS(BF_GLOBALS._player, 95, 153);
+		break;
+	}
+	case 1: {
+		ADD_MOVER(BF_GLOBALS._player, 70, 157);
+		break;
+	}
+	case 2:
+		BF_GLOBALS._player.setVisage(800);
+		BF_GLOBALS._player.setStrip(1);
+		BF_GLOBALS._player.setFrame(1);
+		BF_GLOBALS._player.fixPriority(200);
+		BF_GLOBALS._player.animate(ANIM_MODE_4, 16, 1, this);
+		break;
+	case 3:
+		scene->_object6.postInit();
+		scene->_object6.setVisage(800);
+		scene->_object6.setStrip(2);
+		scene->_object6.setFrame(2);
+		scene->_object6.setPosition(Common::Point(58, 135));
+		scene->_object6.fixPriority(170);
+		scene->_object6.animate(ANIM_MODE_5, this);
+		break;
+	case 4:
+		BF_GLOBALS._player.setVisage(352);
+		BF_GLOBALS._player.setStrip(2);
+		BF_GLOBALS._player.setFrame(1);
+		BF_GLOBALS._player.fixPriority(-1);
+		BF_GLOBALS._player.animate(ANIM_MODE_1, NULL);
+		ADD_MOVER(BF_GLOBALS._player, 89, 154);
+		break;
+	case 5:
+		BF_GLOBALS._player.enableControl();
+		remove();
+		break;
+	}
+
+}
+
+/*--------------------------------------------------------------------------*/
+
+void Scene800::postInit(SceneObjectList *OwnerList) {
+	loadScene(800);
+	SceneExt::postInit();
+	setZoomPercents(130, 50, 155, 100);
+
+	_stripManager.addSpeaker(&_gameTextSpeaker);
+	_stripManager.addSpeaker(&_jakeJacketSpeaker);
+	_stripManager.addSpeaker(&_lyleHatSpeaker);
+
+	BF_GLOBALS._player.postInit();
+	BF_GLOBALS._player.setVisage(1358);
+	BF_GLOBALS._player.animate(ANIM_MODE_1, NULL);
+	BF_GLOBALS._player.setObjectWrapper(new SceneObjectWrapper());
+	BF_GLOBALS._player.setPosition(Common::Point(319, 144));
+	BF_GLOBALS._player._moveDiff = Common::Point(3, 2);
+	BF_GLOBALS._player.changeZoom(-1);
+
+	_motorcycle.postInit();
+	_motorcycle.setVisage(301);
+	_motorcycle.setPosition(Common::Point(319, 162));
+
+	if ((BF_GLOBALS._dayNumber >= 2) && (BF_GLOBALS._dayNumber < 5)) {
+		_car2.postInit();
+		_car2.setVisage(444);
+		_car2.setStrip(3);
+		_car2.setFrame(2);
+		_car2.setPosition(Common::Point(237, 161));
+		_car2.changeZoom(110);
+		_car2.fixPriority(158);
+		BF_GLOBALS._sceneItems.push_back(&_car2);
+
+		BF_GLOBALS._walkRegions.proc1(8);
+	}
+
+	if ((BF_GLOBALS._dayNumber == 4) && (BF_GLOBALS._bookmark < bEndDayThree)) {
+		_car2.remove();
+		BF_GLOBALS._walkRegions.proc2(8);
+	}
+
+	if (BF_GLOBALS.getFlag(fWithLyle)) {
+		_lyle.postInit();
+		_lyle.setVisage(1359);
+		_lyle.setObjectWrapper(new SceneObjectWrapper());
+		_lyle.animate(ANIM_MODE_1, NULL);
+		_lyle.setPosition(Common::Point(210, 160));
+		_lyle.changeZoom(-1);
+		BF_GLOBALS._sceneItems.push_back(&_lyle);
+
+		_motorcycle.setVisage(580);
+		_motorcycle.setStrip(2);
+		_motorcycle.setFrame(2);
+	} else if (BF_GLOBALS.getFlag(onDuty)) {
+		BF_GLOBALS._player.setVisage(352);
+	} else {
+		_motorcycle.setVisage(580);
+		_motorcycle.setStrip(2);
+		_motorcycle.setFrame(2);
+	}
+	BF_GLOBALS._sceneItems.push_back(&_motorcycle);
+
+	_doorway.postInit();
+	_doorway.setVisage(800);
+	_doorway.setStrip(3);
+	_doorway.setPosition(Common::Point(287, 140));
+	BF_GLOBALS._sceneItems.push_back(&_doorway);
+
+	_car1.postInit();
+	_car1.setVisage(800);
+	_car1.setStrip(2);
+	_car1.setFrame(1);
+	_car1.setPosition(Common::Point(58, 163));
+	BF_GLOBALS._sceneItems.push_back(&_car1);
+
+	if (BF_GLOBALS._sceneManager._previousScene == 810) {
+		if (BF_GLOBALS.getFlag(fWithLyle)) {
+			BF_GLOBALS._player.setPosition(Common::Point(271, 148));
+			BF_GLOBALS._player.enableControl();
+		} else {
+			BF_GLOBALS._player.changeZoom(75);
+			BF_GLOBALS._player.setPosition(Common::Point(275, 135));
+			BF_GLOBALS._player.disableControl();
+			_sceneMode = 8001;
+			setAction(&_sequenceManager, this, 8001, &BF_GLOBALS._player, &_doorway, NULL);
+		}
+	} else if ((BF_INVENTORY.getObjectScene(INV_SCHEDULE) == 1) && (BF_GLOBALS._bookmark == bFlashBackThree)) {
+		BF_GLOBALS._bookmark = bFlashBackThree;
+		BF_GLOBALS._player.disableControl();
+		BF_GLOBALS._player.setPosition(Common::Point(231, 150));
+		BF_GLOBALS._player.setStrip(3);
+
+		_lyle.setPosition(Common::Point(244, 162));
+		_lyle.setStrip(4);
+		_sceneMode = 8004;
+		setAction(&_sequenceManager, this, 8001, &_lyle, &_doorway, NULL);
+	} else {
+		BF_GLOBALS._player.updateAngle(_motorcycle._position);
+		BF_GLOBALS._player.enableControl();
+	}
+
+	_item2.setBounds(Rect(47, 26, 319, 143));
+	BF_GLOBALS._sceneItems.push_back(&_item2);
+	_item1.setBounds(Rect(0, 0, 320, 165));
+	BF_GLOBALS._sceneItems.push_back(&_item1);
+
+	BF_GLOBALS._sound1.fadeSound(33);
+}
+
+void Scene800::signal() {
+	switch (_sceneMode) {
+	case 8000:
+		BF_GLOBALS._sceneManager.changeScene(810);
+		break;
+	case 8001:
+	case 8005:
+		BF_GLOBALS._player.enableControl();
+		break;
+	case 8002:
+	case 8003:
+		BF_GLOBALS._sceneManager.changeScene(60);
+		break;
+	case 8004:
+		BF_GLOBALS.clearFlag(fWithLyle);
+		_lyle.remove();
+	}
+}
+
+void Scene800::dispatch() {
+	SceneExt::dispatch();
+	if (BF_GLOBALS._player.getRegionIndex() == 7) {
+		BF_GLOBALS._player.updateZoom();
+	} else {
+		BF_GLOBALS._player.changeZoom(-1);
+	}
+}
+
+} // End of namespace BlueForce
+
+} // End of namespace TsAGE
diff --git a/engines/tsage/blue_force/blueforce_scenes8.h b/engines/tsage/blue_force/blueforce_scenes8.h
new file mode 100644
index 0000000..5d87094
--- /dev/null
+++ b/engines/tsage/blue_force/blueforce_scenes8.h
@@ -0,0 +1,106 @@
+/* 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 TSAGE_BLUEFORCE_SCENES8_H
+#define TSAGE_BLUEFORCE_SCENES8_H
+
+#include "common/scummsys.h"
+#include "tsage/blue_force/blueforce_logic.h"
+#include "tsage/blue_force/blueforce_speakers.h"
+#include "tsage/converse.h"
+#include "tsage/events.h"
+#include "tsage/core.h"
+#include "tsage/scenes.h"
+#include "tsage/globals.h"
+#include "tsage/sound.h"
+
+namespace TsAGE {
+
+namespace BlueForce {
+
+using namespace TsAGE;
+
+class Scene800: public SceneExt {
+	/* Actions */
+	class Action1 : public Action {
+	public:
+		virtual void signal();
+	};
+
+	/* Items */
+	class Item1: public SceneHotspot {
+	public:
+		virtual bool startAction(CursorType action, Event &event);
+	};
+	class Item2: public SceneHotspot {
+	public:
+		virtual bool startAction(CursorType action, Event &event);
+	};
+
+	/* Objects */
+	class Doorway: public NamedObject {
+	public:
+		virtual bool startAction(CursorType action, Event &event);
+	};
+	class Car1: public NamedObject {
+	public:
+		virtual bool startAction(CursorType action, Event &event);
+	};
+	class Motorcycle: public NamedObject {
+	public:
+		virtual bool startAction(CursorType action, Event &event);
+	};
+	class Lyle: public NamedObject {
+	public:
+		virtual bool startAction(CursorType action, Event &event);
+	};
+	class Car2: public NamedObject {
+	public:
+		virtual bool startAction(CursorType action, Event &event);
+	};
+
+public:
+	Action1 _action1;
+	SequenceManager _sequenceManager;
+	SpeakerJakeJacket _jakeJacketSpeaker;
+	SpeakerLyleHat _lyleHatSpeaker;
+	SpeakerGameText _gameTextSpeaker;
+	Doorway _doorway;
+	Car1 _car1;
+	Motorcycle _motorcycle;
+	Lyle _lyle;
+	Car2 _car2;
+	NamedObject _object6;
+	Item1 _item1;
+	Item2 _item2;
+	SceneText _text;
+
+	virtual void postInit(SceneObjectList *OwnerList = NULL);
+	virtual void signal();
+	virtual void dispatch();
+};
+
+} // End of namespace BlueForce
+
+} // End of namespace TsAGE
+
+#endif
diff --git a/engines/tsage/blue_force/blueforce_speakers.cpp b/engines/tsage/blue_force/blueforce_speakers.cpp
index dc2511d..453cb72 100644
--- a/engines/tsage/blue_force/blueforce_speakers.cpp
+++ b/engines/tsage/blue_force/blueforce_speakers.cpp
@@ -315,6 +315,36 @@ SpeakerJakeRadio::SpeakerJakeRadio(): VisualSpeaker() {
 	_speakerName = "JAKE_RADIO";
 }
 
+/*--------------------------------------------------------------------------*/
+
+SpeakerLyleHat::SpeakerLyleHat(): VisualSpeaker() {
+	_color1 = 29;
+	_color2 = 89;
+	_xp = 75;
+	_speakerName = "LYLEHAT";
+}
+
+void SpeakerLyleHat::setText(const Common::String &msg) {
+	_removeObject1 = _removeObject2 = true;
+
+	_object1.postInit();
+	_object1.setVisage(278);
+	_object1.setStrip2(4);
+	_object1.fixPriority(254);
+	_object1.setPosition(Common::Point(BF_GLOBALS._sceneManager._scene->_sceneBounds.left + _xp,
+		BF_GLOBALS._sceneManager._scene->_sceneBounds.top + 166));
+
+	_object2.postInit();
+	_object2.setVisage(278);
+	_object2.setStrip2(2);
+	_object2.fixPriority(255);
+	_object2.setPosition(Common::Point(BF_GLOBALS._sceneManager._scene->_sceneBounds.left + _xp,
+		BF_GLOBALS._sceneManager._scene->_sceneBounds.top + 166));
+
+	VisualSpeaker::setText(msg);
+	_object2.fixCountdown(8, _numFrames);
+}
+
 } // End of namespace BlueForce
 
 } // End of namespace TsAGE
diff --git a/engines/tsage/blue_force/blueforce_speakers.h b/engines/tsage/blue_force/blueforce_speakers.h
index c059385..12eb97c 100644
--- a/engines/tsage/blue_force/blueforce_speakers.h
+++ b/engines/tsage/blue_force/blueforce_speakers.h
@@ -131,6 +131,13 @@ public:
 	virtual Common::String getClassName() { return "SpeakerJakeRadio"; }
 };
 
+class SpeakerLyleHat: public VisualSpeaker {
+public:
+	SpeakerLyleHat();
+
+	virtual Common::String getClassName() { return "SpeakerLyleHat"; }
+	virtual void setText(const Common::String &msg);
+};
 
 } // End of namespace BlueForce
 
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 0de400f..7656a6c 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -33,6 +33,7 @@
 #include "tsage/staticres.h"
 #include "tsage/globals.h"
 #include "tsage/sound.h"
+#include "tsage/blue_force/blueforce_logic.h"
 
 namespace TsAGE {
 
@@ -1683,6 +1684,16 @@ void SceneItem::display(const Common::String &msg) {
 
 /*--------------------------------------------------------------------------*/
 
+bool SceneHotspot::startAction(CursorType action, Event &event) {
+	if (_vm->getGameID() != GType_BlueForce)
+		return SceneItem::startAction(action, event);
+	else {
+		BlueForce::SceneExt *scene = (BlueForce::SceneExt *)BF_GLOBALS._sceneManager._scene;
+		assert(scene);
+		return scene->display(action);
+	}
+}
+
 void SceneHotspot::doAction(int action) {
 	switch ((int)action) {
 	case CURSOR_LOOK:
@@ -3820,27 +3831,30 @@ void SceneHandler::process(Event &event) {
 			}
 
 			// Scan the item list to find one the mouse is within
-			SynchronizedList<SceneItem *>::iterator i = _globals->_sceneItems.begin();
-			while ((i != _globals->_sceneItems.end()) && !(*i)->contains(event.mousePos))
-				++i;
-
-			if (i != _globals->_sceneItems.end()) {
-				// Pass the action to the item
-				(*i)->startAction(_globals->_events.getCursor(), event);
-
-				event.handled = _globals->_events.getCursor() != CURSOR_WALK;
-
-				if (_globals->_player._uiEnabled && _globals->_player._canWalk &&
-						(_globals->_events.getCursor() != CURSOR_LOOK)) {
-					_globals->_events.setCursor(CURSOR_WALK);
-				} else if (_globals->_player._canWalk && (_globals->_events.getCursor() != CURSOR_LOOK)) {
-					_globals->_events.setCursor(CURSOR_WALK);
-				} else if (_globals->_player._uiEnabled && (_globals->_events.getCursor() != CURSOR_LOOK)) {
-					_globals->_events.setCursor(CURSOR_USE);
-				}
+			SynchronizedList<SceneItem *>::iterator i;
+			for (i = _globals->_sceneItems.begin(); i != _globals->_sceneItems.end(); ++i) {
+				if ((*i)->contains(event.mousePos)) {
+					// Pass the action to the item
+					bool handled = (*i)->startAction(_globals->_events.getCursor(), event);
+					if (!handled)
+						// Item wasn't handled, keep scanning
+						continue;
+
+					event.handled = _globals->_events.getCursor() != CURSOR_WALK;
+
+					if (_globals->_player._uiEnabled && _globals->_player._canWalk &&
+							(_globals->_events.getCursor() != CURSOR_LOOK)) {
+						_globals->_events.setCursor(CURSOR_WALK);
+					} else if (_globals->_player._canWalk && (_globals->_events.getCursor() != CURSOR_LOOK)) {
+						_globals->_events.setCursor(CURSOR_WALK);
+					} else if (_globals->_player._uiEnabled && (_globals->_events.getCursor() != CURSOR_LOOK)) {
+						_globals->_events.setCursor(CURSOR_USE);
+					}
 
-				if (_vm->getGameID() == GType_BlueForce)
-					event.handled = true;
+					if (_vm->getGameID() == GType_BlueForce)
+						event.handled = true;
+					break;
+				}
 			}
 
 			// Handle any fallback text display
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index ccb3817..a4af980 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -440,7 +440,7 @@ public:
 class SceneHotspot : public SceneItem {
 public:
 	SceneHotspot() : SceneItem() {}
-
+	virtual bool startAction(CursorType action, Event &event);
 	virtual Common::String getClassName() { return "SceneHotspot"; }
 	virtual void doAction(int action);
 };
@@ -450,6 +450,7 @@ public:
 	int _resNum, _lookLineNum, _useLineNum, _talkLineNum;
 	NamedHotspot();
 
+
 	virtual void doAction(int action);
 	virtual Common::String getClassName() { return "NamedHotspot"; }
 	virtual void synchronize(Serializer &s);
@@ -823,6 +824,7 @@ public:
 		return _regionList[idx - 1];
 	}
 	void proc1(int v) { warning("TODO: WalkRegions::proc1"); }
+	void proc2(int v) { warning("TODO: WalkRegions::proc2"); }
 };
 
 /*--------------------------------------------------------------------------*/
diff --git a/engines/tsage/module.mk b/engines/tsage/module.mk
index b0279c0..b704f34 100644
--- a/engines/tsage/module.mk
+++ b/engines/tsage/module.mk
@@ -7,6 +7,7 @@ MODULE_OBJS := \
 	blue_force/blueforce_scenes1.o \
 	blue_force/blueforce_scenes3.o \
 	blue_force/blueforce_scenes6.o \
+	blue_force/blueforce_scenes8.o \
 	blue_force/blueforce_speakers.o \
 	blue_force/blueforce_ui.o \
 	converse.o \






More information about the Scummvm-git-logs mailing list