diff options
-rw-r--r-- | engines/sci/gui/gui_gfx.cpp | 9 | ||||
-rw-r--r-- | engines/sci/gui/gui_palette.cpp | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp index 4092d364ae..6342e39d2b 100644 --- a/engines/sci/gui/gui_gfx.cpp +++ b/engines/sci/gui/gui_gfx.cpp @@ -44,6 +44,8 @@ SciGuiGfx::SciGuiGfx(EngineState *state, SciGuiScreen *screen, SciGuiPalette *pa } SciGuiGfx::~SciGuiGfx() { + delete _mainPort; + delete _menuPort; } void SciGuiGfx::init() { @@ -51,14 +53,13 @@ void SciGuiGfx::init() { _textFonts = NULL; _textFontsCount = 0; _textColors = NULL; _textColorsCount = 0; - // FIXME: _mainPort is never freed - // FIXME: _mainPort has no id, and is not known to the WindowManager -- this could lead to problems + // _mainPort is not known to windowmanager, that's okay according to sierra sci + // its not even used currently in our engine _mainPort = new GuiPort(0); SetPort(_mainPort); OpenPort(_mainPort); - // FIXME: _menuPort is never freed - // FIXME: _menuPort has no id, and is not known to the WindowManager -- this could lead to problems + // _menuPort has actually hardcoded id 0xFFFF. Its not meant to be known to windowmanager according to sierra sci _menuPort = new GuiPort(0); OpenPort(_menuPort); SetFont(0); diff --git a/engines/sci/gui/gui_palette.cpp b/engines/sci/gui/gui_palette.cpp index 9872c659f3..e5254f30c9 100644 --- a/engines/sci/gui/gui_palette.cpp +++ b/engines/sci/gui/gui_palette.cpp @@ -162,8 +162,9 @@ void SciGuiPalette::setEGA() { // Now setting colors 16-254 to the correct mix colors that occur when not doing a dithering run on // finished pictures for (i = 0x10; i <= 0xFE; i++) { - _sysPalette.colors[i].used = 1; - color ^= i << 4; + color = i; + _sysPalette.colors[color].used = 1; + color ^= color << 4; color1 = i & 0x0F; color2 = i >> 4; _sysPalette.colors[color].r = (_sysPalette.colors[color1].r >> 1) + (_sysPalette.colors[color2].r >> 1); _sysPalette.colors[color].g = (_sysPalette.colors[color1].g >> 1) + (_sysPalette.colors[color2].g >> 1); |