aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gui
diff options
context:
space:
mode:
authorFilippos Karapetis2009-10-11 20:20:28 +0000
committerFilippos Karapetis2009-10-11 20:20:28 +0000
commitcfc7b741f9f662a18048065d1db89cbc20b6b57b (patch)
tree754b69d281df020c299408cc2a0b073825887065 /engines/sci/gui
parent7449091202506956bf678bf6b1641106028cb01b (diff)
downloadscummvm-rg350-cfc7b741f9f662a18048065d1db89cbc20b6b57b.tar.gz
scummvm-rg350-cfc7b741f9f662a18048065d1db89cbc20b6b57b.tar.bz2
scummvm-rg350-cfc7b741f9f662a18048065d1db89cbc20b6b57b.zip
Use BitsShow() for partial screen updates
svn-id: r44944
Diffstat (limited to 'engines/sci/gui')
-rw-r--r--engines/sci/gui/gui.cpp18
-rw-r--r--engines/sci/gui/gui_gfx.cpp6
2 files changed, 7 insertions, 17 deletions
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp
index 424bc591ce..869645c340 100644
--- a/engines/sci/gui/gui.cpp
+++ b/engines/sci/gui/gui.cpp
@@ -283,9 +283,7 @@ void SciGui::drawStatus(const char *text, int16 colorPen, int16 colorBack) {
_gfx->Draw_String(text);
_gfx->SetPort(oldPort);
// _gfx->ShowBits(*_theMenuBar, 1);
- Common::Rect screenRect = _gfx->_menuRect;
- _gfx->OffsetRect(screenRect);
- _screen->copyRectToScreen(screenRect);
+ _gfx->BitsShow(_gfx->_menuRect, SCI_SCREEN_MASK_VISUAL);
}
void SciGui::drawMenuBar() {
@@ -337,8 +335,7 @@ void SciGui::drawControlButton(Common::Rect rect, reg_t obj, const char *text, i
Common::Rect screenRect = rect;
screenRect.grow(2);
- _gfx->OffsetRect(screenRect);
- _screen->copyRectToScreen(screenRect);
+ _gfx->BitsShow(screenRect, SCI_SCREEN_MASK_VISUAL);
}
void SciGui::drawControlText(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 mode, int16 style, bool hilite) {
@@ -356,8 +353,7 @@ void SciGui::drawControlText(Common::Rect rect, reg_t obj, const char *text, int
Common::Rect screenRect = rect;
screenRect.grow(1);
- _gfx->OffsetRect(screenRect);
- _screen->copyRectToScreen(screenRect);
+ _gfx->BitsShow(_screenRect, SCI_SCREEN_MASK_VISUAL);
}
void SciGui::drawControlTextEdit(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 mode, int16 style, int16 cursorPos, int16 maxChars, bool hilite) {
@@ -373,9 +369,7 @@ void SciGui::drawControlIcon(Common::Rect rect, reg_t obj, GuiResourceId viewId,
_gfx->InvertRect(rect);
}
- Common::Rect screenRect = rect;
- _gfx->OffsetRect(screenRect);
- _screen->copyRectToScreen(screenRect);
+ _gfx->BitsShow(rect, SCI_SCREEN_MASK_VISUAL);
}
void SciGui::drawControlList(Common::Rect rect, reg_t obj, int16 maxChars, int16 count, const char **entries, GuiResourceId fontId, int16 style, int16 upperPos, int16 cursorPos, bool isAlias, bool hilite) {
@@ -385,9 +379,7 @@ void SciGui::drawControlList(Common::Rect rect, reg_t obj, int16 maxChars, int16
if (isAlias && (style & 8)) {
_gfx->FrameRect(rect);
}
- Common::Rect screenRect = rect;
- _gfx->OffsetRect(screenRect);
- _screen->copyRectToScreen(screenRect);
+ _gfx->BitsShow(rect, SCI_SCREEN_MASK_VISUAL);
}
}
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp
index ca5d6ea1e8..e950757e21 100644
--- a/engines/sci/gui/gui_gfx.cpp
+++ b/engines/sci/gui/gui_gfx.cpp
@@ -531,7 +531,7 @@ void SciGuiGfx::ShowText(const char *text, int16 from, int16 len, GuiResourceId
rect.left = _curPort->curLeft;
DrawText(text, from, len, orgFontId, orgPenColor);
rect.right = _curPort->curLeft;
- BitsShow(rect, 1);
+ BitsShow(rect, SCI_SCREEN_MASK_VISUAL);
}
// Draws a text in rect.
@@ -587,9 +587,7 @@ void SciGuiGfx::BitsShow(const Common::Rect &r, uint16 screenMask) {
OffsetRect(rect);
assert((screenMask & 0x8000) == 0);
- _screen->copyToScreen();
-// _system->copyRectToScreen(GetSegment(flags) + _baseTable[rect.top] + rect.left, 320, rect.left, rect.top, rect.width(), rect.height());
-// _system->updateScreen();
+ _screen->copyRectToScreen(rect);
}
GuiMemoryHandle SciGuiGfx::BitsSave(const Common::Rect &rect, byte screenMask) {