aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-03 02:44:47 +0200
committerJohannes Schickel2013-08-03 04:02:53 +0200
commit0ee407c44bc8ce3c1c26ba68d5eb5a68599788c7 (patch)
tree484a725328b1f98c48b583426202f4ecdbc5f7d6 /engines/wintermute
parent431841073185d45a945a459768fccc091cc2c2fd (diff)
downloadscummvm-rg350-0ee407c44bc8ce3c1c26ba68d5eb5a68599788c7.tar.gz
scummvm-rg350-0ee407c44bc8ce3c1c26ba68d5eb5a68599788c7.tar.bz2
scummvm-rg350-0ee407c44bc8ce3c1c26ba68d5eb5a68599788c7.zip
WINTERMUTE: Take advantage of Surface::getPixels.
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.cpp6
-rw-r--r--engines/wintermute/graphics/transparent_surface.cpp6
-rw-r--r--engines/wintermute/video/video_theora_player.cpp4
3 files changed, 8 insertions, 8 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index 06a872a9aa..d36221d291 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -187,9 +187,9 @@ bool BaseRenderOSystem::flip() {
}
if (_needsFlip || _disableDirtyRects || _tempDisableDirtyRects) {
if (_disableDirtyRects || _tempDisableDirtyRects) {
- g_system->copyRectToScreen((byte *)_renderSurface->getBasePtr(0, 0), _renderSurface->pitch, 0, 0, _renderSurface->w, _renderSurface->h);
+ g_system->copyRectToScreen((byte *)_renderSurface->getPixels(), _renderSurface->pitch, 0, 0, _renderSurface->w, _renderSurface->h);
}
- // g_system->copyRectToScreen((byte *)_renderSurface->getBasePtr(0, 0), _renderSurface->pitch, _dirtyRect->left, _dirtyRect->top, _dirtyRect->width(), _dirtyRect->height());
+ // g_system->copyRectToScreen((byte *)_renderSurface->getPixels(), _renderSurface->pitch, _dirtyRect->left, _dirtyRect->top, _dirtyRect->width(), _dirtyRect->height());
delete _dirtyRect;
_dirtyRect = nullptr;
g_system->updateScreen();
@@ -682,7 +682,7 @@ void BaseRenderOSystem::endSaveLoad() {
_drawNum = 1;
_renderSurface->fillRect(Common::Rect(0, 0, _renderSurface->h, _renderSurface->w), _renderSurface->format.ARGBToColor(255, 0, 0, 0));
- g_system->copyRectToScreen((byte *)_renderSurface->getBasePtr(0, 0), _renderSurface->pitch, 0, 0, _renderSurface->w, _renderSurface->h);
+ g_system->copyRectToScreen((byte *)_renderSurface->getPixels(), _renderSurface->pitch, 0, 0, _renderSurface->w, _renderSurface->h);
g_system->updateScreen();
}
diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp
index 9efeea9cad..faaa3b138c 100644
--- a/engines/wintermute/graphics/transparent_surface.cpp
+++ b/engines/wintermute/graphics/transparent_surface.cpp
@@ -160,8 +160,8 @@ TransparentSurface::TransparentSurface(const Surface &surf, bool copyData) : Sur
format = surf.format;
// We need to cast the const qualifier away here because 'pixels'
// always needs to be writable. 'surf' however is a constant Surface,
- // thus getBasePtr will always return const pixel data.
- pixels = const_cast<void *>(surf.getBasePtr(0, 0));
+ // thus getPixels will always return const pixel data.
+ pixels = const_cast<void *>(surf.getPixels());
}
}
@@ -339,7 +339,7 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
if ((width != srcImage.w) || (height != srcImage.h)) {
// Scale the image
img = imgScaled = srcImage.scale(width, height);
- savedPixels = (byte *)img->getBasePtr(0, 0);
+ savedPixels = (byte *)img->getPixels();
} else {
img = &srcImage;
}
diff --git a/engines/wintermute/video/video_theora_player.cpp b/engines/wintermute/video/video_theora_player.cpp
index ac24c6f15e..f68e952dfb 100644
--- a/engines/wintermute/video/video_theora_player.cpp
+++ b/engines/wintermute/video/video_theora_player.cpp
@@ -369,14 +369,14 @@ void VideoTheoraPlayer::writeAlpha() {
if (_alphaImage && _surface.w == _alphaImage->getSurface()->w && _surface.h == _alphaImage->getSurface()->h) {
assert(_alphaImage->getSurface()->format.bytesPerPixel == 4);
assert(_surface.format.bytesPerPixel == 4);
- const byte *alphaData = (const byte *)_alphaImage->getSurface()->getBasePtr(0, 0);
+ const byte *alphaData = (const byte *)_alphaImage->getSurface()->getPixels();
#ifdef SCUMM_LITTLE_ENDIAN
int alphaPlace = (_alphaImage->getSurface()->format.aShift / 8);
#else
int alphaPlace = 3 - (_alphaImage->getSurface()->format.aShift / 8);
#endif
alphaData += alphaPlace;
- byte *imgData = (byte *)_surface.getBasePtr(0, 0);
+ byte *imgData = (byte *)_surface.getPixels();
#ifdef SCUMM_LITTLE_ENDIAN
imgData += (_surface.format.aShift / 8);
#else