Skip to content

Commit

Permalink
feat: Reject some versions of MONKEY1-FLOPPY-VGA, because of a corrup…
Browse files Browse the repository at this point in the history
…tion bug

Some versions of MONKEY1-FLOPPY-VGA (possibly only the earliest 1.0
version) have a duplicate 117/10 costume inside room 59 (Stan's).

Commit dc94b2a tried to ignore the
duplicate, as is already done for duplicate scripts, but it looks like
this doesn't work as expected for duplicate costumes, because ScumMVM
just glitches when displaying the modified game (as 000.LFL appears
to contain some invalid bytes).

I couldn't find an easy fix for this, and it's probably too late to
spend more time on this for the 0.5.0 release, so let's just reject
this game variant for now (earlier releases didn't support it at all).

Issue #47.
  • Loading branch information
dwatteau committed Feb 9, 2022
1 parent 057b17a commit 4f92fe2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
### Bugfixes

- ScummTR/ScummRP: Fix a game corruption bug with at least LOOM-EGA (and possibly some earlier games too), such as clicking on the hole of the leftmost tree of the forest at the start of the game. In the official pre-built binaries, only `scummtr-0.4.2-win32.zip` was impacted by this corruption issue.
- ScummTR/ScummRP: fix a fatal "Duplicate offset in index" error with MONKEY1-FLOPPY-VGA.
- ScummTR/ScummRP: fix a fatal "Duplicate offset in index" error with some versions of LOOM-EGA-EN.
- ScummTR/ScummRP: don't fail when the DISK09.LEC file is missing for MONKEY1-EGA, since it was only available through the Roland Update.
- ScummTR/ScummRP: don't fail reporting missing files for the 4-disk floppy versions of MONKEY1, because only the 8-disk floppy versions need them.
Expand All @@ -31,6 +30,7 @@
### Known bugs

- MANIAC-V2-EN is unsupported. This is because of an existing bug in the original game: any change made to the resources would amplify it and corrupt the game. Possible workaround: work from MANIAC-V1-EN or from a non-English version of Maniac Mansion V2.
- Some versions of MONKEY1-FLOPPY-VGA are currently unsupported. Possible workaround: work from a later version of MONKEY1-FLOPPY-VGA (it should display a higher number than "1.0" when doing Ctrl-V in-game).
- ScummTR: the `-b` option may not correctly work with all games. Possible workaround: use the `-r` option.

### Portability (for developers)
Expand Down
8 changes: 7 additions & 1 deletion src/ScummRp/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,14 +799,20 @@ void RoomPack::_checkDupOffset(byte roomId, int32 offset)
}
else if (j == 2 && ScummRp::tocs[i]->getType() == TableOfContent::TOCT_COST)
{
// Hack for Monkey1 Floppy VGA
// Hack for Monkey1 Floppy VGA (some versions only; possibly only 1.0?)
if (roomId == 59 && ScummRp::tocs[i]->getSize() == 199
&& (*ScummRp::tocs[i])[10].offset == (*ScummRp::tocs[i])[117].offset
&& (*ScummRp::tocs[i])[10].roomId == (*ScummRp::tocs[i])[117].roomId)
{
#ifdef SCUMMRP_OK_TO_CORRUPT_SOME_MONKEY1_VGA_GAMES
// XXX: Doing this appears to leave invalid content inside 000.LFL, and makes the
// game glitch inside ScummVM. https://github.com/dwatteau/scummtr/issues/47
(*ScummRp::tocs[i])[117].offset = -1;
j = 1;
ScummIO::info(INF_DETAIL, "Removed CO_0117 from index (duplicate of CO_0010)");
#else
ScummIO::fatal("This version of Monkey Island 1 is currently unsupported because of a corruption bug");
#endif
}
}
n += j;
Expand Down

0 comments on commit 4f92fe2

Please sign in to comment.