mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-14 09:13:09 +00:00
Fix formatting and typos
This commit is contained in:
parent
1b93e646b8
commit
81441bc963
2 changed files with 15 additions and 13 deletions
|
|
@ -176,7 +176,7 @@ namespace Nif
|
||||||
nif->read(mExposureOffset);
|
nif->read(mExposureOffset);
|
||||||
nif->read(mFinalExposureMin);
|
nif->read(mFinalExposureMin);
|
||||||
nif->read(mFinalExposureMax);
|
nif->read(mFinalExposureMax);
|
||||||
};
|
}
|
||||||
|
|
||||||
void BSSPWetnessParams::read(NIFStream* nif)
|
void BSSPWetnessParams::read(NIFStream* nif)
|
||||||
{
|
{
|
||||||
|
|
@ -191,7 +191,7 @@ namespace Nif
|
||||||
nif->skip(4); // Unknown
|
nif->skip(4); // Unknown
|
||||||
if (nif->getBethVersion() >= NIFFile::BethVersion::BETHVER_F76)
|
if (nif->getBethVersion() >= NIFFile::BethVersion::BETHVER_F76)
|
||||||
nif->skip(4); // Unknown
|
nif->skip(4); // Unknown
|
||||||
};
|
}
|
||||||
|
|
||||||
void BSSPMLParallaxParams::read(NIFStream* nif)
|
void BSSPMLParallaxParams::read(NIFStream* nif)
|
||||||
{
|
{
|
||||||
|
|
@ -199,7 +199,7 @@ namespace Nif
|
||||||
nif->read(mRefractionScale);
|
nif->read(mRefractionScale);
|
||||||
nif->read(mInnerLayerTextureScale);
|
nif->read(mInnerLayerTextureScale);
|
||||||
nif->read(mEnvMapScale);
|
nif->read(mEnvMapScale);
|
||||||
};
|
}
|
||||||
|
|
||||||
void BSSPTranslucencyParams::read(NIFStream* nif)
|
void BSSPTranslucencyParams::read(NIFStream* nif)
|
||||||
{
|
{
|
||||||
|
|
@ -208,7 +208,7 @@ namespace Nif
|
||||||
nif->read(mTurbulence);
|
nif->read(mTurbulence);
|
||||||
nif->read(mThickObject);
|
nif->read(mThickObject);
|
||||||
nif->read(mMixAlbedo);
|
nif->read(mMixAlbedo);
|
||||||
};
|
}
|
||||||
|
|
||||||
void BSLightingShaderProperty::read(NIFStream* nif)
|
void BSLightingShaderProperty::read(NIFStream* nif)
|
||||||
{
|
{
|
||||||
|
|
@ -502,7 +502,7 @@ namespace Nif
|
||||||
{
|
{
|
||||||
nif->read(mFlags);
|
nif->read(mFlags);
|
||||||
mEnabled = mFlags & 0x1;
|
mEnabled = mFlags & 0x1;
|
||||||
mFailAction = static_cast<Action>((mFlags>> 1) & 0x7);
|
mFailAction = static_cast<Action>((mFlags >> 1) & 0x7);
|
||||||
mZFailAction = static_cast<Action>((mFlags >> 4) & 0x7);
|
mZFailAction = static_cast<Action>((mFlags >> 4) & 0x7);
|
||||||
mPassAction = static_cast<Action>((mFlags >> 7) & 0x7);
|
mPassAction = static_cast<Action>((mFlags >> 7) & 0x7);
|
||||||
mDrawMode = static_cast<DrawMode>((mFlags >> 10) & 0x3);
|
mDrawMode = static_cast<DrawMode>((mFlags >> 10) & 0x3);
|
||||||
|
|
|
||||||
|
|
@ -1008,8 +1008,9 @@ namespace NifOsg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleTextureControllers(const Nif::NiProperty* texProperty, SceneUtil::CompositeStateSetUpdater* composite,
|
void handleTextureControllers(const Nif::NiProperty* texProperty,
|
||||||
Resource::ImageManager* imageManager, osg::StateSet* stateset, int animflags)
|
SceneUtil::CompositeStateSetUpdater* composite, Resource::ImageManager* imageManager,
|
||||||
|
osg::StateSet* stateset, int animflags)
|
||||||
{
|
{
|
||||||
for (Nif::NiTimeControllerPtr ctrl = texProperty->mController; !ctrl.empty(); ctrl = ctrl->mNext)
|
for (Nif::NiTimeControllerPtr ctrl = texProperty->mController; !ctrl.empty(); ctrl = ctrl->mNext)
|
||||||
{
|
{
|
||||||
|
|
@ -1638,7 +1639,8 @@ namespace NifOsg
|
||||||
case TestFunc::Always:
|
case TestFunc::Always:
|
||||||
return osg::Stencil::ALWAYS;
|
return osg::Stencil::ALWAYS;
|
||||||
default:
|
default:
|
||||||
Log(Debug::Info) << "Unexpected stencil function: " << static_cast<uint32_t>(func) << " in " << mFilename;
|
Log(Debug::Info) << "Unexpected stencil function: " << static_cast<uint32_t>(func) << " in "
|
||||||
|
<< mFilename;
|
||||||
return osg::Stencil::NEVER;
|
return osg::Stencil::NEVER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1661,7 +1663,8 @@ namespace NifOsg
|
||||||
case Action::Invert:
|
case Action::Invert:
|
||||||
return osg::Stencil::INVERT;
|
return osg::Stencil::INVERT;
|
||||||
default:
|
default:
|
||||||
Log(Debug::Info) << "Unexpected stencil operation: " << static_cast<uint32_t>(op) << " in " << mFilename;
|
Log(Debug::Info) << "Unexpected stencil operation: " << static_cast<uint32_t>(op) << " in "
|
||||||
|
<< mFilename;
|
||||||
return osg::Stencil::KEEP;
|
return osg::Stencil::KEEP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2144,8 +2147,8 @@ namespace NifOsg
|
||||||
{
|
{
|
||||||
mHasStencilProperty = true;
|
mHasStencilProperty = true;
|
||||||
osg::ref_ptr<osg::Stencil> stencil = new osg::Stencil;
|
osg::ref_ptr<osg::Stencil> stencil = new osg::Stencil;
|
||||||
stencil->setFunction(getStencilFunction(stencilprop->mTestFunction),
|
stencil->setFunction(getStencilFunction(stencilprop->mTestFunction), stencilprop->mStencilRef,
|
||||||
stencilprop->mStencilRef, stencilprop->mStencilMask);
|
stencilprop->mStencilMask);
|
||||||
stencil->setStencilFailOperation(getStencilOperation(stencilprop->mFailAction));
|
stencil->setStencilFailOperation(getStencilOperation(stencilprop->mFailAction));
|
||||||
stencil->setStencilPassAndDepthFailOperation(getStencilOperation(stencilprop->mZFailAction));
|
stencil->setStencilPassAndDepthFailOperation(getStencilOperation(stencilprop->mZFailAction));
|
||||||
stencil->setStencilPassAndDepthPassOperation(getStencilOperation(stencilprop->mPassAction));
|
stencil->setStencilPassAndDepthPassOperation(getStencilOperation(stencilprop->mPassAction));
|
||||||
|
|
@ -2407,8 +2410,7 @@ namespace NifOsg
|
||||||
{
|
{
|
||||||
const Nif::NiMaterialProperty* matprop = static_cast<const Nif::NiMaterialProperty*>(property);
|
const Nif::NiMaterialProperty* matprop = static_cast<const Nif::NiMaterialProperty*>(property);
|
||||||
|
|
||||||
mat->setDiffuse(
|
mat->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4f(matprop->mDiffuse, matprop->mAlpha));
|
||||||
osg::Material::FRONT_AND_BACK, osg::Vec4f(matprop->mDiffuse, matprop->mAlpha));
|
|
||||||
mat->setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4f(matprop->mAmbient, 1.f));
|
mat->setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4f(matprop->mAmbient, 1.f));
|
||||||
mat->setEmission(osg::Material::FRONT_AND_BACK, osg::Vec4f(matprop->mEmissive, 1.f));
|
mat->setEmission(osg::Material::FRONT_AND_BACK, osg::Vec4f(matprop->mEmissive, 1.f));
|
||||||
emissiveMult = matprop->mEmissiveMult;
|
emissiveMult = matprop->mEmissiveMult;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue