aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLe Philousophe2019-09-28 15:33:17 +0200
committerLe Philousophe2019-09-28 15:38:35 +0200
commit739ad793f63cbb99d7a1193fdccdc6e30df9969c (patch)
tree34cc471416c2f5e74e1ff88acf2b76a44083cf3c
parentea1f8a93ffbe44e8c67e7d22545da2155552dd23 (diff)
downloadscummvm-rg350-739ad793f63cbb99d7a1193fdccdc6e30df9969c.tar.gz
scummvm-rg350-739ad793f63cbb99d7a1193fdccdc6e30df9969c.tar.bz2
scummvm-rg350-739ad793f63cbb99d7a1193fdccdc6e30df9969c.zip
CRYOMNI3D: Fix fonts used by various versions
Italian versions of the game use a different set of fonts than others. Until now, 4 sets have been found.
-rw-r--r--engines/cryomni3d/cryomni3d.h10
-rw-r--r--engines/cryomni3d/detection.cpp11
-rw-r--r--engines/cryomni3d/detection_tables.h30
-rw-r--r--engines/cryomni3d/versailles/engine.cpp38
4 files changed, 67 insertions, 22 deletions
diff --git a/engines/cryomni3d/cryomni3d.h b/engines/cryomni3d/cryomni3d.h
index 20f8371147..f28a28fdd6 100644
--- a/engines/cryomni3d/cryomni3d.h
+++ b/engines/cryomni3d/cryomni3d.h
@@ -68,8 +68,14 @@ enum CryOmni3DGameType {
};
enum CryOmni3DGameFeatures {
- GF_VERSAILLES_NUMERICFONTS = (1 << 0), // Fonts are font01.crf, ...
- GF_VERSAILLES_AUDIOPADDING = (1 << 1) // Audio files have underscore padding before extension
+ GF_VERSAILLES_FONTS_MASK = (3 << 0), // Fonts flag mask
+ GF_VERSAILLES_FONTS_NUMERIC = (0 << 0), // Fonts are font01.crf, ...
+ GF_VERSAILLES_FONTS_SET_A = (1 << 0), // Fonts are for French Macintosh (development version)
+ GF_VERSAILLES_FONTS_SET_B = (2 << 0), // Standard set (Helvet12 is used for debugging docs)
+ GF_VERSAILLES_FONTS_SET_C = (3 << 0), // Fonts for Italian version (Helvet12 is used for docs texts)
+
+ GF_VERSAILLES_AUDIOPADDING_NO = (0 << 2), // Audio files have underscore padding before extension
+ GF_VERSAILLES_AUDIOPADDING_YES = (1 << 2) // Audio files have underscore padding before extension
};
struct CryOmni3DGameDescription;
diff --git a/engines/cryomni3d/detection.cpp b/engines/cryomni3d/detection.cpp
index 44e5652222..6095185716 100644
--- a/engines/cryomni3d/detection.cpp
+++ b/engines/cryomni3d/detection.cpp
@@ -213,6 +213,8 @@ ADDetectedGame CryOmni3DMetaEngine::fallbackDetectVersailles(const Common::FSNod
}
// Determine language
+ // Use fonts set C as helvet12 contains more characters than fruitL
+ uint8 fontsSet = GF_VERSAILLES_FONTS_SET_B;
node = root.getChild("GTO").getChild("DIALOG1.GTO");
if (node.getChild("DIALOG1.GTO").exists()) {
s_fallbackDesc.desc.language = Common::FR_FRA;
@@ -224,6 +226,7 @@ ADDetectedGame CryOmni3DMetaEngine::fallbackDetectVersailles(const Common::FSNod
s_fallbackDesc.desc.language = Common::ES_ESP;
} else if (node.getChild("DIALOG1.ITA").exists()) {
s_fallbackDesc.desc.language = Common::IT_ITA;
+ fontsSet = GF_VERSAILLES_FONTS_SET_C;
}
// Determine game flags
@@ -233,7 +236,9 @@ ADDetectedGame CryOmni3DMetaEngine::fallbackDetectVersailles(const Common::FSNod
// Add file to report to let developers set appropriate game flags
addUnknownFile(node, game);
- s_fallbackDesc.features |= GF_VERSAILLES_NUMERICFONTS;
+ s_fallbackDesc.features |= GF_VERSAILLES_FONTS_NUMERIC;
+ } else {
+ s_fallbackDesc.features |= fontsSet;
}
node = root.getChild("DIAL").getChild("VOIX").getChild("ALI001__.WAV");
@@ -241,7 +246,9 @@ ADDetectedGame CryOmni3DMetaEngine::fallbackDetectVersailles(const Common::FSNod
// Add file to report to let developers set appropriate game flags
addUnknownFile(node, game);
- s_fallbackDesc.features |= GF_VERSAILLES_AUDIOPADDING;
+ s_fallbackDesc.features |= GF_VERSAILLES_AUDIOPADDING_YES;
+ } else {
+ s_fallbackDesc.features |= GF_VERSAILLES_AUDIOPADDING_NO;
}
return game;
diff --git a/engines/cryomni3d/detection_tables.h b/engines/cryomni3d/detection_tables.h
index a1c3eecd59..726253213d 100644
--- a/engines/cryomni3d/detection_tables.h
+++ b/engines/cryomni3d/detection_tables.h
@@ -39,7 +39,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_NUMERICFONTS | GF_VERSAILLES_AUDIOPADDING,
+ GF_VERSAILLES_FONTS_NUMERIC | GF_VERSAILLES_AUDIOPADDING_YES,
},
// Versailles 1685
@@ -56,7 +56,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_NUMERICFONTS | GF_VERSAILLES_AUDIOPADDING,
+ GF_VERSAILLES_FONTS_NUMERIC | GF_VERSAILLES_AUDIOPADDING_YES,
},
// Versailles 1685
@@ -73,7 +73,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_NUMERICFONTS | GF_VERSAILLES_AUDIOPADDING,
+ GF_VERSAILLES_FONTS_NUMERIC | GF_VERSAILLES_AUDIOPADDING_YES,
},
// Versailles 1685
@@ -90,7 +90,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_AUDIOPADDING,
+ GF_VERSAILLES_FONTS_SET_B | GF_VERSAILLES_AUDIOPADDING_YES,
},
// Versailles 1685
@@ -107,7 +107,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_AUDIOPADDING,
+ GF_VERSAILLES_FONTS_SET_A | GF_VERSAILLES_AUDIOPADDING_YES,
},
// Versailles 1685
@@ -124,7 +124,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_NUMERICFONTS,
+ GF_VERSAILLES_FONTS_NUMERIC | GF_VERSAILLES_AUDIOPADDING_NO,
},
// Versailles 1685
@@ -141,7 +141,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_NUMERICFONTS,
+ GF_VERSAILLES_FONTS_NUMERIC | GF_VERSAILLES_AUDIOPADDING_NO,
},
// Versailles 1685
@@ -158,7 +158,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_AUDIOPADDING,
+ GF_VERSAILLES_FONTS_SET_B | GF_VERSAILLES_AUDIOPADDING_YES,
},
// Versailles 1685
@@ -175,7 +175,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_NUMERICFONTS,
+ GF_VERSAILLES_FONTS_NUMERIC | GF_VERSAILLES_AUDIOPADDING_NO,
},
// Versailles 1685
@@ -192,7 +192,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_NUMERICFONTS,
+ GF_VERSAILLES_FONTS_NUMERIC | GF_VERSAILLES_AUDIOPADDING_NO,
},
// Versailles 1685
@@ -209,7 +209,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_AUDIOPADDING,
+ GF_VERSAILLES_FONTS_SET_C | GF_VERSAILLES_AUDIOPADDING_YES,
},
// Versailles 1685
@@ -226,7 +226,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_AUDIOPADDING,
+ GF_VERSAILLES_FONTS_SET_B | GF_VERSAILLES_AUDIOPADDING_YES,
},
// Versailles 1685
@@ -243,7 +243,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_NUMERICFONTS | GF_VERSAILLES_AUDIOPADDING,
+ GF_VERSAILLES_FONTS_NUMERIC | GF_VERSAILLES_AUDIOPADDING_YES,
},
// Versailles 1685
@@ -260,7 +260,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_NUMERICFONTS | GF_VERSAILLES_AUDIOPADDING,
+ GF_VERSAILLES_FONTS_NUMERIC | GF_VERSAILLES_AUDIOPADDING_YES,
},
// Versailles 1685
@@ -277,7 +277,7 @@ static const CryOmni3DGameDescription gameDescriptions[] = {
GUI_OPTIONS_VERSAILLES
},
GType_VERSAILLES,
- GF_VERSAILLES_NUMERICFONTS | GF_VERSAILLES_AUDIOPADDING,
+ GF_VERSAILLES_FONTS_NUMERIC | GF_VERSAILLES_AUDIOPADDING_YES,
},
{ AD_TABLE_END_MARKER, 0, 0 }
diff --git a/engines/cryomni3d/versailles/engine.cpp b/engines/cryomni3d/versailles/engine.cpp
index 6f0a0e3ee8..ea0d2a8702 100644
--- a/engines/cryomni3d/versailles/engine.cpp
+++ b/engines/cryomni3d/versailles/engine.cpp
@@ -54,7 +54,7 @@ CryOmni3DEngine_Versailles::CryOmni3DEngine_Versailles(OSystem *syst,
_currentPlace(nullptr), _currentWarpImage(nullptr), _fixedImage(nullptr),
_transitionAnimateWarp(true), _forceRedrawWarp(false), _forcePaletteUpdate(false),
_fadedPalette(false), _loadedSave(uint(-1)), _dialogsMan(this,
- getFeatures() & GF_VERSAILLES_AUDIOPADDING),
+ getFeatures() & GF_VERSAILLES_AUDIOPADDING_YES),
_musicVolumeFactor(1.), _musicCurrentFile(nullptr),
_countingDown(false), _countdownNextEvent(0) {
}
@@ -308,7 +308,9 @@ void CryOmni3DEngine_Versailles::setupFonts() {
// Explainations below are based on original binaries, debug is not used in this engine
// Fonts loaded are not always the same: FR Mac and EN DOS don't use the same font for debug doc/unused
// The important is that the loaded one is present in all versions
- if (getFeatures() & GF_VERSAILLES_NUMERICFONTS) {
+ uint8 fontsSet = getFeatures() & GF_VERSAILLES_FONTS_MASK;
+ switch (fontsSet) {
+ case GF_VERSAILLES_FONTS_NUMERIC:
fonts.push_back("font01.CRF"); // 0: Doc titles
fonts.push_back("font02.CRF"); // 1: Menu and T0 in credits
fonts.push_back("font03.CRF"); // 2: T1 and T3 in credits
@@ -320,7 +322,8 @@ void CryOmni3DEngine_Versailles::setupFonts() {
fonts.push_back("font09.CRF"); // 8: unused
fonts.push_back("font10.CRF"); // 9: Warp messages texts
fonts.push_back("font11.CRF"); // 10: debug
- } else {
+ break;
+ case GF_VERSAILLES_FONTS_SET_A:
fonts.push_back("garamB18.CRF"); // 0: Doc titles
fonts.push_back("garamB22.CRF"); // 1: Menu and T0 in credits
//fonts.push_back("geneva15.CRF");
@@ -350,6 +353,35 @@ void CryOmni3DEngine_Versailles::setupFonts() {
// This file isn't even loaded by MacOS executable
//fonts.push_back("garamB20.CRF");
+ break;
+ case GF_VERSAILLES_FONTS_SET_B:
+ fonts.push_back("garamB18.CRF"); // 0: Doc titles
+ fonts.push_back("garamB22.CRF"); // 1: Menu and T0 in credits
+ fonts.push_back("geneva14.CRF"); // 2: T1 and T3 in credits
+ fonts.push_back("geneva13.CRF"); // 3: Menu title, options messages boxes buttons
+ fonts.push_back("geneva12.CRF"); // 4: T2 in credits, text in docs
+ fonts.push_back("geneva10.CRF"); // 5: objects description in toolbar, options messages boxes text, T4 in credits
+ fonts.push_back("geneva9.CRF"); // 6: T5 in credits, doc subtitle
+ fonts.push_back("helvet16.CRF"); // 7: dialogs texts
+ fonts.push_back("helvet12.CRF"); // 8: debug doc
+ fonts.push_back("fruitL18.CRF"); // 9: Warp messages texts
+ fonts.push_back("MPW12.CRF"); // 10: debug
+ break;
+ case GF_VERSAILLES_FONTS_SET_C:
+ fonts.push_back("garamB18.CRF"); // 0: Doc titles
+ fonts.push_back("garamB22.CRF"); // 1: Menu and T0 in credits
+ fonts.push_back("geneva14.CRF"); // 2: T1 and T3 in credits
+ fonts.push_back("geneva13.CRF"); // 3: Menu title, options messages boxes buttons
+ fonts.push_back("helvet12.CRF"); // 4: T2 in credits, text in docs
+ fonts.push_back("geneva10.CRF"); // 5: objects description in toolbar, options messages boxes text, T4 in credits
+ fonts.push_back("geneva9.CRF"); // 6: T5 in credits, doc subtitle
+ fonts.push_back("helvet16.CRF"); // 7: dialogs texts
+ fonts.push_back("helvet12.CRF"); // 8: debug doc
+ fonts.push_back("fruitL18.CRF"); // 9: Warp messages texts
+ fonts.push_back("MPW12.CRF"); // 10: debug
+ break;
+ default:
+ error("Font set invalid");
}
_fontManager.loadFonts(fonts);