aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorCameron Cawley2019-08-09 20:45:27 +0100
committerFilippos Karapetis2019-08-09 23:58:32 +0300
commitfe5dddf901eb40ac3c04b7d01bd078d65dafc5ab (patch)
tree96dff48a310a3873fb9fc6cb48454997a26aba17 /engines/mohawk
parent4667aae4c407a3a54f44e07227897cf077f82fe2 (diff)
downloadscummvm-rg350-fe5dddf901eb40ac3c04b7d01bd078d65dafc5ab.tar.gz
scummvm-rg350-fe5dddf901eb40ac3c04b7d01bd078d65dafc5ab.tar.bz2
scummvm-rg350-fe5dddf901eb40ac3c04b7d01bd078d65dafc5ab.zip
GRAPHICS: Add a version of CursorManager::replaceCursor that accepts a Graphics::Cursor
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/cursors.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp
index 8adcbf62ed..2cb41be65e 100644
--- a/engines/mohawk/cursors.cpp
+++ b/engines/mohawk/cursors.cpp
@@ -51,9 +51,7 @@ void CursorManager::hideCursor() {
void CursorManager::setDefaultCursor() {
Graphics::Cursor *cursor = Graphics::makeDefaultWinCursor();
- CursorMan.replaceCursor(cursor->getSurface(), cursor->getWidth(), cursor->getHeight(), cursor->getHotspotX(),
- cursor->getHotspotY(), cursor->getKeyColor());
- CursorMan.replaceCursorPalette(cursor->getPalette(), cursor->getPaletteStartIndex(), cursor->getPaletteCount());
+ CursorMan.replaceCursor(cursor);
delete cursor;
}
@@ -71,9 +69,7 @@ void CursorManager::setMacCursor(Common::SeekableReadStream *stream) {
if (!macCursor->readFromStream(*stream))
error("Could not parse Mac cursor");
- CursorMan.replaceCursor(macCursor->getSurface(), macCursor->getWidth(), macCursor->getHeight(),
- macCursor->getHotspotX(), macCursor->getHotspotY(), macCursor->getKeyColor());
- CursorMan.replaceCursorPalette(macCursor->getPalette(), 0, 256);
+ CursorMan.replaceCursor(macCursor);
delete macCursor;
delete stream;
@@ -165,8 +161,7 @@ void NECursorManager::setCursor(uint16 id) {
if (cursorGroup) {
Graphics::Cursor *cursor = cursorGroup->cursors[0].cursor;
- CursorMan.replaceCursor(cursor->getSurface(), cursor->getWidth(), cursor->getHeight(), cursor->getHotspotX(), cursor->getHotspotY(), cursor->getKeyColor());
- CursorMan.replaceCursorPalette(cursor->getPalette(), 0, 256);
+ CursorMan.replaceCursor(cursor);
delete cursorGroup;
return;
}
@@ -272,8 +267,7 @@ void PECursorManager::setCursor(uint16 id) {
for (uint i = 0; i < _cursors.size(); i++) {
if (_cursors[i].id == id) {
Graphics::Cursor *cursor = _cursors[i].cursorGroup->cursors[0].cursor;
- CursorMan.replaceCursor(cursor->getSurface(), cursor->getWidth(), cursor->getHeight(), cursor->getHotspotX(), cursor->getHotspotY(), cursor->getKeyColor());
- CursorMan.replaceCursorPalette(cursor->getPalette(), 0, 256);
+ CursorMan.replaceCursor(cursor);
return;
}
}