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

#include <RayEffect.h>

Inherits SubsystemInterface.

Public Member Functions

 RayEffectSystem (void)
 
 ~RayEffectSystem (void)
 
virtual void init (void)
 
virtual void reset (void)
 
virtual void update (void)
 
void addRayEffect (const Drawable *draw, const Coord3D *startLoc, const Coord3D *endLoc)
 add a ray effect entry for this drawable
 
void deleteRayEffect (const Drawable *draw)
 given a drawable, remove its effect from the system
 
void getRayEffectData (const Drawable *draw, RayEffectData *effectData)
 
- Public Member Functions inherited from SubsystemInterface
 SubsystemInterface ()
 
virtual ~SubsystemInterface ()
 
virtual void postProcessLoad ()
 
virtual void draw (void)
 
void UPDATE (void)
 
void DRAW (void)
 
AsciiString getName (void)
 
void setName (AsciiString name)
 

Protected Types

enum  { MAX_RAY_EFFECTS = 128 }
 

Protected Member Functions

RayEffectDatafindEntry (const Drawable *draw)
 find an effect data entry based on the drawable
 

Protected Attributes

RayEffectData m_effectData [MAX_RAY_EFFECTS]
 all the ray effects
 
- Protected Attributes inherited from SubsystemInterface
AsciiString m_name
 

Detailed Description

This class maintains all the ray effects visible in the world

Definition at line 57 of file RayEffect.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
MAX_RAY_EFFECTS 

Definition at line 84 of file RayEffect.h.

Constructor & Destructor Documentation

◆ RayEffectSystem()

RayEffectSystem::RayEffectSystem ( void )

Definition at line 71 of file RayEffect.cpp.

◆ ~RayEffectSystem()

RayEffectSystem::~RayEffectSystem ( void )

Definition at line 80 of file RayEffect.cpp.

Member Function Documentation

◆ addRayEffect()

void RayEffectSystem::addRayEffect ( const Drawable * draw,
const Coord3D * startLoc,
const Coord3D * endLoc )

add a ray effect entry for this drawable

add a ray effect entry for this drawable

Todo
this should be more intelligent and should not be limited to any kind of max ray effects, this is all a temporary hack system for the demo anyway right now though

Definition at line 117 of file RayEffect.cpp.

◆ deleteRayEffect()

void RayEffectSystem::deleteRayEffect ( const Drawable * draw)

given a drawable, remove its effect from the system

given a drawable, remove its effect from the system

Definition at line 160 of file RayEffect.cpp.

◆ findEntry()

RayEffectData * RayEffectSystem::findEntry ( const Drawable * draw)
protected

find an effect data entry based on the drawable

Find an effect entry given a drawable

Definition at line 44 of file RayEffect.cpp.

◆ getRayEffectData()

void RayEffectSystem::getRayEffectData ( const Drawable * draw,
RayEffectData * effectData )

given a drawable, if it is in the ray effect system list retrieve the ray effect data for its entry

Definition at line 184 of file RayEffect.cpp.

◆ init()

void RayEffectSystem::init ( void )
virtual

initialize the system

Implements SubsystemInterface.

Definition at line 88 of file RayEffect.cpp.

◆ reset()

void RayEffectSystem::reset ( void )
virtual

Reset

Implements SubsystemInterface.

Definition at line 106 of file RayEffect.cpp.

◆ update()

virtual void RayEffectSystem::update ( void )
inlinevirtual
  • Update methods are the place to do system per frame processing. You should call the system update once each time through the game loop to service the system.
    • Note that currently the GameClient and GameLogic will be updating at different rates where the logic is running real time, and the client will adjust how many loops can be done during one server time slice in order to improve performance on low end machines.

Implements SubsystemInterface.

Definition at line 67 of file RayEffect.h.

Member Data Documentation

◆ m_effectData

RayEffectData RayEffectSystem::m_effectData[MAX_RAY_EFFECTS]
protected

all the ray effects

Definition at line 88 of file RayEffect.h.


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