/* demo.h  */

#define DEMO_BUFFSIZE	(0x8000)

#define DEMO_NO			(0)
#define DEMO_RECORDING	(1)
#define DEMO_PLAYING	(2)

#define DEMO_POSITIONSTORED		(1)
#define DEMO_ROTATIONSTORED		(2)


// CPW: to simplify stuff, we won't bother storing the analogue values
typedef struct tagDEMOFRAME
{
	short frameNo;				// CPW: for synchroniztion purposes. I think this is what caused so many headaches with Glover
	short flags;
	short padding;
	short rot;					// CPW: character rotation
	int x,y,z;					// CPW: use this to compare positions. If we're a bit off, snap character back using this.
	unsigned short digital;		// CPW: The actual button state to be fed into the pad handling stuff.
	unsigned short debounce;	
}DEMOFRAME;

extern int demoStatus;
extern PadDataType *pReadPad;

void demoStartRecording(void);
void demoStopRecording(void);
void demoStartPlaying(void);
void demoStopPlaying(void);

void demoRecordFrame(int frameNo, VECTOR *pCharPos, int *, unsigned short digital, unsigned short debounce);
void demoPlaybackFrame(int frame, VECTOR *pCharPos, int *pRot);
