diff options
author | Paul Gilbert | 2013-11-02 12:35:00 -0400 |
---|---|---|
committer | Paul Gilbert | 2013-11-02 12:35:00 -0400 |
commit | 8ec78f4ed0facebe757b7cd120cdf25e65ec014b (patch) | |
tree | 18ae415d0f734daa7b085d72a7b416f36ace9fdc /engines/tsage | |
parent | f9c64c48eceea1f9184003a712d9085b0fe93c39 (diff) | |
download | scummvm-rg350-8ec78f4ed0facebe757b7cd120cdf25e65ec014b.tar.gz scummvm-rg350-8ec78f4ed0facebe757b7cd120cdf25e65ec014b.tar.bz2 scummvm-rg350-8ec78f4ed0facebe757b7cd120cdf25e65ec014b.zip |
TSAGE: Set R2R dialogs to restore the palette after closing
Diffstat (limited to 'engines/tsage')
-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 |