2014-06-14 15:27:55 +00:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
2017-09-30 18:07:07 +00:00
|
|
|
#include "VirtualFile.h"
|
2016-01-29 01:47:16 +00:00
|
|
|
#include "RomData.h"
|
2018-02-25 16:27:32 +00:00
|
|
|
#include "BaseLoader.h"
|
2016-12-11 15:56:23 +00:00
|
|
|
class ArchiveReader;
|
2014-06-14 15:27:55 +00:00
|
|
|
|
2018-02-25 16:27:32 +00:00
|
|
|
class RomLoader : public BaseLoader
|
2014-06-14 15:27:55 +00:00
|
|
|
{
|
2017-09-30 18:07:07 +00:00
|
|
|
private:
|
2019-01-20 21:33:23 +00:00
|
|
|
static constexpr int MaxFilesToCheck = 100;
|
|
|
|
|
2017-09-30 18:07:07 +00:00
|
|
|
RomData _romData;
|
|
|
|
string _filename;
|
2014-06-14 15:27:55 +00:00
|
|
|
|
2019-01-20 21:33:23 +00:00
|
|
|
static string FindMatchingRomInFile(string filePath, HashInfo hashInfo, int &iterationCount);
|
2018-02-25 16:27:32 +00:00
|
|
|
|
2017-09-30 18:07:07 +00:00
|
|
|
public:
|
2018-02-25 16:27:32 +00:00
|
|
|
using BaseLoader::BaseLoader;
|
|
|
|
|
2020-01-01 01:23:26 +00:00
|
|
|
bool LoadFile(VirtualFile &romFile);
|
2017-06-28 23:00:08 +00:00
|
|
|
|
2017-09-30 18:07:07 +00:00
|
|
|
RomData GetRomData();
|
|
|
|
static string FindMatchingRom(vector<string> romFiles, string romFilename, HashInfo hashInfo, bool useFastSearch);
|
2014-06-14 15:27:55 +00:00
|
|
|
};
|