ADL: Remove unneeded functions from detection & move to metaengine.
This commit is contained in:
parent
d57f84205c
commit
0a14511547
4 changed files with 88 additions and 49 deletions
|
@ -24,14 +24,50 @@
|
|||
|
||||
#include "common/system.h"
|
||||
#include "common/savefile.h"
|
||||
#include "common/file.h"
|
||||
|
||||
#include "graphics/thumbnail.h"
|
||||
|
||||
#include "adl/detection_enums.h"
|
||||
#include "adl/detection.h"
|
||||
|
||||
#include "adl/disk_image_helpers.h"
|
||||
|
||||
namespace Adl {
|
||||
|
||||
Common::String getDiskImageName(const AdlGameDescription &adlDesc, byte volume) {
|
||||
const ADGameDescription &desc = adlDesc.desc;
|
||||
for (uint i = 0; desc.filesDescriptions[i].fileName; ++i) {
|
||||
const ADGameFileDescription &fDesc = desc.filesDescriptions[i];
|
||||
|
||||
if (fDesc.fileType == volume) {
|
||||
for (uint e = 0; e < ARRAYSIZE(diskImageExts); ++e) {
|
||||
if (diskImageExts[e].platform == desc.platform) {
|
||||
Common::String testFileName(fDesc.fileName);
|
||||
testFileName += diskImageExts[e].extension;
|
||||
if (Common::File::exists(testFileName))
|
||||
return testFileName;
|
||||
}
|
||||
}
|
||||
|
||||
error("Failed to find disk image '%s'", fDesc.fileName);
|
||||
}
|
||||
}
|
||||
|
||||
error("Disk volume %d not found", volume);
|
||||
}
|
||||
|
||||
GameType getGameType(const AdlGameDescription &adlDesc) {
|
||||
return adlDesc.gameType;
|
||||
}
|
||||
|
||||
GameVersion getGameVersion(const AdlGameDescription &adlDesc) {
|
||||
return adlDesc.version;
|
||||
}
|
||||
|
||||
Common::Platform getPlatform(const AdlGameDescription &adlDesc) {
|
||||
return adlDesc.desc.platform;
|
||||
}
|
||||
|
||||
class AdlMetaEngineConnect : public AdvancedMetaEngineConnect {
|
||||
public:
|
||||
const char *getName() const override {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue