[Scummvm-cvs-logs] SF.net SVN: scummvm:[54495] scummvm/trunk
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri Nov 26 13:37:24 CET 2010
Revision: 54495
http://scummvm.svn.sourceforge.net/scummvm/?rev=54495&view=rev
Author: thebluegr
Date: 2010-11-26 12:37:24 +0000 (Fri, 26 Nov 2010)
Log Message:
-----------
SCI: Implemented FR #3101338: "King's Quest 6 Windows Mouse Icons"
Added an option to use the original Windows cursors in the Windows version of KQ6
Also, added an update on how the Mac cursors are handled (perhaps the handling is
the same)
Modified Paths:
--------------
scummvm/trunk/README
scummvm/trunk/engines/sci/graphics/cursor.cpp
scummvm/trunk/engines/sci/graphics/cursor.h
scummvm/trunk/engines/sci/sci.cpp
Modified: scummvm/trunk/README
===================================================================
--- scummvm/trunk/README 2010-11-26 10:40:19 UTC (rev 54494)
+++ scummvm/trunk/README 2010-11-26 12:37:24 UTC (rev 54495)
@@ -2004,6 +2004,14 @@
music_mute bool If true, music is muted
sfx_mute bool If true, sound effects are muted
+King's Quest VI Windows adds the following non-standard keywords:
+
+ windows_cursors bool If true, the original unscaled black and white
+ Windows cursors are used instead of the DOS
+ ones. If false, the DOS cursors are used in the
+ Windows version, upscaled to match the rest of
+ the upscaled graphics
+
Simon the Sorcerer 1 and 2 add the following non-standard keywords:
music_mute bool If true, music is muted
Modified: scummvm/trunk/engines/sci/graphics/cursor.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/cursor.cpp 2010-11-26 10:40:19 UTC (rev 54494)
+++ scummvm/trunk/engines/sci/graphics/cursor.cpp 2010-11-26 12:37:24 UTC (rev 54495)
@@ -23,6 +23,7 @@
*
*/
+#include "common/config-manager.h"
#include "common/events.h"
#include "common/macresman.h"
#include "common/system.h"
@@ -59,6 +60,10 @@
_zoomColor = 0;
_zoomMultiplier = 0;
_cursorSurface = 0;
+ if (g_sci && g_sci->getGameId() == GID_KQ6 && g_sci->getPlatform() == Common::kPlatformWindows)
+ _useOriginalKQ6WinCursors = ConfMan.getBool("windows_cursors");
+ else
+ _useOriginalKQ6WinCursors = false;
}
GfxCursor::~GfxCursor() {
@@ -171,6 +176,10 @@
if (_cachedCursors.size() >= MAX_CACHED_CURSORS)
purgeCache();
+ // Use the original Windows cursors in KQ6, if requested
+ if (_useOriginalKQ6WinCursors)
+ viewNum += 2000; // Windows cursors
+
if (!_cachedCursors.contains(viewNum))
_cachedCursors[viewNum] = new GfxView(_resMan, _screen, _palette, viewNum);
@@ -195,7 +204,7 @@
}
const byte *rawBitmap = cursorView->getBitmap(loopNum, celNum);
- if (_upscaledHires) {
+ if (_upscaledHires && !_useOriginalKQ6WinCursors) {
// Scale cursor by 2x - note: sierra didn't do this, but it looks much better
width *= 2;
height *= 2;
@@ -226,6 +235,7 @@
}
// TODO: What about the 2000 resources? Inventory items? How to handle?
+ // Update: Perhaps these are handled like the Windows cursors in KQ6?
// TODO: 1000 + celNum won't work for GK1
Resource *resource = _resMan->findResource(ResourceId(kResourceTypeCursor, 1000 + celNum), false);
Modified: scummvm/trunk/engines/sci/graphics/cursor.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/cursor.h 2010-11-26 10:40:19 UTC (rev 54494)
+++ scummvm/trunk/engines/sci/graphics/cursor.h 2010-11-26 12:37:24 UTC (rev 54495)
@@ -112,6 +112,13 @@
CursorCache _cachedCursors;
bool _isVisible;
+
+ // KQ6 Windows has different black and white cursors. If this is
+ // true (set from the sci_originalkq6wincursors ini setting), then
+ // we use these, and don't scale them by 2x like the rest of the
+ // graphics, like SSCI did. These look very ugly, which is why
+ // they aren't enabled by default.
+ bool _useOriginalKQ6WinCursors;
};
} // End of namespace Sci
Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp 2010-11-26 10:40:19 UTC (rev 54494)
+++ scummvm/trunk/engines/sci/sci.cpp 2010-11-26 12:37:24 UTC (rev 54495)
@@ -184,6 +184,7 @@
// Assign default values to the config manager, in case settings are missing
ConfMan.registerDefault("sci_originalsaveload", "false");
ConfMan.registerDefault("native_fb01", "false");
+ ConfMan.registerDefault("windows_cursors", "false"); // Windows cursors for KQ6 Windows
_resMan = new ResourceManager();
assert(_resMan);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list