mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Set sky API: Add bool for clouds in front of custom skybox
Default true. Add 'm_clouds_enabled' bool to sky.h, set from new bool in 'set sky' API. Make 'getCloudsVisible()' depend on 'm_clouds_enabled' instead of 'm_visible' (whether normal sky is visible).
This commit is contained in:
parent
f9fdb48dc8
commit
ad9fcf859e
12 changed files with 53 additions and 20 deletions
|
@ -85,19 +85,21 @@ public:
|
|||
}
|
||||
|
||||
void setSky(const video::SColor &bgcolor, const std::string &type,
|
||||
const std::vector<std::string> ¶ms)
|
||||
const std::vector<std::string> ¶ms, bool &clouds)
|
||||
{
|
||||
m_sky_bgcolor = bgcolor;
|
||||
m_sky_type = type;
|
||||
m_sky_params = params;
|
||||
m_sky_clouds = clouds;
|
||||
}
|
||||
|
||||
void getSky(video::SColor *bgcolor, std::string *type,
|
||||
std::vector<std::string> *params)
|
||||
std::vector<std::string> *params, bool *clouds)
|
||||
{
|
||||
*bgcolor = m_sky_bgcolor;
|
||||
*type = m_sky_type;
|
||||
*params = m_sky_params;
|
||||
*clouds = m_sky_clouds;
|
||||
}
|
||||
|
||||
void setCloudParams(const CloudParams &cloud_params)
|
||||
|
@ -165,6 +167,8 @@ private:
|
|||
std::string m_sky_type;
|
||||
video::SColor m_sky_bgcolor;
|
||||
std::vector<std::string> m_sky_params;
|
||||
bool m_sky_clouds;
|
||||
|
||||
CloudParams m_cloud_params;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue