

#ifndef _GLOVCTRL_H_
#define _GLOVCTRL_H_

extern	NEWMODEL	*pBallPSA;
extern	NEWMODEL	*pPlasterPSA;
extern	NEWMODEL	*pGlovePSA;
			   
void	Load_And_Init_Ball();	
void	Load_And_Init_Glove();	

void 	Control_Ball_And_Glove();
void	Control_Glove();
void	ChangeBall(NEWOBJECT *world ,SPRITE *spr);

extern VECTOR gloveVel, glovePos;
extern VECTOR ballVel, ballPos, ballRot;
extern VECTOR cameraVel, cameraPos, cameraRot;

extern COLLDATA	ballColl,gloveColl,cameraColl;
/*
typedef	struct _Behaviour_Physics
{
	long	mass;
	long	gravity;
	long	bounce;		//(4096=full 0=none)
	long	drag;		//(4096=none 0=full)
	long	maxSpeed;
	long	radius;
	long	accel;

}BEHAVIOUR_PHYSICS;
*/
enum
{
	BALL_MODE_NORMAL,
	BALL_MODE_BOWLING,
	BALL_MODE_POWER,
	BALL_MODE_BEARING,
	BALL_MODE_BEACH,
	BALL_MODE_SNOW,
	BALL_MODE_CRYSTAL,
	NUM_BALL_MODES
};

typedef struct _BallCtrl
{
	LONG	type;
	ULONG	hurt;
}BALLCTRL;

typedef struct _GloveCtrl
{
	long	radius;
	long	height;
	USHORT	speed;
	USHORT	oldSpeed;
	USHORT	direction;
	USHORT	animFrame;
	USHORT	animState;
	USHORT	animSpeed;
	USHORT	animCount;
	USHORT	flag;
}GLOVECTRL;

#define	IDLE	0
#define	WALK	1
#define	RUN		2
#define	SLIDE	3
#define	JUMP	4

#define TOPSPEED 256

#define	GRAVITY	4096
typedef struct _GloverSeg
{
	USHORT	start;
	USHORT	end;
}GLOVERSEG;


extern GLOVECTRL	GloveCtrl;

extern BEHAVIOUR_PHYSICS	BallBehaviour[NUM_BALL_MODES];

extern	BALLCTRL	BallCtrl;
#endif