summaryrefslogtreecommitdiff
path: root/ZAPD/OtherStructs/SkinLimbStructs.cpp
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2021-12-26 11:49:34 -0300
committerGitHub <noreply@github.com>2021-12-26 09:49:34 -0500
commitc7d0d375b199d74e7f0e6e9b802b5d214de8696c (patch)
tree64b50f4c202183ecb3e6df8f7ca3320c1390b498 /ZAPD/OtherStructs/SkinLimbStructs.cpp
parent57d6288435243e0428203c1322fe10615b8b1214 (diff)
Fix raw segmented pointers in Skin substructs and LegacyLimbs (#220)
Diffstat (limited to 'ZAPD/OtherStructs/SkinLimbStructs.cpp')
-rw-r--r--ZAPD/OtherStructs/SkinLimbStructs.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/ZAPD/OtherStructs/SkinLimbStructs.cpp b/ZAPD/OtherStructs/SkinLimbStructs.cpp
index 9d16de4..0879861 100644
--- a/ZAPD/OtherStructs/SkinLimbStructs.cpp
+++ b/ZAPD/OtherStructs/SkinLimbStructs.cpp
@@ -263,7 +263,7 @@ void Struct_800A5E28::DeclareReferences(const std::string& prefix)
ZResource::DeclareReferences(varPrefix);
- if (unk_4 != 0 && GETSEGNUM(unk_4) == parent->segment)
+ if (unk_4 != SEGMENTED_NULL && GETSEGNUM(unk_4) == parent->segment)
{
const auto& res = unk_4_arr.at(0);
std::string unk_4_Str = res.GetDefaultName(varPrefix);
@@ -293,7 +293,7 @@ void Struct_800A5E28::DeclareReferences(const std::string& prefix)
decl->text = entryStr;
}
- if (unk_8 != 0 && GETSEGNUM(unk_8) == parent->segment)
+ if (unk_8 != SEGMENTED_NULL && GETSEGNUM(unk_8) == parent->segment)
{
uint32_t unk_8_Offset = Seg2Filespace(unk_8, parent->baseAddress);
@@ -306,6 +306,8 @@ void Struct_800A5E28::DeclareReferences(const std::string& prefix)
std::string dListStr =
StringHelper::Sprintf("%sSkinLimbDL_%06X", varPrefix.c_str(), unk_8_Offset);
unk_8_dlist->SetName(dListStr);
+ unk_8_dlist->DeclareVar(varPrefix, "");
+ unk_8_dlist->DeclareReferences(varPrefix);
parent->AddResource(unk_8_dlist);
}
}