SCI: Add option to use SQ4 CD Windows cursors

This commit is contained in:
sluicebox 2021-05-14 16:40:26 -06:00
parent 03b9943ec0
commit 7957b50af1
5 changed files with 22 additions and 8 deletions

View File

@ -219,9 +219,9 @@ static const ADExtraGuiOptionsMap optionsList[] = {
}
},
// KQ5 and KQ6 CD Windows - windows cursors
// KQ5 and KQ6 and SQ4 CD Windows - windows cursors
{
GAMEOPTION_KQ_WINDOWS_CURSORS,
GAMEOPTION_WINDOWS_CURSORS,
{
_s("Use Windows cursors"),
_s("Use the Windows cursors (smaller and monochrome) instead of the DOS ones"),

View File

@ -30,7 +30,7 @@ namespace Sci {
#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS2
#define GAMEOPTION_MIDI_MODE GUIO_GAMEOPTIONS3
#define GAMEOPTION_JONES_CDAUDIO GUIO_GAMEOPTIONS4
#define GAMEOPTION_KQ_WINDOWS_CURSORS GUIO_GAMEOPTIONS5
#define GAMEOPTION_WINDOWS_CURSORS GUIO_GAMEOPTIONS5
#define GAMEOPTION_SQ4_SILVER_CURSORS GUIO_GAMEOPTIONS6
#define GAMEOPTION_EGA_UNDITHER GUIO_GAMEOPTIONS7
// HIGH_RESOLUTION_GRAPHICS availability is checked for in SciEngine::run()

View File

@ -1637,7 +1637,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
GAMEOPTION_ORIGINAL_SAVELOAD, \
GAMEOPTION_MIDI_MODE, \
GAMEOPTION_RGB_RENDERING, \
GAMEOPTION_KQ_WINDOWS_CURSORS)
GAMEOPTION_WINDOWS_CURSORS)
// King's Quest 5 - English Amiga (from www.back2roots.org)
// Executable scanning reports "1.004.018"
@ -1992,7 +1992,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
GAMEOPTION_RGB_RENDERING)
#define GUIO_KQ6_CD_WINDOWS GUIO7(GUIO_NOASPECT, \
GAMEOPTION_KQ_WINDOWS_CURSORS, \
GAMEOPTION_WINDOWS_CURSORS, \
GAMEOPTION_HIGH_RESOLUTION_GRAPHICS, \
GAMEOPTION_PREFER_DIGITAL_SFX, \
GAMEOPTION_ORIGINAL_SAVELOAD, \
@ -2117,7 +2117,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "233394a5f33b475ae5975e7e9a420865", 8376352},
{"resource.msg", 0, "51ca9f8afc42ef442f6545b3c82a9165", 596121},
AD_LISTEND},
Common::KO_KOR, Common::kPlatformWindows, ADGF_CD, GUIO5(GUIO_NOASPECT, GAMEOPTION_KQ_WINDOWS_CURSORS, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_MIDI_MODE) },
Common::KO_KOR, Common::kPlatformWindows, ADGF_CD, GUIO5(GUIO_NOASPECT, GAMEOPTION_WINDOWS_CURSORS, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_MIDI_MODE) },
// King's Quest 6 - English Macintosh Floppy
// VERSION file reports "1.0"
@ -5175,7 +5175,8 @@ static const struct ADGameDescription SciGameDescriptions[] = {
GAMEOPTION_MIDI_MODE, \
GAMEOPTION_RGB_RENDERING)
#define GUIO_SQ4_CD_WINDOWS GUIO6(GUIO_MIDIGM, \
#define GUIO_SQ4_CD_WINDOWS GUIO7(GUIO_MIDIGM, \
GAMEOPTION_WINDOWS_CURSORS, \
GAMEOPTION_SQ4_SILVER_CURSORS, \
GAMEOPTION_PREFER_DIGITAL_SFX, \
GAMEOPTION_ORIGINAL_SAVELOAD, \

View File

@ -64,6 +64,11 @@ GfxCursor::GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *sc
else
_useOriginalKQ6WinCursors = false;
if (g_sci && g_sci->getGameId() == GID_SQ4 && g_sci->getPlatform() == Common::kPlatformWindows)
_useOriginalSQ4WinCursors = ConfMan.getBool("windows_cursors");
else
_useOriginalSQ4WinCursors = false;
if (g_sci && g_sci->getGameId() == GID_SQ4 && getSciVersion() == SCI_VERSION_1_1)
_useSilverSQ4CDCursors = ConfMan.getBool("silver_cursors");
else
@ -214,6 +219,9 @@ void GfxCursor::kernelSetView(GuiResourceId viewNum, int loopNum, int celNum, Co
default:
break;
}
} else if (_useOriginalSQ4WinCursors) {
// Use the Windows black and white cursors
celNum += 1;
}
if (!_cachedCursors.contains(viewNum))

View File

@ -129,10 +129,15 @@ private:
// ugly, which is why they aren't enabled by default.
bool _useOriginalKQ6WinCursors;
// The Windows CD version of SQ4 used its own black and white cursors.
// If this is true (set from the windows_cursors ini setting) then we use
// them instead of the DOS color cursors, which are the default.
bool _useOriginalSQ4WinCursors;
// The CD version of SQ4 contains a complete set of silver mouse cursors.
// If this is true (set from the silver_cursors ini setting), then we use
// these instead and replace the game's gold cursors with their silver
// equivalents.
// equivalents. If this is true, _useOriginalSQ4WinCursors is ignored.
bool _useSilverSQ4CDCursors;
};