include "target.tmh"
int main()
{
if(Init(&EventHandle)) return 1;
MapAxis(&Throttle, THR_LEFT, DX_Z_AXIS);
MapAxis(&Throttle, THR_RIGHT, DX_XROT_AXIS);
}
int EventHandle(int type, alias o, int x)
{
if(&o == &Throttle) // if the event came from Throttle
{
if(x == THR_LEFT)
{
DXAxis(DX_ZROT_AXIS, Throttle[THR_LEFT]);
}
else if(x == THR_RIGHT)
{
DXAxis(DX_YROT_AXIS, Throttle[THR_RIGHT]);
}
}
DefaultMapping(&o, x);
}