diff options
Diffstat (limited to 'src/client/sky.cpp')
-rw-r--r-- | src/client/sky.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/client/sky.cpp b/src/client/sky.cpp index 3a40321dd..2512a0e23 100644 --- a/src/client/sky.cpp +++ b/src/client/sky.cpp @@ -81,13 +81,13 @@ Sky::Sky(s32 id, ITextureSource *tsrc, IShaderSource *ssrc) : // Ensures that sun and moon textures and tonemaps are correct. setSkyDefaults(); m_sun_texture = tsrc->isKnownSourceImage(m_sun_params.texture) ? - tsrc->getTextureForMesh(m_sun_params.texture) : NULL; + tsrc->getTextureForMesh(m_sun_params.texture) : nullptr; m_moon_texture = tsrc->isKnownSourceImage(m_moon_params.texture) ? - tsrc->getTextureForMesh(m_moon_params.texture) : NULL; + tsrc->getTextureForMesh(m_moon_params.texture) : nullptr; m_sun_tonemap = tsrc->isKnownSourceImage(m_sun_params.tonemap) ? - tsrc->getTexture(m_sun_params.tonemap) : NULL; + tsrc->getTexture(m_sun_params.tonemap) : nullptr; m_moon_tonemap = tsrc->isKnownSourceImage(m_moon_params.tonemap) ? - tsrc->getTexture(m_moon_params.tonemap) : NULL; + tsrc->getTexture(m_moon_params.tonemap) : nullptr; if (m_sun_texture) { m_materials[3] = baseMaterial(); @@ -743,14 +743,14 @@ void Sky::place_sky_body( } } -void Sky::setSunTexture(std::string sun_texture, - std::string sun_tonemap, ITextureSource *tsrc) +void Sky::setSunTexture(const std::string &sun_texture, + const std::string &sun_tonemap, ITextureSource *tsrc) { // Ignore matching textures (with modifiers) entirely, // but lets at least update the tonemap before hand. m_sun_params.tonemap = sun_tonemap; m_sun_tonemap = tsrc->isKnownSourceImage(m_sun_params.tonemap) ? - tsrc->getTexture(m_sun_params.tonemap) : NULL; + tsrc->getTexture(m_sun_params.tonemap) : nullptr; m_materials[3].Lighting = !!m_sun_tonemap; if (m_sun_params.texture == sun_texture) @@ -779,7 +779,7 @@ void Sky::setSunTexture(std::string sun_texture, } } -void Sky::setSunriseTexture(std::string sunglow_texture, +void Sky::setSunriseTexture(const std::string &sunglow_texture, ITextureSource* tsrc) { // Ignore matching textures (with modifiers) entirely. @@ -791,14 +791,14 @@ void Sky::setSunriseTexture(std::string sunglow_texture, ); } -void Sky::setMoonTexture(std::string moon_texture, - std::string moon_tonemap, ITextureSource *tsrc) +void Sky::setMoonTexture(const std::string &moon_texture, + const std::string &moon_tonemap, ITextureSource *tsrc) { // Ignore matching textures (with modifiers) entirely, // but lets at least update the tonemap before hand. m_moon_params.tonemap = moon_tonemap; m_moon_tonemap = tsrc->isKnownSourceImage(m_moon_params.tonemap) ? - tsrc->getTexture(m_moon_params.tonemap) : NULL; + tsrc->getTexture(m_moon_params.tonemap) : nullptr; m_materials[4].Lighting = !!m_moon_tonemap; if (m_moon_params.texture == moon_texture) @@ -892,7 +892,7 @@ void Sky::setSkyColors(const SkyColor &sky_color) } void Sky::setHorizonTint(video::SColor sun_tint, video::SColor moon_tint, - std::string use_sun_tint) + const std::string &use_sun_tint) { // Change sun and moon tinting: m_sky_params.fog_sun_tint = sun_tint; @@ -906,7 +906,7 @@ void Sky::setHorizonTint(video::SColor sun_tint, video::SColor moon_tint, m_default_tint = true; } -void Sky::addTextureToSkybox(std::string texture, int material_id, +void Sky::addTextureToSkybox(const std::string &texture, int material_id, ITextureSource *tsrc) { // Sanity check for more than six textures. |