afxMagicSpell
Engine/source/afx/afxMagicSpell.h
Classes:
Private Types
MaskBits { MagicMissileMask = Parent::NextFreeMask << 0 StateEventMask = Parent::NextFreeMask << 1 LaunchEventMask = Parent::NextFreeMask << 2 ImpactEventMask = Parent::NextFreeMask << 3 SyncEventMask = Parent::NextFreeMask << 4 RemapConstraintMask = Parent::NextFreeMask << 5 NextFreeMask = Parent::NextFreeMask << 6 }
Parent
Public Types
_Anonymous_ { NULL_EVENT ACTIVATE_EVENT LAUNCH_EVENT IMPACT_EVENT SHUTDOWN_EVENT DEACTIVATE_EVENT INTERRUPT_PHASE_EVENT INTERRUPT_SPELL_EVENT }
_Anonymous_ { INACTIVE_STATE CASTING_STATE DELIVERY_STATE LINGER_STATE CLEANUP_STATE DONE_STATE LATE_STATE }
_Anonymous_ { MARK_ACTIVATE = BIT(0) MARK_LAUNCH = BIT(1) MARK_IMPACT = BIT(2) MARK_SHUTDOWN = BIT(3) MARK_DEACTIVATE = BIT(4) MARK_END_CASTING = BIT(5) MARK_END_DELIVERY = BIT(6) MARK_END_LINGER = BIT(7) MARK_INTERRUPT_CASTING = BIT(8) MARK_INTERRUPT_DELIVERY = BIT(9) MARK_INTERRUPT_LINGER = BIT(10) MARK_INTERRUPT_CLEANUP = BIT(11) MARK_ENDINGS = MARK_END_CASTING | MARK_END_DELIVERY | MARK_END_LINGER MARK_INTERRUPTS = MARK_INTERRUPT_CASTING | MARK_INTERRUPT_DELIVERY | MARK_INTERRUPT_LINGER | MARK_INTERRUPT_CLEANUP }
Public Friends
class
Private Static Attributes
Private Attributes
bool
bool
bool
bool
bool
Private Functions
change_state_c(U8 pending_state)
change_state_s(U8 pending_state)
bool
enter_casting_state_c(F32 starttime)
enter_delivery_state_c(F32 starttime)
enter_linger_state_c(F32 starttime)
bool
is_caster_client(ShapeBase * caster, GameConnection * conn)
bool
bool
is_impact_in_water(SceneObject * obj, const Point3F & p)
process_client(F32 dt)
bool
Protected Functions
pack_constraint_info(NetConnection * conn, BitStream * stream)
bool
remap_builtin_constraint(SceneObject * , const char * cons_name)
unpack_constraint_info(NetConnection * conn, BitStream * stream)
Public Functions
afxMagicSpell(ShapeBase * caster, SceneObject * target)
bool
activationCallInit(bool postponed)
advanceTime(F32 dt)
Advances simulation time for animations.
DECLARE_CATEGORY("AFX" )
executeScriptEvent(const char * method, afxConstraint * , const MatrixF & pos, const char * data)
getTimeFactor(U8 phase)
impactNotify(const Point3F & p, const Point3F & n, SceneObject * )
inflictDamage(const char * label, const char * flavor, SimObjectId target, F32 amt, U8 count, F32 ad_amt, F32 rad, Point3F pos, F32 imp)
bool
onAdd()
Called when the object is added to the sim.
onDeleteNotify(SimObject * object)
Called when a SimObject is deleted.
bool
onNewDataBlock(GameBaseData * dptr, bool reload)
Called when a new datablock is set.
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Instructs this object to pack its state for transfer over the network.
postSpellEvent(U8 event)
processTick(const Move * move)
Processes a move event and updates object state once every 32 milliseconds.
setTimeFactor(F32 f)
setTimeFactor(U8 phase, F32 f)
unpackUpdate(NetConnection * conn, BitStream * stream)
Instructs this object to read state data previously packed with packUpdate.
Public Static Functions
cast_spell(afxMagicSpellData * , ShapeBase * caster, SceneObject * target, SimObject * extra)
displayScreenMessage(ShapeBase * caster, const char * msg)
Detailed Description
Private Types
MaskBits
Enumerator
- MagicMissileMask = Parent::NextFreeMask << 0
- StateEventMask = Parent::NextFreeMask << 1
- LaunchEventMask = Parent::NextFreeMask << 2
- ImpactEventMask = Parent::NextFreeMask << 3
- SyncEventMask = Parent::NextFreeMask << 4
- RemapConstraintMask = Parent::NextFreeMask << 5
- NextFreeMask = Parent::NextFreeMask << 6
typedef afxChoreographer Parent
Public Types
@17
Enumerator
- NULL_EVENT
- ACTIVATE_EVENT
- LAUNCH_EVENT
- IMPACT_EVENT
- SHUTDOWN_EVENT
- DEACTIVATE_EVENT
- INTERRUPT_PHASE_EVENT
- INTERRUPT_SPELL_EVENT
@18
Enumerator
- INACTIVE_STATE
- CASTING_STATE
- DELIVERY_STATE
- LINGER_STATE
- CLEANUP_STATE
- DONE_STATE
- LATE_STATE
@19
Enumerator
- MARK_ACTIVATE = BIT(0)
- MARK_LAUNCH = BIT(1)
- MARK_IMPACT = BIT(2)
- MARK_SHUTDOWN = BIT(3)
- MARK_DEACTIVATE = BIT(4)
- MARK_END_CASTING = BIT(5)
- MARK_END_DELIVERY = BIT(6)
- MARK_END_LINGER = BIT(7)
- MARK_INTERRUPT_CASTING = BIT(8)
- MARK_INTERRUPT_DELIVERY = BIT(9)
- MARK_INTERRUPT_LINGER = BIT(10)
- MARK_INTERRUPT_CLEANUP = BIT(11)
- MARK_ENDINGS = MARK_END_CASTING | MARK_END_DELIVERY | MARK_END_LINGER
- MARK_INTERRUPTS = MARK_INTERRUPT_CASTING | MARK_INTERRUPT_DELIVERY | MARK_INTERRUPT_LINGER | MARK_INTERRUPT_CLEANUP
Public Friends
Private Static Attributes
StringTableEntry CAMERA_CONS
StringTableEntry CASTER_CONS
StringTableEntry IMPACT_POINT_CONS
StringTableEntry IMPACTED_OBJECT_CONS
StringTableEntry LISTENER_CONS
StringTableEntry MISSILE_CONS
StringTableEntry TARGET_CONS
Private Attributes
afxConstraintID mCamera_cons_id
SceneObject * mCamera_cons_obj
ShapeBase * mCaster
afxConstraintID mCaster_cons_id
SimObject * mCaster_field
U16 mCaster_scope_id
bool mConstraints_initialized
afxMagicSpellData * mDatablock
SimObject * mExeblock
Point3F mImpact_norm
Point3F mImpact_pos
afxConstraintID mImpacted_cons_id
bool mImpacted_is_shape
SceneObject * mImpacted_obj
U16 mImpacted_scope_id
afxConstraintID mListener_cons_id
U16 mMarks_mask
afxMagicMissile * mMissile
afxMagicMissileData * mMissile_db
bool mMissile_is_armed
bool mNotify_castbar
F32 mOverall_time_factor
afxPhrase * mPhrases [NUM_PHRASES]
bool mScoping_initialized
F32 mSpell_elapsed
U8 mSpell_state
SceneObject * mTarget
afxConstraintID mTarget_cons_id
SimObject * mTarget_field
bool mTarget_is_shape
U16 mTarget_scope_id
F32 mTfactors [NUM_PHRASES]
Private Functions
change_state_c(U8 pending_state)
change_state_s(U8 pending_state)
cleanup_over()
enter_casting_state_c(F32 starttime)
enter_casting_state_s()
enter_delivery_state_c(F32 starttime)
enter_delivery_state_s()
enter_done_state_s()
enter_linger_state_c(F32 starttime)
enter_linger_state_s()
init()
init_constraints()
init_missile_c(afxMagicMissileData * mm)
init_missile_s(afxMagicMissileData * mm)
init_scoping()
is_caster_client(ShapeBase * caster, GameConnection * conn)
is_caster_moving()
is_impact_in_water(SceneObject * obj, const Point3F & p)
launch_missile_c()
launch_missile_s()
leave_casting_state_c()
leave_casting_state_s()
leave_delivery_state_c()
leave_delivery_state_s()
leave_linger_state_c()
leave_linger_state_s()
process_client(F32 dt)
process_server()
setup_casting_fx()
setup_delivery_fx()
setup_impact_fx()
setup_launch_fx()
setup_linger_fx()
state_elapsed()
state_expired()
sync_client(U16 marks, U8 state, F32 state_elapsed, F32 spell_elapsed)
Protected Functions
pack_constraint_info(NetConnection * conn, BitStream * stream)
Reimplemented from: afxChoreographer
remap_builtin_constraint(SceneObject * , const char * cons_name)
Reimplemented from: afxChoreographer
unpack_constraint_info(NetConnection * conn, BitStream * stream)
Reimplemented from: afxChoreographer
Public Functions
afxMagicSpell()
afxMagicSpell(ShapeBase * caster, SceneObject * target)
~afxMagicSpell()
activate()
activationCallInit(bool postponed)
advanceTime(F32 dt)
Reimplemented from: ProcessObject
DECLARE_CATEGORY("AFX" )
DECLARE_CONOBJECT(afxMagicSpell )
executeScriptEvent(const char * method, afxConstraint * , const MatrixF & pos, const char * data)
Reimplemented from: afxChoreographer
finish_startup()
getCaster()
getImpactedObject()
getMissile()
getTarget()
getTimeFactor()
getTimeFactor(U8 phase)
impactNotify(const Point3F & p, const Point3F & n, SceneObject * )
Reimplemented from: afxChoreographer
inflictDamage(const char * label, const char * flavor, SimObjectId target, F32 amt, U8 count, F32 ad_amt, F32 rad, Point3F pos, F32 imp)
Reimplemented from: afxChoreographer
onAdd()
Reimplemented from: afxChoreographer
onDeleteNotify(SimObject * object)
Reimplemented from: afxChoreographer
onNewDataBlock(GameBaseData * dptr, bool reload)
Reimplemented from: afxChoreographer
onRemove()
Reimplemented from: afxChoreographer
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Reimplemented from: afxChoreographer
postSpellEvent(U8 event)
processTick(const Move * move)
Reimplemented from: ProcessObject
resolveTimeFactors()
restoreObject(SceneObject * )
Reimplemented from: afxChoreographer
setTimeFactor(F32 f)
setTimeFactor(U8 phase, F32 f)
sync_with_clients()
Reimplemented from: afxChoreographer
unpackUpdate(NetConnection * conn, BitStream * stream)
Reimplemented from: afxChoreographer
Public Static Functions
cast_spell(afxMagicSpellData * , ShapeBase * caster, SceneObject * target, SimObject * extra)
displayScreenMessage(ShapeBase * caster, const char * msg)
getShapeImpactPos(SceneObject * )
initPersistFields()