mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 09:09:19 +02:00
renderer changes, time and environment window
This commit is contained in:
@@ -90,24 +90,28 @@ basic_precipitation::init() {
|
||||
|
||||
create( 18 );
|
||||
|
||||
// TODO: select texture based on current overcast level
|
||||
// TODO: when the overcast level dynamic change is in check the current level during render and pick the appropriate texture on the fly
|
||||
std::string const densitysuffix { (
|
||||
Global.Overcast < 1.35 ?
|
||||
"_light" :
|
||||
"_medium" ) };
|
||||
if( Global.Weather == "rain:" ) {
|
||||
m_moverateweathertypefactor = 2.f;
|
||||
m_texture = GfxRenderer.Fetch_Texture( "fx/rain" + densitysuffix );
|
||||
}
|
||||
else if( Global.Weather == "snow:" ) {
|
||||
m_moverateweathertypefactor = 1.25f;
|
||||
m_texture = GfxRenderer.Fetch_Texture( "fx/snow" + densitysuffix );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
basic_precipitation::update_weather() {
|
||||
|
||||
// TODO: select texture based on current overcast level
|
||||
// TODO: when the overcast level dynamic change is in check the current level during render and pick the appropriate texture on the fly
|
||||
std::string const densitysuffix { (
|
||||
Global.Overcast < 1.35 ?
|
||||
"_light" :
|
||||
"_medium" ) };
|
||||
if( Global.Weather == "rain:" ) {
|
||||
m_moverateweathertypefactor = 2.f;
|
||||
m_texture = GfxRenderer.Fetch_Texture( "fx/rain" + densitysuffix );
|
||||
}
|
||||
else if( Global.Weather == "snow:" ) {
|
||||
m_moverateweathertypefactor = 1.25f;
|
||||
m_texture = GfxRenderer.Fetch_Texture( "fx/snow" + densitysuffix );
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
basic_precipitation::update() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user