2015-07-01 23:50:39 +00:00
|
|
|
#ifndef SPECBASE_HPP
|
|
|
|
#define SPECBASE_HPP
|
|
|
|
|
|
|
|
#include <functional>
|
|
|
|
|
2015-07-04 06:03:07 +00:00
|
|
|
#include <HECL/Database.hpp>
|
|
|
|
#include <NOD/NOD.hpp>
|
2015-07-01 23:50:39 +00:00
|
|
|
|
|
|
|
namespace Retro
|
|
|
|
{
|
|
|
|
|
2015-07-07 03:22:44 +00:00
|
|
|
struct SpecBase : HECL::Database::IDataSpec
|
2015-07-01 23:50:39 +00:00
|
|
|
{
|
2015-09-30 06:23:40 +00:00
|
|
|
bool canExtract(const ExtractPassInfo& info, std::list<ExtractReport>& reps);
|
|
|
|
void doExtract(const ExtractPassInfo& info, FProgress progress);
|
2015-07-01 23:50:39 +00:00
|
|
|
|
2015-09-30 06:23:40 +00:00
|
|
|
bool canCook(const HECL::ProjectPath& path);
|
|
|
|
void doCook(const HECL::ProjectPath& path, const HECL::ProjectPath& cookedPath);
|
2015-07-01 23:50:39 +00:00
|
|
|
|
2015-08-05 21:46:07 +00:00
|
|
|
bool canPackage(const PackagePassInfo& info);
|
|
|
|
void gatherDependencies(const PackagePassInfo& info,
|
2015-07-01 23:50:39 +00:00
|
|
|
std::unordered_set<HECL::ProjectPath>& implicitsOut);
|
2015-08-05 21:46:07 +00:00
|
|
|
void doPackage(const PackagePassInfo& info);
|
2015-07-01 23:50:39 +00:00
|
|
|
|
2015-07-14 01:07:15 +00:00
|
|
|
virtual bool checkStandaloneID(const char* id) const=0;
|
2015-08-05 21:46:07 +00:00
|
|
|
virtual bool checkFromStandaloneDisc(NOD::DiscBase& disc,
|
2015-07-13 06:29:12 +00:00
|
|
|
const HECL::SystemString& regstr,
|
2015-09-30 06:23:40 +00:00
|
|
|
const std::list<HECL::SystemString>& args,
|
|
|
|
std::list<ExtractReport>& reps)=0;
|
2015-08-05 21:46:07 +00:00
|
|
|
virtual bool checkFromTrilogyDisc(NOD::DiscBase& disc,
|
2015-07-13 06:29:12 +00:00
|
|
|
const HECL::SystemString& regstr,
|
2015-09-30 06:23:40 +00:00
|
|
|
const std::list<HECL::SystemString>& args,
|
|
|
|
std::list<ExtractReport>& reps)=0;
|
2015-08-05 21:46:07 +00:00
|
|
|
virtual bool extractFromDisc(NOD::DiscBase& disc, bool force,
|
2015-09-30 06:23:40 +00:00
|
|
|
FProgress progress)=0;
|
2015-07-01 23:50:39 +00:00
|
|
|
|
|
|
|
|
2015-09-30 06:23:40 +00:00
|
|
|
const HECL::ProjectPath& getMasterShaderPath() const {return m_masterShader;}
|
2015-08-05 21:46:07 +00:00
|
|
|
|
|
|
|
SpecBase(HECL::Database::Project& project)
|
|
|
|
: m_project(project),
|
|
|
|
m_masterShader(project.getProjectRootPath(), ".hecl/RetroMasterShader.blend") {}
|
|
|
|
protected:
|
|
|
|
HECL::Database::Project& m_project;
|
|
|
|
HECL::ProjectPath m_masterShader;
|
2015-07-16 01:57:34 +00:00
|
|
|
private:
|
|
|
|
std::unique_ptr<NOD::DiscBase> m_disc;
|
2015-07-18 04:33:38 +00:00
|
|
|
bool m_isWii;
|
|
|
|
bool m_standalone;
|
2015-07-01 23:50:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SPECBASE_HPP
|
|
|
|
|