CustomizeAnimFile MxVariable (#584)

* CustomizeAnimFile MxVariable

* Fixes

* Remove returns

* Add size asserts

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
MS
2024-02-21 15:30:02 -05:00
committed by GitHub
parent 48cd648357
commit 761b120aee
9 changed files with 180 additions and 6 deletions

View File

@@ -1,5 +1,16 @@
#include "legovariables.h"
#include "legobuildingmanager.h"
#include "legoomni.h"
#include "legoplantmanager.h"
#include "legounksavedatawriter.h"
DECOMP_SIZE_ASSERT(VisibilityVariable, 0x24)
DECOMP_SIZE_ASSERT(CameraLocationVariable, 0x24)
DECOMP_SIZE_ASSERT(CursorVariable, 0x24)
DECOMP_SIZE_ASSERT(WhoAmIVariable, 0x24)
DECOMP_SIZE_ASSERT(CustomizeAnimFileVariable, 0x24)
// GLOBAL: LEGO1 0x100f3a40
// STRING: LEGO1 0x100f3808
const char* g_varVISIBILITY = "VISIBILITY";
@@ -38,3 +49,21 @@ void WhoAmIVariable::SetValue(const char* p_value)
{
// TODO
}
// FUNCTION: LEGO1 0x10085aa0
CustomizeAnimFileVariable::CustomizeAnimFileVariable(const char* p_key)
{
m_key = p_key;
m_key.ToUpperCase();
}
// FUNCTION: LEGO1 0x10085b50
void CustomizeAnimFileVariable::SetValue(const char* p_value)
{
// STRING: LEGO1 0x100fc4f4
if (strcmp(m_key.GetData(), "CUSTOMIZE_ANIM_FILE") == 0) {
UnkSaveDataWriter()->SetCustomizeAnimFile(p_value);
PlantManager()->SetCustomizeAnimFile(p_value);
BuildingManager()->SetCustomizeAnimFile(p_value);
}
}