Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
ppemanager.c File Reference

Go to the source code of this file.

Data Structures

class  PPEManagerStatic
 Static component of PPE manager, used to hold the instance. More...
 

Functions

void PPEManager ()
 
void Cleanup ()
 
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system) More...
 
protected void InitPPEManagerClassMap ()
 Ordered by 'PostProcessEffectType' for easy access through the same enum; ID saved all the same. More...
 
protected void RegisterPPEClass (PPEClassBase material_class)
 Registeres material class and creates data structure within. More...
 
void SendMaterialValueData (PPERequestParamDataBase data)
 
void SetMaterialParamUpdating (int material_id, int parameter_id, int order)
 Queues material/parameter to update (once) More...
 
void RemoveMaterialUpdating (int material_id, int order=0)
 Currently unused, requests remain in the hierarchy and are used when needed (slightly faster than constantly re-shuffilng the arrays) More...
 
protected void ClearMaterialUpdating ()
 
void SetRequestActive (PPERequesterBase request, bool active)
 Marks requester as 'active'. Currently indistinguiishable from 'updating' requester, can potentially be used for intermittently updated requesters. More...
 
void SetRequestUpdating (PPERequesterBase request, bool active)
 Marks requester as 'updating' and to be processed on manager update. More...
 
bool GetExistingRequester (typename req, out PPERequesterBase ret)
 
bool IsAnyRequesterRunning (array< typename > requesters)
 
protected void RemoveActiveRequestFromMaterials (PPERequesterBase req)
 
protected void RequestsCleanup ()
 Unused cleanup method, should it be ever needed. More...
 
void InsertUpdatedMaterial (int mat_id)
 Marks material class as updated and values to be set in the course of update - 'ProcessApplyValueChanges'. More...
 
protected void ProcessRequesterUpdates (float timeslice)
 
protected void ProcessMaterialUpdates (float timeslice)
 
protected void ProcessApplyValueChanges ()
 
void Update (float timeslice)
 
Param GetPostProcessDefaultValues (int material, int parameter)
 Returns default values as Param. See 'PPEConstants' file for various typedefs used. More...
 
Param GetPostProcessCurrentValues (int material, int parameter)
 Returns current values as Param. See 'PPEConstants' file for various typedefs used. More...
 
void ChangePPEMaterial (PostProcessPrioritiesCamera priority, PostProcessEffectType type, string path, bool scriptside_only)
 Changes material file associated with the script material class. Will be used very rarely, mostly set in C++ anyway. More...
 
void StopAllEffects (int mask=0)
 stops all effects of a certain kind More...
 
void DbgPrnt (string text)
 

Variables

class PPEManagerStatic CAMERA_ID = 0
 
protected bool m_ManagerInitialized
 
protected ref map< int, ref PPEClassBasem_PPEClassMap
 
protected ref map< int, ref array< int > > m_PPEMaterialUpdateQueueMap
 
protected ref array< intm_UpdatedMaterials
 
protected ref array< ref PPERequesterBasem_ExistingPostprocessRequests
 
protected ref array< ref PPERequesterBasem_UpdatingRequests
 

Function Documentation

◆ ChangePPEMaterial()

void ChangePPEMaterial ( PostProcessPrioritiesCamera  priority,
PostProcessEffectType  type,
string  path,
bool  scriptside_only 
)

Changes material file associated with the script material class. Will be used very rarely, mostly set in C++ anyway.

Definition at line 354 of file ppemanager.c.

◆ Cleanup()

void Cleanup ( )

Definition at line 70 of file ppemanager.c.

◆ ClearMaterialUpdating()

protected void ClearMaterialUpdating ( )

Definition at line 187 of file ppemanager.c.

◆ DbgPrnt()

void DbgPrnt ( string  text)

Definition at line 393 of file ppemanager.c.

◆ GetExistingRequester()

bool GetExistingRequester ( typename req  ,
out PPERequesterBase  ret 
)

Definition at line 230 of file ppemanager.c.

◆ GetPostProcessCurrentValues()

Param GetPostProcessCurrentValues ( int  material,
int  parameter 
)

Returns current values as Param. See 'PPEConstants' file for various typedefs used.

Definition at line 345 of file ppemanager.c.

◆ GetPostProcessDefaultValues()

Param GetPostProcessDefaultValues ( int  material,
int  parameter 
)

Returns default values as Param. See 'PPEConstants' file for various typedefs used.

Definition at line 338 of file ppemanager.c.

◆ Init()

void Init ( )

Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)

Definition at line 84 of file ppemanager.c.

◆ InitPPEManagerClassMap()

protected void InitPPEManagerClassMap ( )

Ordered by 'PostProcessEffectType' for easy access through the same enum; ID saved all the same.

Definition at line 101 of file ppemanager.c.

