Skip to content

Commit

Permalink
Merge pull request #1808 from Azaezel/consistentCallbacks1
Browse files Browse the repository at this point in the history
clang: consistent callbacks
  • Loading branch information
Areloch committed Oct 24, 2016
2 parents 60e258e + 5f5466d commit e8aff85
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Engine/source/T3D/gameBase/gameBase.cpp
Expand Up @@ -97,14 +97,14 @@ IMPLEMENT_CALLBACK( GameBaseData, onRemove, void, ( GameBase* obj ), ( obj ),
"@param obj the GameBase object\n\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"
"@param obj the GameBase object being mounted\n"
"@param mountObj the object we are mounted to\n"
"@param node the mountObj node we are mounted to\n\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"
"@param obj the GameBase object being unmounted\n"
"@param mountObj the object we are unmounted from\n"
Expand Down
4 changes: 2 additions & 2 deletions Engine/source/T3D/gameBase/gameBase.h
Expand Up @@ -110,8 +110,8 @@ struct GameBaseData : public SimDataBlock
DECLARE_CALLBACK( void, onAdd, ( GameBase* obj ) );
DECLARE_CALLBACK( void, onRemove, ( GameBase* obj ) );
DECLARE_CALLBACK( void, onNewDataBlock, ( GameBase* obj ) );
DECLARE_CALLBACK( void, onMount, ( GameBase* obj, SceneObject* mountObj, S32 node ) );
DECLARE_CALLBACK( void, onUnmount, ( GameBase* obj, SceneObject* mountObj, S32 node ) );
DECLARE_CALLBACK( void, onMount, ( SceneObject* obj, SceneObject* mountObj, S32 node ) );
DECLARE_CALLBACK( void, onUnmount, ( SceneObject* obj, SceneObject* mountObj, S32 node ) );
/// @}
};

Expand Down
2 changes: 1 addition & 1 deletion Engine/source/T3D/player.cpp
Expand Up @@ -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.
setActionThread(PlayerData::RootAnim,true,false,false);
Expand Down
2 changes: 1 addition & 1 deletion Engine/source/T3D/player.h
Expand Up @@ -628,7 +628,7 @@ class Player: public ShapeBase

/// @name Mounted objects
/// @{
virtual void onUnmount( ShapeBase *obj, S32 node );
virtual void onUnmount( SceneObject *obj, S32 node );
virtual void unmount();
/// @}

Expand Down
4 changes: 2 additions & 2 deletions Engine/source/T3D/shapeBase.h
Expand Up @@ -491,8 +491,8 @@ struct ShapeBaseImageData: public GameBaseData {

/// @name Callbacks
/// @{
DECLARE_CALLBACK( void, onMount, ( ShapeBase* obj, S32 slot, F32 dt ) );
DECLARE_CALLBACK( void, onUnmount, ( ShapeBase* obj, S32 slot, F32 dt ) );
DECLARE_CALLBACK( void, onMount, ( SceneObject* obj, S32 slot, F32 dt ) );
DECLARE_CALLBACK( void, onUnmount, ( SceneObject* obj, S32 slot, F32 dt ) );
/// @}
};

Expand Down
4 changes: 2 additions & 2 deletions Engine/source/T3D/shapeImage.cpp
Expand Up @@ -97,14 +97,14 @@ ConsoleDocClass( ShapeBaseImageData,
"@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"

"@param obj object that this Image has been mounted to\n"
"@param slot Image mount slot on the object\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"

"@param obj object that this Image has been unmounted from\n"
Expand Down
2 changes: 1 addition & 1 deletion Engine/source/T3D/staticShape.cpp
Expand Up @@ -240,7 +240,7 @@ void StaticShape::setTransform(const MatrixF& mat)
setMaskBits(PositionMask);
}

void StaticShape::onUnmount(ShapeBase*,S32)
void StaticShape::onUnmount(SceneObject*,S32)
{
// Make sure the client get's the final server pos.
setMaskBits(PositionMask);
Expand Down
2 changes: 1 addition & 1 deletion Engine/source/T3D/staticShape.h
Expand Up @@ -56,7 +56,7 @@ class StaticShape: public ShapeBase
StaticShapeData* mDataBlock;
bool mPowered;

void onUnmount(ShapeBase* obj,S32 node);
void onUnmount(SceneObject* obj,S32 node);

protected:
enum MaskBits {
Expand Down
6 changes: 3 additions & 3 deletions Engine/source/T3D/turret/turretShape.cpp
Expand Up @@ -60,15 +60,15 @@ ConsoleDocClass( TurretShapeData,
"@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"
"@param turret The TurretShape object.\n"
"@param obj The player that is mounting.\n"
"@param node The node the player is mounting to.\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"
"@param turret The TurretShape object.\n"
"@param obj The player that is unmounting.\n"
Expand Down Expand Up @@ -924,7 +924,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.
setMaskBits(PositionMask);
Expand Down
6 changes: 3 additions & 3 deletions Engine/source/T3D/turret/turretShape.h
Expand Up @@ -93,8 +93,8 @@ class TurretShapeData: public ItemData {

virtual bool preload(bool server, String &errorStr);

DECLARE_CALLBACK( void, onMountObject, ( TurretShape* turret, SceneObject* obj, S32 node ) );
DECLARE_CALLBACK( void, onUnmountObject, ( TurretShape* turret, SceneObject* obj ) );
DECLARE_CALLBACK( void, onMountObject, ( SceneObject* turret, SceneObject* obj, S32 node ) );
DECLARE_CALLBACK( void, onUnmountObject, ( SceneObject* turret, SceneObject* obj ) );
DECLARE_CALLBACK( void, onStickyCollision, ( TurretShape* obj ) );
};

Expand Down Expand Up @@ -150,7 +150,7 @@ class TurretShape: public Item
void _applyLimits(Point3F& rot);
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
bool allowManualRotation;
Expand Down

0 comments on commit e8aff85

Please sign in to comment.