mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-17 08:57:09 +00:00
Loading SCLY file properties into a new class CResourceInfo instead of loading it as a CResource
This commit is contained in:
@@ -228,7 +228,7 @@ CModel* CScriptTemplate::FindDisplayModel(CPropertyStruct *pProperties)
|
||||
if (pProp->Type() == eFileProperty)
|
||||
{
|
||||
TFileProperty *pFile = static_cast<TFileProperty*>(pProp);
|
||||
pRes = pFile->Get();
|
||||
pRes = pFile->Get().Load();
|
||||
}
|
||||
|
||||
else if (pProp->Type() == eCharacterProperty)
|
||||
@@ -268,7 +268,7 @@ CTexture* CScriptTemplate::FindBillboardTexture(CPropertyStruct *pProperties)
|
||||
if (pProp->Type() == eFileProperty)
|
||||
{
|
||||
TFileProperty *pFile = static_cast<TFileProperty*>(pProp);
|
||||
pRes = pFile->Get();
|
||||
pRes = pFile->Get().Load();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ CCollisionMeshGroup* CScriptTemplate::FindCollision(CPropertyStruct *pProperties
|
||||
if (pProp->Type() == eFileProperty)
|
||||
{
|
||||
TFileProperty *pFile = static_cast<TFileProperty*>(pProp);
|
||||
pRes = pFile->Get();
|
||||
pRes = pFile->Get().Load();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ bool CScriptTemplate::HasInGameModel(CPropertyStruct *pProperties)
|
||||
if (pProp->Type() == eFileProperty)
|
||||
{
|
||||
TFileProperty *pFile = static_cast<TFileProperty*>(pProp);
|
||||
pRes = pFile->Get();
|
||||
pRes = pFile->Get().Load();
|
||||
}
|
||||
|
||||
else if (pProp->Type() == eCharacterProperty)
|
||||
|
||||
@@ -67,7 +67,7 @@ typedef TTypedProperty<float, eFloatProperty, CFloatValue>
|
||||
typedef TTypedProperty<TString, eStringProperty, CStringValue> TStringProperty;
|
||||
typedef TTypedProperty<CVector3f, eVector3Property, CVector3Value> TVector3Property;
|
||||
typedef TTypedProperty<CColor, eColorProperty, CColorValue> TColorProperty;
|
||||
typedef TTypedProperty<TResPtr<CResource>, eFileProperty, CFileValue> TFileProperty;
|
||||
typedef TTypedProperty<CResourceInfo, eFileProperty, CFileValue> TFileProperty;
|
||||
typedef TTypedProperty<CAnimationParameters, eCharacterProperty, CCharacterValue> TAnimParamsProperty;
|
||||
typedef TTypedProperty<std::vector<u8>, eUnknownProperty, CUnknownValue> TUnknownProperty;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "Core/Log.h"
|
||||
#include "Core/Resource/CAnimationParameters.h"
|
||||
#include "Core/Resource/CResource.h"
|
||||
#include "Core/Resource/CResourceInfo.h"
|
||||
#include "Core/Resource/TResPtr.h"
|
||||
|
||||
#include <Common/CColor.h>
|
||||
@@ -253,11 +254,11 @@ public:
|
||||
void FromString(const TString&) { }
|
||||
};
|
||||
|
||||
class CFileValue : public TTypedPropertyValue<TResPtr<CResource>>
|
||||
class CFileValue : public TTypedPropertyValue<CResourceInfo>
|
||||
{
|
||||
public:
|
||||
CFileValue() {}
|
||||
CFileValue(CResource *pRes) { mValue = pRes; }
|
||||
CFileValue(const CResourceInfo& rkInfo) { mValue = rkInfo; }
|
||||
|
||||
TString ToString() const { return ""; }
|
||||
void FromString(const TString&) { }
|
||||
|
||||
Reference in New Issue
Block a user