mirror of https://github.com/AxioDL/metaforce.git
CVar initialization order fix
This commit is contained in:
parent
a2cf004785
commit
5c1551bf08
|
@ -13,13 +13,6 @@ add_executable(hecl main.cpp
|
||||||
../DataSpecRegistry.hpp
|
../DataSpecRegistry.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND DATA_SPEC_LIBS
|
|
||||||
RetroDataSpec
|
|
||||||
DNAMP3
|
|
||||||
DNAMP2
|
|
||||||
DNAMP1
|
|
||||||
DNACommon)
|
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
list(APPEND PLAT_LIBS pthread)
|
list(APPEND PLAT_LIBS pthread)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 375a68c48aa4947f360f6c3faece178c931956eb
|
Subproject commit 9c880813acba16bd36a81320c29f6b57d933ba83
|
|
@ -261,8 +261,10 @@ private:
|
||||||
ProjectPath m_dotPath;
|
ProjectPath m_dotPath;
|
||||||
ProjectPath m_cookedRoot;
|
ProjectPath m_cookedRoot;
|
||||||
std::vector<ProjectDataSpec> m_compiledSpecs;
|
std::vector<ProjectDataSpec> m_compiledSpecs;
|
||||||
|
bool m_valid = false;
|
||||||
public:
|
public:
|
||||||
Project(const HECL::ProjectRootPath& rootPath);
|
Project(const HECL::ProjectRootPath& rootPath);
|
||||||
|
operator bool() const {return m_valid;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Configuration file handle
|
* @brief Configuration file handle
|
||||||
|
|
|
@ -25,14 +25,14 @@ 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)
|
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
|
m_flags = flags;
|
||||||
unlock();
|
m_allowedWrite = false;
|
||||||
|
|
||||||
m_name = name;
|
m_name = name;
|
||||||
m_help = help;
|
m_help = help;
|
||||||
m_type = EType::Literal;
|
m_type = EType::Literal;
|
||||||
m_flags = flags;
|
|
||||||
m_allowedWrite = false;
|
// Unlock the cvar for writing if readonly
|
||||||
|
unlock();
|
||||||
|
|
||||||
fromLiteral(value);
|
fromLiteral(value);
|
||||||
m_defaultValue = m_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)
|
CVar::CVar(const std::string& name, const atVec4f& value, const std::string& help, EFlags flags, CVarManager& parent)
|
||||||
: m_mgr(parent)
|
: m_mgr(parent)
|
||||||
{
|
{
|
||||||
// Unlock the cvar for writing if readonly
|
|
||||||
unlock();
|
|
||||||
|
|
||||||
m_name= name;
|
m_name= name;
|
||||||
m_help = help;
|
m_help = help;
|
||||||
m_type = EType::Vec4f;
|
m_type = EType::Vec4f;
|
||||||
m_flags = flags;
|
m_flags = flags;
|
||||||
m_allowedWrite = false;
|
m_allowedWrite = false;
|
||||||
|
|
||||||
|
// Unlock the cvar for writing if readonly
|
||||||
|
unlock();
|
||||||
|
|
||||||
fromVec4f(value);
|
fromVec4f(value);
|
||||||
m_defaultValue = m_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)
|
CVar::CVar(const std::string& name, float value, const std::string& help, EFlags flags, CVarManager& parent)
|
||||||
: m_mgr(parent)
|
: m_mgr(parent)
|
||||||
{
|
{
|
||||||
// Unlock the cvar for writing if readonly
|
|
||||||
unlock();
|
|
||||||
|
|
||||||
m_name= name;
|
m_name= name;
|
||||||
m_help = help;
|
m_help = help;
|
||||||
m_type = EType::Float;
|
m_type = EType::Float;
|
||||||
m_flags = flags;
|
m_flags = flags;
|
||||||
m_allowedWrite = false;
|
m_allowedWrite = false;
|
||||||
|
|
||||||
|
// Unlock the cvar for writing if readonly
|
||||||
|
unlock();
|
||||||
|
|
||||||
fromFloat(value);
|
fromFloat(value);
|
||||||
m_defaultValue = m_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)
|
CVar::CVar(const std::string& name, bool 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_name= name;
|
||||||
m_help = help;
|
m_help = help;
|
||||||
m_type = EType::Boolean;
|
m_type = EType::Boolean;
|
||||||
m_flags = flags;
|
m_flags = flags;
|
||||||
m_allowedWrite = false;
|
m_allowedWrite = false;
|
||||||
|
|
||||||
|
// Unlock the cvar for writing if readonly
|
||||||
|
unlock();
|
||||||
|
|
||||||
fromBoolean(value);
|
fromBoolean(value);
|
||||||
m_defaultValue = m_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)
|
CVar::CVar(const std::string& name, int 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_name= name;
|
||||||
m_help = help;
|
m_help = help;
|
||||||
m_type = EType::Integer;
|
m_type = EType::Integer;
|
||||||
m_flags = flags;
|
m_flags = flags;
|
||||||
m_allowedWrite = false;
|
m_allowedWrite = false;
|
||||||
|
|
||||||
|
// Unlock the cvar for writing if readonly
|
||||||
|
unlock();
|
||||||
|
|
||||||
fromInteger(value);
|
fromInteger(value);
|
||||||
m_defaultValue = m_value;
|
m_defaultValue = m_value;
|
||||||
|
|
||||||
|
|
|
@ -248,6 +248,7 @@ Project::Project(const ProjectRootPath& rootPath)
|
||||||
|
|
||||||
/* Compile current dataspec */
|
/* Compile current dataspec */
|
||||||
rescanDataSpecs();
|
rescanDataSpecs();
|
||||||
|
m_valid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Project::addPaths(const std::vector<ProjectPath>& paths)
|
bool Project::addPaths(const std::vector<ProjectPath>& paths)
|
||||||
|
|
Loading…
Reference in New Issue