Dayz Explorer 1.29.162510
Loading...
Searching...
No Matches
ppelightintensityparamsnative.c
Go to the documentation of this file.
1//---------------------------------------------------------
2//Native exceptions - legacy methods for direct access to specific postprocesses. Each one is evaluated and handled separately, this just connects them to the system.
3
6{
7 //g_Game.SetEVValue
8 static const int PARAM_LIGHT_MULT = 0;
9 static const int PARAM_NOISE_MULT = 1;
10
11 static const int L_0_NVG = 100;
12 static const int L_0_TOXIC_TINT = 200;
13 static const int L_1_NVG = 100;
14 static const int L_1_TOXIC_TINT = 200;
15
16 override int GetPostProcessEffectID()
17 {
18 return PPEExceptions.NVLIGHTPARAMS;
19 }
20
21 override void RegisterMaterialParameters()
22 {
23 RegisterParameterScalarFloat(PARAM_LIGHT_MULT,"lightIntensityMul",1.0,0.0,50.0); //some reasonable values
24 RegisterParameterScalarFloat(PARAM_NOISE_MULT,"noiseIntensity",0.0,0.0,50.0); //some reasonable values
25 }
26
27 override void ApplyValueChanges()
28 {
29 if (m_UpdatedParameters.Count() > 0)
30 {
31 SetFinalParameterValue(-1); //unique handling
32 }
33
34 m_UpdatedParameters.Clear();
35 }
36
38 override void SetFinalParameterValue(int parameter_idx)
39 {
40 array<float> array_values = new array<float>;
41
42 for (int i = 0; i < PARAM_NOISE_MULT + 1; i++)
43 {
45 float value_var_float = Param1<float>.Cast(values).param1;
46 array_values.Insert(value_var_float);
47 }
48
49 g_Game.NightVissionLightParams(array_values.Get(PARAM_LIGHT_MULT),array_values.Get(PARAM_NOISE_MULT));
50
51 //DbgPrnt("PPEDebug | SetFinalParameterValue | PPELightIntensityParamsNative | float val: " + value_var_float);
52 }
53}
void RegisterParameterScalarFloat(int idx, string parameter_name, float default_value, float min, float max)
WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values ...
void RegisterMaterialParameters()
inserted into associative array by parameter int value, parameter registration order does not matter ...
int GetPostProcessEffectID()
Overriden in all material classes!
PPEMatClassParameterCommandData GetParameterCommandData(int parameter_idx)
Some PP effects are handled as hard-coded exceptions, outside of material system. Default == PPEExcep...
ref array< int > m_UpdatedParameters
void PPEClassBase(string mat_path_override="")
g_Game.NightVissionLightParams, does not directly use materials. Controls light multiplication and fi...
Param GetCurrentValues()
Careful, only actual values, WITHOUT string.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZGame g_Game
Definition dayzgame.c:3942
PPEExceptions