aboutsummaryrefslogtreecommitdiff
path: root/src/clouds.h
Commit message (Expand)AuthorAge
* v2d & aabbox3d<f32> & sky cleanupsnerzhul2016-02-11
* Update clouds enable_3d_clouds when setting changedest312015-07-09
* Cache enable_3d_clouds flagest312015-05-04
* Clouds: Make cloud area radius settable in .confparamat2015-05-04
* Move globals from main.cpp to more sane locationsCraig Robbins2015-04-01
* Fix #1358 (disappearing clouds)Novatux2014-06-09
* Fix all warnings reported by clangSfan52014-04-15
* Fix rendering glitches when far from the center of the mapNovatux2014-03-04
* Add cloud menu background by Krisi, configurable with the menu_clouds option.ShadowNinja2013-03-13
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Optimize headersPerttu Ahola2012-06-17
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* Dynamic sky, fog and cloud colors; sun and moonPerttu Ahola2012-03-18
* random comment updatesPerttu Ahola2011-04-30
* added cloudsPerttu Ahola2011-04-29
om">/** * \internal * * \warning DO NOT USE this directly; it is here simply so that decode_light() * can be inlined. * * Array size is #LIGHTMAX+1 * * The array is a lookup table to convert the internal representation of light * (brightness) to the display brightness. * */ extern const u8 *light_decode_table; // 0 <= light <= LIGHT_SUN // 0 <= return value <= 255 inline u8 decode_light(u8 light) { // assert(light <= LIGHT_SUN); if (light > LIGHT_SUN) light = LIGHT_SUN; return light_decode_table[light]; } // 0.0 <= light <= 1.0 // 0.0 <= return value <= 1.0 float decode_light_f(float light_f); void set_light_table(float gamma); #endif // ifndef SERVER // 0 <= daylight_factor <= 1000 // 0 <= lightday, lightnight <= LIGHT_SUN // 0 <= return value <= LIGHT_SUN inline u8 blend_light(u32 daylight_factor, u8 lightday, u8 lightnight) { u32 c = 1000; u32 l = ((daylight_factor * lightday + (c - daylight_factor) * lightnight)) / c; if (l > LIGHT_SUN) l = LIGHT_SUN; return l; }