aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/converse.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2013-11-24 14:10:33 -0500
committerPaul Gilbert2013-11-24 14:10:33 -0500
commita559e64ca629a2e488c13d72bc4435daf4ebb5c5 (patch)
tree2ccbb859341bc4a22564c08abf945b5535891893 /engines/tsage/converse.cpp
parenta8de5dfad87fe54b9f6cd12d0d70c37b2751939d (diff)
downloadscummvm-rg350-a559e64ca629a2e488c13d72bc4435daf4ebb5c5.tar.gz
scummvm-rg350-a559e64ca629a2e488c13d72bc4435daf4ebb5c5.tar.bz2
scummvm-rg350-a559e64ca629a2e488c13d72bc4435daf4ebb5c5.zip
TSAGE: Fix to prevent saving or loading when conversation dialogs are active
Diffstat (limited to 'engines/tsage/converse.cpp')
-rw-r--r--engines/tsage/converse.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index 2298d28e0d..f7c1dd24e6 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -451,6 +451,13 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) {
draw();
g_globals->_events.showCursor();
+ // WORKAROUND: On-screen dialogs are really meant to use a GfxManager instance
+ // for their lifetime, which prevents saving or loading. Since I don't want to spend a lot
+ // of time refactoring this already working dialog, fake it by putting a dummy gfxmanager at
+ // the end of the gfx manager list so as to prevent saving or loading
+ GfxManager gfxManager;
+ GLOBALS._gfxManagers.push_back(&gfxManager);
+
// Event handling loop
Event event;
while (!g_vm->shouldQuit()) {
@@ -502,6 +509,7 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) {
// Remove the dialog
remove();
+ GLOBALS._gfxManagers.remove(&gfxManager);
return _selectedIndex;
}