Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
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 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.
void Cleanup ()
void ClearMaterialUpdating ()
void DbgPrnt (string text)
bool GetExistingRequester (typename req, out PPERequesterBase ret)
Param GetPostProcessCurrentValues (int material, int parameter)
 Returns current values as Param. See 'PPEConstants' file for various typedefs used.
Param GetPostProcessDefaultValues (int material, int parameter)
 Returns default values as Param. See 'PPEConstants' file for various typedefs used.
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system).
void InitPPEManagerClassMap ()
 Ordered by 'PostProcessEffectType' for easy access through the same enum; ID saved all the same.
void InsertUpdatedMaterial (int mat_id)
 Marks material class as updated and values to be set in the course of update - 'ProcessApplyValueChanges'.
bool IsAnyRequesterRunning (array< typename > requesters)
void PPEManager ()
void ProcessApplyValueChanges ()
void ProcessMaterialUpdates (float timeslice)
void ProcessRequesterUpdates (float timeslice)
void RegisterPPEClass (PPEClassBase material_class)
 Registeres material class and creates data structure within.
void RemoveActiveRequestFromMaterials (PPERequesterBase req)
 /brief Originally designed to rip the requester data from all relevant mat/params, but that proved too costly and volatile.
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).
void RequestsCleanup ()
 Unused cleanup method, should it be ever needed.
void SendMaterialValueData (PPERequestParamDataBase data)
void SetMaterialParamUpdating (int material_id, int parameter_id, int order)
 Queues material/parameter to update (once).
void SetRequestActive (PPERequesterBase request, bool active)
 Marks requester as 'active'. Currently indistinguiishable from 'updating' requester, can potentially be used for intermittently updated requesters.
void SetRequestUpdating (PPERequesterBase request, bool active)
 Marks requester as 'updating' and to be processed on manager update.
void StopAllEffects (int mask=0)
 stops all effects of a certain kind
void Update (float timeslice)

Variables

class PPEManagerStatic CAMERA_ID = 0
 /brief Postprocess manager, responsible for updates, receiving, and re-distributing requester data to their respective destinations.
ref array< ref PPERequesterBasem_ExistingPostprocessRequests
bool m_ManagerInitialized
ref map< int, ref PPEClassBasem_PPEClassMap
ref map< int, ref array< int > > m_PPEMaterialUpdateQueueMap
ref array< intm_UpdatedMaterials
ref array< ref PPERequesterBasem_UpdatingRequests

Function Documentation

◆ ChangePPEMaterial()

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

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

Definition at line 356 of file ppemanager.c.

References CAMERA_ID, PPEClassBase::ChangeMaterialPathUsed(), PPEClassBase::GetMaterial(), Debug::Log(), m_PPEClassMap, name, path, and SetCameraPostProcessEffect().

◆ Cleanup()

void Cleanup ( )
protected

◆ ClearMaterialUpdating()

void ClearMaterialUpdating ( )
protected

Definition at line 189 of file ppemanager.c.

References m_PPEMaterialUpdateQueueMap.

Referenced by ProcessApplyValueChanges().

◆ DbgPrnt()

void DbgPrnt ( string text)
protected

Definition at line 395 of file ppemanager.c.

◆ GetExistingRequester()

bool GetExistingRequester ( typename req ,
out PPERequesterBase ret )
protected

Definition at line 232 of file ppemanager.c.

References m_ExistingPostprocessRequests.

Referenced by IsAnyRequesterRunning().

◆ GetPostProcessCurrentValues()

Param GetPostProcessCurrentValues ( int material,
int parameter )
protected

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

Definition at line 347 of file ppemanager.c.

References PPEMatClassParameterCommandData::GetCurrentValues(), PPEClassBase::GetParameterCommandData(), and m_PPEClassMap.

◆ GetPostProcessDefaultValues()

Param GetPostProcessDefaultValues ( int material,
int parameter )
protected

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

Definition at line 340 of file ppemanager.c.

References PPEMatClassParameterCommandData::GetDefaultValues(), PPEClassBase::GetParameterCommandData(), and m_PPEClassMap.

◆ Init()

void Init ( )
protected

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.

References CALL_CATEGORY_GUI, g_Game, InitPPEManagerClassMap(), m_ExistingPostprocessRequests, m_ManagerInitialized, m_PPEMaterialUpdateQueueMap, m_UpdatedMaterials, m_UpdatingRequests, and Update().

◆ InitPPEManagerClassMap()

void InitPPEManagerClassMap ( )
protected

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

