[Scummvm-git-logs] scummvm master -> 4b13347df8bd208d6bfbc9125d13e973f261469e
sluicebox
22204938+sluicebox at users.noreply.github.com
Mon Oct 21 20:14:06 CEST 2019
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
855d8c9155 SCI: Add LSL6 Mac Floppy detection entry
8dcdc63af1 SCI: Add LSL6 Mac Floppy kGetCWD workaround
4ed93d2bcb SCI32: Add LSL6 Mac CD detection entry
4b13347df8 SCI32: Add support for AIFF audio
Commit: 855d8c9155484047c2b894c8409a924be0d5748c
https://github.com/scummvm/scummvm/commit/855d8c9155484047c2b894c8409a924be0d5748c
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-10-21T11:13:24-07:00
Commit Message:
SCI: Add LSL6 Mac Floppy detection entry
Changed paths:
engines/sci/detection_tables.h
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index b5b0050..3a6ab62 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -2722,6 +2722,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::ES_ESP, Common::kPlatformDOS, 0, GUIO_STD16 },
+ // Larry 6 - English Macintosh Floppy (provided by sluicebox)
+ // VERSION file reports "1.0"
+ {"lsl6", "", {
+ {"Data1", 0, "482e6bcdda3a89390d5c4bcbfb5896b4", 2754907},
+ {"Data2", 0, "ba0799a45076780dfbceb8fce4c549c9", 5846345},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK, GUIO_STD16_MAC },
+
// Crazy Nick's Software Picks: Leisure Suit Larry's Casino - English DOS (from the Leisure Suit Larry Collection)
// Executable scanning reports "1.001.029", VERSION file reports "1.000"
{"cnick-lsl", "", {
Commit: 8dcdc63af186eba7e5c4d6f9f4e389455c6ff4aa
https://github.com/scummvm/scummvm/commit/8dcdc63af186eba7e5c4d6f9f4e389455c6ff4aa
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-10-21T11:13:24-07:00
Commit Message:
SCI: Add LSL6 Mac Floppy kGetCWD workaround
The game now starts
Changed paths:
engines/sci/engine/kernel_tables.h
engines/sci/engine/workarounds.cpp
engines/sci/engine/workarounds.h
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 396df91..0149f0e 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -707,7 +707,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(Format), SIG_EVERYWHERE, "r[ri](.*)", NULL, NULL },
{ MAP_CALL(GameIsRestarting), SIG_EVERYWHERE, "(i)", NULL, NULL },
{ MAP_CALL(GetAngle), SIG_EVERYWHERE, "iiii", NULL, kGetAngle_workarounds },
- { MAP_CALL(GetCWD), SIG_EVERYWHERE, "r", NULL, NULL },
+ { MAP_CALL(GetCWD), SIG_EVERYWHERE, "r", NULL, kGetCWD_workarounds },
{ MAP_CALL(GetDistance), SIG_EVERYWHERE, "ii(i)(i)(i)(i)", NULL, NULL },
{ MAP_CALL(GetEvent), SIG_SCIALL, SIGFOR_MAC, "io(i*)", NULL, NULL },
{ MAP_CALL(GetEvent), SIG_EVERYWHERE, "io", NULL, NULL },
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 15519fb..c071383 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -745,6 +745,12 @@ const SciWorkaroundEntry kGetAngle_workarounds[] = {
};
// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
+const SciWorkaroundEntry kGetCWD_workarounds[] = {
+ { GID_LSL6, -1, 0, 0, "LSL6", "play", NULL, 0, 0, { WORKAROUND_IGNORE, 0 } }, // Mac version passes uninitialized global (zero) on startup, then immediately overwrites it with kGetSaveDir
+ SCI_WORKAROUNDENTRY_TERMINATOR
+};
+
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kFileIOOpen_workarounds[] = {
{ GID_HOYLE5, -1, 64990, 0, "Restore", "doit", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when checking for bridgesg.cat or poker.cat when showing restore dialog
{ GID_TORIN, 61000, 61000, 0, "roSierraLogo", "init", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // Missing second argument when the game checks for autosave.cat after the Sierra logo
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index b244f8b..528fa93 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -79,6 +79,7 @@ extern const SciWorkaroundEntry kFindKey_workarounds[];
extern const SciWorkaroundEntry kFrameOut_workarounds[];
extern const SciWorkaroundEntry kDeleteKey_workarounds[];
extern const SciWorkaroundEntry kGetAngle_workarounds[];
+extern const SciWorkaroundEntry kGetCWD_workarounds[];
extern const SciWorkaroundEntry kGraphDrawLine_workarounds[];
extern const SciWorkaroundEntry kGraphSaveBox_workarounds[];
extern const SciWorkaroundEntry kGraphRestoreBox_workarounds[];
Commit: 4ed93d2bcb702f3030c4f26031aa87938eb82b48
https://github.com/scummvm/scummvm/commit/4ed93d2bcb702f3030c4f26031aa87938eb82b48
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-10-21T11:13:24-07:00
Commit Message:
SCI32: Add LSL6 Mac CD detection entry
Trac #11218
Changed paths:
engines/sci/detection_tables.h
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 3a6ab62..1023bd8 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -2771,6 +2771,8 @@ static const struct ADGameDescription SciGameDescriptions[] = {
#define GUIO_LSL6HIRES GUIO3(GUIO_NOASPECT, \
GUIO_LINKSPEECHTOSFX, \
GAMEOPTION_ORIGINAL_SAVELOAD)
+#define GUIO_LSL6HIRES_MAC GUIO2(GUIO_NOASPECT, \
+ GUIO_LINKSPEECHTOSFX)
// Larry 6 - English/German DOS CD - HIRES
// SCI interpreter version 2.100.002
@@ -2796,7 +2798,18 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::FR_FRA, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO_LSL6HIRES },
+ // Larry 6 - English Macintosh CD - HIRES (provided by michaelklaube in bug report #11218)
+ {"lsl6hires", "Hi-res", {
+ {"Data1", 0, "2c4e00a6910490831d4d84e9e6a49ec4", 3456494},
+ {"Data2", 0, "a7522b925dd5422c2db2b0a2337c76c3", 5856678},
+ {"Data3", 0, "9ebb490ec63721e5261111b918b5520e", 5577998},
+ {"Data4", 0, "d70687689ff3cf19a5e3c79dfced1c94", 3472320},
+ {"Data5", 0, "e91c3b681095a263fcb2f2c8d8fc74b6", 3274099},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_UNSTABLE, GUIO_LSL6HIRES_MAC },
+
#undef GUIO_LSL6HIRES
+#undef GUIO_LSL6HIRES_MAC
#define GUIO_LSL7_DEMO GUIO4(GUIO_NOASPECT, \
GUIO_NOMIDI, \
Commit: 4b13347df8bd208d6bfbc9125d13e973f261469e
https://github.com/scummvm/scummvm/commit/4b13347df8bd208d6bfbc9125d13e973f261469e
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2019-10-21T11:13:24-07:00
Commit Message:
SCI32: Add support for AIFF audio
Used by at least LSL6 Mac CD for voices
Changed paths:
engines/sci/sci.cpp
engines/sci/sound/audio32.cpp
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 09adf73..f44bed6 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -160,6 +160,7 @@ SciEngine::SciEngine(OSystem *syst, const ADGameDescription *desc, SciGameId gam
SearchMan.addSubDirectoryMatching(gameDataDir, "Sound Folder"); // Mac audio files
SearchMan.addSubDirectoryMatching(gameDataDir, "Voices Folder", 0, 2, true); // Mac audio36 files (recursive for Torin)
SearchMan.addSubDirectoryMatching(gameDataDir, "Voices"); // Mac audio36 files
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Voices/AUD#"); // LSL6 Mac audio36 files
SearchMan.addSubDirectoryMatching(gameDataDir, "VMD Folder"); // Mac VMD files
// Add the patches directory, except for KQ6CD; The patches folder in some versions of KQ6CD
diff --git a/engines/sci/sound/audio32.cpp b/engines/sci/sound/audio32.cpp
index 9bf08c5..0f08e80 100644
--- a/engines/sci/sound/audio32.cpp
+++ b/engines/sci/sound/audio32.cpp
@@ -22,6 +22,7 @@
#include "sci/sound/audio32.h"
#include "audio/audiostream.h" // for SeekableAudioStream
+#include "audio/decoders/aiff.h" // for makeAIFFStream
#include "audio/decoders/mac_snd.h" // for makeMacSndStream
#include "audio/decoders/raw.h" // for makeRawStream, RawFlags::FLAG_16BITS
#include "audio/decoders/wave.h" // for makeWAVStream
@@ -84,6 +85,25 @@ bool detectWaveAudio(Common::SeekableReadStream &stream) {
return true;
}
+bool detectAIFFAudio(Common::SeekableReadStream &stream) {
+ const size_t initialPosition = stream.pos();
+
+ byte blockHeader[8];
+ if (stream.read(blockHeader, sizeof(blockHeader)) != sizeof(blockHeader)) {
+ stream.seek(initialPosition);
+ return false;
+ }
+
+ stream.seek(initialPosition);
+ const uint32 headerType = READ_BE_UINT32(blockHeader);
+
+ if (headerType != MKTAG('F', 'O', 'R', 'M')) {
+ return false;
+ }
+
+ return true;
+}
+
bool detectMacSndAudio(Common::SeekableReadStream &stream) {
const size_t initialPosition = stream.pos();
@@ -811,6 +831,8 @@ uint16 Audio32::play(int16 channelIndex, const ResourceId resourceId, const bool
audioStream = makeSOLStream(dataStream, DisposeAfterUse::YES);
} else if (detectWaveAudio(*dataStream)) {
audioStream = Audio::makeWAVStream(dataStream, DisposeAfterUse::YES);
+ } else if (detectAIFFAudio(*dataStream)) {
+ audioStream = Audio::makeAIFFStream(dataStream, DisposeAfterUse::YES);
} else if (detectMacSndAudio(*dataStream)) {
audioStream = Audio::makeMacSndStream(dataStream, DisposeAfterUse::YES);
} else {
More information about the Scummvm-git-logs
mailing list