#ifndef _PAD_H_
#define _PAD_H_

#include "stc.h"

#define RDOWN  0x80
#define LDOWN  0x40
#define SEDOWN 0x20
#define STDOWN 0x10
#define RIDOWN 0x08
#define LEDOWN 0x04
#define DODOWN 0x02
#define UPDOWN 0x01

#define YDOWN  0x80
#define XDOWN  0x40
#define BDOWN  0x20
#define ADOWN  0x10
#define NDOWN  0x08
#define MDOWN  0x04
#define RBDOWN 0x02
#define LBDOWN 0x01

extern int lxJoy;
extern int lyJoy;
extern int rxJoy;
extern int ryJoy;

extern BYTE HPadCode;
extern BYTE LPadCode;
extern BYTE LTCode;
extern BYTE RTCode;
extern BYTE HLXCode;
extern BYTE LLXCode;
extern BYTE HLYCode;
extern BYTE LLYCode;
extern BYTE HRXCode;
extern BYTE LRXCode;
extern BYTE HRYCode;
extern BYTE LRYCode;

void SendPadData(void);

extern BYTE xdata keyPadData[20];

#endif // !_PAD_H_