class Input {
	uint16 lastButtons;
	uint16 buttons;
	//------------------------------------------------------------------------------------------------------------------------
	Input() { }
	//------------------------------------------------------------------------------------------------------------------------
	void Update() {
		lastButtons = buttons;
		buttons = Player.Buttons();
	}
	//------------------------------------------------------------------------------------------------------------------------
	// Returns true during the frame the user pressed down the button
	//------------------------------------------------------------------------------------------------------------------------
	bool WeaponLeftDown() {
		return (buttons & BC_WEAPONLEFT) != 0;
	}
	//------------------------------------------------------------------------------------------------------------------------
	// Returns true during the frame the user pressed down the button
	//------------------------------------------------------------------------------------------------------------------------
	bool WeaponRightDown() {
		return (buttons & BC_WEAPONRIGHT) != 0;
	}
	//------------------------------------------------------------------------------------------------------------------------
	// Returns true during the frame the user pressed down the button
	//------------------------------------------------------------------------------------------------------------------------
	bool AttackDown() {
		return ((lastButtons & BC_ATTACK) == 0 && (buttons & BC_ATTACK) != 0);
	}
	//------------------------------------------------------------------------------------------------------------------------
	// Returns true during the frame the user pressed down the button
	//------------------------------------------------------------------------------------------------------------------------
	bool JumpDown() {
		return ((lastButtons & BC_JUMP) == 0 && (buttons & BC_JUMP) != 0);
	}
	//------------------------------------------------------------------------------------------------------------------------
	// Returns true during the frame the user pressed down the button
	//------------------------------------------------------------------------------------------------------------------------
	bool ForwardDown() {
		return ((lastButtons & BC_FORWARD) == 0 && (buttons & BC_FORWARD) != 0);
	}
	//------------------------------------------------------------------------------------------------------------------------
	// Returns true during the frame the user pressed down the button
	//------------------------------------------------------------------------------------------------------------------------
	bool BackwardDown() {
		return ((lastButtons & BC_BACKWARD) == 0 && (buttons & BC_BACKWARD) != 0);
	}
	//------------------------------------------------------------------------------------------------------------------------
	// Returns true during the frame the user pressed down the button
	//------------------------------------------------------------------------------------------------------------------------
	bool StrafeLeftDown() {
		return ((lastButtons & BC_STRAFELEFT) == 0 && (buttons & BC_STRAFELEFT) != 0);
	}
	//------------------------------------------------------------------------------------------------------------------------
	// Returns true during the frame the user pressed down the button
	//------------------------------------------------------------------------------------------------------------------------
	bool StrafeRightDown() {
		return ((lastButtons & BC_STRAFERIGHT) == 0 && (buttons & BC_STRAFERIGHT) != 0);
	}
	//------------------------------------------------------------------------------------------------------------------------
	// Returns true during the frame the user pressed down the button
	//------------------------------------------------------------------------------------------------------------------------
	bool MapZoomInDown() {
		return ((lastButtons & BC_MAPZOOMIN) == 0 && (buttons & BC_MAPZOOMIN) != 0);
	}
	//------------------------------------------------------------------------------------------------------------------------
	// Returns true during the frame the user pressed down the button
	//------------------------------------------------------------------------------------------------------------------------
	bool MapZoomOutDown() {
		return ((lastButtons & BC_MAPZOOMOUT) == 0 && (buttons & BC_MAPZOOMOUT) != 0);
	}
	//------------------------------------------------------------------------------------------------------------------------	
}
