Skip to content

Commit

Permalink
TAGE: Bugfixes for R2R bridge console
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Aug 12, 2013
1 parent 41c1ea2 commit 452ffa5
Showing 1 changed file with 79 additions and 59 deletions.
138 changes: 79 additions & 59 deletions engines/tsage/ringworld2/ringworld2_scenes0.cpp
Expand Up @@ -2976,7 +2976,7 @@ bool Scene300::Miranda::startAction(CursorType action, Event &event) {
} else if (!R2_GLOBALS.getFlag(55)) {
R2_GLOBALS._events.setCursor(CURSOR_ARROW);
scene->_sceneMode = 10;
scene->_stripManager.start3(scene->_stripId, scene, R2_GLOBALS._stripManager_lookupList);
scene->_stripManager.start3(201, scene, R2_GLOBALS._stripManager_lookupList);
} else {
scene->_sceneMode = 16;

Expand Down Expand Up @@ -3357,7 +3357,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
break;
case 325:
if (!R2_GLOBALS.getFlag(44) || R2_GLOBALS.getFlag(25))
setAction(&_sequenceManager1, this, 309, &R2_GLOBALS._player, NULL);
setAction(&_sequenceManager1, this, 307, &R2_GLOBALS._player, NULL);
else {
R2_GLOBALS.setFlag(60);
R2_GLOBALS._player.setup(302, 3, 1);
Expand Down Expand Up @@ -3895,8 +3895,8 @@ Scene325::Scene325(): SceneExt() {
}

void Scene325::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit();
loadScene(325);
SceneExt::postInit();

R2_GLOBALS.clearFlag(50);
_stripManager.addSpeaker(&_quinnSpeaker);
Expand Down Expand Up @@ -4023,7 +4023,7 @@ void Scene325::signal() {

if (R2_GLOBALS.getFlag(44) && !R2_GLOBALS.getFlag(51)) {
if (v != 13) {
setMessage(328, 0);
setMessage(328, v);
} else {
_field420 = 864;

Expand All @@ -4034,7 +4034,7 @@ void Scene325::signal() {

_object13.postInit();
_object13.setup(326, 4, 2);
_object13.setPosition(Common::Point(149, (int)(_field420 * ADJUST_FACTOR)));
_object13.setPosition(Common::Point(149, 22 + (int)(_field420 * ADJUST_FACTOR)));
_object13.fixPriority(21);

_object10.postInit();
Expand All @@ -4045,7 +4045,7 @@ void Scene325::signal() {
_object1.postInit();
_object1.setup(326, 1, 1);
_object1.setPosition(Common::Point(210, 32));
_object10.fixPriority(10);
_object1.fixPriority(10);

_object2.postInit();
_object2.setup(326, 1, 1);
Expand Down Expand Up @@ -4095,7 +4095,7 @@ void Scene325::signal() {
} else if (R2_GLOBALS.getFlag(51)) {
setMessage(329, (v == 12) ? 10 : v);
} else {
setMessage(327, (v < 15) ? 1 : v);
setMessage(327, (v >= 15) ? 1 : v);
}
break;
}
Expand Down Expand Up @@ -4136,12 +4136,12 @@ void Scene325::signal() {
setMessage(128, _field416);
break;
default:
R2_GLOBALS._player.enableControl();
R2_GLOBALS._player._canWalk = false;
_field416 = 105;
setMessage(128, _field416);
_field416 = 0;
break;
}

R2_GLOBALS._player.enableControl();
R2_GLOBALS._player._canWalk = false;
break;
case 10:
R2_GLOBALS._player.enableControl();
Expand Down Expand Up @@ -4223,31 +4223,50 @@ void Scene325::consoleAction(int id) {
_icon1.hideIcon();
_icon2.hideIcon();
_icon3.hideIcon();
// TODO: Finish
break;
case 3:
_icon1.setIcon(5);
_icon2.setIcon(6);
_icon3.setIcon(R2_GLOBALS.getFlag(50) ? 16 : 15);
break;
case 4:
case 5:
_field418 = id;
_icon1.setIcon(17);
_icon2.setIcon(18);
_icon3.setIcon(19);
break;
case 7:
consoleAction(((_field412 == 5) || (_field412 == 6) || (_field412 == 15)) ? 4 : 7);

if (id == 2 || (id == 19 && _field418 == 5 && R2_GLOBALS.getFlag(50) &&
R2_GLOBALS.getFlag(44) && !R2_GLOBALS.getFlag(51))) {
_icon5.setIcon(13);
_icon4.setPosition(Common::Point(52, 107));
_icon4._sceneRegionId = 9;
_icon4.setIcon(14);
_icon4._object2.hide();

} else {
_icon4.hideIcon();
_icon5.hideIcon();
}

_icon6.setIcon(12);
_sceneMode = 10;
_palette.loadPalette(161);
BF_GLOBALS._scenePalette.addFader(&_palette._palette[0], 256, 5, this);
break;
case 8:
R2_GLOBALS._sceneManager.changeScene(300);
case 9:
case 10:
_iconFontNumber = (id - 1) == 9 ? 50 : 52;
_text1.remove();
_icon6.setIcon(7);

case 22:
case 23:
case 24:
case 25:
R2_GLOBALS._player.disableControl();
consoleAction(2);
_field412 = id;
_icon1.hideIcon();
_icon2.hideIcon();
_icon3.hideIcon();
_icon4.hideIcon();

_icon5.setIcon(13);
_icon4.setPosition(Common::Point(52, 107));
_icon4._sceneRegionId = 9;
_icon4.setIcon(14);
_icon4._object2.hide();

_icon6.setIcon(12);
_sceneMode = 10;
_palette.loadPalette(161);
BF_GLOBALS._scenePalette.addFader(&_palette._palette[0], 256, 5, this);
break;

case 11:
if (R2_GLOBALS.getFlag(57) && (R2_GLOBALS._player._characterIndex == 1) && !R2_GLOBALS.getFlag(25)) {
R2_GLOBALS._player.disableControl();
Expand All @@ -4256,6 +4275,7 @@ void Scene325::consoleAction(int id) {
_stripManager.start(403, this);
} else {
R2_GLOBALS._player.disableControl();
id = 8;
_text1.remove();

_icon4.setPosition(Common::Point(80, 62));
Expand All @@ -4282,6 +4302,31 @@ void Scene325::consoleAction(int id) {
BF_GLOBALS._scenePalette.addFader(&_palette._palette[0], 256, 5, this);
}
break;

case 3:
_icon1.setIcon(5);
_icon2.setIcon(6);
_icon3.setIcon(R2_GLOBALS.getFlag(50) ? 16 : 15);
break;
case 4:
case 5:
_field418 = id;
_icon1.setIcon(17);
_icon2.setIcon(18);
_icon3.setIcon(19);
_icon4.setIcon(20);
break;
case 7:
consoleAction(((_field412 == 5) || (_field412 == 6) || (_field412 == 15)) ? 4 : 7);
break;
case 8:
R2_GLOBALS._sceneManager.changeScene(300);
case 9:
case 10:
_iconFontNumber = (id - 1) == 9 ? 50 : 52;
_text1.remove();
_icon6.setIcon(7);
break;
case 12:
_icon4.setIcon(14);
_icon4._object2.hide();
Expand Down Expand Up @@ -4333,31 +4378,6 @@ void Scene325::consoleAction(int id) {
consoleAction(4);
id = 4;
break;
case 22:
case 23:
case 24:
case 25:
R2_GLOBALS._player.disableControl();
consoleAction(2);
_field412 = id;

_icon1.hideIcon();
_icon2.hideIcon();
_icon3.hideIcon();
_icon4.hideIcon();

_icon5.setIcon(13);
_icon4.setPosition(Common::Point(52, 107));
_icon4._sceneRegionId = 9;
_icon4.setIcon(14);
_icon4._object2.hide();

_icon6.setIcon(12);
_sceneMode = 10;
_palette.loadPalette(161);

BF_GLOBALS._scenePalette.addFader(&_palette._palette[0], 256, 5, this);
break;
case 6:
default:
_icon1.setIcon(1);
Expand Down

0 comments on commit 452ffa5

Please sign in to comment.