Ejemplo n.º 1
0
    def on_transition(self):
        self._power_found = False
        as64core.enable_predictions(True)
        as64core.enable_xcam_count(True)
        as64core.fps = 15

        super().on_transition()
Ejemplo n.º 2
0
    def on_transition(self):
        as64core.fps = 29.97
        as64core.enable_predictions(True)
        self._running_total = 0
        self._flash_count = 0
        self._prev_prediction = 0

        super().on_transition()
Ejemplo n.º 3
0
    def execute(self):
        reset_region = as64core.get_region(as64core.RESET_REGION)
        # TODO: SWITCH TO USING FADE_STATUS
        # If centre of screen is black, and the current split conditions are met, trigger split
        if is_black(reset_region, self._black_threshold) and as64core.incoming_split(star_count=False) and as64core.current_split().split_type == as64core.SPLIT_FADE_ONLY:
            as64core.split()
            self._split_occurred = True

        # Check for a match against the reset_template (SM64 logo)
        if as64core.fade_status == self._is_reset(reset_region, self._reset_template):
            as64core.enable_predictions(True)
            self._split_occurred = False
            self._reset()
            return self.signals["RESET"]
        elif self._is_reset(reset_region, self._reset_template_2):
            as64core.enable_predictions(True)
            self._split_occurred = False
            self._reset()
            return self.signals["RESET"]

        # If both star count, and life count are still black, reprocess fadeout, otherwise fadeout completed
        if as64core.fade_status in (as64core.FADEOUT_COMPLETE, as64core.FADEOUT_PARTIAL):
            return self.signals["LOOP"]
        else:
            as64core.enable_predictions(True)
            self._split_occurred = False
            return self.signals["COMPLETE"]
Ejemplo n.º 4
0
    def execute(self):
        if as64core.fade_status in (as64core.FADEOUT_PARTIAL, as64core.FADEOUT_COMPLETE):
            return self.signals["FADEOUT"]

        if as64core.fadeout_count == 1:
            as64core.fps = 29.97
            as64core.enable_predictions(not self._predictions)
            xcam = as64core.get_region(as64core.XCAM_REGION)
            lower = np.array(self.lower_bound, dtype="uint8")
            upper = np.array(self.upper_bound, dtype="uint8")

            mask = cv2.inRange(xcam, lower, upper)
            output = cv2.bitwise_and(xcam, xcam, mask=mask)

            if not is_black(output, 0.1, 0.7):
                as64core.split()
                as64core.fps = 10
                as64core.fadeout_count = 0
                as64core.set_in_game(True)
                return self.signals["START"]

        return self.signals["LOOP"]
Ejemplo n.º 5
0
    def execute(self):
        reset_region = as64core.get_region(as64core.RESET_REGION)

        # Check for a match against the reset_template (SM64 logo)
        if self._is_reset(reset_region, self._reset_template):
            as64core.enable_predictions(True)
            self._reset()
            return self.signals["RESET"]
        elif self._is_reset(reset_region, self._reset_template_2):
            as64core.enable_predictions(True)
            self._reset()
            return self.signals["RESET"]

        # If both star count, and life count are still black, reprocess fadeout, otherwise fadeout completed
        if as64core.fade_status in (as64core.FADEOUT_COMPLETE, as64core.FADEOUT_PARTIAL):
            return self.signals["LOOP"]
        else:
            as64core.enable_predictions(True)
            return self.signals["COMPLETE"]
Ejemplo n.º 6
0
    def on_transition(self):
        as64core.fps = 10
        as64core.enable_predictions(True)

        super().on_transition()
Ejemplo n.º 7
0
    def on_transition(self):
        as64core.fps = 29.97
        as64core.enable_predictions(True)
        as64core.enable_xcam_count(True)

        super().on_transition()
Ejemplo n.º 8
0
 def on_transition(self):
     as64core.fps = self._fps
     as64core.enable_predictions(False)
     as64core.enable_xcam_count(False)
     super().on_transition()
Ejemplo n.º 9
0
 def on_transition(self):
     as64core.enable_predictions(False)
     as64core.fps = 10
     super().on_transition()
Ejemplo n.º 10
0
    def on_transition(self):
        as64core.fps = 29.97
        as64core.enable_predictions(False)
        as64core.fadein()

        super().on_transition()
Ejemplo n.º 11
0
 def on_transition(self):
     as64core.fps = config.get("advanced", "star_process_frame_rate")
     as64core.enable_predictions(True)
     as64core.enable_xcam_count(True)
     super().on_transition()