[Scummvm-git-logs] scummvm master -> 4ec06a2bf696dbce7662e29fbf08a2bfb1463938
dwatteau
noreply at scummvm.org
Sun Aug 7 15:26:04 UTC 2022
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:
4ec06a2bf6 SCUMM: Unify WORKAROUND usage and complete/tweak some of them
Commit: 4ec06a2bf696dbce7662e29fbf08a2bfb1463938
https://github.com/scummvm/scummvm/commit/4ec06a2bf696dbce7662e29fbf08a2bfb1463938
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-08-07T17:24:27+02:00
Commit Message:
SCUMM: Unify WORKAROUND usage and complete/tweak some of them
Changed paths:
engines/scumm/imuse/imuse.cpp
engines/scumm/imuse_digi/dimuse_engine.cpp
engines/scumm/resource.cpp
engines/scumm/script_v2.cpp
engines/scumm/script_v5.cpp
engines/scumm/smush/smush_player.cpp
engines/scumm/sound.cpp
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index cb461a192f2..ecd29abdfbb 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -674,7 +674,7 @@ bool IMuseInternal::startSound_internal(int sound, int offset) {
if (_game_id == GID_SAMNMAX && sound == 82 && getSoundStatus_internal(81, false))
ImClearTrigger(81, 1);
- // Workaround for monkey2 bug #1410 / Scabb Island
+ // WORKAROUND for monkey2 bug #1410 / Scabb Island
//
// Tunes involved:
// 100 - Captain Dread's map
@@ -691,11 +691,11 @@ bool IMuseInternal::startSound_internal(int sound, int offset) {
if (_game_id == GID_MONKEY2 && (sound == 107) && (getSoundStatus_internal(100, true) == 1))
return false;
- // In some cases 107 is running and doesn't get killed at Dread's map
+ // WORKAROUND: In some cases 107 is running and doesn't get killed at Dread's map
if (_game_id == GID_MONKEY2 && (sound == 100) && (getSoundStatus_internal(107, true) == 1))
IMuseInternal::stopSound_internal(107);
- // Workaround for monkey2 bug #1410 / Booty Island
+ // WORKAROUND for monkey2 bug #1410 / Booty Island
//
// Tunes involved
// 100 - Captain Dread's map
diff --git a/engines/scumm/imuse_digi/dimuse_engine.cpp b/engines/scumm/imuse_digi/dimuse_engine.cpp
index 79beb31c1c4..ab8c90df412 100644
--- a/engines/scumm/imuse_digi/dimuse_engine.cpp
+++ b/engines/scumm/imuse_digi/dimuse_engine.cpp
@@ -187,7 +187,7 @@ int IMuseDigital::startVoice(int soundId, const char *soundName, byte speakingAc
if (fileDoesNotExist)
return 1;
- // Workaround for this particular sound file not playing (this is a bug in the original):
+ // WORKAROUND for this particular sound file not playing (this is a bug in the original):
// this is happening because the sound buffer responsible for speech
// is still busy with the previous speech file playing during the SAN
// movie. We just stop the SMUSH speech sound before playing NEXUS.029.
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index 89d5d0d7cb6..c1b0d31093f 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -1732,21 +1732,21 @@ void ScummEngine::applyWorkaroundIfNeeded(ResType type, int idx) {
delete[] patchedScript;
} else
- // For some reason, the CD version of Monkey Island 1 removes some of
- // the text when giving the wimpy idol to the cannibals. It looks like
- // a mistake, because one of the text that is printed is immediately
- // overwritten. This probably affects all CD versions, so we just have
- // to add further patches as they are reported.
+ // WORKAROUND: For some reason, the CD version of Monkey Island 1
+ // removes some of the text when giving the wimpy idol to the cannibals.
+ // It looks like a mistake, because one of the text that is printed is
+ // immediately overwritten. This probably affects all CD versions, so we
+ // just have to add further patches as they are reported.
if (_game.id == GID_MONKEY && type == rtRoom && idx == 25 && _enableEnhancements) {
tryPatchMI1CannibalScript(getResourceAddress(type, idx), size);
} else
- // There is a cracked version of Maniac Mansion v2 that attempts to
- // remove the security door copy protection. With it, any code is
- // accepted as long as you get the last digit wrong. Unfortunately,
- // it changes a script that is used by all keypads in the game, which
- // means some puzzles are completely nerfed.
+ // WORKAROUND: There is a cracked version of Maniac Mansion v2 that
+ // attempts to remove the security door copy protection. With it, any
+ // code is accepted as long as you get the last digit wrong.
+ // Unfortunately, it changes a script that is used by all keypads in the
+ // game, which means some puzzles are completely nerfed.
//
// Even worse, this is the version that GOG and Steam are selling. No,
// seriously! I've reported this as a bug, but it remains unclear
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 61d1f3a4ed0..2c55833cac7 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -1154,7 +1154,10 @@ void ScummEngine_v2::o2_walkActorTo() {
int act = getVarOrDirectByte(PARAM_1);
- // WORKAROUND bug #2110
+ // WORKAROUND bug #2110: crash when trying to fly back to San Francisco.
+ // walkActorTo() is called with an invalid actor number by script 115,
+ // after the room is loaded. The original DOS interpreter probably let
+ // this slip by.
if (_game.id == GID_ZAK && _game.version == 1 && vm.slot[_currentScript].number == 115 && act == 249) {
act = VAR(VAR_EGO);
}
@@ -1252,7 +1255,7 @@ void ScummEngine_v2::o2_startScript() {
}
void ScummEngine_v2::stopScriptCommon(int script) {
- // WORKAROUND bug #4112: If you enter the lab while Dr. Fred has the powered turned off
+ // WORKAROUND bug #4112: If you enter the lab while Dr. Fred has the power turned off
// to repair the Zom-B-Matic, the script will be stopped and the power will never turn
// back on. This fix forces the power on, when the player enters the lab,
// if the script which turned it off is running
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 6bc156e8888..9e8b3e88cb5 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -420,7 +420,7 @@ void ScummEngine_v5::o5_actorFromPos() {
void ScummEngine_v5::o5_actorOps() {
static const byte convertTable[20] =
{ 1, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 20 };
- // Fix for bug #2233 "MI2 FM-TOWNS: Elaine's mappiece directly flies to treehouse"
+ // WORKAROUND bug #2233 "MI2 FM-TOWNS: Elaine's mappiece directly flies to treehouse"
// There's extra code inserted in script 45 from room 45 that caused that behaviour,
// the code below just skips the extra script code.
if (_game.id == GID_MONKEY2 && _game.platform == Common::kPlatformFMTowns &&
@@ -719,8 +719,10 @@ void ScummEngine_v5::o5_animateActor() {
int act = getVarOrDirectByte(PARAM_1);
int anim = getVarOrDirectByte(PARAM_2);
- // WORKAROUND bug #1265: This seems to be yet another script bug which
- // the original engine let slip by. For details, refer to the tracker item.
+ // WORKAROUND bug #1265: This script calls animateCostume(86,255) and
+ // animateCostume(31,255), with 86 and 31 being script numbers used as
+ // (way out of range) actor numbers. This seems to be yet another script
+ // bug which the original engine let slip by.
if (_game.id == GID_INDY4 && vm.slot[_currentScript].number == 206 && _currentRoom == 17 && (act == 31 || act == 86)) {
return;
}
@@ -2620,6 +2622,7 @@ void ScummEngine_v5::o5_startScript() {
// WORKAROUND bug #1025: in Loom, using the stealth draft on the
// shepherds would crash the game because of a missing actor number for
// their first reaction line ("We are the masters of stealth"...).
+ // The original interpreter would just skip the line.
if (_game.id == GID_LOOM && _game.version == 3 && _roomResource == 23 && script == 232 && data[0] == 0) {
byte shepherdActor;
bool buggyShepherdsEGArelease = false;
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index dfb1532f5ba..91ee7a6ed14 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -1251,7 +1251,7 @@ void SmushPlayer::play(const char *filename, int32 speed, int32 offset, int32 st
skipped = 0;
if (_updateNeeded) {
if (!skipFrame) {
- // Workaround for bug #2415: "FT DEMO: assertion triggered
+ // WORKAROUND for bug #2415: "FT DEMO: assertion triggered
// when playing movie". Some frames there are 384 x 224
int w = MIN(_width, _vm->_screenWidth);
int h = MIN(_height, _vm->_screenHeight);
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 104224fa094..145ed6c22fb 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -404,7 +404,7 @@ void Sound::playSound(int soundID) {
stream = Audio::makeRawStream(sound, size, rate, Audio::FLAG_UNSIGNED);
_mixer->playStream(Audio::Mixer::kSFXSoundType, nullptr, stream, soundID);
}
- // WORKAROUND bug # 1311447
+ // WORKAROUND bug #2221
else if (READ_BE_UINT32(ptr) == 0x460e200d) {
// This sound resource occurs in the Macintosh version of Monkey Island.
// I do now know whether it is used in any place other than the one
@@ -1709,7 +1709,7 @@ int ScummEngine::readSoundResource(ResId idx) {
case MKTAG('T','A','L','K'):
case MKTAG('D','I','G','I'):
case MKTAG('C','r','e','a'):
- case 0x460e200d: // WORKAROUND bug # 1311447
+ case 0x460e200d: // WORKAROUND bug #2221
_fileHandle->seek(-12, SEEK_CUR);
total_size = _fileHandle->readUint32BE();
ptr = _res->createResource(rtSound, idx, total_size);
More information about the Scummvm-git-logs
mailing list