aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorPaul Gilbert2013-09-15 20:41:44 -0400
committerPaul Gilbert2013-09-15 20:41:44 -0400
commit395c94401a407f77d11ff142bbe648bb7b21d5c6 (patch)
tree5efe372e6538a90ce8b7efd421aca7aa4b40aba6 /engines/tsage
parent829e281546338db9c12f55d4744c9a260df96f55 (diff)
downloadscummvm-rg350-395c94401a407f77d11ff142bbe648bb7b21d5c6.tar.gz
scummvm-rg350-395c94401a407f77d11ff142bbe648bb7b21d5c6.tar.bz2
scummvm-rg350-395c94401a407f77d11ff142bbe648bb7b21d5c6.zip
TSAGE: Added a Skip button to the R2R balloon scene to allow skipping it
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.cpp23
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes2.h8
2 files changed, 29 insertions, 2 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.cpp b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
index 81c936dce1..fb4dde6456 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.cpp
@@ -4677,6 +4677,18 @@ bool Scene2900::KnobRight::startAction(CursorType action, Event &event) {
return true;
}
+bool Scene2900::Skip::startAction(CursorType action, Event &event) {
+ Scene2900 *scene = (Scene2900 *)R2_GLOBALS._sceneManager._scene;
+
+ if (action == CURSOR_USE) {
+ R2_GLOBALS._player.disableControl();
+ scene->_sceneMode = 12;
+ scene->signal();
+ }
+
+ return true;
+}
+
/*------------------------------------------------------------------------*/
void Scene2900::Action1::signal() {
@@ -4912,7 +4924,6 @@ void Scene2900::Map::moveLine(int xpSrc, int ypSrc, int xpDest, int ypDest, int
surface.unlockSurface();
}
-
/*------------------------------------------------------------------------*/
Scene2900::Scene2900(): SceneExt() {
@@ -4988,11 +4999,21 @@ void Scene2900::postInit(SceneObjectList *OwnerList) {
_knobRightContent.setPosition(Common::Point(247, 199));
_knobRightContent.fixPriority(200);
+ // Set up hotspots
_scenery.setDetails(Rect(0, 0, 320, 150), 2900, -1, -1, -1, 1, (SceneItem *)NULL);
_controlPanel.setDetails(Rect(0, 150, 320, 200), 2900, -1, -1, -1, 1, (SceneItem *)NULL);
_altimeter.setDetails(Rect(42, 164, 129, 190), 2900, -1, -1, -1, 2, (SceneItem *)NULL);
_knobLeft.setDetails(Rect(165, 160, 228, 200), 2900, -1, -1, -1, 2, (SceneItem *)NULL);
_knobRight.setDetails(Rect(228, 160, 285, 200), 2900, -1, -1, -1, 2, (SceneItem *)NULL);
+ _skip.postInit();
+ _skip.setBounds(185, 50, 200, 0);
+ R2_GLOBALS._sceneItems.push_front(&_skip);
+
+ // For ScummVM, we're introducing a Skip button, since the scene is a pain
+ _skipText._color1 = R2_GLOBALS._scenePalette._colors.foreground;
+ _skipText._color2 = R2_GLOBALS._scenePalette._colors.background;
+ _skipText.setPosition(Common::Point(0, 185));
+ _skipText.setup("Skip");
setAction(&_action1);
R2_GLOBALS._player.postInit();
diff --git a/engines/tsage/ringworld2/ringworld2_scenes2.h b/engines/tsage/ringworld2/ringworld2_scenes2.h
index 0c2b971cda..422507883f 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes2.h
+++ b/engines/tsage/ringworld2/ringworld2_scenes2.h
@@ -689,6 +689,10 @@ class Scene2900 : public SceneExt {
public:
virtual bool startAction(CursorType action, Event &event);
};
+ class Skip : public NamedHotspot {
+ public:
+ virtual bool startAction(CursorType action, Event &event);
+ };
/* Actions */
class Action1: public Action {
@@ -696,7 +700,7 @@ class Scene2900 : public SceneExt {
void signal();
};
- /* Custom classes */
+ /* Miscellaneous */
class Map {
private:
void moveArea(Rect &r, int xAmt, int yAmt);
@@ -731,8 +735,10 @@ public:
Altimeter _altimeter;
KnobLeft _knobLeft;
KnobRight _knobRight;
+ Skip _skip;
Action1 _action1;
Map _map;
+ SceneText _skipText;
int _field412;
bool _altitudeChanging;