1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

Read BSStripPSysData

This commit is contained in:
Alexei Kotov 2023-09-22 02:19:32 +03:00
parent a8946e06f6
commit eaa82ba5c6
5 changed files with 37 additions and 2 deletions

View File

@ -14,7 +14,19 @@ namespace Nif
nif->read(mGroupId);
nif->read(mNumVertices);
bool hasData = recType != RC_NiPSysData || nif->getBethVersion() < NIFFile::BethVersion::BETHVER_FO3;
bool isPSysData = false;
switch (recType)
{
case RC_NiPSysData:
// case RC_NiMeshPSysData:
case RC_BSStripPSysData:
isPSysData = true;
break;
default:
break;
}
bool hasData = !isPSysData || nif->getBethVersion() < NIFFile::BethVersion::BETHVER_FO3;
if (nif->getVersion() >= NIFStream::generateVersion(10, 1, 0, 0))
{

View File

@ -283,7 +283,8 @@ namespace Nif
{ "NiPSysData", &construct<NiPSysData, RC_NiPSysData> },
// Geometry, Bethesda
{ "BSStripParticleSystem", &construct<NiParticleSystem, RC_NiParticleSystem> },
{ "BSStripParticleSystem", &construct<NiParticleSystem, RC_BSStripParticleSystem> },
{ "BSStripPSysData", &construct<BSStripPSysData, RC_BSStripPSysData> },
// Modifiers, 4.0.0.2
{ "NiGravity", &construct<NiGravity, RC_NiGravity> },

View File

@ -215,6 +215,16 @@ namespace Nif
}
}
void BSStripPSysData::read(NIFStream* nif)
{
NiPSysData::read(nif);
nif->read(mMaxPointCount);
nif->read(mStartCapSize);
nif->read(mEndCapSize);
nif->read(mDoZPrepass);
}
void NiPSysModifier::read(NIFStream* nif)
{
nif->read(mName);

View File

@ -138,6 +138,16 @@ namespace Nif
void read(NIFStream* nif) override;
};
struct BSStripPSysData : NiPSysData
{
uint16_t mMaxPointCount;
float mStartCapSize;
float mEndCapSize;
bool mDoZPrepass;
void read(NIFStream* nif) override;
};
// Abstract
struct NiPSysModifier : Record
{

View File

@ -94,6 +94,8 @@ namespace Nif
RC_BSMultiBoundSphere,
RC_BSNiAlphaPropertyTestRefController,
RC_BSPackedAdditionalGeometryData,
RC_BSStripParticleSystem,
RC_BSStripPSysData,
RC_BSRefractionFirePeriodController,
RC_BSRefractionStrengthController,
RC_BSShaderNoLightingProperty,