(self, args)
return self._values.new_integer().from_int(result)
STRIG: poll the joystick fire button.
STRIG: poll the joystick fire button.
STRIG : poll the joystick fire button .
def strig_(self, args):
        """STRIG: poll the joystick fire button."""
        fn, = args
        fn = values.to_int(fn)
        error.range_check(0, 7, fn)
        # 0,1 -> [0][0] 2,3 -> [0][1]  4,5-> [1][0]  6,7 -> [1][1]
        joy, trig = fn // 4, (fn//2) % 2
        if fn % 2 == 0:
            # has been fired
            stick_was_trig = self._was_fired[joy][trig]
            self._was_fired[joy][trig] = False
            result = -1 if stick_was_trig else 0
        else:
            # is currently firing
            result = -1 if self.is_firing[joy][trig] else 0
        return self._values.new_integer().from_int(result)
def strig_ ( self , args ) : fn , = args fn = values . to_int ( fn ) error . range_check ( 0 , 7 , fn ) # 0,1 -> [0][0] 2,3 -> [0][1]  4,5-> [1][0]  6,7 -> [1][1] joy , trig = fn // 4 , ( fn // 2 ) % 2 if fn % 2 == 0 : # has been fired stick_was_trig = self . _was_fired [ joy ] [ trig ] self . _was_fired [ joy ] [ trig ] = False result = - 1 if stick_was_trig else 0 else : # is currently firing result = - 1 if self . is_firing [ joy ] [ trig ] else 0 return self . _values . new_integer ( ) . from_int ( result )