[Scummvm-cvs-logs] scummvm master -> 8ec78f4ed0facebe757b7cd120cdf25e65ec014b
dreammaster
dreammaster at scummvm.org
Sat Nov 2 17:35:37 CET 2013
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8ec78f4ed0 TSAGE: Set R2R dialogs to restore the palette after closing
Commit: 8ec78f4ed0facebe757b7cd120cdf25e65ec014b
https://github.com/scummvm/scummvm/commit/8ec78f4ed0facebe757b7cd120cdf25e65ec014b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2013-11-02T09:35:00-07:00
Commit Message:
TSAGE: Set R2R dialogs to restore the palette after closing
Changed paths:
engines/tsage/graphics.cpp
engines/tsage/graphics.h
engines/tsage/ringworld2/ringworld2_dialogs.cpp
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index ee015e3..3281062 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 8d9c4d3..497cd76 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 4ebbdd6..7c97aa0 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
More information about the Scummvm-git-logs
mailing list