aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2011-10-26 20:12:06 +1100
committerPaul Gilbert2011-10-26 20:13:08 +1100
commit0baf8f546774cd2d874be0551e33358846383b33 (patch)
tree188fd8d96aec8806b5c2caf34c8d5aecb9486873
parent5be3e437913bcdde23e5e4dda66ea4fb7fc470a0 (diff)
downloadscummvm-rg350-0baf8f546774cd2d874be0551e33358846383b33.tar.gz
scummvm-rg350-0baf8f546774cd2d874be0551e33358846383b33.tar.bz2
scummvm-rg350-0baf8f546774cd2d874be0551e33358846383b33.zip
TSAGE: Some bugfixes and field renaming for R2 scene 100
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.cpp48
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.h14
2 files changed, 43 insertions, 19 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index edc3f06aa2..a2fb011d23 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -34,7 +34,7 @@ namespace Ringworld2 {
*
*--------------------------------------------------------------------------*/
-bool Scene100::Object7::startAction(CursorType action, Event &event) {
+bool Scene100::Door::startAction(CursorType action, Event &event) {
Scene100 *scene = (Scene100 *)R2_GLOBALS._sceneManager._scene;
switch (action) {
@@ -169,6 +169,22 @@ bool Scene100::SteppingDisks::startAction(CursorType action, Event &event) {
/*--------------------------------------------------------------------------*/
+bool Scene100::Terminal::startAction(CursorType action, Event &event) {
+ Scene100 *scene = (Scene100 *)R2_GLOBALS._sceneManager._scene;
+
+ switch (action) {
+ case CURSOR_USE:
+ R2_GLOBALS._player.disableControl();
+ scene->_sceneMode = 105;
+ scene->setAction(&scene->_sequenceManager1, scene, 105, &R2_GLOBALS._player, this, NULL);
+ return true;
+ default:
+ return NamedHotspot::startAction(action, event);
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
void Scene100::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit();
loadScene(100);
@@ -177,11 +193,11 @@ void Scene100::postInit(SceneObjectList *OwnerList) {
if (R2_GLOBALS._sceneManager._previousScene != 125)
R2_GLOBALS._sound1.play(10);
- _object7.postInit();
- _object7._state = 0;
- _object7.setVisage(100);
- _object7.setPosition(Common::Point(160, 84));
- _object7.setDetails(100, 3, 4, 5, 1, NULL);
+ _door.postInit();
+ _door._state = 0;
+ _door.setVisage(100);
+ _door.setPosition(Common::Point(160, 84));
+ _door.setDetails(100, 3, 4, 5, 1, NULL);
_object10.postInit();
_object10.setup(100, 2, 1);
@@ -219,17 +235,17 @@ void Scene100::postInit(SceneObjectList *OwnerList) {
_steppingDisks.setDetails(100, 40, -1, 42, 1, NULL);
}
- _item5.setDetails(11, 100, 14, 15, 16);
- _item4.setDetails(12, 100, 11, -1, 13);
- _item3.setDetails(13, 100, 8, 9, 10);
- _item2.setDetails(14, 100, 34, -1, 36);
+ _terminal.setDetails(11, 100, 14, 15, 16);
+ _desk.setDetails(12, 100, 11, -1, 13);
+ _bed.setDetails(13, 100, 8, 9, 10);
+ _duct.setDetails(14, 100, 34, -1, 36);
R2_GLOBALS._player.postInit();
R2_GLOBALS._player.setVisage(10);
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);
R2_GLOBALS._player.disableControl();
- _item1.setDetails(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 100, 0, 1, -1, 1, NULL);
+ _background.setDetails(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 100, 0, 1, -1, 1, NULL);
switch (R2_GLOBALS._sceneManager._previousScene) {
case 50:
@@ -245,7 +261,7 @@ void Scene100::postInit(SceneObjectList *OwnerList) {
break;
case 200:
_sceneMode = 100;
- setAction(&_sequenceManager1, this, 100, &R2_GLOBALS._player, &_object7, NULL);
+ setAction(&_sequenceManager1, this, 100, &R2_GLOBALS._player, &_door, NULL);
break;
default:
R2_GLOBALS._player.setStrip(3);
@@ -295,11 +311,11 @@ void Scene100::signal() {
R2_GLOBALS._player.enableControl();
break;
case 110:
- if (_object7._state) {
- _object7._state = 0;
+ if (_door._state) {
+ _door._state = 0;
_object10.setFrame(1);
} else {
- _object7._state = 1;
+ _door._state = 1;
_object10.setFrame(2);
}
R2_GLOBALS._player.enableControl();
@@ -325,7 +341,7 @@ void Scene100::dispatch() {
SceneExt::dispatch();
- if ((_sceneMode == 101) && (_object7._frame == 2) && (_table._strip == 5)) {
+ if ((_sceneMode == 101) && (_door._frame == 2) && (_table._strip == 5)) {
_table.setAction(&_sequenceManager2, NULL, 103, &_table, &_object3, &_stasisNegator, NULL);
}
}
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.h b/engines/tsage/ringworld2/ringworld2_scenes0.h
index 4a38e78ba3..a80bda0726 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.h
@@ -40,7 +40,7 @@ using namespace TsAGE;
class Scene100: public SceneExt {
/* Objects */
- class Object7: public SceneActorExt {
+ class Door: public SceneActorExt {
public:
bool startAction(CursorType action, Event &event);
};
@@ -60,11 +60,19 @@ class Scene100: public SceneExt {
public:
bool startAction(CursorType action, Event &event);
};
+
+ /* Items */
+ class Terminal: public NamedHotspot{
+ public:
+ bool startAction(CursorType action, Event &event);
+ };
+
public:
- NamedHotspot _item1, _item2, _item3, _item4, _item5;
+ NamedHotspot _background, _duct, _bed, _desk;
+ Terminal _terminal;
SceneActor _object1, _object2, _object3, _object4, _object5;
SceneActor _object6;
- Object7 _object7;
+ Door _door;
Table _table;
StasisNegator _stasisNegator;
Object10 _object10;