[Scummvm-cvs-logs] scummvm master -> 4858adb72d8d83ea5ae9f024bbe978023a19ef06
m-kiewitz
m_kiewitz at users.sourceforge.net
Fri Jun 12 18:34:31 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4858adb72d SHERLOCK: 3DO: mouse cursor support
Commit: 4858adb72d8d83ea5ae9f024bbe978023a19ef06
https://github.com/scummvm/scummvm/commit/4858adb72d8d83ea5ae9f024bbe978023a19ef06
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-06-12T18:33:23+02:00
Commit Message:
SHERLOCK: 3DO: mouse cursor support
Changed paths:
engines/sherlock/events.cpp
engines/sherlock/image_file.cpp
engines/sherlock/image_file.h
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index f7031f0..1ae19c1 100644
--- a/engines/sherlock/events.cpp
+++ b/engines/sherlock/events.cpp
@@ -54,7 +54,13 @@ void Events::loadCursors(const Common::String &filename) {
hideCursor();
delete _cursorImages;
- _cursorImages = new ImageFile(filename);
+ if (_vm->getPlatform() != Common::kPlatform3DO) {
+ // PC
+ _cursorImages = new ImageFile3DO(filename);
+ } else {
+ // 3DO
+ _cursorImages = new ImageFile3DO(filename, true);
+ }
_cursorId = INVALID_CURSOR;
}
@@ -82,7 +88,13 @@ void Events::setCursor(CursorId cursorId) {
void Events::setCursor(const Graphics::Surface &src, int hotspotX, int hotspotY) {
_cursorId = INVALID_CURSOR;
- CursorMan.replaceCursor(src.getPixels(), src.w, src.h, hotspotX, hotspotY, 0xff);
+ if (_vm->getPlatform() != Common::kPlatform3DO) {
+ // PC 8-bit palettized
+ CursorMan.replaceCursor(src.getPixels(), src.w, src.h, hotspotX, hotspotY, 0xff);
+ } else {
+ // 3DO RGB565
+ CursorMan.replaceCursor(src.getPixels(), src.w, src.h, hotspotX, hotspotY, 0x0000, false, &src.format);
+ }
showCursor();
}
diff --git a/engines/sherlock/image_file.cpp b/engines/sherlock/image_file.cpp
index d47f2c5..43d3cf3 100644
--- a/engines/sherlock/image_file.cpp
+++ b/engines/sherlock/image_file.cpp
@@ -243,14 +243,14 @@ void ImageFile3DO::setVm(SherlockEngine *vm) {
_vm = vm;
}
-ImageFile3DO::ImageFile3DO(const Common::String &name) {
+ImageFile3DO::ImageFile3DO(const Common::String &name, bool isRoomDataFormat) {
Common::File *dataStream = new Common::File();
if (!dataStream->open(name)) {
error("unable to open %s\n", name.c_str());
}
- load(*dataStream, false); // this is never called for room data
+ load(*dataStream, isRoomDataFormat);
delete dataStream;
}
diff --git a/engines/sherlock/image_file.h b/engines/sherlock/image_file.h
index 5cdf1db..ddca4b8 100644
--- a/engines/sherlock/image_file.h
+++ b/engines/sherlock/image_file.h
@@ -135,7 +135,7 @@ private:
void loadAnimationFile(Common::SeekableReadStream &stream);
public:
- ImageFile3DO(const Common::String &name);
+ ImageFile3DO(const Common::String &name, bool isRoomDataFormat = false);
ImageFile3DO(Common::SeekableReadStream &stream, bool isRoomData = false);
~ImageFile3DO();
static void setVm(SherlockEngine *vm);
More information about the Scummvm-git-logs
mailing list