mirror of https://github.com/AxioDL/metaforce.git
some NODLib integration
This commit is contained in:
parent
1e7f39e4c5
commit
cce7e06580
|
@ -3,10 +3,36 @@
|
||||||
namespace Retro
|
namespace Retro
|
||||||
{
|
{
|
||||||
|
|
||||||
bool SpecBase::canExtract(const HECL::Database::Project& project, const ExtractPassInfo& info,
|
bool SpecBase::canExtract(const ExtractPassInfo& info, HECL::SystemString& reasonNo)
|
||||||
HECL::SystemString& reasonNo)
|
|
||||||
{
|
{
|
||||||
|
bool isWii;
|
||||||
|
std::unique_ptr<NOD::DiscBase> disc = NOD::OpenDiscFromImage(info.srcpath.c_str(), isWii);
|
||||||
|
if (!disc)
|
||||||
|
{
|
||||||
|
reasonNo = _S("Not a valid Nintendo disc image");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const char* gameID = disc->getHeader().gameID;
|
||||||
|
|
||||||
|
if (isWii)
|
||||||
|
{
|
||||||
|
if (!memcmp(gameID, "R3ME01", 6))
|
||||||
|
return true;
|
||||||
|
if (!memcmp(gameID, "R3MP01", 6))
|
||||||
|
return true;
|
||||||
|
if (!memcmp(gameID, "R3IJ01", 6))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!memcmp(gameID, "GM8E01", 6))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
HECL::SystemStringView gameIDView(std::string(gameID, 6));
|
||||||
|
HECL::SystemStringView gameNameView(disc->getHeader().gameTitle);
|
||||||
|
reasonNo = gameIDView.sys_str() + _S(" (") + gameNameView.sys_str() + _S(") is not supported");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpecBase::doExtract(const HECL::Database::Project& project, const ExtractPassInfo& info)
|
void SpecBase::doExtract(const HECL::Database::Project& project, const ExtractPassInfo& info)
|
||||||
|
|
|
@ -11,8 +11,7 @@ namespace Retro
|
||||||
|
|
||||||
struct SpecBase : public HECL::Database::IDataSpec
|
struct SpecBase : public HECL::Database::IDataSpec
|
||||||
{
|
{
|
||||||
bool canExtract(const HECL::Database::Project& project, const ExtractPassInfo& info,
|
bool canExtract(const ExtractPassInfo& info, HECL::SystemString& reasonNo);
|
||||||
HECL::SystemString& reasonNo);
|
|
||||||
void doExtract(const HECL::Database::Project& project, const ExtractPassInfo& info);
|
void doExtract(const HECL::Database::Project& project, const ExtractPassInfo& info);
|
||||||
|
|
||||||
bool canCook(const HECL::Database::Project& project, const CookTaskInfo& info,
|
bool canCook(const HECL::Database::Project& project, const CookTaskInfo& info,
|
||||||
|
|
2
NODLib
2
NODLib
|
@ -1 +1 @@
|
||||||
Subproject commit a1b2a262bf4a4847eda00790da77a1a5289ddba1
|
Subproject commit b461f63ae4769c1042d7ee1362f102bc3bfc2456
|
Loading…
Reference in New Issue