diff options
Diffstat (limited to 'src/client/sky.h')
-rw-r--r-- | src/client/sky.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/client/sky.h b/src/client/sky.h index 342a97596..dc7da5021 100644 --- a/src/client/sky.h +++ b/src/client/sky.h @@ -65,15 +65,15 @@ public: } void setSunVisible(bool sun_visible) { m_sun_params.visible = sun_visible; } - void setSunTexture(std::string sun_texture, - std::string sun_tonemap, ITextureSource *tsrc); + void setSunTexture(const std::string &sun_texture, + const std::string &sun_tonemap, ITextureSource *tsrc); void setSunScale(f32 sun_scale) { m_sun_params.scale = sun_scale; } void setSunriseVisible(bool glow_visible) { m_sun_params.sunrise_visible = glow_visible; } - void setSunriseTexture(std::string sunglow_texture, ITextureSource* tsrc); + void setSunriseTexture(const std::string &sunglow_texture, ITextureSource* tsrc); void setMoonVisible(bool moon_visible) { m_moon_params.visible = moon_visible; } - void setMoonTexture(std::string moon_texture, - std::string moon_tonemap, ITextureSource *tsrc); + void setMoonTexture(const std::string &moon_texture, + const std::string &moon_tonemap, ITextureSource *tsrc); void setMoonScale(f32 moon_scale) { m_moon_params.scale = moon_scale; } void setStarsVisible(bool stars_visible) { m_star_params.visible = stars_visible; } @@ -87,21 +87,21 @@ public: void setVisible(bool visible) { m_visible = visible; } // Set only from set_sky API void setCloudsEnabled(bool clouds_enabled) { m_clouds_enabled = clouds_enabled; } - void setFallbackBgColor(const video::SColor &fallback_bg_color) + void setFallbackBgColor(video::SColor fallback_bg_color) { m_fallback_bg_color = fallback_bg_color; } - void overrideColors(const video::SColor &bgcolor, const video::SColor &skycolor) + void overrideColors(video::SColor bgcolor, video::SColor skycolor) { m_bgcolor = bgcolor; m_skycolor = skycolor; } void setSkyColors(const SkyColor &sky_color); void setHorizonTint(video::SColor sun_tint, video::SColor moon_tint, - std::string use_sun_tint); + const std::string &use_sun_tint); void setInClouds(bool clouds) { m_in_clouds = clouds; } void clearSkyboxTextures() { m_sky_params.textures.clear(); } - void addTextureToSkybox(std::string texture, int material_id, + void addTextureToSkybox(const std::string &texture, int material_id, ITextureSource *tsrc); const video::SColorf &getCurrentStarColor() const { return m_star_color; } @@ -126,7 +126,7 @@ private: } // Mix two colors by a given amount - video::SColor m_mix_scolor(video::SColor col1, video::SColor col2, f32 factor) + static video::SColor m_mix_scolor(video::SColor col1, video::SColor col2, f32 factor) { video::SColor result = video::SColor( col1.getAlpha() * (1 - factor) + col2.getAlpha() * factor, @@ -135,7 +135,7 @@ private: col1.getBlue() * (1 - factor) + col2.getBlue() * factor); return result; } - video::SColorf m_mix_scolorf(video::SColorf col1, video::SColorf col2, f32 factor) + static video::SColorf m_mix_scolorf(video::SColorf col1, video::SColorf col2, f32 factor) { video::SColorf result = video::SColorf(col1.r * (1 - factor) + col2.r * factor, |