SCI: changed kernel signature for kDrawCel, enabled upscaled hires savebox code ("crashed" before because afterwards kDrawCel will get the handle from the savebox call)
svn-id: r47121
This commit is contained in:
parent
32ec5746be
commit
7f358e3bbd
4 changed files with 9 additions and 14 deletions
|
@ -201,7 +201,7 @@ SciKernelFunction kfunct_mappers[] = {
|
|||
/*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 @@ int determine_reg_type(SegManager *segMan, reg_t reg) {
|
|||
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:
|
||||
|
|
|
@ -281,14 +281,8 @@ reg_t kGraph(EngineState *s, int argc, reg_t *argv) {
|
|||
break;
|
||||
|
||||
case K_GRAPH_SAVE_UPSCALEDHIRES_BOX:
|
||||
warning("kGraph case 15 (%d, %d, %d, %d)", x, y, x1, y1);
|
||||
|
||||
// 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;
|
||||
kGraphCreateRect(x, y, x1, y1, &rect);
|
||||
return s->_gui->graphSaveUpscaledHiresBox(rect);
|
||||
|
||||
default:
|
||||
warning("Unsupported kGraph() operation %04x", argv[0].toSint16());
|
||||
|
@ -915,9 +909,9 @@ reg_t kDrawCel(EngineState *s, int argc, reg_t *argv) {
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -367,8 +367,8 @@ void SciGui::drawPicture(GuiResourceId pictureId, int16 animationNr, bool animat
|
|||
_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);
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue