diff options
author | sluicebox | 2019-03-27 15:35:20 -0700 |
---|---|---|
committer | Filippos Karapetis | 2019-03-29 19:12:52 +0200 |
commit | 903ca295583ec0e9e42366be9303340770f02c54 (patch) | |
tree | bbb3ee01cf2893d62d7507cc4b1fe8d12742fcca | |
parent | 6e45a702a2230d7f5ff335d17d66dc65486a6203 (diff) | |
download | scummvm-rg350-903ca295583ec0e9e42366be9303340770f02c54.tar.gz scummvm-rg350-903ca295583ec0e9e42366be9303340770f02c54.tar.bz2 scummvm-rg350-903ca295583ec0e9e42366be9303340770f02c54.zip |
SCI: Fix kAddMenu language separator parsing
Fixes bug #10926 that prevents SQ3 German Amiga from loading
-rw-r--r-- | engines/sci/graphics/menu.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp index e677f0b487..8f6cfa1244 100644 --- a/engines/sci/graphics/menu.cpp +++ b/engines/sci/graphics/menu.cpp @@ -130,9 +130,13 @@ void GfxMenu::kernelAddEntry(Common::String title, Common::String content, reg_t altPos = curPos; break; case '#': // Function-prefix - if (functionPos) - error("multiple function markers within one menu-item"); - functionPos = curPos; + // #G is used as language separator (SQ3 German Amiga) so only + // treat # as a function prefix once ` has been reached + if (rightAlignedPos) { + if (functionPos) + error("multiple function markers within one menu-item"); + functionPos = curPos; + } break; } curPos++; @@ -197,6 +201,7 @@ void GfxMenu::kernelAddEntry(Common::String title, Common::String content, reg_t separatorCount++; break; case '%': + case '#': // Some multilingual sci01 games use e.g. '--!%G--!' (which doesn't really make sense) separatorCount += 2; curPos++; |