mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 06:06:39 +00:00
Read BSWaterShaderProperty and BSSkyShaderProperty
This commit is contained in:
parent
6204a83a2b
commit
f507e17807
4 changed files with 64 additions and 12 deletions
|
@ -393,6 +393,8 @@ namespace Nif
|
|||
{ "BSDistantTreeShaderProperty", &construct<BSShaderProperty, RC_BSDistantTreeShaderProperty> },
|
||||
{ "BSLightingShaderProperty", &construct<BSLightingShaderProperty, RC_BSLightingShaderProperty> },
|
||||
{ "BSEffectShaderProperty", &construct<BSEffectShaderProperty, RC_BSEffectShaderProperty> },
|
||||
{ "BSSkyShaderProperty", &construct<BSSkyShaderProperty, RC_BSSkyShaderProperty> },
|
||||
{ "BSWaterShaderProperty", &construct<BSWaterShaderProperty, RC_BSWaterShaderProperty> },
|
||||
{ "DistantLODShaderProperty", &construct<BSShaderProperty, RC_DistantLODShaderProperty> },
|
||||
{ "HairShaderProperty", &construct<BSShaderProperty, RC_HairShaderProperty> },
|
||||
{ "Lighting30ShaderProperty", &construct<BSShaderPPLightingProperty, RC_BSShaderPPLightingProperty> },
|
||||
|
|
|
@ -232,7 +232,7 @@ namespace Nif
|
|||
BSShaderLightingProperty::read(nif);
|
||||
|
||||
mFilename = nif->getSizedString();
|
||||
mSkyObjectType = static_cast<ObjectType>(nif->get<uint32_t>());
|
||||
mSkyObjectType = static_cast<SkyObjectType>(nif->get<uint32_t>());
|
||||
}
|
||||
|
||||
void TallGrassShaderProperty::read(NIFStream* nif)
|
||||
|
@ -455,6 +455,21 @@ namespace Nif
|
|||
}
|
||||
}
|
||||
|
||||
void BSSkyShaderProperty::read(NIFStream* nif)
|
||||
{
|
||||
BSShaderProperty::read(nif);
|
||||
|
||||
mFilename = nif->getSizedString();
|
||||
mSkyObjectType = static_cast<SkyObjectType>(nif->get<uint32_t>());
|
||||
}
|
||||
|
||||
void BSWaterShaderProperty::read(NIFStream* nif)
|
||||
{
|
||||
BSShaderProperty::read(nif);
|
||||
|
||||
nif->read(mFlags);
|
||||
}
|
||||
|
||||
void NiAlphaProperty::read(NIFStream* nif)
|
||||
{
|
||||
NiProperty::read(nif);
|
||||
|
|
|
@ -171,20 +171,20 @@ namespace Nif
|
|||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
enum class SkyObjectType : uint32_t
|
||||
{
|
||||
SkyTexture = 0,
|
||||
SkySunglare = 1,
|
||||
Sky = 2,
|
||||
SkyClouds = 3,
|
||||
SkyStars = 5,
|
||||
SkyMoonStarsMask = 7,
|
||||
};
|
||||
|
||||
struct SkyShaderProperty : BSShaderLightingProperty
|
||||
{
|
||||
enum class ObjectType : uint32_t
|
||||
{
|
||||
SkyTexture = 0,
|
||||
SkySunglare = 1,
|
||||
Sky = 2,
|
||||
SkyClouds = 3,
|
||||
SkyStars = 5,
|
||||
SkyMoonStarsMask = 7,
|
||||
};
|
||||
|
||||
std::string mFilename;
|
||||
ObjectType mSkyObjectType;
|
||||
SkyObjectType mSkyObjectType;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
@ -358,6 +358,39 @@ namespace Nif
|
|||
bool treeAnim() const { return mShaderFlags2 & BSLSFlag2_TreeAnim; }
|
||||
};
|
||||
|
||||
struct BSSkyShaderProperty : BSShaderProperty
|
||||
{
|
||||
std::string mFilename;
|
||||
SkyObjectType mSkyObjectType;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct BSWaterShaderProperty : BSShaderProperty
|
||||
{
|
||||
enum Flags
|
||||
{
|
||||
Flag_Displacement = 0x0001,
|
||||
Flag_LOD = 0x0002,
|
||||
Flag_Depth = 0x0004,
|
||||
Flag_ActorInWater = 0x0008,
|
||||
Flag_ActorInWaterIsMoving = 0x0010,
|
||||
Flag_Underwater = 0x0020,
|
||||
Flag_Reflections = 0x0040,
|
||||
Flag_Refractions = 0x0080,
|
||||
Flag_VertexUV = 0x0100,
|
||||
Flag_VertexAlphaDepth = 0x0200,
|
||||
Flag_Procedural = 0x0400,
|
||||
Flag_Fog = 0x0800,
|
||||
Flag_UpdateConstants = 0x1000,
|
||||
Flag_CubeMap = 0x2000,
|
||||
};
|
||||
|
||||
uint32_t mFlags;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct NiAlphaProperty : NiProperty
|
||||
{
|
||||
enum Flags
|
||||
|
|
|
@ -100,8 +100,10 @@ namespace Nif
|
|||
RC_BSShaderPPLightingProperty,
|
||||
RC_BSShaderProperty,
|
||||
RC_BSShaderTextureSet,
|
||||
RC_BSSkyShaderProperty,
|
||||
RC_BSTriShape,
|
||||
RC_BSWArray,
|
||||
RC_BSWaterShaderProperty,
|
||||
RC_BSXFlags,
|
||||
RC_DistantLODShaderProperty,
|
||||
RC_HairShaderProperty,
|
||||
|
|
Loading…
Reference in a new issue