aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/dialogs.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2011-04-25 19:39:45 +1000
committerPaul Gilbert2011-04-25 19:39:45 +1000
commitc68641584b8fb45d53307040f0b18d39fe42cf24 (patch)
treeeeca101c11cbcbfd5911c6c8acf16041662a4879 /engines/tsage/dialogs.cpp
parentd0142270b829a56f7c2c8d72ec5569da017ba4c4 (diff)
downloadscummvm-rg350-c68641584b8fb45d53307040f0b18d39fe42cf24.tar.gz
scummvm-rg350-c68641584b8fb45d53307040f0b18d39fe42cf24.tar.bz2
scummvm-rg350-c68641584b8fb45d53307040f0b18d39fe42cf24.zip
TSAGE: Added framework for playing the Ringworld demo
Diffstat (limited to 'engines/tsage/dialogs.cpp')
-rw-r--r--engines/tsage/dialogs.cpp17
1 files changed, 9 insertions, 8 deletions
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();