diff options
Diffstat (limited to 'engines/sci/gui')
-rw-r--r-- | engines/sci/gui/gui.cpp | 6 | ||||
-rw-r--r-- | engines/sci/gui/gui.h | 2 | ||||
-rw-r--r-- | engines/sci/gui/gui_gfx.cpp | 4 | ||||
-rw-r--r-- | engines/sci/gui/gui_gfx.h | 2 | ||||
-rw-r--r-- | engines/sci/gui/gui_view.cpp | 7 | ||||
-rw-r--r-- | engines/sci/gui/gui_view.h | 2 |
6 files changed, 14 insertions, 9 deletions
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp index 6552a52292..b14bd6df67 100644 --- a/engines/sci/gui/gui.cpp +++ b/engines/sci/gui/gui.cpp @@ -325,8 +325,8 @@ void SciGui::drawPicture(GuiResourceId pictureId, int16 animationNr, bool animat _gfx->SetPort(oldPort); } -void SciGui::drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo) { - _gfx->drawCel(viewId, loopNo, celNo, leftPos, topPos, priority, paletteNo); +void SciGui::drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, int16 origHeight) { + _gfx->drawCel(viewId, loopNo, celNo, leftPos, topPos, priority, paletteNo, origHeight); _palette->setOnScreen(); } @@ -456,6 +456,8 @@ reg_t SciGui::graphSaveBox(Common::Rect rect, uint16 screenMask) { } reg_t SciGui::graphSaveUpscaledHiresBox(Common::Rect rect) { + rect.right *= 2; + rect.bottom *= 2; return _gfx->BitsSave(rect, SCI_SCREEN_MASK_DISPLAY); } diff --git a/engines/sci/gui/gui.h b/engines/sci/gui/gui.h index f1d5f0ce77..9088848458 100644 --- a/engines/sci/gui/gui.h +++ b/engines/sci/gui/gui.h @@ -82,7 +82,7 @@ public: virtual void drawMenuBar(); virtual void clearMenuBar(); virtual void drawPicture(GuiResourceId pictureId, int16 animationNr, bool animationBlackoutFlag, bool mirroredFlag, bool addToFlag, int16 EGApaletteNo); - virtual void drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo); + virtual void drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, int16 origHeight = -1); 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); diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp index 1719b6d845..b87079b69f 100644 --- a/engines/sci/gui/gui_gfx.cpp +++ b/engines/sci/gui/gui_gfx.cpp @@ -329,7 +329,7 @@ void SciGuiGfx::drawPicture(GuiResourceId pictureId, int16 animationNr, bool mir } // This one is the only one that updates screen! -void SciGuiGfx::drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, uint16 leftPos, uint16 topPos, byte priority, uint16 paletteNo) { +void SciGuiGfx::drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, uint16 leftPos, uint16 topPos, byte priority, uint16 paletteNo, int16 origHeight) { SciGuiView *view = getView(viewId); Common::Rect rect; Common::Rect clipRect; @@ -346,7 +346,7 @@ void SciGuiGfx::drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo Common::Rect clipRectTranslated = clipRect; OffsetRect(clipRectTranslated); - view->draw(rect, clipRect, clipRectTranslated, loopNo, celNo, priority, paletteNo); + view->draw(rect, clipRect, clipRectTranslated, loopNo, celNo, priority, paletteNo, origHeight); if (!_screen->_picNotValid) BitsShow(rect); } diff --git a/engines/sci/gui/gui_gfx.h b/engines/sci/gui/gui_gfx.h index c5e7f99d9a..28242d41b7 100644 --- a/engines/sci/gui/gui_gfx.h +++ b/engines/sci/gui/gui_gfx.h @@ -87,7 +87,7 @@ public: void BitsFree(GuiMemoryHandle memoryHandle); void drawPicture(GuiResourceId pictureId, int16 animationNr, bool mirroredFlag, bool addToFlag, GuiResourceId paletteId); - void drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, uint16 leftPos, uint16 topPos, byte priority, uint16 paletteNo); + void drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, uint16 leftPos, uint16 topPos, byte priority, uint16 paletteNo, int16 origHeight = -1); void drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, Common::Rect celRect, byte priority, uint16 paletteNo); void drawCel(SciGuiView *view, GuiViewLoopNo loopNo, GuiViewCelNo celNo, Common::Rect celRect, byte priority, uint16 paletteNo); diff --git a/engines/sci/gui/gui_view.cpp b/engines/sci/gui/gui_view.cpp index 91d8067c3c..a5bc5ff648 100644 --- a/engines/sci/gui/gui_view.cpp +++ b/engines/sci/gui/gui_view.cpp @@ -451,7 +451,7 @@ void SciGuiView::unditherBitmap(byte *bitmapPtr, int16 width, int16 height, byte } } -void SciGuiView::draw(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectTranslated, GuiViewLoopNo loopNo, GuiViewCelNo celNo, byte priority, uint16 EGAmappingNr) { +void SciGuiView::draw(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectTranslated, GuiViewLoopNo loopNo, GuiViewCelNo celNo, byte priority, uint16 EGAmappingNr, int16 origHeight) { GuiPalette *palette = _embeddedPal ? &_viewPalette : &_palette->_sysPalette; sciViewCelInfo *celInfo = getCelInfo(loopNo, celNo); byte *bitmap = getBitmap(loopNo, celNo); @@ -477,7 +477,10 @@ void SciGuiView::draw(Common::Rect rect, Common::Rect clipRect, Common::Rect cli for (x = 0; x < width; x++) { color = bitmap[x]; if (color != clearKey && priority >= _screen->getPriority(clipRectTranslated.left + x, y)) - _screen->putPixel(clipRectTranslated.left + x, y, drawMask, palette->mapping[color], priority, 0); + if (origHeight == -1) + _screen->putPixel(clipRectTranslated.left + x, y, drawMask, palette->mapping[color], priority, 0); + else + _screen->putPixelOnDisplay(clipRectTranslated.left + x, y, palette->mapping[color]); } } } else { diff --git a/engines/sci/gui/gui_view.h b/engines/sci/gui/gui_view.h index 09b7b69aa2..c4ed3db2b0 100644 --- a/engines/sci/gui/gui_view.h +++ b/engines/sci/gui/gui_view.h @@ -60,7 +60,7 @@ public: sciViewLoopInfo *getLoopInfo(GuiViewLoopNo loopNo); void getCelRect(GuiViewLoopNo loopNo, GuiViewCelNo celNo, int16 x, int16 y, int16 z, Common::Rect *outRect); byte *getBitmap(GuiViewLoopNo loopNo, GuiViewCelNo celNo); - void draw(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectTranslated, GuiViewLoopNo loopNo, GuiViewCelNo celNo, byte priority, uint16 EGAmappingNr); + void draw(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectTranslated, GuiViewLoopNo loopNo, GuiViewCelNo celNo, byte priority, uint16 EGAmappingNr, int16 origHeight = -1); uint16 getLoopCount() const { return _loopCount; } uint16 getCelCount(GuiViewLoopNo loopNo) { return _loop[loopNo].celCount; } GuiPalette *getPalette(); |