Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
FXList Class Reference

#include <FXList.h>

Public Member Functions

 FXList ()
 
virtual ~FXList ()
 
void clear ()
 
void addFXNugget (FXNugget *fxn)
 

Static Public Member Functions

static void doFXPos (const FXList *fx, const Coord3D *primary, const Matrix3D *primaryMtx=NULL, const Real primarySpeed=0.0f, const Coord3D *secondary=NULL, const Real overrideRadius=0.0f)
 inline convenience method to avoid having to check for null.
 
static void doFXObj (const FXList *fx, const Object *primary, const Object *secondary=NULL)
 inline convenience method to avoid having to check for null.
 

Protected Member Functions

void doFXPos (const Coord3D *primary, const Matrix3D *primaryMtx=NULL, const Real primarySpeed=0.0f, const Coord3D *secondary=NULL, const Real overrideRadius=0.0f) const
 
void doFXObj (const Object *primary, const Object *secondary=NULL) const
 

Detailed Description

An FXList is a way of encapsulating a particular set of audio/video effect(s). Lots of other game systems (eg, DamageFX) use FXLists to abstract AV effects into data files (rather than hardcoding them, which would be suboptimal).

Important notes:

– an FXList is specified solely by name, and the only parameters it receives when performing its AV effects are a primary (and optional secondary) object position.

– There is no inheritance or overriding of FXLists; if you need an FXList that is nearly-but-not-quite identical to an existing one, you must simply make an entirely new FXList. Realistically, this shouldn't be a problem, since they are pretty simple to specify, and don't consume a lot of memory.

– an FXList is shared between multiple units. To help enforce this, all it's methods are declared 'const'. If you can't implement the stuff you need within this framework, please don't simply de-const things, because it could lead to very strange side-effects. Instead, the system will have to be enhanced to allow for multiple instances of each FXNugget.

– Unlike most other game systems, FXList can't be overridden by subsequent INI file loads. This isn't really a problem, because all you really need to do to "override" one is to specify a different one.

Definition at line 123 of file FXList.h.

Constructor & Destructor Documentation

◆ FXList()

FXList::FXList ( )

Definition at line 784 of file FXList.cpp.

◆ ~FXList()

FXList::~FXList ( )
virtual

Definition at line 789 of file FXList.cpp.

Member Function Documentation

◆ addFXNugget()

void FXList::addFXNugget ( FXNugget * fxn)
inline

add a nugget to the list. It belongs to the FXList, who is responsible for freeing it.

Definition at line 139 of file FXList.h.

◆ clear()

void FXList::clear ( )

Toss the contents.

Definition at line 795 of file FXList.cpp.

◆ doFXObj() [1/2]

static void FXList::doFXObj ( const FXList * fx,
const Object * primary,
const Object * secondary = NULL )
inlinestatic

inline convenience method to avoid having to check for null.

Definition at line 151 of file FXList.h.

◆ doFXObj() [2/2]

void FXList::doFXObj ( const Object * primary,
const Object * secondary = NULL ) const
protected

the object-based version... by default, just call the location-based implementation. Note that primary and/or secondary can be null, so you must check for this.

Definition at line 818 of file FXList.cpp.

◆ doFXPos() [1/2]

void FXList::doFXPos ( const Coord3D * primary,
const Matrix3D * primaryMtx = NULL,
const Real primarySpeed = 0.0f,
const Coord3D * secondary = NULL,
const Real overrideRadius = 0.0f ) const
protected

The main guts of the system: actually perform the sound and/or video effects needed. Note that primary and/or secondary can be null, so you must check for this.

Definition at line 806 of file FXList.cpp.

◆ doFXPos() [2/2]

static void FXList::doFXPos ( const FXList * fx,
const Coord3D * primary,
const Matrix3D * primaryMtx = NULL,
const Real primarySpeed = 0.0f,
const Coord3D * secondary = NULL,
const Real overrideRadius = 0.0f )
inlinestatic

inline convenience method to avoid having to check for null.

Definition at line 145 of file FXList.h.


The documentation for this class was generated from the following files: