From 17a77ff69ced1c04e0520336c14e05fbf993108d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 18 Oct 2014 14:59:16 +0300 Subject: SCI: Fix some typos, and remove some redundant curly braces --- engines/sci/detection.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 4f28738508..245b5646cc 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -563,9 +563,8 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles, // If these files aren't found, it can't be SCI - if (!foundResMap && !foundRes000) { + if (!foundResMap && !foundRes000) return 0; - } ResourceManager resMan; resMan.addAppropriateSources(fslist); @@ -575,19 +574,17 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles, #ifndef ENABLE_SCI32 // Is SCI32 compiled in? If not, and this is a SCI32 game, // stop here - if (getSciVersion() >= SCI_VERSION_2) { - return (const ADGameDescription *)&s_fallbackDesc; - } + if (getSciVersion() >= SCI_VERSION_2) + return 0; #endif ViewType gameViews = resMan.getViewType(); // Have we identified the game views? If not, stop here - // Can't be SCI (or unsupported SCI views). Pinball Creep by sierra also uses resource.map/resource.000 files - // but doesnt share sci format at all, if we dont return 0 here we will detect this game as SCI - if (gameViews == kViewUnknown) { + // Can't be SCI (or unsupported SCI views). Pinball Creep by Sierra also uses resource.map/resource.000 files + // but doesn't share SCI format at all + if (gameViews == kViewUnknown) return 0; - } // Set the platform to Amiga if the game is using Amiga views if (gameViews == kViewAmiga) @@ -597,9 +594,8 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles, Common::String sierraGameId = resMan.findSierraGameId(); // If we don't have a game id, the game is not SCI - if (sierraGameId.empty()) { + if (sierraGameId.empty()) return 0; - } Common::String gameId = convertSierraGameId(sierraGameId, &s_fallbackDesc.flags, resMan); strncpy(s_fallbackGameIdBuf, gameId.c_str(), sizeof(s_fallbackGameIdBuf) - 1); -- cgit v1.2.3