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

◆ AdjustColorSaturation()

void BleedingIndicatorDropData::AdjustColorSaturation ( )
inlineprotected

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

200 {
201 //color adjustment
202 float r = BleedingIndicationConstants.DROP_COLOR_RED;
203 float g = BleedingIndicationConstants.DROP_COLOR_GREEN;
204 float b = BleedingIndicationConstants.DROP_COLOR_BLUE;
205 float desaturationEnd = BleedingIndicationConstants.DROP_COLOR_DESATURATIONEND;
206#ifdef DIAG_DEVELOPER
207 if (DbgBleedingIndicationStaticInfo.m_DbgUseOverrideValues)
208 {
209 r = DbgBleedingIndicationStaticInfo.m_DbgDropColorRed;
210 g = DbgBleedingIndicationStaticInfo.m_DbgDropColorGreen;
211 b = DbgBleedingIndicationStaticInfo.m_DbgDropColorBlue;
212 desaturationEnd = DbgBleedingIndicationStaticInfo.m_DbgDesaturationEnd;
213 }
214#endif
215
216 //saturation adjustment
217#ifdef DIAG_DEVELOPER
218 if (!DbgBleedingIndicationStaticInfo.m_DbgUseOverrideValues || (DbgBleedingIndicationStaticInfo.m_DbgUseOverrideValues && DbgBleedingIndicationStaticInfo.m_DbgDropDesaturate) )
219 {
220#endif
221 Param par = PPEManagerStatic.GetPPEManager().GetPostProcessCurrentValues(PostProcessEffectType.Glow,PPEGlow.PARAM_SATURATION);
222 float saturationProgress = Param1<float>.Cast(par).param1;
223 saturationProgress = Easing.EaseOutSine(saturationProgress);
224 saturationProgress = Math.Lerp(desaturationEnd,1.0,saturationProgress);
225 float lowest_channel = Math.Min(Math.Min(r,g),b);
226 r = Math.Lerp(lowest_channel,r,saturationProgress);
227 g = Math.Lerp(lowest_channel,g,saturationProgress);
228 b = Math.Lerp(lowest_channel,b,saturationProgress);
229#ifdef DIAG_DEVELOPER
230 }
231#endif
232
233 int color = ARGB(0x00,r,g,b);
234 m_Widget.SetColor(color);
235 }
ImageWidget m_Widget
Определения BleedingDrop.c:4
PostProcessEffectType
Post-process effect type.
Определения EnWorld.c:72
int ARGB(int a, int r, int g, int b)
Определения proto.c:322

Перекрестные ссылки ARGB(), BleedingIndicationConstants::DROP_COLOR_BLUE, BleedingIndicationConstants::DROP_COLOR_DESATURATIONEND, BleedingIndicationConstants::DROP_COLOR_GREEN, BleedingIndicationConstants::DROP_COLOR_RED, Easing::EaseOutSine(), PPEManagerStatic::GetPPEManager(), Math::Lerp(), DbgBleedingIndicationStaticInfo::m_DbgDesaturationEnd, DbgBleedingIndicationStaticInfo::m_DbgDropColorBlue, DbgBleedingIndicationStaticInfo::m_DbgDropColorGreen, DbgBleedingIndicationStaticInfo::m_DbgDropColorRed, DbgBleedingIndicationStaticInfo::m_DbgDropDesaturate, DbgBleedingIndicationStaticInfo::m_DbgUseOverrideValues, m_Widget, Math::Min() и PPEGlow::PARAM_SATURATION.

Используется в BleedingIndicatorDropData().