diff --git a/hecl/driver/CMakeLists.txt b/hecl/driver/CMakeLists.txt index a478aa0d2..a6e7afe42 100644 --- a/hecl/driver/CMakeLists.txt +++ b/hecl/driver/CMakeLists.txt @@ -13,13 +13,6 @@ add_executable(hecl main.cpp ../DataSpecRegistry.hpp ) -list(APPEND DATA_SPEC_LIBS - RetroDataSpec - DNAMP3 - DNAMP2 - DNAMP1 - DNACommon) - if(NOT WIN32) list(APPEND PLAT_LIBS pthread) endif() diff --git a/hecl/extern/Athena b/hecl/extern/Athena index 375a68c48..9c880813a 160000 --- a/hecl/extern/Athena +++ b/hecl/extern/Athena @@ -1 +1 @@ -Subproject commit 375a68c48aa4947f360f6c3faece178c931956eb +Subproject commit 9c880813acba16bd36a81320c29f6b57d933ba83 diff --git a/hecl/include/HECL/Database.hpp b/hecl/include/HECL/Database.hpp index a7da3b903..978ab63db 100644 --- a/hecl/include/HECL/Database.hpp +++ b/hecl/include/HECL/Database.hpp @@ -261,8 +261,10 @@ private: ProjectPath m_dotPath; ProjectPath m_cookedRoot; std::vector m_compiledSpecs; + bool m_valid = false; public: Project(const HECL::ProjectRootPath& rootPath); + operator bool() const {return m_valid;} /** * @brief Configuration file handle diff --git a/hecl/lib/CVar.cpp b/hecl/lib/CVar.cpp index 10215c527..243a27678 100755 --- a/hecl/lib/CVar.cpp +++ b/hecl/lib/CVar.cpp @@ -23,16 +23,16 @@ CVar::CVar(const std::string& name, const std::string &value, const std::string } CVar::CVar(const std::string& name, const std::string& value, const std::string& help, CVar::EFlags flags, CVarManager& parent) - : m_mgr(parent) +: m_mgr(parent) { - // Unlock the cvar for writing if readonly - unlock(); - - m_name= name; - m_help = help; - m_type = EType::Literal; m_flags = flags; m_allowedWrite = false; + m_name = name; + m_help = help; + m_type = EType::Literal; + + // Unlock the cvar for writing if readonly + unlock(); fromLiteral(value); m_defaultValue = m_value; @@ -46,15 +46,15 @@ CVar::CVar(const std::string& name, const std::string& value, const std::string& CVar::CVar(const std::string& name, const atVec4f& value, const std::string& help, EFlags flags, CVarManager& parent) : m_mgr(parent) { - // Unlock the cvar for writing if readonly - unlock(); - m_name= name; m_help = help; m_type = EType::Vec4f; m_flags = flags; m_allowedWrite = false; + // Unlock the cvar for writing if readonly + unlock(); + fromVec4f(value); m_defaultValue = m_value; @@ -67,15 +67,15 @@ CVar::CVar(const std::string& name, const atVec4f& value, const std::string& hel CVar::CVar(const std::string& name, float value, const std::string& help, EFlags flags, CVarManager& parent) : m_mgr(parent) { - // Unlock the cvar for writing if readonly - unlock(); - m_name= name; m_help = help; m_type = EType::Float; m_flags = flags; m_allowedWrite = false; + // Unlock the cvar for writing if readonly + unlock(); + fromFloat(value); m_defaultValue = m_value; @@ -88,15 +88,15 @@ CVar::CVar(const std::string& name, float value, const std::string& help, EFlags CVar::CVar(const std::string& name, bool value, const std::string& help, CVar::EFlags flags, CVarManager& parent) : m_mgr(parent) { - // Unlock the cvar for writing if readonly - unlock(); - m_name= name; m_help = help; m_type = EType::Boolean; m_flags = flags; m_allowedWrite = false; + // Unlock the cvar for writing if readonly + unlock(); + fromBoolean(value); m_defaultValue = m_value; @@ -109,15 +109,15 @@ CVar::CVar(const std::string& name, bool value, const std::string& help, CVar::E CVar::CVar(const std::string& name, int value, const std::string& help, CVar::EFlags flags, CVarManager& parent) : m_mgr(parent) { - // Unlock the cvar for writing if readonly - unlock(); - m_name= name; m_help = help; m_type = EType::Integer; m_flags = flags; m_allowedWrite = false; + // Unlock the cvar for writing if readonly + unlock(); + fromInteger(value); m_defaultValue = m_value; diff --git a/hecl/lib/Database/Project.cpp b/hecl/lib/Database/Project.cpp index fe137c42d..09143fd4a 100644 --- a/hecl/lib/Database/Project.cpp +++ b/hecl/lib/Database/Project.cpp @@ -248,6 +248,7 @@ Project::Project(const ProjectRootPath& rootPath) /* Compile current dataspec */ rescanDataSpecs(); + m_valid = true; } bool Project::addPaths(const std::vector& paths)