aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/ringworld_scenes3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tsage/ringworld_scenes3.cpp')
-rw-r--r--engines/tsage/ringworld_scenes3.cpp412
1 files changed, 212 insertions, 200 deletions
diff --git a/engines/tsage/ringworld_scenes3.cpp b/engines/tsage/ringworld_scenes3.cpp
index b37b156907..f788f9a28b 100644
--- a/engines/tsage/ringworld_scenes3.cpp
+++ b/engines/tsage/ringworld_scenes3.cpp
@@ -226,8 +226,8 @@ void Scene2000::Action10::signal() {
error("Old stuff");
break;
case 2:
- SceneItem::display(2000, 17, SET_Y, 20, SET_X, 110, SET_FONT, 2, SET_BG_COLOUR, -1,
- SET_FG_COLOUR, 17, SET_WIDTH, 200, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, 1, LIST_END);
+ SceneItem::display(2000, 17, SET_Y, 20, SET_X, 110, SET_FONT, 2, SET_BG_COLOR, -1,
+ SET_FG_COLOR, 17, SET_WIDTH, 200, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, 1, LIST_END);
break;
case 3:
SceneItem::display(0, 0);
@@ -405,7 +405,7 @@ void Scene2000::postInit(SceneObjectList *OwnerList) {
_object9.setStrip2(3);
_object9.setFrame(4);
_object9.setPosition(Common::Point(136, 86));
- _object9.setPriority2(190);
+ _object9.fixPriority(190);
_object9.hide();
_object10.postInit();
@@ -413,7 +413,7 @@ void Scene2000::postInit(SceneObjectList *OwnerList) {
_object10.setStrip2(5);
_object10.setFrame(4);
_object10.setPosition(Common::Point(202, 86));
- _object10.setPriority2(195);
+ _object10.fixPriority(195);
_object10.hide();
switch (_globals->_sceneManager._previousScene) {
@@ -519,7 +519,7 @@ void Scene2100::Action1::signal() {
setDelay(3);
break;
case 5:
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
scene->_area1.display();
scene->_area2.display();
scene->_area3.display();
@@ -578,7 +578,7 @@ void Scene2100::Action1::signal() {
}
break;
case 7:
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
scene->_soundHandler.startSound(162);
scene->_object1.animate(ANIM_MODE_6, this);
break;
@@ -684,6 +684,7 @@ void Scene2100::Action5::signal() {
}
void Scene2100::Action6::signal() {
+ // Seeker stands up and walks to the elevator
Scene2100 *scene = (Scene2100 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -699,14 +700,14 @@ void Scene2100::Action6::signal() {
Common::Point pt(130, 116);
NpcMover *mover = new NpcMover();
- scene->_object2.addMover(mover, &pt, NULL);
+ scene->_object2.addMover(mover, &pt, this);
break;
}
case 1: {
- scene->_object2.setPriority2(-1);
+ scene->_object2.fixPriority(-1);
Common::Point pt(153, 67);
NpcMover *mover = new NpcMover();
- scene->_object2.addMover(mover, &pt, NULL);
+ scene->_object2.addMover(mover, &pt, this);
break;
}
case 2:
@@ -752,10 +753,10 @@ void Scene2100::Action8::signal() {
}
case 3:
_globals->_player.checkAngle(&scene->_object3);
- scene->_stripManager.start((_globals->_inventory._translator._sceneNumber == 1) ? 7720 : 7710, this);
+ scene->_stripManager.start((RING_INVENTORY._translator._sceneNumber == 1) ? 7720 : 7710, this);
break;
case 4:
- if (_globals->_inventory._translator._sceneNumber != 1)
+ if (RING_INVENTORY._translator._sceneNumber != 1)
_globals->_sceneManager.changeScene(7600);
else {
_globals->setFlag(24);
@@ -835,7 +836,7 @@ void Scene2100::Action10::signal() {
scene->_object3.setVisage(2705);
scene->_object3.setStrip2(-1);
scene->_object3.changeZoom(-1);
- scene->_object3.setPriority2(-1);
+ scene->_object3.fixPriority(-1);
scene->_object3.setPosition(Common::Point(260, 156));
scene->_object3.setObjectWrapper(new SceneObjectWrapper());
scene->_object3.animate(ANIM_MODE_1, NULL);
@@ -852,30 +853,30 @@ void Scene2100::Action10::signal() {
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 6: {
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
Common::Point pt(144, 54);
NpcMover *mover = new NpcMover();
_globals->_player.addMover(mover, &pt, this);
break;
}
case 7: {
- scene->_object3.setPriority2(2);
+ scene->_object3.fixPriority(2);
Common::Point pt1(163, 55);
NpcMover *mover1 = new NpcMover();
scene->_object3.addMover(mover1, &pt1, NULL);
- scene->_object2.setPriority2(2);
+ scene->_object2.fixPriority(2);
Common::Point pt2(158, 55);
NpcMover *mover2 = new NpcMover();
scene->_object2.addMover(mover2, &pt2, this);
break;
}
case 8:
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setStrip(1);
- scene->_object3.setPriority2(1);
+ scene->_object3.fixPriority(1);
scene->_object3.setStrip(2);
- scene->_object2.setPriority2(2);
+ scene->_object2.fixPriority(2);
scene->_object2.setStrip(3);
setDelay(45);
@@ -893,6 +894,7 @@ void Scene2100::Action10::signal() {
}
void Scene2100::Action11::signal() {
+ // Miranda stands up and walks to the elevator
Scene2100 *scene = (Scene2100 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -911,7 +913,7 @@ void Scene2100::Action11::signal() {
scene->_object3.setVisage(2705);
scene->_object3.setStrip2(-1);
scene->_object3.changeZoom(-1);
- scene->_object3.setPriority2(-1);
+ scene->_object3.fixPriority(-1);
scene->_object3.setPosition(Common::Point(260, 156));
scene->_object3.setObjectWrapper(new SceneObjectWrapper());
scene->_object3.animate(ANIM_MODE_1, NULL);
@@ -928,12 +930,12 @@ void Scene2100::Action11::signal() {
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 4: {
- scene->_object3.setPriority2(1);
+ scene->_object3.fixPriority(1);
Common::Point pt1(163, 55);
NpcMover *mover1 = new NpcMover();
scene->_object3.addMover(mover1, &pt1, NULL);
- scene->_object2.setPriority2(1);
+ scene->_object2.fixPriority(1);
Common::Point pt2(158, 55);
NpcMover *mover2 = new NpcMover();
scene->_object2.addMover(mover2, &pt2, this);
@@ -987,12 +989,12 @@ void Scene2100::Action12::signal() {
scene->_soundHandler.startSound(162);
scene->_object1.animate(ANIM_MODE_6, NULL);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
Common::Point pt1(277, 84);
PlayerMover *mover1 = new PlayerMover();
_globals->_player.addMover(mover1, &pt1, this);
- scene->_object2.setPriority2(-1);
+ scene->_object2.fixPriority(-1);
Common::Point pt2(255, 76);
PlayerMover *mover2 = new PlayerMover();
scene->_object2.addMover(mover2, &pt2, this);
@@ -1020,6 +1022,8 @@ void Scene2100::Action12::signal() {
case 10:
if (_globals->getFlag(74))
setDelay(1);
+ else
+ setAction(&scene->_sequenceManager, this, 2101, &_globals->_player, NULL);
break;
case 11:
scene->_stripManager.start(2170, this);
@@ -1050,7 +1054,7 @@ void Scene2100::Action13::signal() {
setDelay(6);
break;
case 1: {
- scene->_object2.setPriority2(113);
+ scene->_object2.fixPriority(113);
Common::Point pt(178, 116);
PlayerMover *mover = new PlayerMover();
scene->_object2.addMover(mover, &pt, this);
@@ -1123,7 +1127,7 @@ void Scene2100::Action14::signal() {
scene->_object3.setVisage(2705);
scene->_object3.setStrip2(-1);
scene->_object3.changeZoom(-1);
- scene->_object3.setPriority2(-1);
+ scene->_object3.fixPriority(-1);
scene->_object3.setPosition(Common::Point(260, 156));
scene->_object3.setObjectWrapper(new SceneObjectWrapper());
scene->_object3.animate(ANIM_MODE_1, NULL);
@@ -1147,7 +1151,7 @@ void Scene2100::Action14::signal() {
scene->_object3.setStrip(2);
setDelay(30);
case 13:
- scene->_object3.setPriority2(1);
+ scene->_object3.fixPriority(1);
scene->_soundHandler.startSound(162);
scene->_object1.animate(ANIM_MODE_6, this);
break;
@@ -1174,14 +1178,14 @@ void Scene2100::Action15::signal() {
scene->_object3.animate(ANIM_MODE_1, NULL);
scene->_object3.setObjectWrapper(new SceneObjectWrapper());
scene->_object3.setPosition(Common::Point(157, 56));
- scene->_object3.setPriority2(1);
+ scene->_object3.fixPriority(1);
scene->_object3.changeZoom(-1);
scene->_soundHandler.startSound(162);
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 2: {
- scene->_object3.setPriority2(-1);
+ scene->_object3.fixPriority(-1);
Common::Point pt(177, 68);
NpcMover *mover = new NpcMover();
scene->_object3.addMover(mover, &pt, this);
@@ -1203,7 +1207,7 @@ void Scene2100::Action15::signal() {
break;
}
case 5: {
- scene->_object3.setPriority2(156);
+ scene->_object3.fixPriority(156);
Common::Point pt(260, 156);
NpcMover *mover = new NpcMover();
@@ -1258,7 +1262,7 @@ void Scene2100::Action16::signal() {
break;
}
case 7:
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setStrip(3);
setDelay(45);
break;
@@ -1311,7 +1315,7 @@ void Scene2100::Action17::signal() {
scene->_stripManager.start(7072, this);
break;
case 8:
- _globals->_inventory._stasisNegator._sceneNumber = 1;
+ RING_INVENTORY._stasisNegator._sceneNumber = 1;
_globals->_sceneManager.changeScene(9100);
remove();
break;
@@ -1342,6 +1346,7 @@ void Scene2100::Hotspot2::doAction(int action) {
}
void Scene2100::Hotspot3::doAction(int action) {
+ // Computer, on the left
Scene2100 *scene = (Scene2100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -1442,6 +1447,7 @@ void Scene2100::Hotspot14::doAction(int action) {
}
void Scene2100::Object1::doAction(int action) {
+ // Elevator
Scene2100 *scene = (Scene2100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -1555,7 +1561,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_object1.setVisage(2100);
_object1.animate(ANIM_MODE_NONE, NULL);
_object1.setPosition(Common::Point(157, 57));
- _object1.setPriority(5);
+ _object1.fixPriority(5);
_hotspot3.postInit();
_hotspot3.setVisage(2101);
@@ -1563,7 +1569,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_hotspot3.animate(ANIM_MODE_2, NULL);
_hotspot3.setPosition(Common::Point(53, 44));
_hotspot3.changeZoom(100);
- _hotspot3.setPriority2(1);
+ _hotspot3.fixPriority(1);
_hotspot4.postInit();
_hotspot4.setVisage(2101);
@@ -1572,7 +1578,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_hotspot4.animate(ANIM_MODE_8, 0, NULL);
_hotspot4.setPosition(Common::Point(274, 52));
_hotspot4.changeZoom(100);
- _hotspot4.setPriority2(1);
+ _hotspot4.fixPriority(1);
_hotspot5.postInit();
_hotspot5.setVisage(2101);
@@ -1581,13 +1587,13 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_hotspot5.animate(ANIM_MODE_8, 0, NULL);
_hotspot5.setPosition(Common::Point(219, 141));
_hotspot5.changeZoom(100);
- _hotspot5.setPriority2(160);
+ _hotspot5.fixPriority(160);
_hotspot6.postInit();
_hotspot6.setVisage(2101);
_hotspot6._frame = 1;
_hotspot6._strip = 5;
- _hotspot6.setPriority2(175);
+ _hotspot6.fixPriority(175);
_hotspot6.animate(ANIM_MODE_8, 0, NULL);
_hotspot6.setPosition(Common::Point(97, 142));
_hotspot6.changeZoom(100);
@@ -1599,7 +1605,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_hotspot7.animate(ANIM_MODE_NONE, NULL);
_hotspot7.setPosition(Common::Point(133, 46));
_hotspot7.changeZoom(100);
- _hotspot7.setPriority2(1);
+ _hotspot7.fixPriority(1);
_hotspot8.postInit();
_hotspot8.setVisage(2101);
@@ -1608,16 +1614,16 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_hotspot8.animate(ANIM_MODE_8, 0, NULL);
_hotspot8.setPosition(Common::Point(20, 45));
_hotspot8.changeZoom(100);
- _hotspot8.setPriority2(1);
+ _hotspot8.fixPriority(1);
_hotspot2.postInit();
_hotspot2.setVisage(2101);
_hotspot2._frame = 1;
- _hotspot2._strip = 7;
+ _hotspot2._strip = 8;
_hotspot2.animate(ANIM_MODE_8, 0, NULL);
_hotspot2.setPosition(Common::Point(88, 41));
_hotspot2.changeZoom(100);
- _hotspot2.setPriority2(1);
+ _hotspot2.fixPriority(1);
_hotspot11.setBounds(Rect(139, 74, 173, 96));
_hotspot10.setBounds(Rect(71, 100, 91, 135));
@@ -1633,7 +1639,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_object3.setPosition(Common::Point(246, 156));
_object3.animate(ANIM_MODE_NONE, NULL);
_object3.changeZoom(100);
- _object3.setPriority2(156);
+ _object3.fixPriority(156);
_object3.setVisage(2107);
_object3.setStrip(1);
_object3.setAction(&_action2);
@@ -1647,7 +1653,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_object2.setPosition(Common::Point(150, 100));
_object2.animate(ANIM_MODE_NONE, NULL);
_object2.changeZoom(100);
- _object2.setPriority2(113);
+ _object2.fixPriority(113);
_object2.setAction(&_action3);
_globals->_sceneItems.push_back(&_object2);
}
@@ -1666,7 +1672,14 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_area4._pt = Common::Point(237, 77);
_globals->_player.postInit();
- _globals->_player.setVisage(_globals->getFlag(13) ? 2170 : 0);
+ if (_globals->getFlag(13)) {
+ _globals->_player.setVisage(2170);
+ _globals->_player._moveDiff.y = 1;
+ } else {
+ _globals->_player.setVisage(0);
+ _globals->_player._moveDiff.y = 3;
+ }
+
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player._moveDiff.x = 4;
@@ -1678,13 +1691,13 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
case 2120:
_globals->_soundHandler.startSound(160);
_globals->_soundHandler.proc5(true);
- _object1.setPriority2(-1);
- _globals->_player.setPriority2(-1);
+ _object1.fixPriority(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.setPosition(Common::Point(80, 66));
_globals->_player.enableControl();
break;
case 2150:
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(157, 56));
_sceneMode = 2104;
setAction(&_sequenceManager, this, 2104, &_globals->_player, &_object1, NULL);
@@ -1693,13 +1706,13 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
if (_globals->_sceneObjects->contains(&_object3))
_object3.remove();
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(144, 55));
_object2.setVisage(2806);
_object2.changeZoom(-1);
_object2.setPosition(Common::Point(158, 55));
- _object2.setPriority2(1);
+ _object2.fixPriority(1);
_object2.setAction(NULL);
_object2.setObjectWrapper(new SceneObjectWrapper());
_object2.animate(ANIM_MODE_1, NULL);
@@ -1711,7 +1724,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
if (_globals->_sceneObjects->contains(&_object3))
_object3.remove();
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(144, 55));
_object2.postInit();
@@ -1719,7 +1732,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_object2.setStrip(1);
_object2.changeZoom(-1);
_object2.setPosition(Common::Point(158, 55));
- _object2.setPriority2(1);
+ _object2.fixPriority(1);
_object2.setAction(NULL);
_object2.setObjectWrapper(new SceneObjectWrapper());
_object2.animate(ANIM_MODE_1, NULL);
@@ -1727,7 +1740,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_action12);
} else if (_globals->_stripNum == 6100) {
_globals->_player.setPosition(Common::Point(157, 56));
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_object4.postInit();
_object4.setVisage(2102);
@@ -1754,11 +1767,11 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player._angle = 225;
_globals->_player.setStrip(6);
_globals->_player.setFrame(1);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.setPosition(Common::Point(272, 127));
_object3.setPosition(Common::Point(246, 156));
- _object3.setPriority2(156);
+ _object3.fixPriority(156);
_sceneMode = 2105;
setAction(&_sequenceManager, this, 2105, &_object3, NULL);
break;
@@ -1770,7 +1783,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(65, 149));
- _globals->_player.setPriority2(152);
+ _globals->_player.fixPriority(152);
_globals->_player.setStrip(2);
_object4.postInit();
@@ -1790,11 +1803,11 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setStrip(3);
_globals->_player.setFrame(1);
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(157, 56));
_object3.setPosition(Common::Point(246, 156));
- _object3.setPriority2(156);
+ _object3.fixPriority(156);
setAction(&_action5);
break;
@@ -1804,7 +1817,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(65, 149));
- _globals->_player.setPriority2(152);
+ _globals->_player.fixPriority(152);
_globals->_player.setStrip(2);
_field1800 = 1;
@@ -1814,15 +1827,15 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_object4.setPosition(Common::Point(160, 199));
_object4.hide();
- _globals->_inventory._stasisBox._sceneNumber = 0;
+ RING_INVENTORY._stasisBox._sceneNumber = 0;
setAction(&_action9);
break;
case 7000:
_globals->_soundHandler.startSound(160);
_globals->_soundHandler.proc5(true);
- if (_globals->_inventory._stasisBox2._sceneNumber == 1) {
- _globals->_player.setPriority2(1);
+ if (RING_INVENTORY._stasisBox2._sceneNumber == 1) {
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(157, 56));
_object4.postInit();
@@ -1838,7 +1851,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(65, 149));
- _globals->_player.setPriority2(152);
+ _globals->_player.fixPriority(152);
_globals->_player.setStrip(2);
_field1800 = 1;
@@ -1852,7 +1865,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
if (_globals->_sceneObjects->contains(&_object2))
_object2.remove();
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(157, 56));
setAction(&_action8);
@@ -1864,7 +1877,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(65, 149));
- _globals->_player.setPriority2(152);
+ _globals->_player.fixPriority(152);
_globals->_player.setStrip(2);
_sceneMode = 2106;
@@ -1877,7 +1890,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(65, 149));
- _globals->_player.setPriority2(152);
+ _globals->_player.fixPriority(152);
_globals->_player.setStrip(2);
_object4.postInit();
@@ -1995,12 +2008,12 @@ void Scene2120::Action1::signal() {
break;
case 1:
// First page of index
- SceneItem::display(2120, 0, SET_X, 120, SET_FONT, 1, SET_EXT_BGCOLOUR, 7, SET_BG_COLOUR, -1,
+ SceneItem::display(2120, 0, SET_X, 120, SET_FONT, 1, SET_EXT_BGCOLOR, 7, SET_BG_COLOR, -1,
SET_WIDTH, 200, SET_KEEP_ONSCREEN, -1, SET_TEXT_MODE, 0, LIST_END);
break;
case 2:
// Second page of index
- SceneItem::display(2120, 1, SET_X, 120, SET_FONT, 1, SET_EXT_BGCOLOUR, 7, SET_BG_COLOUR, -1,
+ SceneItem::display(2120, 1, SET_X, 120, SET_FONT, 1, SET_EXT_BGCOLOR, 7, SET_BG_COLOR, -1,
SET_WIDTH, 200, SET_KEEP_ONSCREEN, -1, SET_TEXT_MODE, 0, LIST_END);
break;
case 3:
@@ -2016,7 +2029,7 @@ void Scene2120::Action1::signal() {
case 4:
// Display page of text
SceneItem::display(2121, _entries[scene->_subjectIndex]._lineNum + scene->_lineOffset,
- SET_X, 130, SET_FONT, 1, SET_EXT_BGCOLOUR, 7, SET_BG_COLOUR, -1, SET_WIDTH, 200,
+ SET_X, 130, SET_FONT, 1, SET_EXT_BGCOLOR, 7, SET_BG_COLOR, -1, SET_WIDTH, 200,
SET_KEEP_ONSCREEN, -1, SET_TEXT_MODE, 0, LIST_END);
_actionIndex = 4;
break;
@@ -2182,8 +2195,8 @@ void Scene2120::postInit(SceneObjectList *OwnerList) {
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
}
-void Scene2120::synchronise(Serialiser &s) {
- Scene::synchronise(s);
+void Scene2120::synchronize(Serializer &s) {
+ Scene::synchronize(s);
s.syncAsSint16LE(_dbMode);
s.syncAsSint16LE(_prevDbMode);
@@ -2318,7 +2331,7 @@ void Scene2150::Action2::signal() {
break;
case 3:
_globals->_events.setCursor(CURSOR_WALK);
- scene->_stripManager.start((_globals->_inventory._ale._sceneNumber == 2150) ? 2151 : 2152, this);
+ scene->_stripManager.start((RING_INVENTORY._ale._sceneNumber == 2150) ? 2151 : 2152, this);
break;
case 4:
scene->_hotspot14.postInit();
@@ -2328,7 +2341,7 @@ void Scene2150::Action2::signal() {
if (scene->_stripManager._field2E8 == 15) {
scene->_hotspot14.setFrame(5);
- _globals->_inventory._ale._sceneNumber = 1;
+ RING_INVENTORY._ale._sceneNumber = 1;
} else {
scene->_hotspot14.setFrame(scene->_stripManager._field2E8 - 5);
}
@@ -2474,7 +2487,7 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_hotspot7.animate(ANIM_MODE_8, NULL);
_hotspot7.setPosition(Common::Point(122, 62));
_hotspot7.changeZoom(100);
- _hotspot7.setPriority2(76);
+ _hotspot7.fixPriority(76);
_hotspot2.postInit();
_hotspot2.setVisage(2151);
@@ -2483,7 +2496,7 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_hotspot2.animate(ANIM_MODE_NONE, NULL);
_hotspot2.setPosition(Common::Point(257, 67));
_hotspot2.changeZoom(100);
- _hotspot2.setPriority2(60);
+ _hotspot2.fixPriority(60);
_hotspot1.postInit();
_hotspot1.setVisage(2151);
@@ -2492,7 +2505,7 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_hotspot1.animate(ANIM_MODE_NONE, NULL);
_hotspot1.setPosition(Common::Point(158, 99));
_hotspot1.changeZoom(100);
- _hotspot1.setPriority2(99);
+ _hotspot1.fixPriority(99);
_hotspot4.postInit();
_hotspot4.setVisage(2150);
@@ -2501,7 +2514,7 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_hotspot4.animate(ANIM_MODE_NONE, NULL);
_hotspot4.setPosition(Common::Point(218, 200));
_hotspot4.changeZoom(100);
- _hotspot4.setPriority2(200);
+ _hotspot4.fixPriority(200);
_hotspot10.postInit();
_hotspot10.setVisage(2152);
@@ -2515,7 +2528,7 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(_globals->getFlag(13) ? 2170 : 0);
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.changeZoom(-1);
_globals->_player._moveDiff.y = 3;
@@ -2576,10 +2589,10 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
}
-void Scene2150::synchronise(Serialiser &s) {
- Scene::synchronise(s);
- _rect1.synchronise(s);
- _rect2.synchronise(s);
+void Scene2150::synchronize(Serializer &s) {
+ Scene::synchronize(s);
+ _rect1.synchronize(s);
+ _rect2.synchronize(s);
}
void Scene2150::signal() {
@@ -2714,7 +2727,7 @@ void Scene2200::Action3::signal() {
_actionIndex = 8;
setDelay(5);
} else {
- for (SynchronisedList<SceneObject *>::iterator i = _globals->_sceneObjects->begin();
+ for (SynchronizedList<SceneObject *>::iterator i = _globals->_sceneObjects->begin();
i != _globals->_sceneObjects->end(); ++i) {
(*i)->hide();
}
@@ -2731,7 +2744,7 @@ void Scene2200::Action3::signal() {
scene->_hotspot7.setFrame(1);
scene->_hotspot7.setPosition(Common::Point(145, 165));
- SceneItem::display(60, 1, SET_Y, 40, SET_X, 25, SET_FONT, 75, SET_BG_COLOUR, -1, SET_FG_COLOUR, 34,
+ SceneItem::display(60, 1, SET_Y, 40, SET_X, 25, SET_FONT, 75, SET_BG_COLOR, -1, SET_FG_COLOR, 34,
SET_POS_MODE, 0, SET_WIDTH, 280, SET_KEEP_ONSCREEN, 1, LIST_END);
_state = 1;
setDelay(1800);
@@ -2740,7 +2753,7 @@ void Scene2200::Action3::signal() {
case 3:
case 4:
case 5:
- SceneItem::display(60, _actionIndex - 2, SET_Y, 40, SET_X, 25, SET_FONT, 75, SET_BG_COLOUR, -1, SET_FG_COLOUR, 34,
+ SceneItem::display(60, _actionIndex - 2, SET_Y, 40, SET_X, 25, SET_FONT, 75, SET_BG_COLOR, -1, SET_FG_COLOR, 34,
SET_POS_MODE, 0, SET_WIDTH, 280, SET_KEEP_ONSCREEN, 1, LIST_END);
setDelay(1800);
break;
@@ -2751,7 +2764,7 @@ void Scene2200::Action3::signal() {
setDelay(5);
break;
case 7:
- for (SynchronisedList<SceneObject *>::iterator i = _globals->_sceneObjects->begin();
+ for (SynchronizedList<SceneObject *>::iterator i = _globals->_sceneObjects->begin();
i != _globals->_sceneObjects->end(); ++i)
(*i)->show();
@@ -2907,7 +2920,7 @@ void Scene2200::postInit(SceneObjectList *OwnerList) {
_hotspot8.setVisage(2840);
_hotspot8.setStrip(2);
_hotspot8.setPosition(Common::Point(96, 184));
- _hotspot8.setPriority2(236);
+ _hotspot8.fixPriority(236);
_globals->_player.postInit();
_globals->_player.setVisage(2640);
@@ -2930,25 +2943,25 @@ void Scene2200::postInit(SceneObjectList *OwnerList) {
_hotspot1.postInit();
_hotspot1.setVisage(2202);
_hotspot1.setPosition(Common::Point(175, 173));
- _hotspot1.setPriority2(99);
+ _hotspot1.fixPriority(99);
_hotspot3.postInit();
_hotspot3.setVisage(2202);
_hotspot3._strip = 2;
_hotspot3.setPosition(Common::Point(152, 76));
- _hotspot3.setPriority2(100);
+ _hotspot3.fixPriority(100);
_hotspot4.postInit();
_hotspot4.setVisage(2202);
_hotspot4._strip = 3;
_hotspot4.setPosition(Common::Point(115, 76));
- _hotspot4.setPriority2(200);
+ _hotspot4.fixPriority(200);
setAction(&_action1);
break;
case 2310:
default:
- _globals->_inventory._infoDisk._sceneNumber = 1;
+ RING_INVENTORY._infoDisk._sceneNumber = 1;
_hotspot3.postInit();
_hotspot3.setVisage(2215);
@@ -2959,7 +2972,7 @@ void Scene2200::postInit(SceneObjectList *OwnerList) {
_hotspot4.setVisage(2215);
_hotspot4._strip = 2;
_hotspot4.setPosition(Common::Point(120, 78));
- _hotspot4.setPriority2(255);
+ _hotspot4.fixPriority(255);
_globals->_sceneItems.push_back(&_hotspot4);
_soundHandler1.startSound(101);
@@ -2993,9 +3006,9 @@ void Scene2200::stripCallback(int v) {
}
}
-void Scene2200::synchronise(Serialiser &s) {
- Scene::synchronise(s);
- _exitRect.synchronise(s);
+void Scene2200::synchronize(Serializer &s) {
+ Scene::synchronize(s);
+ _exitRect.synchronize(s);
}
void Scene2200::signal() {
@@ -3096,7 +3109,7 @@ void Scene2222::postInit(SceneObjectList *OwnerList) {
_hotspot5.postInit();
_hotspot5.setVisage(3401);
_hotspot5.setStrip2(2);
- _hotspot5._frame = 5;
+ _hotspot5.setFrame(5);
_hotspot5.animate(ANIM_MODE_2, 0);
if (_globals->_sceneManager._previousScene == 2100) {
@@ -3118,7 +3131,7 @@ void Scene2222::postInit(SceneObjectList *OwnerList) {
}
_soundHandler.startSound(116);
- _globals->_sceneManager._scene->_sceneBounds.centre(_hotspot1._position);
+ _globals->_sceneManager._scene->_sceneBounds.center(_hotspot1._position);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
@@ -3197,7 +3210,7 @@ void Scene2230::Action2::signal() {
case 2:
_globals->_player.setVisage(2235);
_globals->_player.setStrip2(1);
- _globals->_player.setPriority2(100);
+ _globals->_player.fixPriority(100);
_globals->_player._frame = 1;
_globals->_player.setPosition(Common::Point(200, 68));
_globals->_player.animate(ANIM_MODE_5, this);
@@ -3241,7 +3254,7 @@ void Scene2230::Action3::signal() {
_globals->_player.setVisage(0);
_globals->_player.setStrip2(-1);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.setPosition(Common::Point(164, 96));
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player._canWalk = true;
@@ -3284,7 +3297,7 @@ void Scene2230::Action5::signal() {
break;
}
case 2:
- _globals->_player.setPriority2(1430);
+ _globals->_player.fixPriority(1430);
_globals->_player.setVisage(2232);
_globals->_player._strip = 1;
_globals->_player._frame = 1;
@@ -3306,7 +3319,7 @@ void Scene2230::Action6::signal() {
case 0:
_globals->_player._strip = 2;
_globals->_player._frame = 1;
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 1:
@@ -3359,7 +3372,7 @@ void Scene2230::Action7::signal() {
scene->_hotspot2.setVisage(2231);
scene->_hotspot2._strip = 3;
scene->_hotspot2.setPosition(Common::Point(166, 116));
- scene->_hotspot2.setPriority2(131);
+ scene->_hotspot2.fixPriority(131);
scene->_hotspot2.animate(ANIM_MODE_5, this);
scene->_hotspot8._frame = 2;
@@ -3425,7 +3438,7 @@ void Scene2230::Action8::signal() {
scene->_hotspot2._strip = 3;
scene->_hotspot2._frame = scene->_hotspot2.getFrameCount();
scene->_hotspot2.setPosition(Common::Point(166, 116));
- scene->_hotspot2.setPriority2(131);
+ scene->_hotspot2.fixPriority(131);
scene->_hotspot2.animate(ANIM_MODE_6, this);
break;
case 4: {
@@ -3688,7 +3701,7 @@ void Scene2230::postInit(SceneObjectList *OwnerList) {
_hotspot8.animate(ANIM_MODE_NONE, 0);
_hotspot8.setPosition(Common::Point(164, 133));
_hotspot8.changeZoom(100);
- _hotspot8.setPriority2(129);
+ _hotspot8.fixPriority(129);
_rect1 = Rect(59, 64, 89, 74);
@@ -3720,9 +3733,9 @@ void Scene2230::postInit(SceneObjectList *OwnerList) {
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
}
-void Scene2230::synchronise(Serialiser &s) {
- Scene::synchronise(s);
- _rect1.synchronise(s);
+void Scene2230::synchronize(Serializer &s) {
+ Scene::synchronize(s);
+ _rect1.synchronize(s);
s.syncAsSint16LE(_field30A);
}
@@ -3766,7 +3779,7 @@ void Scene2280::Action1::signal() {
setDelay(10);
break;
case 4:
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
scene->_soundHandler.startSound(162);
scene->_hotspot16.animate(ANIM_MODE_6, this);
break;
@@ -3849,7 +3862,7 @@ void Scene2280::Action3::signal() {
scene->_hotspot12._strip = 2;
scene->_hotspot12._frame = 3;
scene->_hotspot12.setPosition(Common::Point(88, 76));
- scene->_hotspot12.setPriority2(1);
+ scene->_hotspot12.fixPriority(1);
_globals->_player.animate(ANIM_MODE_6, this);
break;
@@ -3867,7 +3880,7 @@ void Scene2280::Action3::signal() {
scene->_hotspot8.animate(ANIM_MODE_NONE, NULL);
scene->_hotspot8.setPosition(Common::Point(79, 108));
scene->_hotspot8.changeZoom(100);
- scene->_hotspot8.setPriority2(1);
+ scene->_hotspot8.fixPriority(1);
scene->_hotspot10.postInit();
scene->_hotspot10.setVisage(2280);
@@ -3876,7 +3889,7 @@ void Scene2280::Action3::signal() {
scene->_hotspot10.animate(ANIM_MODE_NONE, NULL);
scene->_hotspot10.setPosition(Common::Point(79, 104));
scene->_hotspot10.changeZoom(100);
- scene->_hotspot10.setPriority2(1);
+ scene->_hotspot10.fixPriority(1);
_globals->clearFlag(13);
@@ -3925,11 +3938,11 @@ void Scene2280::Action4::signal() {
switch (_state) {
case 1:
scene->_hotspot18.remove();
- _globals->_inventory._scanner._sceneNumber = 1;
+ RING_INVENTORY._scanner._sceneNumber = 1;
break;
case 6:
scene->_hotspot17.remove();
- _globals->_inventory._medkit._sceneNumber = 1;
+ RING_INVENTORY._medkit._sceneNumber = 1;
break;
case 50:
scene->_hotspot17.postInit();
@@ -3939,9 +3952,9 @@ void Scene2280::Action4::signal() {
scene->_hotspot17.animate(ANIM_MODE_NONE, NULL);
scene->_hotspot17.setPosition(Common::Point(162, 39));
scene->_hotspot17.changeZoom(100);
- scene->_hotspot17.setPriority2(1);
+ scene->_hotspot17.fixPriority(1);
- _globals->_inventory._medkit._sceneNumber = 2280;
+ RING_INVENTORY._medkit._sceneNumber = 2280;
_globals->_sceneItems.push_front(&scene->_hotspot17);
break;
case 51:
@@ -3952,9 +3965,9 @@ void Scene2280::Action4::signal() {
scene->_hotspot18.animate(ANIM_MODE_NONE, NULL);
scene->_hotspot18.setPosition(Common::Point(152, 43));
scene->_hotspot18.changeZoom(100);
- scene->_hotspot18.setPriority2(1);
+ scene->_hotspot18.fixPriority(1);
- _globals->_inventory._scanner._sceneNumber = 2280;
+ RING_INVENTORY._scanner._sceneNumber = 2280;
_globals->_sceneItems.push_front(&scene->_hotspot18);
break;
}
@@ -4221,25 +4234,25 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
_hotspot16.postInit();
_hotspot16.setVisage(2281);
_hotspot16.setPosition(Common::Point(208, 90));
- _hotspot16.setPriority2(80);
+ _hotspot16.fixPriority(80);
- if (_globals->_inventory._medkit._sceneNumber == 2280) {
+ if (RING_INVENTORY._medkit._sceneNumber == 2280) {
_hotspot17.postInit();
_hotspot17.setVisage(2161);
_hotspot17._strip = 2;
_hotspot17.setPosition(Common::Point(162, 39));
- _hotspot17.setPriority2(1);
+ _hotspot17.fixPriority(1);
_globals->_sceneItems.push_back(&_hotspot17);
}
- if (_globals->_inventory._scanner._sceneNumber == 2280) {
+ if (RING_INVENTORY._scanner._sceneNumber == 2280) {
_hotspot18.postInit();
_hotspot18.setVisage(2161);
_hotspot18._strip = 2;
_hotspot18._frame = 2;
_hotspot17.setPosition(Common::Point(152, 43));
- _hotspot17.setPriority2(1);
+ _hotspot17.fixPriority(1);
_globals->_sceneItems.push_back(&_hotspot17);
}
@@ -4249,21 +4262,21 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
_hotspot8.setVisage(2280);
_hotspot8._strip = 2;
_hotspot8.setPosition(Common::Point(79, 108));
- _hotspot8.setPriority2(1);
+ _hotspot8.fixPriority(1);
_hotspot10.postInit();
_hotspot10.setVisage(2280);
_hotspot10._strip = 2;
_hotspot10._frame = 2;
_hotspot10.setPosition(Common::Point(79, 104));
- _hotspot10.setPriority2(2);
+ _hotspot10.fixPriority(2);
_hotspot12.postInit();
_hotspot12.setVisage(2280);
_hotspot12._strip = 2;
_hotspot12._frame = 3;
_hotspot12.setPosition(Common::Point(88, 76));
- _hotspot12.setPriority2(1);
+ _hotspot12.fixPriority(1);
_globals->_sceneItems.addItems(&_hotspot8, &_hotspot10, &_hotspot12, NULL);
}
@@ -4273,19 +4286,19 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
_hotspot9.postInit();
_hotspot9.setVisage(2280);
_hotspot9.setPosition(Common::Point(104, 96));
- _hotspot9.setPriority2(1);
+ _hotspot9.fixPriority(1);
_hotspot11.postInit();
_hotspot11.setVisage(2280);
_hotspot11._frame = 2;
_hotspot11.setPosition(Common::Point(130, 79));
- _hotspot11.setPriority2(1);
+ _hotspot11.fixPriority(1);
_hotspot13.postInit();
_hotspot13.setVisage(2280);
_hotspot13._frame = 3;
_hotspot13.setPosition(Common::Point(113, 63));
- _hotspot13.setPriority2(1);
+ _hotspot13.fixPriority(1);
_hotspot1.setBounds(Rect(225, 70, 234, 80));
_hotspot2.setBounds(Rect(44, 78, 56, 105));
@@ -4310,7 +4323,7 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
_globals->_player.enableControl();
} else {
_globals->setFlag(109);
- _globals->_player.setPriority2(76);
+ _globals->_player.fixPriority(76);
_globals->_player.disableControl();
_sceneMode = 2281;
@@ -4329,7 +4342,7 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
void Scene2280::signal() {
if (_sceneMode == 2281) {
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.enableControl();
}
}
@@ -4342,9 +4355,9 @@ void Scene2280::dispatch() {
}
}
-void Scene2280::synchronise(Serialiser &s) {
- Scene::synchronise(s);
- _exitRect.synchronise(s);
+void Scene2280::synchronize(Serializer &s) {
+ Scene::synchronize(s);
+ _exitRect.synchronize(s);
}
/*--------------------------------------------------------------------------
@@ -4422,7 +4435,7 @@ void Scene2300::Action1::signal() {
_globals->_soundHandler.startSound(77, this);
break;
case 8:
- _globals->_game.endGame(2300, 0);
+ _globals->_game->endGame(2300, 0);
break;
case 9:
if (scene->_hotspot5._mover)
@@ -4454,8 +4467,8 @@ void Scene2300::Action1::signal() {
scene->_hotspot6._frame = 1;
scene->_hotspot5.animate(ANIM_MODE_5, NULL);
scene->_hotspot6.animate(ANIM_MODE_5, NULL);
- scene->_hotspot5.setPriority2(20);
- scene->_hotspot6.setPriority2(20);
+ scene->_hotspot5.fixPriority(20);
+ scene->_hotspot6.fixPriority(20);
_globals->_player.setVisage(2672);
_globals->_player._strip = 5;
@@ -4546,7 +4559,7 @@ void Scene2300::Action2::signal() {
case 7:
scene->_hotspot7._strip = 2;
scene->_hotspot7._frame = 1;
- scene->_hotspot7.animate(ANIM_MODE_7, this);
+ scene->_hotspot7.animate(ANIM_MODE_5, this);
break;
case 8:
scene->_hotspot2.animate(ANIM_MODE_6, this);
@@ -4626,7 +4639,7 @@ void Scene2300::Action4::signal() {
scene->_hotspot9.setStrip2(2);
scene->_hotspot9.setFrame(3);
scene->_hotspot9.setPosition(Common::Point(273, 199));
- scene->_hotspot9.setPriority2(19);
+ scene->_hotspot9.fixPriority(19);
scene->_hotspot9.animate(ANIM_MODE_5, this);
scene->_soundHandler1.startSound(11);
break;
@@ -4672,7 +4685,7 @@ void Scene2300::Hotspot5::doAction(int action) {
}
}
-void Scene2300::Hotspot6::doAction(int action) {
+void Scene2300::Hotspot7::doAction(int action) {
Scene2300 *scene = (Scene2300 *)_globals->_sceneManager._scene;
switch (action) {
@@ -4707,12 +4720,12 @@ void Scene2300::postInit(SceneObjectList *OwnerList) {
setZoomPercents(0, 100, 200, 100);
_stripManager.addSpeaker(&_speakerSL);
- _stripManager.addSpeaker(&_speakerML);
+ _stripManager.addSpeaker(&_speakerMText);
_stripManager.addSpeaker(&_speakerQText);
_stripManager.addSpeaker(&_speakerSText);
- _globals->_inventory._stunner._sceneNumber = 1;
- _globals->_inventory._infoDisk._sceneNumber = 1;
+ RING_INVENTORY._stunner._sceneNumber = 1;
+ RING_INVENTORY._infoDisk._sceneNumber = 1;
_hotspot8.postInit();
_hotspot8.setVisage(2301);
@@ -4727,7 +4740,7 @@ void Scene2300::postInit(SceneObjectList *OwnerList) {
_hotspot9.setStrip2(2);
_hotspot9._frame = _hotspot9.getFrameCount();
_hotspot9.setPosition(Common::Point(273, 199));
- _hotspot9.setPriority2(1);
+ _hotspot9.fixPriority(1);
_hotspot10.postInit();
_hotspot10.setVisage(2301);
@@ -4864,29 +4877,32 @@ void Scene2310::postInit(SceneObjectList *OwnerList) {
_globals->_events.setCursor(CURSOR_WALK);
_wireIndex = 5;
- _pageIndex = _globals->_randomSource.getRandomNumber(19) + 1;
+ if (_vm->getFeatures() & GF_CD)
+ _pageIndex = _globals->_randomSource.getRandomNumber(14) + 2;
+ else
+ _pageIndex = _globals->_randomSource.getRandomNumber(19) + 1;
signal();
}
void Scene2310::signal() {
switch (_sceneMode++) {
case 0: {
- Common::String fmtString = _vm->_dataManager->getMessage(2300, 22);
+ Common::String fmtString = _resourceManager->getMessage(2300, 22);
Common::String msg = Common::String::format(fmtString.c_str(), _pageList[_pageIndex]._pageNumber);
_sceneText._width = 280;
- _sceneText._textMode = ALIGN_CENTRE;
- _sceneText._colour1 = 35;
+ _sceneText._textMode = ALIGN_CENTER;
+ _sceneText._color1 = 35;
_sceneText._fontNumber = 2;
_sceneText.setup(msg);
- _sceneText.setPriority2(255);
+ _sceneText.fixPriority(255);
_sceneText.setPosition(Common::Point(30, 20));
break;
}
case 1: {
- Common::String msg = _vm->_dataManager->getMessage(2300, 23);
+ Common::String msg = _resourceManager->getMessage(2300, 23);
_sceneText.setup(msg);
- _sceneText.setPriority2(255);
+ _sceneText.fixPriority(255);
_sceneText.setPosition(Common::Point(30, 170));
_globals->_sceneObjects->draw();
@@ -4901,8 +4917,8 @@ void Scene2310::signal() {
}
}
-void Scene2310::synchronise(Serialiser &s) {
- Scene::synchronise(s);
+void Scene2310::synchronize(Serializer &s) {
+ Scene::synchronize(s);
s.syncAsSint16LE(_wireIndex);
s.syncAsSint16LE(_pageIndex);
@@ -4966,10 +4982,7 @@ void Scene2310::process(Event &event) {
}
void Scene2310::dispatch() {
- if ((_vm->getFeatures() & GF_CD) && !ConfMan.getBool("copy_protection")) {
- // CD version of Ringworld has the copy protection disabled
- signal();
- } else if (_wireIndex != 5) {
+ if (_wireIndex != 5) {
for (int idx = 0; idx < 5; ++idx) {
if (_rectList[idx].contains(_globals->_events._mousePos)) {
_wireList[_wireIndex].setFrame(idx + 2);
@@ -5033,7 +5046,7 @@ void Scene2320::Action2::signal() {
switch (_actionIndex++) {
case 0: {
scene->_soundHandler.startSound(253);
- scene->_hotspot13.setPriority2(99);
+ scene->_hotspot13.fixPriority(99);
Common::Point pt(scene->_hotspot13._position.x, 200);
NpcMover *mover = new NpcMover();
@@ -5068,7 +5081,7 @@ void Scene2320::Action3::signal() {
break;
}
case 3:
- scene->_hotspot6.setPriority2(scene->_hotspot6._priority - 1);
+ _globals->_player.fixPriority(scene->_hotspot6._priority - 1);
_globals->_player._strip = 3;
setDelay(10);
break;
@@ -5122,7 +5135,7 @@ void Scene2320::Action3::signal() {
break;
case 5: {
if (_state == 2320)
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
else
_globals->_sceneManager.changeScene(_state);
@@ -5165,13 +5178,13 @@ void Scene2320::Action4::signal() {
break;
case 3:
_globals->_player.animate(ANIM_MODE_6, NULL);
- scene->setAction(&scene->_action2);
+ setAction(&scene->_action2, this);
break;
case 4: {
scene->_hotspot16.postInit();
scene->_hotspot16.setVisage(2331);
scene->_hotspot16.setStrip(3);
- scene->_hotspot16.setPriority2(149);
+ scene->_hotspot16.fixPriority(149);
scene->_hotspot16.setPosition(Common::Point(320, 202));
scene->_hotspot16.show();
@@ -5181,14 +5194,14 @@ void Scene2320::Action4::signal() {
break;
}
case 5: {
- scene->_hotspot16.setPriority2(200);
+ scene->_hotspot16.fixPriority(200);
Common::Point pt(320, 180);
NpcMover *mover = new NpcMover();
scene->_hotspot16.addMover(mover, &pt, this);
break;
}
case 6: {
- scene->_hotspot16.setPriority2(-1);
+ scene->_hotspot16.fixPriority(-1);
_globals->_player.setVisage(0);
_globals->_player.animate(ANIM_MODE_1, NULL);
@@ -5262,7 +5275,7 @@ void Scene2320::Action4::signal() {
}
case 17: {
_globals->_player.animate(ANIM_MODE_6, NULL);
- scene->_hotspot16.setPriority2(160);
+ scene->_hotspot16.fixPriority(160);
Common::Point pt(320, 121);
NpcMover *mover = new NpcMover();
@@ -5290,7 +5303,7 @@ void Scene2320::Action4::signal() {
_globals->_player.setVisage(0);
_globals->_player.animate(ANIM_MODE_1, NULL);
- scene->_hotspot13.setPriority2(1);
+ scene->_hotspot13.fixPriority(1);
remove();
break;
}
@@ -5320,7 +5333,7 @@ void Scene2320::Action5::signal() {
_globals->_player.setVisage(2347);
_globals->_player.setStrip(1);
_globals->_player.setFrame(1);
- _globals->_player.setPriority2(137);
+ _globals->_player.fixPriority(137);
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 5:
@@ -5333,7 +5346,7 @@ void Scene2320::Action5::signal() {
_globals->_sceneManager.changeScene(7000);
else if (_globals->getFlag(59))
_globals->_sceneManager.changeScene(5000);
- else if (!_globals->getFlag(43) || (_globals->_inventory._ale._sceneNumber != 1))
+ else if (!_globals->getFlag(43) || (RING_INVENTORY._ale._sceneNumber != 1))
setDelay(10);
else {
scene->_hotspot11.setAction(NULL);
@@ -5345,7 +5358,7 @@ void Scene2320::Action5::signal() {
NpcMover *mover = new NpcMover();
scene->_hotspot11.addMover(mover, &pt, NULL);
- _globals->clearFlag(53);
+ _globals->clearFlag(43);
scene->_stripManager.start(2325, this);
}
break;
@@ -5376,7 +5389,7 @@ void Scene2320::Action6::signal() {
case 3:
_globals->_player.setVisage(0);
_globals->_player.setStrip(3);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.animate(ANIM_MODE_1, NULL);
@@ -5432,12 +5445,12 @@ void Scene2320::Action7::signal() {
scene->_hotspot6.animate(ANIM_MODE_5, this);
break;
case 2:
- scene->_hotspot10.setPriority2(-1);
+ scene->_hotspot10.fixPriority(-1);
ADD_MOVER_NULL(scene->_hotspot10, 321, 94);
- scene->_hotspot11.setPriority2(-1);
+ scene->_hotspot11.fixPriority(-1);
ADD_MOVER_NULL(scene->_hotspot11, 346, 85);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
ADD_MOVER(_globals->_player, 297, 89);
break;
case 3:
@@ -5454,10 +5467,6 @@ void Scene2320::Action7::signal() {
case 6:
ADD_MOVER_NULL(scene->_hotspot10, 491, 160);
ADD_MOVER(_globals->_player, 391, 88);
-
- _globals->_player.setStrip(1);
- _globals->_player.setFrame(1);
- _globals->_player.animate(ANIM_MODE_6, this);
break;
case 7:
ADD_PLAYER_MOVER(462, 182);
@@ -5477,7 +5486,7 @@ void Scene2320::Action7::signal() {
break;
case 12:
_globals->_player.enableControl();
- _globals->_inventory._stasisBox._sceneNumber = 2320;
+ RING_INVENTORY._stasisBox._sceneNumber = 2320;
break;
}
}
@@ -5507,7 +5516,7 @@ void Scene2320::Action8::signal() {
_globals->_player.enableControl();
break;
case 5:
- _globals->_inventory._stasisBox._sceneNumber = 2320;
+ RING_INVENTORY._stasisBox._sceneNumber = 2320;
scene->_sceneMode = 2326;
scene->_speakerGameText.setTextPos(Common::Point(_globals->_sceneManager._scene->_sceneBounds.left + 30, 10));
scene->setAction(&scene->_sequenceManager1, scene, 2326, &_globals->_player, &scene->_hotspot11, NULL);
@@ -5622,12 +5631,12 @@ void Scene2320::Hotspot11::doAction(int action) {
} else {
scene->_sceneMode = 2329;
- if (_globals->_inventory._ale._sceneNumber == 1) {
+ if (RING_INVENTORY._ale._sceneNumber == 1) {
scene->setAction(&scene->_sequenceManager1, scene, 2329, NULL);
} else if (!_globals->getFlag(110)) {
_globals->setFlag(110);
scene->setAction(&scene->_sequenceManager1, scene, 2330, NULL);
- } else if (_globals->_inventory._peg._sceneNumber != 1) {
+ } else if (RING_INVENTORY._peg._sceneNumber != 1) {
scene->setAction(&scene->_sequenceManager1, scene, 2331, NULL);
} else if (!_state) {
++_state;
@@ -5683,13 +5692,13 @@ void Scene2320::Hotspot14::doAction(int action) {
scene->_hotspot8.hide();
_globals->_sceneItems.push_front(&scene->_hotspot8);
- _globals->_inventory._waldos._sceneNumber = 2320;
+ RING_INVENTORY._waldos._sceneNumber = 2320;
scene->_hotspot9.postInit();
scene->_hotspot9.setVisage(2345);
scene->_hotspot9._strip = 6;
scene->_hotspot9.setPosition(Common::Point(536, 103));
- scene->_hotspot9.setPriority2(200);
+ scene->_hotspot9.fixPriority(200);
scene->_hotspot9.hide();
scene->_hotspot16.postInit();
@@ -5705,7 +5714,7 @@ void Scene2320::Hotspot14::doAction(int action) {
SceneItem::display2(2320, 24);
} else if (!_globals->getFlag(76)) {
SceneItem::display2(2320, 28);
- } else if (!_globals->_inventory._waldos._sceneNumber) {
+ } else if (!RING_INVENTORY._waldos._sceneNumber) {
SceneItem::display2(2320, 27);
} else {
SceneItem::display2(2320, 29);
@@ -5779,7 +5788,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot13.postInit();
_hotspot13.setVisage(2323);
_hotspot13.setPosition(Common::Point(319, 157));
- _hotspot13.setPriority2(1);
+ _hotspot13.fixPriority(1);
_hotspot12.postInit();
_hotspot12.setVisage(2321);
@@ -5787,18 +5796,18 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot12.animate(ANIM_MODE_8, 0, NULL);
_hotspot12.setPosition(Common::Point(412, 46));
- if (_globals->_inventory._waldos._sceneNumber == 2320) {
+ if (RING_INVENTORY._waldos._sceneNumber == 2320) {
_hotspot8.postInit();
_hotspot8.setVisage(2345);
_hotspot8.setStrip(5);
_hotspot8.setFrame(8);
_hotspot8.setPosition(Common::Point(541, 103));
- _hotspot8.setPriority2(201);
+ _hotspot8.fixPriority(201);
_globals->_sceneItems.push_back(&_hotspot8);
}
- _area1.setup(2100, 2, 1, 2150);
+ _area1.setup(2153, 2, 1, 2100);
_area1._pt = Common::Point(200, 31);
_area2.setup(2153, 3, 1, 2150);
_area2._pt = Common::Point(200, 50);
@@ -5812,17 +5821,20 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot11.setVisage(2705);
_hotspot11._strip = 3;
_hotspot11.setPosition(Common::Point(510, 156));
+ _globals->_sceneItems.push_back(&_hotspot11);
_hotspot11._state = 0;
_hotspot11.setAction(&_action1);
-
- _globals->_sceneItems.push_back(&_hotspot11);
}
_globals->_player.postInit();
+ if (_globals->getFlag(13))
+ _globals->_player.setVisage(2170);
+ else
+ _globals->_player.setVisage(0);
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.setPosition(Common::Point(320, 79));
- _globals->_player.setPriority2(10);
+ _globals->_player.fixPriority(10);
_globals->_player.changeZoom(-1);
_globals->_player._moveDiff.y = 3;
_globals->_player.disableControl();
@@ -5857,7 +5869,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_globals->_soundHandler.startSound(160);
_globals->_soundHandler.proc5(true);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.setPosition(Common::Point(389, 72));
_globals->_player.enableControl();
break;
@@ -5883,7 +5895,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(2347);
_globals->_player.setStrip(2);
_globals->_player.setFrame(5);
- _globals->_player.setPriority2(137);
+ _globals->_player.fixPriority(137);
_globals->_player.setPosition(Common::Point(165, 132));
setAction(&_action6);
@@ -5909,7 +5921,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_globals->_player.setStrip(2);
_globals->_player.setFrame(_globals->_player.getFrameCount());
_globals->_player.setPosition(Common::Point(303, 176));
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.disableControl();
_hotspot13.setPosition(Common::Point(319, 199));
@@ -5917,7 +5929,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot16.postInit();
_hotspot16.setVisage(2331);
_hotspot16._strip = 3;
- _hotspot16.setPriority2(160);
+ _hotspot16.fixPriority(160);
_hotspot16.setPosition(Common::Point(320, 202));
_hotspot16.hide();
@@ -5934,7 +5946,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot11.postInit();
_hotspot11.setVisage(2705);
_hotspot11._strip = 2;
- _hotspot11.setPriority2(10);
+ _hotspot11.fixPriority(10);
_hotspot11.setPosition(Common::Point(322, 80));
_hotspot11.setObjectWrapper(new SceneObjectWrapper());
_hotspot11.animate(ANIM_MODE_1, NULL);
@@ -5943,7 +5955,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot10.setVisage(2806);
_hotspot10.setObjectWrapper(new SceneObjectWrapper());
_hotspot10.changeZoom(-1);
- _hotspot10.setPriority2(10);
+ _hotspot10.fixPriority(10);
_hotspot10.setPosition(Common::Point(318, 89));
_hotspot10._strip = 3;
_hotspot10.animate(ANIM_MODE_1, NULL);
@@ -5971,7 +5983,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
}
_globals->_stripNum = 0;
- _globals->_sceneManager._scene->_sceneBounds.centre(_globals->_player._position);
+ _globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position);
loadScene(2320);
_hotspot14._sceneRegionId = 8;
@@ -5986,8 +5998,8 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
&_hotspot13, &_hotspot4, &_hotspot3, &_hotspot2, &_hotspot1, NULL);
}
-void Scene2320::synchronise(Serialiser &s) {
- Scene::synchronise(s);
+void Scene2320::synchronize(Serializer &s) {
+ Scene::synchronize(s);
SYNC_POINTER(_hotspotPtr);
}
@@ -6019,13 +6031,13 @@ void Scene2320::signal() {
break;
case 2326:
_globals->clearFlag(70);
- _globals->_inventory._nullifier._sceneNumber = 1;
+ RING_INVENTORY._nullifier._sceneNumber = 1;
_globals->_stripNum = 2321;
_globals->_sceneManager.changeScene(2100);
break;
case 2336:
_globals->setFlag(77);
- _globals->_inventory._waldos._sceneNumber = 1;
+ RING_INVENTORY._waldos._sceneNumber = 1;
_hotspot8.remove();
break;
case 5000:
@@ -6088,7 +6100,7 @@ void Scene2400::postInit(SceneObjectList *OwnerList) {
setAction(&_action1);
- _globals->_sceneManager._scene->_sceneBounds.centre(_globals->_player._position.x, _globals->_player._position.y);
+ _globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position.x, _globals->_player._position.y);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;