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

#include <WaveGuideUpdate.h>

Inherits UpdateModule.

Public Member Functions

 WaveGuideUpdate (Thing *thing, const ModuleData *moduleData)
 
virtual UpdateSleepTime update (void)
 the update implementation
 
- Public Member Functions inherited from UpdateModule
 UpdateModule (Thing *thing, const ModuleData *moduleData)
 
virtual UpdateModuleInterfacegetUpdate ()
 
DisabledMaskType getDisabledTypesToProcess () const
 
UPDATEMODULE_FRIEND_DECLARATOR UnsignedInt friend_getPriority () const
 
UPDATEMODULE_FRIEND_DECLARATOR UnsignedInt friend_getNextCallFrame () const
 
UPDATEMODULE_FRIEND_DECLARATOR SleepyUpdatePhase friend_getNextCallPhase () const
 
UPDATEMODULE_FRIEND_DECLARATOR void friend_setNextCallFrame (UnsignedInt frame)
 
UPDATEMODULE_FRIEND_DECLARATOR Int friend_getIndexInLogic () const
 
UPDATEMODULE_FRIEND_DECLARATOR void friend_setIndexInLogic (Int i)
 
UPDATEMODULE_FRIEND_DECLARATOR const Objectfriend_getObject () const
 
- Public Member Functions inherited from BehaviorModule
 BehaviorModule (Thing *thing, const ModuleData *moduleData)
 
virtual BodyModuleInterfacegetBody ()
 
virtual CollideModuleInterfacegetCollide ()
 
virtual ContainModuleInterfacegetContain ()
 
virtual CreateModuleInterfacegetCreate ()
 
virtual DamageModuleInterfacegetDamage ()
 
virtual DestroyModuleInterfacegetDestroy ()
 
virtual DieModuleInterfacegetDie ()
 
virtual SpecialPowerModuleInterfacegetSpecialPower ()
 
virtual UpgradeModuleInterfacegetUpgrade ()
 
virtual StealthUpdategetStealth ()
 
virtual SpyVisionUpdategetSpyVisionUpdate ()
 
virtual ParkingPlaceBehaviorInterfacegetParkingPlaceBehaviorInterface ()
 
virtual RebuildHoleBehaviorInterfacegetRebuildHoleBehaviorInterface ()
 
virtual BridgeBehaviorInterfacegetBridgeBehaviorInterface ()
 
virtual BridgeTowerBehaviorInterfacegetBridgeTowerBehaviorInterface ()
 
virtual BridgeScaffoldBehaviorInterfacegetBridgeScaffoldBehaviorInterface ()
 
virtual OverchargeBehaviorInterfacegetOverchargeBehaviorInterface ()
 
virtual TransportPassengerInterfacegetTransportPassengerInterface ()
 
virtual CaveInterfacegetCaveInterface ()
 
virtual LandMineInterfacegetLandMineInterface ()
 
virtual DieModuleInterfacegetEjectPilotDieInterface ()
 
virtual ProjectileUpdateInterfacegetProjectileUpdateInterface ()
 
virtual AIUpdateInterfacegetAIUpdateInterface ()
 
virtual ExitInterfacegetUpdateExitInterface ()
 
virtual DockUpdateInterfacegetDockUpdateInterface ()
 
virtual RailedTransportDockUpdateInterfacegetRailedTransportDockUpdateInterface (void)
 
virtual SlowDeathBehaviorInterfacegetSlowDeathBehaviorInterface ()
 
virtual SpecialPowerUpdateInterfacegetSpecialPowerUpdateInterface ()
 
virtual SlavedUpdateInterfacegetSlavedUpdateInterface ()
 
virtual ProductionUpdateInterfacegetProductionUpdateInterface ()
 
virtual HordeUpdateInterfacegetHordeUpdateInterface ()
 
virtual PowerPlantUpdateInterfacegetPowerPlantUpdateInterface ()
 
virtual SpawnBehaviorInterfacegetSpawnBehaviorInterface ()
 
virtual CountermeasuresBehaviorInterfacegetCountermeasuresBehaviorInterface ()
 
virtual const CountermeasuresBehaviorInterfacegetCountermeasuresBehaviorInterface () const
 
