[Scummvm-cvs-logs] SF.net SVN: scummvm:[44790] scummvm/trunk/engines/sci/gui
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Thu Oct 8 20:34:49 CEST 2009
Revision: 44790
http://scummvm.svn.sourceforge.net/scummvm/?rev=44790&view=rev
Author: m_kiewitz
Date: 2009-10-08 18:34:49 +0000 (Thu, 08 Oct 2009)
Log Message:
-----------
SCI/newgui: remarks about _menuPort, uninitialized usage in SciGuiPalette removed, _menuPort and _mainPort get deleted in destructor
Modified Paths:
--------------
scummvm/trunk/engines/sci/gui/gui_gfx.cpp
scummvm/trunk/engines/sci/gui/gui_palette.cpp
Modified: scummvm/trunk/engines/sci/gui/gui_gfx.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-10-08 18:07:49 UTC (rev 44789)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-10-08 18:34:49 UTC (rev 44790)
@@ -44,6 +44,8 @@
}
SciGuiGfx::~SciGuiGfx() {
+ delete _mainPort;
+ delete _menuPort;
}
void SciGuiGfx::init() {
@@ -51,14 +53,13 @@
_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);
Modified: scummvm/trunk/engines/sci/gui/gui_palette.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_palette.cpp 2009-10-08 18:07:49 UTC (rev 44789)
+++ scummvm/trunk/engines/sci/gui/gui_palette.cpp 2009-10-08 18:34:49 UTC (rev 44790)
@@ -162,8 +162,9 @@
// 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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list