mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 02:27:43 +00:00
began doExtract method
This commit is contained in:
@@ -3,27 +3,22 @@
|
||||
namespace Retro
|
||||
{
|
||||
|
||||
LogVisor::LogModule LogModule("RetroDataSpec");
|
||||
|
||||
bool SpecBase::canExtract(const ExtractPassInfo& info, std::vector<ExtractReport>& reps)
|
||||
{
|
||||
bool isWii;
|
||||
std::unique_ptr<NOD::DiscBase> disc = NOD::OpenDiscFromImage(info.srcpath.c_str(), isWii);
|
||||
if (!disc)
|
||||
m_disc = NOD::OpenDiscFromImage(info.srcpath.c_str(), isWii);
|
||||
if (!m_disc)
|
||||
return false;
|
||||
const char* gameID = disc->getHeader().gameID;
|
||||
const char* gameID = m_disc->getHeader().gameID;
|
||||
|
||||
bool standalone = true;
|
||||
if (isWii)
|
||||
{
|
||||
if (!memcmp(gameID, "R3M", 3))
|
||||
standalone = false;
|
||||
}
|
||||
if (isWii && !memcmp(gameID, "R3M", 3))
|
||||
standalone = false;
|
||||
|
||||
if (standalone && !checkStandaloneID(gameID))
|
||||
return false;
|
||||
|
||||
char region = disc->getHeader().gameID[3];
|
||||
char region = m_disc->getHeader().gameID[3];
|
||||
static const HECL::SystemString regNONE = _S("");
|
||||
static const HECL::SystemString regE = _S("NTSC");
|
||||
static const HECL::SystemString regJ = _S("NTSC-J");
|
||||
@@ -43,13 +38,14 @@ bool SpecBase::canExtract(const ExtractPassInfo& info, std::vector<ExtractReport
|
||||
}
|
||||
|
||||
if (standalone)
|
||||
return checkFromStandaloneDisc(*disc.get(), *regstr, info.extractArgs, reps);
|
||||
return checkFromStandaloneDisc(*m_disc.get(), *regstr, info.extractArgs, reps);
|
||||
else
|
||||
return checkFromTrilogyDisc(*disc.get(), *regstr, info.extractArgs, reps);
|
||||
return checkFromTrilogyDisc(*m_disc.get(), *regstr, info.extractArgs, reps);
|
||||
}
|
||||
|
||||
void SpecBase::doExtract(const HECL::Database::Project& project, const ExtractPassInfo& info)
|
||||
void SpecBase::doExtract(const HECL::Database::Project& project, const ExtractPassInfo&)
|
||||
{
|
||||
extractFromDisc(*m_disc.get(), project);
|
||||
}
|
||||
|
||||
bool SpecBase::canCook(const HECL::Database::Project& project, const CookTaskInfo& info)
|
||||
|
||||
Reference in New Issue
Block a user