mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
clang: consistent callbacks
This commit is contained in:
parent
3038e53856
commit
5f5466d90d
10 changed files with 18 additions and 18 deletions
|
|
@ -97,14 +97,14 @@ IMPLEMENT_CALLBACK( GameBaseData, onRemove, void, ( GameBase* obj ), ( obj ),
|
||||||
"@param obj the GameBase object\n\n"
|
"@param obj the GameBase object\n\n"
|
||||||
"@see onAdd for an example\n" );
|
"@see onAdd for an example\n" );
|
||||||
|
|
||||||
IMPLEMENT_CALLBACK( GameBaseData, onMount, void, ( GameBase* obj, SceneObject* mountObj, S32 node ), ( obj, mountObj, node ),
|
IMPLEMENT_CALLBACK( GameBaseData, onMount, void, ( SceneObject* obj, SceneObject* mountObj, S32 node ), ( obj, mountObj, node ),
|
||||||
"@brief Called when the object is mounted to another object in the scene.\n\n"
|
"@brief Called when the object is mounted to another object in the scene.\n\n"
|
||||||
"@param obj the GameBase object being mounted\n"
|
"@param obj the GameBase object being mounted\n"
|
||||||
"@param mountObj the object we are mounted to\n"
|
"@param mountObj the object we are mounted to\n"
|
||||||
"@param node the mountObj node we are mounted to\n\n"
|
"@param node the mountObj node we are mounted to\n\n"
|
||||||
"@see onAdd for an example\n" );
|
"@see onAdd for an example\n" );
|
||||||
|
|
||||||
IMPLEMENT_CALLBACK( GameBaseData, onUnmount, void, ( GameBase* obj, SceneObject* mountObj, S32 node ), ( obj, mountObj, node ),
|
IMPLEMENT_CALLBACK( GameBaseData, onUnmount, void, ( SceneObject* obj, SceneObject* mountObj, S32 node ), ( obj, mountObj, node ),
|
||||||
"@brief Called when the object is unmounted from another object in the scene.\n\n"
|
"@brief Called when the object is unmounted from another object in the scene.\n\n"
|
||||||
"@param obj the GameBase object being unmounted\n"
|
"@param obj the GameBase object being unmounted\n"
|
||||||
"@param mountObj the object we are unmounted from\n"
|
"@param mountObj the object we are unmounted from\n"
|
||||||
|
|
|
||||||
|
|
@ -110,8 +110,8 @@ public:
|
||||||
DECLARE_CALLBACK( void, onAdd, ( GameBase* obj ) );
|
DECLARE_CALLBACK( void, onAdd, ( GameBase* obj ) );
|
||||||
DECLARE_CALLBACK( void, onRemove, ( GameBase* obj ) );
|
DECLARE_CALLBACK( void, onRemove, ( GameBase* obj ) );
|
||||||
DECLARE_CALLBACK( void, onNewDataBlock, ( GameBase* obj ) );
|
DECLARE_CALLBACK( void, onNewDataBlock, ( GameBase* obj ) );
|
||||||
DECLARE_CALLBACK( void, onMount, ( GameBase* obj, SceneObject* mountObj, S32 node ) );
|
DECLARE_CALLBACK( void, onMount, ( SceneObject* obj, SceneObject* mountObj, S32 node ) );
|
||||||
DECLARE_CALLBACK( void, onUnmount, ( GameBase* obj, SceneObject* mountObj, S32 node ) );
|
DECLARE_CALLBACK( void, onUnmount, ( SceneObject* obj, SceneObject* mountObj, S32 node ) );
|
||||||
/// @}
|
/// @}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4514,7 +4514,7 @@ void Player::onImageAnimThreadUpdate(U32 imageSlot, S32 imageShapeIndex, F32 dt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::onUnmount( ShapeBase *obj, S32 node )
|
void Player::onUnmount( SceneObject *obj, S32 node )
|
||||||
{
|
{
|
||||||
// Reset back to root position during dismount.
|
// Reset back to root position during dismount.
|
||||||
setActionThread(PlayerData::RootAnim,true,false,false);
|
setActionThread(PlayerData::RootAnim,true,false,false);
|
||||||
|
|
|
||||||
|
|
@ -628,7 +628,7 @@ protected:
|
||||||
|
|
||||||
/// @name Mounted objects
|
/// @name Mounted objects
|
||||||
/// @{
|
/// @{
|
||||||
virtual void onUnmount( ShapeBase *obj, S32 node );
|
virtual void onUnmount( SceneObject *obj, S32 node );
|
||||||
virtual void unmount();
|
virtual void unmount();
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -491,8 +491,8 @@ struct ShapeBaseImageData: public GameBaseData {
|
||||||
|
|
||||||
/// @name Callbacks
|
/// @name Callbacks
|
||||||
/// @{
|
/// @{
|
||||||
DECLARE_CALLBACK( void, onMount, ( ShapeBase* obj, S32 slot, F32 dt ) );
|
DECLARE_CALLBACK( void, onMount, ( SceneObject* obj, S32 slot, F32 dt ) );
|
||||||
DECLARE_CALLBACK( void, onUnmount, ( ShapeBase* obj, S32 slot, F32 dt ) );
|
DECLARE_CALLBACK( void, onUnmount, ( SceneObject* obj, S32 slot, F32 dt ) );
|
||||||
/// @}
|
/// @}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,14 +97,14 @@ ConsoleDocClass( ShapeBaseImageData,
|
||||||
"@ingroup gameObjects\n"
|
"@ingroup gameObjects\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
IMPLEMENT_CALLBACK( ShapeBaseImageData, onMount, void, ( ShapeBase* obj, S32 slot, F32 dt ), ( obj, slot, dt ),
|
IMPLEMENT_CALLBACK( ShapeBaseImageData, onMount, void, ( SceneObject* obj, S32 slot, F32 dt ), ( obj, slot, dt ),
|
||||||
"@brief Called when the Image is first mounted to the object.\n\n"
|
"@brief Called when the Image is first mounted to the object.\n\n"
|
||||||
|
|
||||||
"@param obj object that this Image has been mounted to\n"
|
"@param obj object that this Image has been mounted to\n"
|
||||||
"@param slot Image mount slot on the object\n"
|
"@param slot Image mount slot on the object\n"
|
||||||
"@param dt time remaining in this Image update\n" );
|
"@param dt time remaining in this Image update\n" );
|
||||||
|
|
||||||
IMPLEMENT_CALLBACK( ShapeBaseImageData, onUnmount, void, ( ShapeBase* obj, S32 slot, F32 dt ), ( obj, slot, dt ),
|
IMPLEMENT_CALLBACK( ShapeBaseImageData, onUnmount, void, ( SceneObject* obj, S32 slot, F32 dt ), ( obj, slot, dt ),
|
||||||
"@brief Called when the Image is unmounted from the object.\n\n"
|
"@brief Called when the Image is unmounted from the object.\n\n"
|
||||||
|
|
||||||
"@param obj object that this Image has been unmounted from\n"
|
"@param obj object that this Image has been unmounted from\n"
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ void StaticShape::setTransform(const MatrixF& mat)
|
||||||
setMaskBits(PositionMask);
|
setMaskBits(PositionMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StaticShape::onUnmount(ShapeBase*,S32)
|
void StaticShape::onUnmount(SceneObject*,S32)
|
||||||
{
|
{
|
||||||
// Make sure the client get's the final server pos.
|
// Make sure the client get's the final server pos.
|
||||||
setMaskBits(PositionMask);
|
setMaskBits(PositionMask);
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ class StaticShape: public ShapeBase
|
||||||
StaticShapeData* mDataBlock;
|
StaticShapeData* mDataBlock;
|
||||||
bool mPowered;
|
bool mPowered;
|
||||||
|
|
||||||
void onUnmount(ShapeBase* obj,S32 node);
|
void onUnmount(SceneObject* obj,S32 node);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum MaskBits {
|
enum MaskBits {
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ ConsoleDocClass( TurretShapeData,
|
||||||
"@ingroup gameObjects\n"
|
"@ingroup gameObjects\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
IMPLEMENT_CALLBACK( TurretShapeData, onMountObject, void, ( TurretShape* turret, SceneObject* obj, S32 node ),( turret, obj, node ),
|
IMPLEMENT_CALLBACK( TurretShapeData, onMountObject, void, ( SceneObject* turret, SceneObject* obj, S32 node ),( turret, obj, node ),
|
||||||
"@brief Informs the TurretShapeData object that a player is mounting it.\n\n"
|
"@brief Informs the TurretShapeData object that a player is mounting it.\n\n"
|
||||||
"@param turret The TurretShape object.\n"
|
"@param turret The TurretShape object.\n"
|
||||||
"@param obj The player that is mounting.\n"
|
"@param obj The player that is mounting.\n"
|
||||||
|
|
@ -77,7 +77,7 @@ IMPLEMENT_CALLBACK( TurretShapeData, onMountObject, void, ( TurretShape* turret,
|
||||||
"@note Server side only.\n"
|
"@note Server side only.\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
IMPLEMENT_CALLBACK( TurretShapeData, onUnmountObject, void, ( TurretShape* turret, SceneObject* obj ),( turret, obj ),
|
IMPLEMENT_CALLBACK( TurretShapeData, onUnmountObject, void, ( SceneObject* turret, SceneObject* obj ),( turret, obj ),
|
||||||
"@brief Informs the TurretShapeData object that a player is unmounting it.\n\n"
|
"@brief Informs the TurretShapeData object that a player is unmounting it.\n\n"
|
||||||
"@param turret The TurretShape object.\n"
|
"@param turret The TurretShape object.\n"
|
||||||
"@param obj The player that is unmounting.\n"
|
"@param obj The player that is unmounting.\n"
|
||||||
|
|
@ -933,7 +933,7 @@ void TurretShape::unmountObject( SceneObject *obj )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TurretShape::onUnmount(ShapeBase*,S32)
|
void TurretShape::onUnmount(SceneObject*,S32)
|
||||||
{
|
{
|
||||||
// Make sure the client get's the final server pos of this turret.
|
// Make sure the client get's the final server pos of this turret.
|
||||||
setMaskBits(PositionMask);
|
setMaskBits(PositionMask);
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,8 @@ public:
|
||||||
|
|
||||||
virtual bool preload(bool server, String &errorStr);
|
virtual bool preload(bool server, String &errorStr);
|
||||||
|
|
||||||
DECLARE_CALLBACK( void, onMountObject, ( TurretShape* turret, SceneObject* obj, S32 node ) );
|
DECLARE_CALLBACK( void, onMountObject, ( SceneObject* turret, SceneObject* obj, S32 node ) );
|
||||||
DECLARE_CALLBACK( void, onUnmountObject, ( TurretShape* turret, SceneObject* obj ) );
|
DECLARE_CALLBACK( void, onUnmountObject, ( SceneObject* turret, SceneObject* obj ) );
|
||||||
DECLARE_CALLBACK( void, onStickyCollision, ( TurretShape* obj ) );
|
DECLARE_CALLBACK( void, onStickyCollision, ( TurretShape* obj ) );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -150,7 +150,7 @@ protected:
|
||||||
void _applyLimits(Point3F& rot);
|
void _applyLimits(Point3F& rot);
|
||||||
bool _outsideLimits(Point3F& rot); ///< Return true if any angle is outside of the limits
|
bool _outsideLimits(Point3F& rot); ///< Return true if any angle is outside of the limits
|
||||||
|
|
||||||
void onUnmount(ShapeBase* obj,S32 node);
|
void onUnmount(SceneObject* obj,S32 node);
|
||||||
|
|
||||||
// Script level control
|
// Script level control
|
||||||
bool allowManualRotation;
|
bool allowManualRotation;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue