metaforce/DataSpec/SpecBase.cpp

64 lines
1.6 KiB
C++
Raw Normal View History

2015-07-01 23:50:39 +00:00
#include "SpecBase.hpp"
namespace Retro
{
2015-07-06 01:33:06 +00:00
LogVisor::LogModule LogModule("RetroDataSpec");
bool SpecBase::canExtract(const ExtractPassInfo& info)
2015-07-01 23:50:39 +00:00
{
2015-07-02 20:41:40 +00:00
bool isWii;
std::unique_ptr<NOD::DiscBase> disc = NOD::OpenDiscFromImage(info.srcpath.c_str(), isWii);
if (!disc)
{
2015-07-06 01:33:06 +00:00
LogModule.report(LogVisor::Error, _S("'%s' not a valid Nintendo disc image"), info.srcpath.c_str());
2015-07-02 20:41:40 +00:00
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;
}
2015-07-01 23:50:39 +00:00
2015-07-06 01:33:06 +00:00
LogModule.report(LogVisor::Error, "%.6s (%s) is not supported", gameID, disc->getHeader().gameTitle);
2015-07-02 20:41:40 +00:00
return false;
2015-07-01 23:50:39 +00:00
}
void SpecBase::doExtract(const HECL::Database::Project& project, const ExtractPassInfo& info)
{
}
2015-07-06 01:33:06 +00:00
bool SpecBase::canCook(const HECL::Database::Project& project, const CookTaskInfo& info)
2015-07-01 23:50:39 +00:00
{
}
void SpecBase::doCook(const HECL::Database::Project& project, const CookTaskInfo& info)
{
}
2015-07-06 01:33:06 +00:00
bool SpecBase::canPackage(const HECL::Database::Project& project, const PackagePassInfo& info)
2015-07-01 23:50:39 +00:00
{
}
void SpecBase::gatherDependencies(const HECL::Database::Project& project, const PackagePassInfo& info,
std::unordered_set<HECL::ProjectPath>& implicitsOut)
{
}
void SpecBase::doPackage(const HECL::Database::Project& project, const PackagePassInfo& info)
{
}
}