[Scummvm-git-logs] scummvm master -> c51d719c114d1114ce965bef59570b014a3b60c2
athrxx
noreply at scummvm.org
Thu Jan 23 23:39:15 UTC 2025
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
adb3d5fc3a SCI: (PEPPER/LB2/Windows) - enable 16 colors mode
c51d719c11 SCI: (PEPPER/LB2/Windows) - add option for windows b/w cursors
Commit: adb3d5fc3a47632675bda7b6338b38a9a4a64dee
https://github.com/scummvm/scummvm/commit/adb3d5fc3a47632675bda7b6338b38a9a4a64dee
Author: athrxx (athrxx at scummvm.org)
Date: 2025-01-23T23:22:33+01:00
Commit Message:
SCI: (PEPPER/LB2/Windows) - enable 16 colors mode
(also add Windows platform detection entries for both targets)
Changed paths:
engines/sci/detection_internal.cpp
engines/sci/detection_tables.h
diff --git a/engines/sci/detection_internal.cpp b/engines/sci/detection_internal.cpp
index eaf16116c82..6c3a0f6fcb7 100644
--- a/engines/sci/detection_internal.cpp
+++ b/engines/sci/detection_internal.cpp
@@ -116,7 +116,9 @@ Common::String customizeGuiOptions(Common::Path gamePath, Common::String guiOpti
SciVersion max;
const char gfxDriverName[13];
const char *guio;
- } rmodes[] = {
+ };
+
+ static const RMode rmodes[] = {
{ SCI_VERSION_0_EARLY, SCI_VERSION_1_EGA_ONLY, "EGA320.DRV", GUIO_RENDEREGA },
{ SCI_VERSION_0_EARLY, SCI_VERSION_1_EGA_ONLY, "CGA320C.DRV", GUIO_RENDERCGA },
{ SCI_VERSION_0_EARLY, SCI_VERSION_1_EGA_ONLY, "CGA320BW.DRV", GUIO_RENDERCGABW },
@@ -134,10 +136,20 @@ Common::String customizeGuiOptions(Common::Path gamePath, Common::String guiOpti
{ SCI_VERSION_1_1, SCI_VERSION_1_1, "SCIWV.EXE", GUIO_RENDERWIN_16C }
};
+ static const char *sci11WinTargets[] = {
+ "ecoquest",
+ "kq6",
+ "laurabow2",
+ "pepper",
+ "sq4"
+ };
+
bool isWindows = false;
- if ((idStr.equals("kq6") || idStr.equals("sq4") || idStr.equals("ecoquest")) && platform == Common::kPlatformWindows) {
- guiOptions += GUIO_RENDERWIN_256C;
- isWindows = true;
+ if (platform == Common::kPlatformWindows) {
+ for (const char *const *i = sci11WinTargets; isWindows == false && i != &sci11WinTargets[ARRAYSIZE(sci11WinTargets)]; ++i)
+ isWindows = idStr.equals(*i);
+ if (isWindows)
+ guiOptions += GUIO_RENDERWIN_256C;
}
Common::FSNode node(gamePath);
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 25b51b8353f..18b3394be4f 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -2803,6 +2803,13 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::HE_ISR, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO_STD16_UNDITHER },
+#define GUIO_LB2_CD_WINDOWS GUIO6(GAMEOPTION_PREFER_DIGITAL_SFX, \
+ GAMEOPTION_WINDOWS_CURSORS, \
+ GAMEOPTION_ORIGINAL_SAVELOAD, \
+ GAMEOPTION_MIDI_MODE, \
+ GAMEOPTION_RGB_RENDERING, \
+ GAMEOPTION_ENABLE_GMM_SAVE)
+
// Laura Bow 2 - English DOS Non-Interactive Demo (from FRG)
// Executable scanning reports "x.yyy.zzz"
// SCI interpreter version 1.001.069 (just a guess)
@@ -2838,6 +2845,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformDOS, ADGF_CD, GUIO_STD16_SPEECH },
+ // Laura Bow 2 - English Windows CD
+ // Executable scanning reports "1.001.072", VERSION file reports "1.1" (from jvprat)
+ {"laurabow2", "CD", {
+ {"resource.map", 0, "a70945e61ba7ac7bfea6b7bd72c6aec5", 7274},
+ {"resource.000", 0, "82578b8d5a7e09c4c58891ca49fae35b", 5598672},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_CD, GUIO_LB2_CD_WINDOWS },
+
// Laura Bow 2 - Korean fan translation, based on English DOS CD
// Executable scanning reports "1.001.072", VERSION file reports "1.1"
{"laurabow2", "CD", {
@@ -2892,6 +2907,8 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::ES_ESP, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO_STD16_SPEECH },
+#undef GUIO_LB2_CD_WINDOWS
+
#define GUIO_LIGHTHOUSE_DEMO GUIO6(GUIO_NOSPEECH, \
GUIO_NOMUSIC, \
GUIO_NOASPECT, \
@@ -4370,6 +4387,15 @@ static const struct ADGameDescription SciGameDescriptions[] = {
#undef GUIO_PHANTASMAGORIA2
#undef GUIO_PHANTASMAGORIA2_CENSORED
+#define GUIO_PEPPER_WINDOWS GUIO8(GUIO_NOSPEECH, \
+ GAMEOPTION_WINDOWS_CURSORS, \
+ GAMEOPTION_PREFER_DIGITAL_SFX, \
+ GAMEOPTION_ORIGINAL_SAVELOAD, \
+ GAMEOPTION_MIDI_MODE, \
+ GAMEOPTION_RGB_RENDERING, \
+ GAMEOPTION_TTS, \
+ GAMEOPTION_ENABLE_GMM_SAVE)
+
// Pepper's Adventure In Time 1.000 English
// Executable scanning reports "1.001.072", VERSION file reports "1.000"
{"pepper", "", {
@@ -4378,6 +4404,11 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO_STD16 },
+ {"pepper", "", {
+ {"resource.map", 0, "72726dc81c1b4c1110c486be77369bc8", 5179},
+ {"resource.000", 0, "670d0c53622429f4b11275caf7f8d292", 5459574},
+ AD_LISTEND}, Common::EN_ANY, Common::kPlatformWindows, ADGF_NO_FLAGS, GUIO_PEPPER_WINDOWS },
+
// Pepper - English DOS Non-Interactive Demo
// Executable scanning reports "1.001.060", VERSION file reports "1.000"
{"pepper", "Demo", {
@@ -4402,6 +4433,8 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO_STD16 },
+#undef GUIO_PEPPER_WINDOWS
+
// Police Quest 1 VGA Remake - English DOS (from the Police Quest Collection)
// Executable scanning reports "1.001.029", VERSION file reports "2.000"
{"pq1sci", "SCI", {
Commit: c51d719c114d1114ce965bef59570b014a3b60c2
https://github.com/scummvm/scummvm/commit/c51d719c114d1114ce965bef59570b014a3b60c2
Author: athrxx (athrxx at scummvm.org)
Date: 2025-01-23T23:22:39+01:00
Commit Message:
SCI: (PEPPER/LB2/Windows) - add option for windows b/w cursors
Changed paths:
engines/sci/graphics/cursor.cpp
engines/sci/graphics/cursor.h
diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
index 28a9f2e8c31..3425c8ea1ee 100644
--- a/engines/sci/graphics/cursor.cpp
+++ b/engines/sci/graphics/cursor.cpp
@@ -41,7 +41,7 @@
namespace Sci {
GfxCursor::GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen, GfxCoordAdjuster16 *coordAdjuster, EventManager *eventMan)
- : _resMan(resMan), _palette(palette), _screen(screen), _coordAdjuster(coordAdjuster), _event(eventMan) {
+ : _resMan(resMan), _palette(palette), _screen(screen), _coordAdjuster(coordAdjuster), _event(eventMan), _winCursorStyle(kWinCursorStyleDefault) {
_upscaledHires = _screen->getUpscaledHires();
_isVisible = true;
@@ -59,20 +59,19 @@ GfxCursor::GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *sc
_zoomColor = 0;
_zoomMultiplier = 0;
- if (g_sci && g_sci->getGameId() == GID_KQ6 && g_sci->getPlatform() == Common::kPlatformWindows)
- _useOriginalKQ6WinCursors = ConfMan.getBool("windows_cursors");
- 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
- _useSilverSQ4CDCursors = false;
+ if (g_sci && g_sci->getPlatform() == Common::kPlatformWindows) {
+ int gid = g_sci->getGameId();
+ if (ConfMan.getBool("windows_cursors")) {
+ if (gid == GID_KQ6 || gid == GID_LAURABOW2)
+ _winCursorStyle = kWinCursorStyleBWAlt2;
+ else if (gid == GID_SQ4 || gid == GID_PEPPER)
+ _winCursorStyle = kWinCursorStyleBWAlt1;
+ }
+ // The silver_cursors setting is supposed to have priority over the windows_cursors setting
+ // (althought it would look better in the launcher if these options were mutually exclusive).
+ if (ConfMan.getBool("silver_cursors") && gid == GID_SQ4)
+ _winCursorStyle = kWinCursorStyleSilver;
+ }
}
GfxCursor::~GfxCursor() {
@@ -185,12 +184,12 @@ void GfxCursor::kernelSetView(GuiResourceId viewNum, int loopNum, int celNum, Co
if (_cachedCursors.size() >= MAX_CACHED_CURSORS)
purgeCache();
- // Use the original Windows cursors in KQ6, if requested
- if (_useOriginalKQ6WinCursors)
+ // Use the original Windows cursors in KQ6 or LB2, if requested
+ if (_winCursorStyle == kWinCursorStyleBWAlt2)
viewNum += 2000; // Windows cursors
// Use the alternate silver cursors in SQ4 CD, if requested
- if (_useSilverSQ4CDCursors) {
+ if (_winCursorStyle == kWinCursorStyleSilver) {
switch(viewNum) {
case 850:
case 852:
@@ -207,7 +206,7 @@ void GfxCursor::kernelSetView(GuiResourceId viewNum, int loopNum, int celNum, Co
default:
break;
}
- } else if (_useOriginalSQ4WinCursors) {
+ } else if (_winCursorStyle == kWinCursorStyleBWAlt1) {
// Use the Windows black and white cursors
celNum += 1;
}
@@ -236,7 +235,7 @@ void GfxCursor::kernelSetView(GuiResourceId viewNum, int loopNum, int celNum, Co
}
const SciSpan<const byte> &rawBitmap = cursorView->getBitmap(loopNum, celNum);
- if (_upscaledHires != GFX_SCREEN_UPSCALED_DISABLED && _upscaledHires != GFX_SCREEN_UPSCALED_480x300 && !_useOriginalKQ6WinCursors) {
+ if (_upscaledHires != GFX_SCREEN_UPSCALED_DISABLED && _upscaledHires != GFX_SCREEN_UPSCALED_480x300 && _winCursorStyle != kWinCursorStyleBWAlt2) {
// Scale cursor by 2x - note: sierra didn't do this, but it looks much better
width *= 2;
height *= 2;
diff --git a/engines/sci/graphics/cursor.h b/engines/sci/graphics/cursor.h
index a2856c4492a..22d9eac62ce 100644
--- a/engines/sci/graphics/cursor.h
+++ b/engines/sci/graphics/cursor.h
@@ -123,22 +123,24 @@ private:
bool _isVisible;
- // KQ6 Windows has different black and white cursors. If this is true (set
- // from the windows_cursors 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;
-
- // 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. If this is true, _useOriginalSQ4WinCursors is ignored.
- bool _useSilverSQ4CDCursors;
+ // The Windows CD versions of KQ6, SQ4 and LB2 and the Windows version of
+ // Pepper have extra sets of black and white cursors. Some games have one
+ // extra set (Pepper, SQ4), some have two extra sets (KQ6, LB2). If one of
+ // the kWinCursorBW alternatives is set (from the windows_cursors ini entry)
+ // then we use these b/w cursors instead of the DOS color cursors, which
+ // are the default in 256 colors mode.
+ // The CD version of SQ4 also contains a complete set of silver mouse
+ // cursors. If kWinCursorSilver is set (from the silver_cursors ini entry),
+ // then we use these instead and replace the game's gold cursors with their
+ // silver equivalents.
+
+ enum WinCursorStyle : int {
+ kWinCursorStyleDefault = 0,
+ kWinCursorStyleBWAlt1,
+ kWinCursorStyleBWAlt2,
+ kWinCursorStyleSilver
+ };
+ WinCursorStyle _winCursorStyle;
};
} // End of namespace Sci
More information about the Scummvm-git-logs
mailing list