uint16 gInputButtons;
uint16 gInputLastButtons;
//------------------------------------------------------------------------------------------------------------------------
uint16 InputUpdate(const uint16 buttons)
{
	gInputLastButtons = buttons;
	gInputButtons = Player.Buttons();
	return gInputButtons;
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true during the frame the user pressed down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputWeaponLeftDown()
{
	return (gInputButtons & BC_WEAPONLEFT) != 0;
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true during the frame the user pressed down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputWeaponRightDown()
{
	return (gInputButtons & BC_WEAPONRIGHT) != 0;
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true during the frame the user pressed down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputAttackDown()
{
	return ((gInputLastButtons & BC_ATTACK) == 0 && (gInputButtons & BC_ATTACK) != 0);
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true while user is pressing down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputAttackPress()
{
	return (gInputButtons & BC_ATTACK) != 0;
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true during the frame the user pressed down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputJumpDown()
{
	return ((gInputLastButtons & BC_JUMP) == 0 && (gInputButtons & BC_JUMP) != 0);
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true while user is pressing down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputJumpPress()
{
	return (gInputButtons & BC_JUMP) != 0;
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true during the frame the user pressed down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputForwardDown()
{
	return ((gInputLastButtons & BC_FORWARD) == 0 && (gInputButtons & BC_FORWARD) != 0);
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true during the frame the user pressed down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputBackwardDown()
{
	return ((gInputLastButtons & BC_BACKWARD) == 0 && (gInputButtons & BC_BACKWARD) != 0);
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true while user is pressing down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputForwardPress()
{
	return (gInputButtons & BC_FORWARD) != 0;
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true while user is pressing down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputBackwardPress()
{
	return (gInputButtons & BC_BACKWARD) != 0;
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true during the frame the user pressed down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputStrafeLeftDown()
{
	return ((gInputLastButtons & BC_STRAFELEFT) == 0 && (gInputButtons & BC_STRAFELEFT) != 0);
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true during the frame the user pressed down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputStrafeRightDown()
{
	return ((gInputLastButtons & BC_STRAFERIGHT) == 0 && (gInputButtons & BC_STRAFERIGHT) != 0);
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true while user is pressing down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputStrafeLeftPress()
{
	return (gInputButtons & BC_STRAFELEFT) != 0;
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true while user is pressing down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputStrafeRightPress()
{
	return (gInputButtons & BC_STRAFERIGHT) != 0;
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true during the frame the user pressed down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputMapZoomInDown()
{
	return ((gInputLastButtons & BC_MAPZOOMIN) == 0 && (gInputButtons & BC_MAPZOOMIN) != 0);
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true during the frame the user pressed down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputMapZoomOutDown()
{
	return ((gInputLastButtons & BC_MAPZOOMOUT) == 0 && (gInputButtons & BC_MAPZOOMOUT) != 0);
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true while user is pressing down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputMapZoomInPress()
{
	return (gInputButtons & BC_MAPZOOMIN) != 0;
}
//------------------------------------------------------------------------------------------------------------------------
// Returns true while user is pressing down the button
//------------------------------------------------------------------------------------------------------------------------
bool InputMapZoomOutPress()
{
	return (gInputButtons & BC_MAPZOOMOUT) != 0;
}
//------------------------------------------------------------------------------------------------------------------------	
