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

#include <FXList.h>

Inherits MemoryPoolObject.

Inherited by FXListAtBonePosFXNugget, LightPulseFXNugget, ParticleSystemFXNugget, RayEffectFXNugget, SoundFXNugget, TerrainScorchFXNugget, TracerFXNugget, and ViewShakeFXNugget.

Public Member Functions

 FXNugget ()
 
virtual void doFXPos (const Coord3D *primary, const Matrix3D *primaryMtx=NULL, const Real primarySpeed=0.0f, const Coord3D *secondary=NULL, const Real overrideRadius=0.0f) const =0
 
virtual void doFXObj (const Object *primary, const Object *secondary=NULL) const
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 

Additional Inherited Members

- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Detailed Description

An FXNugget encapsulates a particular type of audio/video effect. FXNuggets are virtually never used on their own, but rather, as a component of an FXList (see below).

Important notes:

FXNugget is an ABC; all the implementations are (currently) located in FXList.cpp, thought they will probably be spread out more as we add more implementations.

– As part of an FXList, an FXNugget is shared between multiple units. The implication is that an FXNugget should not require private data storage to do what it needs to do, aside from stuff initialized at FXNugget instantiation time (eg, parameters from an INI file). To help enforce this, all it's methods are declared 'const'. If you can't implement what 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.

– an individual FXNugget is generally not directly accessible to anyone outside of the FXList system; in fact, it could probably be a private class, but isn't, mainly for coding convenience.

– Unlike most other game systems, FXNuggets 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 73 of file FXList.h.

Constructor & Destructor Documentation

◆ FXNugget()

FXNugget::FXNugget ( )
inline

Definition at line 78 of file FXList.h.

Member Function Documentation

◆ doFXObj()

void FXNugget::doFXObj ( const Object * primary,
const Object * secondary = NULL ) const
virtual

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.

Reimplemented in FXListAtBonePosFXNugget, LightPulseFXNugget, ParticleSystemFXNugget, and SoundFXNugget.

Definition at line 86 of file FXList.cpp.

◆ doFXPos()

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

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.

Implemented in FXListAtBonePosFXNugget, LightPulseFXNugget, ParticleSystemFXNugget, RayEffectFXNugget, SoundFXNugget, TerrainScorchFXNugget, TracerFXNugget, and ViewShakeFXNugget.


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