Skip to content

Commit

Permalink
TSAGE: Fix to prevent saving or loading when conversation dialogs are…
Browse files Browse the repository at this point in the history
… active
  • Loading branch information
dreammaster committed Nov 24, 2013
1 parent a8de5df commit a559e64
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions engines/tsage/converse.cpp
Expand Up @@ -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()) {
Expand Down Expand Up @@ -502,6 +509,7 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) {

// Remove the dialog
remove();
GLOBALS._gfxManagers.remove(&gfxManager);

return _selectedIndex;
}
Expand Down

0 comments on commit a559e64

Please sign in to comment.