1 | function joystick_pov(argument0) //gml_Script_joystick_pov |
2 | { |
3 | var jid = __joystick_2_gamepad(argument0) |
4 | var mask = 0 |
5 | mask |= gamepad_button_value(jid, gp_padu) > 0 |
6 | mask |= (gamepad_button_value(jid, gp_padr) > 0 ? 2 : 0) |
7 | mask |= (gamepad_button_value(jid, gp_padd) > 0 ? 4 : 0) |
8 | mask |= (gamepad_button_value(jid, gp_padl) > 0 ? 8 : 0) |
9 | return global.__jstick_povangle[mask]; |
10 | } |