diff options
-rw-r--r-- | engines/tsage/graphics.cpp | 7 | ||||
-rw-r--r-- | engines/tsage/graphics.h | 1 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_dialogs.cpp | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index ee015e3315..32810626e7 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -1070,9 +1070,16 @@ bool GfxButton::process(Event &event) { GfxDialog::GfxDialog() { _savedArea = NULL; _defaultButton = NULL; + + // For Return to Ringworld 2, backup palette when showing a dialog + if (g_vm->getGameID() == GType_Ringworld2) + g_system->getPaletteManager()->grabPalette(&_savedPalette[0], 0, 256); } GfxDialog::~GfxDialog() { + if (g_vm->getGameID() == GType_Ringworld2) + g_system->getPaletteManager()->setPalette(&_savedPalette[0], 0, 256); + remove(); } diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h index 8d9c4d31b1..497cd76ad6 100644 --- a/engines/tsage/graphics.h +++ b/engines/tsage/graphics.h @@ -320,6 +320,7 @@ public: GfxElementList _elements; GfxButton *_defaultButton; GfxSurface *_savedArea; + byte _savedPalette[256 * 3]; public: GfxDialog(); virtual ~GfxDialog(); diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.cpp b/engines/tsage/ringworld2/ringworld2_dialogs.cpp index 4ebbdd602d..7c97aa041c 100644 --- a/engines/tsage/ringworld2/ringworld2_dialogs.cpp +++ b/engines/tsage/ringworld2/ringworld2_dialogs.cpp @@ -344,7 +344,7 @@ CharacterDialog::CharacterDialog() { /*--------------------------------------------------------------------------*/ void HelpDialog::show() { - // Set the palette and change the cursor + // change the cursor R2_GLOBALS._events.setCursor(CURSOR_ARROW); // Create the dialog and draw it |