mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-21 01:05:59 +00:00
SCI: switching to hires kDrawCel when 8th parameter is passed, fixed kDrawCel port adjust - fixes kq6 hires inventory
svn-id: r47217
This commit is contained in:
parent
96068d30d9
commit
da09ee6732
@ -910,9 +910,10 @@ 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;
|
||||
bool hiresMode = (argc > 7) ? true : false;
|
||||
reg_t upscaledHiresHandle = (argc > 7) ? argv[7] : NULL_REG;
|
||||
|
||||
s->_gui->drawCel(viewId, loopNo, celNo, x, y, priority, paletteNo, upscaledHiresHandle);
|
||||
s->_gui->drawCel(viewId, loopNo, celNo, x, y, priority, paletteNo, hiresMode, upscaledHiresHandle);
|
||||
|
||||
return s->r_acc;
|
||||
}
|
||||
|
@ -386,6 +386,7 @@ void Gfx::drawCel(View *view, int16 loopNo, int16 celNo, Common::Rect celRect, b
|
||||
void Gfx::drawHiresCelAndShow(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, byte priority, uint16 paletteNo, uint16 scaleX, uint16 scaleY) {
|
||||
View *view = getView(viewId);
|
||||
Common::Rect celRect, curPortRect, clipRect, clipRectTranslated;
|
||||
Common::Point curPortPos;
|
||||
|
||||
if (view) {
|
||||
celRect.left = leftPos;
|
||||
@ -402,8 +403,9 @@ void Gfx::drawHiresCelAndShow(GuiResourceId viewId, int16 loopNo, int16 celNo, u
|
||||
return;
|
||||
|
||||
clipRectTranslated = clipRect;
|
||||
clipRectTranslated.top += curPortRect.top; clipRectTranslated.bottom += curPortRect.top;
|
||||
clipRectTranslated.left += curPortRect.left; clipRectTranslated.right += curPortRect.left;
|
||||
curPortPos.x = _curPort->left * 2; curPortPos.y = _curPort->top * 2;
|
||||
clipRectTranslated.top += curPortPos.y; clipRectTranslated.bottom += curPortPos.y;
|
||||
clipRectTranslated.left += curPortPos.x; clipRectTranslated.right += curPortPos.x;
|
||||
|
||||
view->draw(celRect, clipRect, clipRectTranslated, loopNo, celNo, priority, paletteNo, true, scaleX, scaleY);
|
||||
if (!_screen->_picNotValidSci11) {
|
||||
|
@ -368,8 +368,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, reg_t upscaledHiresHandle) {
|
||||
if (upscaledHiresHandle.isNull()) {
|
||||
void SciGui::drawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool hiresMode, reg_t upscaledHiresHandle) {
|
||||
if (!hiresMode) {
|
||||
_gfx->drawCelAndShow(viewId, loopNo, celNo, leftPos, topPos, priority, paletteNo);
|
||||
} else {
|
||||
if ((leftPos == 0) && (topPos == 0)) {
|
||||
|
@ -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, reg_t upscaledHiresHandle = NULL_REG);
|
||||
virtual void drawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool hiresMode = false, reg_t upscaledHiresHandle = NULL_REG);
|
||||
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…
x
Reference in New Issue
Block a user