Browse Source

Merge pull request #1808 from Azaezel/consistentCallbacks1

clang: consistent callbacks
Areloch 8 years ago
parent
commit
e8aff85322

+ 2 - 2
Engine/source/T3D/gameBase/gameBase.cpp

@@ -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"

+ 2 - 2
Engine/source/T3D/gameBase/gameBase.h

@@ -110,8 +110,8 @@ public:
    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 ) );
    /// @}
 };
 

+ 1 - 1
Engine/source/T3D/player.cpp

@@ -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);

+ 1 - 1
Engine/source/T3D/player.h

@@ -628,7 +628,7 @@ protected:
 
    /// @name Mounted objects
    /// @{
-   virtual void onUnmount( ShapeBase *obj, S32 node );
+   virtual void onUnmount( SceneObject *obj, S32 node );
    virtual void unmount();
    /// @}
 

+ 2 - 2
Engine/source/T3D/shapeBase.h

@@ -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 ) );
    /// @}
 };
 

+ 2 - 2
Engine/source/T3D/shapeImage.cpp

@@ -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"

+ 1 - 1
Engine/source/T3D/staticShape.cpp

@@ -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);

+ 1 - 1
Engine/source/T3D/staticShape.h

@@ -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 {

+ 3 - 3
Engine/source/T3D/turret/turretShape.cpp

@@ -60,7 +60,7 @@ 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"
@@ -68,7 +68,7 @@ IMPLEMENT_CALLBACK( TurretShapeData, onMountObject, void, ( TurretShape* turret,
    "@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"
@@ -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);

+ 3 - 3
Engine/source/T3D/turret/turretShape.h

@@ -93,8 +93,8 @@ public:
 
    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 ) );
 };
 
@@ -150,7 +150,7 @@ protected:
    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;