diff options
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/core.cpp | 228 | ||||
-rw-r--r-- | engines/tsage/core.h | 53 | ||||
-rw-r--r-- | engines/tsage/debugger.cpp | 70 | ||||
-rw-r--r-- | engines/tsage/detection.cpp | 4 | ||||
-rw-r--r-- | engines/tsage/detection_tables.h | 14 | ||||
-rw-r--r-- | engines/tsage/dialogs.cpp | 17 | ||||
-rw-r--r-- | engines/tsage/globals.cpp | 13 | ||||
-rw-r--r-- | engines/tsage/globals.h | 4 | ||||
-rw-r--r-- | engines/tsage/graphics.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld_demo.cpp | 58 | ||||
-rw-r--r-- | engines/tsage/ringworld_demo.h | 52 | ||||
-rw-r--r-- | engines/tsage/ringworld_logic.cpp | 238 | ||||
-rw-r--r-- | engines/tsage/ringworld_logic.h | 71 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes1.cpp | 28 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes10.cpp | 100 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes3.cpp | 54 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes5.cpp | 160 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes6.cpp | 36 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes8.cpp | 44 | ||||
-rw-r--r-- | engines/tsage/tsage.cpp | 5 | ||||
-rw-r--r-- | engines/tsage/tsage.h | 1 |
21 files changed, 729 insertions, 523 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 5aa33b5467..776e449c87 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -24,10 +24,7 @@ */ #include "common/system.h" -#include "common/config-manager.h" -#include "common/translation.h" #include "engines/engine.h" -#include "gui/saveload.h" #include "tsage/tsage.h" #include "tsage/core.h" #include "tsage/dialogs.h" @@ -71,76 +68,7 @@ void InvObject::setCursor() { /*--------------------------------------------------------------------------*/ -InvObjectList::InvObjectList() : - _stunner(2280, 1, 2, OBJECT_STUNNER, "This is your stunner."), - _scanner(1, 1, 3, OBJECT_SCANNER, "A combination scanner comm unit."), - _stasisBox(5200, 1, 4, OBJECT_STASIS_BOX, "A stasis box."), - _infoDisk(40, 1, 1, OBJECT_INFODISK, "The infodisk you took from the assassin."), - _stasisNegator(0, 2, 2, OBJECT_STASIS_NEGATOR, "The stasis field negator."), - _keyDevice(4250, 1, 6, OBJECT_KEY_DEVICE, "A magnetic key device."), - _medkit(2280, 1, 7, OBJECT_MEDKIT, "Your medkit."), - _ladder(4100, 1, 8, OBJECT_LADDER, "The chief's ladder."), - _rope(4150, 1, 9, OBJECT_ROPE, "The chief's rope."), - _key(7700, 1, 11, OBJECT_KEY, "A key."), - _translator(7700, 1, 13, OBJECT_TRANSLATOR, "The dolphin translator box."), - _ale(2150, 1, 10, OBJECT_ALE, "A bottle of ale."), - _paper(7700, 1, 12, OBJECT_PAPER, "A slip of paper with the numbers 2,4, and 3 written on it."), - _waldos(0, 1, 14, OBJECT_WALDOS, "A pair of waldos from the ruined probe."), - _stasisBox2(8100, 1, 4, OBJECT_STASIS_BOX2, "A stasis box."), - _ring(8100, 2, 5, OBJECT_RING, "This is a signet ring sent to you by Louis Wu."), - _cloak(9850, 2, 6, OBJECT_CLOAK, "A fine silk cloak."), - _tunic(9450, 2, 7, OBJECT_TUNIC, "The patriarch's soiled tunic."), - _candle(9500, 2, 8, OBJECT_CANDLE, "A tallow candle."), - _straw(9400, 2, 9, OBJECT_STRAW, "Clean, dry straw."), - _scimitar(9850, 1, 18, OBJECT_SCIMITAR, "A scimitar from the Patriarch's closet."), - _sword(9850, 1, 17, OBJECT_SWORD, "A short sword from the Patriarch's closet."), - _helmet(9500, 2, 4, OBJECT_HELMET, "Some type of helmet."), - _items(4300, 2, 10, OBJECT_ITEMS, "Two interesting items from the Tnuctipun vessel."), - _concentrator(4300, 2, 11, OBJECT_CONCENTRATOR, "The Tnuctipun anti-matter concentrator contained in a stasis field."), - _nullifier(5200, 2, 12, OBJECT_NULLIFIER, "A purported neural wave nullifier."), - _peg(4045, 2, 16, OBJECT_PEG, "A peg with a symbol."), - _vial(5100, 2, 17, OBJECT_VIAL, "A vial of the bat creatures anti-pheromone drug."), - _jacket(9850, 3, 1, OBJECT_JACKET, "A natty padded jacket."), - _tunic2(9850, 3, 2, OBJECT_TUNIC2, "A very hairy tunic."), - _bone(5300, 3, 5, OBJECT_BONE, "A very sharp bone."), - _jar(7700, 3, 4, OBJECT_JAR, "An jar filled with a green substance."), - _emptyJar(7700, 3, 3, OBJECT_EMPTY_JAR, "An empty jar.") { - - // Add the items to the list - _itemList.push_back(&_stunner); - _itemList.push_back(&_scanner); - _itemList.push_back(&_stasisBox); - _itemList.push_back(&_infoDisk); - _itemList.push_back(&_stasisNegator); - _itemList.push_back(&_keyDevice); - _itemList.push_back(&_medkit); - _itemList.push_back(&_ladder); - _itemList.push_back(&_rope); - _itemList.push_back(&_key); - _itemList.push_back(&_translator); - _itemList.push_back(&_ale); - _itemList.push_back(&_paper); - _itemList.push_back(&_waldos); - _itemList.push_back(&_stasisBox2); - _itemList.push_back(&_ring); - _itemList.push_back(&_cloak); - _itemList.push_back(&_tunic); - _itemList.push_back(&_candle); - _itemList.push_back(&_straw); - _itemList.push_back(&_scimitar); - _itemList.push_back(&_sword); - _itemList.push_back(&_helmet); - _itemList.push_back(&_items); - _itemList.push_back(&_concentrator); - _itemList.push_back(&_nullifier); - _itemList.push_back(&_peg); - _itemList.push_back(&_vial); - _itemList.push_back(&_jacket); - _itemList.push_back(&_tunic2); - _itemList.push_back(&_bone); - _itemList.push_back(&_jar); - _itemList.push_back(&_emptyJar); - +InvObjectList::InvObjectList() { _selectedItem = NULL; } @@ -3376,7 +3304,7 @@ GameHandler::GameHandler() : EventHandler() { GameHandler::~GameHandler() { if (_globals) - _globals->_game.removeHandler(this); + _globals->_game->removeHandler(this); } void GameHandler::execute() { @@ -3402,7 +3330,7 @@ SceneHandler::SceneHandler() { void SceneHandler::registerHandler() { postInit(); - _globals->_game.addHandler(this); + _globals->_game->addHandler(this); } void SceneHandler::postInit(SceneObjectList *OwnerList) { @@ -3414,21 +3342,7 @@ void SceneHandler::postInit(SceneObjectList *OwnerList) { // TODO: Bunch of other scene related setup goes here _globals->_soundManager.postInit(); - // Set some default flags and cursor - _globals->setFlag(12); - _globals->setFlag(34); - _globals->_events.setCursor(CURSOR_WALK); - - // Set the screen to scroll in response to the player moving off-screen - _globals->_scrollFollower = &_globals->_player; - - // Set the object's that will be in the player's inventory by default - _globals->_inventory._stunner._sceneNumber = 1; - _globals->_inventory._scanner._sceneNumber = 1; - _globals->_inventory._ring._sceneNumber = 1; - - // Switch to the title screen - _globals->_sceneManager.setNewScene(1000); + _globals->_game->start(); } void SceneHandler::process(Event &event) { @@ -3452,19 +3366,19 @@ void SceneHandler::process(Event &event) { case Common::KEYCODE_F3: // F3 - Quit - _globals->_game.quitGame(); + _globals->_game->quitGame(); event.handled = false; break; case Common::KEYCODE_F4: // F4 - Restart - _globals->_game.restartGame(); + _globals->_game->restartGame(); _globals->_events.setCursorFromFlag(); break; case Common::KEYCODE_F7: // F7 - Restore - _globals->_game.restoreGame(); + _globals->_game->restoreGame(); _globals->_events.setCursorFromFlag(); break; @@ -3501,7 +3415,7 @@ void SceneHandler::process(Event &event) { // Separate check for F5 - Save key if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_F5)) { // F5 - Save - _globals->_game.saveGame(); + _globals->_game->saveGame(); event.handled = true; _globals->_events.setCursorFromFlag(); } @@ -3618,130 +3532,4 @@ void Game::execute() { } while (activeFlag && !_vm->getEventManager()->shouldQuit()); } -void Game::restartGame() { - if (MessageDialog::show(RESTART_MSG, CANCEL_BTN_STRING, RESTART_BTN_STRING) == 1) - _globals->_game.restart(); -} - -void Game::saveGame() { - if (_globals->getFlag(50)) - MessageDialog::show(SAVING_NOT_ALLOWED_MSG, OK_BTN_STRING); - else { - // Show the save dialog - handleSaveLoad(true, _globals->_sceneHandler._saveGameSlot, _globals->_sceneHandler._saveName); - } -} - -void Game::restoreGame() { - if (_globals->getFlag(50)) - MessageDialog::show(RESTORING_NOT_ALLOWED_MSG, OK_BTN_STRING); - else { - // Show the load dialog - handleSaveLoad(false, _globals->_sceneHandler._loadGameSlot, _globals->_sceneHandler._saveName); - } -} - -void Game::quitGame() { - if (MessageDialog::show(QUIT_CONFIRM_MSG, CANCEL_BTN_STRING, QUIT_BTN_STRING) == 1) - _vm->quitGame(); -} - -void Game::handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName) { - const EnginePlugin *plugin = 0; - EngineMan.findGame(_vm->getGameId(), &plugin); - GUI::SaveLoadChooser *dialog; - if (saveFlag) - dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save")); - else - dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load")); - - dialog->setSaveMode(saveFlag); - - saveSlot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); - saveName = dialog->getResultString(); - - delete dialog; -} - -void Game::restart() { - _globals->_scenePalette.clearListeners(); - _globals->_soundHandler.proc3(); - - // Reset the flags - _globals->reset(); - _globals->setFlag(34); - - // Clear save/load slots - _globals->_sceneHandler._saveGameSlot = -1; - _globals->_sceneHandler._loadGameSlot = -1; - - _globals->_stripNum = 0; - _globals->_events.setCursor(CURSOR_WALK); - - // Reset item properties - _globals->_inventory._stunner._sceneNumber = 1; - _globals->_inventory._scanner._sceneNumber = 1; - _globals->_inventory._stasisBox._sceneNumber = 5200; - _globals->_inventory._infoDisk._sceneNumber = 40; - _globals->_inventory._stasisNegator._sceneNumber = 0; - _globals->_inventory._keyDevice._sceneNumber = 0; - _globals->_inventory._medkit._sceneNumber = 2280; - _globals->_inventory._ladder._sceneNumber = 4100; - _globals->_inventory._rope._sceneNumber = 4150; - _globals->_inventory._key._sceneNumber = 7700; - _globals->_inventory._translator._sceneNumber = 2150; - _globals->_inventory._paper._sceneNumber = 7700; - _globals->_inventory._waldos._sceneNumber = 0; - _globals->_inventory._ring._sceneNumber = 1; - _globals->_inventory._stasisBox2._sceneNumber = 8100; - _globals->_inventory._cloak._sceneNumber = 9850; - _globals->_inventory._tunic._sceneNumber = 9450; - _globals->_inventory._candle._sceneNumber = 9500; - _globals->_inventory._straw._sceneNumber = 9400; - _globals->_inventory._scimitar._sceneNumber = 9850; - _globals->_inventory._sword._sceneNumber = 9850; - _globals->_inventory._helmet._sceneNumber = 9500; - _globals->_inventory._items._sceneNumber = 4300; - _globals->_inventory._concentrator._sceneNumber = 4300; - _globals->_inventory._nullifier._sceneNumber = 4300; - _globals->_inventory._peg._sceneNumber = 4045; - _globals->_inventory._vial._sceneNumber = 5100; - _globals->_inventory._jacket._sceneNumber = 9850; - _globals->_inventory._tunic2._sceneNumber = 9850; - _globals->_inventory._bone._sceneNumber = 5300; - _globals->_inventory._jar._sceneNumber = 7700; - _globals->_inventory._emptyJar._sceneNumber = 7700; - _globals->_inventory._selectedItem = NULL; - - // Change to the first game scene - _globals->_sceneManager.changeScene(30); -} - -void Game::endGame(int resNum, int lineNum) { - _globals->_events.setCursor(CURSOR_WALK); - Common::String msg = _resourceManager->getMessage(resNum, lineNum); - bool savesExist = _saver->savegamesExist(); - - if (!savesExist) { - // No savegames exist, so prompt the user to restart or quit - if (MessageDialog::show(msg, QUIT_BTN_STRING, RESTART_BTN_STRING) == 0) - _vm->quitGame(); - else - restart(); - } else { - // Savegames exist, so prompt for Restore/Restart - bool breakFlag; - do { - if (MessageDialog::show(msg, RESTART_BTN_STRING, RESTORE_BTN_STRING) == 0) { - breakFlag = true; - } else { - handleSaveLoad(false, _globals->_sceneHandler._loadGameSlot, _globals->_sceneHandler._saveName); - breakFlag = _globals->_sceneHandler._loadGameSlot > 0; - } - } while (!breakFlag); - } - - _globals->_events.setCursorFromFlag(); -} - } // End of namespace tSage diff --git a/engines/tsage/core.h b/engines/tsage/core.h index c18984fd45..51af41ec5c 100644 --- a/engines/tsage/core.h +++ b/engines/tsage/core.h @@ -73,43 +73,9 @@ public: class InvObjectList : public SavedObject { public: - InvObject _stunner; - InvObject _scanner; - InvObject _stasisBox; - InvObject _infoDisk; - InvObject _stasisNegator; - InvObject _keyDevice; - InvObject _medkit; - InvObject _ladder; - InvObject _rope; - InvObject _key; - InvObject _translator; - InvObject _ale; - InvObject _paper; - InvObject _waldos; - InvObject _stasisBox2; - InvObject _ring; - InvObject _cloak; - InvObject _tunic; - InvObject _candle; - InvObject _straw; - InvObject _scimitar; - InvObject _sword; - InvObject _helmet; - InvObject _items; - InvObject _concentrator; - InvObject _nullifier; - InvObject _peg; - InvObject _vial; - InvObject _jacket; - InvObject _tunic2; - InvObject _bone; - InvObject _jar; - InvObject _emptyJar; - SynchronisedList<InvObject *> _itemList; InvObject *_selectedItem; -public: + InvObjectList(); virtual Common::String getClassName() { return "InvObjectList"; } @@ -942,22 +908,23 @@ public: /*--------------------------------------------------------------------------*/ class Game { -private: +protected: SynchronisedList<GameHandler *> _handlers; static bool notLockedFn(GameHandler *g); - void restart(); - void handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName); + virtual void handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName) {} public: void addHandler(GameHandler *entry) { _handlers.push_back(entry); } void removeHandler(GameHandler *entry) { _handlers.remove(entry); } void execute(); - void restartGame(); - void saveGame(); - void restoreGame(); - void quitGame(); - void endGame(int resNum, int lineNum); + virtual void start() = 0; + virtual void restart() {} + virtual void restartGame() {} + virtual void saveGame() {} + virtual void restoreGame() {} + virtual void quitGame() {} + virtual void endGame(int resNum, int lineNum) {} }; } // End of namespace tSage diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp index ad4e76f61c..e8f0215e0e 100644 --- a/engines/tsage/debugger.cpp +++ b/engines/tsage/debugger.cpp @@ -28,7 +28,7 @@ #include "common/endian.h" #include "tsage/globals.h" #include "tsage/graphics.h" - +#include "tsage/ringworld_logic.h" namespace tSage { @@ -276,103 +276,103 @@ bool Debugger::Cmd_MoveObject(int argc, const char **argv) { switch (objNum) { case OBJECT_STUNNER: - _globals->_inventory._stunner._sceneNumber = sceneNum; + RING_INVENTORY._stunner._sceneNumber = sceneNum; break; case OBJECT_SCANNER: - _globals->_inventory._scanner._sceneNumber = sceneNum; + RING_INVENTORY._scanner._sceneNumber = sceneNum; break; case OBJECT_STASIS_BOX: - _globals->_inventory._stasisBox._sceneNumber = sceneNum; + RING_INVENTORY._stasisBox._sceneNumber = sceneNum; break; case OBJECT_INFODISK: - _globals->_inventory._infoDisk._sceneNumber = sceneNum; + RING_INVENTORY._infoDisk._sceneNumber = sceneNum; break; case OBJECT_STASIS_NEGATOR: - _globals->_inventory._stasisNegator._sceneNumber = sceneNum; + RING_INVENTORY._stasisNegator._sceneNumber = sceneNum; break; case OBJECT_KEY_DEVICE: - _globals->_inventory._keyDevice._sceneNumber = sceneNum; + RING_INVENTORY._keyDevice._sceneNumber = sceneNum; break; case OBJECT_MEDKIT: - _globals->_inventory._medkit._sceneNumber = sceneNum; + RING_INVENTORY._medkit._sceneNumber = sceneNum; break; case OBJECT_LADDER: - _globals->_inventory._ladder._sceneNumber = sceneNum; + RING_INVENTORY._ladder._sceneNumber = sceneNum; break; case OBJECT_ROPE: - _globals->_inventory._rope._sceneNumber = sceneNum; + RING_INVENTORY._rope._sceneNumber = sceneNum; break; case OBJECT_KEY: - _globals->_inventory._key._sceneNumber = sceneNum; + RING_INVENTORY._key._sceneNumber = sceneNum; break; case OBJECT_TRANSLATOR: - _globals->_inventory._translator._sceneNumber = sceneNum; + RING_INVENTORY._translator._sceneNumber = sceneNum; break; case OBJECT_ALE: - _globals->_inventory._ale._sceneNumber = sceneNum; + RING_INVENTORY._ale._sceneNumber = sceneNum; break; case OBJECT_PAPER: - _globals->_inventory._paper._sceneNumber = sceneNum; + RING_INVENTORY._paper._sceneNumber = sceneNum; break; case OBJECT_WALDOS: - _globals->_inventory._waldos._sceneNumber = sceneNum; + RING_INVENTORY._waldos._sceneNumber = sceneNum; break; case OBJECT_STASIS_BOX2: - _globals->_inventory._stasisBox2._sceneNumber = sceneNum; + RING_INVENTORY._stasisBox2._sceneNumber = sceneNum; break; case OBJECT_RING: - _globals->_inventory._ring._sceneNumber = sceneNum; + RING_INVENTORY._ring._sceneNumber = sceneNum; break; case OBJECT_CLOAK: - _globals->_inventory._cloak._sceneNumber = sceneNum; + RING_INVENTORY._cloak._sceneNumber = sceneNum; break; case OBJECT_TUNIC: - _globals->_inventory._tunic._sceneNumber = sceneNum; + RING_INVENTORY._tunic._sceneNumber = sceneNum; break; case OBJECT_CANDLE: - _globals->_inventory._candle._sceneNumber = sceneNum; + RING_INVENTORY._candle._sceneNumber = sceneNum; break; case OBJECT_STRAW: - _globals->_inventory._straw._sceneNumber = sceneNum; + RING_INVENTORY._straw._sceneNumber = sceneNum; break; case OBJECT_SCIMITAR: - _globals->_inventory._scimitar._sceneNumber = sceneNum; + RING_INVENTORY._scimitar._sceneNumber = sceneNum; break; case OBJECT_SWORD: - _globals->_inventory._sword._sceneNumber = sceneNum; + RING_INVENTORY._sword._sceneNumber = sceneNum; break; case OBJECT_HELMET: - _globals->_inventory._helmet._sceneNumber = sceneNum; + RING_INVENTORY._helmet._sceneNumber = sceneNum; break; case OBJECT_ITEMS: - _globals->_inventory._items._sceneNumber = sceneNum; + RING_INVENTORY._items._sceneNumber = sceneNum; break; case OBJECT_CONCENTRATOR: - _globals->_inventory._concentrator._sceneNumber = sceneNum; + RING_INVENTORY._concentrator._sceneNumber = sceneNum; break; case OBJECT_NULLIFIER: - _globals->_inventory._nullifier._sceneNumber = sceneNum; + RING_INVENTORY._nullifier._sceneNumber = sceneNum; break; case OBJECT_PEG: - _globals->_inventory._peg._sceneNumber = sceneNum; + RING_INVENTORY._peg._sceneNumber = sceneNum; break; case OBJECT_VIAL: - _globals->_inventory._vial._sceneNumber = sceneNum; + RING_INVENTORY._vial._sceneNumber = sceneNum; break; case OBJECT_JACKET: - _globals->_inventory._jacket._sceneNumber = sceneNum; + RING_INVENTORY._jacket._sceneNumber = sceneNum; break; case OBJECT_TUNIC2: - _globals->_inventory._tunic2._sceneNumber = sceneNum; + RING_INVENTORY._tunic2._sceneNumber = sceneNum; break; case OBJECT_BONE: - _globals->_inventory._bone._sceneNumber = sceneNum; + RING_INVENTORY._bone._sceneNumber = sceneNum; break; case OBJECT_EMPTY_JAR: - _globals->_inventory._emptyJar._sceneNumber = sceneNum; + RING_INVENTORY._emptyJar._sceneNumber = sceneNum; break; case OBJECT_JAR: - _globals->_inventory._jar._sceneNumber = sceneNum; + RING_INVENTORY._jar._sceneNumber = sceneNum; break; default: DebugPrintf("Invlid object Id %s\n", argv[1]); @@ -385,7 +385,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) { - _globals->_inventory._infoDisk._sceneNumber = 1; + RING_INVENTORY._infoDisk._sceneNumber = 1; return true; } diff --git a/engines/tsage/detection.cpp b/engines/tsage/detection.cpp index 371166d782..5d34037b7b 100644 --- a/engines/tsage/detection.cpp +++ b/engines/tsage/detection.cpp @@ -54,6 +54,10 @@ uint32 TSageEngine::getFeatures() const { return _gameDescription->features; } +Common::String TSageEngine::getPrimaryFilename() const { + return Common::String(_gameDescription->desc.filesDescriptions[0].fileName); +} + } // End of namespace tSage static const PlainGameDescriptor tSageGameTitles[] = { diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h index 952671b001..df3814dd73 100644 --- a/engines/tsage/detection_tables.h +++ b/engines/tsage/detection_tables.h @@ -83,6 +83,20 @@ static const tSageGameDescription gameDescriptions[] = { GType_Ringworld, GF_FLOPPY | GF_DEMO }, + // Ringworld English Floppy Demo Alt version + { + { + "ring", + "Floppy Demo", + AD_ENTRY1s("tsage.rlb", "bf4e8525d0cab84b08b57126092eeacd", 833453), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DEMO, + Common::GUIO_NONE + }, + GType_Ringworld, + GF_FLOPPY | GF_DEMO + }, // Blue Force { diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp index c73263ce17..ba3a11f619 100644 --- a/engines/tsage/dialogs.cpp +++ b/engines/tsage/dialogs.cpp @@ -31,6 +31,7 @@ #include "tsage/core.h" #include "tsage/staticres.h" #include "tsage/globals.h" +#include "tsage/ringworld_logic.h" namespace tSage { @@ -383,7 +384,7 @@ void InventoryDialog::show() { // Determine how many items are in the player's inventory int itemCount = 0; SynchronisedList<InvObject *>::iterator i; - for (i = _globals->_inventory._itemList.begin(); i != _globals->_inventory._itemList.end(); ++i) { + for (i = RING_INVENTORY._itemList.begin(); i != RING_INVENTORY._itemList.end(); ++i) { if ((*i)->inInventory()) ++itemCount; } @@ -404,7 +405,7 @@ InventoryDialog::InventoryDialog() { int imgWidth = 0, imgHeight = 0; SynchronisedList<InvObject *>::iterator i; - for (i = _globals->_inventory._itemList.begin(); i != _globals->_inventory._itemList.end(); ++i) { + for (i = RING_INVENTORY._itemList.begin(); i != RING_INVENTORY._itemList.end(); ++i) { InvObject *invObject = *i; if (invObject->inInventory()) { // Get the image for the item @@ -459,8 +460,8 @@ InventoryDialog::InventoryDialog() { } void InventoryDialog::execute() { - if ((_globals->_inventory._selectedItem) && _globals->_inventory._selectedItem->inInventory()) - _globals->_inventory._selectedItem->setCursor(); + if ((RING_INVENTORY._selectedItem) && RING_INVENTORY._selectedItem->inInventory()) + RING_INVENTORY._selectedItem->setCursor(); GfxElement *hiliteObj; bool lookFlag = false; @@ -519,7 +520,7 @@ void InventoryDialog::execute() { if (lookFlag) { _globals->_screenSurface.displayText(invObject->_description); } else { - _globals->_inventory._selectedItem = invObject; + RING_INVENTORY._selectedItem = invObject; invObject->setCursor(); } } @@ -543,15 +544,15 @@ void OptionsDialog::show() { } } else if (btn == &dlg->_btnRestart) { // Restart game - _globals->_game.restartGame(); + _globals->_game->restartGame(); } else if (btn == &dlg->_btnSound) { // Sound dialog } else if (btn == &dlg->_btnSave) { // Save button - _globals->_game.saveGame(); + _globals->_game->saveGame(); } else if (btn == &dlg->_btnRestore) { // Restore button - _globals->_game.restoreGame(); + _globals->_game->restoreGame(); } dlg->remove(); diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index 808806bed8..00444f3672 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -25,6 +25,7 @@ #include "tsage/globals.h" #include "tsage/tsage.h" +#include "tsage/ringworld_logic.h" namespace tSage { @@ -53,7 +54,7 @@ Globals::Globals() : _gfxManagerInstance(_screenSurface) { reset(); _stripNum = 0; - _gfxFontNumber = 50; + _gfxFontNumber = (_vm->getFeatures() & GF_DEMO) ? 0 : 50; _gfxColors.background = 53; _gfxColors.foreground = 18; _fontColors.background = 51; @@ -68,6 +69,16 @@ Globals::Globals() : _prevSceneOffset = Common::Point(-1, -1); _sceneListeners.push_back(&_soundHandler); _sceneListeners.push_back(&_sequenceManager._soundHandler); + + _scrollFollower = NULL; + _inventory = NULL; + + if (!(_vm->getFeatures() & GF_DEMO)) { + _inventory = new RingworldInvObjectList(); + _game = new RingworldGame(); + } else { + _game = new RingworldDemoGame(); + } } Globals::~Globals() { diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index b8ff441117..9e9ddd58d7 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -41,7 +41,7 @@ public: GfxManager _gfxManagerInstance; Common::List<GfxManager *> _gfxManagers; SceneHandler _sceneHandler; - Game _game; + Game *_game; EventsClass _events; SceneManager _sceneManager; ScenePalette _scenePalette; @@ -61,7 +61,7 @@ public: bool _flags[256]; Player _player; SoundHandler _soundHandler; - InvObjectList _inventory; + InvObjectList *_inventory; Region _paneRegions[2]; int _paneRefreshFlag[2]; Common::Point _sceneOffset; diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index b99fcb616a..f9f9e4b4ca 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -1109,7 +1109,7 @@ int GfxManager::getAngle(const Common::Point &p1, const Common::Point &p2) { GfxFont::GfxFont() { - _fontNumber = 50; + _fontNumber = (_vm->getFeatures() & GF_DEMO) ? 0 : 50; _numChars = 0; _bpp = 0; _fontData = NULL; diff --git a/engines/tsage/ringworld_demo.cpp b/engines/tsage/ringworld_demo.cpp new file mode 100644 index 0000000000..3f87e8d342 --- /dev/null +++ b/engines/tsage/ringworld_demo.cpp @@ -0,0 +1,58 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "tsage/ringworld_demo.h" +#include "tsage/scenes.h" +#include "tsage/tsage.h" +#include "tsage/staticres.h" + +namespace tSage { + +/*-------------------------------------------------------------------------- + * Ringworld Demo scene + * + *--------------------------------------------------------------------------*/ + +void RingworldDemoScene::postInit(SceneObjectList *OwnerList) { + signal(); +} + +void RingworldDemoScene::signal() { + _soundHandler.startSound(4); + _actor1.postInit(); + _actor2.postInit(); + _actor1.postInit(); + _actor4.postInit(); + _actor5.postInit(); + _actor6.postInit(); + + setAction(&_sequenceManager, this, 22, &_actor1, &_actor2, &_actor3, &_actor4, &_actor5, &_actor6, NULL); +} + +void RingworldDemoScene::process(Event &event) { + +} + +} // End of namespace tSage diff --git a/engines/tsage/ringworld_demo.h b/engines/tsage/ringworld_demo.h new file mode 100644 index 0000000000..63ffe56555 --- /dev/null +++ b/engines/tsage/ringworld_demo.h @@ -0,0 +1,52 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef TSAGE_RINGWORLD_DEMO_H +#define TSAGE_RINGWORLD_DEMO_H + +#include "common/scummsys.h" +#include "tsage/events.h" +#include "tsage/core.h" +#include "tsage/scenes.h" +#include "tsage/globals.h" + +namespace tSage { + + +class RingworldDemoScene: public Scene { +public: + SequenceManager _sequenceManager; + SceneObject _actor1, _actor2, _actor3; + SceneObject _actor4, _actor5, _actor6; + SoundHandler _soundHandler; + + virtual void postInit(SceneObjectList *OwnerList = NULL); + virtual void process(Event &event); + virtual void signal(); +}; + +} // End of namespace tSage + +#endif diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp index 6c3a40af48..0a2220c690 100644 --- a/engines/tsage/ringworld_logic.cpp +++ b/engines/tsage/ringworld_logic.cpp @@ -23,10 +23,14 @@ * */ +#include "common/config-manager.h" +#include "common/translation.h" +#include "gui/saveload.h" #include "tsage/ringworld_logic.h" #include "tsage/scenes.h" #include "tsage/tsage.h" #include "tsage/staticres.h" +#include "tsage/ringworld_demo.h" #include "tsage/ringworld_scenes1.h" #include "tsage/ringworld_scenes2.h" #include "tsage/ringworld_scenes3.h" @@ -39,6 +43,9 @@ namespace tSage { Scene *SceneFactory::createScene(int sceneNumber) { + if (_vm->getFeatures() & GF_DEMO) + return new RingworldDemoScene(); + switch (sceneNumber) { /* Scene group 1 */ // Kziniti Palace (Introduction) @@ -1174,4 +1181,235 @@ void SpeakerBatR::setText(const Common::String &msg) { Speaker::setText(msg); } +/*--------------------------------------------------------------------------*/ + +RingworldInvObjectList::RingworldInvObjectList() : + _stunner(2280, 1, 2, OBJECT_STUNNER, "This is your stunner."), + _scanner(1, 1, 3, OBJECT_SCANNER, "A combination scanner comm unit."), + _stasisBox(5200, 1, 4, OBJECT_STASIS_BOX, "A stasis box."), + _infoDisk(40, 1, 1, OBJECT_INFODISK, "The infodisk you took from the assassin."), + _stasisNegator(0, 2, 2, OBJECT_STASIS_NEGATOR, "The stasis field negator."), + _keyDevice(4250, 1, 6, OBJECT_KEY_DEVICE, "A magnetic key device."), + _medkit(2280, 1, 7, OBJECT_MEDKIT, "Your medkit."), + _ladder(4100, 1, 8, OBJECT_LADDER, "The chief's ladder."), + _rope(4150, 1, 9, OBJECT_ROPE, "The chief's rope."), + _key(7700, 1, 11, OBJECT_KEY, "A key."), + _translator(7700, 1, 13, OBJECT_TRANSLATOR, "The dolphin translator box."), + _ale(2150, 1, 10, OBJECT_ALE, "A bottle of ale."), + _paper(7700, 1, 12, OBJECT_PAPER, "A slip of paper with the numbers 2,4, and 3 written on it."), + _waldos(0, 1, 14, OBJECT_WALDOS, "A pair of waldos from the ruined probe."), + _stasisBox2(8100, 1, 4, OBJECT_STASIS_BOX2, "A stasis box."), + _ring(8100, 2, 5, OBJECT_RING, "This is a signet ring sent to you by Louis Wu."), + _cloak(9850, 2, 6, OBJECT_CLOAK, "A fine silk cloak."), + _tunic(9450, 2, 7, OBJECT_TUNIC, "The patriarch's soiled tunic."), + _candle(9500, 2, 8, OBJECT_CANDLE, "A tallow candle."), + _straw(9400, 2, 9, OBJECT_STRAW, "Clean, dry straw."), + _scimitar(9850, 1, 18, OBJECT_SCIMITAR, "A scimitar from the Patriarch's closet."), + _sword(9850, 1, 17, OBJECT_SWORD, "A short sword from the Patriarch's closet."), + _helmet(9500, 2, 4, OBJECT_HELMET, "Some type of helmet."), + _items(4300, 2, 10, OBJECT_ITEMS, "Two interesting items from the Tnuctipun vessel."), + _concentrator(4300, 2, 11, OBJECT_CONCENTRATOR, "The Tnuctipun anti-matter concentrator contained in a stasis field."), + _nullifier(5200, 2, 12, OBJECT_NULLIFIER, "A purported neural wave nullifier."), + _peg(4045, 2, 16, OBJECT_PEG, "A peg with a symbol."), + _vial(5100, 2, 17, OBJECT_VIAL, "A vial of the bat creatures anti-pheromone drug."), + _jacket(9850, 3, 1, OBJECT_JACKET, "A natty padded jacket."), + _tunic2(9850, 3, 2, OBJECT_TUNIC2, "A very hairy tunic."), + _bone(5300, 3, 5, OBJECT_BONE, "A very sharp bone."), + _jar(7700, 3, 4, OBJECT_JAR, "An jar filled with a green substance."), + _emptyJar(7700, 3, 3, OBJECT_EMPTY_JAR, "An empty jar.") { + + // Add the items to the list + _itemList.push_back(&_stunner); + _itemList.push_back(&_scanner); + _itemList.push_back(&_stasisBox); + _itemList.push_back(&_infoDisk); + _itemList.push_back(&_stasisNegator); + _itemList.push_back(&_keyDevice); + _itemList.push_back(&_medkit); + _itemList.push_back(&_ladder); + _itemList.push_back(&_rope); + _itemList.push_back(&_key); + _itemList.push_back(&_translator); + _itemList.push_back(&_ale); + _itemList.push_back(&_paper); + _itemList.push_back(&_waldos); + _itemList.push_back(&_stasisBox2); + _itemList.push_back(&_ring); + _itemList.push_back(&_cloak); + _itemList.push_back(&_tunic); + _itemList.push_back(&_candle); + _itemList.push_back(&_straw); + _itemList.push_back(&_scimitar); + _itemList.push_back(&_sword); + _itemList.push_back(&_helmet); + _itemList.push_back(&_items); + _itemList.push_back(&_concentrator); + _itemList.push_back(&_nullifier); + _itemList.push_back(&_peg); + _itemList.push_back(&_vial); + _itemList.push_back(&_jacket); + _itemList.push_back(&_tunic2); + _itemList.push_back(&_bone); + _itemList.push_back(&_jar); + _itemList.push_back(&_emptyJar); + + _selectedItem = NULL; +} + +/*--------------------------------------------------------------------------*/ + +void RingworldGame::restartGame() { + if (MessageDialog::show(RESTART_MSG, CANCEL_BTN_STRING, RESTART_BTN_STRING) == 1) + _globals->_game->restart(); +} + +void RingworldGame::saveGame() { + if (_globals->getFlag(50)) + MessageDialog::show(SAVING_NOT_ALLOWED_MSG, OK_BTN_STRING); + else { + // Show the save dialog + handleSaveLoad(true, _globals->_sceneHandler._saveGameSlot, _globals->_sceneHandler._saveName); + } +} + +void RingworldGame::restoreGame() { + if (_globals->getFlag(50)) + MessageDialog::show(RESTORING_NOT_ALLOWED_MSG, OK_BTN_STRING); + else { + // Show the load dialog + handleSaveLoad(false, _globals->_sceneHandler._loadGameSlot, _globals->_sceneHandler._saveName); + } +} + +void RingworldGame::quitGame() { + if (MessageDialog::show(QUIT_CONFIRM_MSG, CANCEL_BTN_STRING, QUIT_BTN_STRING) == 1) + _vm->quitGame(); +} + +void RingworldGame::handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName) { + const EnginePlugin *plugin = 0; + EngineMan.findGame(_vm->getGameId(), &plugin); + GUI::SaveLoadChooser *dialog; + if (saveFlag) + dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save")); + else + dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load")); + + dialog->setSaveMode(saveFlag); + + saveSlot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + saveName = dialog->getResultString(); + + delete dialog; +} + +void RingworldGame::start() { + // Set some default flags and cursor + _globals->setFlag(12); + _globals->setFlag(34); + _globals->_events.setCursor(CURSOR_WALK); + + // Set the screen to scroll in response to the player moving off-screen + _globals->_scrollFollower = &_globals->_player; + + // Set the object's that will be in the player's inventory by default + RING_INVENTORY._stunner._sceneNumber = 1; + RING_INVENTORY._scanner._sceneNumber = 1; + RING_INVENTORY._ring._sceneNumber = 1; + + // Switch to the title screen + _globals->_sceneManager.setNewScene(1000); +} + +void RingworldGame::restart() { + _globals->_scenePalette.clearListeners(); + _globals->_soundHandler.proc3(); + + // Reset the flags + _globals->reset(); + _globals->setFlag(34); + + // Clear save/load slots + _globals->_sceneHandler._saveGameSlot = -1; + _globals->_sceneHandler._loadGameSlot = -1; + + _globals->_stripNum = 0; + _globals->_events.setCursor(CURSOR_WALK); + + // Reset item properties + RING_INVENTORY._stunner._sceneNumber = 1; + RING_INVENTORY._scanner._sceneNumber = 1; + RING_INVENTORY._stasisBox._sceneNumber = 5200; + RING_INVENTORY._infoDisk._sceneNumber = 40; + RING_INVENTORY._stasisNegator._sceneNumber = 0; + RING_INVENTORY._keyDevice._sceneNumber = 0; + RING_INVENTORY._medkit._sceneNumber = 2280; + RING_INVENTORY._ladder._sceneNumber = 4100; + RING_INVENTORY._rope._sceneNumber = 4150; + RING_INVENTORY._key._sceneNumber = 7700; + RING_INVENTORY._translator._sceneNumber = 2150; + RING_INVENTORY._paper._sceneNumber = 7700; + RING_INVENTORY._waldos._sceneNumber = 0; + RING_INVENTORY._ring._sceneNumber = 1; + RING_INVENTORY._stasisBox2._sceneNumber = 8100; + RING_INVENTORY._cloak._sceneNumber = 9850; + RING_INVENTORY._tunic._sceneNumber = 9450; + RING_INVENTORY._candle._sceneNumber = 9500; + RING_INVENTORY._straw._sceneNumber = 9400; + RING_INVENTORY._scimitar._sceneNumber = 9850; + RING_INVENTORY._sword._sceneNumber = 9850; + RING_INVENTORY._helmet._sceneNumber = 9500; + RING_INVENTORY._items._sceneNumber = 4300; + RING_INVENTORY._concentrator._sceneNumber = 4300; + RING_INVENTORY._nullifier._sceneNumber = 4300; + RING_INVENTORY._peg._sceneNumber = 4045; + RING_INVENTORY._vial._sceneNumber = 5100; + RING_INVENTORY._jacket._sceneNumber = 9850; + RING_INVENTORY._tunic2._sceneNumber = 9850; + RING_INVENTORY._bone._sceneNumber = 5300; + RING_INVENTORY._jar._sceneNumber = 7700; + RING_INVENTORY._emptyJar._sceneNumber = 7700; + RING_INVENTORY._selectedItem = NULL; + + // Change to the first game scene + _globals->_sceneManager.changeScene(30); +} + +void RingworldGame::endGame(int resNum, int lineNum) { + _globals->_events.setCursor(CURSOR_WALK); + Common::String msg = _resourceManager->getMessage(resNum, lineNum); + bool savesExist = _saver->savegamesExist(); + + if (!savesExist) { + // No savegames exist, so prompt the user to restart or quit + if (MessageDialog::show(msg, QUIT_BTN_STRING, RESTART_BTN_STRING) == 0) + _vm->quitGame(); + else + restart(); + } else { + // Savegames exist, so prompt for Restore/Restart + bool breakFlag; + do { + if (MessageDialog::show(msg, RESTART_BTN_STRING, RESTORE_BTN_STRING) == 0) { + breakFlag = true; + } else { + handleSaveLoad(false, _globals->_sceneHandler._loadGameSlot, _globals->_sceneHandler._saveName); + breakFlag = _globals->_sceneHandler._loadGameSlot > 0; + } + } while (!breakFlag); + } + + _globals->_events.setCursorFromFlag(); +} + +/*--------------------------------------------------------------------------*/ + +void RingworldDemoGame::start() { + // Start the demo's single scene + _globals->_sceneManager.changeScene(1); +} + +void RingworldDemoGame::restart() { +} + } // End of namespace tSage diff --git a/engines/tsage/ringworld_logic.h b/engines/tsage/ringworld_logic.h index 66c7bff912..eb395d59b8 100644 --- a/engines/tsage/ringworld_logic.h +++ b/engines/tsage/ringworld_logic.h @@ -397,6 +397,77 @@ public: virtual void setText(const Common::String &msg); }; +/*--------------------------------------------------------------------------*/ + +class RingworldInvObjectList : public InvObjectList { +public: + InvObject _stunner; + InvObject _scanner; + InvObject _stasisBox; + InvObject _infoDisk; + InvObject _stasisNegator; + InvObject _keyDevice; + InvObject _medkit; + InvObject _ladder; + InvObject _rope; + InvObject _key; + InvObject _translator; + InvObject _ale; + InvObject _paper; + InvObject _waldos; + InvObject _stasisBox2; + InvObject _ring; + InvObject _cloak; + InvObject _tunic; + InvObject _candle; + InvObject _straw; + InvObject _scimitar; + InvObject _sword; + InvObject _helmet; + InvObject _items; + InvObject _concentrator; + InvObject _nullifier; + InvObject _peg; + InvObject _vial; + InvObject _jacket; + InvObject _tunic2; + InvObject _bone; + InvObject _jar; + InvObject _emptyJar; +public: + RingworldInvObjectList(); + + virtual Common::String getClassName() { return "RingworldInvObjectList"; } +}; + +#define RING_INVENTORY (*((RingworldInvObjectList *)_globals->_inventory)) + +class RingworldGame: public Game { +protected: + virtual void handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName); +public: + virtual void start(); + virtual void restart(); + virtual void restartGame(); + virtual void saveGame(); + virtual void restoreGame(); + virtual void quitGame(); + virtual void endGame(int resNum, int lineNum); +}; + +class RingworldDemoGame: public Game { +protected: + virtual void restart(); +public: + virtual void start(); + virtual void restartGame() {} + virtual void saveGame() {} + virtual void restoreGame() {} + virtual void quitGame() {} + virtual void endGame(int resNum, int lineNum) {} +}; + + } // End of namespace tSage #endif diff --git a/engines/tsage/ringworld_scenes1.cpp b/engines/tsage/ringworld_scenes1.cpp index 506d8bd36d..6fd12ce040 100644 --- a/engines/tsage/ringworld_scenes1.cpp +++ b/engines/tsage/ringworld_scenes1.cpp @@ -512,7 +512,7 @@ void Scene20::Action4::signal() { scene->_sound.startSound(77, this, 127); break; case 8: - _globals->_game.endGame(20, 0); + _globals->_game->endGame(20, 0); break; default: break; @@ -844,7 +844,7 @@ void Scene30::KzinObject::doAction(int action) { display2(30, 11); break; case OBJECT_RING: - _globals->_inventory._ring._sceneNumber = 30; + RING_INVENTORY._ring._sceneNumber = 30; scene->setAction(&scene->_ringAction); break; case CURSOR_LOOK: @@ -1063,7 +1063,7 @@ void Scene40::Action1::signal() { _globals->_soundHandler.startSound(77, this); break; case 17: - _globals->_game.endGame(40, 20); + _globals->_game->endGame(40, 20); remove(); break; } @@ -1107,7 +1107,7 @@ void Scene40::Action2::signal() { scene->_assassin._frame = 1; scene->_assassin.animate(ANIM_MODE_5, this); scene->_soundHandler.startSound(29); - _globals->_inventory._infoDisk._sceneNumber = 40; + RING_INVENTORY._infoDisk._sceneNumber = 40; break; case 4: _globals->_player.animate(ANIM_MODE_6, this); @@ -1174,7 +1174,7 @@ void Scene40::Action3::signal() { case 2: scene->_assassin.setStrip(2); scene->_assassin.setFrame(1); - _globals->_inventory._infoDisk._sceneNumber = 1; + RING_INVENTORY._infoDisk._sceneNumber = 1; _globals->_player.animate(ANIM_MODE_6, this); break; case 3: @@ -1328,7 +1328,7 @@ void Scene40::Action8::signal() { _globals->_soundHandler.startSound(77, this); break; case 4: - _globals->_game.endGame(40, 45); + _globals->_game->endGame(40, 45); remove(); break; } @@ -1378,12 +1378,12 @@ void Scene40::Assassin::doAction(int action) { if (scene->_assassin._visage != 44) SceneItem::display2(40, 13); else - SceneItem::display2(40, (_globals->_inventory._infoDisk._sceneNumber == 1) ? 19 : 14); + SceneItem::display2(40, (RING_INVENTORY._infoDisk._sceneNumber == 1) ? 19 : 14); break; case CURSOR_USE: if (scene->_assassin._visage != 44) SceneItem::display2(40, 15); - else if (_globals->_inventory._infoDisk._sceneNumber == 1) + else if (RING_INVENTORY._infoDisk._sceneNumber == 1) SceneItem::display2(40, 19); else { _globals->_player.disableControl(); @@ -1534,7 +1534,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) { _assassin.setPosition(Common::Point(230, 187)); _assassin.setAction(&_action8); - if (_globals->_inventory._infoDisk._sceneNumber == 40) { + if (RING_INVENTORY._infoDisk._sceneNumber == 40) { _assassin.setStrip(1); _assassin.setFrame(_assassin.getFrameCount()); } else { @@ -1952,7 +1952,7 @@ void Scene60::Action1::signal() { break; case 9: _globals->_player._uiEnabled = false; - _globals->_inventory._infoDisk._sceneNumber = 1; + RING_INVENTORY._infoDisk._sceneNumber = 1; if (_globals->_sceneObjects->contains(&scene->_message)) scene->_message.remove(); @@ -2226,7 +2226,7 @@ void Scene60::Item1::doAction(int action) { switch (action) { case OBJECT_INFODISK: - _globals->_inventory._infoDisk._sceneNumber = 60; + RING_INVENTORY._infoDisk._sceneNumber = 60; _globals->setFlag(!_globals->_stripNum ? 118 : 121); scene->_sceneMode = 0; scene->setAction(&scene->_action1); @@ -2235,7 +2235,7 @@ void Scene60::Item1::doAction(int action) { SceneItem::display2(60, 10); break; case CURSOR_USE: - if (_globals->_inventory._infoDisk._sceneNumber == 60) { + if (RING_INVENTORY._infoDisk._sceneNumber == 60) { if (_globals->getFlag(118) && !_globals->_stripNum) { _globals->clearFlag(118); scene->setAction(&scene->_action1); @@ -2248,7 +2248,7 @@ void Scene60::Item1::doAction(int action) { scene->_action1.setActionIndex(9); scene->_action1.setDelay(1); } - } else if (_globals->_inventory._infoDisk._sceneNumber == 1) { + } else if (RING_INVENTORY._infoDisk._sceneNumber == 1) { scene->_sceneMode = 0; setAction(&scene->_sequenceManager, scene, 62, NULL); } else { @@ -2674,7 +2674,7 @@ void Scene90::signal() { break; case 92: _globals->_scenePalette.clearListeners(); - _globals->_game.endGame(90, 6); + _globals->_game->endGame(90, 6); break; case 96: _globals->_player.enableControl(); diff --git a/engines/tsage/ringworld_scenes10.cpp b/engines/tsage/ringworld_scenes10.cpp index ecfb1f3847..0035f104c9 100644 --- a/engines/tsage/ringworld_scenes10.cpp +++ b/engines/tsage/ringworld_scenes10.cpp @@ -429,7 +429,7 @@ void Scene9200::postInit(SceneObjectList *OwnerList) { switch (_globals->_sceneManager._previousScene) { case 9500: if (_globals->getFlag(85)) { - if (_globals->_inventory._helmet._sceneNumber == 1) { + if (RING_INVENTORY._helmet._sceneNumber == 1) { _globals->setFlag(86); _sceneState = 9210; setAction(&_sequenceManager, this, 9210, &_globals->_player, &_object2, &_object3, 0); @@ -438,7 +438,7 @@ void Scene9200::postInit(SceneObjectList *OwnerList) { setAction(&_sequenceManager, this, 9212, &_globals->_player, &_object2, &_object3, 0); } } else { - if (_globals->_inventory._helmet._sceneNumber == 1) { + if (RING_INVENTORY._helmet._sceneNumber == 1) { _sceneState = 9211; setAction(&_sequenceManager, this, 9211, &_globals->_player, &_object2, &_object3, 0); } else { @@ -711,7 +711,7 @@ Scene9400::Scene9400() { void Scene9400::SceneHotspot7::doAction(int action) { Scene9400 *scene = (Scene9400 *)_globals->_sceneManager._scene; - if ((action == CURSOR_USE) && (_globals->_inventory._straw._sceneNumber != 1)) { + if ((action == CURSOR_USE) && (RING_INVENTORY._straw._sceneNumber != 1)) { scene->_sceneState = 1; scene->setAction(&scene->_sequenceManager, scene, 9408, &_globals->_player, 0); } else { @@ -869,13 +869,13 @@ void Scene9450::Hotspot3::doAction(int action) { break; case CURSOR_USE: case CURSOR_TALK: - if (_globals->_inventory._tunic._sceneNumber == 9450) { + if (RING_INVENTORY._tunic._sceneNumber == 9450) { if (scene->_object2._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); - } else if ((_globals->_inventory._cloak._sceneNumber != 1) && (_globals->_inventory._jacket._sceneNumber != 1) && (_globals->_inventory._tunic2._sceneNumber != 1)) { + } else if ((RING_INVENTORY._cloak._sceneNumber != 1) && (RING_INVENTORY._jacket._sceneNumber != 1) && (RING_INVENTORY._tunic2._sceneNumber != 1)) { SceneItem::display(9450, 38, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else { scene->_sceneMode = 9460; @@ -962,7 +962,7 @@ void Scene9450::postInit(SceneObjectList *OwnerList) { setAction(&_sequenceManager1, this, 9451, &_globals->_player, 0); if (_globals->getFlag(87)) { - if (_globals->_inventory._tunic._sceneNumber == 1) { + if (RING_INVENTORY._tunic._sceneNumber == 1) { _object2.signal(); } else { _object2.setPosition(Common::Point(184, 144), 0); @@ -977,7 +977,7 @@ void Scene9450::postInit(SceneObjectList *OwnerList) { _object3.setAction(&_sequenceManager2, 0, 9455, &_object2, &_object1, 0); } - if (_globals->_inventory._tunic._sceneNumber != 1) + if (RING_INVENTORY._tunic._sceneNumber != 1) _hotspot1.setup(123, 139, 138, 170, 9450, 37, -1); _hotspot2.setup(153, 102, 176, 141, 9450, 39, 40); @@ -1007,7 +1007,7 @@ void Scene9500::Hotspot1::doAction(int action) { if (action == OBJECT_SWORD) { scene->_sceneMode = 9510; _globals->setFlag(92); - _globals->_inventory._sword._sceneNumber = 9500; + RING_INVENTORY._sword._sceneNumber = 9500; _globals->_player.disableControl(); _globals->_sceneItems.remove(this); scene->_hotspot2.setup(87, 294, 104, 314, 9400, 17, -1); @@ -1033,7 +1033,7 @@ void Scene9500::Hotspot2::doAction(int action) { void Scene9500::Hotspot3::doAction(int action) { Scene9500 *scene = (Scene9500 *)_globals->_sceneManager._scene; - if ((action == CURSOR_USE) && (_globals->_inventory._candle._sceneNumber != 1)){ + if ((action == CURSOR_USE) && (RING_INVENTORY._candle._sceneNumber != 1)){ scene->_sceneMode = 9505; _globals->_player.disableControl(); _globals->_sceneItems.remove(this); @@ -1048,12 +1048,12 @@ void Scene9500::Hotspot4::doAction(int action) { if (action == OBJECT_CANDLE) { _globals->_player.disableControl(); - if (_globals->_inventory._straw._sceneNumber == 9500) { + if (RING_INVENTORY._straw._sceneNumber == 9500) { scene->_sceneMode = 9506; _globals->_sceneItems.remove(&scene->_hotspot5); _globals->_sceneItems.remove(this); scene->setAction(&scene->_sequenceManager, scene, 9506, &_globals->_player, &scene->_object3, 0); - _globals->_inventory._candle._sceneNumber = 9850; + RING_INVENTORY._candle._sceneNumber = 9850; } else { scene->_sceneMode = 9507; scene->setAction(&scene->_sequenceManager, scene, 9507, &_globals->_player, &scene->_object3, 0); @@ -1061,7 +1061,7 @@ void Scene9500::Hotspot4::doAction(int action) { } else if (action == OBJECT_STRAW) { scene->_sceneMode = 9512; _globals->_player.disableControl(); - _globals->_inventory._straw._sceneNumber = 9500; + RING_INVENTORY._straw._sceneNumber = 9500; scene->setAction(&scene->_sequenceManager, scene, 9512, &_globals->_player, &scene->_object3, 0); } else { NamedHotspot::doAction(action); @@ -1135,14 +1135,14 @@ void Scene9500::postInit(SceneObjectList *OwnerList) { _candle.setStrip(1); _candle.animate(ANIM_MODE_2); _candle.setPosition(Common::Point(30, 105), 0); - if (_globals->_inventory._candle._sceneNumber != 9500) + if (RING_INVENTORY._candle._sceneNumber != 9500) _candle.setStrip(2); _object3.postInit(0); _object3.hide(); _object3.setPriority2(150); _object3.setPosition(Common::Point(166, 133)); - if (_globals->_inventory._straw._sceneNumber == 9500) { + if (RING_INVENTORY._straw._sceneNumber == 9500) { _object3.show(); _object3.setVisage(5); _object3._strip = 2; @@ -1165,7 +1165,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) { _object2.setFrame(_object2.getFrameCount()); _object2.setPosition(Common::Point(303, 130)); _object2.setPriority2(132); - if (_globals->_inventory._helmet._sceneNumber == 1) { + if (RING_INVENTORY._helmet._sceneNumber == 1) { _hotspot2.setup(87, 294, 104, 314, 9400, 17, -1); } else { _object2.setStrip(2); @@ -1203,10 +1203,10 @@ void Scene9500::postInit(SceneObjectList *OwnerList) { if ((_globals->_sceneManager._previousScene == 9200) || (_globals->_sceneManager._previousScene != 9850)) { _sceneMode = 0; - if (_globals->_inventory._helmet._sceneNumber != 1) { + if (RING_INVENTORY._helmet._sceneNumber != 1) { setAction(&_sequenceManager, this, 9501, &_globals->_player, &_candle, 0); } else { - _globals->_inventory._helmet._sceneNumber = 9500; + RING_INVENTORY._helmet._sceneNumber = 9500; _hotspot2.setup(87, 294, 104, 314, 9400, 17, -1); setAction(&_sequenceManager, this, 9513, &_globals->_player, &_object2, 0); } @@ -1248,7 +1248,7 @@ void Scene9700::process(Event &event) { _globals->_sceneManager.changeScene(9200); } else if (_globals->_events._currentCursor == OBJECT_SCANNER) { event.handled = true; - if (_globals->_inventory._helmet._sceneNumber == 1) { + if (RING_INVENTORY._helmet._sceneNumber == 1) { _globals->_player.disableControl(); _sceneMode = 9704; setAction(&_sequenceManager, this, 9704, &_globals->_player, &_object1, 0); @@ -1332,7 +1332,7 @@ void Scene9850::Object6::doAction(int action) { if (action == CURSOR_LOOK) { SceneItem::display(9850, 27, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else if (action == CURSOR_USE) { - _globals->_inventory._scimitar._sceneNumber = 1; + RING_INVENTORY._scimitar._sceneNumber = 1; hide(); } else { SceneHotspot::doAction(action); @@ -1344,7 +1344,7 @@ void Scene9850::Object7::doAction(int action) { if (action == CURSOR_LOOK) { SceneItem::display(9850, 28, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); } else if (action == CURSOR_USE) { - _globals->_inventory._sword._sceneNumber = 1; + RING_INVENTORY._sword._sceneNumber = 1; hide(); } else { SceneHotspot::doAction(action); @@ -1357,18 +1357,18 @@ void Scene9850::Hotspot12::doAction(int action) { Scene9850 *scene = (Scene9850 *)_globals->_sceneManager._scene; if (action == CURSOR_USE) { - if (_globals->_inventory._tunic2._sceneNumber != 1) { - _globals->_inventory._tunic2._sceneNumber = 1; + if (RING_INVENTORY._tunic2._sceneNumber != 1) { + RING_INVENTORY._tunic2._sceneNumber = 1; _globals->_player.disableControl(); scene->_sceneMode = 9858; setAction(&scene->_sequenceManager, scene, 9858, &_globals->_player, &scene->_objTunic2, 0); } else { - _globals->_inventory._tunic2._sceneNumber = 9850; + RING_INVENTORY._tunic2._sceneNumber = 9850; _globals->_player.disableControl(); scene->_sceneMode = 9861; setAction(&scene->_sequenceManager, scene, 9861, &_globals->_player, &scene->_objTunic2, 0); } - } else if ((action != CURSOR_LOOK) || (_globals->_inventory._tunic2._sceneNumber != 1)) { + } else if ((action != CURSOR_LOOK) || (RING_INVENTORY._tunic2._sceneNumber != 1)) { NamedHotspot::doAction(action); } else { SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); @@ -1379,18 +1379,18 @@ void Scene9850::Hotspot14::doAction(int action) { Scene9850 *scene = (Scene9850 *)_globals->_sceneManager._scene; if (action == CURSOR_USE) { - if (_globals->_inventory._jacket._sceneNumber != 1) { - _globals->_inventory._jacket._sceneNumber = 1; + if (RING_INVENTORY._jacket._sceneNumber != 1) { + RING_INVENTORY._jacket._sceneNumber = 1; _globals->_player.disableControl(); scene->_sceneMode = 9857; setAction(&scene->_sequenceManager, scene, 9857, &_globals->_player, &scene->_objJacket, 0); } else { - _globals->_inventory._jacket._sceneNumber = 9850; + RING_INVENTORY._jacket._sceneNumber = 9850; _globals->_player.disableControl(); scene->_sceneMode = 9860; setAction(&scene->_sequenceManager, scene, 9860, &_globals->_player, &scene->_objJacket, 0); } - } else if ((action != CURSOR_LOOK) || (_globals->_inventory._jacket._sceneNumber != 1)) { + } else if ((action != CURSOR_LOOK) || (RING_INVENTORY._jacket._sceneNumber != 1)) { NamedHotspot::doAction(action); } else { SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); @@ -1401,18 +1401,18 @@ void Scene9850::Hotspot16::doAction(int action) { Scene9850 *scene = (Scene9850 *)_globals->_sceneManager._scene; if (action == CURSOR_USE) { - if (_globals->_inventory._cloak._sceneNumber != 1) { - _globals->_inventory._cloak._sceneNumber = 1; + if (RING_INVENTORY._cloak._sceneNumber != 1) { + RING_INVENTORY._cloak._sceneNumber = 1; _globals->_player.disableControl(); scene->_sceneMode = 9862; setAction(&scene->_sequenceManager, scene, 9862, &_globals->_player, &scene->_objCloak, 0); } else { - _globals->_inventory._cloak._sceneNumber = 9850; + RING_INVENTORY._cloak._sceneNumber = 9850; _globals->_player.disableControl(); scene->_sceneMode = 9859; setAction(&scene->_sequenceManager, scene, 9859, &_globals->_player, &scene->_objCloak, 0); } - } else if ((action != CURSOR_LOOK) || (_globals->_inventory._cloak._sceneNumber != 1)) { + } else if ((action != CURSOR_LOOK) || (RING_INVENTORY._cloak._sceneNumber != 1)) { NamedHotspot::doAction(action); } else { SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); @@ -1462,9 +1462,9 @@ void Scene9850::Hotspot20::doAction(int action) { if (action == CURSOR_USE) { _globals->_player.disableControl(); if (scene->_objSword._state == 0) { - if (_globals->_inventory._scimitar._sceneNumber == 9850) + if (RING_INVENTORY._scimitar._sceneNumber == 9850) scene->_objScimitar.show(); - if (_globals->_inventory._sword._sceneNumber == 9850) + if (RING_INVENTORY._sword._sceneNumber == 9850) scene->_objSword.show(); scene->_sceneMode = 11; setAction(&scene->_sequenceManager, scene, 9853, &_globals->_player, &scene->_objDoor, &scene->_objLever, 0); @@ -1482,9 +1482,9 @@ void Scene9850::signal() { switch (_sceneMode ++) { case 10: // Hidden closet closed - if (_globals->_inventory._scimitar._sceneNumber == 9850) + if (RING_INVENTORY._scimitar._sceneNumber == 9850) _objScimitar.hide(); - if (_globals->_inventory._sword._sceneNumber == 9850) + if (RING_INVENTORY._sword._sceneNumber == 9850) _objSword.hide(); _globals->_sceneItems.remove(&_objScimitar); _globals->_sceneItems.remove(&_objSword); @@ -1493,9 +1493,9 @@ void Scene9850::signal() { break; case 11: // Hidden closet opened - if (_globals->_inventory._scimitar._sceneNumber == 9850) + if (RING_INVENTORY._scimitar._sceneNumber == 9850) _globals->_sceneItems.addItems(&_objScimitar, NULL); - if (_globals->_inventory._sword._sceneNumber == 9850) + if (RING_INVENTORY._sword._sceneNumber == 9850) _globals->_sceneItems.addItems(&_objSword, NULL); _globals->_sceneItems.remove(&_hotspot19); _globals->_player.enableControl(); @@ -1559,7 +1559,7 @@ void Scene9850::postInit(SceneObjectList *OwnerList) { _objCloak.setFrame(1); _objCloak.setPriority2(90); _objCloak.setPosition(Common::Point(157, 81), 0); - if (_globals->_inventory._cloak._sceneNumber != 9850) + if (RING_INVENTORY._cloak._sceneNumber != 9850) _objCloak.hide(); _objJacket.postInit(); @@ -1568,7 +1568,7 @@ void Scene9850::postInit(SceneObjectList *OwnerList) { _objJacket.setFrame(2); _objJacket.setPriority2(90); _objJacket.setPosition(Common::Point(201, 84)); - if (_globals->_inventory._jacket._sceneNumber != 9850) + if (RING_INVENTORY._jacket._sceneNumber != 9850) _objJacket.hide(); _objTunic2.postInit(); @@ -1577,10 +1577,10 @@ void Scene9850::postInit(SceneObjectList *OwnerList) { _objTunic2.setFrame(3); _objTunic2.setPriority2(90); _objTunic2.setPosition(Common::Point(295, 90)); - if (_globals->_inventory._tunic2._sceneNumber != 9850) + if (RING_INVENTORY._tunic2._sceneNumber != 9850) _objTunic2.hide(); - if (_globals->_inventory._scimitar._sceneNumber == 9850) { + if (RING_INVENTORY._scimitar._sceneNumber == 9850) { _objScimitar.postInit(); _objScimitar.setVisage(9850); _objScimitar.setStrip(2); @@ -1590,7 +1590,7 @@ void Scene9850::postInit(SceneObjectList *OwnerList) { _objScimitar.hide(); } - if (_globals->_inventory._sword._sceneNumber == 9850) { + if (RING_INVENTORY._sword._sceneNumber == 9850) { _objSword.postInit(); _objSword.setVisage(9850); _objSword.setStrip(3); @@ -1789,7 +1789,7 @@ void Scene9900::strAction3::signal() { _globals->_scenePalette.addFader(_palette2._palette, 256, 5, this); break; case 4: - _globals->_game.endGame(9900, 61); + _globals->_game->endGame(9900, 61); remove(); default: break; @@ -1842,7 +1842,7 @@ void Scene9900::signal() { break; case 162: warning("TBC: shutdown();"); - _globals->_game.quitGame(); + _globals->_game->quitGame(); break; case 9901: _globals->_player.disableControl(); @@ -1933,7 +1933,7 @@ void Scene9900::process(Event &event) { if (_sceneMode != 9906) { if ((event.eventType == EVENT_BUTTON_DOWN) && (_globals->_events.getCursor() == OBJECT_ITEMS)) { _object8._state = 1; - _globals->_inventory._items._sceneNumber = 9900; + RING_INVENTORY._items._sceneNumber = 9900; _globals->_events.setCursor(CURSOR_USE); } } @@ -1960,10 +1960,10 @@ void Scene9900::postInit(SceneObjectList *OwnerList) { _object8._state = 0; - _globals->_inventory._concentrator._sceneNumber = 9900; - _globals->_inventory._items._rlbNum = 3; - _globals->_inventory._items._cursorNum = 6; - _globals->_inventory._items._description = Common::String("One of the items from the stasis ship. The other is on the Lance's bridge."); + RING_INVENTORY._concentrator._sceneNumber = 9900; + RING_INVENTORY._items._rlbNum = 3; + RING_INVENTORY._items._cursorNum = 6; + RING_INVENTORY._items._description = Common::String("One of the items from the stasis ship. The other is on the Lance's bridge."); _stripManager.addSpeaker(&_speakerMR); _globals->_player.disableControl(); diff --git a/engines/tsage/ringworld_scenes3.cpp b/engines/tsage/ringworld_scenes3.cpp index 26cddc9964..4ed2d98662 100644 --- a/engines/tsage/ringworld_scenes3.cpp +++ b/engines/tsage/ringworld_scenes3.cpp @@ -752,10 +752,10 @@ void Scene2100::Action8::signal() { } case 3: _globals->_player.checkAngle(&scene->_object3); - scene->_stripManager.start((_globals->_inventory._translator._sceneNumber == 1) ? 7720 : 7710, this); + scene->_stripManager.start((RING_INVENTORY._translator._sceneNumber == 1) ? 7720 : 7710, this); break; case 4: - if (_globals->_inventory._translator._sceneNumber != 1) + if (RING_INVENTORY._translator._sceneNumber != 1) _globals->_sceneManager.changeScene(7600); else { _globals->setFlag(24); @@ -1311,7 +1311,7 @@ void Scene2100::Action17::signal() { scene->_stripManager.start(7072, this); break; case 8: - _globals->_inventory._stasisNegator._sceneNumber = 1; + RING_INVENTORY._stasisNegator._sceneNumber = 1; _globals->_sceneManager.changeScene(9100); remove(); break; @@ -1814,14 +1814,14 @@ void Scene2100::postInit(SceneObjectList *OwnerList) { _object4.setPosition(Common::Point(160, 199)); _object4.hide(); - _globals->_inventory._stasisBox._sceneNumber = 0; + RING_INVENTORY._stasisBox._sceneNumber = 0; setAction(&_action9); break; case 7000: _globals->_soundHandler.startSound(160); _globals->_soundHandler.proc5(true); - if (_globals->_inventory._stasisBox2._sceneNumber == 1) { + if (RING_INVENTORY._stasisBox2._sceneNumber == 1) { _globals->_player.setPriority2(1); _globals->_player.setPosition(Common::Point(157, 56)); @@ -2318,7 +2318,7 @@ void Scene2150::Action2::signal() { break; case 3: _globals->_events.setCursor(CURSOR_WALK); - scene->_stripManager.start((_globals->_inventory._ale._sceneNumber == 2150) ? 2151 : 2152, this); + scene->_stripManager.start((RING_INVENTORY._ale._sceneNumber == 2150) ? 2151 : 2152, this); break; case 4: scene->_hotspot14.postInit(); @@ -2328,7 +2328,7 @@ void Scene2150::Action2::signal() { if (scene->_stripManager._field2E8 == 15) { scene->_hotspot14.setFrame(5); - _globals->_inventory._ale._sceneNumber = 1; + RING_INVENTORY._ale._sceneNumber = 1; } else { scene->_hotspot14.setFrame(scene->_stripManager._field2E8 - 5); } @@ -2948,7 +2948,7 @@ void Scene2200::postInit(SceneObjectList *OwnerList) { break; case 2310: default: - _globals->_inventory._infoDisk._sceneNumber = 1; + RING_INVENTORY._infoDisk._sceneNumber = 1; _hotspot3.postInit(); _hotspot3.setVisage(2215); @@ -3925,11 +3925,11 @@ void Scene2280::Action4::signal() { switch (_state) { case 1: scene->_hotspot18.remove(); - _globals->_inventory._scanner._sceneNumber = 1; + RING_INVENTORY._scanner._sceneNumber = 1; break; case 6: scene->_hotspot17.remove(); - _globals->_inventory._medkit._sceneNumber = 1; + RING_INVENTORY._medkit._sceneNumber = 1; break; case 50: scene->_hotspot17.postInit(); @@ -3941,7 +3941,7 @@ void Scene2280::Action4::signal() { scene->_hotspot17.changeZoom(100); scene->_hotspot17.setPriority2(1); - _globals->_inventory._medkit._sceneNumber = 2280; + RING_INVENTORY._medkit._sceneNumber = 2280; _globals->_sceneItems.push_front(&scene->_hotspot17); break; case 51: @@ -3954,7 +3954,7 @@ void Scene2280::Action4::signal() { scene->_hotspot18.changeZoom(100); scene->_hotspot18.setPriority2(1); - _globals->_inventory._scanner._sceneNumber = 2280; + RING_INVENTORY._scanner._sceneNumber = 2280; _globals->_sceneItems.push_front(&scene->_hotspot18); break; } @@ -4223,7 +4223,7 @@ void Scene2280::postInit(SceneObjectList *OwnerList) { _hotspot16.setPosition(Common::Point(208, 90)); _hotspot16.setPriority2(80); - if (_globals->_inventory._medkit._sceneNumber == 2280) { + if (RING_INVENTORY._medkit._sceneNumber == 2280) { _hotspot17.postInit(); _hotspot17.setVisage(2161); _hotspot17._strip = 2; @@ -4233,7 +4233,7 @@ void Scene2280::postInit(SceneObjectList *OwnerList) { _globals->_sceneItems.push_back(&_hotspot17); } - if (_globals->_inventory._scanner._sceneNumber == 2280) { + if (RING_INVENTORY._scanner._sceneNumber == 2280) { _hotspot18.postInit(); _hotspot18.setVisage(2161); _hotspot18._strip = 2; @@ -4422,7 +4422,7 @@ void Scene2300::Action1::signal() { _globals->_soundHandler.startSound(77, this); break; case 8: - _globals->_game.endGame(2300, 0); + _globals->_game->endGame(2300, 0); break; case 9: if (scene->_hotspot5._mover) @@ -4711,8 +4711,8 @@ void Scene2300::postInit(SceneObjectList *OwnerList) { _stripManager.addSpeaker(&_speakerQText); _stripManager.addSpeaker(&_speakerSText); - _globals->_inventory._stunner._sceneNumber = 1; - _globals->_inventory._infoDisk._sceneNumber = 1; + RING_INVENTORY._stunner._sceneNumber = 1; + RING_INVENTORY._infoDisk._sceneNumber = 1; _hotspot8.postInit(); _hotspot8.setVisage(2301); @@ -5333,7 +5333,7 @@ void Scene2320::Action5::signal() { _globals->_sceneManager.changeScene(7000); else if (_globals->getFlag(59)) _globals->_sceneManager.changeScene(5000); - else if (!_globals->getFlag(43) || (_globals->_inventory._ale._sceneNumber != 1)) + else if (!_globals->getFlag(43) || (RING_INVENTORY._ale._sceneNumber != 1)) setDelay(10); else { scene->_hotspot11.setAction(NULL); @@ -5477,7 +5477,7 @@ void Scene2320::Action7::signal() { break; case 12: _globals->_player.enableControl(); - _globals->_inventory._stasisBox._sceneNumber = 2320; + RING_INVENTORY._stasisBox._sceneNumber = 2320; break; } } @@ -5507,7 +5507,7 @@ void Scene2320::Action8::signal() { _globals->_player.enableControl(); break; case 5: - _globals->_inventory._stasisBox._sceneNumber = 2320; + RING_INVENTORY._stasisBox._sceneNumber = 2320; scene->_sceneMode = 2326; scene->_speakerGameText.setTextPos(Common::Point(_globals->_sceneManager._scene->_sceneBounds.left + 30, 10)); scene->setAction(&scene->_sequenceManager1, scene, 2326, &_globals->_player, &scene->_hotspot11, NULL); @@ -5622,12 +5622,12 @@ void Scene2320::Hotspot11::doAction(int action) { } else { scene->_sceneMode = 2329; - if (_globals->_inventory._ale._sceneNumber == 1) { + if (RING_INVENTORY._ale._sceneNumber == 1) { scene->setAction(&scene->_sequenceManager1, scene, 2329, NULL); } else if (!_globals->getFlag(110)) { _globals->setFlag(110); scene->setAction(&scene->_sequenceManager1, scene, 2330, NULL); - } else if (_globals->_inventory._peg._sceneNumber != 1) { + } else if (RING_INVENTORY._peg._sceneNumber != 1) { scene->setAction(&scene->_sequenceManager1, scene, 2331, NULL); } else if (!_state) { ++_state; @@ -5683,7 +5683,7 @@ void Scene2320::Hotspot14::doAction(int action) { scene->_hotspot8.hide(); _globals->_sceneItems.push_front(&scene->_hotspot8); - _globals->_inventory._waldos._sceneNumber = 2320; + RING_INVENTORY._waldos._sceneNumber = 2320; scene->_hotspot9.postInit(); scene->_hotspot9.setVisage(2345); @@ -5705,7 +5705,7 @@ void Scene2320::Hotspot14::doAction(int action) { SceneItem::display2(2320, 24); } else if (!_globals->getFlag(76)) { SceneItem::display2(2320, 28); - } else if (!_globals->_inventory._waldos._sceneNumber) { + } else if (!RING_INVENTORY._waldos._sceneNumber) { SceneItem::display2(2320, 27); } else { SceneItem::display2(2320, 29); @@ -5787,7 +5787,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) { _hotspot12.animate(ANIM_MODE_8, 0, NULL); _hotspot12.setPosition(Common::Point(412, 46)); - if (_globals->_inventory._waldos._sceneNumber == 2320) { + if (RING_INVENTORY._waldos._sceneNumber == 2320) { _hotspot8.postInit(); _hotspot8.setVisage(2345); _hotspot8.setStrip(5); @@ -6022,13 +6022,13 @@ void Scene2320::signal() { break; case 2326: _globals->clearFlag(70); - _globals->_inventory._nullifier._sceneNumber = 1; + RING_INVENTORY._nullifier._sceneNumber = 1; _globals->_stripNum = 2321; _globals->_sceneManager.changeScene(2100); break; case 2336: _globals->setFlag(77); - _globals->_inventory._waldos._sceneNumber = 1; + RING_INVENTORY._waldos._sceneNumber = 1; _hotspot8.remove(); break; case 5000: diff --git a/engines/tsage/ringworld_scenes5.cpp b/engines/tsage/ringworld_scenes5.cpp index a72396c26c..910a35e492 100644 --- a/engines/tsage/ringworld_scenes5.cpp +++ b/engines/tsage/ringworld_scenes5.cpp @@ -52,7 +52,7 @@ void Scene4000::Action1::signal() { NpcMover *mover = new NpcMover(); scene->_hotspot5.addMover(mover, &pt, this); - _globals->_inventory._ale._sceneNumber = 0; + RING_INVENTORY._ale._sceneNumber = 0; _globals->clearFlag(42); _globals->clearFlag(36); _globals->clearFlag(43); @@ -222,7 +222,7 @@ void Scene4000::Action4::signal() { scene->_rope.setFrame(3); scene->_rope.setPosition(Common::Point(268, 44)); - _globals->_inventory._rope._sceneNumber = 4000; + RING_INVENTORY._rope._sceneNumber = 4000; _globals->_events.setCursor(CURSOR_USE); _globals->_player.animate(ANIM_MODE_6, this); break; @@ -292,7 +292,7 @@ void Scene4000::Action6::signal() { if (!_globals->getFlag(36)) ADD_PLAYER_MOVER_NULL(scene->_miranda, 280, 150); - _globals->_inventory._ale._sceneNumber = 4100; + RING_INVENTORY._ale._sceneNumber = 4100; break; case 5: _globals->_sceneManager.changeScene(4100); @@ -359,7 +359,7 @@ void Scene4000::Action8::signal() { _globals->_soundHandler.startSound(77, this); break; case 5: - _globals->_game.endGame(4000, 15); + _globals->_game->endGame(4000, 15); remove(); break; } @@ -552,7 +552,7 @@ void Scene4000::Hotspot8::doAction(int action) { SceneItem::display2(4000, 25); break; case CURSOR_TALK: - if (_globals->_inventory._peg._sceneNumber == 1) + if (RING_INVENTORY._peg._sceneNumber == 1) SceneItem::display2(4000, 34); else { switch (_ctr) { @@ -837,7 +837,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { _smoke2.setPosition(Common::Point(299, 59)); _smoke2.animate(ANIM_MODE_2, NULL); - if (_globals->_inventory._ladder._sceneNumber != 4000) { + if (RING_INVENTORY._ladder._sceneNumber != 4000) { // if ladder is not in the scene, activate the hotspot on the wall _hotspot8.postInit(); _hotspot8.setVisage(4018); @@ -891,7 +891,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { case 2320: _globals->_soundHandler.startSound(155); - if (_globals->_inventory._ale._sceneNumber == 1) { + if (RING_INVENTORY._ale._sceneNumber == 1) { _guardRock.postInit(); _guardRock.setVisage(4001); _guardRock.animate(ANIM_MODE_1, NULL); @@ -934,7 +934,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { break; case 4025: - if (_globals->_inventory._ladder._sceneNumber == 4000) + if (RING_INVENTORY._ladder._sceneNumber == 4000) _hotspot8.remove(); _globals->_player.setPosition(Common::Point(260, 185)); @@ -989,7 +989,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { case 4045: _globals->_player.enableControl(); - if (_globals->_inventory._ladder._sceneNumber != 4000) { + if (RING_INVENTORY._ladder._sceneNumber != 4000) { _hotspot8.postInit(); _hotspot8.setVisage(4017); _hotspot8.animate(ANIM_MODE_1, NULL); @@ -1046,7 +1046,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { _globals->_player.enableControl(); } - if (_globals->_inventory._ladder._sceneNumber != 4000) + if (RING_INVENTORY._ladder._sceneNumber != 4000) _hotspot8.remove(); break; @@ -1054,7 +1054,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { _globals->_player.enableControl(); _globals->_player.setPosition(Common::Point(270, 155)); - if (_globals->getFlag(42) && (_globals->_inventory._ladder._sceneNumber != 4000)) { + if (_globals->getFlag(42) && (RING_INVENTORY._ladder._sceneNumber != 4000)) { _hotspot8.setVisage(4017); _hotspot8.animate(ANIM_MODE_1, NULL); _hotspot8.setPosition(Common::Point(244, 151)); @@ -1087,8 +1087,8 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { _guardRock.setPosition(Common::Point(255, 153)); setAction(&_action11); - _globals->_inventory._ladder._sceneNumber = 4100; - _globals->_inventory._rope._sceneNumber = 4150; + RING_INVENTORY._ladder._sceneNumber = 4100; + RING_INVENTORY._rope._sceneNumber = 4150; _soundHandler1.startSound(156); @@ -1114,7 +1114,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { break; } - if (_globals->_inventory._ladder._sceneNumber == 4000) { + if (RING_INVENTORY._ladder._sceneNumber == 4000) { _ladder.postInit(); _ladder.setVisage(4000); _ladder.setStrip(5); @@ -1123,7 +1123,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) { _globals->_sceneItems.push_back(&_ladder); } - if (_globals->_inventory._rope._sceneNumber == 4000) { + if (RING_INVENTORY._rope._sceneNumber == 4000) { _rope.postInit(); _rope.setVisage(4000); _rope.setStrip(7); @@ -1149,7 +1149,7 @@ void Scene4000::signal() { setAction(&_sequenceManager1, this, 4014, &_globals->_player, &_hotspot5, NULL); break; case 4004: - _globals->_inventory._ladder._sceneNumber = 4000; + RING_INVENTORY._ladder._sceneNumber = 4000; // Deliberate fall-through case 4007: _globals->_player._uiEnabled = true; @@ -1226,7 +1226,7 @@ void Scene4000::dispatch() { } if (!_action) { - if ((_globals->_inventory._peg._sceneNumber == 1) && _globals->getFlag(34) && + if ((RING_INVENTORY._peg._sceneNumber == 1) && _globals->getFlag(34) && _globals->getFlag(37) && !_globals->getFlag(40)) { _globals->_player.disableControl(); _soundHandler1.startSound(177); @@ -1444,7 +1444,7 @@ void Scene4025::Hole::doAction(int action) { if (!scene->_pegPtr2) { _globals->_player.disableControl(); _globals->_events.setCursor(CURSOR_USE); - _globals->_inventory._peg._sceneNumber = 4025; + RING_INVENTORY._peg._sceneNumber = 4025; scene->_pegPtr = &scene->_peg5; scene->_holePtr = this; @@ -1627,8 +1627,8 @@ void Scene4025::process(Event &event) { Scene::process(event); if (_gfxButton.process(event)) { - if (_globals->_inventory._peg._sceneNumber == 4025) - _globals->_inventory._peg._sceneNumber = 1; + if (RING_INVENTORY._peg._sceneNumber == 4025) + RING_INVENTORY._peg._sceneNumber = 1; _globals->_sceneManager.changeScene(4000); } @@ -1805,7 +1805,7 @@ void Scene4045::Necklace::doAction(int action) { case CURSOR_USE: if (_globals->_player._position.y < 135) { SceneItem::display2(4045, 16); - _globals->_inventory._peg._sceneNumber = 1; + RING_INVENTORY._peg._sceneNumber = 1; _globals->_events.setCursor(CURSOR_WALK); remove(); } else { @@ -1884,7 +1884,7 @@ void Scene4045::postInit(SceneObjectList *OwnerList) { _olloFace.setPosition(Common::Point(177, 40)); - if (_globals->_inventory._peg._sceneNumber == 4045) { + if (RING_INVENTORY._peg._sceneNumber == 4045) { _necklace.postInit(); _necklace.setVisage(4045); _necklace.setStrip(2); @@ -1917,7 +1917,7 @@ void Scene4045::postInit(SceneObjectList *OwnerList) { _olloFace.setPosition(Common::Point(177, 40)); - if (_globals->_inventory._peg._sceneNumber == 4045) { + if (RING_INVENTORY._peg._sceneNumber == 4045) { _necklace.postInit(); _necklace.setVisage(4045); _necklace.setStrip(2); @@ -2451,15 +2451,15 @@ void Scene4100::Action5::signal() { ADD_PLAYER_MOVER(58, 151); break; case 1: - if (_globals->_inventory._ladder._sceneNumber == 4100) { - _globals->_inventory._ladder._sceneNumber = 1; + if (RING_INVENTORY._ladder._sceneNumber == 4100) { + RING_INVENTORY._ladder._sceneNumber = 1; scene->_ladder.remove(); } else { scene->_ladder.postInit(); scene->_ladder.setVisage(4101); scene->_ladder.setPosition(Common::Point(49, 144)); - _globals->_inventory._ladder._sceneNumber = 4100; + RING_INVENTORY._ladder._sceneNumber = 4100; _globals->_sceneItems.push_front(&scene->_ladder); } @@ -2506,7 +2506,7 @@ void Scene4100::Hotspot1::doAction(int action) { SceneItem::display2(4100, 22); break; case CURSOR_TALK: - if (_globals->_inventory._peg._sceneNumber == 1) { + if (RING_INVENTORY._peg._sceneNumber == 1) { _globals->_player.disableControl(); scene->_sceneMode = 4109; scene->setAction(&scene->_sequenceManager, scene, 4109, NULL); @@ -2670,7 +2670,7 @@ void Scene4100::postInit(SceneObjectList *OwnerList) { _globals->_sceneItems.push_back(&_miranda); } - if (_globals->_inventory._ladder._sceneNumber == 4100) { + if (RING_INVENTORY._ladder._sceneNumber == 4100) { _ladder.postInit(); _ladder.setVisage(4101); _ladder.setPosition(Common::Point(49, 144)); @@ -2710,7 +2710,7 @@ void Scene4100::postInit(SceneObjectList *OwnerList) { _globals->_player.setPosition(Common::Point(252, 139)); _globals->_player.setStrip(2); } else { - if ((_globals->_inventory._ale._sceneNumber == 4100) && !_globals->getFlag(42)) { + if ((RING_INVENTORY._ale._sceneNumber == 4100) && !_globals->getFlag(42)) { _globals->_player.disableControl(); setAction(&_action3); } @@ -2884,15 +2884,15 @@ void Scene4150::Action3::signal() { case 1: _globals->_player.checkAngle(&scene->_hotspot3); - if (_globals->_inventory._rope._sceneNumber == 1) { + if (RING_INVENTORY._rope._sceneNumber == 1) { scene->_hotspot3.postInit(); scene->_hotspot3.setVisage(4150); scene->_hotspot3.setPosition(Common::Point(175, 70)); - _globals->_inventory._rope._sceneNumber = 4150; + RING_INVENTORY._rope._sceneNumber = 4150; _globals->_sceneItems.push_front(&scene->_hotspot3); } else { - _globals->_inventory._rope._sceneNumber = 1; + RING_INVENTORY._rope._sceneNumber = 1; scene->_hotspot3.remove(); } @@ -3026,7 +3026,7 @@ void Scene4150::postInit(SceneObjectList *OwnerList) { _globals->setFlag(44); } - if (_globals->_inventory._rope._sceneNumber == 4150) { + if (RING_INVENTORY._rope._sceneNumber == 4150) { _hotspot3.postInit(); _hotspot3.setVisage(4150); _hotspot3.setPosition(Common::Point(175, 70)); @@ -3213,7 +3213,7 @@ void Scene4250::Action4::signal() { break; case 1: _globals->_player.addMover(NULL); - scene->_stripManager.start((_globals->_inventory._helmet._sceneNumber == 4250) ? 4259 : 4256, this); + scene->_stripManager.start((RING_INVENTORY._helmet._sceneNumber == 4250) ? 4259 : 4256, this); break; case 2: ADD_PLAYER_MOVER(_globals->_player._position.x + 5, _globals->_player._position.y); @@ -3262,7 +3262,7 @@ void Scene4250::Hotspot1::doAction(int action) { switch (action) { case CURSOR_LOOK: - SceneItem::display2(4250, (_globals->_inventory._helmet._sceneNumber == 4250) ? 19 : 14); + SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 19 : 14); break; case CURSOR_TALK: _globals->_player.disableControl(); @@ -3270,7 +3270,7 @@ void Scene4250::Hotspot1::doAction(int action) { scene->setAction(&scene->_action3); } else { scene->_sceneMode = 4260; - if (_globals->_inventory._helmet._sceneNumber == 4250) { + if (RING_INVENTORY._helmet._sceneNumber == 4250) { scene->_sceneMode = 4265; scene->setAction(&scene->_sequenceManager, scene, 4265, this, NULL); } else { @@ -3280,13 +3280,13 @@ void Scene4250::Hotspot1::doAction(int action) { } break; case OBJECT_SCANNER: - if (_globals->_inventory._helmet._sceneNumber == 4250) + if (RING_INVENTORY._helmet._sceneNumber == 4250) SceneItem::display2(4250, 21); else SceneHotspot::doAction(action); break; case OBJECT_STUNNER: - if (_globals->_inventory._helmet._sceneNumber == 4250) + if (RING_INVENTORY._helmet._sceneNumber == 4250) SceneItem::display2(4250, 22); else SceneHotspot::doAction(action); @@ -3331,16 +3331,16 @@ void Scene4250::Hotspot4::doAction(int action) { switch (action) { case CURSOR_LOOK: - SceneItem::display2(4250, (_globals->_inventory._helmet._sceneNumber == 4250) ? 18 : 5); + SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 18 : 5); break; case OBJECT_SCANNER: - if (_globals->_inventory._helmet._sceneNumber == 4250) + if (RING_INVENTORY._helmet._sceneNumber == 4250) SceneItem::display2(4250, 21); else SceneHotspot::doAction(action); break; case OBJECT_STUNNER: - if (_globals->_inventory._helmet._sceneNumber == 4250) + if (RING_INVENTORY._helmet._sceneNumber == 4250) SceneItem::display2(4250, 22); else SceneHotspot::doAction(action); @@ -3353,12 +3353,12 @@ void Scene4250::Hotspot4::doAction(int action) { } else { scene->_sceneMode = 4254; - if (_globals->_inventory._helmet._sceneNumber == 4250) { + if (RING_INVENTORY._helmet._sceneNumber == 4250) { scene->_sceneMode = 4266; scene->setAction(&scene->_sequenceManager, scene, 4266, this, NULL); } else { scene->setAction(&scene->_sequenceManager, scene, - (_globals->_inventory._concentrator._sceneNumber == 1) ? 4255 : 4254, NULL); + (RING_INVENTORY._concentrator._sceneNumber == 1) ? 4255 : 4254, NULL); } } break; @@ -3373,20 +3373,20 @@ void Scene4250::Hotspot6::doAction(int action) { switch (action) { case CURSOR_LOOK: - SceneItem::display2(4250, (_globals->_inventory._helmet._sceneNumber == 4250) ? 7 : 6); + SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 7 : 6); break; case OBJECT_SCANNER: - SceneItem::display2(4250, (_globals->_inventory._helmet._sceneNumber == 4250) ? 1 : 2); + SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 1 : 2); break; case OBJECT_STUNNER: - SceneItem::display2(4250, (_globals->_inventory._helmet._sceneNumber == 4250) ? 20 : 3); + SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 20 : 3); break; case OBJECT_HELMET: _globals->_soundHandler.startSound(354); _globals->_player.disableControl(); - _globals->_inventory._helmet._sceneNumber = 4250; + RING_INVENTORY._helmet._sceneNumber = 4250; - if (_globals->_inventory._concentrator._sceneNumber == 1) { + if (RING_INVENTORY._concentrator._sceneNumber == 1) { if (_globals->getFlag(115)) { scene->_sceneMode = 4269; scene->setAction(&scene->_sequenceManager, scene, 4269, this, NULL); @@ -3395,10 +3395,10 @@ void Scene4250::Hotspot6::doAction(int action) { _globals->_events.setCursor(CURSOR_WALK); scene->setAction(&scene->_sequenceManager, scene, 4256, this, NULL); } - } else if (_globals->_inventory._keyDevice._sceneNumber == 1) { + } else if (RING_INVENTORY._keyDevice._sceneNumber == 1) { scene->_sceneMode = 4267; scene->setAction(&scene->_sequenceManager, scene, 4267, this, NULL); - } else if (_globals->_inventory._keyDevice._sceneNumber == 4300) { + } else if (RING_INVENTORY._keyDevice._sceneNumber == 4300) { scene->_sceneMode = 4268; scene->setAction(&scene->_sequenceManager, scene, 4268, this, NULL); } else { @@ -3409,10 +3409,10 @@ void Scene4250::Hotspot6::doAction(int action) { } break; case OBJECT_NULLIFIER: - if (_globals->_inventory._helmet._sceneNumber == 4250) { + if (RING_INVENTORY._helmet._sceneNumber == 4250) { _globals->_soundHandler.startSound(353); _globals->_player.disableControl(); - _globals->_inventory._helmet._sceneNumber = 1; + RING_INVENTORY._helmet._sceneNumber = 1; scene->_sceneMode = 4257; scene->setAction(&scene->_sequenceManager, scene, 4257, &_globals->_player, this, NULL); @@ -3421,7 +3421,7 @@ void Scene4250::Hotspot6::doAction(int action) { } break; case CURSOR_TALK: - if (_globals->_inventory._helmet._sceneNumber == 4250) + if (RING_INVENTORY._helmet._sceneNumber == 4250) doAction(OBJECT_HELMET); else { _globals->_player.disableControl(); @@ -3430,11 +3430,11 @@ void Scene4250::Hotspot6::doAction(int action) { } break; case CURSOR_USE: - if (_globals->_inventory._helmet._sceneNumber == 4250) + if (RING_INVENTORY._helmet._sceneNumber == 4250) doAction(OBJECT_HELMET); else { _globals->_player.disableControl(); - if ((_globals->_inventory._items._sceneNumber != 1) || (_globals->_inventory._concentrator._sceneNumber != 1)) { + if ((RING_INVENTORY._items._sceneNumber != 1) || (RING_INVENTORY._concentrator._sceneNumber != 1)) { scene->_sceneMode = 4258; scene->setAction(&scene->_sequenceManager, scene, 4258, this, NULL); } else { @@ -3473,7 +3473,7 @@ void Scene4250::Hotspot8::doAction(int action) { _globals->_player.disableControl(); scene->_sceneMode = 4270; scene->setAction(&scene->_sequenceManager, scene, - (_globals->_inventory._helmet._sceneNumber == 4250) ? 4270 : 4271, NULL); + (RING_INVENTORY._helmet._sceneNumber == 4250) ? 4270 : 4271, NULL); break; default: SceneHotspot::doAction(action); @@ -3555,7 +3555,7 @@ void Scene4250::postInit(tSage::SceneObjectList *OwnerList) { _hotspot6.setPriority2(70); _hotspot6.setPosition(Common::Point(261, 175)); - if (_globals->_inventory._helmet._sceneNumber == 4250) { + if (RING_INVENTORY._helmet._sceneNumber == 4250) { _hotspot6.setStrip(6); _hotspot6.setFrame(_hotspot6.getFrameCount()); } @@ -3658,7 +3658,7 @@ void Scene4250::signal() { _globals->_sceneManager.changeScene(9900); break; case 4261: - _globals->_inventory._keyDevice._sceneNumber = 1; + RING_INVENTORY._keyDevice._sceneNumber = 1; _globals->_player.enableControl(); break; } @@ -3804,7 +3804,7 @@ void Scene4300::Hotspot8::doAction(int action) { SceneItem::display2(4300, 19); break; case OBJECT_KEY_DEVICE: - _globals->_inventory._keyDevice._sceneNumber = 4300; + RING_INVENTORY._keyDevice._sceneNumber = 4300; _globals->_scenePalette.addRotation(240, 254, -1); animate(ANIM_MODE_5, NULL); @@ -3820,15 +3820,15 @@ void Scene4300::Hotspot8::doAction(int action) { void Scene4300::Hotspot9::doAction(int action) { switch (action) { case CURSOR_LOOK: - if ((_globals->_inventory._stasisBox2._sceneNumber == 4300) || - (_globals->_inventory._concentrator._sceneNumber == 1)) + if ((RING_INVENTORY._stasisBox2._sceneNumber == 4300) || + (RING_INVENTORY._concentrator._sceneNumber == 1)) SceneItem::display2(4300, 7); else SceneItem::display2(4300, 1); break; case CURSOR_USE: - if ((_globals->_inventory._stasisBox2._sceneNumber == 4300) || - (_globals->_inventory._concentrator._sceneNumber == 1)) + if ((RING_INVENTORY._stasisBox2._sceneNumber == 4300) || + (RING_INVENTORY._concentrator._sceneNumber == 1)) SceneItem::display2(4300, 7); else SceneItem::display2(4300, 3); @@ -3837,8 +3837,8 @@ void Scene4300::Hotspot9::doAction(int action) { SceneItem::display2(4300, 24); break; case OBJECT_SCANNER: - if ((_globals->_inventory._stasisBox2._sceneNumber == 4300) || - (_globals->_inventory._concentrator._sceneNumber != 1)) + if ((RING_INVENTORY._stasisBox2._sceneNumber == 4300) || + (RING_INVENTORY._concentrator._sceneNumber != 1)) SceneItem::display2(4300, 22); else SceneItem::display2(4300, 23); @@ -3884,8 +3884,8 @@ void Scene4300::Hotspot15::signal() { scene->_soundHandler2.startSound(345); _strip = (_globals->_randomSource.getRandomNumber(6) < 2) ? 2 : 1; - if ((_globals->_inventory._stasisBox2._sceneNumber == 4300) || - (_globals->_inventory._concentrator._sceneNumber == 1)) { + if ((RING_INVENTORY._stasisBox2._sceneNumber == 4300) || + (RING_INVENTORY._concentrator._sceneNumber == 1)) { setStrip(1); setFrame(1); animate(ANIM_MODE_NONE, NULL); @@ -3902,8 +3902,8 @@ void Scene4300::Hotspot16::doAction(int action) { SceneItem::display2(4300, 8); break; case CURSOR_USE: - if ((_globals->_inventory._stasisBox2._sceneNumber != 4300) && - (_globals->_inventory._concentrator._sceneNumber != 4300)) { + if ((RING_INVENTORY._stasisBox2._sceneNumber != 4300) && + (RING_INVENTORY._concentrator._sceneNumber != 4300)) { SceneItem::display2(4300, 16); } else { scene->_sceneMode = 4302; @@ -3927,17 +3927,17 @@ void Scene4300::Hotspot17::doAction(int action) { switch (action) { case CURSOR_LOOK: - SceneItem::display2(4300, (_globals->_inventory._stasisBox2._sceneNumber == 4300) ? 17 : 11); + SceneItem::display2(4300, (RING_INVENTORY._stasisBox2._sceneNumber == 4300) ? 17 : 11); break; case CURSOR_USE: - if (_globals->_inventory._stasisBox2._sceneNumber != 4300) + if (RING_INVENTORY._stasisBox2._sceneNumber != 4300) SceneItem::display2(4300, 13); else { _globals->_scenePalette.clearListeners(); remove(); SceneItem::display2(4300, 12); - _globals->_inventory._concentrator._sceneNumber = 1; + RING_INVENTORY._concentrator._sceneNumber = 1; } break; case OBJECT_SCANNER: @@ -3968,8 +3968,8 @@ void Scene4300::Hotspot19::doAction(int action) { SceneItem::display2(4300, 24); break; case CURSOR_USE: - if ((_globals->_inventory._stasisBox2._sceneNumber != 4300) && - (_globals->_inventory._concentrator._sceneNumber != 4300)) + if ((RING_INVENTORY._stasisBox2._sceneNumber != 4300) && + (RING_INVENTORY._concentrator._sceneNumber != 4300)) SceneItem::display2(4300, 10); else SceneItem::display2(4300, 29); @@ -4019,14 +4019,14 @@ void Scene4300::postInit(SceneObjectList *OwnerList) { _globals->_sceneItems.push_back(&_hotspot8); } - if (_globals->_inventory._concentrator._sceneNumber == 4300) { + if (RING_INVENTORY._concentrator._sceneNumber == 4300) { _hotspot17.postInit(); _hotspot17.setVisage(4300); _hotspot17.setStrip(6); _hotspot17.setPriority2(1); _hotspot17.setPosition(Common::Point(200, 69)); - if (_globals->_inventory._stasisBox2._sceneNumber == 4300) + if (RING_INVENTORY._stasisBox2._sceneNumber == 4300) _hotspot17.setFrame(_hotspot17.getFrameCount()); _globals->_sceneItems.push_back(&_hotspot17); @@ -4056,7 +4056,7 @@ void Scene4300::postInit(SceneObjectList *OwnerList) { _hotspot13.animate(ANIM_MODE_8, 0, NULL); } - if (_globals->_inventory._items._sceneNumber == 4300) { + if (RING_INVENTORY._items._sceneNumber == 4300) { _hotspot16.postInit(); _hotspot16.setVisage(4300); _hotspot16.setPosition(Common::Point(169, 141)); @@ -4137,12 +4137,12 @@ void Scene4300::remove() { void Scene4300::signal() { switch (_sceneMode) { case 4302: - _globals->_inventory._items._sceneNumber = 1; + RING_INVENTORY._items._sceneNumber = 1; _hotspot16.remove(); _globals->_player.enableControl(); break; case 4303: - _globals->_inventory._stasisBox2._sceneNumber = 4300; + RING_INVENTORY._stasisBox2._sceneNumber = 4300; _hotspot15.setStrip(1); _hotspot15.setFrame(1); _hotspot15.animate(ANIM_MODE_NONE, NULL); @@ -4372,7 +4372,7 @@ void Scene4301::postInit(SceneObjectList *OwnerList) { setZoomPercents(0, 100, 200, 100); _field68E = false; - _globals->_inventory._stasisBox2._sceneNumber = 1; + RING_INVENTORY._stasisBox2._sceneNumber = 1; _hotspot4.setup(76, 97, 102, 127, 4300, 5, 6); _hotspot1.postInit(); diff --git a/engines/tsage/ringworld_scenes6.cpp b/engines/tsage/ringworld_scenes6.cpp index 5fdb09732a..d748640d96 100644 --- a/engines/tsage/ringworld_scenes6.cpp +++ b/engines/tsage/ringworld_scenes6.cpp @@ -1158,7 +1158,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) { } } - if (_globals->getFlag(60) && (_globals->_inventory._stasisBox._sceneNumber == 1) && + if (_globals->getFlag(60) && (RING_INVENTORY._stasisBox._sceneNumber == 1) && _globals->getFlag(107) && _globals->getFlag(67)) { _hotspot8.postInit(); _hotspot8.setVisage(2806); @@ -1256,7 +1256,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) { _hotspot6.setStrip(6); _hotspot6.setFrame(1); _globals->_sceneItems.push_back(&_hotspot6); - } else if (_globals->_inventory._vial._sceneNumber != 5100) { + } else if (RING_INVENTORY._vial._sceneNumber != 5100) { _hotspot6.postInit(); _hotspot6.setVisage(5362); _hotspot6.setPosition(Common::Point(1152, 70)); @@ -1312,7 +1312,7 @@ void Scene5100::signal() { case 5108: if (!_globals->getFlag(60)) _globals->_player.enableControl(); - else if (_globals->_inventory._stasisBox._sceneNumber == 1) + else if (RING_INVENTORY._stasisBox._sceneNumber == 1) setAction(&_action2); else setAction(&_action5); @@ -1329,7 +1329,7 @@ void Scene5100::signal() { _globals->_player.setPriority2(-1); _globals->_player.animate(ANIM_MODE_1, NULL); - if ((_globals->_inventory._vial._sceneNumber != 5100) && !_globals->getFlag(108)) { + if ((RING_INVENTORY._vial._sceneNumber != 5100) && !_globals->getFlag(108)) { _globals->setFlag(108); _sceneMode = 5130; _globals->_player.disableControl(); @@ -1344,7 +1344,7 @@ void Scene5100::signal() { break; case 5116: _globals->setFlag(105); - _globals->_inventory._bone._sceneNumber = 0; + RING_INVENTORY._bone._sceneNumber = 0; _globals->_player.setObjectWrapper(new SceneObjectWrapper()); _globals->_player.setVisage(0); @@ -1388,7 +1388,7 @@ void Scene5100::dispatch() { _sceneMode = 5150; _soundHandler.startSound(208); - if (_globals->_inventory._vial._sceneNumber == 5100) { + if (RING_INVENTORY._vial._sceneNumber == 5100) { _globals->_player.addMover(NULL); _globals->_player.disableControl(); SceneItem::display2(5100, 39); @@ -1462,7 +1462,7 @@ void Scene5200::Action2::signal() { scene->_soundHandler.proc3(); scene->_hotspot14.remove(); - _globals->_inventory._stasisBox._sceneNumber = 1; + RING_INVENTORY._stasisBox._sceneNumber = 1; _globals->_player.animate(ANIM_MODE_5, this); break; case 3: @@ -1611,7 +1611,7 @@ void Scene5200::postInit(SceneObjectList *OwnerList) { _speakerFLText._textPos.x = 160; _speakerQText._textPos.x = 20; - if (_globals->_inventory._stasisBox._sceneNumber == 5200) { + if (RING_INVENTORY._stasisBox._sceneNumber == 5200) { _soundHandler.startSound(216); _soundHandler.proc5(true); @@ -1762,7 +1762,7 @@ void Scene5300::Action1::signal() { scene->_stripManager.start(5316, this); break; case 5: - if (!_globals->getFlag(106) || !_globals->getFlag(107) || (_globals->_inventory._stasisBox._sceneNumber != 1)) { + if (!_globals->getFlag(106) || !_globals->getFlag(107) || (RING_INVENTORY._stasisBox._sceneNumber != 1)) { _globals->_player.enableControl(); remove(); } else { @@ -1793,7 +1793,7 @@ void Scene5300::Action2::signal() { scene->_stripManager.start(5328, this); break; case 2: - if (_globals->_inventory._stasisBox._sceneNumber == 1) { + if (RING_INVENTORY._stasisBox._sceneNumber == 1) { _globals->_stripNum = 5303; setDelay(5); } else { @@ -1871,7 +1871,7 @@ void Scene5300::Hotspot2::doAction(int action) { } else { _globals->_player.disableControl(); - if (_globals->_inventory._stasisBox._sceneNumber != 1) { + if (RING_INVENTORY._stasisBox._sceneNumber != 1) { scene->setAction(&scene->_sequenceManager, scene, 5316, NULL); } else { _globals->setFlag(60); @@ -1898,7 +1898,7 @@ void Scene5300::Hotspot2::doAction(int action) { if (_globals->getFlag(107)) { SceneItem::display2(5300, 8); } else { - _globals->_inventory._vial._sceneNumber = 5300; + RING_INVENTORY._vial._sceneNumber = 5300; _globals->setFlag(107); _globals->_player.disableControl(); scene->_sceneMode = 5304; @@ -1920,7 +1920,7 @@ void Scene5300::Hotspot5::doAction(int action) { SceneItem::display2(5300, 27); break; case CURSOR_USE: - _globals->_inventory._bone._sceneNumber = 1; + RING_INVENTORY._bone._sceneNumber = 1; _globals->_player.disableControl(); scene->_sceneMode = 5309; @@ -1937,20 +1937,20 @@ void Scene5300::Hotspot6::doAction(int action) { switch (action) { case CURSOR_LOOK: - if (!_globals->getFlag(105) || (_globals->_inventory._vial._sceneNumber == 1)) + if (!_globals->getFlag(105) || (RING_INVENTORY._vial._sceneNumber == 1)) SceneItem::display2(5300, 4); else SceneItem::display2(5300, 26); break; case CURSOR_USE: - if (!_globals->getFlag(105) || (_globals->_inventory._vial._sceneNumber != 5100)) { + if (!_globals->getFlag(105) || (RING_INVENTORY._vial._sceneNumber != 5100)) { _globals->_player.disableControl(); scene->_sceneMode = 5301; scene->setAction(&scene->_sequenceManager, scene, 5301, &_globals->_player, NULL); } else { _globals->_player.disableControl(); scene->_sceneMode = 5307; - _globals->_inventory._vial._sceneNumber = 1; + RING_INVENTORY._vial._sceneNumber = 1; scene->setAction(&scene->_sequenceManager, scene, 5307, &scene->_hotspot1, &_globals->_player, &scene->_hotspot4, NULL); @@ -2091,7 +2091,7 @@ void Scene5300::postInit(SceneObjectList *OwnerList) { } _field1B0A = 1; - if (_globals->_inventory._bone._sceneNumber == 5300) { + if (RING_INVENTORY._bone._sceneNumber == 5300) { _hotspot5.postInit(); _hotspot5.setVisage(5301); _hotspot5.setStrip(2); @@ -2143,7 +2143,7 @@ void Scene5300::signal() { _globals->clearFlag(67); _globals->_player.setStrip2(-1); - if ((_globals->_inventory._vial._sceneNumber == 1) || (_globals->_inventory._vial._sceneNumber == 5300)) + if ((RING_INVENTORY._vial._sceneNumber == 1) || (RING_INVENTORY._vial._sceneNumber == 5300)) _stripManager.start(5303, this); else _stripManager.start(5302, this); diff --git a/engines/tsage/ringworld_scenes8.cpp b/engines/tsage/ringworld_scenes8.cpp index 35db3cd387..651f8f73c5 100644 --- a/engines/tsage/ringworld_scenes8.cpp +++ b/engines/tsage/ringworld_scenes8.cpp @@ -353,9 +353,9 @@ void Scene7000::Object1::doAction(int action) { switch (action) { case OBJECT_TRANSLATOR: _globals->_player.disableControl(); - _globals->_inventory._translator._sceneNumber = 7000; - if (_globals->_inventory._waldos._sceneNumber == 7000) { - if (_globals->_inventory._jar._sceneNumber == 7000) { + 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 { @@ -363,7 +363,7 @@ void Scene7000::Object1::doAction(int action) { scene->setAction(&scene->_sequenceManager, scene, 7017, &_globals->_player, 0, 0); } } else { - if (_globals->_inventory._jar._sceneNumber == 7000) { + if (RING_INVENTORY._jar._sceneNumber == 7000) { scene->_sceneMode = 7011; scene->setAction(&scene->_sequenceManager, scene, 7010, &_globals->_player, &scene->_object1, 0, 0); } else { @@ -374,9 +374,9 @@ void Scene7000::Object1::doAction(int action) { break; case OBJECT_WALDOS: _globals->_player.disableControl(); - _globals->_inventory._waldos._sceneNumber = 7000; - if (_globals->_inventory._translator._sceneNumber == 7000) { - if (_globals->_inventory._jar._sceneNumber == 7000) { + RING_INVENTORY._waldos._sceneNumber = 7000; + 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); } else { @@ -390,9 +390,9 @@ void Scene7000::Object1::doAction(int action) { break; case OBJECT_JAR: _globals->_player.disableControl(); - _globals->_inventory._jar._sceneNumber = 7000; - if (_globals->_inventory._translator._sceneNumber == 7000) { - if (_globals->_inventory._waldos._sceneNumber == 7000) { + RING_INVENTORY._jar._sceneNumber = 7000; + if (RING_INVENTORY._translator._sceneNumber == 7000) { + if (RING_INVENTORY._waldos._sceneNumber == 7000) { scene->_sceneMode = 7007; scene->setAction(&scene->_sequenceManager, scene, 7007, &_globals->_player, &scene->_object1, 0, 0); } else { @@ -412,7 +412,7 @@ void Scene7000::Object1::doAction(int action) { break; case CURSOR_USE: if (_globals->getFlag(81)) { - _globals->_inventory._stasisBox._sceneNumber = 1; + RING_INVENTORY._stasisBox._sceneNumber = 1; _globals->_player.disableControl(); scene->setAction(&scene->_action5); } else { @@ -421,7 +421,7 @@ void Scene7000::Object1::doAction(int action) { break; case CURSOR_TALK: if (_globals->getFlag(81)) { - _globals->_inventory._stasisBox._sceneNumber = 1; + RING_INVENTORY._stasisBox._sceneNumber = 1; _globals->_player.disableControl(); scene->setAction(&scene->_action5); } else if (_globals->getFlag(52)) { @@ -1316,7 +1316,7 @@ void Scene7300::Action1::signal() { _globals->_player.setStrip(3); _globals->_player._numFrames = 5; _globals->_player.animate(ANIM_MODE_2, this); - if (_globals->_inventory._translator._sceneNumber == 1) + if (RING_INVENTORY._translator._sceneNumber == 1) scene->_stripManager.start(7310, this); else scene->_stripManager.start(7305, this); @@ -1755,10 +1755,10 @@ void Scene7700::SceneHotspot3::doAction(int action) { switch (action) { case OBJECT_KEY: SceneItem::display(7702, 3, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); - _globals->_inventory._key._sceneNumber = 7700; + RING_INVENTORY._key._sceneNumber = 7700; break; case CURSOR_LOOK: - if (_globals->_inventory._key._sceneNumber == 7700) + if (RING_INVENTORY._key._sceneNumber == 7700) scene->setAction(&scene->_action4, 0); else SceneItem::display(7700, 53, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END); @@ -1767,7 +1767,7 @@ void Scene7700::SceneHotspot3::doAction(int action) { if (!_globals->getFlag(78)) { scene->_sceneMode = 7712; scene->setAction(&scene->_sequenceManager, scene, 7715, 0); - } else if (_globals->_inventory._key._sceneNumber == 7700) { + } else if (RING_INVENTORY._key._sceneNumber == 7700) { _globals->_player.disableControl(); scene->_sceneMode = 7705; scene->setAction(&scene->_sequenceManager, scene, 7705, &_globals->_player, 0); @@ -1809,7 +1809,7 @@ void Scene7700::SceneHotspot5::doAction(int action) { break; case CURSOR_USE: if (_globals->getFlag(78)) { - if (_globals->_inventory._paper._sceneNumber == 7700) { + if (RING_INVENTORY._paper._sceneNumber == 7700) { _globals->_player.disableControl(); scene->_sceneMode = 7708; scene->setAction(&scene->_sequenceManager, scene, 7708, &_globals->_player, 0); @@ -2156,8 +2156,8 @@ void Scene7700::Object11::doAction(int action) { } break; case OBJECT_EMPTY_JAR: - _globals->_inventory._emptyJar._sceneNumber = 0; - _globals->_inventory._jar._sceneNumber = 1; + RING_INVENTORY._emptyJar._sceneNumber = 0; + RING_INVENTORY._jar._sceneNumber = 1; _globals->_player.disableControl(); scene->_sceneMode = 7710; scene->setAction(&scene->_sequenceManager, scene, 7710, &_globals->_player, NULL); @@ -2217,7 +2217,7 @@ void Scene7700::signal() { break; case 7705: case 7708: - _globals->_inventory._key._sceneNumber = 1; + RING_INVENTORY._key._sceneNumber = 1; _globals->_player.enableControl(); break; case 7709: @@ -2229,7 +2229,7 @@ void Scene7700::signal() { break; case 7713: _emptyJar.remove(); - _globals->_inventory._emptyJar._sceneNumber = 1; + RING_INVENTORY._emptyJar._sceneNumber = 1; break; default: break; @@ -2387,7 +2387,7 @@ void Scene7700::postInit(SceneObjectList *OwnerList) { if (_globals->getFlag(49)) _cork.setFrame(_cork.getFrameCount()); - if (_globals->_inventory._emptyJar._sceneNumber == 7700) { + if (RING_INVENTORY._emptyJar._sceneNumber == 7700) { _emptyJar.postInit(); _emptyJar.setVisage(7700); _emptyJar.setStrip(8); diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp index ba88a0b4a0..16756f59fa 100644 --- a/engines/tsage/tsage.cpp +++ b/engines/tsage/tsage.cpp @@ -73,7 +73,8 @@ void TSageEngine::initialise() { // Set up the resource manager _resourceManager = new ResourceManager(); if (_vm->getFeatures() & GF_DEMO) { - _resourceManager->addLib("DEMORING.RLB"); + // Add the single library file associated with the demo + _resourceManager->addLib(getPrimaryFilename()); } else { _resourceManager->addLib("RING.RLB"); _resourceManager->addLib("TSAGE.RLB"); @@ -96,7 +97,7 @@ Common::Error TSageEngine::run() { _globals->_events.showCursor(); _globals->_sceneHandler.registerHandler(); - _globals->_game.execute(); + _globals->_game->execute(); deinitialise(); return Common::kNoError; diff --git a/engines/tsage/tsage.h b/engines/tsage/tsage.h index 7be171c56a..e5b92e09d0 100644 --- a/engines/tsage/tsage.h +++ b/engines/tsage/tsage.h @@ -78,6 +78,7 @@ public: const char *getGameId() const; uint32 getGameID() const; uint32 getFeatures() const; + Common::String getPrimaryFilename() const; virtual Common::Error init(); virtual Common::Error run(); |