mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 07:15:36 +00:00
Merge branch 'assorted' into 'master'
Load NiSortAdjustNode and NiAccumulators See merge request OpenMW/openmw!1396
This commit is contained in:
commit
6c7dc2d72f
4 changed files with 42 additions and 1 deletions
|
@ -153,6 +153,9 @@ static std::map<std::string,RecordFactoryEntry> makeFactory()
|
|||
factory["bhkRigidBody"] = {&construct <bhkRigidBody> , RC_bhkRigidBody };
|
||||
factory["bhkRigidBodyT"] = {&construct <bhkRigidBody> , RC_bhkRigidBodyT };
|
||||
factory["BSLightingShaderProperty"] = {&construct <BSLightingShaderProperty> , RC_BSLightingShaderProperty };
|
||||
factory["NiSortAdjustNode"] = {&construct <NiSortAdjustNode> , RC_NiNode };
|
||||
factory["NiClusterAccumulator"] = {&construct <NiClusterAccumulator> , RC_NiClusterAccumulator };
|
||||
factory["NiAlphaAccumulator"] = {&construct <NiAlphaAccumulator> , RC_NiAlphaAccumulator };
|
||||
return factory;
|
||||
}
|
||||
|
||||
|
|
|
@ -427,5 +427,39 @@ struct NiLODNode : public NiSwitchNode
|
|||
}
|
||||
};
|
||||
|
||||
// Abstract
|
||||
struct NiAccumulator : Record
|
||||
{
|
||||
void read(NIFStream *nif) override {}
|
||||
};
|
||||
|
||||
// Node children sorters
|
||||
struct NiClusterAccumulator : NiAccumulator {};
|
||||
struct NiAlphaAccumulator : NiClusterAccumulator {};
|
||||
|
||||
struct NiSortAdjustNode : NiNode
|
||||
{
|
||||
enum SortingMode
|
||||
{
|
||||
SortingMode_Inherit,
|
||||
SortingMode_Off,
|
||||
SortingMode_Subsort
|
||||
};
|
||||
|
||||
int mMode;
|
||||
NiAccumulatorPtr mSubSorter;
|
||||
void read(NIFStream *nif) override
|
||||
{
|
||||
NiNode::read(nif);
|
||||
mMode = nif->getInt();
|
||||
if (nif->getVersion() <= NIFStream::generateVersion(20,0,0,3))
|
||||
mSubSorter.read(nif);
|
||||
}
|
||||
void post(NIFFile *nif) override
|
||||
{
|
||||
mSubSorter.post(nif);
|
||||
}
|
||||
};
|
||||
|
||||
} // Namespace
|
||||
#endif
|
||||
|
|
|
@ -140,7 +140,9 @@ enum RecordType
|
|||
RC_bhkListShape,
|
||||
RC_bhkRigidBody,
|
||||
RC_bhkRigidBodyT,
|
||||
RC_BSLightingShaderProperty
|
||||
RC_BSLightingShaderProperty,
|
||||
RC_NiClusterAccumulator,
|
||||
RC_NiAlphaAccumulator
|
||||
};
|
||||
|
||||
/// Base class for all records
|
||||
|
|
|
@ -153,6 +153,7 @@ struct bhkWorldObject;
|
|||
struct bhkShape;
|
||||
struct bhkSerializable;
|
||||
struct hkPackedNiTriStripsData;
|
||||
struct NiAccumulator;
|
||||
|
||||
using NodePtr = RecordPtrT<Node>;
|
||||
using ExtraPtr = RecordPtrT<Extra>;
|
||||
|
@ -184,6 +185,7 @@ using NiCollisionObjectPtr = RecordPtrT<NiCollisionObject>;
|
|||
using bhkWorldObjectPtr = RecordPtrT<bhkWorldObject>;
|
||||
using bhkShapePtr = RecordPtrT<bhkShape>;
|
||||
using hkPackedNiTriStripsDataPtr = RecordPtrT<hkPackedNiTriStripsData>;
|
||||
using NiAccumulatorPtr = RecordPtrT<NiAccumulator>;
|
||||
|
||||
using NodeList = RecordListT<Node>;
|
||||
using PropertyList = RecordListT<Property>;
|
||||
|
|
Loading…
Reference in a new issue