Add a game flag for Doublefine packed games, and simplify
the instantiation of the PAK file handler. This avoids
clashes with other packed games (e.g. the Mac version of DOTT)
This also removes displayed keybinding on on the memory usage,
since that is now taken by stretch functionality and in general,
this is not very useful as of now (it prints out one line of stats
to the debug log)
All of this should in reality go to the keymapper.
This commit turns the crack fix by eriktorbjorn toggleable via
enhancements (in particular, by toggling the "Fix original bugs"
box). This is done to ensure both that this original release can be
played "as-is", and that speedrunners which are accostumed to a
certain speedrunning category can still run the game with the latest
version of ScummVM.
This closes ticket #14815:
"SCUMM: MANIAC: Turn the "bad crack" fix into an optional enhancement"
Please find more details and reasonings about this in the ticket
itself.
Happy speedrunning, folks!
I wanted to do this for a very long time. This is helping me
debugging some very hard to understand remaining bugs
on some SCUMM HE games.
I tested this for several hours with several games,
including Moonbase and some Backyard games
ensuring there were no obvious regressions.
Moonbase Commander has finally started playing
some sounds. There are still some bugs here and there,
and the Miles mixer implementation is certainly not complete,
but hey, it works!
In this workaround, the Lemonhead lines that we restore went missing
with the v5 releases of MI1. But for whatever reason, those lines were
already missing from all the French MI1 v4 releases that I'm aware of.
So there's no official content to add back for this language, sorry!
Checked against my French floppy EGA, floppy VGA and v5 CD versions.
French Amiga and Atari releases checked on YouTube.
This code is present in all the original interpreters using Digital iMUSE, and it was implemented
in order to allow slower CD drives to fetch new data without having music skipping during load times.
This works by basically flooding the music buffer with data whenever a big resource, a voice file, or
a SMUSH movie is loaded.
Arguably this is not needed for devices using SSD drives, but since this change had its benefits on a
quite old laptop of mine, and since the memory overhead is very minimal, I have decided to implement it.
This replaces every single strcpy call in the engine with
Common::strlcpy.
Some of these might cases seem a bit pointless, but it is
supposed to discourage future use of strcpy. If people don't
see a single occasion of it they might think twice before they
use it...
...because ScummVM will crash trying to do so.
This was discovered in bugs #13111 and #13113, where loading a HE
savegame does not load sound resource 1 but still tried to apply
workarounds to it. I don't know if this is the only case.
I don't have this version of the game myself, so it's based on a YouTube
playthrough and walking through the process of extracting the necessary
data with timofonic. It has not been properly tested, though the
messages do look correct if I insert them into the English version.
The Mac CD versions that I have use the same GUI as the DOS CD version,
but don't have CD audio tracks for the music. (So there is no music for
the cannibal village.) The script to patch is identical to the DOS CD
version, but located four bytes earlier in the room resource.
There's enough space to just change the first message and insert the
WaitForMessage(). No need to mess with the second message, since that
one's already correct.
Apparently these were lost when the game was converted from floppy to CD
version. Not just in the English version, but that's all I have. We
should come up with a way to make it easy to add other languages,
though.
I have verified that the Steam version is identical to the GOG version
in this respect. (The file layout is a bit different, but the data files
are the same.)
The enhanced version of Maniac Mansion currently sold on GOG (and
probably Steam as well) has a one-byte change to the script handling
keypads, presumably to disable the security door copy protection. (Which
ScummVM disables by default anyway, by leaving the door open.)
Unfortunately, this crack was made without any deeper understanding of
the game (said the guy who never ever played the whole thing :-). It
allows you to enter either the correct code, or any code as long as you
get the last symbol wrong. But the script is also used for other keypad
puzzles in the game (e.g. Edna's phone number and safe combination). So
those puzzles are completely nerfed as well.
I have reported this as a bug to both GOG and Disney Games & Apps
Support. GOG has acknowledged that there is a problem, which is more
than Disney has done so far, but it remains unclear whether or not they
will fix it.
I know the default tab width for ScummVM is supposed to be 4, but I
can't be bothered to change it in my editor (where it's 8) and I assume
I'm not alone in that. So I've changed the tabs here so that the hex
code and script text should line up nicely regardless of your editor
settings.
If another Mac version of MI2 is ever discovered, and its boot script
doesn't match any of the known ones, we can't know what the "skip copy
protection" boot param will do. Safer, then, to use the default boot
param. ScummVM may still skip the copy protection, but if so it will do
it the old-fashioned way.
There are (at least) two different versions of MI2 for the Mac. The one
that was distributed with the LucasArts Mac CD Game Pack II has a
modified boot script that completely removes the copy protection screen
(yay!) and the difficulty selection (boo!).
To re-instastate the difficulty selection, patch the boot script to be
identical to the other version, which was presumably released on
floppies.
This patching is only done if the boot script has the exact expected
length of the CD version's script, and if the patched script matches the
floppy version's. That should be safe enough.
The main purpose of this set of changes is to refactor the code to make
it easier to pass the name of the Macintosh resource file to other parts
of the engine (it used to be hard-coded in the music players), and to
scale-up the graphics by 2.
The actual font rendering is almost completely broken.