[Scummvm-cvs-logs] SF.net SVN: scummvm:[47445] scummvm/trunk/engines/sci
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Fri Jan 22 23:34:14 CET 2010
Revision: 47445
http://scummvm.svn.sourceforge.net/scummvm/?rev=47445&view=rev
Author: m_kiewitz
Date: 2010-01-22 22:34:14 +0000 (Fri, 22 Jan 2010)
Log Message:
-----------
SCI: restoring r47412, we were right all along but this "hack" was done on the sierra sci interpreter for jones ega/vga only (talkie NOT included). So this restore does it game specific now, causing no regressions anywhere else. We detect jones/talkie as "jones" as well, may cause regressions for talkie
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/graphics/gui.cpp
scummvm/trunk/engines/sci/graphics/gui.h
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-01-22 19:25:48 UTC (rev 47444)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-01-22 22:34:14 UTC (rev 47445)
@@ -707,6 +707,7 @@
GuiResourceId viewId;
int16 loopNo;
int16 celNo;
+ int16 priority;
reg_t listSeeker;
Common::String *listStrings = NULL;
const char **listEntries = NULL;
@@ -744,9 +745,17 @@
loopNo = (l & 0x80) ? l - 256 : l;
int c = GET_SEL32V(s->_segMan, controlObject, cel);
celNo = (c & 0x80) ? c - 256 : c;
+ // Game-specific: *ONLY* the jones EGA/VGA sierra interpreter contain code using priority selector
+ // ALL other games use a hardcoded -1 (madness!)
+ // We are detecting jones/talkie as "jones" as well, but the sierra interpreter of talkie doesnt have this
+ // "hack". Hopefully it wont cause regressions (the code causes regressions if used against kq5/floppy)
+ if (s->_gameId == "jones")
+ priority = GET_SEL32V(s->_segMan, controlObject, priority);
+ else
+ priority = -1;
}
debugC(2, kDebugLevelGraphics, "drawing icon control %04x:%04x to %d,%d\n", PRINT_REG(controlObject), x, y - 1);
- s->_gui->drawControlIcon(rect, controlObject, viewId, loopNo, celNo, style, hilite);
+ s->_gui->drawControlIcon(rect, controlObject, viewId, loopNo, celNo, priority, style, hilite);
return;
case SCI_CONTROLS_TYPE_LIST:
Modified: scummvm/trunk/engines/sci/graphics/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.cpp 2010-01-22 19:25:48 UTC (rev 47444)
+++ scummvm/trunk/engines/sci/graphics/gui.cpp 2010-01-22 22:34:14 UTC (rev 47445)
@@ -445,9 +445,9 @@
_gfx->BitsShow(rect);
}
-void SciGui::drawControlIcon(Common::Rect rect, reg_t obj, GuiResourceId viewId, int16 loopNo, int16 celNo, int16 style, bool hilite) {
+void SciGui::drawControlIcon(Common::Rect rect, reg_t obj, GuiResourceId viewId, int16 loopNo, int16 celNo, int16 priority, int16 style, bool hilite) {
if (!hilite) {
- _gfx->drawCelAndShow(viewId, loopNo, celNo, rect.left, rect.top, 255, 0);
+ _gfx->drawCelAndShow(viewId, loopNo, celNo, rect.left, rect.top, priority, 0);
if (style & 0x20) {
_gfx->FrameRect(rect);
}
Modified: scummvm/trunk/engines/sci/graphics/gui.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.h 2010-01-22 19:25:48 UTC (rev 47444)
+++ scummvm/trunk/engines/sci/graphics/gui.h 2010-01-22 22:34:14 UTC (rev 47445)
@@ -92,7 +92,7 @@
virtual void drawControlButton(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 style, bool hilite);
virtual void drawControlText(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 alignment, int16 style, bool hilite);
virtual void drawControlTextEdit(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 mode, int16 style, int16 cursorPos, int16 maxChars, bool hilite);
- virtual void drawControlIcon(Common::Rect rect, reg_t obj, GuiResourceId viewId, int16 loopNo, int16 celNo, int16 style, bool hilite);
+ virtual void drawControlIcon(Common::Rect rect, reg_t obj, GuiResourceId viewId, int16 loopNo, int16 celNo, int16 priority, int16 style, bool hilite);
virtual void drawControlList(Common::Rect rect, reg_t obj, int16 maxChars, int16 count, const char **entries, GuiResourceId fontId, int16 style, int16 upperPos, int16 cursorPos, bool isAlias, bool hilite);
virtual void editControl(reg_t controlObject, reg_t eventObject);
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