Ticket #4582: detection.patch
File detection.patch, 7.0 KB (added by , 15 years ago) |
---|
-
engines/advancedDetector.cpp
144 144 const char *title = 0; 145 145 146 146 while (sg->gameid) { 147 if ( !scumm_stricmp(g.gameid, sg->gameid))147 if (g.gameid == sg->gameid) 148 148 title = sg->description; 149 149 sg++; 150 150 } 151 151 152 152 GameDescriptor gd(g.gameid, title, g.language, g.platform); 153 gd.updateDesc(g.extra );153 gd.updateDesc(g.extra.c_str()); 154 154 return gd; 155 155 } 156 156 -
engines/advancedDetector.h
51 51 }; 52 52 53 53 struct ADGameDescription { 54 const char *gameid;55 const char *extra;54 Common::String gameid; 55 Common::String extra; 56 56 ADGameFileDescription filesDescriptions[14]; 57 57 Common::Language language; 58 58 Common::Platform platform; -
engines/agos/agos.h
199 199 int getGameId() const; 200 200 int getGameType() const; 201 201 uint32 getFeatures() const; 202 const char *getExtra() const;202 Common::String getExtra() const; 203 203 Common::Language getLanguage() const; 204 204 Common::Platform getPlatform() const; 205 205 const char *getFileName(int type) const; -
engines/agos/detection.cpp
230 230 return _gameDescription->features; 231 231 } 232 232 233 const char *AGOSEngine::getExtra() const {233 Common::String AGOSEngine::getExtra() const { 234 234 return _gameDescription->desc.extra; 235 235 } 236 236 -
engines/agos/script_ff.cpp
438 438 // 135: switch CD 439 439 uint16 disc = readVariable(97); 440 440 441 if ( !strcmp(getExtra(), "4CD")) {441 if (getExtra() == "4CD") { 442 442 _sound->switchVoiceFile(gss, disc); 443 } else if ( !strcmp(getExtra(), "2CD")) {443 } else if (getExtra() == "2CD") { 444 444 if (disc == 1 || disc == 2) 445 445 _sound->switchVoiceFile(gss, 1); 446 446 else if (disc == 3 || disc == 4) -
engines/cruise/cruise.h
83 83 virtual bool hasFeature(EngineFeature f) const; 84 84 85 85 int getGameType() const; 86 const char *getGameId() const;86 Common::String getGameId() const; 87 87 uint32 getFeatures() const; 88 88 Common::Language getLanguage() const; 89 89 Common::Platform getPlatform() const; -
engines/cruise/detection.cpp
41 41 uint32 features; 42 42 }; 43 43 44 const char *CruiseEngine::getGameId() const {44 Common::String CruiseEngine::getGameId() const { 45 45 return _gameDescription->desc.gameid; 46 46 } 47 47 -
engines/sci/detection.cpp
339 339 delete resMan; 340 340 341 341 // Distinguish demos from full versions 342 if ( !strcmp(s_fallbackDesc.desc.gameid, "castlebrain")&& !Common::File::exists("resource.002")) {342 if (s_fallbackDesc.desc.gameid == "castlebrain" && !Common::File::exists("resource.002")) { 343 343 // The Spanish full version doesn't have resource.002, but we can distinguish it from the 344 344 // demo from the size of resource.000 345 345 if (smallResource000Size) 346 346 s_fallbackDesc.desc.flags |= ADGF_DEMO; 347 347 } 348 348 349 if ( !strcmp(s_fallbackDesc.desc.gameid, "islandbrain")&& smallResource000Size)349 if (s_fallbackDesc.desc.gameid == "islandbrain" && smallResource000Size) 350 350 s_fallbackDesc.desc.flags |= ADGF_DEMO; 351 351 352 if ( !strcmp(s_fallbackDesc.desc.gameid, "kq6")&& smallResource000Size)352 if (s_fallbackDesc.desc.gameid == "kq6" && smallResource000Size) 353 353 s_fallbackDesc.desc.flags |= ADGF_DEMO; 354 354 355 355 // Fill in extras field 356 if ( !strcmp(s_fallbackDesc.desc.gameid, "lsl1sci")||357 !strcmp(s_fallbackDesc.desc.gameid, "pq1sci")||358 !strcmp(s_fallbackDesc.desc.gameid, "sq1sci"))356 if (s_fallbackDesc.desc.gameid == "lsl1sci" || 357 s_fallbackDesc.desc.gameid == "pq1sci" || 358 s_fallbackDesc.desc.gameid == "sq1sci") 359 359 s_fallbackDesc.desc.extra = "VGA Remake"; 360 360 361 if ( !strcmp(s_fallbackDesc.desc.gameid, "qfg1")&& !Common::File::exists("resource.001"))361 if (s_fallbackDesc.desc.gameid == "qfg1" && !Common::File::exists("resource.001")) 362 362 s_fallbackDesc.desc.extra = "VGA Remake"; 363 363 364 364 SearchMan.remove("SCI_detection"); -
engines/sci/sci.cpp
235 235 return _console; 236 236 } 237 237 238 const char*SciEngine::getGameID() const {238 Common::String SciEngine::getGameID() const { 239 239 return _gameDescription->desc.gameid; 240 240 } 241 241 -
engines/sci/sci.h
106 106 virtual GUI::Debugger *getDebugger(); 107 107 Console *getSciDebugger(); 108 108 109 const char*getGameID() const;109 Common::String getGameID() const; 110 110 int getResourceVersion() const; 111 111 SciVersion getVersion() const; 112 112 Common::Language getLanguage() const; -
engines/tinsel/detection.cpp
679 679 // Includes nifty stuff like removing trailing dots and ignoring case. 680 680 for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { 681 681 if (file->isDirectory()) { 682 if ( !scumm_stricmp(file->getName().c_str(),"dw2")) {682 if (file->getName().equalsIgnoreCase("dw2")) { 683 683 // Probably Discworld 2 subfolder on CD, so add it's contents as well 684 684 Common::FSList files; 685 685 if (file->getChildren(files, Common::FSNode::kListAll)) { … … 704 704 // Check which files are included in some dw2 ADGameDescription *and* present 705 705 // in fslist without a '1' suffix character. Compute MD5s and file sizes for these files. 706 706 for (g = &Tinsel::gameDescriptions[0]; g->desc.gameid != 0; ++g) { 707 if ( strcmp(g->desc.gameid, "dw2") != 0)707 if (g->desc.gameid == "dw2") 708 708 continue; 709 709 710 710 for (fileDesc = g->desc.filesDescriptions; fileDesc->fileName; fileDesc++) { … … 738 738 // MD5 based matching 739 739 uint i; 740 740 for (i = 0, g = &Tinsel::gameDescriptions[0]; g->desc.gameid != 0; ++g) { 741 if ( strcmp(g->desc.gameid, "dw2") != 0)741 if (g->desc.gameid == "dw2") 742 742 continue; 743 743 744 744 bool fileMissing = false;