diff --git a/ZAPDTR/ZAPD/Globals.cpp b/ZAPDTR/ZAPD/Globals.cpp index 455205b2a..181e2dce8 100644 --- a/ZAPDTR/ZAPD/Globals.cpp +++ b/ZAPDTR/ZAPD/Globals.cpp @@ -23,6 +23,7 @@ Globals::Globals() singleThreaded = true; verbosity = VerbosityLevel::VERBOSITY_SILENT; outputPath = Directory::GetCurrentDirectory(); + singleThreaded = true; } Globals::~Globals() diff --git a/libultraship/libultraship/Cvar.cpp b/libultraship/libultraship/Cvar.cpp index 27d44df80..98d4ee9b0 100644 --- a/libultraship/libultraship/Cvar.cpp +++ b/libultraship/libultraship/Cvar.cpp @@ -52,7 +52,7 @@ extern "C" void CVar_SetS32(const char* name, int32_t value) { if (!cvar) { cvar = std::make_unique(); } - cvar->type = CVAR_TYPE_S32; + cvar->type = CVarType::S32; cvar->value.valueS32 = value; } @@ -61,7 +61,7 @@ void CVar_SetFloat(const char* name, float value) { if (!cvar) { cvar = std::make_unique(); } - cvar->type = CVAR_TYPE_FLOAT; + cvar->type = CVarType::Float; cvar->value.valueFloat = value; } @@ -70,8 +70,8 @@ extern "C" void CVar_SetString(const char* name, const char* value) { if (!cvar) { cvar = std::make_unique(); } - cvar->type = CVAR_TYPE_STRING; - cvar->value.valueStr = ImStrdup(value); + cvar->type = CVarType::String; + cvar->value.valueStr = value; } extern "C" void CVar_RegisterS32(const char* name, int32_t defaultValue) { diff --git a/libultraship/libultraship/Cvar.h b/libultraship/libultraship/Cvar.h index 1507b519d..c0568da41 100644 --- a/libultraship/libultraship/Cvar.h +++ b/libultraship/libultraship/Cvar.h @@ -3,7 +3,14 @@ #include -typedef enum CVarType { CVAR_TYPE_S32, CVAR_TYPE_FLOAT, CVAR_TYPE_STRING } CVarType; +#ifdef __cplusplus +typedef enum class CVarType +{ + S32, + Float, + String, + RGBA +} CVarType; typedef struct CVar { const char* name; @@ -16,6 +23,9 @@ typedef struct CVar { } value; } CVar; +CVar* CVar_Get(char* name); +#endif + #ifdef __cplusplus extern "C" { diff --git a/soh/include/color.h b/libultraship/libultraship/color.h similarity index 100% rename from soh/include/color.h rename to libultraship/libultraship/color.h diff --git a/libultraship/libultraship/libultraship.vcxproj b/libultraship/libultraship/libultraship.vcxproj index 9c759f85a..4d7eab9b4 100644 --- a/libultraship/libultraship/libultraship.vcxproj +++ b/libultraship/libultraship/libultraship.vcxproj @@ -351,6 +351,7 @@ + diff --git a/libultraship/libultraship/libultraship.vcxproj.filters b/libultraship/libultraship/libultraship.vcxproj.filters index abad0cb72..fa5c505aa 100644 --- a/libultraship/libultraship/libultraship.vcxproj.filters +++ b/libultraship/libultraship/libultraship.vcxproj.filters @@ -653,6 +653,9 @@ Source Files\Resources + + Header Files + Source Files\CustomImpl\Overlay diff --git a/soh/soh.vcxproj b/soh/soh.vcxproj index 6275e82fd..bc7c4d646 100644 --- a/soh/soh.vcxproj +++ b/soh/soh.vcxproj @@ -988,7 +988,6 @@ - diff --git a/soh/soh.vcxproj.filters b/soh/soh.vcxproj.filters index 5f48ff042..f0c05dee8 100644 --- a/soh/soh.vcxproj.filters +++ b/soh/soh.vcxproj.filters @@ -2384,9 +2384,6 @@ Header Files\include - - Header Files\include - Header Files\include diff --git a/soh/soh/Enhancements/debugconsole.cpp b/soh/soh/Enhancements/debugconsole.cpp index eb2b02b11..5ea885723 100644 --- a/soh/soh/Enhancements/debugconsole.cpp +++ b/soh/soh/Enhancements/debugconsole.cpp @@ -426,11 +426,11 @@ static bool GetCVarHandler(const std::vector& args) { if (cvar != nullptr) { - if (cvar->type == CVAR_TYPE_S32) + if (cvar->type == CVarType::S32) INFO("[SOH] Variable %s is %i", args[1].c_str(), cvar->value.valueS32); - else if (cvar->type == CVAR_TYPE_FLOAT) + else if (cvar->type == CVarType::Float) INFO("[SOH] Variable %s is %f", args[1].c_str(), cvar->value.valueFloat); - else if (cvar->type == CVAR_TYPE_STRING) + else if (cvar->type == CVarType::String) INFO("[SOH] Variable %s is %s", args[1].c_str(), cvar->value.valueStr); } else