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-06 01:33:06 +00:00
|
|
|
extern LogVisor::LogModule LogModule;
|
|
|
|
|
2015-07-07 03:22:44 +00:00
|
|
|
struct SpecBase : HECL::Database::IDataSpec
|
2015-07-01 23:50:39 +00:00
|
|
|
{
|
2015-07-10 05:28:08 +00:00
|
|
|
bool canExtract(const ExtractPassInfo& info, std::vector<ExtractReport>& reps);
|
2015-07-01 23:50:39 +00:00
|
|
|
void doExtract(const HECL::Database::Project& project, const ExtractPassInfo& info);
|
|
|
|
|
2015-07-06 01:33:06 +00:00
|
|
|
bool canCook(const HECL::Database::Project& project, const CookTaskInfo& info);
|
2015-07-01 23:50:39 +00:00
|
|
|
void doCook(const HECL::Database::Project& project, const CookTaskInfo& info);
|
|
|
|
|
2015-07-06 01:33:06 +00:00
|
|
|
bool canPackage(const HECL::Database::Project& project, const PackagePassInfo& info);
|
2015-07-01 23:50:39 +00:00
|
|
|
void gatherDependencies(const HECL::Database::Project& project, const PackagePassInfo& info,
|
|
|
|
std::unordered_set<HECL::ProjectPath>& implicitsOut);
|
|
|
|
void doPackage(const HECL::Database::Project& project, const PackagePassInfo& info);
|
|
|
|
|
2015-07-12 18:07:58 +00:00
|
|
|
virtual bool checkFromStandaloneDisc(NOD::DiscBase& disc,
|
|
|
|
const std::string& regstr,
|
|
|
|
const std::vector<const HECL::SystemString*>& args,
|
|
|
|
std::vector<ExtractReport>& reps)=0;
|
|
|
|
virtual bool checkFromTrilogyDisc(NOD::DiscBase& disc,
|
|
|
|
const std::string& regstr,
|
|
|
|
const std::vector<const HECL::SystemString*>& args,
|
|
|
|
std::vector<ExtractReport>& reps)=0;
|
|
|
|
virtual bool extractFromDisc()=0;
|
2015-07-01 23:50:39 +00:00
|
|
|
|
2015-07-07 03:22:44 +00:00
|
|
|
virtual bool checkFromProject(HECL::Database::Project& proj)=0;
|
|
|
|
virtual bool readFromProject(HECL::Database::Project& proj)=0;
|
2015-07-01 23:50:39 +00:00
|
|
|
|
|
|
|
virtual bool visitGameObjects(std::function<bool(const HECL::Database::ObjectBase&)>)=0;
|
|
|
|
struct ILevelSpec
|
|
|
|
{
|
|
|
|
virtual bool visitLevelObjects(std::function<bool(const HECL::Database::ObjectBase&)>)=0;
|
|
|
|
struct IAreaSpec
|
|
|
|
{
|
|
|
|
virtual bool visitAreaObjects(std::function<bool(const HECL::Database::ObjectBase&)>)=0;
|
|
|
|
};
|
|
|
|
virtual bool visitAreas(std::function<bool(const IAreaSpec&)>)=0;
|
|
|
|
};
|
|
|
|
virtual bool visitLevels(std::function<bool(const ILevelSpec&)>)=0;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SPECBASE_HPP
|
|
|
|
|