mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-25 16:43:33 +00:00
Load NiSortAdjustNode and NiAccumulators
This commit is contained in:
parent
914993d6ae
commit
63ea57e9cf
@ -153,6 +153,9 @@ static std::map<std::string,RecordFactoryEntry> makeFactory()
|
|||||||
factory["bhkRigidBody"] = {&construct <bhkRigidBody> , RC_bhkRigidBody };
|
factory["bhkRigidBody"] = {&construct <bhkRigidBody> , RC_bhkRigidBody };
|
||||||
factory["bhkRigidBodyT"] = {&construct <bhkRigidBody> , RC_bhkRigidBodyT };
|
factory["bhkRigidBodyT"] = {&construct <bhkRigidBody> , RC_bhkRigidBodyT };
|
||||||
factory["BSLightingShaderProperty"] = {&construct <BSLightingShaderProperty> , RC_BSLightingShaderProperty };
|
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;
|
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
|
} // Namespace
|
||||||
#endif
|
#endif
|
||||||
|
@ -140,7 +140,9 @@ enum RecordType
|
|||||||
RC_bhkListShape,
|
RC_bhkListShape,
|
||||||
RC_bhkRigidBody,
|
RC_bhkRigidBody,
|
||||||
RC_bhkRigidBodyT,
|
RC_bhkRigidBodyT,
|
||||||
RC_BSLightingShaderProperty
|
RC_BSLightingShaderProperty,
|
||||||
|
RC_NiClusterAccumulator,
|
||||||
|
RC_NiAlphaAccumulator
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Base class for all records
|
/// Base class for all records
|
||||||
|
@ -153,6 +153,7 @@ struct bhkWorldObject;
|
|||||||
struct bhkShape;
|
struct bhkShape;
|
||||||
struct bhkSerializable;
|
struct bhkSerializable;
|
||||||
struct hkPackedNiTriStripsData;
|
struct hkPackedNiTriStripsData;
|
||||||
|
struct NiAccumulator;
|
||||||
|
|
||||||
using NodePtr = RecordPtrT<Node>;
|
using NodePtr = RecordPtrT<Node>;
|
||||||
using ExtraPtr = RecordPtrT<Extra>;
|
using ExtraPtr = RecordPtrT<Extra>;
|
||||||
@ -184,6 +185,7 @@ using NiCollisionObjectPtr = RecordPtrT<NiCollisionObject>;
|
|||||||
using bhkWorldObjectPtr = RecordPtrT<bhkWorldObject>;
|
using bhkWorldObjectPtr = RecordPtrT<bhkWorldObject>;
|
||||||
using bhkShapePtr = RecordPtrT<bhkShape>;
|
using bhkShapePtr = RecordPtrT<bhkShape>;
|
||||||
using hkPackedNiTriStripsDataPtr = RecordPtrT<hkPackedNiTriStripsData>;
|
using hkPackedNiTriStripsDataPtr = RecordPtrT<hkPackedNiTriStripsData>;
|
||||||
|
using NiAccumulatorPtr = RecordPtrT<NiAccumulator>;
|
||||||
|
|
||||||
using NodeList = RecordListT<Node>;
|
using NodeList = RecordListT<Node>;
|
||||||
using PropertyList = RecordListT<Property>;
|
using PropertyList = RecordListT<Property>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user