- Public Member Functions inherited from ObjectModule
 ObjectModule (Thing *thing, const ModuleData *moduleData)
 < this abstract class needs memory pool hooks
 
virtual void onCapture (Player *oldOwner, Player *newOwner)
 
virtual void onDisabledEdge (Bool nowDisabled)
 
- Public Member Functions inherited from Module
 Module (const ModuleData *moduleData)
 < this abstract class needs memory pool hooks
 
virtual NameKeyType getModuleNameKey () const =0
 
NameKeyType getModuleTagNameKey () const
 
virtual void onObjectCreated ()
 
virtual void onDrawableBoundToObject ()
 
virtual void preloadAssets (TimeOfDay timeOfDay)
 preload any assets we might have for this time of day
 
virtual void onDelete (void)
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Protected Types

enum  { MAX_WAVEGUIDE_SHAPE_POINTS = 64 }
 
enum  { MAX_SHAPE_EFFECTS = 3 }
 

Protected Member Functions

Bool initWaveGuide (void)
 initialize the waveguide on motion start
 
Bool startMoving (void)
 start the waveguide moving
 
void computeWaveShapePoints (void)
 compute the wave shape points
 
void transformWaveShape (void)
 build an array we can re-use of the wave shape points
 
void doShapeEffects (void)
 maintenance for the wave shape effects
 
void doWaterMotion (void)
 do the push up water motion
 
void doShoreEffects (void)
 do any effects on the shorelines
 
void doDamage (void)
 do damage to things that have crossed our path
 
- Protected Member Functions inherited from UpdateModule
void setWakeFrame (Object *obj, UpdateSleepTime wakeDelay)
 
UpdateSleepTime getWakeFrame () const
 
virtual SleepyUpdatePhase getUpdatePhase () const
 
UpdateSleepTime frameToSleepTime (UnsignedInt frame1, UnsignedInt frame2=FOREVER, UnsignedInt frame3=FOREVER, UnsignedInt frame4=FOREVER)
 
- Protected Member Functions inherited from BehaviorModule
virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
- Protected Member Functions inherited from ObjectModule
ObjectgetObject ()
 
const ObjectgetObject () const
 
- Protected Member Functions inherited from Module
const ModuleDatagetModuleData () const
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Protected Attributes

UnsignedInt m_activeFrame
 frame we became active on
 
Bool m_needDisable
 
Bool m_initialized
 set to TRUE after we're enabled and in motion
 
Coord3D m_shapePoints [MAX_WAVEGUIDE_SHAPE_POINTS]
 array that will be our "shape" of sample points to affect the water
 
Coord3D m_transformedShapePoints [MAX_WAVEGUIDE_SHAPE_POINTS]
 m_shapePoints transformed into current world coords
 
ParticleSystemID m_shapeEffects [MAX_WAVEGUIDE_SHAPE_POINTS][MAX_SHAPE_EFFECTS]
 particle effects on the wavefront
 
Int m_shapePointCount
 number of points in m_shape
 
UnsignedInt m_splashSoundFrame
 frame we last tried to play a splash sound on
 
Coord3D m_finalDestination
 the final destination of the waveguide path
 

Additional Inherited Members

- Static Public Member Functions inherited from UpdateModule
static Int getInterfaceMask ()
 
- Static Public Member Functions inherited from BehaviorModule
static Int getInterfaceMask ()
 
static ModuleType getModuleType ()
 
- Static Public Member Functions inherited from Module
static ModuleDatafriend_newModuleData (INI *ini)
 

Detailed Description

Definition at line 72 of file WaveGuideUpdate.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
MAX_WAVEGUIDE_SHAPE_POINTS 

Definition at line 103 of file WaveGuideUpdate.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
MAX_SHAPE_EFFECTS 

Definition at line 106 of file WaveGuideUpdate.h.

Constructor & Destructor Documentation

◆ WaveGuideUpdate()

WaveGuideUpdate::WaveGuideUpdate ( Thing * thing,
const ModuleData * moduleData )

Definition at line 117 of file WaveGuideUpdate.cpp.

Member Function Documentation

◆ computeWaveShapePoints()

