mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Read more FO4 extra data records
This commit is contained in:
parent
94b286a088
commit
291d0de79e
@ -136,4 +136,30 @@ namespace Nif
|
||||
nif->readVector(mData, nif->get<uint32_t>());
|
||||
}
|
||||
|
||||
void BSConnectPoint::Point::read(NIFStream* nif)
|
||||
{
|
||||
mParent = nif->getSizedString();
|
||||
mName = nif->getSizedString();
|
||||
nif->read(mTransform.mRotation);
|
||||
nif->read(mTransform.mTranslation);
|
||||
nif->read(mTransform.mScale);
|
||||
}
|
||||
|
||||
void BSConnectPoint::Parents::read(NIFStream* nif)
|
||||
{
|
||||
NiExtraData::read(nif);
|
||||
|
||||
mPoints.resize(nif->get<uint32_t>());
|
||||
for (Point& point : mPoints)
|
||||
point.read(nif);
|
||||
}
|
||||
|
||||
void BSConnectPoint::Children::read(NIFStream* nif)
|
||||
{
|
||||
NiExtraData::read(nif);
|
||||
|
||||
nif->read(mSkinned);
|
||||
nif->getSizedStrings(mPointNames, nif->get<uint32_t>());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -45,6 +45,8 @@ namespace Nif
|
||||
using NiFloatsExtraData = TypedVectorExtra<float>;
|
||||
using NiIntegersExtraData = TypedVectorExtra<uint32_t>;
|
||||
|
||||
using BSEyeCenterExtraData = TypedVectorExtra<float>;
|
||||
using BSPositionData = TypedVectorExtra<Misc::float16_t>;
|
||||
using BSWArray = TypedVectorExtra<int32_t>;
|
||||
|
||||
// Distinct from NiBinaryExtraData, uses mRecordSize as its size
|
||||
@ -170,5 +172,32 @@ namespace Nif
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct BSConnectPoint
|
||||
{
|
||||
struct Point
|
||||
{
|
||||
std::string mParent;
|
||||
std::string mName;
|
||||
NiQuatTransform mTransform;
|
||||
|
||||
void read(NIFStream* nif);
|
||||
};
|
||||
|
||||
struct Parents : NiExtraData
|
||||
{
|
||||
std::vector<Point> mPoints;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct Children : NiExtraData
|
||||
{
|
||||
bool mSkinned;
|
||||
std::vector<std::string> mPointNames;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -246,11 +246,15 @@ namespace Nif
|
||||
{ "BSBehaviorGraphExtraData", &construct<BSBehaviorGraphExtraData, RC_BSBehaviorGraphExtraData> },
|
||||
{ "BSBoneLODExtraData", &construct<BSBoneLODExtraData, RC_BSBoneLODExtraData> },
|
||||
{ "BSClothExtraData", &construct<BSClothExtraData, RC_BSClothExtraData> },
|
||||
{ "BSConnectPoint::Children", &construct<BSConnectPoint::Children, RC_BSConnectPointChildren> },
|
||||
{ "BSConnectPoint::Parents", &construct<BSConnectPoint::Parents, RC_BSConnectPointParents> },
|
||||
{ "BSDecalPlacementVectorExtraData",
|
||||
&construct<BSDecalPlacementVectorExtraData, RC_BSDecalPlacementVectorExtraData> },
|
||||
{ "BSDistantObjectExtraData", &construct<BSDistantObjectExtraData, RC_BSDistantObjectExtraData> },
|
||||
{ "BSDistantObjectLargeRefExtraData",
|
||||
&construct<BSDistantObjectLargeRefExtraData, RC_BSDistantObjectLargeRefExtraData> },
|
||||
{ "BSEyeCenterExtraData", &construct<BSEyeCenterExtraData, RC_BSEyeCenterExtraData> },
|
||||
{ "BSPositionData", &construct<BSPositionData, RC_BSPositionData> },
|
||||
{ "BSWArray", &construct<BSWArray, RC_BSWArray> },
|
||||
{ "BSXFlags", &construct<NiIntegerExtraData, RC_BSXFlags> },
|
||||
|
||||
|
@ -77,6 +77,8 @@ namespace Nif
|
||||
RC_BSBound,
|
||||
RC_BSBoneLODExtraData,
|
||||
RC_BSClothExtraData,
|
||||
RC_BSConnectPointChildren,
|
||||
RC_BSConnectPointParents,
|
||||
RC_BSDecalPlacementVectorExtraData,
|
||||
RC_BSDistantTreeShaderProperty,
|
||||
RC_BSDynamicTriShape,
|
||||
@ -87,6 +89,7 @@ namespace Nif
|
||||
RC_BSEffectShaderPropertyColorController,
|
||||
RC_BSEffectShaderPropertyFloatController,
|
||||
RC_BSExtraData,
|
||||
RC_BSEyeCenterExtraData,
|
||||
RC_BSFrustumFOVController,
|
||||
RC_BSFurnitureMarker,
|
||||
RC_BSInvMarker,
|
||||
@ -105,6 +108,7 @@ namespace Nif
|
||||
RC_BSNiAlphaPropertyTestRefController,
|
||||
RC_BSPackedAdditionalGeometryData,
|
||||
RC_BSParentVelocityModifier,
|
||||
RC_BSPositionData,
|
||||
RC_BSProceduralLightningController,
|
||||
RC_BSPSysArrayEmitter,
|
||||
RC_BSPSysHavokUpdateModifier,
|
||||
|
Loading…
Reference in New Issue
Block a user