◆ InsertUpdatedMaterial()

void InsertUpdatedMaterial ( int  mat_id)

Marks material class as updated and values to be set in the course of update - 'ProcessApplyValueChanges'.

Definition at line 276 of file ppemanager.c.

◆ IsAnyRequesterRunning()

bool IsAnyRequesterRunning ( array< typename requesters)

Definition at line 241 of file ppemanager.c.

◆ PPEManager()

void PPEManager ( )

Definition at line 64 of file ppemanager.c.

◆ ProcessApplyValueChanges()

protected void ProcessApplyValueChanges ( )

Definition at line 312 of file ppemanager.c.

◆ ProcessMaterialUpdates()

protected void ProcessMaterialUpdates ( float  timeslice)

Definition at line 297 of file ppemanager.c.

◆ ProcessRequesterUpdates()

protected void ProcessRequesterUpdates ( float  timeslice)

Definition at line 285 of file ppemanager.c.

◆ RegisterPPEClass()

protected void RegisterPPEClass ( PPEClassBase  material_class)

Registeres material class and creates data structure within.

Definition at line 137 of file ppemanager.c.

◆ RemoveActiveRequestFromMaterials()

protected void RemoveActiveRequestFromMaterials ( PPERequesterBase  req)

/brief Originally designed to rip the requester data from all relevant mat/params, but that proved too costly and volatile. /note Still, it is here, use at your own peril.

Definition at line 258 of file ppemanager.c.

◆ RemoveMaterialUpdating()

void RemoveMaterialUpdating ( int  material_id,
int  order = 0 
)

Currently unused, requests remain in the hierarchy and are used when needed (slightly faster than constantly re-shuffilng the arrays)

Definition at line 176 of file ppemanager.c.

◆ RequestsCleanup()

protected void RequestsCleanup ( )

Unused cleanup method, should it be ever needed.

Definition at line 271 of file ppemanager.c.

◆ SendMaterialValueData()

void SendMaterialValueData ( PPERequestParamDataBase  data)

Definition at line 142 of file ppemanager.c.

◆ SetMaterialParamUpdating()

void SetMaterialParamUpdating ( int  material_id,
int  parameter_id,
int  order 
)

Queues material/parameter to update (once)

Definition at line 151 of file ppemanager.c.

◆ SetRequestActive()

void SetRequestActive ( PPERequesterBase  request,
bool  active 
)

Marks requester as 'active'. Currently indistinguiishable from 'updating' requester, can potentially be used for intermittently updated requesters.

Definition at line 193 of file ppemanager.c.

◆ SetRequestUpdating()

void SetRequestUpdating ( PPERequesterBase  request,
bool  active 
)

Marks requester as 'updating' and to be processed on manager update.

Definition at line 209 of file ppemanager.c.

◆ StopAllEffects()

void StopAllEffects ( int  mask = 0)

stops all effects of a certain kind

Definition at line 379 of file ppemanager.c.

◆ Update()

void Update ( float  timeslice)

Definition at line 326 of file ppemanager.c.

Variable Documentation

◆ CAMERA_ID

class PPEManagerStatic CAMERA_ID = 0

/brief Postprocess manager, responsible for updates, receiving, and re-distributing requester data to their respective destinations. /par Basic post process flow outline: Getting a registered 'PPERequester' instance from the 'PPERequesterBank'

/par Launching the requester, either through an overriden 'Start' method, or custom method with some setters (both flag it as active and to be processed)

/par On render update, PPEManager: Handles queued requester changes, re-distributes individual commands to material structure

/par
Updates the material/parameter structure and calculates the blend values

/par
Sets the final values via native functions (only called once per changed parameter - optimization stonks)

/note Requester serves as a centralized platform for specific effec/group of effects. Although technically the direct commands to mat/param would be feasible, this allows for easier control of effect groups, /note and clearer command hierarchy (no value setters without clear parentage).

◆ m_ExistingPostprocessRequests

protected ref array<ref PPERequesterBase> m_ExistingPostprocessRequests

Definition at line 61 of file ppemanager.c.

◆ m_ManagerInitialized

protected bool m_ManagerInitialized

Definition at line 57 of file ppemanager.c.

◆ m_PPEClassMap

protected ref map<int, ref PPEClassBase> m_PPEClassMap

Definition at line 58 of file ppemanager.c.

◆ m_PPEMaterialUpdateQueueMap

protected ref map<int, ref array<int> > m_PPEMaterialUpdateQueueMap

Definition at line 59 of file ppemanager.c.

◆ m_UpdatedMaterials

protected ref array<int> m_UpdatedMaterials

Definition at line 60 of file ppemanager.c.

◆ m_UpdatingRequests

protected ref array<ref PPERequesterBase> m_UpdatingRequests

Definition at line 62 of file ppemanager.c.