...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.
Up until last commit, everything was working fine but the amount of files changed was too large. This commit tries to reduce the changes.
- Add a fake constructor to Keymap, text-to-speech, setDescription (save-state)
- Redirecting functions for PopUpWidget::appendEntry, ButtonWidget::setLabel, GUIErrorMessage
- Use the above functions and constructors to reduce changes in Engines
- Fix warnings being in unicode. Only output english text in - Warnings, Errors, etc.
- Mark some strings as "translation" strings. (Not yet added to POTFILES)
- Remove some CP related things from po/modules.mk
- Previously used some Common::convertToU32 where it was not necessary, replace this with u32constructor
After the initial changes just to scummvm/gui for u32, this commit includes the whole project
- Widget creations now always have u32 descriptions, labels, or tooltips
- Message dialogs make use of default arguments instead of providing the same argument explicitly
- encode String::format properly before passing on as argument where necessary
- Modify hugo utils (yesNoBox and notify box) to use u32
- Also provide fake constructors for the above which redirect to the u32 constructor
- Convert all keymap descriptions to u32 across all engines
- showConfirmationDialog in mohawk now uses u32
- showScummVMDialog also uses u32
- Scumm engine has dialogs now which use u32
- General fixes and wrapping convertToU32String for setLabels and related functions
- Add a fake constructor to MesssageDialog which redirects to the u32 constructor
This commit introduces the following (seemingly non-invasive) changes
to make the 'imuse play' debugger command more useful (i.e. don't crash
when trying to load the wrong kind of (sound) resource.
* ScummEngine::readSoundResource()
Instead of fatally error()'ing upon hitting a non-sound resource type,
e.g. a room header (0x524d4844 aka RMHD), we now only issue a warning().
This enables the already existing dead code which properly returns 0
(aka no resource loaded).
* ResourceManager::validateResource()
Instead of fatally error()'ing upon hitting an illegal glob type we now
only issue a warning() and return false (also existing dead code).
All methods calling validateResource() check its return value so this
seems like the right thing to do anyway.
* ScummDebugger::Cmd_IMuse()
Instead of directly calling ensureResourceLoaded() we now call
getResourceAddress() instead (which in turn calls ensureResourceLoaded()
and handles other edge cases) and only attempt to play a sound if the
returned pointer actually is valid.
Fixes Trac#10527.
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'
This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)