DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetTemperatureColor()

int GetTemperatureColor ( int temperature)
protected

См. определение в файле tools.c строка 992

993{
994 int alpha = 255;
995 int red = 153;
996 int green = 153;
997 int blue = 153;
998
1000 {
1001 temperature = temperature - 20;
1002 temperature = Math.Clamp( temperature, -50, 50);
1003 temperature = Math.AbsInt(temperature);
1004
1005 red = Math.Clamp ( red - ((red/50 )*temperature), 0, 255);
1006 green = Math.Clamp ( green - ((green/50 )*temperature), 0, 255);
1007 blue = Math.Clamp ( blue+((blue/50)*temperature), 0, 255);
1008 }
1010 {
1011 temperature = Math.Clamp(temperature, -100, 100);
1012 blue = Math.Clamp (blue - ((blue / 100) * temperature), 0, 255);
1013 green = Math.Clamp (green - ((green / 100) * temperature), 0, 255);
1014 red = Math.Clamp (red + ((red / 100) * temperature), 0, 255);
1015 }
1016
1017 return ARGB(alpha, red, green, blue);
1018}
Определения constants.c:659
Определения EnMath.c:7
const float ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT
Определения constants.c:802
const float ITEM_TEMPERATURE_NEUTRAL_ZONE_LOWER_LIMIT
damage per second dealt to attachment by fire
Определения constants.c:801
static proto int AbsInt(int i)
Returns absolute value.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
int ARGB(int a, int r, int g, int b)
Определения proto.c:322

Перекрестные ссылки Math::AbsInt(), ARGB(), Math::Clamp(), GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_LOWER_LIMIT и GameConstants::ITEM_TEMPERATURE_NEUTRAL_ZONE_UPPER_LIMIT.

Используется в UIScriptedMenu::UpdateItemInfoQuantity().