From 180ba42020f37c9a991df6f8417a25fe0260b4a0 Mon Sep 17 00:00:00 2001 From: BLooperZ Date: Wed, 21 Sep 2022 19:55:48 +0300 Subject: [PATCH] SCUMM: HE: opt out BiDi for official translations --- devtools/scumm-md5.txt | 2 +- engines/scumm/detection.h | 9 ++++++++- engines/scumm/detection_tables.h | 17 +++++++++-------- engines/scumm/scumm-md5.h | 4 ++-- engines/scumm/scumm.cpp | 2 +- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt index 429aafe3f74..50f470c4b99 100644 --- a/devtools/scumm-md5.txt +++ b/devtools/scumm-md5.txt @@ -809,7 +809,7 @@ puttcircus Putt-Putt Joins the Circus db74136c20557eca6ed3411bff39f7a1 36655 gb Windows - - - Reckless d0ad929def3e9cfe39dea55bd12098d4 36655 fr Windows - - - gist974 febf4a983ea5faea1c9dd6c710ebb09c 36655 de Windows - - - andy482 - c8253da0f4626d2236b5291b99e33408 -1 he Windows HE 99 - - Matan Bareket + c8253da0f4626d2236b5291b99e33408 -1 he Windows - - - Matan Bareket a7cacad9c40c4dc9e1812abf6c8af9d5 -1 us All - Demo - Kirben, sev 1387d16aa620dc1c2d1fd87f8a9e7a09 -1 fr Windows - Demo - Mevi diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h index 2f19047a5ee..9c1c3c2586b 100644 --- a/engines/scumm/detection.h +++ b/engines/scumm/detection.h @@ -185,7 +185,14 @@ enum GameFeatures { * SCUMM v5-v7 Mac games stored in a container file * Used to differentiate between m68k and PPC versions of Indy4 */ - GF_MAC_CONTAINER = 1 << 16 + GF_MAC_CONTAINER = 1 << 16, + + /** + * SCUMM HE Official Hebrew translations were audio only + * but used reversed string for credits etc. + * Used to disable BiDi in those games. + */ + GF_HE_NO_BIDI = 1 << 17 }; enum ScummGameId { diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 57eaf07aaf8..eeade59d195 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -227,20 +227,20 @@ static const GameSettings gameVariantsTable[] = { // Humongous Entertainment Scumm Version 6 {"activity", "", 0, GID_HEGAME, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, - {"funpack", 0, 0, GID_FUNPACK, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, - {"fbpack", 0, 0, GID_HEGAME, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, + {"funpack", 0, 0, GID_FUNPACK, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY | GF_HE_NO_BIDI, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, + {"fbpack", 0, 0, GID_HEGAME, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY | GF_HE_NO_BIDI, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, {"brstorm", 0, 0, GID_FBEAR, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, - {"fbear", "HE 62", 0, GID_FBEAR, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, + {"fbear", "HE 62", 0, GID_FBEAR, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY | GF_HE_NO_BIDI, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, {"fbear", "HE 70", 0, GID_FBEAR, 6, 70, MDT_NONE, GF_USE_KEY, Common::kPlatformWindows, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_AUDIO_OVERRIDE)}, - {"puttmoon", "", 0, GID_PUTTMOON, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, + {"puttmoon", "", 0, GID_PUTTMOON, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY | GF_HE_NO_BIDI, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, {"puttmoon", "Demo", 0, GID_HEGAME, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, {"puttmoon", "HE 70", 0, GID_PUTTMOON, 6, 70, MDT_NONE, GF_USE_KEY, Common::kPlatformWindows, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_AUDIO_OVERRIDE)}, {"puttputt", "HE 60", 0, GID_HEGAME, 6, 60, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, {"puttputt", "HE 61", 0, GID_HEGAME, 6, 61, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, - {"puttputt", "HE 62", 0, GID_HEGAME, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, + {"puttputt", "HE 62", 0, GID_HEGAME, 6, 62, MDT_ADLIB | MDT_MIDI, GF_USE_KEY | GF_HE_NO_BIDI, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, {"puttputt", "Demo", 0, GID_PUTTDEMO, 6, 60, MDT_ADLIB | MDT_MIDI, GF_USE_KEY, UNK, GUIO2(GUIO_NOLAUNCHLOAD, GUIO_AUDIO_OVERRIDE)}, // The following are meant to be generic HE game variants and as such do @@ -258,7 +258,7 @@ static const GameSettings gameVariantsTable[] = { {"farm", "", 0, GID_HEGAME, 6, 71, MDT_NONE, GF_USE_KEY, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, {"freddi", "", 0, GID_HEGAME, 6, 71, MDT_NONE, GF_USE_KEY, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, {"freddi", "HE 71", 0, GID_FREDDI, 6, 71, MDT_NONE, GF_USE_KEY, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, - {"freddi", "HE 73", 0, GID_FREDDI, 6, 73, MDT_NONE, GF_USE_KEY, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, + {"freddi", "HE 73", 0, GID_FREDDI, 6, 73, MDT_NONE, GF_USE_KEY | GF_HE_NO_BIDI, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, // Humongous Entertainment Scumm Version 7.2 {"airport", "", 0, GID_HEGAME, 6, 72, MDT_NONE, GF_USE_KEY, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, @@ -294,10 +294,11 @@ static const GameSettings gameVariantsTable[] = { {"spyfox", "", 0, GID_HEGAME, 6, 90, MDT_NONE, GF_USE_KEY, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, {"freddi3", "", 0, GID_FREDDI3, 6, 90, MDT_NONE, GF_USE_KEY, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, - {"freddi3", "HE 99", 0, GID_FREDDI3, 6, 99, MDT_NONE, GF_USE_KEY, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, + {"freddi3", "HE 99", 0, GID_FREDDI3, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_NO_BIDI, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, // Humongous Entertainment Scumm Version 9.5 ? Scummsys.95 {"pajama2", "", 0, GID_HEGAME, 6, 95, MDT_NONE, GF_USE_KEY, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, + {"pajama2", "HE 99", 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_NO_BIDI, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, {"chase", "", 0, GID_HEGAME, 6, 95, MDT_NONE, GF_USE_KEY, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, // Humongous Entertainment Scumm Version 9.8 ? Scummsys.98 @@ -323,7 +324,7 @@ static const GameSettings gameVariantsTable[] = { // Humongous Entertainment Scumm Version 9.9 ? Scummsys.99 {"football", 0, 0, GID_FOOTBALL, 6, 99, MDT_NONE, GF_USE_KEY, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, {"pajama3", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, - {"puttcircus", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, + {"puttcircus", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_HE_NO_BIDI, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, {"spyfox2", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, {"mustard", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED, UNK, GUIO4(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_AUDIO_OVERRIDE)}, diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 8a5a9cff12b..b26c1d967cf 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Thu Sep 15 22:10:44 2022 + This file was generated by the md5table tool on Wed Sep 21 16:53:44 2022 DO NOT EDIT MANUALLY! */ @@ -593,7 +593,7 @@ static const MD5Table md5table[] = { { "c7890e038806df2bb5c0c8c6f1986ea2", "monkey", "VGA", "VGA", -1, Common::EN_ANY, Common::kPlatformDOS }, { "c7be10f775404fd9785a8b92a06d240c", "atlantis", "FM-TOWNS", "", 12030, Common::EN_ANY, Common::kPlatformFMTowns }, { "c7c492a107ec520d7a7943037d0ca54a", "freddi", "HE 71", "Demo", 9779, Common::NL_NLD, Common::kPlatformWindows }, - { "c8253da0f4626d2236b5291b99e33408", "puttcircus", "HE 99", "", -1, Common::HE_ISR, Common::kPlatformWindows }, + { "c8253da0f4626d2236b5291b99e33408", "puttcircus", "", "", -1, Common::HE_ISR, Common::kPlatformWindows }, { "c83079157ec765a28de445aec9768d60", "tentacle", "", "Demo", 7477, Common::EN_ANY, Common::kPlatformUnknown }, { "c8575e0b973ff1723aba6cd92c642db2", "puttrace", "HE 99", "Demo", -1, Common::FR_FRA, Common::kPlatformWindows }, { "c8aac5e3e701874e2fa4117896f9e1b1", "freddi", "HE 73", "Demo", -1, Common::EN_ANY, Common::kPlatformMacintosh }, diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 26ec1b9d2ba..85dc936d714 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -360,7 +360,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) setV1ColorTable(_renderMode); _isRTL = (_language == Common::HE_ISR && (_game.heversion == 0 || _game.heversion >= 72)) - && (_game.id == GID_MANIAC || (_game.version >= 4 && _game.version < 7)); + && (_game.id == GID_MANIAC || (_game.version >= 4 && _game.version < 7)) && !(_game.features & GF_HE_NO_BIDI); #ifndef DISABLE_HELP // Create custom GMM dialog providing a help subdialog assert(!_mainMenuDialog);