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