diff options
author | Johannes Schickel | 2013-08-03 00:40:03 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 02:52:33 +0200 |
commit | dd67e9f09939367f19b7ada1c51ca0760b0fda87 (patch) | |
tree | 8a4667773d654ce1f2189f3917587c04b1054adc /engines/sci/graphics/maciconbar.cpp | |
parent | 8617edea04cfb2439de54d3ce4e64f92e5bd0416 (diff) | |
download | scummvm-rg350-dd67e9f09939367f19b7ada1c51ca0760b0fda87.tar.gz scummvm-rg350-dd67e9f09939367f19b7ada1c51ca0760b0fda87.tar.bz2 scummvm-rg350-dd67e9f09939367f19b7ada1c51ca0760b0fda87.zip |
SCI: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines/sci/graphics/maciconbar.cpp')
-rw-r--r-- | engines/sci/graphics/maciconbar.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sci/graphics/maciconbar.cpp b/engines/sci/graphics/maciconbar.cpp index dfb50b0edb..c800c0dd2f 100644 --- a/engines/sci/graphics/maciconbar.cpp +++ b/engines/sci/graphics/maciconbar.cpp @@ -129,7 +129,7 @@ void GfxMacIconBar::drawIcon(uint16 iconIndex, bool selected) { void GfxMacIconBar::drawEnabledImage(Graphics::Surface *surface, const Common::Rect &rect) { if (surface) - g_system->copyRectToScreen(surface->pixels, surface->pitch, rect.left, rect.top, rect.width(), rect.height()); + g_system->copyRectToScreen(surface->getBasePtr(0, 0), surface->pitch, rect.left, rect.top, rect.width(), rect.height()); } void GfxMacIconBar::drawDisabledImage(Graphics::Surface *surface, const Common::Rect &rect) { @@ -153,7 +153,7 @@ void GfxMacIconBar::drawDisabledImage(Graphics::Surface *surface, const Common:: *((byte *)newSurf.getBasePtr(j, i)) = 0; } - g_system->copyRectToScreen(newSurf.pixels, newSurf.pitch, rect.left, rect.top, rect.width(), rect.height()); + g_system->copyRectToScreen(newSurf.getBasePtr(0, 0), newSurf.pitch, rect.left, rect.top, rect.width(), rect.height()); newSurf.free(); } @@ -224,7 +224,7 @@ Graphics::Surface *GfxMacIconBar::createImage(uint32 iconIndex, bool isSelected) } void GfxMacIconBar::remapColors(Graphics::Surface *surf, const byte *palette) { - byte *pixels = (byte *)surf->pixels; + byte *pixels = (byte *)surf->getBasePtr(0, 0); // Remap to the screen palette for (uint16 i = 0; i < surf->w * surf->h; i++) { |