diff options
-rw-r--r-- | gui/EventRecorder.cpp | 2 | ||||
-rw-r--r-- | gui/ThemeEngine.cpp | 10 | ||||
-rw-r--r-- | gui/widget.cpp | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp index 4f569b75c5..4bf5832864 100644 --- a/gui/EventRecorder.cpp +++ b/gui/EventRecorder.cpp @@ -522,7 +522,7 @@ bool EventRecorder::grabScreenAndComputeMD5(Graphics::Surface &screen, uint8 md5 warning("Can't save screenshot"); return false; } - Common::MemoryReadStream bitmapStream((const byte*)screen.getBasePtr(0, 0), screen.w * screen.h * screen.format.bytesPerPixel); + Common::MemoryReadStream bitmapStream((const byte*)screen.getPixels(), screen.w * screen.h * screen.format.bytesPerPixel); computeStreamMD5(bitmapStream, md5); return true; } diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 80f3946729..0f8b449b58 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -389,7 +389,7 @@ bool ThemeEngine::init() { _overlayFormat = _system->getOverlayFormat(); setGraphicsMode(_graphicsMode); - if (_screen.getBasePtr(0, 0) && _backBuffer.getBasePtr(0, 0)) { + if (_screen.getPixels() && _backBuffer.getPixels()) { _initOk = true; } @@ -439,7 +439,7 @@ bool ThemeEngine::init() { void ThemeEngine::clearAll() { if (_initOk) { _system->clearOverlay(); - _system->grabOverlay(_screen.getBasePtr(0, 0), _screen.pitch); + _system->grabOverlay(_screen.getPixels(), _screen.pitch); } } @@ -1219,7 +1219,7 @@ void ThemeEngine::updateScreen(bool render) { } _vectorRenderer->setSurface(&_screen); - memcpy(_screen.getBasePtr(0, 0), _backBuffer.getBasePtr(0, 0), _screen.pitch * _screen.h); + memcpy(_screen.getPixels(), _backBuffer.getPixels(), _screen.pitch * _screen.h); _bufferQueue.clear(); } @@ -1287,7 +1287,7 @@ void ThemeEngine::openDialog(bool doBuffer, ShadingStyle style) { addDirtyRect(Common::Rect(0, 0, _screen.w, _screen.h)); } - memcpy(_backBuffer.getBasePtr(0, 0), _screen.getBasePtr(0, 0), _screen.pitch * _screen.h); + memcpy(_backBuffer.getPixels(), _screen.getPixels(), _screen.pitch * _screen.h); _vectorRenderer->setSurface(&_screen); } @@ -1326,7 +1326,7 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int // to 8 bit mode, and have to create a suitable palette on the fly. uint colorsFound = 0; Common::HashMap<int, int> colorToIndex; - const OverlayColor *src = (const OverlayColor *)cursor->getBasePtr(0, 0); + const OverlayColor *src = (const OverlayColor *)cursor->getPixels(); for (uint y = 0; y < _cursorHeight; ++y) { for (uint x = 0; x < _cursorWidth; ++x) { byte r, g, b; diff --git a/gui/widget.cpp b/gui/widget.cpp index 197250a940..d97c46a5cc 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -396,7 +396,7 @@ PicButtonWidget::~PicButtonWidget() { void PicButtonWidget::setGfx(const Graphics::Surface *gfx) { _gfx.free(); - if (!gfx || !gfx->getBasePtr(0, 0)) + if (!gfx || !gfx->getPixels()) return; if (gfx->format.bytesPerPixel == 1) { @@ -429,7 +429,7 @@ void PicButtonWidget::setGfx(int w, int h, int r, int g, int b) { void PicButtonWidget::drawWidget() { g_gui.theme()->drawButton(Common::Rect(_x, _y, _x+_w, _y+_h), "", _state, getFlags()); - if (_gfx.getBasePtr(0, 0)) { + if (_gfx.getPixels()) { // Check whether the set up surface needs to be converted to the GUI // color format. const Graphics::PixelFormat &requiredFormat = g_gui.theme()->getPixelFormat(); @@ -646,7 +646,7 @@ GraphicsWidget::~GraphicsWidget() { void GraphicsWidget::setGfx(const Graphics::Surface *gfx) { _gfx.free(); - if (!gfx || !gfx->getBasePtr(0, 0)) + if (!gfx || !gfx->getPixels()) return; if (gfx->format.bytesPerPixel == 1) { @@ -676,7 +676,7 @@ void GraphicsWidget::setGfx(int w, int h, int r, int g, int b) { } void GraphicsWidget::drawWidget() { - if (_gfx.getBasePtr(0, 0)) { + if (_gfx.getPixels()) { // Check whether the set up surface needs to be converted to the GUI // color format. const Graphics::PixelFormat &requiredFormat = g_gui.theme()->getPixelFormat(); |