diff options
author | Martin Kiewitz | 2010-01-20 21:59:12 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-20 21:59:12 +0000 |
commit | e85d2a023d6603b919ae49fe89f5fc487c817154 (patch) | |
tree | 15284414720872da0d71181e0d4c56ddcfb456c3 /engines/sci | |
parent | 99896e8a45ee12962e6e60d7cbbf97280e4d9c23 (diff) | |
download | scummvm-rg350-e85d2a023d6603b919ae49fe89f5fc487c817154.tar.gz scummvm-rg350-e85d2a023d6603b919ae49fe89f5fc487c817154.tar.bz2 scummvm-rg350-e85d2a023d6603b919ae49fe89f5fc487c817154.zip |
SCI: control icons now use objects priority selector instead of hardcoded priority 255. fixes jones speech bubbles
svn-id: r47412
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 4 | ||||
-rw-r--r-- | engines/sci/graphics/gui.cpp | 4 | ||||
-rw-r--r-- | engines/sci/graphics/gui.h | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 47415e7565..cb58e5267d 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -707,6 +707,7 @@ void _k_GenericDrawControl(EngineState *s, reg_t controlObject, bool hilite) { GuiResourceId viewId; int16 loopNo; int16 celNo; + int16 priority; reg_t listSeeker; Common::String *listStrings = NULL; const char **listEntries = NULL; @@ -744,9 +745,10 @@ void _k_GenericDrawControl(EngineState *s, reg_t controlObject, bool hilite) { loopNo = (l & 0x80) ? l - 256 : l; int c = GET_SEL32V(s->_segMan, controlObject, cel); celNo = (c & 0x80) ? c - 256 : c; + priority = GET_SEL32V(s->_segMan, controlObject, priority); } 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: diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp index ae73419f6c..04b8a75fc0 100644 --- a/engines/sci/graphics/gui.cpp +++ b/engines/sci/graphics/gui.cpp @@ -445,9 +445,9 @@ void SciGui::drawControlTextEdit(Common::Rect rect, reg_t obj, const char *text, _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); } diff --git a/engines/sci/graphics/gui.h b/engines/sci/graphics/gui.h index cf35865c5d..b61b0d5268 100644 --- a/engines/sci/graphics/gui.h +++ b/engines/sci/graphics/gui.h @@ -92,7 +92,7 @@ public: 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); |