[Scummvm-cvs-logs] SF.net SVN: scummvm:[47121] scummvm/trunk/engines/sci
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Thu Jan 7 16:25:03 CET 2010
Revision: 47121
http://scummvm.svn.sourceforge.net/scummvm/?rev=47121&view=rev
Author: m_kiewitz
Date: 2010-01-07 15:25:03 +0000 (Thu, 07 Jan 2010)
Log Message:
-----------
SCI: changed kernel signature for kDrawCel, enabled upscaled hires savebox code ("crashed" before because afterwards kDrawCel will get the handle from the savebox call)
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel.cpp
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/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp 2010-01-07 15:12:20 UTC (rev 47120)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp 2010-01-07 15:25:03 UTC (rev 47121)
@@ -201,7 +201,7 @@
/*0e*/ DEFUN("NumCels", kNumCels, "o"),
/*0f*/ DEFUN("CelWide", kCelWide, "iOi*"),
/*10*/ DEFUN("CelHigh", kCelHigh, "iOi*"),
- /*11*/ DEFUN("DrawCel", kDrawCel, "iiiiii*"),
+ /*11*/ DEFUN("DrawCel", kDrawCel, "iiiiiii*r*"),
/*12*/ DEFUN("AddToPic", kAddToPic, "Il*"),
// FIXME: signature check removed (set to .*) as kNewWindow is different in Mac versions
/*13*/ DEFUN("NewWindow", kNewWindow, "*."),
@@ -658,6 +658,7 @@
case SEG_TYPE_STACK:
case SEG_TYPE_SYS_STRINGS:
case SEG_TYPE_DYNMEM:
+ case SEG_TYPE_HUNK:
#ifdef ENABLE_SCI32
case SEG_TYPE_ARRAY:
case SEG_TYPE_STRING:
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-01-07 15:12:20 UTC (rev 47120)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-01-07 15:25:03 UTC (rev 47121)
@@ -281,15 +281,9 @@
break;
case K_GRAPH_SAVE_UPSCALEDHIRES_BOX:
- warning("kGraph case 15 (%d, %d, %d, %d)", x, y, x1, y1);
+ kGraphCreateRect(x, y, x1, y1, &rect);
+ return s->_gui->graphSaveUpscaledHiresBox(rect);
- // TODO: implement this properly. The code below crashes KQ6
-
- // Save an area given in upscaled-hires coordinates, so that a hires control will be drawn over it
- //kGraphCreateRect(x, y, x1, y1, &rect);
- //return s->_gui->graphSaveUpscaledHiresBox(rect);
- break;
-
default:
warning("Unsupported kGraph() operation %04x", argv[0].toSint16());
}
@@ -915,9 +909,9 @@
uint16 y = argv[4].toUint16();
int16 priority = (argc > 5) ? argv[5].toSint16() : -1;
uint16 paletteNo = (argc > 6) ? argv[6].toUint16() : 0;
- int16 origHeight = (argc > 7) ? argv[7].toSint16() : -1;
+ bool upscaledHires = (argc > 7) ? true : false; // actual parameter is MemoryHandle to saved upscaled hires rect
- s->_gui->drawCel(viewId, loopNo, celNo, x, y, priority, paletteNo, origHeight);
+ s->_gui->drawCel(viewId, loopNo, celNo, x, y, priority, paletteNo, upscaledHires);
return s->r_acc;
}
Modified: scummvm/trunk/engines/sci/graphics/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.cpp 2010-01-07 15:12:20 UTC (rev 47120)
+++ scummvm/trunk/engines/sci/graphics/gui.cpp 2010-01-07 15:25:03 UTC (rev 47121)
@@ -367,8 +367,8 @@
_gfx->SetPort(oldPort);
}
-void SciGui::drawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, int16 origHeight) {
- if (origHeight == -1)
+void SciGui::drawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool upscaledHires) {
+ if (!upscaledHires)
_gfx->drawCelAndShow(viewId, loopNo, celNo, leftPos, topPos, priority, paletteNo);
else
_gfx->drawHiresCelAndShow(viewId, loopNo, celNo, leftPos, topPos, priority, paletteNo);
Modified: scummvm/trunk/engines/sci/graphics/gui.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.h 2010-01-07 15:12:20 UTC (rev 47120)
+++ scummvm/trunk/engines/sci/graphics/gui.h 2010-01-07 15:25:03 UTC (rev 47121)
@@ -88,7 +88,7 @@
virtual reg_t menuSelect(reg_t eventObject);
virtual void drawPicture(GuiResourceId pictureId, int16 animationNr, bool animationBlackoutFlag, bool mirroredFlag, bool addToFlag, int16 EGApaletteNo);
- virtual void drawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, int16 origHeight = -1);
+ virtual void drawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool upscaledHires = false);
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);
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