aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/iphone/osys_video.mm
diff options
context:
space:
mode:
authorJohannes Schickel2012-02-23 21:20:24 +0100
committerJohannes Schickel2012-02-23 21:20:24 +0100
commit2ab5958c93c19a0ea23b76c2360ca8ef4d905b94 (patch)
tree104b246af6e3a7279063e2fd22f2d30ae12f32b4 /backends/platform/iphone/osys_video.mm
parent97feac5342420653bb1f4a5fbca68a5aae6b09a8 (diff)
downloadscummvm-rg350-2ab5958c93c19a0ea23b76c2360ca8ef4d905b94.tar.gz
scummvm-rg350-2ab5958c93c19a0ea23b76c2360ca8ef4d905b94.tar.bz2
scummvm-rg350-2ab5958c93c19a0ea23b76c2360ca8ef4d905b94.zip
IPHONE: Move screen and overlay texture buffer to VideoContext.
Diffstat (limited to 'backends/platform/iphone/osys_video.mm')
-rw-r--r--backends/platform/iphone/osys_video.mm16
1 files changed, 14 insertions, 2 deletions
diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm
index a40fcae78c..45f62377d4 100644
--- a/backends/platform/iphone/osys_video.mm
+++ b/backends/platform/iphone/osys_video.mm
@@ -228,11 +228,23 @@ void OSystem_IPHONE::drawDirtyRect(const Common::Rect &dirtyRect) {
}
void OSystem_IPHONE::drawDirtyOverlayRect(const Common::Rect &dirtyRect) {
- iPhone_updateOverlayRect(_overlayBuffer, dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom, _videoContext->overlayWidth);
+ const int x1 = dirtyRect.left;
+ const int y1 = dirtyRect.top;
+ const int x2 = dirtyRect.right;
+ const int y2 = dirtyRect.bottom;
+
+ for (int y = y1; y < y2; ++y)
+ memcpy(_videoContext->overlayTexture.getBasePtr(x1, y), &_overlayBuffer[y * _videoContext->overlayWidth + x1], (x2 - x1) * 2);
}
void OSystem_IPHONE::updateHardwareSurfaceForRect(const Common::Rect &updatedRect) {
- iPhone_updateScreenRect(_gameScreenConverted, updatedRect.left, updatedRect.top, updatedRect.right, updatedRect.bottom, _videoContext->screenWidth);
+ const int x1 = updatedRect.left;
+ const int y1 = updatedRect.top;
+ const int x2 = updatedRect.right;
+ const int y2 = updatedRect.bottom;
+
+ for (int y = y1; y < y2; ++y)
+ memcpy(_videoContext->screenTexture.getBasePtr(x1, y), &_gameScreenConverted[y * _videoContext->screenWidth + x1], (x2 - x1) * 2);
}
Graphics::Surface *OSystem_IPHONE::lockScreen() {