diff options
-rw-r--r-- | saga/animation.h | 2 | ||||
-rw-r--r-- | saga/game.cpp | 84 | ||||
-rw-r--r-- | saga/gfx.cpp | 6 | ||||
-rw-r--r-- | saga/ite_introproc.cpp | 22 | ||||
-rw-r--r-- | saga/puzzle.cpp | 2 | ||||
-rw-r--r-- | saga/saga.cpp | 2 | ||||
-rw-r--r-- | saga/saga.h | 14 |
7 files changed, 85 insertions, 47 deletions
diff --git a/saga/animation.h b/saga/animation.h index dd38fa7e96..1918ee5a8b 100644 --- a/saga/animation.h +++ b/saga/animation.h @@ -161,7 +161,7 @@ private: } bool isLongData() const { - if ((_vm->getGameType() == GType_ITE) && ((_vm->getFeatures() & GF_MAC_RESOURCES) == 0)) { + if ((_vm->getGameType() == GType_ITE) && (_vm->getPlatform() != Common::kPlatformMacintosh)) { return false; } return true; diff --git a/saga/game.cpp b/saga/game.cpp index b82aed65c3..8002e10a07 100644 --- a/saga/game.cpp +++ b/saga/game.cpp @@ -840,7 +840,6 @@ static GameMD5 gameMD5[] = { { GID_IHNM_CD_DE, "2b9aea838f74b4eecfb29a8f205a2bd4", "voices6.res", false }, { GID_IHNM_CD_DE, "8b09a196a52627cacb4eab13bfe0b2c3", "voicess.res", false }, - // Reported { GID_IHNM_CD_ES, "0439083e3dfdc51b486071d45872ae52", "musicfm.res", false }, { GID_IHNM_CD_ES, "80f875a1fb384160d1f4b27166eef583", "musicgm.res", false }, { GID_IHNM_CD_ES, "58b79e61594779513c7f2d35509fa89e", "patch.re_", false }, @@ -882,6 +881,8 @@ static GameDescription gameDescriptions[] = { 0, NULL, 0, // features + Common::EN_USA, + Common::kPlatformPC, }, // Inherit the earth - MAC Demo version @@ -902,7 +903,9 @@ static GameDescription gameDescriptions[] = { &ITEMACDEMO_GameMusic, ARRAYSIZE(ITEMacPatch_Files), ITEMacPatch_Files, - GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES + GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES, + Common::EN_USA, + Common::kPlatformMacintosh, }, // Inherit the earth - early MAC Demo version @@ -923,7 +926,9 @@ static GameDescription gameDescriptions[] = { &ITEMACCD_GameMusic, ARRAYSIZE(ITEMacPatch_Files), ITEMacPatch_Files, - GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP | GF_CD_FX + GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_CD_FX, + Common::EN_USA, + Common::kPlatformMacintosh, }, // Inherit the earth - MAC CD Guild version @@ -944,7 +949,9 @@ static GameDescription gameDescriptions[] = { NULL, 0, NULL, - GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_CD_FX + GF_BIG_ENDIAN_DATA | GF_CD_FX, + Common::EN_USA, + Common::kPlatformMacintosh, }, // Inherit the earth - MAC CD Wyrmkeep version @@ -965,7 +972,9 @@ static GameDescription gameDescriptions[] = { &ITEMACCD_GameMusic, ARRAYSIZE(ITEMacPatch_Files), ITEMacPatch_Files, - GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP | GF_CD_FX + GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_CD_FX, + Common::EN_USA, + Common::kPlatformMacintosh, }, // Inherit the earth - Linux Demo version @@ -987,7 +996,9 @@ static GameDescription gameDescriptions[] = { &ITELINDEMO_GameMusic, ARRAYSIZE(ITELinPatch_Files), ITELinPatch_Files, - GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES + GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES, + Common::EN_USA, + Common::kPlatformPC, }, // Inherit the earth - Win32 Demo version @@ -1008,7 +1019,9 @@ static GameDescription gameDescriptions[] = { NULL, ARRAYSIZE(ITEWinPatch2_Files), ITEWinPatch2_Files, - GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES + GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES, + Common::EN_USA, + Common::kPlatformWindows, }, // Inherit the earth - early Win32 Demo version @@ -1029,7 +1042,9 @@ static GameDescription gameDescriptions[] = { NULL, ARRAYSIZE(ITEWinPatch1_Files), ITEWinPatch1_Files, - GF_WYRMKEEP | GF_CD_FX + GF_WYRMKEEP | GF_CD_FX, + Common::EN_USA, + Common::kPlatformWindows, }, // Inherit the earth - Wyrmkeep combined Windows/Mac/Linux CD @@ -1051,7 +1066,9 @@ static GameDescription gameDescriptions[] = { &ITEMACCD_GameMusic, 0, NULL, - GF_WYRMKEEP | GF_CD_FX + GF_WYRMKEEP | GF_CD_FX, + Common::EN_USA, + Common::kPlatformUnknown, }, // Inherit the earth - Wyrmkeep Linux CD version @@ -1074,7 +1091,9 @@ static GameDescription gameDescriptions[] = { &ITEMACCD_GameMusic, ARRAYSIZE(ITELinPatch_Files), ITELinPatch_Files, - GF_WYRMKEEP | GF_CD_FX + GF_WYRMKEEP | GF_CD_FX, + Common::DE_DEU, + Common::kPlatformPC, }, // Inherit the earth - Wyrmkeep Windows CD version @@ -1096,7 +1115,9 @@ static GameDescription gameDescriptions[] = { NULL, ARRAYSIZE(ITEWinPatch1_Files), ITEWinPatch1_Files, - GF_WYRMKEEP | GF_CD_FX + GF_WYRMKEEP | GF_CD_FX, + Common::EN_USA, + Common::kPlatformWindows, }, // Inherit the earth - DOS CD version @@ -1118,7 +1139,9 @@ static GameDescription gameDescriptions[] = { NULL, 0, NULL, - GF_CD_FX + GF_CD_FX, + Common::EN_USA, + Common::kPlatformPC, }, // Inherit the earth - DOS CD German version @@ -1140,7 +1163,9 @@ static GameDescription gameDescriptions[] = { NULL, 0, NULL, - GF_LANG_DE | GF_CD_FX + GF_CD_FX, + Common::DE_DEU, + Common::kPlatformPC, }, // Inherit the earth - CD version @@ -1148,7 +1173,7 @@ static GameDescription gameDescriptions[] = { "ite", GType_ITE, GID_ITE_CD, - "Inherit the Earth (DOS/Win32 CD Version)", + "Inherit the Earth (DOS CD Version)", &ITE_DisplayInfo, ITE_DEFAULT_SCENE, &ITE_Resources, @@ -1161,7 +1186,9 @@ static GameDescription gameDescriptions[] = { NULL, 0, NULL, - GF_CD_FX + GF_CD_FX, + Common::EN_USA, + Common::kPlatformPC, }, // Inherit the earth - German Floppy version @@ -1183,7 +1210,9 @@ static GameDescription gameDescriptions[] = { NULL, 0, NULL, - GF_LANG_DE + 0, + Common::DE_DEU, + Common::kPlatformPC, }, // Inherit the earth - Disk version @@ -1204,7 +1233,9 @@ static GameDescription gameDescriptions[] = { NULL, 0, NULL, - 0 + 0, + Common::EN_USA, + Common::kPlatformPC, }, // I Have No Mouth And I Must Scream - Demo version @@ -1225,7 +1256,9 @@ static GameDescription gameDescriptions[] = { NULL, 0, NULL, - GF_DEFAULT_TO_1X_SCALER + GF_DEFAULT_TO_1X_SCALER, + Common::EN_USA, + Common::kPlatformPC, }, // I Have No Mouth And I Must Scream - CD version @@ -1246,7 +1279,9 @@ static GameDescription gameDescriptions[] = { NULL, 0, NULL, - GF_DEFAULT_TO_1X_SCALER + GF_DEFAULT_TO_1X_SCALER, + Common::EN_USA, + Common::kPlatformPC, }, // I Have No Mouth And I Must Scream - De CD version @@ -1267,7 +1302,9 @@ static GameDescription gameDescriptions[] = { NULL, 0, NULL, - GF_DEFAULT_TO_1X_SCALER + GF_DEFAULT_TO_1X_SCALER, + Common::DE_DEU, + Common::kPlatformPC, }, // I Have No Mouth And I Must Scream - Sp CD version { @@ -1287,7 +1324,9 @@ static GameDescription gameDescriptions[] = { NULL, 0, NULL, - GF_DEFAULT_TO_1X_SCALER + GF_DEFAULT_TO_1X_SCALER, + Common::ES_ESP, + Common::kPlatformPC, } }; @@ -1328,7 +1367,8 @@ DetectedGameList GAME_ProbeGame(const FSList &fslist) { game_n = detectGame(fslist, true, game_n); if (game_n == -1) break; - detectedGames.push_back(gameDescriptions[game_n].toGameSettings()); + detectedGames.push_back(DetectedGame(gameDescriptions[game_n].toGameSettings(), + gameDescriptions[game_n].language, gameDescriptions[game_n].platform)); } return detectedGames; diff --git a/saga/gfx.cpp b/saga/gfx.cpp index f50f215355..fb7d84a4ac 100644 --- a/saga/gfx.cpp +++ b/saga/gfx.cpp @@ -213,7 +213,7 @@ void Gfx::setPalette(const PalEntry *pal, bool full) { } // Make 256th color black. See bug #1256368 - if (_vm->getFeatures() & GF_MAC_RESOURCES && !_vm->_scene->isInIntro()) + if ((_vm->getPlatform() == Common::kPlatformMacintosh) && !_vm->_scene->isInIntro()) memset(&_currentPal[255 * 4], 0, 4); _system->setPalette(_currentPal, 0, PAL_ENTRIES); @@ -318,7 +318,7 @@ void Gfx::palToBlack(PalEntry *srcPal, double percent) { } // Make 256th color black. See bug #1256368 - if (_vm->getFeatures() & GF_MAC_RESOURCES && !_vm->_scene->isInIntro()) + if ((_vm->getPlatform() == Common::kPlatformMacintosh) && !_vm->_scene->isInIntro()) memset(&_currentPal[255 * 4], 0, 4); _system->setPalette(_currentPal, 0, PAL_ENTRIES); @@ -383,7 +383,7 @@ void Gfx::blackToPal(PalEntry *srcPal, double percent) { } // Make 256th color black. See bug #1256368 - if (_vm->getFeatures() & GF_MAC_RESOURCES && !_vm->_scene->isInIntro()) + if ((_vm->getPlatform() == Common::kPlatformMacintosh) && !_vm->_scene->isInIntro()) memset(&_currentPal[255 * 4], 0, 4); _system->setPalette(_currentPal, 0, PAL_ENTRIES); diff --git a/saga/ite_introproc.cpp b/saga/ite_introproc.cpp index eb551ec35f..6be18028ad 100644 --- a/saga/ite_introproc.cpp +++ b/saga/ite_introproc.cpp @@ -99,7 +99,7 @@ Event *Scene::ITEQueueDialogue(Event *q_event, int n_dialogues, const IntroDialo textEntry.useRect = true; textEntry.rect.left = 0; textEntry.rect.right = _vm->getDisplayWidth(); - textEntry.rect.top = (_vm->getFeatures() & GF_LANG_DE) ? INTRO_DE_CAPTION_Y : INTRO_CAPTION_Y; + textEntry.rect.top = (_vm->getLanguage() == Common::DE_DEU) ? INTRO_DE_CAPTION_Y : INTRO_CAPTION_Y; textEntry.rect.bottom = _vm->getDisplayHeight(); textEntry.fontId = kMediumFont; textEntry.flags = (FontEffectFlags)(kFontOutline | kFontCentered); @@ -168,15 +168,11 @@ Event *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits, const // The assumption here is that all WyrmKeep versions have the same // credits, regardless of which operating system they're for. - if (_vm->getFeatures() & GF_LANG_DE) { - lang = DE_DEU; - } else { - lang = EN_USA; - } + lang = _vm->getLanguage(); if (_vm->getFeatures() & GF_WYRMKEEP) { game = kITEWyrmKeep; - } else if (_vm->getFeatures() & GF_MAC_RESOURCES) { + } else if (_vm->getPlatform() == Common::kPlatformMacintosh) { game = kITEMac; } else if (_vm->getGameId() == GID_ITE_CD_G) { game = kITEPCCD; @@ -317,13 +313,13 @@ int Scene::ITEIntroAnimProc(int param) { int lastAnim; if (_vm->getFeatures() & GF_WYRMKEEP) { - if (_vm->getFeatures() & GF_MAC_RESOURCES) { + if (_vm->getPlatform() == Common::kPlatformMacintosh) { lastAnim = 3; } else { lastAnim = 2; } } else { - if (_vm->getFeatures() & GF_MAC_RESOURCES) { + if (_vm->getPlatform() == Common::kPlatformMacintosh) { lastAnim = 4; } else { lastAnim = 5; @@ -375,7 +371,7 @@ int Scene::SC_ITEIntroCave1Proc(int param, void *refCon) { int Scene::ITEIntroCave1Proc(int param) { Event event; Event *q_event; - int lang = _vm->getFeatures() & GF_LANG_DE ? 1 : 0; + int lang = (_vm->getLanguage() == Common::DE_DEU) ? 1 : 0; static const IntroDialogue dialogue[][4] = { { { // English @@ -463,7 +459,7 @@ int Scene::SC_ITEIntroCave2Proc(int param, void *refCon) { int Scene::ITEIntroCave2Proc(int param) { Event event; Event *q_event; - int lang = _vm->getFeatures() & GF_LANG_DE ? 1 : 0; + int lang = (_vm->getLanguage() == Common::DE_DEU) ? 1 : 0; static const IntroDialogue dialogue[][3] = { { { // English @@ -547,7 +543,7 @@ int Scene::SC_ITEIntroCave3Proc(int param, void *refCon) { int Scene::ITEIntroCave3Proc(int param) { Event event; Event *q_event; - int lang = _vm->getFeatures() & GF_LANG_DE ? 1 : 0; + int lang = (_vm->getLanguage() == Common::DE_DEU) ? 1 : 0; static const IntroDialogue dialogue[][3] = { { { // English @@ -631,7 +627,7 @@ int Scene::SC_ITEIntroCave4Proc(int param, void *refCon) { int Scene::ITEIntroCave4Proc(int param) { Event event; Event *q_event; - int lang = _vm->getFeatures() & GF_LANG_DE ? 1 : 0; + int lang = (_vm->getLanguage() == Common::DE_DEU) ? 1 : 0; static const IntroDialogue dialogue[][4] = { { { // English diff --git a/saga/puzzle.cpp b/saga/puzzle.cpp index 0b9cb4de97..ac5a6314e3 100644 --- a/saga/puzzle.cpp +++ b/saga/puzzle.cpp @@ -156,7 +156,7 @@ const char *optionsStr[][4] = { }; Puzzle::Puzzle(SagaEngine *vm) : _vm(vm), _solved(false), _active(false) { - _lang = _vm->getFeatures() & GF_LANG_DE ? 1 : 0; + _lang = (_vm->getLanguage() == Common::DE_DEU) ? 1 : 0; _hintRqState = kRQNoHint; _hintOffer = 0; diff --git a/saga/saga.cpp b/saga/saga.cpp index 7d7607c4a9..0636eae4c3 100644 --- a/saga/saga.cpp +++ b/saga/saga.cpp @@ -404,7 +404,7 @@ const char *SagaEngine::getObjectName(uint16 objectId) { const char *SagaEngine::getTextString(int textStringId) { const char *string; - int lang = getFeatures() & GF_LANG_DE ? 1 : 0; + int lang = (getLanguage() == Common::DE_DEU) ? 1 : 0; string = ITEinterfaceTextStrings[lang][textStringId]; if (!string) diff --git a/saga/saga.h b/saga/saga.h index 0e441f59e3..bca7f4bc42 100644 --- a/saga/saga.h +++ b/saga/saga.h @@ -310,11 +310,9 @@ enum GameSoundTypes { enum GameFeatures { GF_BIG_ENDIAN_DATA = 1 << 0, - GF_MAC_RESOURCES = 1 << 1, - GF_LANG_DE = 1 << 2, - GF_WYRMKEEP = 1 << 3, - GF_CD_FX = 1 << 4, - GF_SCENE_SUBSTITUTES = 1 << 5 + GF_WYRMKEEP = 1 << 1, + GF_CD_FX = 1 << 2, + GF_SCENE_SUBSTITUTES = 1 << 3 }; enum FontId { @@ -490,6 +488,8 @@ struct GameDescription { int patchesCount; GamePatchDescription *patchDescriptions; uint32 features; + Common::Language language; + Common::Platform platform; GameSettings toGameSettings() const { GameSettings dummy = { name, title, features }; @@ -674,7 +674,7 @@ public: public: const GameDescription *getGameDescription() const { return _gameDescription; } const bool isBigEndian() const { return (_gameDescription->features & GF_BIG_ENDIAN_DATA) != 0; } - const bool isMacResources() const { return (_gameDescription->features & GF_MAC_RESOURCES) != 0; } + const bool isMacResources() const { return (getPlatform() == Common::kPlatformMacintosh); } const GameResourceDescription *getResourceDescription() { return _gameDescription->resourceDescription; } const GameSoundInfo *getVoiceInfo() const { return _gameDescription->voiceInfo; } const GameSoundInfo *getSfxInfo() const { return _gameDescription->sfxInfo; } @@ -689,6 +689,8 @@ public: int getGameId() const { return _gameDescription->gameId; } int getGameType() const { return _gameDescription->gameType; } uint32 getFeatures() const { return _gameDescription->features; } + Common::Language getLanguage() const { return _gameDescription->language; } + Common::Platform getPlatform() const { return _gameDescription->platform; } int getGameNumber() const { return _gameNumber; } int getStartSceneNumber() const { return _gameDescription->startSceneNumber; } |