Lots of work to get MP2 repacking functional

This commit is contained in:
parax0
2016-11-07 03:07:00 -07:00
parent 040caca896
commit f6fd78af14
135 changed files with 677 additions and 1239 deletions

View File

@@ -2,6 +2,7 @@
#define CSCRIPTLAYER_H
#include "CScriptObject.h"
#include "Core/Resource/CDependencyGroup.h"
#include <Common/types.h>
#include <string>
#include <vector>
@@ -107,9 +108,6 @@ public:
return iLyr;
}
if (mpArea->GeneratedObjectsLayer() == this)
return mpArea->NumScriptLayers();
return -1;
}

View File

@@ -70,11 +70,13 @@ bool CScriptObject::IsEditorProperty(IProperty *pProp)
void CScriptObject::SetLayer(CScriptLayer *pLayer, u32 NewLayerIndex)
{
ASSERT(pLayer != nullptr);
if (pLayer != mpLayer)
{
if (mpLayer) mpLayer->RemoveInstance(this);
mpLayer = pLayer;
if (mpLayer) mpLayer->AddInstance(this, NewLayerIndex);
mpLayer->AddInstance(this, NewLayerIndex);
}
}

View File

@@ -20,20 +20,25 @@ bool IPropertyTemplate::IsInVersion(u32 Version) const
return false;
}
TString IPropertyTemplate::FullName() const
{
return mpParent ? mpParent->FullName() + "::" + Name() : Name();
}
TIDString IPropertyTemplate::IDString(bool FullPath) const
{
if (mID != 0xFFFFFFFF)
{
TIDString out;
TIDString Out;
if (mpParent && FullPath)
{
out = mpParent->IDString(true);
if (!out.IsEmpty()) out += ":";
Out = mpParent->IDString(true);
if (!Out.IsEmpty()) Out += ":";
}
out += TIDString::HexString(mID);
return out;
Out += TIDString::HexString(mID);
return Out;
}
else return "";
}

View File

@@ -113,6 +113,7 @@ public:
EGame Game() const;
bool IsInVersion(u32 Version) const;
TString FullName() const;
TIDString IDString(bool FullPath) const;
bool IsDescendantOf(const CStructTemplate *pStruct) const;
bool IsFromStructTemplate() const;