Person player[maxplayers];
-/* convenience functions
- */
-Joint& Person::joint(int bodypart)
-{
- return skeleton.joints[skeleton.jointlabels[bodypart]];
-}
-XYZ& Person::jointPos(int bodypart)
-{
- return joint(bodypart).position;
-}
-XYZ& Person::jointVel(int bodypart)
-{
- return joint(bodypart).velocity;
-}
-
/* EFFECT
*
* USES:
- // convenience
- Joint& joint(int);
- XYZ& jointPos(int);
- XYZ& jointVel(int);
+ // convenience functions
+ inline Joint& joint(int bodypart) { return skeleton.joints[skeleton.jointlabels[bodypart]]; }
+ inline XYZ& jointPos(int bodypart) { return joint(bodypart).position; }
+ inline XYZ& jointVel(int bodypart) { return joint(bodypart).velocity; }
+
void CheckKick();
void CatchFire();
const int maxplayers = 10;
extern Person player[maxplayers];
+
#endif
extern bool visibleloading;
-/* convenience functions
- */
-Joint& Skeleton::joint(int bodypart)
-{
- return joints[jointlabels[bodypart]];
-}
-XYZ& Skeleton::jointPos(int bodypart)
-{
- return joint(bodypart).position;
-}
-XYZ& Skeleton::jointVel(int bodypart)
-{
- return joint(bodypart).velocity;
-}
-
-
/* EFFECT
*/
void dealloc2(void* param)
~Skeleton();
private:
- Joint& joint(int bodypart);
- XYZ& jointPos(int bodypart);
- XYZ& jointVel(int bodypart);
+ // convenience functions
+ // only for Skeleton.cpp
+ inline Joint& joint(int bodypart) { return joints[jointlabels[bodypart]]; }
+ inline XYZ& jointPos(int bodypart) { return joint(bodypart).position; }
+ inline XYZ& jointVel(int bodypart) { return joint(bodypart).velocity; }
+
};
#endif