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

#include <BridgeScaffoldBehavior.h>

Inherits UpdateModule, and BridgeScaffoldBehaviorInterface.

Public Member Functions

 BridgeScaffoldBehavior (Thing *thing, const ModuleData *moduleData)
 
virtual BridgeScaffoldBehaviorInterfacegetBridgeScaffoldBehaviorInterface ()
 
virtual UpdateSleepTime update (void)
 
virtual void setPositions (const Coord3D *createPos, const Coord3D *riseToPos, const Coord3D *buildPos)
 
virtual void setMotion (ScaffoldTargetMotion targetMotion)
 
virtual ScaffoldTargetMotion getCurrentMotion (void)
 
virtual void reverseMotion (void)
 
virtual void setLateralSpeed (Real lateralSpeed)
 
virtual void setVerticalSpeed (Real verticalSpeed)
 
- 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 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)
 

Static Public Member Functions

static BridgeScaffoldBehaviorInterfacegetBridgeScaffoldBehaviorInterfaceFromObject (Object *obj)
 
- 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)
 

Protected Member Functions

void doVerticalMotion (void)
 do rise/sink vertical motion
 
void doLateralmotion (void)
 do lateral motion
 
- 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

ScaffoldTargetMotion m_targetMotion
 which way our motion should be going (build up, still, tear down etc)
 
Coord3D m_createPos
 initial position of object creation (in ground)
 
Coord3D m_riseToPos
 position we "rise to" out of the ground
 
Coord3D m_buildPos
 position we move to and stop at on the bridge surface
 
Real m_lateralSpeed
 speed for lateral motions
 
Real m_verticalSpeed
 speed for vertical motions
 
Coord3D m_targetPos
 current target position for our motion type
 

Detailed Description

Definition at line 70 of file BridgeScaffoldBehavior.h.

Constructor & Destructor Documentation

◆ BridgeScaffoldBehavior()

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

Definition at line 40 of file BridgeScaffoldBehavior.cpp.

Member Function Documentation

◆ doLateralmotion()

void BridgeScaffoldBehavior::doLateralmotion ( void )
protected

do lateral motion

◆ doVerticalMotion()

void BridgeScaffoldBehavior::doVerticalMotion ( void )
protected

do rise/sink vertical motion

◆ getBridgeScaffoldBehaviorInterface()

virtual BridgeScaffoldBehaviorInterface * BridgeScaffoldBehavior::getBridgeScaffoldBehaviorInterface ( )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 83 of file BridgeScaffoldBehavior.h.

◆ getBridgeScaffoldBehaviorInterfaceFromObject()

BridgeScaffoldBehaviorInterface * BridgeScaffoldBehavior::getBridgeScaffoldBehaviorInterfaceFromObject ( Object * obj)
static

STATIC MEMBER: Helper function to retrieve a bridge scaffold interface from an object if one is present

Definition at line 279 of file BridgeScaffoldBehavior.cpp.

◆ getCurrentMotion()

virtual ScaffoldTargetMotion BridgeScaffoldBehavior::getCurrentMotion ( void )
inlinevirtual

Implements BridgeScaffoldBehaviorInterface.

Definition at line 93 of file BridgeScaffoldBehavior.h.

◆ reverseMotion()

void BridgeScaffoldBehavior::reverseMotion ( void )
virtual

Whatever our current state of motion is, reverse it

Implements BridgeScaffoldBehaviorInterface.

Definition at line 111 of file BridgeScaffoldBehavior.cpp.

◆ setLateralSpeed()

virtual void BridgeScaffoldBehavior::setLateralSpeed ( Real lateralSpeed)
inlinevirtual

Implements BridgeScaffoldBehaviorInterface.

Definition at line 95 of file BridgeScaffoldBehavior.h.

◆ setMotion()

void BridgeScaffoldBehavior::setMotion ( ScaffoldTargetMotion targetMotion)
virtual

Set us moving to the right target position for the requested motion type

Implements BridgeScaffoldBehaviorInterface.

Definition at line 78 of file BridgeScaffoldBehavior.cpp.

◆ setPositions()

void BridgeScaffoldBehavior::setPositions ( const Coord3D * createPos,
const Coord3D * riseToPos,
const Coord3D * buildPos )
virtual

Set all of the target positions that we're care about as a moving scaffold object

Implements BridgeScaffoldBehaviorInterface.

Definition at line 64 of file BridgeScaffoldBehavior.cpp.

◆ setVerticalSpeed()

virtual void BridgeScaffoldBehavior::setVerticalSpeed ( Real verticalSpeed)
inlinevirtual

Implements BridgeScaffoldBehaviorInterface.

Definition at line 96 of file BridgeScaffoldBehavior.h.

◆ update()

UpdateSleepTime BridgeScaffoldBehavior::update ( void )
virtual

The update method

Implements UpdateModule.

Definition at line 144 of file BridgeScaffoldBehavior.cpp.

Member Data Documentation

◆ m_buildPos

Coord3D BridgeScaffoldBehavior::m_buildPos
protected

position we move to and stop at on the bridge surface

Definition at line 109 of file BridgeScaffoldBehavior.h.

◆ m_createPos

Coord3D BridgeScaffoldBehavior::m_createPos
protected

initial position of object creation (in ground)

Definition at line 107 of file BridgeScaffoldBehavior.h.

◆ m_lateralSpeed

Real BridgeScaffoldBehavior::m_lateralSpeed
protected

speed for lateral motions

Definition at line 110 of file BridgeScaffoldBehavior.h.

◆ m_riseToPos

Coord3D BridgeScaffoldBehavior::m_riseToPos
protected

position we "rise to" out of the ground

Definition at line 108 of file BridgeScaffoldBehavior.h.

◆ m_targetMotion

ScaffoldTargetMotion BridgeScaffoldBehavior::m_targetMotion
protected

which way our motion should be going (build up, still, tear down etc)

Definition at line 106 of file BridgeScaffoldBehavior.h.

◆ m_targetPos

Coord3D BridgeScaffoldBehavior::m_targetPos
protected

current target position for our motion type

Definition at line 112 of file BridgeScaffoldBehavior.h.

◆ m_verticalSpeed

Real BridgeScaffoldBehavior::m_verticalSpeed
protected

speed for vertical motions

Definition at line 111 of file BridgeScaffoldBehavior.h.


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