aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-02 23:44:26 +0200
committerJohannes Schickel2013-08-03 02:52:32 +0200
commit786ad6cea0caa076b1af56eb2bb6d85075e6bfd0 (patch)
treee23fab84708ca444b6c9938e5a2b39d3fb9d496f /engines
parent578715b6f69bcd846e31ae4f207c759ee05022c8 (diff)
downloadscummvm-rg350-786ad6cea0caa076b1af56eb2bb6d85075e6bfd0.tar.gz
scummvm-rg350-786ad6cea0caa076b1af56eb2bb6d85075e6bfd0.tar.bz2
scummvm-rg350-786ad6cea0caa076b1af56eb2bb6d85075e6bfd0.zip
LASTEXPRESS: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines')
-rw-r--r--engines/lastexpress/data/animation.cpp2
-rw-r--r--engines/lastexpress/data/sequence.cpp4
-rw-r--r--engines/lastexpress/graphics.cpp10
3 files changed, 8 insertions, 8 deletions
diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp
index 7618259e69..e9500aec38 100644
--- a/engines/lastexpress/data/animation.cpp
+++ b/engines/lastexpress/data/animation.cpp
@@ -270,7 +270,7 @@ void Animation::play() {
draw(s);
// XXX: Update the screen
- g_system->copyRectToScreen(s->pixels, s->pitch, 0, 0, s->w, s->h);
+ g_system->copyRectToScreen(s->getBasePtr(0, 0), s->pitch, 0, 0, s->w, s->h);
// Free the temporary surface
s->free();
diff --git a/engines/lastexpress/data/sequence.cpp b/engines/lastexpress/data/sequence.cpp
index a5bcba84cd..d58ff32047 100644
--- a/engines/lastexpress/data/sequence.cpp
+++ b/engines/lastexpress/data/sequence.cpp
@@ -128,8 +128,8 @@ AnimFrame::~AnimFrame() {
}
Common::Rect AnimFrame::draw(Graphics::Surface *s) {
- byte *inp = (byte *)_image.pixels;
- uint16 *outp = (uint16 *)s->pixels;
+ byte *inp = (byte *)_image.getBasePtr(0, 0);
+ uint16 *outp = (uint16 *)s->getBasePtr(0, 0);
for (int i = 0; i < 640 * 480; i++, inp++, outp++) {
if (*inp)
*outp = _palette[*inp];
diff --git a/engines/lastexpress/graphics.cpp b/engines/lastexpress/graphics.cpp
index 753c3a39e4..4934c4f519 100644
--- a/engines/lastexpress/graphics.cpp
+++ b/engines/lastexpress/graphics.cpp
@@ -131,11 +131,11 @@ void GraphicsManager::mergePlanes() {
// Clear screen surface
_screen.fillRect(Common::Rect(640, 480), 0);
- uint16 *screen = (uint16 *)_screen.pixels;
- uint16 *inventory = (uint16 *)_inventory.pixels;
- uint16 *overlay = (uint16 *)_overlay.pixels;
- uint16 *backgroundC = (uint16 *)_backgroundC.pixels;
- uint16 *backgroundA = (uint16 *)_backgroundA.pixels;
+ uint16 *screen = (uint16 *)_screen.getBasePtr(0, 0);
+ uint16 *inventory = (uint16 *)_inventory.getBasePtr(0, 0);
+ uint16 *overlay = (uint16 *)_overlay.getBasePtr(0, 0);
+ uint16 *backgroundC = (uint16 *)_backgroundC.getBasePtr(0, 0);
+ uint16 *backgroundA = (uint16 *)_backgroundA.getBasePtr(0, 0);
for (int i = 0; i < 640 * 480; i++) {