mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Issue #225: Initialize class members in constructor.
This commit is contained in:
parent
6d6ed909bf
commit
be94da1527
2 changed files with 41 additions and 5 deletions
|
@ -254,7 +254,7 @@ void SkyManager::ModVertexAlpha(Entity* ent, unsigned int meshType)
|
|||
// Get a pointer to the vertex colour
|
||||
ves_diffuse->baseVertexPointerToElement( pData, ¤tVertex );
|
||||
|
||||
unsigned char alpha;
|
||||
unsigned char alpha=0;
|
||||
if (meshType == 0) alpha = i%2 ? 0 : 255; // this is a cylinder, so every second vertex belongs to the bottom-most row
|
||||
else if (meshType == 1)
|
||||
{
|
||||
|
@ -292,10 +292,40 @@ void SkyManager::ModVertexAlpha(Entity* ent, unsigned int meshType)
|
|||
ent->getMesh()->getSubMesh(0)->vertexData->vertexBufferBinding->getBuffer(ves_diffuse->getSource())->unlock();
|
||||
}
|
||||
|
||||
SkyManager::SkyManager (SceneNode* pMwRoot, Camera* pCamera, MWWorld::Environment* env) :
|
||||
mGlareFade(0), mGlareEnabled(false)
|
||||
SkyManager::SkyManager (SceneNode* pMwRoot, Camera* pCamera, MWWorld::Environment* env)
|
||||
: mEnvironment(env)
|
||||
, mHour(0.0f)
|
||||
, mDay(0)
|
||||
, mMonth(0)
|
||||
, mSun(NULL)
|
||||
, mSunGlare(NULL)
|
||||
, mMasser(NULL)
|
||||
, mSecunda(NULL)
|
||||
, mViewport(NULL)
|
||||
, mRootNode(NULL)
|
||||
, mSceneMgr(NULL)
|
||||
, mAtmosphereDay(NULL)
|
||||
, mAtmosphereNight(NULL)
|
||||
, mCloudMaterial()
|
||||
, mAtmosphereMaterial()
|
||||
, mCloudFragmentShader()
|
||||
, mClouds()
|
||||
, mNextClouds()
|
||||
, mCloudBlendFactor(0.0f)
|
||||
, mCloudOpacity(0.0f)
|
||||
, mCloudSpeed(0.0f)
|
||||
, mStarsOpacity(0.0f)
|
||||
, mThunderOverlay(NULL)
|
||||
, mThunderTextureUnit(NULL)
|
||||
, mRemainingTransitionTime(0.0f)
|
||||
, mGlareFade(0.0f)
|
||||
, mEnabled(true)
|
||||
, mGlareEnabled(true)
|
||||
, mSunEnabled(true)
|
||||
, mMasserEnabled(true)
|
||||
, mSecundaEnabled(true)
|
||||
{
|
||||
mEnvironment = env;
|
||||
|
||||
mViewport = pCamera->getViewport();
|
||||
mSceneMgr = pMwRoot->getCreator();
|
||||
mRootNode = pCamera->getParentSceneNode()->createChildSceneNode();
|
||||
|
|
|
@ -213,7 +213,13 @@ void MpgSnd_Decoder::rewind()
|
|||
}
|
||||
}
|
||||
|
||||
MpgSnd_Decoder::MpgSnd_Decoder() : mSndFile(NULL), mMpgFile(NULL)
|
||||
MpgSnd_Decoder::MpgSnd_Decoder()
|
||||
: mSndInfo()
|
||||
, mSndFile(NULL)
|
||||
, mMpgFile(NULL)
|
||||
, mDataStream()
|
||||
, mChanConfig(ChannelConfig_Stereo)
|
||||
, mSampleRate(0)
|
||||
{
|
||||
static bool initdone = false;
|
||||
if(!initdone)
|
||||
|
|
Loading…
Reference in a new issue