mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-10 05:57:48 +00:00
Added AnimationParameters property type, decreased contents margins for struct properties in the modify tab, other minor fixes/cleanup
This commit is contained in:
142
Resource/CAnimationParameters.cpp
Normal file
142
Resource/CAnimationParameters.cpp
Normal file
@@ -0,0 +1,142 @@
|
||||
#include "CAnimationParameters.h"
|
||||
#include "CAnimSet.h"
|
||||
#include <Core/CResCache.h>
|
||||
#include <Core/Log.h>
|
||||
#include <iostream>
|
||||
|
||||
CAnimationParameters::CAnimationParameters()
|
||||
{
|
||||
mGame = ePrime;
|
||||
mpCharSet = nullptr;
|
||||
mNodeIndex = 0;
|
||||
mUnknown1 = 0;
|
||||
mUnknown2 = 0;
|
||||
mUnknown3 = 0;
|
||||
mUnknown4 = 0;
|
||||
}
|
||||
|
||||
CAnimationParameters::CAnimationParameters(CInputStream& SCLY, EGame game)
|
||||
{
|
||||
mGame = game;
|
||||
mpCharSet = nullptr;
|
||||
mNodeIndex = 0;
|
||||
mUnknown1 = 0;
|
||||
mUnknown2 = 0;
|
||||
mUnknown3 = 0;
|
||||
mUnknown4 = 0;
|
||||
|
||||
if (game <= eEchoes)
|
||||
{
|
||||
u32 animSetID = SCLY.ReadLong();
|
||||
mNodeIndex = SCLY.ReadLong();
|
||||
mUnknown1 = SCLY.ReadLong();
|
||||
|
||||
mpCharSet = gResCache.GetResource(animSetID, "ANCS");
|
||||
mResToken = CToken(mpCharSet);
|
||||
}
|
||||
|
||||
else if (game <= eCorruption)
|
||||
{
|
||||
u64 charID = SCLY.ReadLongLong();
|
||||
mUnknown1 = SCLY.ReadLong();
|
||||
|
||||
mpCharSet = gResCache.GetResource(charID, "CHAR");
|
||||
mResToken = CToken(mpCharSet);
|
||||
}
|
||||
|
||||
else if (game == eReturns)
|
||||
{
|
||||
SCLY.Seek(-6, SEEK_CUR);
|
||||
u32 offset = SCLY.Tell();
|
||||
u32 propID = SCLY.ReadLong();
|
||||
SCLY.Seek(2, SEEK_CUR);
|
||||
|
||||
mUnknown1 = (u32) SCLY.ReadByte();
|
||||
mUnknown1 &= 0xFF;
|
||||
|
||||
if (mUnknown1 == 0x60)
|
||||
{
|
||||
u64 charID = SCLY.ReadLongLong();
|
||||
mUnknown2 = SCLY.ReadLong();
|
||||
mUnknown3 = SCLY.ReadLong();
|
||||
mUnknown4 = SCLY.ReadLong();
|
||||
|
||||
mpCharSet = gResCache.GetResource(charID, "CHAR");
|
||||
mResToken = CToken(mpCharSet);
|
||||
}
|
||||
|
||||
else if (mUnknown1 != 0x80)
|
||||
{
|
||||
Log::FileError(SCLY.GetSourceString(), offset,
|
||||
"Unexpected AnimationParameters byte: " + StringUtil::ToHexString(mUnknown1, true, true, 2) + " (property " + StringUtil::ToHexString(propID, true, true, 8) + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CModel* CAnimationParameters::GetCurrentModel(s32 nodeIndex)
|
||||
{
|
||||
if (!mpCharSet) return nullptr;
|
||||
if (mpCharSet->Type() != eAnimSet) return nullptr;
|
||||
if (nodeIndex == -1) nodeIndex = mNodeIndex;
|
||||
|
||||
CAnimSet *pSet = static_cast<CAnimSet*>(mpCharSet);
|
||||
if (pSet->getNodeCount() <= nodeIndex) return nullptr;
|
||||
return pSet->getNodeModel(nodeIndex);
|
||||
}
|
||||
|
||||
// ************ GETTERS ************
|
||||
EGame CAnimationParameters::Version()
|
||||
{
|
||||
return mGame;
|
||||
}
|
||||
|
||||
CResource* CAnimationParameters::Resource()
|
||||
{
|
||||
return mpCharSet;
|
||||
}
|
||||
|
||||
u32 CAnimationParameters::CharacterIndex()
|
||||
{
|
||||
return mNodeIndex;
|
||||
}
|
||||
|
||||
u32 CAnimationParameters::Unknown(u32 index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return mUnknown1;
|
||||
case 1: return mUnknown2;
|
||||
case 2: return mUnknown3;
|
||||
case 3: return mUnknown4;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ************ SETTERS ************
|
||||
void CAnimationParameters::SetResource(CResource *pRes)
|
||||
{
|
||||
if ((pRes->Type() == eAnimSet) || (pRes->Type() == eCharacter))
|
||||
{
|
||||
mpCharSet = pRes;
|
||||
mResToken = CToken(pRes);
|
||||
mNodeIndex = 0;
|
||||
}
|
||||
else
|
||||
Log::Error("Resource with invalid type passed to CAnimationParameters: " + pRes->Source());
|
||||
}
|
||||
|
||||
void CAnimationParameters::SetNodeIndex(u32 index)
|
||||
{
|
||||
mNodeIndex = index;
|
||||
}
|
||||
|
||||
void CAnimationParameters::SetUnknown(u32 index, u32 value)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: mUnknown1 = value;
|
||||
case 1: mUnknown2 = value;
|
||||
case 2: mUnknown3 = value;
|
||||
case 3: mUnknown4 = value;
|
||||
}
|
||||
}
|
||||
38
Resource/CAnimationParameters.h
Normal file
38
Resource/CAnimationParameters.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef CANIMATIONPARAMETERS_H
|
||||
#define CANIMATIONPARAMETERS_H
|
||||
|
||||
#include "CResource.h"
|
||||
#include "model/CModel.h"
|
||||
#include <Core/CToken.h>
|
||||
#include "EFormatVersion.h"
|
||||
|
||||
class CAnimationParameters
|
||||
{
|
||||
EGame mGame;
|
||||
CResource *mpCharSet;
|
||||
CToken mResToken;
|
||||
|
||||
u32 mNodeIndex;
|
||||
u32 mUnknown1;
|
||||
u32 mUnknown2;
|
||||
u32 mUnknown3;
|
||||
u32 mUnknown4;
|
||||
|
||||
public:
|
||||
CAnimationParameters();
|
||||
CAnimationParameters(CInputStream& SCLY, EGame game);
|
||||
CModel* GetCurrentModel(s32 nodeIndex = -1);
|
||||
|
||||
// Getters
|
||||
EGame Version();
|
||||
CResource* Resource();
|
||||
u32 CharacterIndex();
|
||||
u32 Unknown(u32 index);
|
||||
|
||||
// Setters
|
||||
void SetResource(CResource *pRes);
|
||||
void SetNodeIndex(u32 index);
|
||||
void SetUnknown(u32 index, u32 value);
|
||||
};
|
||||
|
||||
#endif // CANIMATIONPARAMETERS_H
|
||||
@@ -102,6 +102,10 @@ CPropertyStruct* CScriptLoader::LoadStructMP1(CInputStream& SCLY, CStructTemplat
|
||||
pProp = LoadStructMP1(SCLY, StructTmp);
|
||||
break;
|
||||
}
|
||||
case eAnimParamsProperty: {
|
||||
pProp = new CAnimParamsProperty(CAnimationParameters(SCLY, mVersion));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
pProp = new CUnknownProperty();
|
||||
break;
|
||||
@@ -192,15 +196,17 @@ CScriptLayer* CScriptLoader::LoadLayerMP1(CInputStream &SCLY)
|
||||
void CScriptLoader::LoadStructMP2(CInputStream& SCLY, CPropertyStruct *pStruct, CStructTemplate *pTemp)
|
||||
{
|
||||
// Verify property count
|
||||
u32 propCount = pTemp->Count();
|
||||
|
||||
if (!pTemp->IsSingleProperty())
|
||||
{
|
||||
u16 numProperties = SCLY.ReadShort();
|
||||
if (numProperties != pTemp->Count())
|
||||
if ((numProperties != propCount) && (mVersion < eReturns))
|
||||
Log::FileWarning(SCLY.GetSourceString(), SCLY.Tell() - 2, "Struct \"" + pTemp->Name() + "\" template property count doesn't match file");
|
||||
propCount = numProperties;
|
||||
}
|
||||
|
||||
// Parse properties
|
||||
u32 propCount = pTemp->Count();
|
||||
pStruct->Reserve(propCount);
|
||||
|
||||
for (u32 iProp = 0; iProp < propCount; iProp++)
|
||||
@@ -351,6 +357,11 @@ void CScriptLoader::LoadStructMP2(CInputStream& SCLY, CPropertyStruct *pStruct,
|
||||
break;
|
||||
}
|
||||
|
||||
case eAnimParamsProperty: {
|
||||
CAnimParamsProperty *pAnimCast = static_cast<CAnimParamsProperty*>(pProp);
|
||||
pAnimCast->Set(CAnimationParameters(SCLY, mVersion));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "CTemplateLoader.h"
|
||||
#include "CWorldLoader.h"
|
||||
#include "../script/EAttribType.h"
|
||||
#include <Core/Log.h>
|
||||
|
||||
void CTemplateLoader::LoadStructProperties(tinyxml2::XMLElement *pElem, CStructTemplate *pTemp, const std::string& templateName)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define CMASTERTEMPLATE_H
|
||||
|
||||
#include "CScriptTemplate.h"
|
||||
#include "CTemplateCategory.h"
|
||||
#include "../EFormatVersion.h"
|
||||
#include <Common/types.h>
|
||||
#include <map>
|
||||
@@ -22,7 +21,6 @@ class CMasterTemplate
|
||||
std::map<u32, CScriptTemplate*> mTemplates;
|
||||
std::map<u32, std::string> mStates;
|
||||
std::map<u32, std::string> mMessages;
|
||||
std::vector<CTemplateCategory> mCategories;
|
||||
|
||||
bool mHasPropList;
|
||||
std::map<u32, CPropertyTemplate*> mPropertyList;
|
||||
|
||||
@@ -96,18 +96,19 @@ CPropertyStruct* CPropertyStruct::CopyFromTemplate(CStructTemplate *pTemp)
|
||||
|
||||
switch (pPropTemp->Type())
|
||||
{
|
||||
case eBoolProperty: pProp = new CBoolProperty(false); break;
|
||||
case eByteProperty: pProp = new CByteProperty(0); break;
|
||||
case eShortProperty: pProp = new CShortProperty(0); break;
|
||||
case eLongProperty: pProp = new CLongProperty(0); break;
|
||||
case eFloatProperty: pProp = new CFloatProperty(0.f); break;
|
||||
case eStringProperty: pProp = new CStringProperty(""); break;
|
||||
case eVector3Property: pProp = new CVector3Property(CVector3f::skZero); break;
|
||||
case eColorProperty: pProp = new CColorProperty(CColor::skBlack); break;
|
||||
case eFileProperty: pProp = new CFileProperty(); break;
|
||||
case eArrayProperty: pProp = new CArrayProperty(); break;
|
||||
case eUnknownProperty: pProp = new CUnknownProperty(); break;
|
||||
case eStructProperty: pProp = CPropertyStruct::CopyFromTemplate(static_cast<CStructTemplate*>(pPropTemp)); break;
|
||||
case eBoolProperty: pProp = new CBoolProperty(false); break;
|
||||
case eByteProperty: pProp = new CByteProperty(0); break;
|
||||
case eShortProperty: pProp = new CShortProperty(0); break;
|
||||
case eLongProperty: pProp = new CLongProperty(0); break;
|
||||
case eFloatProperty: pProp = new CFloatProperty(0.f); break;
|
||||
case eStringProperty: pProp = new CStringProperty(""); break;
|
||||
case eVector3Property: pProp = new CVector3Property(CVector3f::skZero); break;
|
||||
case eColorProperty: pProp = new CColorProperty(CColor::skBlack); break;
|
||||
case eFileProperty: pProp = new CFileProperty(); break;
|
||||
case eArrayProperty: pProp = new CArrayProperty(); break;
|
||||
case eAnimParamsProperty: pProp = new CAnimParamsProperty(); break;
|
||||
case eUnknownProperty: pProp = new CUnknownProperty(); break;
|
||||
case eStructProperty: pProp = CPropertyStruct::CopyFromTemplate(static_cast<CStructTemplate*>(pPropTemp)); break;
|
||||
}
|
||||
|
||||
if (pProp)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* It's a bit hard to read, should be reorganized at some point
|
||||
*/
|
||||
#include "../CResource.h"
|
||||
#include "../CAnimationParameters.h"
|
||||
#include "CPropertyTemplate.h"
|
||||
#include "EPropertyType.h"
|
||||
#include <Common/CColor.h>
|
||||
@@ -54,17 +55,18 @@ public:
|
||||
inline t Get() { return mValue; }
|
||||
inline void Set(t v) { mValue = v; }
|
||||
};
|
||||
typedef __CProperty<bool, eBoolProperty> CBoolProperty;
|
||||
typedef __CProperty<char, eByteProperty> CByteProperty;
|
||||
typedef __CProperty<short, eShortProperty> CShortProperty;
|
||||
typedef __CProperty<long, eLongProperty> CLongProperty;
|
||||
typedef __CProperty<float, eFloatProperty> CFloatProperty;
|
||||
typedef __CProperty<std::string, eStringProperty> CStringProperty;
|
||||
typedef __CProperty<CVector3f, eVector3Property> CVector3Property;
|
||||
typedef __CProperty<CColor, eColorProperty> CColorProperty;
|
||||
typedef __CProperty<CResource*, eFileProperty> CFileProperty;
|
||||
typedef __CProperty<std::vector<u8>, eArrayProperty> CArrayProperty;
|
||||
typedef __CProperty<std::vector<u8>, eUnknownProperty> CUnknownProperty;
|
||||
typedef __CProperty<bool, eBoolProperty> CBoolProperty;
|
||||
typedef __CProperty<char, eByteProperty> CByteProperty;
|
||||
typedef __CProperty<short, eShortProperty> CShortProperty;
|
||||
typedef __CProperty<long, eLongProperty> CLongProperty;
|
||||
typedef __CProperty<float, eFloatProperty> CFloatProperty;
|
||||
typedef __CProperty<std::string, eStringProperty> CStringProperty;
|
||||
typedef __CProperty<CVector3f, eVector3Property> CVector3Property;
|
||||
typedef __CProperty<CColor, eColorProperty> CColorProperty;
|
||||
typedef __CProperty<CResource*, eFileProperty> CFileProperty;
|
||||
typedef __CProperty<CAnimationParameters, eAnimParamsProperty> CAnimParamsProperty;
|
||||
typedef __CProperty<std::vector<u8>, eArrayProperty> CArrayProperty;
|
||||
typedef __CProperty<std::vector<u8>, eUnknownProperty> CUnknownProperty;
|
||||
|
||||
/*
|
||||
* Template specialization for CFileProperty to allow a token for resources
|
||||
|
||||
@@ -3,37 +3,39 @@
|
||||
|
||||
EPropertyType PropStringToPropEnum(std::string prop)
|
||||
{
|
||||
if (prop == "bool") return eBoolProperty;
|
||||
if (prop == "byte") return eByteProperty;
|
||||
if (prop == "short") return eShortProperty;
|
||||
if (prop == "long") return eLongProperty;
|
||||
if (prop == "float") return eFloatProperty;
|
||||
if (prop == "string") return eStringProperty;
|
||||
if (prop == "color") return eColorProperty;
|
||||
if (prop == "vector3f") return eVector3Property;
|
||||
if (prop == "file") return eFileProperty;
|
||||
if (prop == "struct") return eStructProperty;
|
||||
if (prop == "array") return eArrayProperty;
|
||||
if (prop == "unknown") return eUnknownProperty;
|
||||
return eInvalidProperty;
|
||||
if (prop == "bool") return eBoolProperty;
|
||||
if (prop == "byte") return eByteProperty;
|
||||
if (prop == "short") return eShortProperty;
|
||||
if (prop == "long") return eLongProperty;
|
||||
if (prop == "float") return eFloatProperty;
|
||||
if (prop == "string") return eStringProperty;
|
||||
if (prop == "color") return eColorProperty;
|
||||
if (prop == "vector3f") return eVector3Property;
|
||||
if (prop == "file") return eFileProperty;
|
||||
if (prop == "struct") return eStructProperty;
|
||||
if (prop == "array") return eArrayProperty;
|
||||
if (prop == "animparams") return eAnimParamsProperty;
|
||||
if (prop == "unknown") return eUnknownProperty;
|
||||
return eInvalidProperty;
|
||||
}
|
||||
|
||||
std::string PropEnumToPropString(EPropertyType prop)
|
||||
{
|
||||
switch (prop)
|
||||
{
|
||||
case eBoolProperty: return "bool";
|
||||
case eByteProperty: return "byte";
|
||||
case eShortProperty: return "short";
|
||||
case eLongProperty: return "long";
|
||||
case eFloatProperty: return "float";
|
||||
case eStringProperty: return "string";
|
||||
case eColorProperty: return "color";
|
||||
case eVector3Property: return "vector3f";
|
||||
case eFileProperty: return "file";
|
||||
case eStructProperty: return "struct";
|
||||
case eArrayProperty: return "array";
|
||||
case eUnknownProperty: return "unknown";
|
||||
case eBoolProperty: return "bool";
|
||||
case eByteProperty: return "byte";
|
||||
case eShortProperty: return "short";
|
||||
case eLongProperty: return "long";
|
||||
case eFloatProperty: return "float";
|
||||
case eStringProperty: return "string";
|
||||
case eColorProperty: return "color";
|
||||
case eVector3Property: return "vector3f";
|
||||
case eFileProperty: return "file";
|
||||
case eStructProperty: return "struct";
|
||||
case eArrayProperty: return "array";
|
||||
case eAnimParamsProperty: return "animparams";
|
||||
case eUnknownProperty: return "unknown";
|
||||
|
||||
case eInvalidProperty:
|
||||
default:
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "CProperty.h"
|
||||
#include "CPropertyTemplate.h"
|
||||
#include "CScriptTemplate.h"
|
||||
#include "EAttribType.h"
|
||||
#include "../model/CModel.h"
|
||||
|
||||
class CGameArea;
|
||||
|
||||
@@ -108,6 +108,8 @@ t TFetchProperty(CPropertyStruct *pProperties, const TIDString& ID)
|
||||
|
||||
CStructTemplate* CScriptTemplate::BaseStructByCount(s32 propCount)
|
||||
{
|
||||
if (mPropertySets.size() == 1) return mPropertySets[0].pBaseStruct;
|
||||
|
||||
for (u32 iSet = 0; iSet < mPropertySets.size(); iSet++)
|
||||
if (mPropertySets[iSet].pBaseStruct->Count() == propCount)
|
||||
return mPropertySets[iSet].pBaseStruct;
|
||||
@@ -206,7 +208,6 @@ CModel* CScriptTemplate::FindDisplayModel(CPropertyStruct *pProperties)
|
||||
for (auto it = mAssets.begin(); it != mAssets.end(); it++)
|
||||
{
|
||||
CResource *pRes = nullptr;
|
||||
int animSetIndex = -1;
|
||||
|
||||
// File
|
||||
if (it->AssetSource == SEditorAsset::eFile)
|
||||
@@ -226,46 +227,16 @@ CModel* CScriptTemplate::FindDisplayModel(CPropertyStruct *pProperties)
|
||||
pRes = pFile->Get();
|
||||
}
|
||||
|
||||
else if (pProp->Type() == eStructProperty)
|
||||
else if (pProp->Type() == eAnimParamsProperty)
|
||||
{
|
||||
CPropertyStruct *pStruct = static_cast<CPropertyStruct*>(pProp);
|
||||
|
||||
// Slightly hacky code to fetch the correct parameters for each game
|
||||
EGame game = mpMaster->GetGame();
|
||||
|
||||
if (game <= eCorruption)
|
||||
pRes = static_cast<CFileProperty*>(pStruct->PropertyByIndex(0))->Get();
|
||||
else
|
||||
pRes = static_cast<CFileProperty*>(pStruct->PropertyByIndex(1))->Get();
|
||||
|
||||
if (it->ForceNodeIndex >= 0)
|
||||
animSetIndex = it->ForceNodeIndex;
|
||||
else if (game >= eCorruptionProto)
|
||||
animSetIndex = 0;
|
||||
else
|
||||
animSetIndex = static_cast<CLongProperty*>(pStruct->PropertyByIndex(1))->Get();
|
||||
CAnimParamsProperty *pParams = static_cast<CAnimParamsProperty*>(pProp);
|
||||
pRes = pParams->Get().GetCurrentModel(it->ForceNodeIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// Verify resource exists + is correct type
|
||||
if (pRes)
|
||||
{
|
||||
if ((it->AssetType == SEditorAsset::eModel) && (pRes->Type() == eModel))
|
||||
return static_cast<CModel*>(pRes);
|
||||
|
||||
if ((it->AssetType == SEditorAsset::eAnimParams) && ((pRes->Type() == eAnimSet)))
|
||||
{
|
||||
CAnimSet *pSet = static_cast<CAnimSet*>(pRes);
|
||||
|
||||
if (animSetIndex < pSet->getNodeCount())
|
||||
{
|
||||
CModel *pModel = pSet->getNodeModel(animSetIndex);
|
||||
|
||||
if (pModel && (pModel->Type() == eModel))
|
||||
return pModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pRes && (pRes->Type() == eModel))
|
||||
return static_cast<CModel*>(pRes);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "CProperty.h"
|
||||
#include "EPropertyType.h"
|
||||
#include "EVolumeShape.h"
|
||||
#include "EAttribType.h"
|
||||
#include <Common/CFourCC.h>
|
||||
#include <Common/types.h>
|
||||
#include <list>
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#ifndef CTEMPLATECATEGORY_H
|
||||
#define CTEMPLATECATEGORY_H
|
||||
|
||||
#include "CScriptTemplate.h"
|
||||
#include <algorithm>
|
||||
|
||||
class CTemplateCategory
|
||||
{
|
||||
std::string mCategoryName;
|
||||
std::vector<CScriptTemplate*> mTemplates;
|
||||
|
||||
public:
|
||||
CTemplateCategory() {}
|
||||
|
||||
inline CTemplateCategory(const std::string& Name) {
|
||||
SetName(Name);
|
||||
}
|
||||
|
||||
inline void SetName(const std::string& Name) {
|
||||
mCategoryName = Name;
|
||||
}
|
||||
|
||||
inline void AddTemplate(CScriptTemplate *pTmp) {
|
||||
mTemplates.push_back(pTmp);
|
||||
}
|
||||
|
||||
inline void Sort() {
|
||||
std::sort(mTemplates.begin(), mTemplates.end(), [](CScriptTemplate* pA, CScriptTemplate* pB) -> bool {
|
||||
return (pA->TemplateName() < pB->TemplateName());
|
||||
});
|
||||
}
|
||||
|
||||
inline u32 NumTemplates() {
|
||||
return mTemplates.size();
|
||||
}
|
||||
|
||||
inline CScriptTemplate* GetTemplate(u32 index) {
|
||||
return mTemplates[index];
|
||||
}
|
||||
|
||||
inline CScriptTemplate* operator[](u32 index) {
|
||||
return mTemplates[index];
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CTEMPLATECATEGORY_H
|
||||
@@ -1,26 +0,0 @@
|
||||
#ifndef EATTRIBTYPE
|
||||
#define EATTRIBTYPE
|
||||
|
||||
#include <Common/EnumUtil.h>
|
||||
#include <string>
|
||||
|
||||
enum EAttribType
|
||||
{
|
||||
eNameAttrib = 0x1,
|
||||
ePositionAttrib = 0x2,
|
||||
eRotationAttrib = 0x4,
|
||||
eScaleAttrib = 0x8,
|
||||
eModelAttrib = 0x10,
|
||||
eAnimSetAttrib = 0x20,
|
||||
eVolumeAttrib = 0x40,
|
||||
eVulnerabilityAttrib = 0x80,
|
||||
eInvalidAttrib = 0x80000000
|
||||
};
|
||||
DEFINE_ENUM_FLAGS(EAttribType)
|
||||
|
||||
// functions defined in CScriptTemplate.cpp
|
||||
EAttribType AttribStringToAttribEnum(const std::string& Attrib);
|
||||
std::string AttribEnumToAttribString(EAttribType Attrib);
|
||||
|
||||
#endif // EATTRIBTYPE
|
||||
|
||||
@@ -17,6 +17,7 @@ enum EPropertyType
|
||||
eFileProperty,
|
||||
eStructProperty,
|
||||
eArrayProperty,
|
||||
eAnimParamsProperty,
|
||||
eUnknownProperty,
|
||||
eInvalidProperty
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user