void WaveGuideUpdate::computeWaveShapePoints ( void )
protected

compute the wave shape points

Definition at line 313 of file WaveGuideUpdate.cpp.

◆ doDamage()

void WaveGuideUpdate::doDamage ( void )
protected

do damage to things that have crossed our path

Do damage to things that have fallen victim in the path of this enourmous wave

Definition at line 550 of file WaveGuideUpdate.cpp.

◆ doShapeEffects()

void WaveGuideUpdate::doShapeEffects ( void )
protected

maintenance for the wave shape effects

Update phase for the effects that make up the front shape of the wave

Definition at line 375 of file WaveGuideUpdate.cpp.

◆ doShoreEffects()

void WaveGuideUpdate::doShoreEffects ( void )
protected

do any effects on the shorelines

Any points in our wave that are on the shoreline that are close enough to the effect points for the shore will do those effects

Definition at line 450 of file WaveGuideUpdate.cpp.

◆ doWaterMotion()

void WaveGuideUpdate::doWaterMotion ( void )
protected

do the push up water motion

Given all our sample points, make the wave go

Definition at line 422 of file WaveGuideUpdate.cpp.

◆ initWaveGuide()

Bool WaveGuideUpdate::initWaveGuide ( void )
protected

initialize the waveguide on motion start

The wave guide has started moving ... this is called once

Definition at line 248 of file WaveGuideUpdate.cpp.

◆ startMoving()

Bool WaveGuideUpdate::startMoving ( void )
protected

start the waveguide moving

Start the waveguide moving along its waypoint path, bringing water destruction and havok upon the land

Definition at line 156 of file WaveGuideUpdate.cpp.

◆ transformWaveShape()

void WaveGuideUpdate::transformWaveShape ( void )
protected

build an array we can re-use of the wave shape points

Given the current position and orientation of the wave guide, transform all the wave shape points so we can quickly access them for mutliple reasons

Definition at line 353 of file WaveGuideUpdate.cpp.

◆ update()

UpdateSleepTime WaveGuideUpdate::update ( void )
virtual

the update implementation

Todo
srj use SLEEPY_UPDATE here

Implements UpdateModule.

Definition at line 758 of file WaveGuideUpdate.cpp.

Member Data Documentation

◆ m_activeFrame

UnsignedInt WaveGuideUpdate::m_activeFrame
protected

frame we became active on

Definition at line 99 of file WaveGuideUpdate.h.

◆ m_finalDestination

Coord3D WaveGuideUpdate::m_finalDestination
protected

the final destination of the waveguide path

Definition at line 111 of file WaveGuideUpdate.h.

◆ m_initialized

Bool WaveGuideUpdate::m_initialized
protected

set to TRUE after we're enabled and in motion

Definition at line 101 of file WaveGuideUpdate.h.

◆ m_needDisable

Bool WaveGuideUpdate::m_needDisable
protected

Definition at line 100 of file WaveGuideUpdate.h.

◆ m_shapeEffects

ParticleSystemID WaveGuideUpdate::m_shapeEffects[MAX_WAVEGUIDE_SHAPE_POINTS][MAX_SHAPE_EFFECTS]
protected

particle effects on the wavefront

Definition at line 107 of file WaveGuideUpdate.h.

◆ m_shapePointCount

Int WaveGuideUpdate::m_shapePointCount
protected

number of points in m_shape

Definition at line 108 of file WaveGuideUpdate.h.

◆ m_shapePoints

Coord3D WaveGuideUpdate::m_shapePoints[MAX_WAVEGUIDE_SHAPE_POINTS]
protected

array that will be our "shape" of sample points to affect the water

Definition at line 104 of file WaveGuideUpdate.h.

◆ m_splashSoundFrame

UnsignedInt WaveGuideUpdate::m_splashSoundFrame
protected

frame we last tried to play a splash sound on

Definition at line 109 of file WaveGuideUpdate.h.

◆ m_transformedShapePoints

Coord3D WaveGuideUpdate::m_transformedShapePoints[MAX_WAVEGUIDE_SHAPE_POINTS]
protected

m_shapePoints transformed into current world coords

Definition at line 105 of file WaveGuideUpdate.h.


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