Skip to content

Commit

Permalink
TETRAEDGE: Support UTF-8 Switch releases
Browse files Browse the repository at this point in the history
  • Loading branch information
phcoder committed Jan 6, 2025
1 parent d7cd39f commit 1411884
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 3 deletions.
4 changes: 4 additions & 0 deletions engines/tetraedge/detection.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ enum TetraedgeDebugChannels {
kDebugScript = 1 << 4
};

enum GameFeatures {
GF_UTF8 = 1 << 0,
};

extern const PlainGameDescriptor GAME_NAMES[];

extern const ADGameDescription GAME_DESCRIPTIONS[];
Expand Down
54 changes: 51 additions & 3 deletions engines/tetraedge/detection_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ const ADGameDescription GAME_DESCRIPTIONS[] = {
{
"syberia",
nullptr,
AD_ENTRY1s("InGame.lua", "acaf61504a12aebf3862648e04cf29aa", 3920),
AD_ENTRY2s("InGame.lua", "acaf61504a12aebf3862648e04cf29aa", 3920,
"texts/de.xml", "14681ac50bbfa50427058d2793b415eb", 364224),
Common::UNK_LANG,
Common::kPlatformNintendoSwitch,
ADGF_NO_FLAGS,
Expand All @@ -89,14 +90,61 @@ const ADGameDescription GAME_DESCRIPTIONS[] = {
{
"syberia2",
nullptr,
AD_ENTRY2s("Debug.lua", "a2ea493892e96bea64013819195c081e", 7024,
"InGame.lua", "a7df110fe816cb342574150c6f992964", 4654),
AD_ENTRY3s("Debug.lua", "a2ea493892e96bea64013819195c081e", 7024,
"InGame.lua", "a7df110fe816cb342574150c6f992964", 4654,
"texts/de.xml", "dabad822a917b1f87de8f09eadc3ec85", 247098),
Common::UNK_LANG,
Common::kPlatformNintendoSwitch,
ADGF_NO_FLAGS,
GUIO1(GAMEOPTION_CORRECT_MOVIE_ASPECT)
},

// Nintendo Switch, from Syberia1+2 Online bundle, v0
{
"syberia",
nullptr,
AD_ENTRY2s("InGame.lua", "ca319e6f014d04baaf1e77f13f89b44f", 4271,
"texts/de.xml", "14681ac50bbfa50427058d2793b415eb", 364387),
Common::UNK_LANG,
Common::kPlatformNintendoSwitch,
ADGF_NO_FLAGS,
GUIO1(GAMEOPTION_CORRECT_MOVIE_ASPECT)
},
{
"syberia2",
nullptr,
AD_ENTRY3s("Debug.lua", "a2ea493892e96bea64013819195c081e", 7024,
"InGame.lua", "7d7fdb9005675618220e7cd8962c6482", 4745,
"texts/de.xml", "dabad822a917b1f87de8f09eadc3ec85", 247264),
Common::UNK_LANG,
Common::kPlatformNintendoSwitch,
ADGF_NO_FLAGS,
GUIO1(GAMEOPTION_CORRECT_MOVIE_ASPECT)
},

// Nintendo Switch, from Syberia1+2 Online bundle, v196608
{
"syberia",
nullptr,
AD_ENTRY2s("InGame.lua", "ca319e6f014d04baaf1e77f13f89b44f", 4271,
"texts/de.xml", "17d7a875e81a7761d2b30698bd947c15", 368356),
Common::UNK_LANG,
Common::kPlatformNintendoSwitch,
ADGF_NO_FLAGS | GF_UTF8,
GUIO1(GAMEOPTION_CORRECT_MOVIE_ASPECT)
},
{
"syberia2",
nullptr,
AD_ENTRY3s("Debug.lua", "a2ea493892e96bea64013819195c081e", 7024,
"InGame.lua", "7d7fdb9005675618220e7cd8962c6482", 4745,
"texts/de.xml", "78ed3567b3621459229f39c03132e5bb", 248994),
Common::UNK_LANG,
Common::kPlatformNintendoSwitch,
ADGF_NO_FLAGS | GF_UTF8,
GUIO1(GAMEOPTION_CORRECT_MOVIE_ASPECT)
},

// Android v1.0.5
{
"syberia",
Expand Down
2 changes: 2 additions & 0 deletions engines/tetraedge/te/te_i_font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ TeIFont::GlyphData TeIFont::glyph(uint pxSize, uint charcode) {

Common::CodePage TeIFont::codePage() const {
Common::String lang = g_engine->getCore()->language();
if (g_engine->isUtf8Release())
return Common::CodePage::kUtf8;
if (lang == "ru")
return Common::kISO8859_5;
if (g_engine->getGamePlatform() == Common::Platform::kPlatformAndroid)
Expand Down
4 changes: 4 additions & 0 deletions engines/tetraedge/tetraedge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ Common::Platform TetraedgeEngine::getGamePlatform() const {
return _gameDescription->platform;
}

bool TetraedgeEngine::isUtf8Release() const {
return !!(_gameDescription->flags & GF_UTF8);
}

bool TetraedgeEngine::isGameDemo() const {
return (_gameDescription->flags & ADGF_DEMO) != 0;
}
Expand Down
2 changes: 2 additions & 0 deletions engines/tetraedge/tetraedge.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ class TetraedgeEngine : public Engine {

Common::Platform getGamePlatform() const;

bool isUtf8Release() const;

bool isGameDemo() const;

/**
Expand Down

0 comments on commit 1411884

Please sign in to comment.