diff options
Diffstat (limited to 'engines/parallaction/graphics.cpp')
-rw-r--r-- | engines/parallaction/graphics.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index b8a8ceb61f..3f36d56420 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -332,7 +332,7 @@ void Gfx::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int void Gfx::clearScreen() { if (_doubleBuffering) { - if (_backBuffer.pixels) { + if (_backBuffer.getPixels()) { Common::Rect r(_backBuffer.w, _backBuffer.h); _backBuffer.fillRect(r, 0); } @@ -419,13 +419,13 @@ void Gfx::updateScreen() { // is needed _overlayMode = false; - bool skipBackground = (_backgroundInfo->bg.pixels == 0); // don't render frame if background is missing + bool skipBackground = (_backgroundInfo->bg.getPixels() == 0); // don't render frame if background is missing if (!skipBackground) { // background may not cover the whole screen, so adjust bulk update size uint w = _backgroundInfo->width; uint h = _backgroundInfo->height; - byte *backgroundData = (byte *)_backgroundInfo->bg.getBasePtr(0, 0); + byte *backgroundData = (byte *)_backgroundInfo->bg.getPixels(); uint16 backgroundPitch = _backgroundInfo->bg.pitch; copyRectToScreen(backgroundData, backgroundPitch, _backgroundInfo->_x, _backgroundInfo->_y, w, h); } @@ -450,7 +450,7 @@ void Gfx::applyHalfbriteEffect_NS(Graphics::Surface &surf) { return; } - byte *buf = (byte *)surf.pixels; + byte *buf = (byte *)surf.getPixels(); for (int i = 0; i < surf.w*surf.h; i++) { *buf++ |= 0x20; } @@ -493,7 +493,7 @@ void Gfx::patchBackground(Graphics::Surface &surf, int16 x, int16 y, bool mask) r.moveTo(x, y); uint16 z = (mask) ? _backgroundInfo->getMaskLayer(y) : LAYER_FOREGROUND; - blt(r, (byte *)surf.pixels, &_backgroundInfo->bg, z, 100, 0); + blt(r, (byte *)surf.getPixels(), &_backgroundInfo->bg, z, 100, 0); } void Gfx::fillBackground(const Common::Rect& r, byte color) { @@ -536,12 +536,12 @@ GfxObj *Gfx::renderFloatingLabel(Font *font, char *text) { setupLabelSurface(*cnv, w, h); font->setColor((_gameType == GType_BRA) ? 0 : 7); - font->drawString((byte *)cnv->pixels + 1, cnv->w, text); - font->drawString((byte *)cnv->pixels + 1 + cnv->w * 2, cnv->w, text); - font->drawString((byte *)cnv->pixels + cnv->w, cnv->w, text); - font->drawString((byte *)cnv->pixels + 2 + cnv->w, cnv->w, text); + font->drawString((byte *)cnv->getBasePtr(1, 0), cnv->w, text); + font->drawString((byte *)cnv->getBasePtr(1, 2), cnv->w, text); + font->drawString((byte *)cnv->getBasePtr(0, 1), cnv->w, text); + font->drawString((byte *)cnv->getBasePtr(2, 1), cnv->w, text); font->setColor((_gameType == GType_BRA) ? 11 : 1); - font->drawString((byte *)cnv->pixels + 1 + cnv->w, cnv->w, text); + font->drawString((byte *)cnv->getBasePtr(1, 1), cnv->w, text); } else { w = font->getStringWidth(text); h = font->height(); @@ -704,7 +704,7 @@ void Gfx::unregisterLabel(GfxObj *label) { void Gfx::copyRect(const Common::Rect &r, Graphics::Surface &src, Graphics::Surface &dst) { byte *s = (byte *)src.getBasePtr(r.left, r.top); - byte *d = (byte *)dst.getBasePtr(0, 0); + byte *d = (byte *)dst.getPixels(); for (uint16 i = 0; i < r.height(); i++) { memcpy(d, s, r.width()); |