aboutsummaryrefslogtreecommitdiff
path: root/src/mapblockobject.h
Commit message (Collapse)AuthorAge
* All textures are are now searched first from the directory specified by the ↵Perttu Ahola2011-05-21
| | | | texture_path setting.
* fixed warnings reported by cppcheckPerttu Ahola2011-04-11
|
* items now fall by gravity... also some other random updatingPerttu Ahola2011-04-10
|
* Added a more flexible path system (and fixed some minor stuff)Perttu Ahola2011-01-07
|
* working goodPerttu Ahola2010-12-26
|
* ProgressBarTextureModPerttu Ahola2010-12-24
|
* base stuff for item->object conversionPerttu Ahola2010-12-24
|
* work-in-progress gui system updating + some settings system updatingPerttu Ahola2010-12-23
|
* some work-in-progressPerttu Ahola2010-12-22
|
* organizing stuff.Perttu Ahola2010-12-21
|
* added dedicated server build without irrlichtPerttu Ahola2010-12-19
|
* day/night working client sidePerttu Ahola2010-12-19
|
* working nicelyPerttu Ahola2010-12-13
|
* license stuffPerttu Ahola2010-11-29
| | | | | --HG-- rename : src/licensecomment.txt => licensecomment.txt
* Windows bug fixesPerttu Ahola2010-11-29
|
* Working version before block send priorization updatePerttu Ahola2010-11-27
|
* Initial filesPerttu Ahola2010-11-27
pan> light; return light + 1; } #ifndef SERVER /** * \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) { if(light > LIGHT_MAX) light = LIGHT_MAX; return light_decode_table[light]; } // 0.0 <= light <= 1.0 // 0.0 <= return value <= 1.0 inline float decode_light_f(float light_f) { s32 i = (u32)(light_f * LIGHT_MAX + 0.5); if(i <= 0) return (float)light_decode_table[0] / 255.0; if(i >= LIGHT_MAX) return (float)light_decode_table[LIGHT_MAX] / 255.0; float v1 = (float)light_decode_table[i-1] / 255.0; float v2 = (float)light_decode_table[i] / 255.0; float f0 = (float)i - 0.5; float f = light_f * LIGHT_MAX - f0; return f * v2 + (1.0 - f) * v1; } 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; } #endif