From 903ca295583ec0e9e42366be9303340770f02c54 Mon Sep 17 00:00:00 2001 From: sluicebox Date: Wed, 27 Mar 2019 15:35:20 -0700 Subject: SCI: Fix kAddMenu language separator parsing Fixes bug #10926 that prevents SQ3 German Amiga from loading --- engines/sci/graphics/menu.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'engines/sci/graphics/menu.cpp') 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++; -- cgit v1.2.3