DayZ 1.24
Loading...
Searching...
No Matches
PPERCameraNV.c
Go to the documentation of this file.
2{
3 static const int NV_NO_BATTERY = 0; //darkness
4 static const int NV_DEFAULT_OPTICS = 1;
5 static const int NV_DEFAULT_GLASSES = 2;
6 static const int NV_PUMPKIN = 3;
7 static const int NV_TRANSITIVE = 4; //resets EV during camera transitions
8 static const int NV_DAYTIME_OPTICS = 5;
9
10 protected int m_CurrentMode;
11 protected float m_UGExposureCoef = 1.0;
12
13 protected void SetNVMode(int mode)
14 {
16
17 switch (mode)
18 {
19 case NV_NO_BATTERY: //battery off
26 break;
27
28 case NV_DEFAULT_OPTICS: //NV optic on
35 break;
36
37 case NV_DAYTIME_OPTICS: //NV optic in daytime mode
44 break;
45
46 case NV_DEFAULT_GLASSES: //goggles on
53 break;
54
55 case NV_PUMPKIN: //pumpkin-o-vision
62 break;
63
64 case NV_TRANSITIVE: //camera transition
65 //SetTargetValueFloat(PPEExceptions.EXPOSURE,PPEExposureNative.PARAM_INTENSITY,false,0,PPEExposureNative.L_0_NVG_OFF,PPOperators.SET);
67 break;
68 }
69
71 }
72
73 override protected void OnStart(Param par = null)
74 {
75 super.OnStart();
76
77 SetNVMode(Param1<int>.Cast(par).param1);
78 }
79
80 //other values reset automatically on stop
81 override protected void OnStop(Param par = null)
82 {
83 super.OnStop(par);
84 }
85
87 {
88 m_UGExposureCoef = coef;
89
90 if (m_IsRunning)
91 SetNVMode(m_CurrentMode); //TODO: improve (oof...)
92 }
93}
PPOperators
PP operators, specify operation between subsequent layers.
PPEExceptions
bool m_IsRunning
void SetTargetValueFloatDefault(int mat_id, int param_idx)
void SetTargetValueFloat(int mat_id, int param_idx, bool relative, float val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)
void SetTargetValueColor(int mat_id, int param_idx, ref array< float > val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)
int m_CurrentMode
EV postprocess, does not directly use materials.
static const int L_0_NVG_GOGGLES
static const int PARAM_INTENSITY
static const int L_0_NVG_OPTIC
Eye Accomodation postprocess, does not directly use materials.
FilmGrain - PostProcessEffectType.FilmGrain.
Definition PPEFilmGrain.c:7
static const int PARAM_SHARPNESS
Definition PPEFilmGrain.c:9
static const int L_2_NVG
static const int L_1_NVG
static const int PARAM_GRAINSIZE
Glow - PostProcessEffectType.Glow.
Definition PPEGlow.c:8
static const int L_23_NVG
Definition PPEGlow.c:54
static const int PARAM_COLORIZATIONCOLOR
Definition PPEGlow.c:32
g_Game.NightVissionLightParams, does not directly use materials. Controls light multiplication and fi...
base, not to be used directly, would lead to layering collisions!
void SetUndergroundExposureCoef(float coef)
void OnStart(Param par=null)
void OnStop(Param par=null)
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
PostProcessEffectType
Post-process effect type.
Definition EnWorld.c:72