Read more FO4 extra data records

macos_ci_fix
Alexei Kotov 1 year ago
parent 94b286a088
commit 291d0de79e

@ -136,4 +136,30 @@ namespace Nif
nif->readVector(mData, nif->get<uint32_t>()); 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 NiFloatsExtraData = TypedVectorExtra<float>;
using NiIntegersExtraData = TypedVectorExtra<uint32_t>; using NiIntegersExtraData = TypedVectorExtra<uint32_t>;
using BSEyeCenterExtraData = TypedVectorExtra<float>;
using BSPositionData = TypedVectorExtra<Misc::float16_t>;
using BSWArray = TypedVectorExtra<int32_t>; using BSWArray = TypedVectorExtra<int32_t>;
// Distinct from NiBinaryExtraData, uses mRecordSize as its size // Distinct from NiBinaryExtraData, uses mRecordSize as its size
@ -170,5 +172,32 @@ namespace Nif
void read(NIFStream* nif) override; 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 #endif

@ -246,11 +246,15 @@ namespace Nif
{ "BSBehaviorGraphExtraData", &construct<BSBehaviorGraphExtraData, RC_BSBehaviorGraphExtraData> }, { "BSBehaviorGraphExtraData", &construct<BSBehaviorGraphExtraData, RC_BSBehaviorGraphExtraData> },
{ "BSBoneLODExtraData", &construct<BSBoneLODExtraData, RC_BSBoneLODExtraData> }, { "BSBoneLODExtraData", &construct<BSBoneLODExtraData, RC_BSBoneLODExtraData> },
{ "BSClothExtraData", &construct<BSClothExtraData, RC_BSClothExtraData> }, { "BSClothExtraData", &construct<BSClothExtraData, RC_BSClothExtraData> },
{ "BSConnectPoint::Children", &construct<BSConnectPoint::Children, RC_BSConnectPointChildren> },
{ "BSConnectPoint::Parents", &construct<BSConnectPoint::Parents, RC_BSConnectPointParents> },
{ "BSDecalPlacementVectorExtraData", { "BSDecalPlacementVectorExtraData",
&construct<BSDecalPlacementVectorExtraData, RC_BSDecalPlacementVectorExtraData> }, &construct<BSDecalPlacementVectorExtraData, RC_BSDecalPlacementVectorExtraData> },
{ "BSDistantObjectExtraData", &construct<BSDistantObjectExtraData, RC_BSDistantObjectExtraData> }, { "BSDistantObjectExtraData", &construct<BSDistantObjectExtraData, RC_BSDistantObjectExtraData> },
{ "BSDistantObjectLargeRefExtraData", { "BSDistantObjectLargeRefExtraData",
&construct<BSDistantObjectLargeRefExtraData, RC_BSDistantObjectLargeRefExtraData> }, &construct<BSDistantObjectLargeRefExtraData, RC_BSDistantObjectLargeRefExtraData> },
{ "BSEyeCenterExtraData", &construct<BSEyeCenterExtraData, RC_BSEyeCenterExtraData> },
{ "BSPositionData", &construct<BSPositionData, RC_BSPositionData> },
{ "BSWArray", &construct<BSWArray, RC_BSWArray> }, { "BSWArray", &construct<BSWArray, RC_BSWArray> },
{ "BSXFlags", &construct<NiIntegerExtraData, RC_BSXFlags> }, { "BSXFlags", &construct<NiIntegerExtraData, RC_BSXFlags> },

@ -77,6 +77,8 @@ namespace Nif
RC_BSBound, RC_BSBound,
RC_BSBoneLODExtraData, RC_BSBoneLODExtraData,
RC_BSClothExtraData, RC_BSClothExtraData,
RC_BSConnectPointChildren,
RC_BSConnectPointParents,
RC_BSDecalPlacementVectorExtraData, RC_BSDecalPlacementVectorExtraData,
RC_BSDistantTreeShaderProperty, RC_BSDistantTreeShaderProperty,
RC_BSDynamicTriShape, RC_BSDynamicTriShape,
@ -87,6 +89,7 @@ namespace Nif
RC_BSEffectShaderPropertyColorController, RC_BSEffectShaderPropertyColorController,
RC_BSEffectShaderPropertyFloatController, RC_BSEffectShaderPropertyFloatController,
RC_BSExtraData, RC_BSExtraData,
RC_BSEyeCenterExtraData,
RC_BSFrustumFOVController, RC_BSFrustumFOVController,
RC_BSFurnitureMarker, RC_BSFurnitureMarker,
RC_BSInvMarker, RC_BSInvMarker,
@ -105,6 +108,7 @@ namespace Nif
RC_BSNiAlphaPropertyTestRefController, RC_BSNiAlphaPropertyTestRefController,
RC_BSPackedAdditionalGeometryData, RC_BSPackedAdditionalGeometryData,
RC_BSParentVelocityModifier, RC_BSParentVelocityModifier,
RC_BSPositionData,
RC_BSProceduralLightningController, RC_BSProceduralLightningController,
RC_BSPSysArrayEmitter, RC_BSPSysArrayEmitter,
RC_BSPSysHavokUpdateModifier, RC_BSPSysHavokUpdateModifier,

Loading…
Cancel
Save