aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus/cursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/pegasus/cursor.cpp')
-rw-r--r--engines/pegasus/cursor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/pegasus/cursor.cpp b/engines/pegasus/cursor.cpp
index 897d31d7bd..602ae88068 100644
--- a/engines/pegasus/cursor.cpp
+++ b/engines/pegasus/cursor.cpp
@@ -28,7 +28,7 @@
#include "common/system.h"
#include "graphics/cursorman.h"
#include "graphics/surface.h"
-#include "graphics/decoders/pict.h"
+#include "image/pict.h"
#include "pegasus/cursor.h"
#include "pegasus/graphics.h"
@@ -85,9 +85,9 @@ void Cursor::setCurrentFrameIndex(int32 index) {
if (_info[index].surface->format.bytesPerPixel == 1) {
CursorMan.replaceCursorPalette(_info[index].palette, 0, _info[index].colorCount);
- CursorMan.replaceCursor(_info[index].surface->pixels, _info[index].surface->w, _info[index].surface->h, _info[index].hotspot.x, _info[index].hotspot.y, 0);
+ CursorMan.replaceCursor(_info[index].surface->getPixels(), _info[index].surface->w, _info[index].surface->h, _info[index].hotspot.x, _info[index].hotspot.y, 0);
} else {
- CursorMan.replaceCursor(_info[index].surface->pixels, _info[index].surface->w, _info[index].surface->h, _info[index].hotspot.x, _info[index].hotspot.y, _info[index].surface->format.RGBToColor(0xFF, 0xFF, 0xFF), false, &_info[index].surface->format);
+ CursorMan.replaceCursor(_info[index].surface->getPixels(), _info[index].surface->w, _info[index].surface->h, _info[index].hotspot.x, _info[index].hotspot.y, _info[index].surface->format.RGBToColor(0xFF, 0xFF, 0xFF), false, &_info[index].surface->format);
}
((PegasusEngine *)g_engine)->_gfx->markCursorAsDirty();
@@ -148,7 +148,7 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) {
Common::SeekableReadStream *pictStream = vm->_resFork->getResource(MKTAG('P', 'I', 'C', 'T'), cursorInfo.tag + 1000);
if (pictStream) {
- Graphics::PICTDecoder pict;
+ Image::PICTDecoder pict;
if (!pict.loadStream(*pictStream))
error("Failed to decode cursor PICT %d", cursorInfo.tag + 1000);
@@ -166,7 +166,7 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) {
error("Failed to find color icon %d", cursorInfo.tag);
// PixMap section
- Graphics::PICTDecoder::PixMap pixMap = Graphics::PICTDecoder::readPixMap(*cicnStream);
+ Image::PICTDecoder::PixMap pixMap = Image::PICTDecoder::readPixMap(*cicnStream);
// Mask section
cicnStream->readUint32BE(); // mask baseAddr
@@ -203,7 +203,7 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) {
// PixMap data
if (pixMap.pixelSize == 8) {
cursorInfo.surface->create(pixMap.rowBytes, pixMap.bounds.height(), Graphics::PixelFormat::createFormatCLUT8());
- cicnStream->read(cursorInfo.surface->pixels, pixMap.rowBytes * pixMap.bounds.height());
+ cicnStream->read(cursorInfo.surface->getPixels(), pixMap.rowBytes * pixMap.bounds.height());
// While this looks sensible, it actually doesn't work for some cursors
// (ie. the 'can grab' hand)