MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / Transparency

Method Transparency

TombEngine/Game/effects/weather.cpp:26–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 EnvironmentController Weather;
25
26 float WeatherParticle::Transparency() const
27 {
28 float result = WEATHER_PARTICLE_OPACITY;
29 float fade = WEATHER_PARTICLE_NEAR_DEATH_LIFE;
30
31 if (Life <= fade)
32 result *= Life / fade;
33
34 if ((StartLife - Life) < fade)
35 result *= (StartLife - Life) / fade;
36
37 if (Type != WeatherType::Snow)
38 result *= 0.35f;
39
40 return result;
41 }
42
43 EnvironmentController::EnvironmentController()
44 {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected