/****************************************************************************
*
* QUADBIKE.H
*
* PROGRAMMER : Chris
*    VERSION : 00.00
*    CREATED : 13/07/98
*   MODIFIED : 13/07/98
*       TABS : 5
*
* DESCRIPTION
*	Header file for QUADBIKE.C
*
*****************************************************************************/

#ifndef _QUADBIKE_H
#define _QUADBIKE_H

#ifdef __cplusplus
extern "C" {
#endif

/*---------------------------------------------------------------------------
 *	Import Headers
\*--------------------------------------------------------------------------*/

#ifdef PSX_VERSION
#include "../spec_psx/typedefs.h"
#else
#include "../specific/stypes.h"
#include "../3dsystem/3d_gen.h"
#endif

#include "items.h"
#include "collide.h"

/*---------------------------------------------------------------------------
 *	Type Definitions
\*--------------------------------------------------------------------------*/

typedef struct {
	sint32 Velocity;
	sint16 FrontRot;		// front wheel rotation
	sint16 RearRot;		// rear wheel rotation
	sint32 Revs;      		// For handbrake starts.
	sint32 EngineRevs;
	sint16 track_mesh;
	int skidoo_turn;
	int left_fallspeed, right_fallspeed;
	sint16 momentum_angle, extra_rotation;
	int pitch;
	char Flags;
} QUADINFO;

/*---------------------------------------------------------------------------
 *	Constants
\*--------------------------------------------------------------------------*/

#define QF_DEAD	0x80
#define QF_FALLING	0x40

/*---------------------------------------------------------------------------
 *	Prototypes
\*--------------------------------------------------------------------------*/

#if !defined(QUADINFO_ONLY)

#if defined(PSX_VERSION) && defined(RELOC)

typedef int  (QUADBIKEFUNC1)();
typedef void (QUADBIKEFUNC2)(sint16, ITEM_INFO *, COLL_INFO *);
typedef void (QUADBIKEFUNC3)(ITEM_INFO *);

#define InitialiseQuadBike	((VOIDFUNCSINT16 *)VehiclePtr[0])
#define QuadBikeControl		((QUADBIKEFUNC1 *)VehiclePtr[1])
#define QuadBikeCollision	((QUADBIKEFUNC2 *)VehiclePtr[2])
#define QuadBikeDraw		((QUADBIKEFUNC3 *)VehiclePtr[3])

#else

extern void InitialiseQuadBike(sint16 item_number);
extern int QuadBikeControl();
extern void QuadBikeCollision(sint16 item_number, ITEM_INFO *litem, COLL_INFO *coll);
extern void QuadBikeDraw(ITEM_INFO *item);

#endif

#endif

#ifdef __cplusplus
}
#endif

#endif
