Rename Property->NiProperty

macos_ci_fix
Alexei Kotov 1 year ago
parent defe5ba5e7
commit 1b93e646b8

@ -190,7 +190,7 @@ osg::Group {
property.mTextureSet = nullptr;
property.mController = nullptr;
property.mType = GetParam().mShaderType;
node.mProperties.push_back(Nif::RecordPtrT<Nif::Property>(&property));
node.mProperties.push_back(Nif::RecordPtrT<Nif::NiProperty>(&property));
Nif::NIFFile file("test.nif");
file.mRoots.push_back(&node);
auto result = Loader::load(file, &mImageManager);
@ -218,7 +218,7 @@ osg::Group {
property.mTextureSet = nullptr;
property.mController = nullptr;
property.mType = GetParam().mShaderType;
node.mProperties.push_back(Nif::RecordPtrT<Nif::Property>(&property));
node.mProperties.push_back(Nif::RecordPtrT<Nif::NiProperty>(&property));
Nif::NIFFile file("test.nif");
file.mRoots.push_back(&node);
auto result = Loader::load(file, &mImageManager);

@ -82,7 +82,7 @@ namespace Nif
uint32_t mFlags;
NiTransform mTransform;
osg::Vec3f mVelocity;
PropertyList mProperties;
NiPropertyList mProperties;
BoundingVolume mBounds;
NiCollisionObjectPtr mCollision;
// Parent nodes for the node. Only types derived from NiNode can be parents.

@ -65,7 +65,7 @@ namespace Nif
void NiTexturingProperty::read(NIFStream* nif)
{
Property::read(nif);
NiProperty::read(nif);
if (nif->getVersion() <= NIFFile::NIFVersion::VER_OB_OLD
|| nif->getVersion() >= NIFStream::generateVersion(20, 1, 0, 2))
@ -102,7 +102,7 @@ namespace Nif
void NiTexturingProperty::post(Reader& nif)
{
Property::post(nif);
NiProperty::post(nif);
for (Texture& tex : mTextures)
tex.post(nif);
@ -425,7 +425,7 @@ namespace Nif
void NiAlphaProperty::read(NIFStream* nif)
{
Property::read(nif);
NiProperty::read(nif);
nif->read(mFlags);
nif->read(mThreshold);
@ -433,14 +433,14 @@ namespace Nif
void NiDitherProperty::read(NIFStream* nif)
{
Property::read(nif);
NiProperty::read(nif);
nif->read(mFlags);
}
void NiFogProperty::read(NIFStream* nif)
{
Property::read(nif);
NiProperty::read(nif);
nif->read(mFlags);
nif->read(mFogDepth);
@ -449,7 +449,7 @@ namespace Nif
void NiMaterialProperty::read(NIFStream* nif)
{
Property::read(nif);
NiProperty::read(nif);
if (nif->getVersion() <= NIFFile::NIFVersion::VER_OB_OLD)
nif->read(mFlags);
@ -468,7 +468,7 @@ namespace Nif
void NiShadeProperty::read(NIFStream* nif)
{
Property::read(nif);
NiProperty::read(nif);
if (nif->getBethVersion() <= NIFFile::BethVersion::BETHVER_FO3)
nif->read(mFlags);
@ -476,14 +476,14 @@ namespace Nif
void NiSpecularProperty::read(NIFStream* nif)
{
Property::read(nif);
NiProperty::read(nif);
mEnable = nif->get<uint16_t>() & 1;
}
void NiStencilProperty::read(NIFStream* nif)
{
Property::read(nif);
NiProperty::read(nif);
if (nif->getVersion() <= NIFFile::NIFVersion::VER_OB)
{
@ -514,7 +514,7 @@ namespace Nif
void NiVertexColorProperty::read(NIFStream* nif)
{
Property::read(nif);
NiProperty::read(nif);
nif->read(mFlags);
if (nif->getVersion() <= NIFFile::NIFVersion::VER_OB)
@ -531,14 +531,14 @@ namespace Nif
void NiWireframeProperty::read(NIFStream* nif)
{
Property::read(nif);
NiProperty::read(nif);
mEnable = nif->get<uint16_t>() & 1;
}
void NiZBufferProperty::read(NIFStream* nif)
{
Property::read(nif);
NiProperty::read(nif);
nif->read(mFlags);
if (nif->getVersion() >= NIFStream::generateVersion(4, 1, 0, 12)

@ -6,7 +6,7 @@
namespace Nif
{
struct Property : NiObjectNET
struct NiProperty : NiObjectNET
{
};
@ -30,7 +30,7 @@ namespace Nif
void read(NIFStream* nif);
};
struct NiTexturingProperty : Property
struct NiTexturingProperty : NiProperty
{
enum class ApplyMode : uint32_t
{
@ -86,7 +86,7 @@ namespace Nif
void post(Reader& nif) override;
};
struct NiShadeProperty : Property
struct NiShadeProperty : NiProperty
{
uint16_t mFlags{ 0u };
@ -325,7 +325,7 @@ namespace Nif
bool treeAnim() const { return mShaderFlags2 & BSLSFlag2_TreeAnim; }
};
struct NiAlphaProperty : Property
struct NiAlphaProperty : NiProperty
{
enum Flags
{
@ -376,14 +376,14 @@ namespace Nif
int alphaTestMode() const { return (mFlags >> 10) & 0x7; }
};
struct NiDitherProperty : Property
struct NiDitherProperty : NiProperty
{
uint16_t mFlags;
void read(NIFStream* nif) override;
};
struct NiFogProperty : Property
struct NiFogProperty : NiProperty
{
uint16_t mFlags;
float mFogDepth;
@ -392,7 +392,7 @@ namespace Nif
void read(NIFStream* nif) override;
};
struct NiMaterialProperty : Property
struct NiMaterialProperty : NiProperty
{
uint16_t mFlags{ 0u };
osg::Vec3f mAmbient{ 1.f, 1.f, 1.f };
@ -406,14 +406,14 @@ namespace Nif
void read(NIFStream* nif) override;
};
struct NiSpecularProperty : Property
struct NiSpecularProperty : NiProperty
{
bool mEnable;
void read(NIFStream* nif) override;
};
struct NiStencilProperty : Property
struct NiStencilProperty : NiProperty
{
enum class TestFunc : uint32_t
{
@ -458,7 +458,7 @@ namespace Nif
void read(NIFStream* nif) override;
};
struct NiVertexColorProperty : Property
struct NiVertexColorProperty : NiProperty
{
enum class VertexMode : uint32_t
{
@ -480,14 +480,14 @@ namespace Nif
void read(NIFStream* nif) override;
};
struct NiWireframeProperty : Property
struct NiWireframeProperty : NiProperty
{
bool mEnable;
void read(NIFStream* nif) override;
};
struct NiZBufferProperty : Property
struct NiZBufferProperty : NiProperty
{
uint16_t mFlags;
uint32_t mTestFunction;

@ -112,7 +112,7 @@ namespace Nif
struct NiAVObject;
struct Extra;
struct Property;
struct NiProperty;
struct NiUVData;
struct NiPosData;
struct NiVisData;
@ -191,7 +191,7 @@ namespace Nif
using BSMultiBoundDataPtr = RecordPtrT<BSMultiBoundData>;
using NiAVObjectList = RecordListT<NiAVObject>;
using PropertyList = RecordListT<Property>;
using NiPropertyList = RecordListT<NiProperty>;
using ExtraList = RecordListT<Extra>;
using NiSourceTextureList = RecordListT<NiSourceTexture>;
using NiInterpolatorList = RecordListT<NiInterpolator>;

@ -103,7 +103,7 @@ namespace
// Collect all properties affecting the given drawable that should be handled on drawable basis rather than on the
// node hierarchy above it.
void collectDrawableProperties(
const Nif::NiAVObject* nifNode, const Nif::Parent* parent, std::vector<const Nif::Property*>& out)
const Nif::NiAVObject* nifNode, const Nif::Parent* parent, std::vector<const Nif::NiProperty*>& out)
{
if (parent != nullptr)
collectDrawableProperties(&parent->mNiNode, parent->mParent, out);
@ -959,7 +959,7 @@ namespace NifOsg
}
}
void handleMaterialControllers(const Nif::Property* materialProperty,
void handleMaterialControllers(const Nif::NiProperty* materialProperty,
SceneUtil::CompositeStateSetUpdater* composite, int animflags, const osg::Material* baseMaterial)
{
for (Nif::NiTimeControllerPtr ctrl = materialProperty->mController; !ctrl.empty(); ctrl = ctrl->mNext)
@ -1008,7 +1008,7 @@ namespace NifOsg
}
}
void handleTextureControllers(const Nif::Property* texProperty, SceneUtil::CompositeStateSetUpdater* composite,
void handleTextureControllers(const Nif::NiProperty* texProperty, SceneUtil::CompositeStateSetUpdater* composite,
Resource::ImageManager* imageManager, osg::StateSet* stateset, int animflags)
{
for (Nif::NiTimeControllerPtr ctrl = texProperty->mController; !ctrl.empty(); ctrl = ctrl->mNext)
@ -1316,7 +1316,7 @@ namespace NifOsg
// localToWorldMatrix for transforming to particle space
handleParticlePrograms(partctrl->mModifier, partctrl->mCollider, parentNode, partsys.get(), rf);
std::vector<const Nif::Property*> drawableProps;
std::vector<const Nif::NiProperty*> drawableProps;
collectDrawableProperties(nifNode, parent, drawableProps);
applyDrawableProperties(parentNode, drawableProps, composite, true, animflags);
@ -1462,7 +1462,7 @@ namespace NifOsg
// - if there are no vertex colors, we need to disable colorMode.
// - there are 3 "overlapping" nif properties that all affect the osg::Material, handling them
// above the actual renderable would be tedious.
std::vector<const Nif::Property*> drawableProps;
std::vector<const Nif::NiProperty*> drawableProps;
collectDrawableProperties(nifNode, parent, drawableProps);
applyDrawableProperties(parentNode, drawableProps, composite, !niGeometryData->mColors.empty(), animflags);
}
@ -2107,7 +2107,7 @@ namespace NifOsg
return "bs/default";
}
void handleProperty(const Nif::Property* property, osg::Node* node,
void handleProperty(const Nif::NiProperty* property, osg::Node* node,
SceneUtil::CompositeStateSetUpdater* composite, Resource::ImageManager* imageManager,
std::vector<unsigned int>& boundTextures, int animflags, bool hasStencilProperty)
{
@ -2366,7 +2366,7 @@ namespace NifOsg
return *found;
}
void applyDrawableProperties(osg::Node* node, const std::vector<const Nif::Property*>& properties,
void applyDrawableProperties(osg::Node* node, const std::vector<const Nif::NiProperty*>& properties,
SceneUtil::CompositeStateSetUpdater* composite, bool hasVertexColors, int animflags)
{
// Specular lighting is enabled by default, but there's a quirk...
@ -2391,7 +2391,7 @@ namespace NifOsg
float emissiveMult = 1.f;
float specStrength = 1.f;
for (const Nif::Property* property : properties)
for (const Nif::NiProperty* property : properties)
{
switch (property->recType)
{

Loading…
Cancel
Save