ppeeyeaccomodationnative.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  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. //!Eye Accomodation postprocess, does not directly use materials
  4. class PPEEyeAccomodationNative: PPEClassBase
  5. {
  6. //g_Game.GetWorld().SetEyeAccom
  7. static const int PARAM_INTENSITY = 0;
  8. static const int L_0_UNDERGROUND = 100;
  9. static const int L_0_NVG_GENERIC = 300;
  10. /*static const int L_0_NVG_OPTIC = 400;
  11. static const int L_0_NVG_GOGGLES = 401;
  12. static const int L_0_NVG_OFF = 402;*/
  13. static const int L_0_BURLAP = 500;
  14. override int GetPostProcessEffectID()
  15. {
  16. return PPEExceptions.EYEACCOM;
  17. }
  18. override void RegisterMaterialParameters()
  19. {
  20. RegisterParameterScalarFloat(PARAM_INTENSITY,"Intensity",1.0,0.0,1000.0); //no known max. 1000 used as max
  21. }
  22. //! Overriden to handle the specific exception
  23. override void SetFinalParameterValue(int parameter_idx)
  24. {
  25. Param values = GetParameterCommandData(parameter_idx).GetCurrentValues();
  26. float value_var_float = Param1<float>.Cast(values).param1;
  27. g_Game.GetWorld().SetEyeAccom(value_var_float);
  28. //DbgPrnt("PPEDebug | SetFinalParameterValue | PPEEyeAccomodationNative | float val: " + value_var_float);
  29. }
  30. }