Definition at line 101 of file ppemanager.c.

References m_PPEClassMap, and RegisterPPEClass().

Referenced by Init().

◆ InsertUpdatedMaterial()

void InsertUpdatedMaterial ( int mat_id)
protected

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

Definition at line 278 of file ppemanager.c.

References m_UpdatedMaterials.

◆ IsAnyRequesterRunning()

bool IsAnyRequesterRunning ( array< typename > requesters)
protected

Definition at line 243 of file ppemanager.c.

References GetExistingRequester(), and PPERequesterBase::IsRequesterRunning().

◆ PPEManager()

void PPEManager ( )
protected

◆ ProcessApplyValueChanges()

void ProcessApplyValueChanges ( )
protected

◆ ProcessMaterialUpdates()

void ProcessMaterialUpdates ( float timeslice)
protected

Definition at line 299 of file ppemanager.c.

References Count, m_PPEClassMap, m_PPEMaterialUpdateQueueMap, and PPEClassBase::OnUpdate().

Referenced by Update().

◆ ProcessRequesterUpdates()

void ProcessRequesterUpdates ( float timeslice)
protected

Definition at line 287 of file ppemanager.c.

References m_UpdatingRequests, and PPERequesterBase::OnUpdate().

Referenced by Update().

◆ RegisterPPEClass()

void RegisterPPEClass ( PPEClassBase material_class)
protected

Registeres material class and creates data structure within.

Definition at line 139 of file ppemanager.c.

References PPEClassBase::GetPostProcessEffectID(), and m_PPEClassMap.

Referenced by InitPPEManagerClassMap().

◆ RemoveActiveRequestFromMaterials()

void RemoveActiveRequestFromMaterials ( PPERequesterBase req)
protected

/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 260 of file ppemanager.c.

References PPERequesterBase::GetActiveRequestStructure(), PPERequesterBase::GetRequesterIDX(), m_PPEClassMap, and PPEClassBase::RemoveRequest().

◆ RemoveMaterialUpdating()

void RemoveMaterialUpdating ( int material_id,
int order = 0 )
protected

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

Definition at line 178 of file ppemanager.c.

References m_PPEMaterialUpdateQueueMap.

◆ RequestsCleanup()

void RequestsCleanup ( )
protected

Unused cleanup method, should it be ever needed.

Definition at line 273 of file ppemanager.c.

Referenced by Update().

◆ SendMaterialValueData()

◆ SetMaterialParamUpdating()

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

Queues material/parameter to update (once).

Definition at line 153 of file ppemanager.c.

References m_PPEClassMap, m_PPEMaterialUpdateQueueMap, and PPEClassBase::SetParameterUpdating().

Referenced by SendMaterialValueData().

◆ SetRequestActive()

void SetRequestActive ( PPERequesterBase request,
bool active )
protected

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

Definition at line 195 of file ppemanager.c.

References m_ExistingPostprocessRequests.

◆ SetRequestUpdating()

void SetRequestUpdating ( PPERequesterBase request,
bool active )
protected

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

Definition at line 211 of file ppemanager.c.

References Debug::Log(), and m_UpdatingRequests.

◆ StopAllEffects()

void StopAllEffects ( int mask = 0)
protected

stops all effects of a certain kind

Definition at line 381 of file ppemanager.c.

References m_ExistingPostprocessRequests.

◆ Update()

void Update ( float timeslice)
protected

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).

Referenced by ChangePPEMaterial().

◆ m_ExistingPostprocessRequests

ref array<ref PPERequesterBase> m_ExistingPostprocessRequests
protected

Definition at line 61 of file ppemanager.c.

Referenced by Cleanup(), GetExistingRequester(), Init(), SetRequestActive(), and StopAllEffects().

◆ m_ManagerInitialized

bool m_ManagerInitialized
protected

Definition at line 57 of file ppemanager.c.

Referenced by Cleanup(), Init(), PPEManager(), and Update().

◆ m_PPEClassMap

◆ m_PPEMaterialUpdateQueueMap

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

◆ m_UpdatedMaterials

ref array<int> m_UpdatedMaterials
protected

Definition at line 60 of file ppemanager.c.

Referenced by Init(), InsertUpdatedMaterial(), and ProcessApplyValueChanges().

◆ m_UpdatingRequests

ref array<ref PPERequesterBase> m_UpdatingRequests
protected

Definition at line 62 of file ppemanager.c.

Referenced by Cleanup(), Init(), ProcessRequesterUpdates(), and SetRequestUpdating().