Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
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
5
class
PPELightIntensityParamsNative
:
PPEClassBase
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
{
44
Param
values =
GetParameterCommandData
(i).
GetCurrentValues
();
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
}
PPEClassBase::m_UpdatedParameters
ref array< int > m_UpdatedParameters
Definition
ppematclassesbase.c:10
PPEClassBase::RegisterParameterScalarFloat
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 ...
Definition
ppematclassesbase.c:77
PPEClassBase::PPEClassBase
void PPEClassBase(string mat_path_override="")
Definition
ppematclassesbase.c:14
PPEClassBase::GetParameterCommandData
PPEMatClassParameterCommandData GetParameterCommandData(int parameter_idx)
Some PP effects are handled as hard-coded exceptions, outside of material system. Default == PPEExcep...
Definition
ppematclassesbase.c:350
PPELightIntensityParamsNative
g_Game.NightVissionLightParams, does not directly use materials. Controls light multiplication and fi...
Definition
ppelightintensityparamsnative.c:6
PPELightIntensityParamsNative::RegisterMaterialParameters
override void RegisterMaterialParameters()
Definition
ppelightintensityparamsnative.c:21
PPELightIntensityParamsNative::GetPostProcessEffectID
override int GetPostProcessEffectID()
Definition
ppelightintensityparamsnative.c:16
PPELightIntensityParamsNative::L_0_NVG
static const int L_0_NVG
Definition
ppelightintensityparamsnative.c:11
PPELightIntensityParamsNative::PARAM_LIGHT_MULT
static const int PARAM_LIGHT_MULT
Definition
ppelightintensityparamsnative.c:8
PPELightIntensityParamsNative::L_1_NVG
static const int L_1_NVG
Definition
ppelightintensityparamsnative.c:13
PPELightIntensityParamsNative::L_0_TOXIC_TINT
static const int L_0_TOXIC_TINT
Definition
ppelightintensityparamsnative.c:12
PPELightIntensityParamsNative::L_1_TOXIC_TINT
static const int L_1_TOXIC_TINT
Definition
ppelightintensityparamsnative.c:14
PPELightIntensityParamsNative::PARAM_NOISE_MULT
static const int PARAM_NOISE_MULT
Definition
ppelightintensityparamsnative.c:9
PPELightIntensityParamsNative::SetFinalParameterValue
override void SetFinalParameterValue(int parameter_idx)
Overriden to handle the specific exception.
Definition
ppelightintensityparamsnative.c:38
PPELightIntensityParamsNative::ApplyValueChanges
override void ApplyValueChanges()
Definition
ppelightintensityparamsnative.c:27
PPEMatClassParameterCommandData::GetCurrentValues
Param GetCurrentValues()
Careful, only actual values, WITHOUT string.
Definition
ppematclassparametercommanddata.c:122
Param
Base Param Class with no parameters.
Definition
param.c:12
Param::param1
T1 param1
Definition
param.c:34
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition
isboxcollidinggeometryproxyclasses.c:28
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
PPEExceptions
PPEExceptions
/brief IDs of custom PPE classes /note Currently used for various native exceptions that used to be h...
Definition
ppeconstants.c:43
Games
Dayz
scripts
3_game
ppemanager
materials
matclasses
exceptions
ppelightintensityparamsnative.c
Generated by
1.17.0