aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2011-10-06 23:09:23 +1100
committerPaul Gilbert2011-10-06 23:09:23 +1100
commit964ac1fad6f7ae880a3abe403a3aedf9235139a0 (patch)
treefd49c231287730c491fe7cf4e9195b8a9dbc1568 /engines
parent14e6638480d477a50b013932dfcbaa7219082512 (diff)
downloadscummvm-rg350-964ac1fad6f7ae880a3abe403a3aedf9235139a0.tar.gz
scummvm-rg350-964ac1fad6f7ae880a3abe403a3aedf9235139a0.tar.bz2
scummvm-rg350-964ac1fad6f7ae880a3abe403a3aedf9235139a0.zip
TSAGE: Implemented Blue Force scene 271 - Living Room/Kitchen #2
Diffstat (limited to 'engines')
-rw-r--r--engines/tsage/blue_force/blueforce_logic.cpp97
-rw-r--r--engines/tsage/blue_force/blueforce_logic.h5
-rw-r--r--engines/tsage/blue_force/blueforce_scenes2.cpp446
-rw-r--r--engines/tsage/blue_force/blueforce_scenes2.h55
-rw-r--r--engines/tsage/blue_force/blueforce_scenes4.cpp4
-rw-r--r--engines/tsage/blue_force/blueforce_scenes5.cpp4
-rw-r--r--engines/tsage/blue_force/blueforce_scenes6.cpp12
-rw-r--r--engines/tsage/blue_force/blueforce_scenes9.cpp2
-rw-r--r--engines/tsage/blue_force/blueforce_speakers.cpp18
-rw-r--r--engines/tsage/blue_force/blueforce_speakers.h14
-rw-r--r--engines/tsage/events.h2
-rw-r--r--engines/tsage/globals.cpp2
-rw-r--r--engines/tsage/globals.h1
13 files changed, 645 insertions, 17 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp
index b76ec83e3e..247fc4b9f2 100644
--- a/engines/tsage/blue_force/blueforce_logic.cpp
+++ b/engines/tsage/blue_force/blueforce_logic.cpp
@@ -98,6 +98,8 @@ Scene *BlueForceGame::createScene(int sceneNumber) {
// Living Room & Kitchen
return new Scene270();
case 271:
+ // Living Room & Kitchen #2
+ return new Scene271();
case 280:
error("Scene group 2 not implemented");
case 300:
@@ -832,7 +834,7 @@ PaletteFader *PalettedScene::addFader(const byte *arrBufferRGB, int step, Action
return BF_GLOBALS._scenePalette.addFader(arrBufferRGB, 1, step, action);
}
-void PalettedScene::sub15DD6(const byte *arrBufferRGB, int step, int paletteNum, Action *action) {
+void PalettedScene::add2Faders(const byte *arrBufferRGB, int step, int paletteNum, Action *action) {
BF_GLOBALS._scenePalette.addFader(arrBufferRGB, 1, 100, NULL);
_palette.loadPalette(paletteNum);
_palette.loadPalette(2);
@@ -986,7 +988,7 @@ BlueForceInvObjectList::BlueForceInvObjectList():
_greensKnife(9, 4, 4),
_dogWhistle(9, 4, 5),
_ammoBelt(9, 1, 2),
- _lastInvent(9, 4, 7) {
+ _alleyCatKey(9, 4, 7) {
// Add the items to the list
_itemList.push_back(&_none);
@@ -1056,7 +1058,7 @@ BlueForceInvObjectList::BlueForceInvObjectList():
_itemList.push_back(&_greensKnife);
_itemList.push_back(&_dogWhistle);
_itemList.push_back(&_ammoBelt);
- _itemList.push_back(&_lastInvent);
+ _itemList.push_back(&_alleyCatKey);
}
void BlueForceInvObjectList::reset() {
@@ -1141,6 +1143,95 @@ void BlueForceInvObjectList::setObjectScene(int objectNum, int sceneNumber) {
BF_GLOBALS._uiElements.updateInventory();
}
+void BlueForceInvObjectList::alterInventory(int mode) {
+ // Check for existing specific items in player's inventory
+ bool hasPrintout = getObjectScene(INV_PRINT_OUT) == 1;
+ bool hasRags = getObjectScene(INV_RAGS) == 1;
+ bool hasJar = getObjectScene(INV_JAR) == 1;
+ bool hasNickel = getObjectScene(INV_NICKEL) == 1;
+ bool hasCrate1 = getObjectScene(INV_CRATE1) == 1; //di
+ bool hasForestRap = getObjectScene(INV_FOREST_RAP) == 1;
+ bool hasRentalCoupon = getObjectScene(INV_RENTAL_COUPON) == 1; //si
+ bool hasWarehouseKeys = getObjectScene(INV_WAREHOUSE_KEYS) == 1;
+ bool hasCobbRap = getObjectScene(INV_COBB_RAP) == 1;
+ bool hasHook = getObjectScene(INV_HOOK) == 1;
+ bool hasMugShot = getObjectScene(INV_MUG_SHOT) == 1;
+
+ // Remove any items currently in player's inventory
+ SynchronizedList<InvObject *>::iterator i;
+ for (i = _itemList.begin(); i != _itemList.end(); ++i) {
+ if ((*i)->_sceneNumber == 1)
+ (*i)->_sceneNumber = 0;
+ }
+
+ // Give basic set of items back into inventory
+ setObjectScene(INV_COLT45, 1);
+ setObjectScene(INV_HANDCUFFS, 1);
+ setObjectScene(INV_AMMO_BELT, 1);
+ setObjectScene(INV_ID, 1);
+
+ // Reset ticket book and miranda card back to motorcycle
+ setObjectScene(INV_TICKET_BOOK, 60);
+ setObjectScene(INV_MIRANDA_CARD, 60);
+
+ BF_GLOBALS._v4CEC4 = 0;
+
+ switch (mode) {
+ case 2:
+ if (hasPrintout)
+ setObjectScene(INV_PRINT_OUT, 1);
+ if (hasNickel)
+ setObjectScene(INV_NICKEL, 1);
+ if (hasForestRap)
+ setObjectScene(INV_FOREST_RAP, 1);
+ if (hasCrate1)
+ setObjectScene(INV_CRATE1, 1);
+ if (hasRentalCoupon)
+ setObjectScene(INV_RENTAL_COUPON, 1);
+ if (hasHook)
+ setObjectScene(INV_HOOK, 1);
+ break;
+ case 3:
+ if (hasPrintout)
+ setObjectScene(INV_PRINT_OUT, 1);
+ if (hasNickel)
+ setObjectScene(INV_NICKEL, 1);
+ if (hasForestRap)
+ setObjectScene(INV_FOREST_RAP, 1);
+ if (hasCrate1)
+ setObjectScene(INV_CRATE1, 1);
+ if (hasRentalCoupon)
+ setObjectScene(INV_RENTAL_COUPON, 1);
+ if (hasCobbRap)
+ setObjectScene(INV_COBB_RAP, 1);
+ if (hasHook)
+ setObjectScene(INV_HOOK, 1);
+ if (hasMugShot)
+ setObjectScene(INV_MUG_SHOT, 1);
+ break;
+ case 4:
+ if (hasNickel)
+ setObjectScene(INV_NICKEL, 1);
+ if (hasRentalCoupon)
+ setObjectScene(INV_RENTAL_COUPON, 1);
+ if (hasHook)
+ setObjectScene(INV_HOOK, 1);
+ break;
+ case 5:
+ if (hasRags)
+ setObjectScene(INV_RAGS, 1);
+ if (hasJar)
+ setObjectScene(INV_JAR, 1);
+ if (hasRentalCoupon)
+ setObjectScene(INV_RENTAL_COUPON, 1);
+ if (hasWarehouseKeys)
+ setObjectScene(INV_WAREHOUSE_KEYS, 1);
+ break;
+ default:
+ break;
+ }
+}
+
/*--------------------------------------------------------------------------*/
} // End of namespace BlueForce
diff --git a/engines/tsage/blue_force/blueforce_logic.h b/engines/tsage/blue_force/blueforce_logic.h
index 3fa7beeb73..dcaea52444 100644
--- a/engines/tsage/blue_force/blueforce_logic.h
+++ b/engines/tsage/blue_force/blueforce_logic.h
@@ -235,7 +235,7 @@ public:
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void remove();
PaletteFader *addFader(const byte *arrBufferRGB, int step, Action *action);
- void sub15DD6(const byte *arrBufferRGB, int step, int paletteNum, Action *action);
+ void add2Faders(const byte *arrBufferRGB, int step, int paletteNum, Action *action);
void sub15E4F(const byte *arrBufferRGB, int arg8, int paletteNum, Action *action, int fromColor1, int fromColor2, int toColor1, int toColor2, bool flag);
};
@@ -317,11 +317,12 @@ public:
InvObject _greensKnife;
InvObject _dogWhistle;
InvObject _ammoBelt;
- InvObject _lastInvent;
+ InvObject _alleyCatKey;
BlueForceInvObjectList();
void reset();
void setObjectScene(int objectNum, int sceneNumber);
+ void alterInventory(int mode);
virtual Common::String getClassName() { return "BlueForceInvObjectList"; }
};
diff --git a/engines/tsage/blue_force/blueforce_scenes2.cpp b/engines/tsage/blue_force/blueforce_scenes2.cpp
index 5f36945a6c..7d66c7a52b 100644
--- a/engines/tsage/blue_force/blueforce_scenes2.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes2.cpp
@@ -1269,6 +1269,452 @@ void Scene270::dispatch() {
SceneExt::dispatch();
}
+/*--------------------------------------------------------------------------
+ * Scene 271 - Living Room & Kitchen #2
+ *
+ *--------------------------------------------------------------------------*/
+
+void Scene271::Action1::signal() {
+ Scene271 *scene = (Scene271 *)BF_GLOBALS._sceneManager._scene;
+
+ scene->setAction(&scene->_sequenceManager2, this, 2703, &scene->_tv, NULL);
+}
+
+/*--------------------------------------------------------------------------*/
+
+bool Scene271::Object12::startAction(CursorType action, Event &event) {
+ Scene271 *scene = (Scene271 *)BF_GLOBALS._sceneManager._scene;
+
+ switch (action) {
+ case CURSOR_TALK:
+ if (BF_GLOBALS._dayNumber == 1) {
+ if (!BF_GLOBALS.getFlag(onDuty) && (BF_INVENTORY.getObjectScene(INV_BASEBALL_CARD) != 2)) {
+ scene->_sceneMode = 2715;
+ scene->setAction(&scene->_sequenceManager1, scene, 2715, &BF_GLOBALS._player, NULL);
+ return true;
+ }
+ } else if (BF_GLOBALS._dayNumber == 3) {
+ if (scene->_field796 == 1) {
+ scene->_stripManager.start(2712, &BF_GLOBALS._stripProxy);
+ return true;
+ } else if (BF_GLOBALS.getFlag(fGotGreen355fTalkedToGrannyDay3)) {
+ scene->_stripManager.start(2714, &BF_GLOBALS._stripProxy);
+ return true;
+ } else {
+ BF_GLOBALS._player.disableControl();
+ scene->_sceneMode = 2713;
+ scene->setAction(&scene->_sequenceManager1, scene, 2713, &BF_GLOBALS._player, &scene->_object12, NULL);
+ BF_GLOBALS.setFlag(fGotGreen355fTalkedToGrannyDay3);
+ return true;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ return NamedObject::startAction(action, event);
+}
+
+/*--------------------------------------------------------------------------*/
+
+bool Scene271::Item::startAction(CursorType action, Event &event) {
+ Scene271 *scene = (Scene271 *)BF_GLOBALS._sceneManager._scene;
+
+ if ((action == CURSOR_USE) && !scene->_field796) {
+ BF_GLOBALS._player.disableControl();
+ scene->_object1.postInit();
+ scene->_object1.hide();
+
+ scene->_sceneMode = 2705;
+ scene->setAction(&scene->_sequenceManager1, scene, 2705, &BF_GLOBALS._player, &scene->_object1, NULL);
+ return true;
+ } else {
+ return NamedHotspot::startAction(action, event);
+ }
+}
+
+bool Scene271::Exit::startAction(CursorType action, Event &event) {
+ Scene271 *scene = (Scene271 *)BF_GLOBALS._sceneManager._scene;
+
+ if (!scene->_action) {
+ if (scene->_field796 == 1) {
+ scene->_tempPos = Common::Point(320, 140);
+ BF_GLOBALS._player.disableControl();
+ scene->_sceneMode = 2706;
+ scene->setAction(&scene->_sequenceManager1, scene, 2706, &BF_GLOBALS._player, &scene->_object1, NULL);
+ } else {
+ ADD_PLAYER_MOVER_NULL(BF_GLOBALS._player, 320, 140);
+ }
+ }
+
+ return true;
+}
+
+/*--------------------------------------------------------------------------*/
+
+Scene271::Scene271() {
+ _field796 = _field2E16 = 0;
+ _tempPos.x = _tempPos.y = 0;
+ _rect1 = Rect(236, 120, 266, 130);
+}
+
+void Scene271::synchronize(Serializer &s) {
+ PalettedScene::synchronize(s);
+
+ s.syncAsSint16LE(_field796);
+ s.syncAsSint16LE(_field2E16);
+ s.syncAsSint16LE(_tempPos.x);
+ s.syncAsSint16LE(_tempPos.y);
+ _rect1.synchronize(s);
+}
+
+void Scene271::postInit(SceneObjectList *OwnerList) {
+ PalettedScene::postInit();
+ loadScene(270);
+ setZoomPercents(120, 80, 140, 100);
+ BF_GLOBALS._sound1.fadeSound(26);
+
+ _stripManager.addSpeaker(&_grandmaSpeaker);
+ _stripManager.addSpeaker(&_lyleSpeaker);
+ _stripManager.addSpeaker(&_jakeSpeaker);
+ _stripManager.addSpeaker(&_skipSpeaker);
+ _stripManager.addSpeaker(&_lauraSpeaker);
+ _stripManager.addSpeaker(&_gameTextSpeaker);
+ _stripManager.addSpeaker(&_granTextSpeaker);
+ _stripManager.addSpeaker(&_lyleTextSpeaker);
+
+ _exit.setDetails(Rect(310, 115, 320, 167), 270, -1, -1, -1, 1, NULL);
+
+ _tv.postInit();
+ _tv.setVisage(270);
+ _tv.setPosition(Common::Point(264, 74));
+ _tv.setStrip(5);
+ _tv.fixPriority(132);
+ _tv._numFrames = 3;
+ _tv.setAction(&_action1);
+
+ if ((BF_GLOBALS._sceneManager._previousScene != 280) && (BF_GLOBALS._sceneManager._previousScene != 620)) {
+ _object10.postInit();
+ _object10.setVisage(270);
+ _object10.setStrip(2);
+ _object10.setPosition(Common::Point(302, 121));
+ _object10.fixPriority(132);
+ _object10.animate(ANIM_MODE_2, NULL);
+ }
+
+ _object5.postInit();
+ _object5.hide();
+
+ _item5.setDetails(Rect(0, 56, 56, 130), 270, 9, 10, 11, 1, NULL);
+ _object6.setDetails(270, 12, 13, 14, 1, NULL);
+ _object7.setDetails(270, 15, -1, -1, 1, NULL);
+ _object8.setDetails(270, 14, -1, -1, 1, NULL);
+ _object11.setDetails(270, -1, -1, -1, 1, NULL);
+ _tv.setDetails(270, 3, 4, 5, 1, NULL);
+ _object10.setDetails(270, 6, 7, 8, 1, NULL);
+ _object12.setDetails(270, 15, 16, 17, 1, NULL);
+ _item3.setDetails(4, 270, 27, 28, 29, 1);
+ _item1.setDetails(1, 270, 18, 19, 20, 1);
+ _item6.setDetails(Rect(278, 50, 318, 72), 270, 21, 22, 23, 1, NULL);
+ _item2.setDetails(3, 270, 24, 25, 26, 1);
+ _item4.setDetails(2, 270, 30, 31, 32, 1);
+ _item11.setDetails(Rect(0, 0, SCREEN_WIDTH, BF_INTERFACE_Y), 270, 0, 1, 2, 1, NULL);
+
+ BF_GLOBALS._player.postInit();
+ BF_GLOBALS._player._moveDiff.x = 8;
+ BF_GLOBALS._player.changeZoom(-1);
+ BF_GLOBALS._player.disableControl();
+
+ _field796 = 0;
+ _sceneMode = 0;
+ _field2E16 = 0;
+
+ if (BF_GLOBALS._dayNumber == 0) {
+ BF_GLOBALS._dayNumber = 1;
+ BF_GLOBALS._sceneManager.changeScene(180);
+ }
+
+ switch (BF_GLOBALS._sceneManager._previousScene) {
+ case 180:
+ BF_GLOBALS._walkRegions.proc1(6);
+ BF_GLOBALS._walkRegions.proc1(14);
+ BF_GLOBALS._walkRegions.proc1(19);
+
+ BF_GLOBALS._player.setVisage(151);
+ BF_GLOBALS._player.setPosition(Common::Point(348, 151));
+
+ _object12.postInit();
+ _object12.setVisage(274);
+ _object12.setPosition(Common::Point(157, 132));
+ _object12._numFrames = 5;
+ _object12.animate(ANIM_MODE_2, NULL);
+ break;
+ case 280:
+ BF_GLOBALS._player.setVisage(271);
+ BF_GLOBALS._player.setStrip(5);
+ BF_GLOBALS._player._frame = 6;
+ BF_GLOBALS._player.setPosition(Common::Point(228, 138));
+
+ _object1.postInit();
+ _object1.setPosition(Common::Point(340, 100));
+
+ _object11.postInit();
+ _object11.setVisage(272);
+ _object11.setStrip(1);
+ _object11._frame = 2;
+ _object11.setPosition(Common::Point(35, 136));
+
+ _object6.postInit();
+ _object6.hide();
+
+ BF_GLOBALS._walkRegions.proc1(6);
+ BF_GLOBALS._walkRegions.proc1(14);
+ BF_GLOBALS._walkRegions.proc1(19);
+
+ _object12.postInit();
+ _object12.setVisage(274);
+ _object12.setPosition(Common::Point(157, 132));
+ _object12.animate(ANIM_MODE_2, NULL);
+ _object12._numFrames = 5;
+ _object12.fixPriority(120);
+ _field796 = 1;
+ break;
+ case 590:
+ BF_GLOBALS._player.setVisage(275);
+ BF_GLOBALS._player.setStrip(5);
+ BF_GLOBALS._player.setPosition(Common::Point(58, 133));
+ BF_GLOBALS._player.changeZoom(-1);
+
+ _object8.postInit();
+ _object8.setVisage(279);
+ _object8.setPosition(Common::Point(87, 127));
+ _object8.fixPriority(146);
+
+ _object7.postInit();
+ _object7.setVisage(277);
+ _object7.setStrip(7);
+ _object7.setPosition(Common::Point(48, 149));
+
+ BF_GLOBALS._walkRegions.proc1(6);
+ BF_GLOBALS._walkRegions.proc1(14);
+ BF_GLOBALS._walkRegions.proc1(19);
+
+ _object12.postInit();
+ _object12.setVisage(276);
+ _object12.setPosition(Common::Point(129, 130));
+
+ _object2.postInit();
+ _object2.setVisage(270);
+ _object2.setStrip(3);
+ _object2.setFrame(2);
+ _object2.setPosition(Common::Point(62, 101));
+ _object2.fixPriority(145);
+
+ _object3.postInit();
+ _object3.setVisage(270);
+ _object3.setStrip(3);
+ _object3.setFrame(3);
+ _object3.setPosition(Common::Point(90, 104));
+ _object3.fixPriority(132);
+
+ _object4.postInit();
+ _object4.setVisage(270);
+ _object4.setStrip(3);
+ _object4.setFrame(4);
+ _object4.setPosition(Common::Point(132, 87));
+ _object4.fixPriority(1);
+ break;
+ default:
+ BF_GLOBALS._player.setVisage(271);
+ BF_GLOBALS._player.setFrame(1);
+ BF_GLOBALS._player.setPosition(Common::Point(239, 145));
+
+ BF_GLOBALS._walkRegions.proc1(6);
+ BF_GLOBALS._walkRegions.proc1(14);
+ BF_GLOBALS._walkRegions.proc1(19);
+
+ _object12.postInit();
+ _object12.setVisage(274);
+ _object12.setPosition(Common::Point(157, 132));
+ _object12.animate(ANIM_MODE_2, NULL);
+ _object12._numFrames = 5;
+
+ _object1.postInit();
+ _object1.setVisage(271);
+ _object1.setStrip(4);
+ _object1.setPosition(Common::Point(220, 117));
+ _object1.fixPriority(145);
+ break;
+ }
+
+ _sceneMode = 11;
+
+ static uint32 black = 0;
+ add2Faders((const byte *)&black, 2, 270, this);
+}
+
+void Scene271::signal() {
+ static uint32 black = 0;
+
+ switch (_sceneMode) {
+ case 10:
+ _sceneMode = 2702;
+ setAction(&_sequenceManager1, this, 2702, &BF_GLOBALS._player, NULL);
+ break;
+ case 11:
+ switch (BF_GLOBALS._sceneManager._previousScene) {
+ case 180:
+ _sceneMode = 2716;
+ setAction(&_sequenceManager1, this, 2716, &BF_GLOBALS._player, &_object12, NULL);
+ break;
+ case 280:
+ BF_GLOBALS._dayNumber = 3;
+ BF_INVENTORY.alterInventory(3);
+
+ _sceneMode = 2707;
+ setAction(&_sequenceManager1, this, 2707, &BF_GLOBALS._player, &_object1, &_object11, &_object5, &_object6, NULL);
+ break;
+ case 590:
+ _sceneMode = 2704;
+ setAction(&_sequenceManager1, this, 2707, &BF_GLOBALS._player, &_object12, &_object7, &_object8, NULL);
+ default:
+ _object11.postInit();
+ _object11.setPosition(Common::Point(340, 100));
+ BF_GLOBALS._sound1.play(36);
+
+ _sceneMode = 2709;
+ setAction(&_sequenceManager1, this, 2709, &BF_GLOBALS._player, &_object1, &_object12, &_object11, NULL);
+ break;
+ }
+ break;
+ case 12:
+ BF_GLOBALS._v51C44 = 0;
+ BF_GLOBALS._sound1.changeSound(67);
+ BF_GLOBALS._sceneManager.changeScene(280);
+ break;
+ case 13:
+ BF_GLOBALS._sound1.fadeOut2(NULL);
+ BF_GLOBALS._sceneManager.changeScene(666);
+ break;
+ case 2702:
+ BF_GLOBALS._player._strip = 1;
+ BF_GLOBALS._player.enableControl();
+ _field2E16 = 1;
+ break;
+ case 2704:
+ BF_GLOBALS._v51C44 = 1;
+ BF_GLOBALS._sound1.fadeOut2(NULL);
+ BF_GLOBALS._sceneManager.changeScene(690);
+ break;
+ case 2705:
+ _field796 = 1;
+ BF_GLOBALS._player.enableControl();
+ break;
+ case 2706:
+ BF_GLOBALS._player.changeZoom(-1);
+ BF_GLOBALS._player.enableControl();
+
+ _object1.remove();
+ _field796 = 0;
+ ADD_PLAYER_MOVER(_tempPos.x, _tempPos.y);
+ break;
+ case 2707:
+ BF_GLOBALS._player.enableControl();
+ _field796 = 1;
+ _field2E16 = 1;
+
+ _object1.remove();
+ _object11.remove();
+
+ BF_INVENTORY.setObjectScene(INV_LYLE_CARD, 1);
+ break;
+ case 2709:
+ BF_GLOBALS._sound1.play(68);
+ _sceneMode = 12;
+ addFader((const byte *)&black, 2, this);
+ break;
+ case 2712:
+ BF_GLOBALS._v51C44 = 1;
+ BF_GLOBALS._sound1.fadeOut2(NULL);
+ BF_GLOBALS._sceneManager.changeScene(180);
+ break;
+ case 2713:
+ BF_GLOBALS._player.enableControl();
+ break;
+ case 2714:
+ BF_GLOBALS._v51C44 = 1;
+ BF_GLOBALS._sceneManager.changeScene(560);
+ break;
+ case 2715:
+ break;
+ case 2716:
+ BF_GLOBALS._deathReason = 24;
+ _sceneMode = 13;
+ addFader((const byte *)&black, 2, this);
+ break;
+ }
+}
+
+void Scene271::process(Event &event) {
+ if ((event.eventType == EVENT_BUTTON_DOWN) && (BF_GLOBALS._events.getCursor() == CURSOR_WALK) &&
+ (_field796 == 1) && (!_action)) {
+ _tempPos = event.mousePos;
+ BF_GLOBALS._player.disableControl();
+
+ _sceneMode = 2706;
+ setAction(&_sequenceManager1, this, 2706, &BF_GLOBALS._player, &_object1, NULL);
+ event.handled = true;
+ }
+
+ SceneExt::process(event);
+
+ if (BF_GLOBALS._player._enabled && !_focusObject && (event.mousePos.y < BF_INTERFACE_Y)) {
+ if (_exit.contains(event.mousePos)) {
+ GfxSurface cursor = _cursorVisage.getFrame(EXITFRAME_E);
+ BF_GLOBALS._events.setCursor(cursor);
+ } else {
+ CursorType cursorId = BF_GLOBALS._events.getCursor();
+ BF_GLOBALS._events.setCursor(cursorId);
+ }
+ }
+}
+
+void Scene271::dispatch() {
+ if (!_action && (_field2E16 == 1)) {
+ if ((BF_GLOBALS._player._position.x > 236) && (BF_GLOBALS._player._position.y < 120)) {
+ _field2E16 = 0;
+ BF_GLOBALS._sceneManager.changeScene(560);
+ }
+
+ if (BF_GLOBALS._player._position.x <= 20) {
+ _field2E16 = 0;
+ BF_GLOBALS._player.disableControl();
+ BF_GLOBALS._player._mover->remove();
+ BF_GLOBALS._player._strip = 3;
+ BF_GLOBALS._player._frame = 1;
+
+ if (BF_GLOBALS._sceneObjects->contains(&_object12)) {
+ _sceneMode = 10;
+ _stripManager.start(2711, this);
+ } else {
+ SceneItem::display2(270, 33);
+ _sceneMode = 2702;
+ setAction(&_sequenceManager1, this, 2702, &BF_GLOBALS._player, NULL);
+ }
+ }
+
+ if (BF_GLOBALS._player._position.x >= 300) {
+ _field2E16 = 0;
+ BF_GLOBALS._player.disableControl();
+ _sceneMode = 2712;
+ setAction(&_sequenceManager1, this, 2712, &BF_GLOBALS._player, NULL);
+ }
+ }
+
+ SceneExt::dispatch();
+}
+
} // End of namespace BlueForce
} // End of namespace TsAGE
diff --git a/engines/tsage/blue_force/blueforce_scenes2.h b/engines/tsage/blue_force/blueforce_scenes2.h
index 75695d427d..2ec939be19 100644
--- a/engines/tsage/blue_force/blueforce_scenes2.h
+++ b/engines/tsage/blue_force/blueforce_scenes2.h
@@ -222,6 +222,61 @@ public:
virtual void dispatch();
};
+class Scene271: public PalettedScene {
+ /* Actions */
+ class Action1: public ActionExt {
+ public:
+ virtual void signal();
+ };
+
+ /* Objects */
+ class Object12: public NamedObject {
+ public:
+ virtual bool startAction(CursorType action, Event &event);
+ };
+
+ /* Items */
+ class Item: public NamedHotspot {
+ public:
+ virtual bool startAction(CursorType action, Event &event);
+ };
+ class Exit: public NamedHotspot {
+ public:
+ virtual bool startAction(CursorType action, Event &event);
+ };
+public:
+ SequenceManager _sequenceManager1, _sequenceManager2, _sequenceManager3;
+ SpeakerGrandma _grandmaSpeaker;
+ SpeakerLyle _lyleSpeaker;
+ SpeakerJake _jakeSpeaker;
+ SpeakerLaura _lauraSpeaker;
+ SpeakerSkip _skipSpeaker;
+ SpeakerGameText _gameTextSpeaker;
+ SpeakerGranText _granTextSpeaker;
+ SpeakerLyleText _lyleTextSpeaker;
+
+ NamedObject _object1, _object2, _object3, _object4, _object5;
+ NamedObject _object6, _object7, _object8, _tv, _object10;
+ NamedObject _object11;
+ Object12 _object12;
+ Item _item1, _item3;
+ NamedHotspot _item2, _item4, _item5, _item6, _item7;
+ NamedHotspot _item8, _item9, _item10, _item11;
+ Exit _exit;
+ Action1 _action1;
+ Rect _rect1;
+ int _field796, _field2E16;
+ Common::Point _tempPos;
+
+ Scene271();
+ virtual void synchronize(Serializer &s);
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+ virtual void signal();
+ virtual void process(Event &event);
+ virtual void dispatch();
+};
+
+
} // End of namespace BlueForce
} // End of namespace TsAGE
diff --git a/engines/tsage/blue_force/blueforce_scenes4.cpp b/engines/tsage/blue_force/blueforce_scenes4.cpp
index 9e8b0d586d..07445a7e76 100644
--- a/engines/tsage/blue_force/blueforce_scenes4.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes4.cpp
@@ -1541,7 +1541,7 @@ void Scene450::postInit(SceneObjectList *OwnerList) {
_object3.setFrame(_object3.getFrameCount());
BF_GLOBALS._sceneItems.push_back(&_object3);
} else if (!BF_GLOBALS.getFlag(fWithLyle) || !BF_GLOBALS.getFlag(fGivenNapkin) ||
- (BF_INVENTORY.getObjectScene(BF_LAST_INVENT) == 1)) {
+ (BF_INVENTORY.getObjectScene(BF_ITEM_67) == 1)) {
_object3.postInit();
_object3.setVisage(463);
_object3.setPosition(Common::Point(138, 121));
@@ -1628,7 +1628,7 @@ void Scene450::signal() {
break;
case 4517:
BF_GLOBALS.setFlag(gotTrailer450);
- BF_INVENTORY.setObjectScene(BF_LAST_INVENT, 1);
+ BF_INVENTORY.setObjectScene(BF_ITEM_67, 1);
_sceneMode = 4508;
setAction(&_sequenceManager, this, 4508, &BF_GLOBALS._player, &_object4, &_door, NULL);
break;
diff --git a/engines/tsage/blue_force/blueforce_scenes5.cpp b/engines/tsage/blue_force/blueforce_scenes5.cpp
index a1c15280c8..9b67159f9b 100644
--- a/engines/tsage/blue_force/blueforce_scenes5.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes5.cpp
@@ -76,7 +76,7 @@ bool Scene550::Object1::startAction(CursorType action, Event &event) {
scene->_sceneMode = 5512;
scene->setAction(&scene->_action1);
} else {
- scene->_sceneMode = BF_INVENTORY.getObjectScene(BF_LAST_INVENT) == 1 ? 5513 : 5512;
+ scene->_sceneMode = BF_INVENTORY.getObjectScene(BF_ITEM_67) == 1 ? 5513 : 5512;
scene->_stripManager.setAction(&scene->_action1);
}
return true;
@@ -101,7 +101,7 @@ bool Scene550::CaravanDoor::startAction(CursorType action, Event &event) {
case CURSOR_USE:
SceneItem::display2(550, 7);
return true;
- case BF_LAST_INVENT:
+ case BF_ITEM_67:
if ((BF_GLOBALS._dayNumber == 3) || !BF_GLOBALS.getFlag(fWithLyle))
SceneItem::display2(550, 33);
else {
diff --git a/engines/tsage/blue_force/blueforce_scenes6.cpp b/engines/tsage/blue_force/blueforce_scenes6.cpp
index dec17b2f6b..0d6587daa9 100644
--- a/engines/tsage/blue_force/blueforce_scenes6.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes6.cpp
@@ -146,7 +146,7 @@ void Scene620::postInit(SceneObjectList *OwnerList) {
BF_GLOBALS._player.setPosition(Common::Point(47, 96));
static const uint32 black = 0;
- sub15DD6((const byte *)&black, 2, 621, this);
+ add2Faders((const byte *)&black, 2, 621, this);
}
void Scene620::signal() {
@@ -181,7 +181,7 @@ void Scene620::signal() {
_object2.postInit();
_object2.setVisage(623);
_object2.setPosition(Common::Point(216, 4));
- sub15DD6((const byte *)&black, 2, 623, this);
+ add2Faders((const byte *)&black, 2, 623, this);
break;
case 6:
_object2.animate(ANIM_MODE_5, this);
@@ -193,7 +193,7 @@ void Scene620::signal() {
_object3.setVisage(624);
_object3.setFrame(1);
_object3.setPosition(Common::Point(28, 88));
- sub15DD6((const byte *)&black, 2, 624, this);
+ add2Faders((const byte *)&black, 2, 624, this);
break;
case 11:
_object3.remove();
@@ -201,7 +201,7 @@ void Scene620::signal() {
_object4.postInit();
_object4.setVisage(625);
_object4.setPosition(Common::Point(168, 8));
- sub15DD6((const byte *)&black, 2, 625, this);
+ add2Faders((const byte *)&black, 2, 625, this);
break;
case 14:
_object4.remove();
@@ -209,7 +209,7 @@ void Scene620::signal() {
_object5.postInit();
_object5.setVisage(626);
_object5.setPosition(Common::Point(249, 183));
- sub15DD6((const byte *)&black, 2, 626, this);
+ add2Faders((const byte *)&black, 2, 626, this);
break;
case 15:
_object5.animate(ANIM_MODE_5, this);
@@ -220,7 +220,7 @@ void Scene620::signal() {
_object6.postInit();
_object6.setVisage(627);
_object6.setPosition(Common::Point(65, 24));
- sub15DD6((const byte *)&black, 2, 627, this);
+ add2Faders((const byte *)&black, 2, 627, this);
break;
case 18:
_object6.animate(ANIM_MODE_5, this);
diff --git a/engines/tsage/blue_force/blueforce_scenes9.cpp b/engines/tsage/blue_force/blueforce_scenes9.cpp
index a9c2e6570e..a449600b63 100644
--- a/engines/tsage/blue_force/blueforce_scenes9.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes9.cpp
@@ -1342,7 +1342,7 @@ void Scene935::Action1::signal() {
break;
case 10:
scene->_sceneMode = 1;
- scene->sub15DD6((const byte *)&v50F6A, 5, 935, scene);
+ scene->add2Faders((const byte *)&v50F6A, 5, 935, scene);
remove();
break;
default:
diff --git a/engines/tsage/blue_force/blueforce_speakers.cpp b/engines/tsage/blue_force/blueforce_speakers.cpp
index c73ee325c7..0f506c7122 100644
--- a/engines/tsage/blue_force/blueforce_speakers.cpp
+++ b/engines/tsage/blue_force/blueforce_speakers.cpp
@@ -947,6 +947,24 @@ void SpeakerLyle::setText(const Common::String &msg) {
_object2.fixCountdown(8, _numFrames);
}
+/*--------------------------------------------------------------------------*/
+
+SpeakerGranText::SpeakerGranText(): VisualSpeaker() {
+ _color1 = 20;
+ _color2 = 23;
+
+ _speakerName = "GRANTEXT";
+}
+
+/*--------------------------------------------------------------------------*/
+
+SpeakerLyleText::SpeakerLyleText(): VisualSpeaker() {
+ _color1 = 29;
+ _color2 = 89;
+
+ _speakerName = "LYLETEXT";
+}
+
} // 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 d25c10b728..932c3c311f 100644
--- a/engines/tsage/blue_force/blueforce_speakers.h
+++ b/engines/tsage/blue_force/blueforce_speakers.h
@@ -323,6 +323,20 @@ public:
virtual void setText(const Common::String &msg);
};
+class SpeakerGranText: public VisualSpeaker {
+public:
+ SpeakerGranText();
+
+ virtual Common::String getClassName() { return "SpeakerGranText"; }
+};
+
+class SpeakerLyleText: public VisualSpeaker {
+public:
+ SpeakerLyleText();
+
+ virtual Common::String getClassName() { return "SpeakerLyleText"; }
+};
+
} // End of namespace BlueForce
} // End of namespace TsAGE
diff --git a/engines/tsage/events.h b/engines/tsage/events.h
index d633ac1e75..0195b2fc7b 100644
--- a/engines/tsage/events.h
+++ b/engines/tsage/events.h
@@ -80,7 +80,7 @@ enum CursorType {
INV_9MM_BULLETS = 54, INV_SCHEDULE = 55, INV_GRENADES = 56, INV_YELLOW_CORD = 57,
INV_HALF_YELLOW_CORD = 58, INV_BLACK_CORD = 59, INV_HALF_BLACK_CORD = 61, INV_WARRANT = 62,
INV_JACKET = 63, INV_GREENS_KNIFE = 64, INV_DOG_WHISTLE = 65, INV_AMMO_BELT = 66,
- BF_LAST_INVENT = 67,
+ BF_ITEM_67 = 67, BF_LAST_INVENT = 68,
// Cursors
CURSOR_WALK = 0x100, CURSOR_LOOK = 0x200, CURSOR_700 = 700, CURSOR_USE = 0x400, CURSOR_TALK = 0x800,
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index 1da971f858..788ab71b76 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -196,6 +196,7 @@ void BlueForceGlobals::synchronize(Serializer &s) {
s.syncAsSint16LE(_safeCombination);
s.syncAsSint16LE(_v4CEC0);
s.syncAsSint16LE(_v4CEC2);
+ s.syncAsSint16LE(_v4CEC4);
s.syncAsSint16LE(_v4CEC8);
s.syncAsSint16LE(_deziTopic);
s.syncAsSint16LE(_deathReason);
@@ -242,6 +243,7 @@ void BlueForceGlobals::reset() {
_safeCombination = 0;
_v4CEC0 = 0;
_v4CEC2 = 0;
+ _v4CEC4 = 0;
_v4CEC8 = 1;
_deziTopic = 0;
_deathReason = 0;
diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h
index 15f8c0b611..fa99e36ab9 100644
--- a/engines/tsage/globals.h
+++ b/engines/tsage/globals.h
@@ -174,6 +174,7 @@ public:
int _safeCombination;
int _v4CEC0;
int _v4CEC2;
+ int _v4CEC4;
int _v4CEC8;
int _deziTopic;
int _deathReason;