aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/converse.cpp8
-rw-r--r--engines/tsage/core.cpp22
-rw-r--r--engines/tsage/core.h5
-rw-r--r--engines/tsage/debugger.cpp12
-rw-r--r--engines/tsage/detection.cpp8
-rw-r--r--engines/tsage/dialogs.cpp34
-rw-r--r--engines/tsage/dialogs.h4
-rw-r--r--engines/tsage/events.cpp61
-rw-r--r--engines/tsage/events.h3
-rw-r--r--engines/tsage/globals.cpp20
-rw-r--r--engines/tsage/graphics.cpp7
-rw-r--r--engines/tsage/resources.cpp13
-rw-r--r--engines/tsage/resources.h1
-rw-r--r--engines/tsage/ringworld_logic.cpp90
-rw-r--r--engines/tsage/ringworld_scenes1.cpp71
-rw-r--r--engines/tsage/ringworld_scenes10.cpp98
-rw-r--r--engines/tsage/ringworld_scenes2.cpp41
-rw-r--r--engines/tsage/ringworld_scenes3.cpp259
-rw-r--r--engines/tsage/ringworld_scenes5.cpp149
-rw-r--r--engines/tsage/ringworld_scenes5.h7
-rw-r--r--engines/tsage/ringworld_scenes6.cpp126
-rw-r--r--engines/tsage/ringworld_scenes6.h4
-rw-r--r--engines/tsage/ringworld_scenes8.cpp262
-rw-r--r--engines/tsage/ringworld_scenes8.h3
-rw-r--r--engines/tsage/saveload.cpp1
-rw-r--r--engines/tsage/scenes.cpp9
-rw-r--r--engines/tsage/sound.cpp2
-rw-r--r--engines/tsage/staticres.cpp3
-rw-r--r--engines/tsage/staticres.h4
-rw-r--r--engines/tsage/tsage.cpp6
30 files changed, 753 insertions, 580 deletions
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index 7183266cf4..c4358dc4b2 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -208,7 +208,7 @@ void SequenceManager::signal() {
break;
case 22:
v1 = getNextValue();
- _sceneObject->setPriority2(v1);
+ _sceneObject->fixPriority(v1);
break;
case 23:
v1 = getNextValue();
@@ -296,6 +296,8 @@ void SequenceManager::process(Event &event) {
!event.handled && _globals->_sceneObjects->contains(&_sceneText)) {
// Remove the text item
_sceneText.remove();
+ setDelay(2);
+ event.handled = true;
} else {
Action::process(event);
}
@@ -355,7 +357,7 @@ void SequenceManager::setMessage(int resNum, int lineNum, int color, const Commo
// Set the text message
_sceneText.setup(msg);
_sceneText.setPosition(Common::Point(textRect.left, textRect.top));
- _sceneText.setPriority2(255);
+ _sceneText.fixPriority(255);
_sceneText.show();
// Set the delay based on the number of words
@@ -849,7 +851,7 @@ void Speaker::setText(const Common::String &msg) {
_sceneText._textMode = _textMode;
_sceneText.setup(msg);
_sceneText.setPosition(_textPos);
- _sceneText.setPriority2(256);
+ _sceneText.fixPriority(256);
// Count the number of words (by spaces) in the string
const char *msgP = msg.c_str();
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index e56cadb68a..f03f10ffd2 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -25,6 +25,7 @@
#include "common/system.h"
#include "engines/engine.h"
+#include "graphics/palette.h"
#include "tsage/tsage.h"
#include "tsage/core.h"
#include "tsage/dialogs.h"
@@ -556,7 +557,6 @@ void PlayerMover::pathfind(Common::Point *routeList, Common::Point srcPos, Commo
} while (routeRegions[++idx] != destRegion);
tempList[idx] = 1;
- idx = 0;
for (int listIndex = 1; listIndex <= endIndex; ++listIndex) {
int var10 = tempList[listIndex];
int var12 = tempList[listIndex + 1];
@@ -1520,7 +1520,7 @@ void SceneItem::display(int resNum, int lineNum, ...) {
_globals->_sceneText.setPosition(pos, 0);
}
- _globals->_sceneText.setPriority2(255);
+ _globals->_sceneText.fixPriority(255);
_globals->_sceneObjects->draw();
}
@@ -1585,7 +1585,7 @@ void NamedHotspot::doAction(int action) {
}
}
-void NamedHotspot::setup(const int ys, const int xe, const int ye, const int xs, const int resnum, const int lookLineNum, const int useLineNum) {
+void NamedHotspot::setup(int ys, int xs, int ye, int xe, const int resnum, const int lookLineNum, const int useLineNum) {
setBounds(ys, xe, ye, xs);
_resnum = resnum;
_lookLineNum = lookLineNum;
@@ -1593,6 +1593,13 @@ void NamedHotspot::setup(const int ys, const int xe, const int ye, const int xs,
_globals->_sceneItems.addItems(this, NULL);
}
+void NamedHotspot::synchronise(Serialiser &s) {
+ SceneHotspot::synchronise(s);
+ s.syncAsSint16LE(_resnum);
+ s.syncAsSint16LE(_lookLineNum);
+ s.syncAsSint16LE(_useLineNum);
+}
+
/*--------------------------------------------------------------------------*/
void SceneObjectWrapper::setSceneObject(SceneObject *so) {
@@ -1794,7 +1801,7 @@ void SceneObject::setPriority(int priority) {
}
}
-void SceneObject::setPriority2(int priority) {
+void SceneObject::fixPriority(int priority) {
if (priority == -1) {
_flags &= ~OBJFLAG_FIXED_PRIORITY;
} else {
@@ -2238,7 +2245,7 @@ void SceneObject::setup(int visage, int stripFrameNum, int frameNum, int posX, i
setStrip(stripFrameNum);
setFrame(frameNum);
setPosition(Common::Point(posX, posY), 0);
- setPriority2(priority);
+ fixPriority(priority);
}
/*--------------------------------------------------------------------------*/
@@ -3309,7 +3316,7 @@ void WalkRegions::loadRevised() {
*/
int WalkRegions::indexOf(const Common::Point &pt, const Common::List<int> *indexList) {
for (uint idx = 0; idx < _regionList.size(); ++idx) {
- if ((!indexList || contains(*indexList, int(idx + 1))) && _regionList[idx].contains(pt))
+ if ((!indexList || !contains(*indexList, int(idx + 1))) && _regionList[idx].contains(pt))
return idx + 1;
}
@@ -3449,8 +3456,7 @@ void SceneHandler::process(Event &event) {
switch (event.kbd.keycode) {
case Common::KEYCODE_F1:
// F1 - Help
- _globals->_events.setCursor(CURSOR_ARROW);
- MessageDialog::show(HELP_MSG, OK_BTN_STRING);
+ MessageDialog::show((_vm->getFeatures() & GF_DEMO) ? DEMO_HELP_MSG : HELP_MSG, OK_BTN_STRING);
break;
case Common::KEYCODE_F2: {
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index e1ff95dcdd..45a39b24bb 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -432,9 +432,10 @@ public:
int _resnum, _lookLineNum, _useLineNum;
NamedHotspot() : SceneHotspot() {}
- void setup(const int ys, const int xe, const int ye, const int xs, const int resnum, const int lookLineNum, const int useLineNum);
+ void setup(int ys, int xs, int ye, int xe, const int resnum, const int lookLineNum, const int useLineNum);
virtual void doAction(int action);
virtual Common::String getClassName() { return "NamedHotspot"; }
+ virtual void synchronise(Serialiser &s);
};
enum AnimateMode {ANIM_MODE_NONE = 0, ANIM_MODE_1 = 1, ANIM_MODE_2 = 2, ANIM_MODE_3 = 3,
@@ -529,7 +530,7 @@ public:
void setFrame(int frameNum);
void setFrame2(int frameNum);
void setPriority(int priority);
- void setPriority2(int priority);
+ void fixPriority(int priority);
void setVisage(int visage);
void setObjectWrapper(SceneObjectWrapper *objWrapper);
void addMover(ObjectMover *mover, ...);
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp
index e8f0215e0e..eecc844292 100644
--- a/engines/tsage/debugger.cpp
+++ b/engines/tsage/debugger.cpp
@@ -24,8 +24,6 @@
*/
#include "tsage/debugger.h"
-#include "common/config-manager.h"
-#include "common/endian.h"
#include "tsage/globals.h"
#include "tsage/graphics.h"
#include "tsage/ringworld_logic.h"
@@ -94,6 +92,8 @@ bool Debugger::Cmd_WalkRegions(int argc, const char **argv) {
Graphics::Surface destSurface = _globals->_sceneManager._scene->_backSurface.lockSurface();
// Loop through drawing each walk region in a different color to the background surface
+ Common::String regionsDesc;
+
for (uint regionIndex = 0; regionIndex < _globals->_walkRegions._regionList.size(); ++regionIndex, ++color) {
WalkRegion &wr = _globals->_walkRegions._regionList[regionIndex];
@@ -104,6 +104,9 @@ bool Debugger::Cmd_WalkRegions(int argc, const char **argv) {
destSurface.hLine(sliceSet.items[idx].xs - _globals->_sceneOffset.x, yp,
sliceSet.items[idx].xe - _globals->_sceneOffset.x, color);
}
+
+ regionsDesc += Common::String::format("Region #%d d bounds=%d,%d,%d,%d\n",
+ regionIndex, wr._bounds.left, wr._bounds.top, wr._bounds.right, wr._bounds.bottom);
}
// Release the surface
@@ -112,6 +115,9 @@ bool Debugger::Cmd_WalkRegions(int argc, const char **argv) {
// Mark the scene as requiring a full redraw
_globals->_paneRefreshFlag[0] = 2;
+ DebugPrintf("Total regions = %d\n", _globals->_walkRegions._regionList.size());
+ DebugPrintf("%s\n", regionsDesc.c_str());
+
return false;
}
@@ -385,7 +391,7 @@ bool Debugger::Cmd_MoveObject(int argc, const char **argv) {
* Give a specified item to the player
*/
bool Debugger::Cmd_Item(int argc, const char **argv) {
- RING_INVENTORY._infoDisk._sceneNumber = 1;
+ RING_INVENTORY._stasisBox._sceneNumber = 1;
return true;
}
diff --git a/engines/tsage/detection.cpp b/engines/tsage/detection.cpp
index 5d34037b7b..ba7b459304 100644
--- a/engines/tsage/detection.cpp
+++ b/engines/tsage/detection.cpp
@@ -126,16 +126,18 @@ public:
virtual SaveStateList listSaves(const char *target) const {
Common::String pattern = target;
- pattern += ".*";
+ pattern += ".???";
Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles(pattern);
+ sort(filenames.begin(), filenames.end());
tSage::tSageSavegameHeader header;
SaveStateList saveList;
for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
- int slot;
const char *ext = strrchr(file->c_str(), '.');
- if (ext && (slot = atoi(ext + 1)) >= 0 && slot < MAX_SAVES) {
+ int slot = ext ? atoi(ext + 1) : -1;
+
+ if (slot >= 0 && slot < MAX_SAVES) {
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(*file);
if (in) {
diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp
index ba3a11f619..b5f00bf73c 100644
--- a/engines/tsage/dialogs.cpp
+++ b/engines/tsage/dialogs.cpp
@@ -24,11 +24,13 @@
*/
#include "common/translation.h"
+
+#include "gui/dialog.h"
+#include "gui/widget.h"
+
#include "tsage/tsage.h"
#include "tsage/core.h"
#include "tsage/dialogs.h"
-#include "tsage/graphics.h"
-#include "tsage/core.h"
#include "tsage/staticres.h"
#include "tsage/globals.h"
#include "tsage/ringworld_logic.h"
@@ -71,17 +73,12 @@ MessageDialog::MessageDialog(const Common::String &message, const Common::String
int MessageDialog::show(const Common::String &message, const Common::String &btn1Message, const Common::String &btn2Message) {
// Ensure that the cursor is the arrow
- CursorType currentCursor = _globals->_events.getCursor();
- if (currentCursor != CURSOR_ARROW)
- _globals->_events.setCursor(CURSOR_ARROW);
+ _globals->_events.pushCursor(CURSOR_ARROW);
_globals->_events.showCursor();
int result = show2(message, btn1Message, btn2Message);
- // If the cursor was changed, change it back
- if (currentCursor != CURSOR_ARROW)
- _globals->_events.setCursor(currentCursor);
-
+ _globals->_events.popCursor();
return result;
}
@@ -96,7 +93,6 @@ int MessageDialog::show2(const Common::String &message, const Common::String &bt
return result;
}
-
/*--------------------------------------------------------------------------*/
ConfigDialog::ConfigDialog() : GUI::OptionsDialog("", "GlobalConfig") {
@@ -416,10 +412,11 @@ InventoryDialog::InventoryDialog() {
imgHeight = MAX(imgHeight, (int)itemSurface.getBounds().height());
// Add the item to the display list
- _images.push_back(GfxInvImage());
- _images[_images.size() - 1].setDetails(invObject->_displayResNum, invObject->_rlbNum, invObject->_cursorNum);
- _images[_images.size() - 1]._invObject = invObject;
- add(&_images[_images.size() - 1]);
+ GfxInvImage *img = new GfxInvImage();
+ _images.push_back(img);
+ img->setDetails(invObject->_displayResNum, invObject->_rlbNum, invObject->_cursorNum);
+ img->_invObject = invObject;
+ add(img);
}
}
assert(_images.size() > 0);
@@ -441,7 +438,7 @@ InventoryDialog::InventoryDialog() {
cellX = 0;
}
- _images[idx]._bounds.moveTo(pt.x, pt.y);
+ _images[idx]->_bounds.moveTo(pt.x, pt.y);
pt.x += imgWidth + 2;
++cellX;
@@ -459,6 +456,11 @@ InventoryDialog::InventoryDialog() {
setCenter(SCREEN_CENTER_X, SCREEN_CENTER_Y);
}
+InventoryDialog::~InventoryDialog() {
+ for (uint idx = 0; idx < _images.size(); ++idx)
+ delete _images[idx];
+}
+
void InventoryDialog::execute() {
if ((RING_INVENTORY._selectedItem) && RING_INVENTORY._selectedItem->inInventory())
RING_INVENTORY._selectedItem->setCursor();
@@ -491,7 +493,7 @@ void InventoryDialog::execute() {
if (!event.handled && event.eventType == EVENT_KEYPRESS) {
if ((event.kbd.keycode == Common::KEYCODE_RETURN) || (event.kbd.keycode == Common::KEYCODE_ESCAPE)) {
// Exit the dialog
- hiliteObj = &_btnOk;
+ //hiliteObj = &_btnOk;
break;
}
}
diff --git a/engines/tsage/dialogs.h b/engines/tsage/dialogs.h
index d7828526eb..c24fa2dd3b 100644
--- a/engines/tsage/dialogs.h
+++ b/engines/tsage/dialogs.h
@@ -105,11 +105,11 @@ public:
class InventoryDialog : public ModalDialog {
private:
- Common::Array<GfxInvImage> _images;
+ Common::Array<GfxInvImage *> _images;
GfxButton _btnOk, _btnLook;
public:
InventoryDialog();
- virtual ~InventoryDialog() {}
+ virtual ~InventoryDialog();
void execute();
static void show();
diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp
index a92cbb9df9..bcfff9fc1d 100644
--- a/engines/tsage/events.cpp
+++ b/engines/tsage/events.cpp
@@ -38,6 +38,7 @@ namespace tSage {
EventsClass::EventsClass() {
_currentCursor = CURSOR_NONE;
+ hideCursor();
_frameNumber = 0;
_priorFrameTime = 0;
_prevDelayFrame = 0;
@@ -208,6 +209,62 @@ void EventsClass::setCursor(CursorType cursorType) {
DEALLOCATE(cursor);
}
+void EventsClass::pushCursor(CursorType cursorType) {
+ const byte *cursor;
+ bool delFlag = true;
+ uint size;
+
+ switch (cursorType) {
+ case CURSOR_CROSSHAIRS:
+ // Crosshairs cursor
+ cursor = _resourceManager->getSubResource(4, 1, 6, &size);
+ break;
+
+ case CURSOR_LOOK:
+ // Look cursor
+ cursor = _resourceManager->getSubResource(4, 1, 5, &size);
+ break;
+
+ case CURSOR_USE:
+ // Use cursor
+ cursor = _resourceManager->getSubResource(4, 1, 4, &size);
+ break;
+
+ case CURSOR_TALK:
+ // Talk cursor
+ cursor = _resourceManager->getSubResource(4, 1, 3, &size);
+ break;
+
+ case CURSOR_ARROW:
+ // Arrow cursor
+ cursor = CURSOR_ARROW_DATA;
+ delFlag = false;
+ break;
+
+ case CURSOR_WALK:
+ default:
+ // Walk cursor
+ cursor = CURSOR_WALK_DATA;
+ delFlag = false;
+ break;
+ }
+
+ // Decode the cursor
+ GfxSurface s = surfaceFromRes(cursor);
+
+ Graphics::Surface surface = s.lockSurface();
+ const byte *cursorData = (const byte *)surface.getBasePtr(0, 0);
+ CursorMan.pushCursor(cursorData, surface.w, surface.h, s._centroid.x, s._centroid.y, s._transColor);
+ s.unlockSurface();
+
+ if (delFlag)
+ DEALLOCATE(cursor);
+}
+
+void EventsClass::popCursor() {
+ CursorMan.popCursor();
+}
+
void EventsClass::setCursor(Graphics::Surface &cursor, int transColor, const Common::Point &hotspot, CursorType cursorId) {
const byte *cursorData = (const byte *)cursor.getBasePtr(0, 0);
CursorMan.replaceCursor(cursorData, cursor.w, cursor.h, hotspot.x, hotspot.y, transColor);
@@ -227,6 +284,10 @@ void EventsClass::hideCursor() {
CursorMan.showMouse(false);
}
+bool EventsClass::isCursorVisible() const {
+ return CursorMan.isVisible();
+}
+
/**
* Delays the game for the specified number of frames, if necessary, from the
* previous time the delay method was called
diff --git a/engines/tsage/events.h b/engines/tsage/events.h
index ef0256e81f..90516b2353 100644
--- a/engines/tsage/events.h
+++ b/engines/tsage/events.h
@@ -82,11 +82,14 @@ public:
CursorType _currentCursor;
void setCursor(CursorType cursorType);
+ void pushCursor(CursorType cursorType);
+ void popCursor();
void setCursor(Graphics::Surface &cursor, int transColor, const Common::Point &hotspot, CursorType cursorId);
void setCursorFromFlag();
CursorType getCursor() const { return _currentCursor; }
void showCursor();
void hideCursor();
+ bool isCursorVisible() const;
bool pollEvent();
void waitForPress(int eventMask = EVENT_BUTTON_DOWN | EVENT_KEYPRESS);
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index 00444f3672..3914d77185 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -43,6 +43,7 @@ static SavedObject *classFactoryProc(const Common::String &className) {
if (className == "ObjectMover2") return new ObjectMover2();
if (className == "ObjectMover3") return new ObjectMover3();
if (className == "PlayerMover") return new PlayerMover();
+ if (className == "SceneObjectWrapper") return new SceneObjectWrapper();
return NULL;
}
@@ -54,12 +55,21 @@ Globals::Globals() :
_gfxManagerInstance(_screenSurface) {
reset();
_stripNum = 0;
- _gfxFontNumber = (_vm->getFeatures() & GF_DEMO) ? 0 : 50;
- _gfxColors.background = 53;
- _gfxColors.foreground = 18;
- _fontColors.background = 51;
- _fontColors.foreground = 54;
+ if (_vm->getFeatures() & GF_DEMO) {
+ _gfxFontNumber = 0;
+ _gfxColors.background = 6;
+ _gfxColors.foreground = 0;
+ _fontColors.background = 0;
+ _fontColors.foreground = 0;
+ _dialogCenter.y = 80;
+ } else {
+ _gfxFontNumber = 50;
+ _gfxColors.background = 53;
+ _gfxColors.foreground = 18;
+ _fontColors.background = 51;
+ _fontColors.foreground = 54;
+ }
_screenSurface.setScreenSurface();
_gfxManagers.push_back(&_gfxManagerInstance);
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index f9f9e4b4ca..9d840bf00d 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -29,6 +29,7 @@
#include "tsage/tsage.h"
#include "tsage/core.h"
#include "common/algorithm.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
#include "tsage/globals.h"
@@ -257,7 +258,7 @@ void GfxSurface::create(int width, int height) {
assert((width >= 0) && (height >= 0));
_screenSurface = false;
_customSurface = new Graphics::Surface();
- _customSurface->create(width, height, 1);
+ _customSurface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
_bounds = Rect(0, 0, width, height);
}
@@ -282,7 +283,7 @@ Graphics::Surface GfxSurface::lockSurface() {
result.w = _bounds.width();
result.h = _bounds.height();
result.pitch = src->pitch;
- result.bytesPerPixel = src->bytesPerPixel;
+ result.format = src->format;
result.pixels = src->getBasePtr(_bounds.left, _bounds.top);
return result;
@@ -331,7 +332,7 @@ GfxSurface &GfxSurface::operator=(const GfxSurface &s) {
if (_customSurface) {
// Surface owns the internal data, so replicate it so new surface owns it's own
_customSurface = new Graphics::Surface();
- _customSurface->create(s._customSurface->w, s._customSurface->h, 1);
+ _customSurface->create(s._customSurface->w, s._customSurface->h, Graphics::PixelFormat::createFormatCLUT8());
const byte *srcP = (const byte *)s._customSurface->getBasePtr(0, 0);
byte *destP = (byte *)_customSurface->getBasePtr(0, 0);
diff --git a/engines/tsage/resources.cpp b/engines/tsage/resources.cpp
index 5320a573b2..a73c23ab7f 100644
--- a/engines/tsage/resources.cpp
+++ b/engines/tsage/resources.cpp
@@ -200,11 +200,11 @@ struct DecodeReference {
*/
byte *TLib::getResource(uint16 id, bool suppressErrors) {
// Scan for an entry for the given Id
- ResourceEntry *re= NULL;
- ResourceList::iterator i;
- for (i = _resources.begin(); i != _resources.end(); ++i) {
- if ((*i).id == id) {
- re = &(*i);
+ ResourceEntry *re = NULL;
+ ResourceList::iterator iter;
+ for (iter = _resources.begin(); iter != _resources.end(); ++iter) {
+ if ((*iter).id == id) {
+ re = &(*iter);
break;
}
}
@@ -239,6 +239,9 @@ byte *TLib::getResource(uint16 id, bool suppressErrors) {
uint16 word_48050 = 0, currentToken = 0, word_48054 =0;
byte byte_49068 = 0, byte_49069 = 0;
DecodeReference table[0x1000];
+ for (int i = 0; i < 0x1000; ++i) {
+ table[i].vByte = table[i].vWord = 0;
+ }
Common::Stack<uint16> tokenList;
for (;;) {
diff --git a/engines/tsage/resources.h b/engines/tsage/resources.h
index b33cc37266..4ae41f6557 100644
--- a/engines/tsage/resources.h
+++ b/engines/tsage/resources.h
@@ -32,6 +32,7 @@
#include "common/list.h"
#include "common/str.h"
#include "common/str-array.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "graphics/surface.h"
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index 0a2220c690..c0cfe3a938 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -344,7 +344,7 @@ void SpeakerGText::setText(const Common::String &msg) {
_sceneObject.postInit();
_sceneObject.setVisage(9405);
_sceneObject.setStrip2(3);
- _sceneObject.setPriority2(255);
+ _sceneObject.fixPriority(255);
_sceneObject.changeZoom(100);
_sceneObject._frame = 1;
_sceneObject.setPosition(Common::Point(183, 71));
@@ -405,7 +405,7 @@ void SpeakerPOR::setText(const Common::String &msg) {
_object3.setVisage(7223);
_object3.setStrip(3);
_object3.setPosition(Common::Point(119, 107), 0);
- _object3.setPriority2(199);
+ _object3.fixPriority(199);
_object3.setAction(&_action2);
Speaker::setText(msg);
@@ -425,7 +425,7 @@ void SpeakerOR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(9431);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(202, 147), 0);
@@ -434,7 +434,7 @@ void SpeakerOR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(9431);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.setZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(199, 85), 0);
@@ -605,7 +605,7 @@ void SpeakerSKL::setText(const Common::String &msg) {
_object1.setVisage(7013);
_object1.setStrip2(2);
_object1._frame = 1;
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1.setPosition(Common::Point(203, 120));
_object1.animate(ANIM_MODE_7, 0, NULL);
@@ -613,7 +613,7 @@ void SpeakerSKL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(7013);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(197, 80));
@@ -636,7 +636,7 @@ void SpeakerQL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2612);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(128, 146));
@@ -645,7 +645,7 @@ void SpeakerQL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2612);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(122, 84));
@@ -668,7 +668,7 @@ void SpeakerSR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2813);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(224, 198));
@@ -677,7 +677,7 @@ void SpeakerSR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2813);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(203, 96));
@@ -687,7 +687,7 @@ void SpeakerSR::setText(const Common::String &msg) {
_object3.setVisage(2813);
_object3.setStrip(3);
_object3.setPosition(Common::Point(204, 91));
- _object3.setPriority2(199);
+ _object3.fixPriority(199);
_object3._numFrames = 3;
_object3.animate(ANIM_MODE_7, 0, NULL);
@@ -709,7 +709,7 @@ void SpeakerSL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2812);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(95, 198));
@@ -718,7 +718,7 @@ void SpeakerSL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2812);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(116, 96));
@@ -741,7 +741,7 @@ void SpeakerQR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2613);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(191, 146));
@@ -750,7 +750,7 @@ void SpeakerQR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2613);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(197, 84));
@@ -773,7 +773,7 @@ void SpeakerQU::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(7021);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(116, 120), 0);
@@ -782,7 +782,7 @@ void SpeakerQU::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(7021);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(111, 84), 0);
@@ -804,14 +804,14 @@ void SpeakerCR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(9011);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.setPosition(Common::Point(219, 168));
_object1.animate(ANIM_MODE_7, 0, NULL);
_object2.postInit(&_objectList);
_object2.setVisage(9011);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.setPosition(Common::Point(232, 81));
_object2.setAction(&_speakerAction, NULL);
@@ -831,7 +831,7 @@ void SpeakerMR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2713);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(220, 143));
@@ -840,7 +840,7 @@ void SpeakerMR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2713);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2._frame = 1;
_object2.setPosition(Common::Point(215, 99));
_object2.setAction(&_speakerAction, NULL);
@@ -862,7 +862,7 @@ void SpeakerSAL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2853);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(185, 200));
@@ -871,7 +871,7 @@ void SpeakerSAL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2853);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2._frame = 1;
_object2.setPosition(Common::Point(170, 92));
_object2.setAction(&_speakerAction, NULL);
@@ -892,7 +892,7 @@ void SpeakerML::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2712);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(99, 143));
@@ -901,7 +901,7 @@ void SpeakerML::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2712);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2._frame = 1;
_object2.setPosition(Common::Point(105, 99));
_object2.setAction(&_speakerAction, NULL);
@@ -922,7 +922,7 @@ void SpeakerCHFL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(4113);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(205, 116));
@@ -931,7 +931,7 @@ void SpeakerCHFL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(4113);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2._frame = 1;
_object2.setPosition(Common::Point(202, 71));
_object2.setAction(&_speakerAction, NULL);
@@ -952,7 +952,7 @@ void SpeakerCHFR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(4112);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(103, 116));
@@ -961,7 +961,7 @@ void SpeakerCHFR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(4112);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2._frame = 1;
_object2.setPosition(Common::Point(106, 71));
_object2.setAction(&_speakerAction, NULL);
@@ -982,7 +982,7 @@ void SpeakerPL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(4062);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(107, 117));
@@ -991,7 +991,7 @@ void SpeakerPL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(4062);
_object2.setStrip2(1);
- _object2.setPriority2(200);
+ _object2.fixPriority(200);
_object2._frame = 1;
_object2.setPosition(Common::Point(105, 62));
_object2.setAction(&_speakerAction, NULL);
@@ -999,7 +999,7 @@ void SpeakerPL::setText(const Common::String &msg) {
_object3.postInit(&_objectList);
_object3.setVisage(4062);
_object3.setStrip2(3);
- _object3.setPriority2(255);
+ _object3.fixPriority(255);
_object3._frame = 1;
_object3.setPosition(Common::Point(105, 59));
_object3.setAction(&_speakerAction2, NULL);
@@ -1025,7 +1025,7 @@ void SpeakerPR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(4063);
_object1.setStrip2(1);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(212, 117));
@@ -1034,7 +1034,7 @@ void SpeakerPR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(4063);
_object2.setStrip2(2);
- _object2.setPriority2(200);
+ _object2.fixPriority(200);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(214, 62));
@@ -1043,7 +1043,7 @@ void SpeakerPR::setText(const Common::String &msg) {
_object3.postInit(&_objectList);
_object3.setVisage(4063);
_object3.setStrip2(3);
- _object3.setPriority2(255);
+ _object3.fixPriority(255);
_object3.changeZoom(100);
_object3._frame = 1;
_object3.setPosition(Common::Point(214, 59));
@@ -1070,7 +1070,7 @@ void SpeakerCDR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(4163);
_object1.setStrip2(1);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(208, 97));
@@ -1079,7 +1079,7 @@ void SpeakerCDR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(4163);
_object2.setStrip2(2);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(200, 57));
@@ -1101,7 +1101,7 @@ void SpeakerCDL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(4162);
_object1.setStrip2(1);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(112, 97));
@@ -1110,7 +1110,7 @@ void SpeakerCDL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(4162);
_object2.setStrip2(2);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(115, 57));
@@ -1132,7 +1132,7 @@ void SpeakerFLL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(5223);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(216, 129));
@@ -1141,7 +1141,7 @@ void SpeakerFLL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(5223);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(210, 67));
@@ -1163,7 +1163,7 @@ void SpeakerBatR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(5361);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(137, 122));
@@ -1172,7 +1172,7 @@ void SpeakerBatR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(5361);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(137, 104));
@@ -1319,6 +1319,8 @@ void RingworldGame::start() {
// Switch to the title screen
_globals->_sceneManager.setNewScene(1000);
+
+ _globals->_events.showCursor();
}
void RingworldGame::restart() {
@@ -1407,6 +1409,8 @@ void RingworldGame::endGame(int resNum, int lineNum) {
void RingworldDemoGame::start() {
// Start the demo's single scene
_globals->_sceneManager.changeScene(1);
+
+ _globals->_events.setCursor(CURSOR_NONE);
}
void RingworldDemoGame::restart() {
diff --git a/engines/tsage/ringworld_scenes1.cpp b/engines/tsage/ringworld_scenes1.cpp
index fd51670fb8..9811cd52d3 100644
--- a/engines/tsage/ringworld_scenes1.cpp
+++ b/engines/tsage/ringworld_scenes1.cpp
@@ -149,20 +149,20 @@ void Scene10::postInit(SceneObjectList *OwnerList) {
_object1.postInit();
_object1.setVisage(10);
_object1.setPosition(Common::Point(232, 90));
- _object1.setPriority2(1);
+ _object1.fixPriority(1);
_object2.postInit();
_object2.setVisage(10);
_object2.setStrip(4);
_object2.setFrame(1);
_object2.setPosition(Common::Point(204, 59));
- _object2.setPriority2(198);
+ _object2.fixPriority(198);
_object3.postInit();
_object3.setVisage(10);
_object3.setStrip2(5);
_object3.setPosition(Common::Point(180, 87));
- _object3.setPriority2(196);
+ _object3.fixPriority(196);
_object3.setAction(&_action2);
_object4.postInit();
@@ -565,7 +565,7 @@ void Scene20::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(20);
_globals->_player.setPosition(Common::Point(588, 79));
_globals->_player._moveDiff = Common::Point(5, 5);
- _globals->_player.setPriority2(50);
+ _globals->_player.fixPriority(50);
_globals->_player.animate(ANIM_MODE_1, NULL);
_SceneObjectExt.postInit();
@@ -599,7 +599,7 @@ void Scene20::postInit(SceneObjectList *OwnerList) {
_globals->_player.animate(ANIM_MODE_NONE, NULL);
_globals->_player.setStrip2(1);
_globals->_player.setFrame2(4);
- _globals->_player.setPriority2(200);
+ _globals->_player.fixPriority(200);
_globals->_player.setPosition(Common::Point(425, 233));
setAction(&_action1);
@@ -901,7 +901,7 @@ void Scene30::postInit(SceneObjectList *OwnerList) {
_beam.setVisage(31);
_beam.setStrip(2);
_beam.setPosition(Common::Point(124, 178));
- _beam.setPriority2(188);
+ _beam.fixPriority(188);
// Set up door object
_door.postInit();
@@ -927,7 +927,7 @@ void Scene30::signal() {
_beam.setVisage(31);
_beam.setStrip(2);
_beam.setPosition(Common::Point(124, 178));
- _beam.setPriority2(188);
+ _beam.fixPriority(188);
_globals->_sceneItems.push_front(&_beam);
_globals->_player.enableControl();
} else if (_sceneMode == 32) {
@@ -1090,7 +1090,7 @@ void Scene40::Action2::signal() {
scene->_doorway.postInit();
scene->_doorway.setVisage(16);
scene->_doorway.setStrip2(6);
- scene->_doorway.setPriority2(200);
+ scene->_doorway.fixPriority(200);
scene->_doorway.setPosition(Common::Point(159, 191));
scene->_doorway._moveDiff = Common::Point(40, 40);
scene->_doorway._moveRate = 60;
@@ -1300,11 +1300,11 @@ void Scene40::Action8::signal() {
scene->_doorway.postInit();
scene->_doorway.setVisage(16);
scene->_doorway.setStrip2(6);
- scene->_doorway.setPriority2(200);
+ scene->_doorway.fixPriority(200);
scene->_doorway._moveRate = 60;
if (_globals->_player._position.x >= 145) {
- scene->_doorway.setPriority2(-1);
+ scene->_doorway.fixPriority(-1);
scene->_doorway.setPosition(Common::Point(6, 157));
} else {
scene->_doorway.setPosition(Common::Point(313, 53));
@@ -1492,14 +1492,14 @@ void Scene40::postInit(SceneObjectList *OwnerList) {
_object2.postInit();
_object2.setVisage(41);
_object2.setStrip(6);
- _object2.setPriority2(200);
+ _object2.fixPriority(200);
_object2.setPosition(Common::Point(94, 189));
_object2.setAction(&_action5);
_object3.postInit();
_object3.setVisage(41);
_object3.setStrip(5);
- _object3.setPriority2(205);
+ _object3.fixPriority(205);
_object3.setPosition(Common::Point(110, 186));
_object3._numFrames = 2;
_object3.animate(ANIM_MODE_8, NULL, NULL);
@@ -1512,7 +1512,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) {
_dyingKzin.setVisage(40);
_dyingKzin.setStrip(6);
_dyingKzin.setPosition(Common::Point(-90, 65));
- _dyingKzin.setPriority2(170);
+ _dyingKzin.fixPriority(170);
setAction(&_action1);
} else {
@@ -1525,7 +1525,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) {
_dyingKzin.postInit();
_dyingKzin.setVisage(40);
_dyingKzin.setPosition(Common::Point(205, 183));
- _dyingKzin.setPriority2(170);
+ _dyingKzin.fixPriority(170);
_dyingKzin._frame = 9;
_dyingKzin.setAction(&_action7);
@@ -1792,19 +1792,19 @@ void Scene50::postInit(SceneObjectList *OwnerList) {
_object2.setVisage(2331);
_object2.setStrip(6);
_object2.setPosition(Common::Point(136, 192));
- _object2.setPriority2(200);
+ _object2.fixPriority(200);
_object3.postInit();
_object3.setVisage(2337);
_object3.setStrip(6);
_object3.setPosition(Common::Point(260, 180));
- _object3.setPriority2(200);
+ _object3.fixPriority(200);
_object4.postInit();
_object4.setVisage(2331);
_object4.setStrip(6);
_object4.setPosition(Common::Point(295, 144));
- _object4.setPriority2(178);
+ _object4.fixPriority(178);
_globals->_sceneItems.addItems(&_object2, &_object3, &_object4, NULL);
@@ -2649,7 +2649,7 @@ void Scene90::postInit(SceneObjectList *OwnerList) {
_object3.setVisage(90);
_object3.animate(ANIM_MODE_1, NULL);
_object3.setPosition(Common::Point(196, 181));
- _object3.setPriority2(175);
+ _object3.fixPriority(175);
_globals->_sceneItems.push_back(&_object3);
_globals->_player.disableControl();
@@ -2879,7 +2879,7 @@ void Scene6100::Action3::signal() {
break;
case 1:
_globals->_scenePalette.clearListeners();
- scene->_fadePercent = 0;
+ scene->_fadePercent = 100;
_globals->_scenePalette.refresh();
scene->loadScene(9997);
scene->_object1.hide();
@@ -2890,7 +2890,7 @@ void Scene6100::Action3::signal() {
scene->_sunflower3.hide();
scene->_rocks.hide();
scene->_sceneText.hide();
-
+
_globals->_events.setCursor(CURSOR_WALK);
scene->_stripManager.start(8120, this);
break;
@@ -2995,39 +2995,39 @@ void Scene6100::Action5::dispatch() {
}
scene->_objList[idx]->_flags |= OBJFLAG_PANES;
-/*
+
if ((idx != 3) && (scene->_fadePercent == 100) &&
- (tempSet.sqrt(floatSet) < 150.0)) {
+ (tempSet.sqrt(zeroSet) < 150.0)) {
switch (scene->_hitCount++) {
case 1:
scene->_soundHandler.startSound(233);
- scene->showMessage(0, NULL, 0);
+ scene->showMessage(NULL, 0, NULL);
if (!_globals->getFlag(76))
- scene->_object5.setAction(&scene->_action2);
+ scene->_probe.setAction(&scene->_action2);
+ break;
case 2:
scene->_soundHandler.startSound(234);
- scene->showMessage(0, NULL, 0);
+ scene->showMessage(NULL, 0, NULL);
if (!_globals->getFlag(76))
- scene->_object5.setAction(NULL);
+ scene->_probe.setAction(NULL);
scene->setAction(&scene->_action3);
break;
default:
scene->_soundHandler.startSound(233);
- scene->showMessage(0, NULL, 0);
+ scene->showMessage(NULL, 0, NULL);
if (!_globals->getFlag(76))
- scene->_object5.setAction(&scene->_action1);
+ scene->_probe.setAction(&scene->_action1);
break;
}
_globals->_scenePalette.clearListeners();
scene->_fadePercent = 0;
}
- */
}
}
@@ -3129,6 +3129,7 @@ void Scene6100::postInit(SceneObjectList *OwnerList) {
loadScene(6100);
Scene::postInit();
setZoomPercents(62, 2, 200, 425);
+ _globals->_sceneHandler._delayTicks = 8;
_globals->_player.disableControl();
_globals->_events.setCursor(CURSOR_WALK);
@@ -3140,28 +3141,28 @@ void Scene6100::postInit(SceneObjectList *OwnerList) {
_object1._frame = 1;
_object1._strip = 4;
_object1.setPosition(Common::Point(0, 60));
- _object1.setPriority2(1);
+ _object1.fixPriority(1);
_object2.postInit();
_object2.setVisage(6100);
_object2._frame = 1;
_object2._strip = 4;
_object2.setPosition(Common::Point(160, 60));
- _object2.setPriority2(1);
+ _object2.fixPriority(1);
_object3.postInit();
_object3.setVisage(6100);
_object3._frame = 1;
_object3._strip = 4;
_object3.setPosition(Common::Point(320, 60));
- _object3.setPriority2(1);
+ _object3.fixPriority(1);
_rocks.postInit();
_rocks.setVisage(6100);
_rocks._frame = 1;
_rocks._strip = 3;
_rocks.setPosition(Common::Point(320, 0));
- _rocks.setPriority2(2);
+ _rocks.fixPriority(2);
_rocks.changeZoom(-1);
_rocks._floats._float1 = 320.0;
_rocks._floats._float2 = 25000.0;
@@ -3173,7 +3174,7 @@ void Scene6100::postInit(SceneObjectList *OwnerList) {
_probe._frame = 1;
_probe._strip = 5;
_probe.setPosition(Common::Point(160, 260));
- _probe.setPriority2(3);
+ _probe.fixPriority(3);
_probe._floats._float1 = 320.0;
_probe._floats._float2 = 0.0;
_probe._floats._float3 = 0.0;
@@ -3198,7 +3199,7 @@ void Scene6100::postInit(SceneObjectList *OwnerList) {
_objList[idx]->setPosition(Common::Point(
_globals->_randomSource.getRandomNumber(319), 60));
- _objList[idx]->setPriority2(1);
+ _objList[idx]->fixPriority(1);
_objList[idx]->changeZoom(-1);
}
diff --git a/engines/tsage/ringworld_scenes10.cpp b/engines/tsage/ringworld_scenes10.cpp
index 045ea71586..d16c332a8c 100644
--- a/engines/tsage/ringworld_scenes10.cpp
+++ b/engines/tsage/ringworld_scenes10.cpp
@@ -38,7 +38,8 @@ Scene2::Scene2() : Scene() {
/*--------------------------------------------------------------------------*/
void Object9350::postInit(SceneObjectList *OwnerList) {
- _globals->_sceneManager.postInit(&_globals->_sceneManager._altSceneObjects);
+ //SceneObject::postInit(&_globals->_sceneManager._altSceneObjects);
+ SceneObject::postInit(OwnerList);
}
void Object9350::draw() {
@@ -66,7 +67,7 @@ void Scene9100::SceneHotspot1::doAction(int action) {
_globals->_player.disableControl();
scene->_sceneMode = 9105;
}
- scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &_globals->_player, &scene->_object5, &scene->_object6, 0);
+ scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &_globals->_player, &scene->_object5, &scene->_object6, NULL);
} else {
NamedHotspot::doAction(action);
}
@@ -77,16 +78,16 @@ void Scene9100::dispatch() {
if (!_action) {
if (_globals->_player._position.x < 25) {
- if (!_globals->getFlag(11)) {
- scene->_sceneMode = 9106;
- } else {
- scene->_sceneMode = 9108;
+ _globals->_player.disableControl();
+ if (!_globals->getFlag(23) || _globals->getFlag(11))
+ _sceneMode = 9106;
+ else {
+ _sceneMode = 9108;
_globals->setFlag(11);
}
- } else {
- scene->_sceneMode = 9106;
+
+ scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &_globals->_player, NULL);
}
- scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &_globals->_player, 0);
} else {
Scene::dispatch();
}
@@ -102,7 +103,7 @@ void Scene9100::signal() {
_globals->_sceneManager.changeScene(9150);
break;
case 9105:
- _sceneHotspot1.remove();
+ _sceneHotspot3.remove();
// No break on purpose
case 9103:
case 9104:
@@ -115,17 +116,15 @@ void Scene9100::signal() {
}
void Scene9100::postInit(SceneObjectList *OwnerList) {
- Scene9100 *scene = (Scene9100 *)_globals->_sceneManager._scene;
-
Scene::postInit();
setZoomPercents(0, 100, 200, 100);
_object1.postInit();
_object1.setVisage(9100);
_object1._strip = 1;
_object1._numFrames = 6;
- _object1.setPosition(Common::Point(297, 132), 0);
+ _object1.setPosition(Common::Point(279, 132), 0);
_object1.animate(ANIM_MODE_2, 0);
- _object1.setPriority2(10);
+ _object1.fixPriority(10);
_globals->_player.postInit();
@@ -146,7 +145,7 @@ void Scene9100::postInit(SceneObjectList *OwnerList) {
_object6.setVisage(9111);
_object6.setStrip(6);
_object6.setFrame(1);
- _object6.setPosition(Common::Point(138, 166), 0);
+ _object6.setPosition(Common::Point(138, 166));
_sceneHotspot3.setup(145, 125, 166, 156, 9100, 40, 43);
}
_sceneHotspot1.setup(140, 176, 185, 215, 9100, 36, 37);
@@ -163,17 +162,17 @@ void Scene9100::postInit(SceneObjectList *OwnerList) {
_sceneMode = 9107;
else
_sceneMode = 9109;
- setAction(&scene->_sequenceManager, scene, _sceneMode, &_globals->_player, &_object5, 0);
+ setAction(&_sequenceManager, this, _sceneMode, &_globals->_player, &_object5, NULL);
} else {
_sceneMode = 9103;
_globals->_player.disableControl();
- setAction(&scene->_sequenceManager, scene, _sceneMode, &_globals->_player, &_object2, &_object3, &_object4, &_object5, 0);
+ setAction(&_sequenceManager, this, _sceneMode, &_globals->_player, &_object2, &_object3, &_object4, &_object5, NULL);
_globals->setFlag(20);
}
} else {
_sceneMode = 9102;
_globals->_player.disableControl();
- setAction(&scene->_sequenceManager, scene, _sceneMode, &_globals->_player, &_object2, &_object3, &_object4, &_object5, 0);
+ setAction(&_sequenceManager, this, _sceneMode, &_globals->_player, &_object2, &_object3, &_object4, &_object5, NULL);
}
}
@@ -224,7 +223,7 @@ void Scene9150::dispatch() {
if ((_sceneState != 0) && (_sceneBounds.left == 0)) {
_object3._timer = 0;
_sceneState = 0;
- _sceneHotspot3.setAction(&_sequenceManager2, 0, 9154, &_object3, 0);
+ _object3.setAction(&_sequenceManager2, NULL, 9154, &_object3, NULL);
_sceneHotspot10.remove();
}
@@ -308,16 +307,16 @@ void Scene9200::SceneHotspot1::doAction(int action) {
_globals->_player.disableControl();
if (_globals->getFlag(93)) {
scene->_sceneState = 9214;
- setAction(&scene->_sequenceManager, scene, 9214, &_globals->_player, &scene->_object2, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9214, &_globals->_player, &scene->_object2, 0);
} else {
_globals->setFlag(93);
scene->_sceneState = 9213;
- setAction(&scene->_sequenceManager, scene, 9213, &_globals->_player, &scene->_object2, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9213, &_globals->_player, &scene->_object2, 0);
}
} else if (action <= 100) {
_globals->_player.disableControl();
scene->_sceneState = 9214;
- setAction(&scene->_sequenceManager, scene, 9214, &_globals->_player, &scene->_object2, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9214, &_globals->_player, &scene->_object2, 0);
} else {
NamedHotspot::doAction(action);
}
@@ -405,7 +404,7 @@ void Scene9200::postInit(SceneObjectList *OwnerList) {
_object1._strip = 3;
_object1.animate(ANIM_MODE_2, 0);
_object1.setPosition(Common::Point(132, 114), 0);
- _object1.setPriority2(140);
+ _object1.fixPriority(140);
_soundHandler.startSound(297);
_stripManager.addSpeaker(&_speakerQText);
_stripManager.addSpeaker(&_speakerGR);
@@ -589,7 +588,7 @@ void Scene9350::postInit(SceneObjectList *OwnerList) {
setZoomPercents(95, 80, 200, 100);
_globals->_player.postInit();
- _object1.setup(9350, 1, 3, 139, 97, 0);
+ _object1.setup(9351, 1, 3, 139, 97, 0);
_sceneHotspot1.setup(42, 0, 97, 60, 9350, 0, -1);
_sceneHotspot2.setup(37, 205, 82, 256, 9350, 0, -1);
_sceneHotspot3.setup(29, 93, 92, 174, 9350, 1, -1);
@@ -602,22 +601,22 @@ void Scene9350::postInit(SceneObjectList *OwnerList) {
if (_globals->_sceneManager._previousScene == 9360) {
_globals->_player.disableControl();
_sceneState = 9352;
- setAction(&_sequenceManager, this, 9352, &_globals->_player, &_object2, 0);
+ setAction(&_sequenceManager, this, 9352, &_globals->_player, &_object2, NULL);
} else if (_globals->_sceneManager._previousScene == 9400) {
_globals->_player.disableControl();
_sceneState = 9353;
- setAction(&_sequenceManager, this, 9353, &_globals->_player, &_object2, 0);
+ setAction(&_sequenceManager, this, 9353, &_globals->_player, &_object2, NULL);
} else {
- if (!_globals->getFlag(84)) {
+ if (_globals->getFlag(84)) {
_globals->clearFlag(84);
_object2.postInit();
_globals->_player.disableControl();
_sceneState = 9359;
- setAction(&_sequenceManager, this, 9359, &_globals->_player, &_object2, 0);
+ setAction(&_sequenceManager, this, 9359, &_globals->_player, &_object2, NULL);
} else {
_globals->_player.disableControl();
_sceneState = 9354;
- setAction(&_sequenceManager, this, 9354, &_globals->_player, &_object2, 0);
+ setAction(&_sequenceManager, this, 9354, &_globals->_player, &_object2, NULL);
}
}
}
@@ -713,6 +712,7 @@ void Scene9400::SceneHotspot7::doAction(int action) {
if ((action == CURSOR_USE) && (RING_INVENTORY._straw._sceneNumber != 1)) {
scene->_sceneState = 1;
+ RING_INVENTORY._straw._sceneNumber = 1;
scene->setAction(&scene->_sequenceManager, scene, 9408, &_globals->_player, 0);
} else {
NamedHotspot::doAction(action);
@@ -825,7 +825,7 @@ void Scene9400::postInit(SceneObjectList *OwnerList) {
void Scene9450::Object2::signal() {
Scene9450 *scene = (Scene9450 *)_globals->_sceneManager._scene;
- this->setAction(&scene->_sequenceManager3, this, 9458, &scene->_object1, 0);
+ this->setAction(&scene->_sequenceManager3, this, 9458, this, &scene->_object1, 0);
}
void Scene9450::Object3::dispatch() {
@@ -841,7 +841,7 @@ void Scene9450::Hotspot1::doAction(int action) {
scene->_object2._action->remove();
scene->_sceneMode = 9459;
_globals->_player.disableControl();
- setAction(&scene->_sequenceManager1, scene, 9459, &scene->_object2, &scene->_object1, &scene->_object3, &_globals->_player, 0);
+ scene->setAction(&scene->_sequenceManager1, scene, 9459, &scene->_object2, &scene->_object1, &scene->_object3, &_globals->_player, 0);
} else {
NamedHotspot::doAction(action);
}
@@ -918,7 +918,9 @@ void Scene9450::signal() {
_globals->_sceneManager.changeScene(9360);
break;
case 9459:
+ RING_INVENTORY._tunic._sceneNumber = 1;
_object2.signal();
+ _globals->_player.enableControl();
_globals->_events.setCursor(CURSOR_WALK);
_hotspot1.remove();
break;
@@ -967,7 +969,7 @@ void Scene9450::postInit(SceneObjectList *OwnerList) {
} else {
_object2.setPosition(Common::Point(184, 144), 0);
_object2.setVisage(9451);
- _object2.setPriority2(250);
+ _object2.fixPriority(250);
_object2._strip = 5;
_object2._frame = 10;
}
@@ -1079,6 +1081,7 @@ void Scene9500::signal() {
break;
case 9505:
_candle.setStrip(2);
+ RING_INVENTORY._candle._sceneNumber = 1;
_globals->_player.enableControl();
break;
case 9506:
@@ -1086,6 +1089,7 @@ void Scene9500::signal() {
_globals->_player.enableControl();
break;
case 9511:
+ RING_INVENTORY._helmet._sceneNumber = 1;
_globals->_player.enableControl();
if (!_globals->getFlag(51)) {
_globals->setFlag(51);
@@ -1140,7 +1144,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) {
_object3.postInit(0);
_object3.hide();
- _object3.setPriority2(150);
+ _object3.fixPriority(150);
_object3.setPosition(Common::Point(166, 133));
if (RING_INVENTORY._straw._sceneNumber == 9500) {
_object3.show();
@@ -1164,7 +1168,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) {
_object2.setStrip(1);
_object2.setFrame(_object2.getFrameCount());
_object2.setPosition(Common::Point(303, 130));
- _object2.setPriority2(132);
+ _object2.fixPriority(132);
if (RING_INVENTORY._helmet._sceneNumber == 1) {
_hotspot2.setup(87, 294, 104, 314, 9400, 17, -1);
} else {
@@ -1243,7 +1247,7 @@ void Scene9700::signal() {
}
void Scene9700::process(Event &event) {
- if ((event.eventType == EVENT_BUTTON_DOWN) && (event.kbd.keycode == 0)) {
+ if ((event.eventType == EVENT_BUTTON_DOWN) && !_action) {
if (_gfxButton1.process(event)) {
_globals->_sceneManager.changeScene(9200);
} else if (_globals->_events._currentCursor == OBJECT_SCANNER) {
@@ -1545,7 +1549,7 @@ void Scene9850::postInit(SceneObjectList *OwnerList) {
_objDoor.setStrip(1);
_objDoor.setFrame(1);
_objDoor.setPosition(Common::Point(28, 118), 0);
- _objDoor.setPriority2(90);
+ _objDoor.fixPriority(90);
_objLever.postInit();
_objLever.setVisage(9850);
@@ -1557,7 +1561,7 @@ void Scene9850::postInit(SceneObjectList *OwnerList) {
_objCloak.setVisage(9850);
_objCloak.setStrip(5);
_objCloak.setFrame(1);
- _objCloak.setPriority2(90);
+ _objCloak.fixPriority(90);
_objCloak.setPosition(Common::Point(157, 81), 0);
if (RING_INVENTORY._cloak._sceneNumber != 9850)
_objCloak.hide();
@@ -1566,7 +1570,7 @@ void Scene9850::postInit(SceneObjectList *OwnerList) {
_objJacket.setVisage(9850);
_objJacket.setStrip(5);
_objJacket.setFrame(2);
- _objJacket.setPriority2(90);
+ _objJacket.fixPriority(90);
_objJacket.setPosition(Common::Point(201, 84));
if (RING_INVENTORY._jacket._sceneNumber != 9850)
_objJacket.hide();
@@ -1575,7 +1579,7 @@ void Scene9850::postInit(SceneObjectList *OwnerList) {
_objTunic2.setVisage(9850);
_objTunic2.setStrip(5);
_objTunic2.setFrame(3);
- _objTunic2.setPriority2(90);
+ _objTunic2.fixPriority(90);
_objTunic2.setPosition(Common::Point(295, 90));
if (RING_INVENTORY._tunic2._sceneNumber != 9850)
_objTunic2.hide();
@@ -1586,7 +1590,7 @@ void Scene9850::postInit(SceneObjectList *OwnerList) {
_objScimitar.setStrip(2);
_objScimitar.setFrame(1);
_objScimitar.setPosition(Common::Point(55, 83), 0);
- _objScimitar.setPriority2(80);
+ _objScimitar.fixPriority(80);
_objScimitar.hide();
}
@@ -1596,7 +1600,7 @@ void Scene9850::postInit(SceneObjectList *OwnerList) {
_objSword.setStrip(3);
_objSword.setFrame(1);
_objSword.setPosition(Common::Point(56, 101), 0);
- _objSword.setPriority2(80);
+ _objSword.fixPriority(80);
_objSword.hide();
}
@@ -1708,7 +1712,7 @@ void Scene9900::strAction2::signal() {
_txtArray1[_txtArray1Index].setup(msg);
_txtArray1[_txtArray1Index]._moveRate = 20;
_txtArray1[_txtArray1Index]._moveDiff.y = 2;
- _txtArray1[_txtArray1Index].setPriority2(255);
+ _txtArray1[_txtArray1Index].fixPriority(255);
int frameWidth = _txtArray1[_txtArray1Index].getFrame().getBounds().width();
int frameHeight = _txtArray1[_txtArray1Index].getFrame().getBounds().height();
_txtArray1[_txtArray1Index].setPosition(Common::Point((320 - frameWidth) / 2, 200));
@@ -1725,7 +1729,7 @@ void Scene9900::strAction2::signal() {
_txtArray2[_txtArray1Index].setup(msg);
_txtArray2[_txtArray1Index]._moveRate = 20;
_txtArray2[_txtArray1Index]._moveDiff.y = 2;
- _txtArray2[_txtArray1Index].setPriority2(255);
+ _txtArray2[_txtArray1Index].fixPriority(255);
frameWidth = _txtArray2[_txtArray1Index].getFrame().getBounds().width();
_txtArray2[_txtArray1Index].setPosition(Common::Point((320 - frameWidth) / 2, 200 + frameHeight));
} else {
@@ -1834,7 +1838,7 @@ void Scene9900::signal() {
_object8.setVisage(2002);
_object8.setStrip(1);
_object8.setFrame(1);
- _object8.setPriority2(200);
+ _object8.fixPriority(200);
_object8.setPosition(Common::Point(64, 199));
_globals->_player.disableControl();
_sceneMode = 9908;
@@ -2021,7 +2025,7 @@ void Scene9999::postInit(SceneObjectList *OwnerList) {
_globals->_player.postInit();
_globals->_player.setVisage(1303);
_globals->_player.setStrip2(1);
- _globals->_player.setPriority2(250);
+ _globals->_player.fixPriority(250);
_globals->_player.animate(ANIM_MODE_2, 0);
_globals->_player.setPosition(Common::Point(194, 98), 0);
_globals->_player._numFrames = 20;
@@ -2030,13 +2034,13 @@ void Scene9999::postInit(SceneObjectList *OwnerList) {
_object2.postInit();
_object2.setVisage(1303);
_object2.setStrip2(2);
- _object2.setPriority2(2);
+ _object2.fixPriority(2);
_object2.setPosition(Common::Point(164, 149), 0);
_object3.postInit();
_object3.setVisage(1303);
_object3.setStrip2(2);
- _object3.setPriority2(2);
+ _object3.fixPriority(2);
_object3.setFrame(2);
_object3.setPosition(Common::Point(292, 149), 0);
_object3.setAction(&_action3);
diff --git a/engines/tsage/ringworld_scenes2.cpp b/engines/tsage/ringworld_scenes2.cpp
index 3e3686e2d5..6a8db81adf 100644
--- a/engines/tsage/ringworld_scenes2.cpp
+++ b/engines/tsage/ringworld_scenes2.cpp
@@ -23,6 +23,7 @@
*
*/
+#include "common/config-manager.h"
#include "tsage/ringworld_scenes2.h"
#include "tsage/scenes.h"
#include "tsage/tsage.h"
@@ -112,20 +113,22 @@ void Scene1000::Action3::signal() {
setDelay(240);
break;
case 5: {
- // WORKAROUND: At this point, the original used the presence of a file called 'Intro.txt'
- // to determine whether the introduction has been played the first time the game was started.
- // In ScummVM, we don't like creating any files that aren't explicitly savegames, so the
- // game startup will always show the Start Play / Introduction buttons, even when the game
- // is played for the first time
-
- // Prompt user for whether to start play or watch introduction
- _globals->_player.enableControl();
-
- if (MessageDialog::show2(WATCH_INTRO_MSG, START_PLAY_BTN_STRING, INTRODUCTION_BTN_STRING) == 0) {
- _actionIndex = 20;
- _globals->_soundHandler.proc1(this);
- } else {
+ const char *SEEN_INTRO = "seen_intro";
+ if (!ConfMan.hasKey(SEEN_INTRO) || !ConfMan.getBool(SEEN_INTRO)) {
+ // First time being played, so show the introduction
+ ConfMan.setBool(SEEN_INTRO, true);
+ ConfMan.flushToDisk();
setDelay(1);
+ } else {
+ // Prompt user for whether to start play or watch introduction
+ _globals->_player.enableControl();
+
+ if (MessageDialog::show2(WATCH_INTRO_MSG, START_PLAY_BTN_STRING, INTRODUCTION_BTN_STRING) == 0) {
+ _actionIndex = 20;
+ _globals->_soundHandler.proc1(this);
+ } else {
+ setDelay(1);
+ }
}
_globals->_player.disableControl();
@@ -434,7 +437,7 @@ void Scene1001::Action1::signal() {
scene->_object6.setStrip2(6);
scene->_object6.setFrame2(2);
scene->_object6._moveDiff = Common::Point(20, 20);
- scene->_object6.setPriority2(20);
+ scene->_object6.fixPriority(20);
scene->_object6.setPosition(Common::Point(scene->_object2._position.x - 6, scene->_object2._position.y + 7));
scene->_object6.animate(ANIM_MODE_5, NULL);
@@ -453,7 +456,7 @@ void Scene1001::Action1::signal() {
scene->_object7.setFrame2(1);
scene->_object7._moveDiff = Common::Point(20, 20);
scene->_object7.setPosition(Common::Point(scene->_object3._position.x - 28, scene->_object3._position.y - 11));
- scene->_object7.setPriority2(200);
+ scene->_object7.fixPriority(200);
scene->_object7.animate(ANIM_MODE_5, NULL);
Common::Point pt(scene->_object7._position.x - 70, scene->_object7._position.y - 70);
@@ -468,7 +471,7 @@ void Scene1001::Action1::signal() {
scene->_object5.setVisage(16);
scene->_object5.setPosition(Common::Point(306, 93));
scene->_object5._strip = 3;
- scene->_object5.setPriority2(200);
+ scene->_object5.fixPriority(200);
scene->_object5.animate(ANIM_MODE_2, NULL);
setDelay(30);
break;
@@ -633,7 +636,7 @@ void Scene1250::postInit(SceneObjectList *OwnerList) {
_object2.setVisage(1250);
_object2.setPosition(Common::Point(126, 69));
_object2.setStrip2(2);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2._frame = 1;
_object2.setAction(&_action2);
@@ -766,7 +769,7 @@ void Scene1400::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(1401);
_globals->_player.animate(ANIM_MODE_2, 0);
_globals->_player.setStrip2(4);
- _globals->_player.setPriority2(4);
+ _globals->_player.fixPriority(4);
_globals->_player.disableControl();
_globals->_player._moveDiff = Common::Point(4, 2);
@@ -869,7 +872,7 @@ void Scene1500::Action2::signal() {
case 1: {
scene->_object2.postInit();
scene->_object2.setVisage(1502);
- scene->_object2.setPriority2(255);
+ scene->_object2.fixPriority(255);
scene->_object2.changeZoom(5);
scene->_object2._frame = 1;
scene->_object2._moveDiff = Common::Point(1, 1);
diff --git a/engines/tsage/ringworld_scenes3.cpp b/engines/tsage/ringworld_scenes3.cpp
index 4ed2d98662..13dfc1a40b 100644
--- a/engines/tsage/ringworld_scenes3.cpp
+++ b/engines/tsage/ringworld_scenes3.cpp
@@ -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:
@@ -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;
@@ -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;
@@ -1822,7 +1835,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_soundHandler.proc5(true);
if (RING_INVENTORY._stasisBox2._sceneNumber == 1) {
- _globals->_player.setPriority2(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();
@@ -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;
@@ -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,19 +2943,19 @@ 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;
@@ -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);
@@ -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);
@@ -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);
@@ -3939,7 +3952,7 @@ 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);
RING_INVENTORY._medkit._sceneNumber = 2280;
_globals->_sceneItems.push_front(&scene->_hotspot17);
@@ -3952,7 +3965,7 @@ 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);
RING_INVENTORY._scanner._sceneNumber = 2280;
_globals->_sceneItems.push_front(&scene->_hotspot18);
@@ -4221,14 +4234,14 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
_hotspot16.postInit();
_hotspot16.setVisage(2281);
_hotspot16.setPosition(Common::Point(208, 90));
- _hotspot16.setPriority2(80);
+ _hotspot16.fixPriority(80);
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);
}
@@ -4239,7 +4252,7 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
_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();
}
}
@@ -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;
@@ -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;
@@ -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);
@@ -4882,14 +4895,14 @@ void Scene2310::signal() {
_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 = _resourceManager->getMessage(2300, 23);
_sceneText.setup(msg);
- _sceneText.setPriority2(255);
+ _sceneText.fixPriority(255);
_sceneText.setPosition(Common::Point(30, 170));
_globals->_sceneObjects->draw();
@@ -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:
- _globals->_player.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:
@@ -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);
@@ -5689,7 +5698,7 @@ void Scene2320::Hotspot14::doAction(int action) {
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();
@@ -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);
@@ -5793,7 +5802,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot8.setStrip(5);
_hotspot8.setFrame(8);
_hotspot8.setPosition(Common::Point(541, 103));
- _hotspot8.setPriority2(201);
+ _hotspot8.fixPriority(201);
_globals->_sceneItems.push_back(&_hotspot8);
}
@@ -5825,7 +5834,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_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();
@@ -5860,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;
@@ -5886,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);
@@ -5912,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));
@@ -5920,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();
@@ -5937,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);
@@ -5946,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);
diff --git a/engines/tsage/ringworld_scenes5.cpp b/engines/tsage/ringworld_scenes5.cpp
index 910a35e492..73d2df5989 100644
--- a/engines/tsage/ringworld_scenes5.cpp
+++ b/engines/tsage/ringworld_scenes5.cpp
@@ -315,7 +315,7 @@ void Scene4000::Action7::signal() {
_globals->_player.setVisage(4008);
_globals->_player.setStrip(4);
_globals->_player.setFrame(1);
- _globals->_player.setPriority2(16);
+ _globals->_player.fixPriority(16);
_globals->_player.setPosition(Common::Point(260, 55));
_globals->_player.animate(ANIM_MODE_5, this);
break;
@@ -700,7 +700,6 @@ void Scene4000::Hotspot::doAction(int action) {
if (_globals->_sceneObjects->contains(&scene->_hotspot8)) {
scene->_hotspot8.setAction(NULL);
-// ADD_MOVER_NULL(scene->_hotspot8, 118, 145);
Common::Point pt(118, 145);
NpcMover *mover = new NpcMover();
scene->_hotspot18.addMover(mover, &pt, NULL);
@@ -824,7 +823,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_smoke1.postInit();
_smoke1.setVisage(4000);
- _smoke1.setPriority2(1);
+ _smoke1.fixPriority(1);
_smoke1.setFrame(2);
_smoke1.setPosition(Common::Point(242, 59));
_smoke1.animate(ANIM_MODE_2, NULL);
@@ -832,7 +831,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_smoke2.postInit();
_smoke2.setVisage(4000);
_smoke2.setStrip(2);
- _smoke2.setPriority2(1);
+ _smoke2.fixPriority(1);
_smoke2.setFrame(2);
_smoke2.setPosition(Common::Point(299, 59));
_smoke2.animate(ANIM_MODE_2, NULL);
@@ -852,7 +851,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_theTech.setVisage(4000);
_theTech.setStrip(3);
_theTech.setFrame(3);
- _theTech.setPriority2(200);
+ _theTech.fixPriority(200);
_theTech.setPosition(Common::Point(281, 176));
if (_globals->getFlag(34)) {
@@ -862,7 +861,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_forceField.setVisage(4000);
_forceField.setStrip(4);
_forceField.setPosition(Common::Point(312, 174));
- _forceField.setPriority2(200);
+ _forceField.fixPriority(200);
_forceField.animate(ANIM_MODE_8, 0, NULL);
_globals->_sceneItems.push_back(&_forceField);
@@ -1036,7 +1035,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(4008);
_globals->_player.setStrip(4);
_globals->_player.setFrame(_globals->_player.getFrameCount());
- _globals->_player.setPriority2(16);
+ _globals->_player.fixPriority(16);
_globals->_player.setPosition(Common::Point(260, 55));
_sceneMode = 4007;
@@ -1096,7 +1095,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_forceField.setVisage(4000);
_forceField.setStrip(4);
_forceField.setPosition(Common::Point(312, 174));
- _forceField.setPriority2(200);
+ _forceField.fixPriority(200);
_forceField.animate(ANIM_MODE_8, 0, NULL);
} else {
if (!_globals->getFlag(37)) {
@@ -1127,7 +1126,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_rope.postInit();
_rope.setVisage(4000);
_rope.setStrip(7);
- _rope.setPriority2(1);
+ _rope.fixPriority(1);
_rope.setPosition(Common::Point(268, 44));
}
@@ -1195,19 +1194,19 @@ void Scene4000::dispatch() {
Scene::dispatch();
if ((_globals->_player.getRegionIndex() == 10) || (_globals->_player.getRegionIndex() == 6))
- _globals->_player.setPriority2(200);
+ _globals->_player.fixPriority(200);
if (_globals->_player.getRegionIndex() == 11)
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
if (_globals->_player.getRegionIndex() == 5)
- _globals->_player.setPriority2(94);
+ _globals->_player.fixPriority(94);
if (_globals->_sceneObjects->contains(&_hotspot5)) {
if ((_hotspot5.getRegionIndex() == 10) || (_hotspot5.getRegionIndex() == 6))
- _hotspot5.setPriority2(200);
+ _hotspot5.fixPriority(200);
if (_hotspot5.getRegionIndex() == 11)
- _hotspot5.setPriority2(-1);
+ _hotspot5.fixPriority(-1);
if (_hotspot5.getRegionIndex() == 5)
- _hotspot5.setPriority2(94);
+ _hotspot5.fixPriority(94);
}
if (_globals->_sceneObjects->contains(&_miranda)) {
@@ -1218,11 +1217,11 @@ void Scene4000::dispatch() {
}
if ((_miranda.getRegionIndex() == 10) || (_miranda.getRegionIndex() == 6))
- _miranda.setPriority2(200);
+ _miranda.fixPriority(200);
if (_miranda.getRegionIndex() == 11)
- _miranda.setPriority2(-1);
+ _miranda.fixPriority(-1);
if (_miranda.getRegionIndex() == 5)
- _miranda.setPriority2(94);
+ _miranda.fixPriority(94);
}
if (!_action) {
@@ -1531,6 +1530,7 @@ void Scene4025::postInit(SceneObjectList *OwnerList) {
_peg5.setFrame(5);
_peg5.hide();
+ // Hole N-W
_hole1.postInit();
_hole1.setVisage(4025);
_hole1.setStrip(1);
@@ -1540,6 +1540,7 @@ void Scene4025::postInit(SceneObjectList *OwnerList) {
_hole1._newPosition = Common::Point(123, 44);
_hole1._armStrip = 8;
+ // Hole N-E
_hole2.postInit();
_hole2.setVisage(4025);
_hole2.setStrip(1);
@@ -1549,6 +1550,7 @@ void Scene4025::postInit(SceneObjectList *OwnerList) {
_hole2._newPosition = Common::Point(166, 44);
_hole2._armStrip = 7;
+ // Hole Center
_hole3.postInit();
_hole3.setVisage(4025);
_hole3.setStrip(1);
@@ -1558,15 +1560,17 @@ void Scene4025::postInit(SceneObjectList *OwnerList) {
_hole3._newPosition = Common::Point(145, 60);
_hole3._armStrip = 6;
+ // Hole S-W
_hole4.postInit();
_hole4.setVisage(4025);
_hole4.setStrip(1);
- _hole4.setFrame2(6);
+ _hole4.setFrame2(9);
_hole4.setPosition(Common::Point(123, 87));
_hole4._pegPtr = NULL;
_hole4._newPosition = Common::Point(123, 80);
_hole4._armStrip = 5;
+ // Hole S-E
_hole5.postInit();
_hole5.setVisage(4025);
_hole5.setStrip(1);
@@ -1576,11 +1580,11 @@ void Scene4025::postInit(SceneObjectList *OwnerList) {
_hole5._newPosition = Common::Point(166, 80);
_hole5._armStrip = 4;
- _hole1.setPriority2(1);
- _hole2.setPriority2(1);
- _hole3.setPriority2(1);
- _hole4.setPriority2(1);
- _hole5.setPriority2(1);
+ _hole1.fixPriority(1);
+ _hole2.fixPriority(1);
+ _hole3.fixPriority(1);
+ _hole4.fixPriority(1);
+ _hole5.fixPriority(1);
_armHotspot.postInit();
_armHotspot.setVisage(4025);
@@ -1855,7 +1859,7 @@ void Scene4045::postInit(SceneObjectList *OwnerList) {
_flame.setVisage(4045);
_flame.setPosition(Common::Point(47, 111));
_flame.animate(ANIM_MODE_2, NULL);
- _flame.setPriority2(156);
+ _flame.fixPriority(156);
_globals->_sceneItems.push_back(&_flame);
_globals->_player.postInit();
@@ -1870,7 +1874,7 @@ void Scene4045::postInit(SceneObjectList *OwnerList) {
_olloFace.postInit();
_olloFace.setVisage(4051);
_olloFace.setStrip(4);
- _olloFace.setPriority2(152);
+ _olloFace.fixPriority(152);
if(_globals->_sceneManager._previousScene == 4050) {
_globals->_soundHandler.startSound(155);
@@ -1930,7 +1934,7 @@ void Scene4045::postInit(SceneObjectList *OwnerList) {
_hotspot4.postInit();
_hotspot4.setVisage(4051);
_hotspot4.setStrip(2);
- _hotspot4.setPriority2(152);
+ _hotspot4.fixPriority(152);
_hotspot4.setPosition(Common::Point(202, 80));
_olloFace.setPosition(Common::Point(192, 77));
@@ -2003,6 +2007,7 @@ void Scene4045::dispatch() {
*--------------------------------------------------------------------------*/
void Scene4050::Action1::signal() {
+ // "Map" on the wall
Scene4050 *scene = (Scene4050 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -2010,9 +2015,12 @@ void Scene4050::Action1::signal() {
_globals->_player.disableControl();
setDelay(3);
break;
- case 1:
- ADD_PLAYER_MOVER(204, 152);
+ case 1: {
+ Common::Point pt(204, 152);
+ PlayerMover *mover = new PlayerMover();
+ _globals->_player.addMover(mover, &pt, this);
break;
+ }
case 2:
_globals->_player.checkAngle(&scene->_hotspot17);
@@ -2020,7 +2028,8 @@ void Scene4050::Action1::signal() {
scene->_hotspot14.setVisage(4050);
scene->_hotspot14.setStrip(2);
scene->_hotspot14.setPosition(Common::Point(91, 154));
- scene->_hotspot14.setPriority2(200);
+ scene->_hotspot14.fixPriority(200);
+ setDelay(10);
break;
case 3:
_globals->_events.waitForPress();
@@ -2034,6 +2043,7 @@ void Scene4050::Action1::signal() {
}
void Scene4050::Action2::signal() {
+ // Climb down the rope
switch (_actionIndex++) {
case 0:
_globals->_player.disableControl();
@@ -2062,7 +2072,7 @@ void Scene4050::Action2::signal() {
_globals->_player.setVisage(4202);
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setPosition(Common::Point(210, 185));
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.enableControl();
remove();
break;
@@ -2070,12 +2080,13 @@ void Scene4050::Action2::signal() {
}
void Scene4050::Action3::signal() {
+ // Climb up the rope
switch (_actionIndex++) {
case 0:
ADD_PLAYER_MOVER(210, 185);
break;
case 1:
- _globals->_player.setPriority2(200);
+ _globals->_player.fixPriority(200);
_globals->_player.setVisage(4052);
_globals->_player.setStrip(5);
_globals->_player.changeZoom(100);
@@ -2104,7 +2115,7 @@ void Scene4050::Action4::signal() {
case 0:
_globals->_player.disableControl();
ADD_MOVER(_globals->_player, 189, 135);
- _globals->_player.setPriority2(200);
+ _globals->_player.fixPriority(200);
break;
case 1:
_globals->_player._moveDiff.y = 3;
@@ -2140,7 +2151,7 @@ void Scene4050::Action4::signal() {
_globals->_player.setStrip(2);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(216, 184));
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
break;
case 5:
scene->_hotspot16.setStrip2(4);
@@ -2169,7 +2180,7 @@ void Scene4050::Action4::signal() {
/*--------------------------------------------------------------------------*/
-void Scene4050::Hotspot14::doAction(int action) {
+void Scene4050::Hotspot15::doAction(int action) {
Scene4050 *scene = (Scene4050 *)_globals->_sceneManager._scene;
switch (action) {
@@ -2243,7 +2254,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(4008);
_globals->_player.setPosition(Common::Point(206, 62));
_globals->_player.changeZoom(130);
- _globals->_player.setPriority2(200);
+ _globals->_player.fixPriority(200);
_globals->_player.setStrip(2);
setAction(&_action2);
@@ -2286,7 +2297,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) {
_hotspot17.postInit();
_hotspot17.setVisage(4050);
_hotspot17.setPosition(Common::Point(209, 119));
- _hotspot17.setPriority2(2);
+ _hotspot17.fixPriority(2);
_hotspot1.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
_hotspot2.setBounds(Rect(150, 25, 198, 125));
@@ -2361,7 +2372,7 @@ void Scene4100::Action2::signal() {
scene->_hotspot2.setVisage(4120);
scene->_hotspot2.animate(ANIM_MODE_1, NULL);
scene->_hotspot2.setStrip2(4);
- scene->_hotspot2.setPriority2(100);
+ scene->_hotspot2.fixPriority(100);
scene->_hotspot2.setPosition(Common::Point(214, 119));
setDelay(3);
@@ -2641,13 +2652,13 @@ void Scene4100::postInit(SceneObjectList *OwnerList) {
_hotspot1.postInit();
_hotspot1.setVisage(4102);
- _hotspot1.setPriority2(129);
+ _hotspot1.fixPriority(129);
_hotspot1.setPosition(Common::Point(171, 120));
_hotspot3.postInit();
_hotspot3.setVisage(4130);
_hotspot3.animate(ANIM_MODE_2, NULL);
- _hotspot3.setPriority2(200);
+ _hotspot3.fixPriority(200);
_hotspot3.setPosition(Common::Point(272, 110));
_hotspot4.postInit();
@@ -2960,7 +2971,7 @@ void Scene4150::Hotspot3::doAction(int action) {
/*--------------------------------------------------------------------------*/
Scene4150::Scene4150() :
- _hotspot1(0, CURSOR_LOOK, 4000, 17, CURSOR_USE, 4150, 21, CURSOR_TALK, 4150, 21,
+ _hotspot1(0, CURSOR_LOOK, 4150, 17, CURSOR_USE, 4150, 21, CURSOR_TALK, 4150, 21,
OBJECT_SCANNER, 4150, 22, OBJECT_STUNNER, 4150, 23, LIST_END),
_hotspot2(0, CURSOR_LOOK, 4150, 4, CURSOR_USE, 4150, 24, LIST_END),
_hotspot7(0, CURSOR_LOOK, 4150, 1, CURSOR_USE, 4150, 25, OBJECT_ROPE, 4150, 26, LIST_END),
@@ -2993,7 +3004,7 @@ void Scene4150::postInit(SceneObjectList *OwnerList) {
_hotspot2.postInit();
_hotspot2.setVisage(4171);
_hotspot2.animate(ANIM_MODE_2, NULL);
- _hotspot2.setPriority2(100);
+ _hotspot2.fixPriority(100);
_hotspot2.setPosition(Common::Point(76, 147));
_hotspot1.postInit();
@@ -3117,7 +3128,7 @@ void Scene4250::Action1::signal() {
break;
case 5:
ADD_PLAYER_MOVER(220, 175);
- scene->_hotspot1.setPriority2(105);
+ scene->_hotspot1.fixPriority(105);
ADD_PLAYER_MOVER_NULL(scene->_hotspot1, 197, 173);
break;
case 6:
@@ -3234,8 +3245,8 @@ void Scene4250::Action5::signal() {
setDelay(3);
break;
case 1:
- scene->_hotspot4.setPriority2(195);
- scene->_hotspot1.setPriority2(105);
+ scene->_hotspot4.fixPriority(195);
+ scene->_hotspot1.fixPriority(105);
ADD_MOVER_NULL(_globals->_player, 6, 185);
ADD_MOVER_NULL(scene->_hotspot4, 9, 190);
ADD_MOVER(scene->_hotspot1, 12, 180);
@@ -3246,7 +3257,7 @@ void Scene4250::Action5::signal() {
ADD_PLAYER_MOVER_NULL(scene->_hotspot4, 239, 195);
break;
case 3:
- scene->_hotspot4.setPriority2(-1);
+ scene->_hotspot4.fixPriority(-1);
scene->_hotspot1.setStrip(5);
scene->_hotspot4.setStrip(7);
_globals->_player.enableControl();
@@ -3528,7 +3539,7 @@ void Scene4250::postInit(tSage::SceneObjectList *OwnerList) {
_hotspot5.postInit();
_hotspot5.setVisage(4250);
_hotspot5.setPosition(Common::Point(268, 168));
- _hotspot5.setPriority2(1);
+ _hotspot5.fixPriority(1);
_hotspot4.postInit();
_hotspot4.setVisage(2701);
@@ -3552,7 +3563,7 @@ void Scene4250::postInit(tSage::SceneObjectList *OwnerList) {
_hotspot6.setStrip(4);
_hotspot6.setFrame(3);
_hotspot6.changeZoom(50);
- _hotspot6.setPriority2(70);
+ _hotspot6.fixPriority(70);
_hotspot6.setPosition(Common::Point(261, 175));
if (RING_INVENTORY._helmet._sceneNumber == 4250) {
@@ -3609,7 +3620,7 @@ void Scene4250::postInit(tSage::SceneObjectList *OwnerList) {
_hotspot2.postInit();
_hotspot2.setVisage(4251);
_hotspot2.setStrip2(1);
- _hotspot2.setPriority2(2);
+ _hotspot2.fixPriority(2);
_hotspot2.setFrame(1);
_hotspot2.setPosition(Common::Point(267, 172));
@@ -3671,7 +3682,7 @@ void Scene4250::dispatch() {
_globals->_player.changeZoom(70);
if (_globals->_player.getRegionIndex() == 15) {
_globals->_player.changeZoom(-1);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
}
if (_hotspot1.getRegionIndex() == 8)
@@ -3680,7 +3691,7 @@ void Scene4250::dispatch() {
_hotspot1.changeZoom(70);
if (_hotspot1.getRegionIndex() == 15) {
_hotspot1.changeZoom(-1);
- _hotspot1.setPriority2(-1);
+ _hotspot1.fixPriority(-1);
}
if (_hotspot4.getRegionIndex() == 8)
@@ -3689,7 +3700,7 @@ void Scene4250::dispatch() {
_hotspot4.changeZoom(70);
if (_hotspot4.getRegionIndex() == 15) {
_hotspot4.changeZoom(-1);
- _hotspot4.setPriority2(-1);
+ _hotspot4.fixPriority(-1);
}
Scene::dispatch();
@@ -3751,7 +3762,7 @@ void Scene4300::Action1::signal() {
setDelay(60);
break;
case 7:
- scene->_hotspot10.setPriority2(250);
+ scene->_hotspot10.fixPriority(250);
scene->_hotspot10.animate(ANIM_MODE_5, this);
break;
case 8:
@@ -4001,7 +4012,7 @@ void Scene4300::postInit(SceneObjectList *OwnerList) {
_hotspot7.postInit();
_hotspot7.setPosition(Common::Point(90, 128));
_hotspot7.setVisage(4303);
- _hotspot7.setPriority2(250);
+ _hotspot7.fixPriority(250);
_globals->_sceneItems.push_back(&_hotspot7);
_hotspot9.setup(120, 49, 174, 91, 4300, -1, -1);
@@ -4023,7 +4034,7 @@ void Scene4300::postInit(SceneObjectList *OwnerList) {
_hotspot17.postInit();
_hotspot17.setVisage(4300);
_hotspot17.setStrip(6);
- _hotspot17.setPriority2(1);
+ _hotspot17.fixPriority(1);
_hotspot17.setPosition(Common::Point(200, 69));
if (RING_INVENTORY._stasisBox2._sceneNumber == 4300)
@@ -4036,14 +4047,14 @@ void Scene4300::postInit(SceneObjectList *OwnerList) {
_hotspot10.postInit();
_hotspot10.setVisage(4302);
_hotspot10.setPosition(Common::Point(244, 179));
- _hotspot10.setPriority2(100);
+ _hotspot10.fixPriority(100);
_globals->_sceneItems.push_back(&_hotspot10);
_hotspot12.postInit();
_hotspot12.setVisage(4302);
_hotspot12.setStrip2(3);
_hotspot12.setPosition(Common::Point(231, 185));
- _hotspot12.setPriority2(251);
+ _hotspot12.fixPriority(251);
_hotspot12.hide();
_hotspot13.postInit();
@@ -4051,7 +4062,7 @@ void Scene4300::postInit(SceneObjectList *OwnerList) {
_hotspot13.setVisage(4302);
_hotspot13.setStrip2(2);
_hotspot13.setPosition(Common::Point(256, 168));
- _hotspot13.setPriority2(251);
+ _hotspot13.fixPriority(251);
_hotspot13._numFrames = 1;
_hotspot13.animate(ANIM_MODE_8, 0, NULL);
}
@@ -4060,7 +4071,7 @@ void Scene4300::postInit(SceneObjectList *OwnerList) {
_hotspot16.postInit();
_hotspot16.setVisage(4300);
_hotspot16.setPosition(Common::Point(169, 141));
- _hotspot16.setPriority2(1);
+ _hotspot16.fixPriority(1);
_hotspot16.setStrip(4);
_globals->_sceneItems.push_back(&_hotspot16);
}
@@ -4071,37 +4082,37 @@ void Scene4300::postInit(SceneObjectList *OwnerList) {
_hotspot1.postInit();
_hotspot1.setVisage(4301);
- _hotspot1.setPriority2(145);
+ _hotspot1.fixPriority(145);
_hotspot1.setPosition(Common::Point(160, 64));
_hotspot2.postInit();
_hotspot2.setVisage(4301);
_hotspot2.setStrip2(2);
- _hotspot2.setPriority2(140);
+ _hotspot2.fixPriority(140);
_hotspot2.setPosition(Common::Point(166, 90));
_hotspot3.postInit();
_hotspot3.setVisage(4301);
_hotspot3.setStrip2(3);
- _hotspot3.setPriority2(135);
+ _hotspot3.fixPriority(135);
_hotspot3.setPosition(Common::Point(173, 114));
_hotspot4.postInit();
_hotspot4.setVisage(4301);
_hotspot4.setStrip2(4);
- _hotspot4.setPriority2(130);
+ _hotspot4.fixPriority(130);
_hotspot4.setPosition(Common::Point(187, 141));
_hotspot5.postInit();
_hotspot5.setVisage(4301);
_hotspot5.setStrip2(5);
- _hotspot5.setPriority2(125);
+ _hotspot5.fixPriority(125);
_hotspot5.setPosition(Common::Point(201, 164));
_hotspot6.postInit();
_hotspot6.setVisage(4301);
_hotspot6.setStrip2(6);
- _hotspot6.setPriority2(120);
+ _hotspot6.fixPriority(120);
_hotspot6.setPosition(Common::Point(219, 186));
setAction(&_action1);
@@ -4218,14 +4229,14 @@ void Scene4301::Action1::signal() {
scene->_hotspot2.setStrip(2);
scene->_hotspot2.setFrame(1);
scene->_hotspot2.setPosition(Common::Point(30, 15));
- scene->_hotspot2.setPriority2(255);
+ scene->_hotspot2.fixPriority(255);
scene->_hotspot3.postInit();
scene->_hotspot3.setVisage(4303);
scene->_hotspot3.setStrip(2);
scene->_hotspot3.setFrame(2);
scene->_hotspot3.setPosition(Common::Point(48, 29));
- scene->_hotspot3.setPriority2(255);
+ scene->_hotspot3.fixPriority(255);
scene->_hotspot3.hide();
_field34E = 0;
@@ -4301,7 +4312,7 @@ void Scene4301::Action1::process(Event &event) {
_buttonList[_state].setStrip(buttonIndex + 3);
_buttonList[_state].setFrame(1);
_buttonList[_state].setPosition(Common::Point((_state % 3) * 25 + 55, (_state / 3) * 25 + 121));
- _buttonList[_state].setPriority2(255);
+ _buttonList[_state].fixPriority(255);
_buttonList[_state]._numFrames = 25;
_buttonList[_state].animate(ANIM_MODE_5, NULL);
@@ -4380,7 +4391,7 @@ void Scene4301::postInit(SceneObjectList *OwnerList) {
_hotspot1.setVisage(4303);
_hotspot1._strip = 1;
_hotspot1._frame = 1;
- _hotspot1.setPriority2(250);
+ _hotspot1.fixPriority(250);
_hotspot5.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
_globals->_sceneItems.push_back(&_hotspot5);
diff --git a/engines/tsage/ringworld_scenes5.h b/engines/tsage/ringworld_scenes5.h
index e3d1ae08b5..626eab5dab 100644
--- a/engines/tsage/ringworld_scenes5.h
+++ b/engines/tsage/ringworld_scenes5.h
@@ -330,7 +330,7 @@ class Scene4050 : public Scene {
};
/* Hotspots */
- class Hotspot14 : public SceneObject {
+ class Hotspot15 : public SceneObject {
public:
virtual void doAction(int action);
};
@@ -349,8 +349,9 @@ public:
DisplayHotspot _hotspot1, _hotspot2, _hotspot3, _hotspot4, _hotspot5;
DisplayHotspot _hotspot6, _hotspot7, _hotspot8, _hotspot9, _hotspot10;
DisplayHotspot _hotspot11, _hotspot12, _hotspot13;
- Hotspot14 _hotspot14;
- SceneObject _hotspot15, _hotspot16;
+ SceneObject _hotspot14;
+ Hotspot15 _hotspot15;
+ SceneObject _hotspot16;
Hotspot17 _hotspot17;
Scene4050();
diff --git a/engines/tsage/ringworld_scenes6.cpp b/engines/tsage/ringworld_scenes6.cpp
index 2c9670d99a..17f7654e70 100644
--- a/engines/tsage/ringworld_scenes6.cpp
+++ b/engines/tsage/ringworld_scenes6.cpp
@@ -36,6 +36,7 @@ namespace tSage {
*--------------------------------------------------------------------------*/
void Scene5000::Action1::signal() {
+ // Ship landing
Scene5000 *scene = (Scene5000 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -127,7 +128,7 @@ void Scene5000::Action2::signal() {
case 2:
if (!_globals->getFlag(59))
setAction(&scene->_action3, this);
- _globals->_player.setPriority2(15);
+ _globals->_player.fixPriority(15);
ADD_MOVER(_globals->_player, 208, 100);
break;
case 3:
@@ -145,7 +146,7 @@ void Scene5000::Action2::signal() {
break;
case 7:
_globals->_player.changeZoom(-1);
- _globals->_player.setPriority2(35);
+ _globals->_player.fixPriority(35);
ADD_MOVER(_globals->_player, 201, 166);
break;
case 8:
@@ -154,7 +155,7 @@ void Scene5000::Action2::signal() {
break;
case 9:
_globals->_player.changeZoom(-1);
- _globals->_player.setPriority2(50);
+ _globals->_player.fixPriority(50);
ADD_MOVER(_globals->_player, 220, 182);
break;
case 10:
@@ -164,7 +165,7 @@ void Scene5000::Action2::signal() {
case 11:
_globals->_player.changeZoom(-1);
_globals->_player.setStrip2(-1);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
ADD_MOVER(_globals->_player, 208, 175);
break;
case 12:
@@ -200,7 +201,7 @@ void Scene5000::Action3::signal() {
scene->_hotspot7.setPosition(Common::Point(217, 76));
scene->_hotspot7.changeZoom(10);
scene->_hotspot7.setStrip2(3);
- scene->_hotspot7.setPriority2(200);
+ scene->_hotspot7.fixPriority(200);
scene->_hotspot7._moveDiff.y = 2;
scene->_hotspot7.animate(ANIM_MODE_1, NULL);
ADD_MOVER(scene->_hotspot7, 214, 89);
@@ -209,14 +210,14 @@ void Scene5000::Action3::signal() {
break;
case 2:
scene->_hotspot7.changeZoom(-1);
- scene->_hotspot7.setPriority2(14);
+ scene->_hotspot7.fixPriority(14);
ADD_MOVER(scene->_hotspot7, 208, 100);
break;
case 3:
ADD_MOVER(scene->_hotspot7, 213, 98);
break;
case 4:
- scene->_hotspot7.setPriority2(19);
+ scene->_hotspot7.fixPriority(19);
ADD_MOVER(scene->_hotspot7, 213, 98);
break;
case 5:
@@ -228,7 +229,7 @@ void Scene5000::Action3::signal() {
break;
case 7:
scene->_hotspot7.changeZoom(-1);
- scene->_hotspot7.setPriority2(34);
+ scene->_hotspot7.fixPriority(34);
ADD_MOVER(scene->_hotspot7, 201, 166);
break;
case 8:
@@ -237,7 +238,7 @@ void Scene5000::Action3::signal() {
break;
case 9:
scene->_hotspot7.changeZoom(-1);
- scene->_hotspot7.setPriority2(49);
+ scene->_hotspot7.fixPriority(49);
ADD_MOVER(scene->_hotspot7, 210, 182);
break;
case 10:
@@ -247,7 +248,7 @@ void Scene5000::Action3::signal() {
case 11:
scene->_hotspot7.changeZoom(-1);
scene->_hotspot7.setStrip2(-1);
- scene->_hotspot7.setPriority2(-1);
+ scene->_hotspot7.fixPriority(-1);
ADD_MOVER(scene->_hotspot7, 175, 166);
break;
case 12:
@@ -268,7 +269,7 @@ void Scene5000::Action4::signal() {
setDelay(1);
break;
case 1:
- _globals->_player.setPriority2(50);
+ _globals->_player.fixPriority(50);
_globals->_player.setStrip2(4);
ADD_MOVER(_globals->_player, 210, 182);
break;
@@ -276,14 +277,14 @@ void Scene5000::Action4::signal() {
ADD_MOVER(_globals->_player, 205, 146);
break;
case 3:
- _globals->_player.setPriority2(35);
+ _globals->_player.fixPriority(35);
ADD_MOVER(_globals->_player, 201, 166);
break;
case 4:
ADD_MOVER(_globals->_player, 229, 115);
break;
case 5:
- _globals->_player.setPriority2(20);
+ _globals->_player.fixPriority(20);
_globals->_player.changeZoom(47);
ADD_MOVER(_globals->_player, 220, 125);
break;
@@ -295,7 +296,7 @@ void Scene5000::Action4::signal() {
ADD_MOVER(_globals->_player, 213, 98);
break;
case 8:
- _globals->_player.setPriority2(15);
+ _globals->_player.fixPriority(15);
ADD_MOVER(_globals->_player, 208, 100);
break;
case 9:
@@ -345,6 +346,7 @@ void Scene5000::Action5::signal() {
}
void Scene5000::Action6::signal() {
+ // Discussion between the hero and Seeker, then the hero goes back to the lander
Scene5000 *scene = (Scene5000 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -364,7 +366,7 @@ void Scene5000::Action6::signal() {
ADD_PLAYER_MOVER(208, 163);
break;
case 4:
- _globals->_player.setPriority2(50);
+ _globals->_player.fixPriority(50);
_globals->_player.setStrip2(4);
ADD_MOVER(_globals->_player, 210, 182);
break;
@@ -393,6 +395,7 @@ void Scene5000::Hotspot7::doAction(int action) {
}
void Scene5000::Hotspot8::doAction(int action) {
+ // Cave
Scene5000 *scene = (Scene5000 *)_globals->_sceneManager._scene;
switch (action) {
@@ -455,14 +458,14 @@ void Scene5000::postInit(SceneObjectList *OwnerList) {
_hotspot1.setVisage(5001);
_hotspot1.setFrame2(1);
_hotspot1._moveDiff = Common::Point(5, 5);
- _hotspot1.setPriority2(10);
+ _hotspot1.fixPriority(10);
_hotspot1.changeZoom(10);
_hotspot4.postInit();
_hotspot4.setVisage(5001);
_hotspot4.setStrip2(2);
_hotspot4._moveDiff = Common::Point(5, 1);
- _hotspot4.setPriority2(10);
+ _hotspot4.fixPriority(10);
_hotspot4.changeZoom(100);
_hotspot4.animate(ANIM_MODE_8, 0, NULL);
_hotspot4.hide();
@@ -484,13 +487,13 @@ void Scene5000::postInit(SceneObjectList *OwnerList) {
_hotspot5.setVisage(5001);
_hotspot5.setStrip2(4);
_hotspot5._numFrames = 5;
- _hotspot5.setPriority2(15);
+ _hotspot5.fixPriority(15);
_hotspot5.setPosition(Common::Point(218, 76));
_hotspot5.hide();
_hotspot9.postInit();
_hotspot9.setVisage(5002);
- _hotspot9.setPriority2(80);
+ _hotspot9.fixPriority(80);
_hotspot9.setPosition(Common::Point(71, 174));
_hotspot10.postInit();
@@ -644,7 +647,7 @@ void Scene5100::Action1::signal() {
scene->_hotspot5.setPosition(Common::Point(1160, 34));
scene->_hotspot5.setStrip2(2);
scene->_hotspot5.animate(ANIM_MODE_1, NULL);
- scene->_hotspot5.setPriority2(10);
+ scene->_hotspot5.fixPriority(10);
_globals->_sceneItems.push_front(&scene->_hotspot5);
ADD_MOVER(scene->_hotspot5, 999, 14);
@@ -689,9 +692,9 @@ void Scene5100::Action2::signal() {
break;
case 3:
if (_globals->_player._position.x >= 966) {
- ADD_PLAYER_MOVER(1215, 155);
+ ADD_PLAYER_MOVER_NULL(scene->_hotspot8, 1215, 155);
} else {
- ADD_PLAYER_MOVER_THIS(scene->_hotspot8, 966, 185);
+ ADD_PLAYER_MOVER_NULL(scene->_hotspot8, 966, 185);
}
if (_globals->_player._position.x >= 966) {
@@ -701,7 +704,7 @@ void Scene5100::Action2::signal() {
}
break;
case 4:
- ADD_PLAYER_MOVER_THIS(scene->_hotspot8, 1215, 155);
+ ADD_PLAYER_MOVER_NULL(scene->_hotspot8, 1215, 155);
ADD_PLAYER_MOVER(1215, 155);
break;
case 5:
@@ -829,6 +832,7 @@ void Scene5100::Action5::signal() {
/*--------------------------------------------------------------------------*/
void Scene5100::HotspotGroup1::doAction(int action) {
+ // Flesh Eaters
Scene5100 *scene = (Scene5100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -881,11 +885,12 @@ void Scene5100::Hotspot4::doAction(int action) {
}
void Scene5100::HotspotGroup2::doAction(int action) {
+ // Bat
Scene5100 *scene = (Scene5100 *)_globals->_sceneManager._scene;
switch (action) {
case CURSOR_LOOK:
- SceneItem::display2(5100, _globals->getFlag(62) ? 47 : 23);
+ SceneItem::display2(5100, _globals->getFlag(108) ? 47 : 23);
break;
case CURSOR_USE:
SceneItem::display2(5100, 29);
@@ -909,6 +914,7 @@ void Scene5100::HotspotGroup2::doAction(int action) {
}
void Scene5100::Hotspot9::doAction(int action) {
+ // Rope
Scene5100 *scene = (Scene5100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -929,7 +935,7 @@ void Scene5100::Hotspot9::doAction(int action) {
case OBJECT_BONE:
_globals->_player.disableControl();
scene->_sceneMode = 5116;
- scene->setAction(&scene->_sequenceManager, scene, 5116, &_globals->_player, &scene->_hotspot10,
+ scene->setAction(&scene->_sequenceManager, scene, 5116, &_globals->_player, this, &scene->_hotspot10,
&scene->_hotspot4, NULL);
break;
default:
@@ -1004,6 +1010,7 @@ void Scene5100::Hotspot18::doAction(int action) {
}
void Scene5100::Hotspot19::doAction(int action) {
+ // Pillar
Scene5100 *scene = (Scene5100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -1082,14 +1089,14 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
_hotspot14.postInit();
_hotspot14.setVisage(5101);
_hotspot14.setPosition(Common::Point(498, 147));
- _hotspot14.setPriority2(200);
+ _hotspot14.fixPriority(200);
_hotspot14._moveDiff.y = 10;
}
_hotspot17.postInit();
_hotspot17.setVisage(5101);
_hotspot17._strip = 2;
- _hotspot17.setPriority2(200);
+ _hotspot17.fixPriority(200);
if (_globals->getFlag(67))
_hotspot17.setPosition(Common::Point(554, 192));
@@ -1178,7 +1185,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
case 5200:
if (_globals->_stripNum == 5200) {
_globals->_player.setVisage(5101);
- _globals->_player.setPriority2(200);
+ _globals->_player.fixPriority(200);
_globals->_player.setStrip(5);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(513, 199));
@@ -1227,7 +1234,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(5101);
_globals->_player.setStrip(6);
- _globals->_player.setPriority2(170);
+ _globals->_player.fixPriority(170);
_globals->_player.setPosition(Common::Point(1168, 110));
setAction(&_sequenceManager, this, 5111, &_globals->_player, NULL);
@@ -1260,7 +1267,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
_hotspot6.postInit();
_hotspot6.setVisage(5362);
_hotspot6.setPosition(Common::Point(1152, 70));
- _hotspot6.setPriority2(170);
+ _hotspot6.fixPriority(170);
_hotspot6.setStrip(6);
_hotspot6.setFrame(1);
_globals->_sceneItems.push_back(&_hotspot6);
@@ -1275,7 +1282,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
_hotspot15.setVisage(5140);
_hotspot15.setStrip(3);
_hotspot15.setPosition(Common::Point(977, 173));
- _hotspot15.setPriority2(1);
+ _hotspot15.fixPriority(1);
_globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position);
loadScene(5100);
@@ -1324,9 +1331,9 @@ void Scene5100::signal() {
break;
case 5111:
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
- _globals->_player.setVisage(6);
+ _globals->_player.setVisage(0);
_globals->_player.setStrip(6);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.animate(ANIM_MODE_1, NULL);
if ((RING_INVENTORY._vial._sceneNumber != 5100) && !_globals->getFlag(108)) {
@@ -1349,9 +1356,9 @@ void Scene5100::signal() {
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.setVisage(0);
_globals->_player.setStrip(6);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.animate(ANIM_MODE_1, NULL);
- break;
+ // No break on purpose
case 5117:
_globals->_player.enableControl();
break;
@@ -1370,6 +1377,7 @@ void Scene5100::signal() {
}
void Scene5100::dispatch() {
+ // Flesheater trap
if (_hotspot15._bounds.contains(_globals->_player._position) && !_globals->_player._visage) {
_globals->_player.disableControl();
_globals->_player.addMover(NULL);
@@ -1398,9 +1406,9 @@ void Scene5100::dispatch() {
_hotspot3.setStrip2(2);
ObjectMover3 *mover1 = new ObjectMover3();
- _hotspot2.addMover(mover1, 20, this);
+ _hotspot2.addMover(mover1, &_globals->_player, 20, this);
ObjectMover3 *mover2 = new ObjectMover3();
- _hotspot3.addMover(mover2, 20, this);
+ _hotspot3.addMover(mover2, &_globals->_player, 20, this);
}
if (!_action) {
@@ -1408,8 +1416,9 @@ void Scene5100::dispatch() {
_globals->_player._canWalk = false;
_globals->_player.addMover(NULL);
+ Common::Point pt(20, 25);
PlayerMover2 *mover = new PlayerMover2();
- _hotspot3.addMover(mover, 20, 25, &_globals->_player);
+ _hotspot3.addMover(mover, &pt, &_globals->_player);
setAction(&_action4);
}
@@ -1445,6 +1454,7 @@ void Scene5200::Action1::signal() {
}
void Scene5200::Action2::signal() {
+ // Quinn obtains the stasis box from the flesheater throne room
Scene5200 *scene = (Scene5200 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -1489,6 +1499,7 @@ void Scene5200::Action2::signal() {
void Scene5200::Action3::signal() {
switch (_actionIndex++) {
+ case 0:
_globals->_player.disableControl();
setDelay(5);
break;
@@ -1563,7 +1574,7 @@ void Scene5200::Hotspot10::doAction(int action) {
}
break;
default:
- SceneItem::doAction(action);
+ SceneObject::doAction(action);
break;
}
}
@@ -1579,7 +1590,7 @@ void Scene5200::Hotspot14::doAction(int action) {
scene->setAction(&scene->_action2);
break;
default:
- SceneItem::doAction(action);
+ SceneObject::doAction(action);
break;
}
}
@@ -1619,17 +1630,20 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
_hotspot14.setVisage(5202);
_hotspot14._strip = 3;
_hotspot14.setPosition(Common::Point(105, 52));
- _hotspot14.setPriority2(90);
+ _hotspot14.fixPriority(90);
_hotspot8.postInit();
_hotspot8.setVisage(5202);
_hotspot8._strip = 1;
_hotspot8.setPosition(Common::Point(96, 53));
- _hotspot8.setPriority2(90);
+ _hotspot8.fixPriority(90);
_globals->_sceneItems.push_back(&_hotspot14);
}
- if (_globals->_stripNum == 1111) {
+ if (_globals->_stripNum == 5111) {
+ // Happens when the player enters the throne room via the secret passage,
+ // after talking with the bat. No NPCs are around and the player can
+ // obtain the stasis box.
_globals->_soundHandler.startSound(205);
_globals->_player.disableControl();
@@ -1644,6 +1658,7 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
setAction(&_action3);
} else {
+ // Happens when the player is captured by the flesh eaters the first time.
_globals->_player.postInit();
_globals->_player.setVisage(2640);
_globals->_player._strip = 1;
@@ -1665,7 +1680,7 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
_hotspot7.setVisage(5210);
_hotspot7._frame = 1;
_hotspot7._strip = 4;
- _hotspot7.setPriority2(168);
+ _hotspot7.fixPriority(168);
_hotspot7.setPosition(Common::Point(186, 106));
_hotspot1.postInit();
@@ -1677,20 +1692,20 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
_hotspot2.setVisage(5212);
_hotspot2._strip = 3;
_hotspot2.setPosition(Common::Point(148, 141));
- _hotspot2.setPriority2(90);
+ _hotspot2.fixPriority(90);
_hotspot3.postInit();
_hotspot3.setVisage(5212);
_hotspot3._strip = 2;
_hotspot3.setPosition(Common::Point(62, 109));
- _hotspot3.setPriority2(138);
+ _hotspot3.fixPriority(138);
_hotspot3.setAction(&_action1);
_hotspot4.postInit();
_hotspot4.setVisage(5212);
_hotspot4._strip = 4;
_hotspot4.setPosition(Common::Point(146, 110));
- _hotspot4.setPriority2(90);
+ _hotspot4.fixPriority(90);
_globals->_player.disableControl();
_globals->setFlag(61);
@@ -1701,6 +1716,8 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
_hotspot11.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
_hotspot9._sceneRegionId = 11;
_hotspot10._sceneRegionId = 9;
+ _hotspot12._sceneRegionId = 10;
+ _hotspot13._sceneRegionId = 8;
_globals->_sceneItems.addItems(&_hotspot12, &_hotspot13, &_hotspot9, &_hotspot10, &_hotspot11, NULL);
_globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position);
@@ -1754,7 +1771,7 @@ void Scene5300::Action1::signal() {
ADD_MOVER(_globals->_player, 85, 170);
break;
case 3:
- scene->_hotspot2.setPriority2(-1);
+ scene->_hotspot2.fixPriority(-1);
_globals->_player.checkAngle(&scene->_hotspot2);
setAction(&scene->_sequenceManager, this, 5305, &scene->_hotspot2, NULL);
break;
@@ -1933,6 +1950,7 @@ void Scene5300::Hotspot5::doAction(int action) {
}
void Scene5300::Hotspot6::doAction(int action) {
+ // Left Hole
Scene5300 *scene = (Scene5300 *)_globals->_sceneManager._scene;
switch (action) {
@@ -2033,7 +2051,7 @@ void Scene5300::postInit(SceneObjectList *OwnerList) {
_hotspot2.setVisage(5310);
_hotspot2.setPosition(Common::Point(63, 170));
_hotspot2.animate(ANIM_MODE_1, NULL);
- _hotspot2.setPriority2(98);
+ _hotspot2.fixPriority(98);
}
_hotspot1.postInit();
@@ -2075,7 +2093,7 @@ void Scene5300::postInit(SceneObjectList *OwnerList) {
_hotspot3.postInit();
_hotspot3.setVisage(5301);
_hotspot3.setPosition(Common::Point(172, 32));
- _hotspot3.setPriority2(1);
+ _hotspot3.fixPriority(1);
_hotspot3.animate(ANIM_MODE_NONE, NULL);
_globals->_player.postInit();
@@ -2113,6 +2131,9 @@ void Scene5300::signal() {
_globals->_stripNum = 5300;
_globals->_sceneManager.changeScene(5100);
break;
+ case 5307:
+ _soundHandler.proc1(NULL);
+ // No break on purpose
case 5302:
case 5308:
case 5316:
@@ -2149,15 +2170,12 @@ void Scene5300::signal() {
_stripManager.start(5302, this);
_sceneMode = 5302;
break;
- case 5307:
- _soundHandler.proc1(NULL);
- break;
case 5309:
_hotspot5.remove();
_globals->_player.enableControl();
break;
case 5310:
- _hotspot2.setPriority2(41);
+ _hotspot2.fixPriority(41);
_sceneMode = 5315;
setAction(&_sequenceManager, this, 5315, &_hotspot2, NULL);
diff --git a/engines/tsage/ringworld_scenes6.h b/engines/tsage/ringworld_scenes6.h
index 272aea4fe9..16b2800fc6 100644
--- a/engines/tsage/ringworld_scenes6.h
+++ b/engines/tsage/ringworld_scenes6.h
@@ -216,11 +216,11 @@ class Scene5200 : public Scene {
};
/* Hotspots */
- class Hotspot9 : public SceneItemExt {
+ class Hotspot9 : public SceneObjectExt {
public:
virtual void doAction(int action);
};
- class Hotspot10 : public SceneItemExt {
+ class Hotspot10 : public SceneObjectExt {
public:
virtual void doAction(int action);
};
diff --git a/engines/tsage/ringworld_scenes8.cpp b/engines/tsage/ringworld_scenes8.cpp
index 0891f64597..3f1895a432 100644
--- a/engines/tsage/ringworld_scenes8.cpp
+++ b/engines/tsage/ringworld_scenes8.cpp
@@ -31,6 +31,12 @@
namespace tSage {
+void NamedHotspotMult::synchronise(Serialiser &s) {
+ SceneHotspot::synchronise(s);
+ s.syncAsSint16LE(_useLineNum);
+ s.syncAsSint16LE(_lookLineNum);
+}
+
/*--------------------------------------------------------------------------
* Scene 7000
*
@@ -54,16 +60,17 @@ void Scene7000::Action1::signal() {
scene->_object1.setVisage(7003);
scene->_object1.animate(ANIM_MODE_5, this);
scene->_object1.setPosition(Common::Point(151, 182), 0);
- scene->_object1.setPriority2(205);
+ scene->_object1.fixPriority(205);
_globals->_sceneItems.push_front(&scene->_object1);
break;
case 3:
- scene->_object1.setStrip(4);
- scene->_object1.animate(ANIM_MODE_8, 0, 0);
+ scene->_object1._numFrames = 4;
+ scene->_object1.setStrip(2);
+ scene->_object1.animate(ANIM_MODE_8, 0, NULL);
scene->_stripManager.start(7005, this);
break;
case 4:
- scene->_object1.animate(ANIM_MODE_2, 0);
+ scene->_object1.animate(ANIM_MODE_2, NULL);
setDelay(3);
break;
case 5:
@@ -107,7 +114,7 @@ void Scene7000::Action3::dispatch() {
Action::dispatch();
if (_actionIndex == 4)
- scene->_object4.setPosition(Common::Point(scene->_object3._position.x, scene->_object3._position.y));
+ scene->_object4.setPosition(scene->_object3._position, 0);
}
/*--------------------------------------------------------------------------*/
@@ -122,9 +129,9 @@ void Scene7000::Action3::signal() {
scene->_object4.postInit();
scene->_object4.setVisage(5001);
scene->_object4.setStrip2(2);
- scene->_object4.animate(ANIM_MODE_8, 0, 0);
+ scene->_object4.animate(ANIM_MODE_8, 0, NULL);
scene->_object4.setPosition(Common::Point(10, 18), 0);
- scene->_object4.setPriority2(10);
+ scene->_object4.fixPriority(10);
scene->_object4.changeZoom(100);
scene->_object4.hide();
break;
@@ -135,7 +142,8 @@ void Scene7000::Action3::signal() {
break;
}
case 2:
- scene->_object3.setPriority2(10);
+ scene->_object3._moveDiff.y = 1;
+ scene->_object3.fixPriority(10);
scene->_object4.setPosition(Common::Point(scene->_object3._position.x, scene->_object3._position.y + 15), 0);
scene->_object4.show();
setDelay(30);
@@ -176,8 +184,8 @@ void Scene7000::Action4::signal() {
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 3:
- scene->_object1.setStrip(1);
- scene->_object1.animate(ANIM_MODE_8, 0, 0);
+ scene->_object1.setStrip(4);
+ scene->_object1.animate(ANIM_MODE_8, 0, NULL);
_globals->setFlag(81);
_globals->_player.enableControl();
remove();
@@ -222,7 +230,7 @@ void Scene7000::Action5::signal() {
break;
}
case 5: {
- _globals->_player.setPriority2(10);
+ _globals->_player.fixPriority(10);
NpcMover *mover = new NpcMover();
Common::Point pt(11, 89);
_globals->_player.addMover(mover, &pt, this);
@@ -268,7 +276,7 @@ void Scene7000::Action6::signal() {
NpcMover *mover = new NpcMover();
Common::Point pt(31, 96);
_globals->_player.addMover(mover, &pt, this);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
break;
}
case 4: {
@@ -315,7 +323,7 @@ void Scene7000::Action7::signal() {
break;
}
case 4: {
- _globals->_player.setPriority2(10);
+ _globals->_player.fixPriority(10);
NpcMover *mover = new NpcMover();
Common::Point pt(11, 89);
_globals->_player.addMover(mover, &pt, this);
@@ -354,22 +362,19 @@ void Scene7000::Object1::doAction(int action) {
case OBJECT_TRANSLATOR:
_globals->_player.disableControl();
RING_INVENTORY._translator._sceneNumber = 7000;
- if (RING_INVENTORY._waldos._sceneNumber == 7000) {
- if (RING_INVENTORY._jar._sceneNumber == 7000) {
- scene->_sceneMode = 7012;
- scene->setAction(&scene->_sequenceManager, scene, 7010, &_globals->_player, &scene->_object1, 0, 0);
- } else {
- scene->_sceneMode = 7015;
- scene->setAction(&scene->_sequenceManager, scene, 7017, &_globals->_player, 0, 0);
- }
+
+ if ((RING_INVENTORY._waldos._sceneNumber != 7000) && (RING_INVENTORY._jar._sceneNumber != 7000)) {
+ scene->_sceneMode = 7004;
+ scene->setAction(&scene->_sequenceManager, scene, 7004, &_globals->_player, this, NULL);
+ } else if (RING_INVENTORY._waldos._sceneNumber != 7000) {
+ scene->_sceneMode = 7011;
+ scene->setAction(&scene->_sequenceManager, scene, 7010, &_globals->_player, &scene->_object1, NULL);
+ } else if (RING_INVENTORY._jar._sceneNumber != 7000) {
+ scene->_sceneMode = 7012;
+ scene->setAction(&scene->_sequenceManager, scene, 7010, &_globals->_player, &scene->_object1, NULL);
} else {
- if (RING_INVENTORY._jar._sceneNumber == 7000) {
- scene->_sceneMode = 7011;
- scene->setAction(&scene->_sequenceManager, scene, 7010, &_globals->_player, &scene->_object1, 0, 0);
- } else {
- scene->_sceneMode = 7004;
- scene->setAction(&scene->_sequenceManager, scene, 7004, &_globals->_player, this, 0, 0);
- }
+ scene->_sceneMode = 7015;
+ scene->setAction(&scene->_sequenceManager, scene, 7017, &_globals->_player, NULL);
}
break;
case OBJECT_WALDOS:
@@ -378,30 +383,31 @@ void Scene7000::Object1::doAction(int action) {
if (RING_INVENTORY._translator._sceneNumber == 7000) {
if (RING_INVENTORY._jar._sceneNumber == 7000) {
scene->_sceneMode = 7015;
- scene->setAction(&scene->_sequenceManager, scene, 7015, &_globals->_player, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7015, &_globals->_player, NULL);
} else {
scene->_sceneMode = 7006;
- scene->setAction(&scene->_sequenceManager, scene, 7006, &_globals->_player, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7006, &_globals->_player, NULL);
}
} else {
scene->_sceneMode = 7009;
- scene->setAction(&scene->_sequenceManager, scene, 7009, &_globals->_player, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7009, &_globals->_player, NULL);
}
break;
case OBJECT_JAR:
_globals->_player.disableControl();
RING_INVENTORY._jar._sceneNumber = 7000;
+
if (RING_INVENTORY._translator._sceneNumber == 7000) {
- if (RING_INVENTORY._waldos._sceneNumber == 7000) {
+ if (RING_INVENTORY._waldos._sceneNumber != 7000) {
scene->_sceneMode = 7007;
- scene->setAction(&scene->_sequenceManager, scene, 7007, &_globals->_player, &scene->_object1, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7007, &_globals->_player, &scene->_object1, NULL);
} else {
scene->_sceneMode = 7015;
- scene->setAction(&scene->_sequenceManager, scene, 7016, &_globals->_player, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7016, &_globals->_player, NULL);
}
} else {
scene->_sceneMode = 7008;
- scene->setAction(&scene->_sequenceManager, scene, 7008, &_globals->_player, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7008, &_globals->_player, NULL);
}
break;
case CURSOR_LOOK:
@@ -412,7 +418,7 @@ void Scene7000::Object1::doAction(int action) {
break;
case CURSOR_USE:
if (_globals->getFlag(81)) {
- RING_INVENTORY._stasisBox._sceneNumber = 1;
+ RING_INVENTORY._stasisBox2._sceneNumber = 1;
_globals->_player.disableControl();
scene->setAction(&scene->_action5);
} else {
@@ -421,7 +427,7 @@ void Scene7000::Object1::doAction(int action) {
break;
case CURSOR_TALK:
if (_globals->getFlag(81)) {
- RING_INVENTORY._stasisBox._sceneNumber = 1;
+ RING_INVENTORY._stasisBox2._sceneNumber = 1;
_globals->_player.disableControl();
scene->setAction(&scene->_action5);
} else if (_globals->getFlag(52)) {
@@ -450,8 +456,8 @@ void Scene7000::dispatch() {
if (_globals->_sceneRegions.indexOf(_globals->_player._position) == 8) {
if (!_globals->getFlag(13)) {
_globals->_player.disableControl();
- _globals->_player.addMover(0);
- SceneItem::display(7000, 3, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
+ _globals->_player.addMover(NULL);
+ SceneItem::display2(7000, 3);
_sceneMode = 7001;
setAction(&scene->_sequenceManager, this, 7001, &_globals->_player, NULL);
} else if (!_globals->getFlag(52)) {
@@ -459,7 +465,7 @@ void Scene7000::dispatch() {
} else {
_globals->_player.disableControl();
_sceneMode = 7003;
- setAction(&scene->_sequenceManager, this, 7003, &_globals->_player, 0);
+ setAction(&scene->_sequenceManager, this, 7003, &_globals->_player, NULL);
}
}
if (_globals->_sceneRegions.indexOf(_globals->_player._position) == 9)
@@ -486,39 +492,38 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
_object5.postInit();
_object5.setVisage(7001);
_object5.setStrip2(1);
- _object5.animate(ANIM_MODE_2, 0);
+ _object5.animate(ANIM_MODE_2, NULL);
_object5.setPosition(Common::Point(49, 147), 0);
- _object5.setPriority2(1);
+ _object5.fixPriority(1);
_object6.postInit();
_object6.setVisage(7001);
_object6.setStrip2(2);
- _object6.animate(ANIM_MODE_2, 0);
+ _object6.animate(ANIM_MODE_2, NULL);
_object6.setPosition(Common::Point(160, 139), 0);
- _object6.setPriority2(1);
+ _object6.fixPriority(1);
_object7.postInit();
_object7.setVisage(7001);
_object7.setStrip2(3);
- _object7.animate(ANIM_MODE_2, 0);
+ _object7.animate(ANIM_MODE_2, NULL);
_object7.setPosition(Common::Point(272, 129), 0);
- _object7.setPriority2(1);
+ _object7.fixPriority(1);
_object8.postInit();
_object8.setVisage(7001);
_object8.setStrip2(4);
- _object8.animate(ANIM_MODE_2, 0);
+ _object8.animate(ANIM_MODE_2, NULL);
_object8.setPosition(Common::Point(176, 175), 0);
- _object8.setPriority2(1);
+ _object8.fixPriority(1);
if (_globals->getFlag(72)) {
_object3.postInit();
_object3.setVisage(5001);
_object3.setStrip2(1);
- _object3.animate(ANIM_MODE_2, 0);
_object3.setPosition(Common::Point(107, 92), 0);
_object3.changeZoom(100);
- _object3.setPriority2(10);
+ _object3.fixPriority(10);
_object1.postInit();
_object1.setVisage(7003);
@@ -529,24 +534,25 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
_object1.setPosition(Common::Point(87, 129), 0);
_object1._numFrames = 4;
_object1.changeZoom(45);
- _object1.animate(ANIM_MODE_8, 0, 0);
- _globals->_sceneItems.addItems(&_object1, 0);
+ _object1.animate(ANIM_MODE_8, 0, NULL);
+ _globals->_sceneItems.push_back(&_object1);
}
_soundHandler.startSound(251);
if (_globals->_sceneManager._previousScene == 2100) {
if (_globals->getFlag(72)) {
_globals->_player.postInit();
_globals->_player.setVisage(0);
- _globals->_player.animate(ANIM_MODE_1, 0);
+ _globals->_player.animate(ANIM_MODE_1, NULL);
SceneObjectWrapper *wrapper = new SceneObjectWrapper();
_globals->_player.setObjectWrapper(wrapper);
_globals->_player.setPosition(Common::Point(57, 94), 0);
_globals->_player.changeZoom(-1);
- _globals->_player.setPriority2(10);
+ _globals->_player.fixPriority(10);
if (_globals->getFlag(81)) {
setAction(&_action4);
} else {
_object1.setPosition(Common::Point(151, 182), 0);
+ _object1.changeZoom(100);
setAction(&_action1);
}
} else {
@@ -556,7 +562,7 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
_object3.postInit();
_object3.setVisage(5001);
_object3.setStrip2(1);
- _object3.animate(ANIM_MODE_1, 0);
+ _object3.animate(ANIM_MODE_1, NULL);
_object3.setPosition(Common::Point(307, 0), 0);
_object3.changeZoom(-1);
setAction(&_action3);
@@ -564,12 +570,11 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
} else if (_globals->_sceneManager._previousScene == 2280) {
_globals->_player.postInit();
_globals->_player.setVisage(2170);
- _globals->_player.animate(ANIM_MODE_1, 0);
- SceneObjectWrapper *wrapper = new SceneObjectWrapper();
- _globals->_player.setObjectWrapper(wrapper);
+ _globals->_player.animate(ANIM_MODE_1, NULL);
+ _globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.setPosition(Common::Point(57, 94), 0);
_globals->_player.changeZoom(-1);
- _globals->_player.setPriority2(10);
+ _globals->_player.fixPriority(10);
_globals->_player.disableControl();
_sceneMode = 7001;
setAction(&_action6, this);
@@ -587,7 +592,7 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
_globals->_player.setObjectWrapper(wrapper);
_globals->_player.setPosition(Common::Point(57, 94), 0);
_globals->_player.changeZoom(-1);
- _globals->_player.setPriority2(10);
+ _globals->_player.fixPriority(10);
_sceneMode = 7001;
setAction(&_action6, this);
} else {
@@ -602,6 +607,9 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
_globals->_soundHandler.startSound(250);
setAction(&_action3);
}
+
+ _sceneItem1.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
+ _globals->_sceneItems.push_back(&_sceneItem1);
}
/*--------------------------------------------------------------------------*/
@@ -612,6 +620,10 @@ void Scene7000::signal() {
case 7001:
case 7002:
case 7004:
+ case 7005:
+ case 7006:
+ case 7007:
+ case 7008:
case 7009:
_globals->_player.enableControl();
break;
@@ -709,7 +721,7 @@ void Scene7100::Action5::signal() {
}
case 3: {
scene->_object9.setStrip2(2);
- scene->_object9.setPriority2(180);
+ scene->_object9.fixPriority(180);
Common::Point pt(8, 181);
NpcMover *mover = new NpcMover();
scene->_object9.addMover(mover, &pt, this);
@@ -728,13 +740,13 @@ void Scene7100::Action6::signal() {
switch (_actionIndex++) {
case 0:
setDelay(1);
- scene->_object10.setPriority2(8);
+ scene->_object10.fixPriority(8);
scene->_object10.setPosition(Common::Point(155, 187), 0);
- scene->_object11.setPriority2(8);
+ scene->_object11.fixPriority(8);
scene->_object11.setPosition(Common::Point(155, 190), 0);
- scene->_object12.setPriority2(8);
+ scene->_object12.fixPriority(8);
scene->_object12.setPosition(Common::Point(151, 193), 0);
break;
case 1: {
@@ -758,13 +770,13 @@ void Scene7100::Action6::signal() {
scene->_object10.addMover(mover1, &pt1, this);
scene->_object11.setStrip2(6);
- scene->_object11.setPriority2(50);
+ scene->_object11.fixPriority(50);
Common::Point pt2(89, 185);
NpcMover *mover2 = new NpcMover();
scene->_object11.addMover(mover2, &pt2, 0);
scene->_object12.setStrip2(6);
- scene->_object12.setPriority2(50);
+ scene->_object12.fixPriority(50);
Common::Point pt3(87, 183);
NpcMover *mover3 = new NpcMover();
scene->_object12.addMover(mover3, &pt3, 0);
@@ -919,7 +931,7 @@ void Scene7100::Action9::signal() {
}
case 2: {
scene->_object24.setStrip2(2);
- scene->_object24.setPriority2(160);
+ scene->_object24.fixPriority(160);
Common::Point pt(34, 159);
NpcMover *mover = new NpcMover();
scene->_object24.addMover(mover, &pt, this);
@@ -934,7 +946,7 @@ void Scene7100::Action9::signal() {
}
case 4: {
scene->_object24.setStrip2(2);
- scene->_object24.setPriority2(180);
+ scene->_object24.fixPriority(180);
Common::Point pt(-12, 182);
NpcMover *mover = new NpcMover();
scene->_object24.addMover(mover, &pt, this);
@@ -1006,7 +1018,7 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_object2.animate(ANIM_MODE_2, 0);
_object2.setPosition(Common::Point(10, 140), 0);
_object2._numFrames = 1;
- _object2.setPriority2(180);
+ _object2.fixPriority(180);
_object2.setAction(&_action1, 0);
_object3.postInit();
@@ -1014,7 +1026,7 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_object3.animate(ANIM_MODE_2, 0);
_object3.setPosition(Common::Point(34, 115), 0);
_object3._numFrames = 1;
- _object3.setPriority2(180);
+ _object3.fixPriority(180);
_object3.setAction(&_action2, 0);
_object4.postInit();
@@ -1022,7 +1034,7 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_object4.animate(ANIM_MODE_2, 0);
_object4.setPosition(Common::Point(-10, 159), 0);
_object4._numFrames = 2;
- _object4.setPriority2(250);
+ _object4.fixPriority(250);
_object4.setAction(&_action3, 0);
_object5.postInit();
@@ -1038,7 +1050,7 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_object9.animate(ANIM_MODE_2, 0);
_object9.setPosition(Common::Point(110, 168), 0);
_object9._numFrames = 2;
- _object9.setPriority2(16);
+ _object9.fixPriority(16);
_object9.setAction(&_action5, 0);
_object13.postInit();
@@ -1047,7 +1059,7 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_object13.animate(ANIM_MODE_2, 0);
_object13.setPosition(Common::Point(524, 104), 0);
_object13._numFrames = 5;
- _object13.setPriority2(250);
+ _object13.fixPriority(250);
_object13.setAction(&_action7, 0);
_object17.postInit();
@@ -1084,7 +1096,7 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_object24.animate(ANIM_MODE_2, 0);
_object24.setPosition(Common::Point(-12, 182), 0);
_object24._numFrames = 4;
- _object24.setPriority2(180);
+ _object24.fixPriority(180);
_object24.setAction(&_action9, 0);
_object25.postInit();
@@ -1092,7 +1104,7 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_object25.animate(ANIM_MODE_2, 0);
_object25.setPosition(Common::Point(551, 145), 0);
_object25._numFrames = 5;
- _object25.setPriority2(160);
+ _object25.fixPriority(160);
_object25.setAction(&_action10, 0);
// Swimmer 1
@@ -1102,7 +1114,7 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_globals->_player._moveDiff.x = 4;
_globals->_player._moveDiff.y = 2;
_globals->_player.setPosition(Common::Point(135, 135), 0);
- _globals->_player.setPriority2(200);
+ _globals->_player.fixPriority(200);
_globals->_player.disableControl();
// Swimmer 2
@@ -1158,9 +1170,9 @@ void Scene7200::Action2::signal() {
setDelay(3);
break;
case 1: {
- scene->_object2.setPriority2(25);
- scene->_object3.setPriority2(25);
- scene->_object4.setPriority2(25);
+ scene->_object2.fixPriority(25);
+ scene->_object3.fixPriority(25);
+ scene->_object4.fixPriority(25);
scene->_object2.setStrip(1);
scene->_object3.setStrip(1);
scene->_object4.setStrip(1);
@@ -1176,9 +1188,9 @@ void Scene7200::Action2::signal() {
break;
}
case 2: {
- scene->_object2.setPriority2(160);
- scene->_object3.setPriority2(160);
- scene->_object4.setPriority2(160);
+ scene->_object2.fixPriority(160);
+ scene->_object3.fixPriority(160);
+ scene->_object4.fixPriority(160);
scene->_object2.setStrip(2);
scene->_object3.setStrip(2);
scene->_object4.setStrip(2);
@@ -1323,7 +1335,7 @@ void Scene7300::Action1::signal() {
break;
case 7:
setDelay(3);
- _globals->_soundHandler.proc1(0);
+ _globals->_soundHandler.proc1(NULL);
break;
case 8:
_globals->_sceneManager.changeScene(2280);
@@ -1342,7 +1354,7 @@ void Scene7300::Action2::signal() {
break;
case 1:
NpcMover *mover1 = new NpcMover();
- Common::Point pt(_globals->_randomSource.getRandomNumber(203), _globals->_randomSource.getRandomNumber(96));
+ Common::Point pt(_globals->_randomSource.getRandomNumber(3) + 203, _globals->_randomSource.getRandomNumber(3) + 96);
scene->_object3.addMover(mover1, &pt, this);
_actionIndex = 0;
break;
@@ -1360,7 +1372,7 @@ void Scene7300::Action3::signal() {
break;
case 1:
NpcMover *mover1 = new NpcMover();
- Common::Point pt(_globals->_randomSource.getRandomNumber(76), _globals->_randomSource.getRandomNumber(78));
+ Common::Point pt(_globals->_randomSource.getRandomNumber(5) + 76, _globals->_randomSource.getRandomNumber(5) + 78);
scene->_object1.addMover(mover1, &pt, this);
_actionIndex = 0;
break;
@@ -1446,7 +1458,7 @@ void Scene7300::postInit(SceneObjectList *OwnerList) {
_object2.setStrip(2);
_object2.animate(ANIM_MODE_2, 0);
_object2.setPosition(Common::Point(77, 47), 0);
- _object2.setPriority2(190);
+ _object2.fixPriority(190);
_object5.postInit();
_object5.setVisage(7300);
@@ -1530,41 +1542,41 @@ void Scene7600::postInit(SceneObjectList *OwnerList) {
_object2.postInit();
_object2.setVisage(7601);
_object2.setStrip(1);
- _object2.animate(ANIM_MODE_2, 0);
+ _object2.animate(ANIM_MODE_2, NULL);
_object2.setPosition(Common::Point(48, 135));
- _object2.setPriority2(1);
+ _object2.fixPriority(1);
_object3.postInit();
_object3.setVisage(7601);
_object3.setStrip(2);
- _object3.animate(ANIM_MODE_2, 0);
+ _object3.animate(ANIM_MODE_2, NULL);
_object3.setPosition(Common::Point(158, 136));
- _object3.setPriority2(1);
+ _object3.fixPriority(1);
_object4.postInit();
_object4.setVisage(7601);
_object4.setStrip(3);
- _object4.animate(ANIM_MODE_2, 0);
+ _object4.animate(ANIM_MODE_2, NULL);
_object4.setPosition(Common::Point(293, 141));
- _object4.setPriority2(1);
+ _object4.fixPriority(1);
_object5.postInit();
_object5.setVisage(7601);
_object5.setStrip(4);
- _object5.animate(ANIM_MODE_2, 0);
+ _object5.animate(ANIM_MODE_2, NULL);
_object5.setPosition(Common::Point(405, 143));
- _object5.setPriority2(1);
+ _object5.fixPriority(1);
_object6.postInit();
_object6.setVisage(7601);
_object6.setStrip(5);
- _object6.animate(ANIM_MODE_2, 0);
+ _object6.animate(ANIM_MODE_2, NULL);
_object6.setPosition(Common::Point(379, 191));
- _object6.setPriority2(1);
+ _object6.fixPriority(1);
_globals->_player.postInit();
_globals->_player.setVisage(2333);
- _globals->_player.animate(ANIM_MODE_1, 0);
+ _globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.setStrip(1);
_globals->_player._moveDiff = Common::Point(16, 16);
@@ -1770,7 +1782,7 @@ void Scene7700::SceneHotspot3::doAction(int action) {
} else if (RING_INVENTORY._key._sceneNumber == 7700) {
_globals->_player.disableControl();
scene->_sceneMode = 7705;
- scene->setAction(&scene->_sequenceManager, scene, 7705, &_globals->_player, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7705, &_globals->_player, NULL);
}
break;
default:
@@ -2036,27 +2048,26 @@ void Scene7700::Object8::doAction(int action) {
scene->_object9.setVisage(7701);
scene->_object9.setStrip2(3);
scene->_object9.setPosition(Common::Point(91, 166), 0);
- scene->_object9.setPriority2(200);
+ scene->_object9.fixPriority(200);
scene->_object14.postInit();
scene->_object14.setVisage(7701);
scene->_object14.setStrip(2);
- scene->_object14.setPriority2(250);
+ scene->_object14.fixPriority(250);
scene->_object14.setPosition(Common::Point(139, 151), 0);
scene->_gfxButton.setText(EXIT_MSG);
scene->_gfxButton._bounds.center(140, 189);
scene->_gfxButton.draw();
- scene->_gfxButton._bounds.expandPanes();
- _globals->_sceneItems.push_front(&scene->_object10);
+ _globals->_sceneItems.push_front(&scene->_sceneItem10);
_globals->_sceneItems.push_front(&scene->_object9);
_globals->_player._canWalk = false;
- } else {
+ } else if (_globals->getFlag(78)) {
scene->_object15.postInit();
scene->_object15.setVisage(7701);
scene->_object15.setPosition(Common::Point(140, 165), 0);
- scene->_object15.setPriority2(200);
+ scene->_object15.fixPriority(200);
scene->_gfxButton.setText(EXIT_MSG);
scene->_gfxButton._bounds.center(140, 186);
@@ -2068,11 +2079,13 @@ void Scene7700::Object8::doAction(int action) {
scene->_object19.setStrip(6);
scene->_object19.setPosition(Common::Point(140, 192), 0);
- _globals->_sceneItems.push_front(&scene->_object10);
- _globals->_sceneItems.push_front(&scene->_object8);
- _globals->_sceneItems.push_front(&scene->_object9);
+ _globals->_sceneItems.push_front(&scene->_sceneItem10);
+ _globals->_sceneItems.push_front(&scene->_sceneHotspot8);
+ _globals->_sceneItems.push_front(&scene->_sceneHotspot9);
_globals->_events.setCursor(CURSOR_WALK);
_globals->_player._canWalk = false;
+ } else {
+ scene->setAction(&scene->_sequenceManager, scene, 7715, NULL);
}
} else {
SceneHotspot::doAction(action);
@@ -2100,7 +2113,7 @@ void Scene7700::Object9::doAction(int action) {
scene->_object10.setStrip(4);
scene->_object10.setPosition(Common::Point(159, 136));
_globals->_sceneItems.push_front(&scene->_object10);
- scene->_object10.setPriority2(240);
+ scene->_object10.fixPriority(240);
}
scene->_soundHandler.startSound(262);
scene->_object14.animate(ANIM_MODE_5, 0);
@@ -2118,6 +2131,8 @@ void Scene7700::Object10::doAction(int action) {
if (action == CURSOR_LOOK) {
SceneItem::display(7700, 50, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
} else if (action == CURSOR_USE) {
+ _globals->_player._canWalk = true;
+ RING_INVENTORY._translator._sceneNumber = 1;
_globals->setFlag(80);
scene->_sceneItem10.remove();
scene->_gfxButton._bounds.expandPanes();
@@ -2188,7 +2203,7 @@ void Scene7700::Object12::doAction(int action) {
void Scene7700::signal() {
switch (_sceneMode) {
case 7701:
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.setStrip2(-1);
if (_globals->getFlag(78)) {
_globals->_player.enableControl();
@@ -2216,10 +2231,13 @@ void Scene7700::signal() {
_globals->_player.enableControl();
break;
case 7705:
- case 7708:
RING_INVENTORY._key._sceneNumber = 1;
_globals->_player.enableControl();
break;
+ case 7708:
+ RING_INVENTORY._paper._sceneNumber = 1;
+ _globals->_player.enableControl();
+ break;
case 7709:
_globals->_events.setCursor(CURSOR_USE);
break;
@@ -2242,8 +2260,8 @@ void Scene7700::process(Event &event) {
if (contains<SceneItem *>(_globals->_sceneItems, &_sceneItem10)) {
if (_gfxButton.process(event)) {
_sceneItem10.remove();
- _sceneHotspot15.remove();
- _sceneHotspot9.remove();
+ _object15.remove();
+ _object9.remove();
if (_globals->_sceneObjects->contains(&_object10))
_object10.remove();
if (_globals->_sceneObjects->contains(&_object14))
@@ -2259,7 +2277,7 @@ void Scene7700::process(Event &event) {
_easterEgg1.postInit();
_easterEgg1.setVisage(7708);
_easterEgg1.setPosition(Common::Point(163, 50), 0);
- _easterEgg1.setPriority2(1);
+ _easterEgg1.fixPriority(1);
_easterEgg1.animate(ANIM_MODE_2, 0);
_easterEgg1.setAction(&_action6);
}
@@ -2301,7 +2319,7 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_globals->_player.setObjectWrapper(wrapper);
_globals->_player.setPosition(Common::Point(-19, 68), 0);
_globals->_player.setStrip2(7);
- _globals->_player.setPriority2(95);
+ _globals->_player.fixPriority(95);
_globals->_player.changeZoom(80);
_globals->_player._moveDiff.x = 6;
_globals->_player._moveDiff.y = 3;
@@ -2312,7 +2330,7 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
if (_globals->getFlag(78)) {
_prof.setStrip2(4);
- _prof.setPriority2(80);
+ _prof.fixPriority(80);
_prof.setPosition(Common::Point(159, 87), 0);
} else {
_prof.setPosition(Common::Point(203, 87), 0);
@@ -2324,7 +2342,7 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_cloud.postInit();
_cloud.setVisage(7700);
_cloud.setStrip2(5);
- _cloud.setPriority2(1);
+ _cloud.fixPriority(1);
_cloud.setPosition(Common::Point(133, 160), 0);
_cloud._moveDiff.x = 1;
_cloud._moveRate = 7;
@@ -2339,7 +2357,7 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_object2.postInit();
_object2.setVisage(7700);
_object2.setPosition(Common::Point(184, 70), 0);
- _object2.setPriority2(60);
+ _object2.fixPriority(60);
_object2._lookLineNum = 19;
_object2._defltLineNum = 17;
@@ -2358,7 +2376,7 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_object5.postInit();
_object5.setVisage(7700);
_object5.setPosition(Common::Point(268, 67), 0);
- _object5.setPriority2(58);
+ _object5.fixPriority(58);
_object5.setStrip2(3);
_object5._lookLineNum = 38;
_object5._defltLineNum = 36;
@@ -2366,7 +2384,7 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_object6.postInit();
_object6.setVisage(7700);
_object6.setPosition(Common::Point(268, 75), 0);
- _object6.setPriority2(57);
+ _object6.fixPriority(57);
_object6.setStrip2(4);
_object6._lookLineNum = 40;
_object6._defltLineNum = 43;
@@ -2375,7 +2393,7 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_object8.setVisage(7703);
_object8.setPosition(Common::Point(203, 91), 0);
_object8.setStrip2(4);
- _object8.setPriority2(86);
+ _object8.fixPriority(86);
_sceneHotspot8.setBounds(82, 141, 161, 92);
_sceneHotspot9.setBounds(82, 187, 161, 141);
@@ -2420,8 +2438,8 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_sceneHotspot15._useLineNum = 6;
_sceneHotspot15._lookLineNum = 7;
_sceneHotspot16.setBounds(0, 130, 34, 103);
- _sceneHotspot16._useLineNum = 8;
- _sceneHotspot16._lookLineNum = 9;
+ _sceneHotspot16._useLineNum = 7;
+ _sceneHotspot16._lookLineNum = 8;
_sceneHotspot17.setBounds(41, 180, 46, 170);
_sceneHotspot17._useLineNum = 11;
_sceneHotspot17._lookLineNum = 13;
diff --git a/engines/tsage/ringworld_scenes8.h b/engines/tsage/ringworld_scenes8.h
index 0c39920614..e40f3d4133 100644
--- a/engines/tsage/ringworld_scenes8.h
+++ b/engines/tsage/ringworld_scenes8.h
@@ -41,6 +41,7 @@ public:
NamedHotspotMult() : SceneHotspot() {}
virtual Common::String getClassName() { return "NamedHotspotMult"; }
+ virtual void synchronise(Serialiser &s);
};
class SceneObject7700 : public SceneObjectExt {
@@ -107,7 +108,7 @@ public:
SpeakerQL _speakerQL;
SpeakerQR _speakerQR;
SpeakerQText _speakerQText;
- SceneObject _object1;
+ Object1 _object1;
SceneObject _object2;
SceneObject _object3;
SceneObject _object4;
diff --git a/engines/tsage/saveload.cpp b/engines/tsage/saveload.cpp
index 8b07767f22..317bc4bbb7 100644
--- a/engines/tsage/saveload.cpp
+++ b/engines/tsage/saveload.cpp
@@ -24,6 +24,7 @@
*/
#include "common/savefile.h"
+#include "graphics/palette.h"
#include "graphics/scaler.h"
#include "graphics/thumbnail.h"
#include "tsage/globals.h"
diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp
index e316a601fb..9a99049c19 100644
--- a/engines/tsage/scenes.cpp
+++ b/engines/tsage/scenes.cpp
@@ -114,10 +114,15 @@ void SceneManager::sceneChange() {
assert(_objectCount == _saver->getObjectCount());
}
_objectCount = _saver->getObjectCount();
+ _globals->_sceneHandler._delayTicks = 2;
// Instantiate and set the new scene
_scene = getNewScene();
- _scene->postInit();
+
+ if (!_saver->getMacroRestoreFlag())
+ _scene->postInit();
+ else
+ _scene->loadScene(_sceneNumber);
}
Scene *SceneManager::getNewScene() {
@@ -289,7 +294,7 @@ void Scene::loadScene(int sceneNum) {
}
void Scene::loadSceneData(int sceneNum) {
- _globals->_sceneManager._scene->_activeScreenNumber = sceneNum;
+ _activeScreenNumber = sceneNum;
// Get the basic scene size
byte *data = _resourceManager->getResource(RES_BITMAP, sceneNum, 9999);
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index 7c8325d53e..63e753104e 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -23,8 +23,6 @@
*
*/
-#include "common/config-manager.h"
-#include "common/endian.h"
#include "tsage/core.h"
#include "tsage/globals.h"
#include "tsage/debugger.h"
diff --git a/engines/tsage/staticres.cpp b/engines/tsage/staticres.cpp
index 46b75e30ea..bc85718035 100644
--- a/engines/tsage/staticres.cpp
+++ b/engines/tsage/staticres.cpp
@@ -114,4 +114,7 @@ const char *SCENE6100_SWEAT = "Humans sweat, Kzin twitch their tail. What's the
const char *SCENE6100_VERY_WELL = "Very well. I will retrieve the stasis box and return the probe. \
Wait for it's return in the lander bay.";
+const char *DEMO_HELP_MSG = " Help...\rF2 - Sound Options\rF3 - Exit demo\r\rPress ENTER\rto continue";
+const char *DEMO_PAUSED_MSG = " demo is paused";
+
} // End of namespace tSage
diff --git a/engines/tsage/staticres.h b/engines/tsage/staticres.h
index cb62272735..0db349f8a7 100644
--- a/engines/tsage/staticres.h
+++ b/engines/tsage/staticres.h
@@ -79,6 +79,10 @@ extern const char *SCENE6100_SURPRISE;
extern const char *SCENE6100_SWEAT;
extern const char *SCENE6100_VERY_WELL;
+// Demo messages
+extern const char *DEMO_HELP_MSG;
+extern const char *DEMO_PAUSED_MSG;
+
} // End of namespace tSage
#endif
diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp
index 16756f59fa..d6f07c999b 100644
--- a/engines/tsage/tsage.cpp
+++ b/engines/tsage/tsage.cpp
@@ -23,11 +23,7 @@
*
*/
-#include "common/config-manager.h"
-#include "common/debug.h"
#include "common/debug-channels.h"
-#include "common/system.h"
-#include "common/savefile.h"
#include "engines/util.h"
#include "tsage/tsage.h"
@@ -94,8 +90,6 @@ Common::Error TSageEngine::run() {
// Basic initialisation
initialise();
- _globals->_events.showCursor();
-
_globals->_sceneHandler.registerHandler();
_globals->_game->execute();