aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-17 23:09:06 -0400
committerPaul Gilbert2016-07-10 16:11:27 -0400
commit5316951ba6e4403a388e49a1e23fc7858d1c3980 (patch)
treec50fcd41ccf73a2406967da2cebf8909b5d3c8f6 /engines
parent456287945099266e624dd2802a567579c4d355ea (diff)
downloadscummvm-rg350-5316951ba6e4403a388e49a1e23fc7858d1c3980.tar.gz
scummvm-rg350-5316951ba6e4403a388e49a1e23fc7858d1c3980.tar.bz2
scummvm-rg350-5316951ba6e4403a388e49a1e23fc7858d1c3980.zip
TITANIC: Fix item debugger command to immediately show PET inventory
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/debugger.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/titanic/debugger.cpp b/engines/titanic/debugger.cpp
index e532a9b0f4..e02f1c8f64 100644
--- a/engines/titanic/debugger.cpp
+++ b/engines/titanic/debugger.cpp
@@ -210,6 +210,9 @@ bool Debugger::cmdPET(int argc, const char **argv) {
}
bool Debugger::cmdItem(int argc, const char **argv) {
+ CGameManager &gameManager = *g_vm->_window->_gameManager;
+ CGameState &gameState = gameManager._gameState;
+
if (argc == 1) {
// No parameters, so list the available items
debugPrintf("item [<name> [ add ]]\n");
@@ -243,11 +246,11 @@ bool Debugger::cmdItem(int argc, const char **argv) {
debugPrintf("Current location: %s\n", fullName.c_str());
} else if (CString(argv[2]) == "add") {
- CPetControl *pet = item->getPetControl();
- assert(pet);
-
- pet->_visible = true;
+ // Ensure the PET is active and add the item to the inventory
+ gameState._petActive = true;
+ gameManager.initBounds();
item->addToInventory();
+
return false;
} else {
debugPrintf("Unknown command\n");