Fixes two discrepancies in redundant fade detection that were discovered
while investigating LONGBOW bug #13674:
- MusicEntry::fadeTo was altered even when the fade was ignored
- Redundant fades are allowed in SSCI when the stopOnFade flag is passed
The existing workaround prevented a crash but it performed volume tests
on an object's offset and abruptly ended the bandit music instead of
fading it out as in the original.
The broken kDoSoundFade call is redundant because a second script calls
kDoSoundFade correctly at the same time. Now the broken call is ignored
and the music fades out normally.
Bug #5078
This allows to save some space on constrained devices which still allow
for command line.
Enable this space saving on DS and enable back command line support.
Cleanup old workaround for 3DS.
fakeBidiString accepts an argument named ignoreVerb. When it is set, we do
not reverse the current section at this point (only these 2 characters are
swapped, so that they'll be swapped back when reversing everything at once
afterwards).
But the condition above covers also end of string *current == 0 along with
the control characters, so on this case, the function still looked for the
newline character past the string buffer. On some cases, a previous string
that was written on the same buffer (the buffer is reused for every string
in the engine), can have newline exactly at this point, and we applied the
same logic, and swapped the newline with 0, which eventually resulted with
some garbled text from the previous buffer.
Fix by excluding end of buffer for this condition.
The call was unnecessary since the one being fundamental is the call made
to the resource manager mutex in _vm->getResourceAddress(); this fixes
some very rare (but also very real) cases of v7-8 games softlocking.
The Ultimate Talkie Edition fixes this at the source, by setting
Bit[70] as intended when you buy the map piece.
But it makes more sense to fix it at a later stage for us, so that
it will also apply for previous saves (if one enables the Enhancement
option), and so that one can also disable this enhancement just before
meeting Captain Dread at this point, if they prefer to restore the
original behavior of the game.
Again, we're not modding the game here, just restoring an intended
behavior which was hidden by a script error, but people may prefer
playing the game with the original behavior they've known for years
and years.
This actually comes from the Ultimate Talkie Edition, so we're just
borrowing their fix for this.
The original scripts check if you have the whole map of Big Whoop; if
that's the case and you go to Captain Dread's ship, he should tell you
that he must go back to Scabb Island, and he'll leave you there and
never appear again. This forces the player to focus on Scabb Island
again, so that you know where to solve the map puzzle.
If you don't remember this, it's because the scripts forget to update
the status of the map piece from the antiques dealer, when you buy it.
So this is what this commit fixes, and this makes the Captain Dread
script trigger as intended.
Note: this REQUIRES the model lighthouse lens fix I've committed just
before, otherwise this would add a dead-end to the game (because of
another original script oversight; see that commit and
o5_notEqualZero() for more information).
We are restoring something which was part of the original intent of
the writers (it has even been dubbed in the Special Edition), but
it's maybe controversial since people never saw this in the original
because of a script bug. That's why this is just an enhancement that
you can disable.
Kudos to the Ultimate Talkie Edition authors for this very nice
finding!
When playing the Regular mode of the Ultimate Talkie Edition of Monkey
Island 2, you can get stuck if you picked up the four map pieces, but
haven't picked up the model lighthouse lens yet. Captain Dread will
force you to go back to Scabb Island and disappear (so you can't go
back to Phatt Island), but Wally won't be able to read the map without
his monocle and without the lens replacement. Nobody wants a dead-end
in a Monkey Island game :)
This commit just short-circuits the checks for the four map pieces if
the lens is still on the model lighthouse, and so you're still free
to navigate between the 3 islands until you pick it up.
This doesn't happen in any other version (yet), because the Ultimate
Edition is the only one which fixed setting the Bit[70] flag when
buying the map piece from the antiques dealer, restoring the reaction
from Captain Dread but unveiling this other, more fatal script
oversight. But we'll need this fix for the other versions anyway,
since I'm going to add the same enhancement in a new commit.