[Scummvm-cvs-logs] SF.net SVN: scummvm:[44658] scummvm/trunk/engines/sci
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Mon Oct 5 13:42:13 CEST 2009
Revision: 44658
http://scummvm.svn.sourceforge.net/scummvm/?rev=44658&view=rev
Author: m_kiewitz
Date: 2009-10-05 11:42:04 +0000 (Mon, 05 Oct 2009)
Log Message:
-----------
SCI/newgui: kDrawControl on icon implemented
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/gui/gui.cpp
scummvm/trunk/engines/sci/gui/gui.h
scummvm/trunk/engines/sci/gui32/gui32.cpp
scummvm/trunk/engines/sci/gui32/gui32.h
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-10-05 10:27:00 UTC (rev 44657)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-10-05 11:42:04 UTC (rev 44658)
@@ -1451,13 +1451,10 @@
break;
case K_CONTROL_ICON:
-
debugC(2, kDebugLevelGraphics, "drawing icon control %04x:%04x to %d,%d\n", PRINT_REG(obj), x, y - 1);
+ s->gui->drawControlIcon(rect, obj, view, loop, cel, state, inverse);
+ return;
- ADD_TO_CURRENT_PICTURE_PORT(sciw_new_icon_control(s->port, obj, area, view, loop, cel,
- (int8)(state & kControlStateFramed), (int8)inverse));
- break;
-
case K_CONTROL_CONTROL:
case K_CONTROL_CONTROL_ALIAS: {
int entries_nr;
Modified: scummvm/trunk/engines/sci/gui/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui.cpp 2009-10-05 10:27:00 UTC (rev 44657)
+++ scummvm/trunk/engines/sci/gui/gui.cpp 2009-10-05 11:42:04 UTC (rev 44658)
@@ -281,6 +281,13 @@
_screen->updateScreen();
}
+void SciGui::drawControlIcon(Common::Rect rect, reg_t obj, GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, int16 style, bool inverse) {
+ _gfx->drawCel(viewId, loopNo, celNo, rect.left, rect.top, 255, 0);
+ if (style & 0x20) {
+ _gfx->FrameRect(rect);
+ }
+}
+
void SciGui::graphFillBoxForeground(Common::Rect rect) {
_gfx->PaintRect(rect);
_screen->updateScreen();
Modified: scummvm/trunk/engines/sci/gui/gui.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui.h 2009-10-05 10:27:00 UTC (rev 44657)
+++ scummvm/trunk/engines/sci/gui/gui.h 2009-10-05 11:42:04 UTC (rev 44658)
@@ -65,6 +65,7 @@
virtual void drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo);
virtual void drawControlButton(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 style, bool inverse);
virtual void drawControlText(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 mode, int16 style, bool inverse);
+ virtual void drawControlIcon(Common::Rect rect, reg_t obj, GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, int16 style, bool inverse);
virtual void graphFillBoxForeground(Common::Rect rect);
virtual void graphFillBoxBackground(Common::Rect rect);
Modified: scummvm/trunk/engines/sci/gui32/gui32.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui32/gui32.cpp 2009-10-05 10:27:00 UTC (rev 44657)
+++ scummvm/trunk/engines/sci/gui32/gui32.cpp 2009-10-05 11:42:04 UTC (rev 44658)
@@ -584,6 +584,14 @@
if (!s->pic_not_valid) FULL_REDRAW();
}
+void SciGui32::drawControlIcon(Common::Rect rect, reg_t obj, GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo cellNo, int16 style, bool inverse) {
+ rect_t area = gfx_rect(rect.left, rect.top, rect.width(), rect.height());
+
+ ADD_TO_CURRENT_PICTURE_PORT(sciw_new_icon_control(s->port, obj, area, viewId, loopNo, cellNo,
+ (int8)(style & kControlStateFramed), (int8)inverse));
+ if (!s->pic_not_valid) FULL_REDRAW();
+}
+
static gfx_color_t graph_map_color(EngineState *s, int color, int priority, int control) {
gfx_color_t retval;
Modified: scummvm/trunk/engines/sci/gui32/gui32.h
===================================================================
--- scummvm/trunk/engines/sci/gui32/gui32.h 2009-10-05 10:27:00 UTC (rev 44657)
+++ scummvm/trunk/engines/sci/gui32/gui32.h 2009-10-05 11:42:04 UTC (rev 44658)
@@ -60,6 +60,7 @@
void drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo);
void drawControlButton(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 style, bool inverse);
void drawControlText(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 mode, int16 style, bool inverse);
+ void drawControlIcon(Common::Rect rect, reg_t obj, GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo, int16 style, bool inverse);
void graphFillBoxForeground(Common::Rect rect);
void graphFillBoxBackground(Common::Rect rect);
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