GLK: SCOTT: Fix inverted conditional statement #4728
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Line 255,
if (!(_G(_game)->_subType & (C64 | MYSTERIOUS))), is supposed to check whether the current game is a Commodore 64 version of one of the eleven Mysterious Adventures by Brian Howarth, and if so set the appropriate system messages. Currently it does the opposite.A one-character change that may also fixFixes https://bugs.scummvm.org/ticket/14255.EDIT: Now it is properly fixed.
EDIT 2: The lines 139-263 in
load_game.cppset the entries of the Common::StringArray_systo the right string from_systemMessages, which contains strings read from the original game data.All Scott Adams format games have roughly the same system messages, but to save memory they may omit the unused ones, so that a game without treasures might skip all treasure-related messages such as "You have stored X treasures", for example. Therefore, the strings read from the game data (into
_systemMessages) have to be rearranged so that_syshas the expected messages in the expected order.Conveniently, all the Commodore 64 Mysterious Adventures have the same messages in the same order in their game data, so they get their own function,
mysterious64Sysmess().Questprobe featuring the Hulk, however, is a little different, and has a completely blank array of
_systemMessages. This is because unlike the other games, it does not has it system messages neatly ordered as a table at a single place in the data, but they are individually dispersed throughout the code. It was decided that it was too much work to extract them all. Instead it uses the boilerplate built-in fallback messages listed ingame_info.cpp.So what happens currently is that, because the conditional statement at line 255 is inverted, every game not a Commodore 64 game or a "Mysterious Adventure" gets its system messages set by
mysterious64Sysmess(). And in The Hulk's case, this means that it gets a lot of empty strings as system messages, resulting in ticket 14255.