Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DONTMERGE: fix(scummtr): Work around script bug in 07.LFL in MANIAC-V2-EN #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/ScummTr/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,23 @@ void Script::_opv12()
_eatWordOrVar(opcode & 0x80);
break;
case 0x62: // stopScript
// Some versions of MANIAC-V2 miss a call to printEgo (0xD8) after calling
// stopScript in 07.LFL. Since interpreters will ignore this string anyway,
// ignore it here too.
if (ScummRp::game.version == 2 && ScummRp::game.id == GID_MANIAC && _file->name().rfind("07.LFL", 0) == 0)
{
byte b;
b = _eatByteOrVar(opcode & 0x80);
if (b == 0x00 && _peekByte() == 0x49)
{
do
{
b = _getByte();
} while (b != 0x00);
}
break;
}
// fallthrough
case 0xE2: // stopScript
_eatByteOrVar(opcode & 0x80);
break;
Expand Down