diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/base-costume.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/cursor.cpp | 8 | ||||
-rw-r--r-- | engines/scumm/gfx.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/object.cpp | 2 |
4 files changed, 8 insertions, 10 deletions
diff --git a/engines/scumm/base-costume.cpp b/engines/scumm/base-costume.cpp index ff9058538b..b87bc77c29 100644 --- a/engines/scumm/base-costume.cpp +++ b/engines/scumm/base-costume.cpp @@ -32,13 +32,13 @@ byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, int numStrips, const _out = vs; if (drawToBackBuf) - _out.pixels = vs.getBackPixels(0, 0); + _out.setPixels(vs.getBackPixels(0, 0)); else - _out.pixels = vs.getPixels(0, 0); + _out.setPixels(vs.getPixels(0, 0)); _actorX += _vm->_virtscr[kMainVirtScreen].xstart & 7; _out.w = _out.pitch / _vm->_bytesPerPixel; - _out.pixels = (byte *)_out.getBasePtr(-(_vm->_virtscr[kMainVirtScreen].xstart & 7), 0); + _out.setPixels((byte *)_out.getPixels() - (_vm->_virtscr[kMainVirtScreen].xstart & 7)); _numStrips = numStrips; diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 3eb7246b3a..721644b554 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -417,13 +417,11 @@ void ScummEngine_v5::redefineBuiltinCursorFromChar(int index, int chr) { Graphics::Surface s; byte buf[16*17]; memset(buf, 123, 16*17); - s.pixels = buf; - s.w = _charset->getCharWidth(chr); - s.h = _charset->getFontHeight(); - s.pitch = s.w; + s.init(_charset->getCharWidth(chr), _charset->getFontHeight(), + _charset->getCharWidth(chr), buf, + Graphics::PixelFormat::createFormatCLUT8()); // s.h = 17 for FM-TOWNS Loom Japanese. Fixes bug #1166917 assert(s.w <= 16 && s.h <= 17); - s.format = Graphics::PixelFormat::createFormatCLUT8(); _charset->drawChar(chr, s, 0, 0); diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 3da07610eb..57436dc03c 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -421,7 +421,7 @@ void ScummEngine::initVirtScreen(VirtScreenNumber slot, int top, int width, int } _res->createResource(rtBuffer, slot + 1, size); - vs->pixels = getResourceAddress(rtBuffer, slot + 1); + vs->setPixels(getResourceAddress(rtBuffer, slot + 1)); memset(vs->getPixels(0, 0), 0, size); // reset background if (twobufs) { diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp index ed77a863cd..d266183f85 100644 --- a/engines/scumm/object.cpp +++ b/engines/scumm/object.cpp @@ -1715,7 +1715,7 @@ void ScummEngine_v6::drawBlastObject(BlastObject *eo) { error("object %d is not a blast object", eo->number); bdd.dst = *vs; - bdd.dst.pixels = vs->getPixels(0, 0); + bdd.dst.setPixels(vs->getPixels(0, 0)); bdd.x = eo->rect.left; bdd.y = eo->rect.top; |