aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/window.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2012-05-11 08:44:50 +1000
committerPaul Gilbert2012-05-11 08:44:50 +1000
commit724deb6b84b8a5f5a3aa96adc2a512c962f7081a (patch)
treedbae3811dfe14c39e75c782ada6f89b27ea52d42 /engines/tony/window.cpp
parent82361a3ea3efb9b6454eb4805e777cd4bfc3a0e3 (diff)
downloadscummvm-rg350-724deb6b84b8a5f5a3aa96adc2a512c962f7081a.tar.gz
scummvm-rg350-724deb6b84b8a5f5a3aa96adc2a512c962f7081a.tar.bz2
scummvm-rg350-724deb6b84b8a5f5a3aa96adc2a512c962f7081a.zip
TONY: Bugfixes for showing the credits screen.
Diffstat (limited to 'engines/tony/window.cpp')
-rw-r--r--engines/tony/window.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp
index f68c612911..18dcfb7cb6 100644
--- a/engines/tony/window.cpp
+++ b/engines/tony/window.cpp
@@ -128,12 +128,32 @@ void RMWindow::WipeEffect(Common::Rect &rcBoundEllipse) {
}
void RMWindow::GetNewFrame(byte *lpBuf, Common::Rect *rcBoundEllipse) {
- Common::Rect bounds = (rcBoundEllipse) ? *rcBoundEllipse : Common::Rect(0, 0, RM_SX, RM_SY);
-
- // Update a screen section
- g_system->copyRectToScreen(lpBuf, RM_SX * 2, bounds.left, bounds.top, bounds.width(), bounds.height());
+ if (rcBoundEllipse != NULL) {
+ // Circular wipe effect
+ GetNewFrameWipe(lpBuf, *rcBoundEllipse);
+ } else {
+ // Standard screen copy
+ g_system->copyRectToScreen(lpBuf, RM_SX * 2, 0, 0, RM_SX, RM_SY);
+ }
}
+/**
+ * Copies a section of the game frame in a circle bounded by the specified rectangle
+ */
+void RMWindow::GetNewFrameWipe(byte *lpBuf, Common::Rect &rcBoundEllipse) {
+ // Clear the screen
+ g_system->fillScreen(0);
+
+ if (!rcBoundEllipse.isValidRect())
+ return;
+
+ // TODO: Do a proper circular wipe
+ for (int yp = rcBoundEllipse.top; yp < rcBoundEllipse.bottom; ++yp) {
+ const byte *pSrc = lpBuf + (yp * RM_SX * 2) + rcBoundEllipse.left * 2;
+
+ g_system->copyRectToScreen(pSrc, RM_SX * 2, rcBoundEllipse.left, yp, rcBoundEllipse.width(), 1);
+ }
+}
/****************************************************************************\
* RMSnapshot Methods