diff options
Diffstat (limited to 'engines/sci/gui')
-rw-r--r-- | engines/sci/gui/gui_palette.cpp | 20 | ||||
-rw-r--r-- | engines/sci/gui/gui_palette.h | 2 |
2 files changed, 12 insertions, 10 deletions
diff --git a/engines/sci/gui/gui_palette.cpp b/engines/sci/gui/gui_palette.cpp index 5a237822e1..d30c499d4c 100644 --- a/engines/sci/gui/gui_palette.cpp +++ b/engines/sci/gui/gui_palette.cpp @@ -34,7 +34,7 @@ namespace Sci { -SciGuiPalette::SciGuiPalette(ResourceManager *resMan, SciGuiScreen *screen) +SciGuiPalette::SciGuiPalette(ResourceManager *resMan, SciGuiScreen *screen, bool autoSetPalette) : _resMan(resMan), _screen(screen) { int16 color; @@ -54,14 +54,16 @@ SciGuiPalette::SciGuiPalette(ResourceManager *resMan, SciGuiScreen *screen) _sysPalette.colors[255].g = 255; _sysPalette.colors[255].b = 255; - // Load default palette from resource 999 - if (!setFromResource(999, 2)) { - // if not found, we try to set amiga palette - if (!setAmiga()) { - // if that also doesnt work out, set EGA palette - setEGA(); - } - }; + if (autoSetPalette) { + // Load default palette from resource 999 + if (!setFromResource(999, 2)) { + // if not found, we try to set amiga palette + if (!setAmiga()) { + // if that also doesnt work out, set EGA palette + setEGA(); + } + }; + } // Init _clrPowers used in MatchColor for(color = 0; color < 256; color++) diff --git a/engines/sci/gui/gui_palette.h b/engines/sci/gui/gui_palette.h index 5d7b3ba867..038ced7e2b 100644 --- a/engines/sci/gui/gui_palette.h +++ b/engines/sci/gui/gui_palette.h @@ -33,7 +33,7 @@ namespace Sci { class SciGuiScreen; class SciGuiPalette { public: - SciGuiPalette(ResourceManager *resMan, SciGuiScreen *screen); + SciGuiPalette(ResourceManager *resMan, SciGuiScreen *screen, bool autoSetPalette = true); ~SciGuiPalette(); void createFromData(byte *data, GuiPalette *paletteOut); |