mirror of https://github.com/AxioDL/metaforce.git
extract tool work
This commit is contained in:
parent
de73e764e1
commit
cc340518f1
|
@ -14,6 +14,7 @@ add_executable(hecl main.cpp
|
|||
|
||||
list(APPEND DATA_SPEC_LIBS
|
||||
RetroDataSpec
|
||||
DNACommon
|
||||
DNAMP1
|
||||
DNAMP2
|
||||
DNAMP3)
|
||||
|
|
|
@ -18,12 +18,12 @@ public:
|
|||
if (!m_info.args.size())
|
||||
LogModule.report(LogVisor::FatalError, "hecl extract needs a source path as its first argument");
|
||||
|
||||
m_einfo.srcpath = &m_info.args[0];
|
||||
m_einfo.srcpath = m_info.args[0];
|
||||
m_einfo.extractArgs.reserve(info.args.size() - 1);
|
||||
for (std::vector<HECL::SystemString>::const_iterator it=info.args.begin() + 1;
|
||||
it != info.args.end();
|
||||
++it)
|
||||
m_einfo.extractArgs.push_back(&*it);
|
||||
m_einfo.extractArgs.push_back(*it);
|
||||
|
||||
for (const HECL::Database::DataSpecEntry* entry : HECL::Database::DATA_SPEC_REGISTRY)
|
||||
{
|
||||
|
@ -99,7 +99,10 @@ public:
|
|||
HECL::Printf(_S("ABOUT TO EXTRACT:\n"));
|
||||
|
||||
for (HECL::Database::IDataSpec::ExtractReport& rep : m_reps)
|
||||
{
|
||||
_recursivePrint(0, rep);
|
||||
HECL::Printf(_S("\n"));
|
||||
}
|
||||
|
||||
if (XTERM_COLOR)
|
||||
HECL::Printf(_S("\n" BLUE BOLD "Continue?" NORMAL " (Y/N) "));
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit abb9d4c0004daa0c892b7d81eb189549089f8cf2
|
||||
Subproject commit 7876d4c209a1f5ce85eede73f8e34d4b9f6ca2bc
|
|
@ -70,8 +70,8 @@ public:
|
|||
*/
|
||||
struct ExtractPassInfo
|
||||
{
|
||||
const SystemString* srcpath;
|
||||
std::vector<const SystemString*> extractArgs;
|
||||
SystemString srcpath;
|
||||
std::vector<SystemString> extractArgs;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -231,6 +231,8 @@ protected:
|
|||
public:
|
||||
FourCC() /* Sentinel FourCC */
|
||||
: num(0) {}
|
||||
FourCC(const FourCC& other)
|
||||
{num = other.num;}
|
||||
FourCC(const char* name)
|
||||
: num(*(uint32_t*)name) {}
|
||||
inline bool operator==(const FourCC& other) const {return num == other.num;}
|
||||
|
@ -238,6 +240,7 @@ public:
|
|||
inline bool operator==(const char* other) const {return num == *(uint32_t*)other;}
|
||||
inline bool operator!=(const char* other) const {return num != *(uint32_t*)other;}
|
||||
inline std::string toString() const {return std::string(fcc, 4);}
|
||||
inline uint32_t toUint32() const {return num;}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -511,6 +514,11 @@ static inline uint64_t SBig(uint64_t val) {return val;}
|
|||
|
||||
namespace std
|
||||
{
|
||||
template <> struct hash<HECL::FourCC>
|
||||
{
|
||||
inline size_t operator()(const HECL::FourCC& val) const noexcept
|
||||
{return val.toUint32();}
|
||||
};
|
||||
template <> struct hash<HECL::ProjectPath>
|
||||
{
|
||||
inline size_t operator()(const HECL::ProjectPath& val) const noexcept
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
add_subdirectory(backend)
|
||||
add_subdirectory(database)
|
||||
add_subdirectory(frontend)
|
||||
add_subdirectory(runtime)
|
||||
add_subdirectory(Backend)
|
||||
add_subdirectory(Database)
|
||||
add_subdirectory(Frontend)
|
||||
add_subdirectory(Runtime)
|
||||
|
||||
add_library(HECL
|
||||
HECL.cpp
|
||||
ProjectPath.cpp
|
||||
WideStringConvert.cpp)
|
||||
WideStringConvert.cpp
|
||||
../include/HECL/HECL.hpp
|
||||
../include/HECL/Backend.hpp
|
||||
../include/HECL/Frontend.hpp
|
||||
../include/HECL/Database.hpp
|
||||
../include/HECL/Runtime.hpp)
|
||||
|
||||
|
|
Loading…
Reference in New Issue