Read a few more NIF types

BSXFlags, NiTransformData, BSBound, BSFadeNode, bhkBlendController
pull/593/head
Alexei Dobrohotov 4 years ago
parent 6844800124
commit 1d07361f08

@ -228,4 +228,10 @@ namespace Nif
mSources.post(nif);
}
void bhkBlendController::read(NIFStream *nif)
{
Controller::read(nif);
nif->getUInt(); // Zero
}
}

@ -183,5 +183,10 @@ public:
void post(NIFFile *nif) override;
};
struct bhkBlendController : public Controller
{
void read(NIFStream *nif) override;
};
} // Namespace
#endif

@ -80,5 +80,11 @@ void NiFloatsExtraData::read(NIFStream *nif)
nif->getFloats(data, num);
}
void BSBound::read(NIFStream *nif)
{
Extra::read(nif);
center = nif->getVector3();
halfExtents = nif->getVector3();
}
}

@ -109,5 +109,12 @@ struct NiFloatsExtraData : public Extra
void read(NIFStream *nif) override;
};
struct BSBound : public Extra
{
osg::Vec3f center, halfExtents;
void read(NIFStream *nif) override;
};
} // Namespace
#endif

@ -119,6 +119,11 @@ static std::map<std::string,RecordFactoryEntry> makeFactory()
factory["NiStringPalette"] = {&construct <NiStringPalette> , RC_NiStringPalette };
factory["NiBoolData"] = {&construct <NiBoolData> , RC_NiBoolData };
factory["NiSkinPartition"] = {&construct <NiSkinPartition> , RC_NiSkinPartition };
factory["BSXFlags"] = {&construct <NiIntegerExtraData> , RC_BSXFlags };
factory["BSBound"] = {&construct <BSBound> , RC_BSBound };
factory["NiTransformData"] = {&construct <NiKeyframeData> , RC_NiKeyframeData };
factory["BSFadeNode"] = {&construct <NiNode> , RC_NiNode };
factory["bhkBlendController"] = {&construct <bhkBlendController> , RC_bhkBlendController };
return factory;
}

@ -112,7 +112,10 @@ enum RecordType
RC_NiFloatsExtraData,
RC_NiStringPalette,
RC_NiBoolData,
RC_NiSkinPartition
RC_NiSkinPartition,
RC_BSXFlags,
RC_BSBound,
RC_bhkBlendController
};
/// Base class for all records

Loading…
Cancel
Save