aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorStrangerke2011-11-26 16:53:06 +0100
committerStrangerke2011-11-26 16:53:06 +0100
commit50c44aacf41cc0bb21f98b55afa659a3878233ae (patch)
tree051bd010d2af967c2d985b4036cfee57040f56af /engines/tsage
parent0b6042eadd176782a9ff4e64631b0666de221a37 (diff)
downloadscummvm-rg350-50c44aacf41cc0bb21f98b55afa659a3878233ae.tar.gz
scummvm-rg350-50c44aacf41cc0bb21f98b55afa659a3878233ae.tar.bz2
scummvm-rg350-50c44aacf41cc0bb21f98b55afa659a3878233ae.zip
TSAGE: R2R - Implement initPlayer in scene 2000
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.cpp133
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.h1
2 files changed, 127 insertions, 7 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index 19e683f546..a2cb81a9d8 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -33,8 +33,128 @@ namespace Ringworld2 {
* Scene 2000 -
*
*--------------------------------------------------------------------------*/
-void Scene2000::initExits() {
+void Scene2000::initPlayer() {
+ R2_GLOBALS._player.disableControl();
+ warning("DisableControl, with argements?");
+
+ switch (_field414) {
+ case 0:
+ R2_GLOBALS._player.setStrip(5);
+ if (_exit1._enabled) {
+ if (_exit2._enabled)
+ R2_GLOBALS._player.setPosition(Common::Point(140, 129));
+ else
+ R2_GLOBALS._player.setPosition(Common::Point(20, 129));
+ } else
+ R2_GLOBALS._player.setPosition(Common::Point(245, 129));
+ R2_GLOBALS._player.enableControl();
+ warning("EnableControl, with 2 arguments?");
+ break;
+ case 1:
+ if (R2_GLOBALS._player._characterIndex == 1)
+ _sceneMode = 2001;
+ else
+ _sceneMode = 2021;
+ setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
+ break;
+ case 2:
+ if (R2_GLOBALS._player._characterIndex == 1)
+ _sceneMode = 2002;
+ else
+ _sceneMode = 2022;
+ setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
+ break;
+ case 3:
+ if (R2_GLOBALS._player._characterIndex == 1)
+ _sceneMode = 2000;
+ else
+ _sceneMode = 2020;
+ setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
+ break;
+ case 4:
+ if (R2_GLOBALS._player._characterIndex == 1)
+ _sceneMode = 2005;
+ else
+ _sceneMode = 2025;
+ setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
+ break;
+ case 5:
+ if (R2_GLOBALS._player._characterIndex == 1)
+ _sceneMode = 2004;
+ else
+ _sceneMode = 2024;
+ setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
+ break;
+ case 6:
+ if (R2_GLOBALS._player._characterIndex == 1)
+ _sceneMode = 2009;
+ else
+ _sceneMode = 2029;
+ setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
+ break;
+ case 7:
+ if (R2_GLOBALS._player._characterIndex == 1)
+ _sceneMode = 2008;
+ else
+ _sceneMode = 2028;
+ setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
+ break;
+ case 8:
+ if (R2_GLOBALS._player._characterIndex == 1)
+ _sceneMode = 2013;
+ else
+ _sceneMode = 2033;
+ setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
+ break;
+ case 9:
+ if (R2_GLOBALS._player._characterIndex == 1)
+ _sceneMode = 2012;
+ else
+ _sceneMode = 2032;
+ setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
+ break;
+ case 10:
+ if (R2_GLOBALS._player._characterIndex == 1)
+ _sceneMode = 2016;
+ else
+ _sceneMode = 2036;
+ setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
+ break;
+ case 11:
+ if (R2_GLOBALS._player._characterIndex == 1)
+ _sceneMode = 2038;
+ else
+ _sceneMode = 2040;
+ setAction(&_sequenceManager, this, _sceneMode, &R2_GLOBALS._player, NULL);
+ break;
+ default:
+ break;
+ }
+ for (int i = 0; i < 11; i++) {
+ if (R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex] == R2_GLOBALS._v56605[3 + i])
+ _objList1[i].show();
+ }
+
+ if ((R2_GLOBALS._player._characterScene[1] == R2_GLOBALS._player._characterScene[2]) && (R2_GLOBALS._v56605[1] == R2_GLOBALS._v56605[2])) {
+ _object1.postInit();
+ if (R2_GLOBALS._player._characterIndex == 1) {
+ _object1.setup(20, 5, 1);
+ _object1.setDetails(9002, 0, 4, 3, 1, NULL);
+ } else {
+ _object1.setup(2008, 5, 1);
+ _object1.setDetails(9001, 0, 5, 3, 1, NULL);
+ }
+ if (_exit1._enabled) {
+ if (_exit2._enabled)
+ _object1.setPosition(Common::Point(180, 128));
+ else
+ _object1.setPosition(Common::Point(75, 128));
+ } else
+ _object1.setPosition(Common::Point(300, 128));
+ }
+}
+void Scene2000::initExits() {
_exit1._enabled = true;
_exit2._enabled = true;
_exit3._enabled = false;
@@ -53,9 +173,8 @@ void Scene2000::initExits() {
_exit4._moving = false;
_exit5._moving = false;
- for (int i = 0; i < 11; i++) {
+ for (int i = 0; i < 11; i++)
_objList1[i].hide();
- }
_object1.remove();
@@ -809,7 +928,7 @@ void Scene2000::postInit(SceneObjectList *OwnerList) {
_objList1[5].setAction(&_action4);
_objList1[8].setAction(&_action1);
- warning("STUB: sub_D2FBA");
+ initPlayer();
_item1.setDetails(Rect(0, 0, 320, 200), 2000, 0, -1, 23, 1, NULL);
}
@@ -828,7 +947,7 @@ void Scene2000::signal() {
_field414 = 1;
--R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex];
initExits();
- warning("STUB: sub_D2FBA");
+ initPlayer();
}
break;
case 11:
@@ -846,14 +965,14 @@ void Scene2000::signal() {
_field414 = 2;
++R2_GLOBALS._v56605[R2_GLOBALS._player._characterIndex];
initExits();
- warning("STUB: sub_D2FBA");
+ initPlayer();
break;
}
break;
case 12:
case 13:
initExits();
- warning("STUB: sub_D2FBA");
+ initPlayer();
break;
case 14:
switch (_field414 - 1) {
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.h b/engines/tsage/ringworld2/ringworld2_scenes2.h
index 53237dccba..57565f8f32 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.h
@@ -81,6 +81,7 @@ public:
virtual void synchronize(Serializer &s);
void initExits();
+ void initPlayer();
};