예제 #1
0
    def note_to_sb(self, note):
        r_string = ""
        note_in = int(note.t - (60000 / self.bpm * 4))
        playfield_length = int(findsetting("PlayfieldLength"))
        """
        +------+
        | Note |
        +------+
        """
        r_string += "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format(
            "taikohitcircle" if findsetting("UseSkinElements") else "SB/note")

        r_string += " MY,0,{},,{}\n".format(note_in, self.receptor_y())

        if Hitsound(note.hs).iskat() or NoteType(note.note_type).isspinner():
            r_string += " MX,0,{},{},{},{}\n".format(
                note_in, note.t,
                self.receptor_x() - playfield_length *
                (-1 if self.is_reverse else 1), self.receptor_x())
        else:
            r_string += " MX,0,{},{},{},{}\n".format(
                note_in, note.t,
                self.receptor_x() + playfield_length *
                (-1 if self.is_reverse else 1), self.receptor_x())

        r_string += muma.note_mods.sbUtils.sbUtils.scale_big(note)
        r_string += n_trans(note, self.color, note_in)

        if self.is_upside_down:
            r_string += " P,0,{},,V\n".format(note_in)
        if self.is_mirror:
            r_string += " P,0,{},,H\n".format(note_in)
        """
        +--------------+
        | Note Overlay |
        +--------------+
        """
        r_string += muma.note_mods.sbUtils.sbUtils.overlay(note, self.color)
        r_string += n_trans(note, self.color, note_in, True)
        r_string += " MY,0,{},,{}\n".format(note_in, self.receptor_y())
        if Hitsound(note.hs).iskat() or NoteType(note.note_type).isspinner():
            r_string += " MX,0,{},{},{},{}\n".format(
                note_in, note.t,
                self.receptor_x() - playfield_length *
                (-1 if self.is_reverse else 1), self.receptor_x())
        else:
            r_string += " MX,0,{},{},{},{}\n".format(
                note_in, note.t,
                self.receptor_x() + playfield_length *
                (-1 if self.is_reverse else 1), self.receptor_x())
        if self.is_upside_down:
            r_string += " P,0,{},,V\n".format(note_in)
        if self.is_mirror:
            r_string += " P,0,{},,H\n".format(note_in)

        return r_string
예제 #2
0
    def scale_big_clock(note):
        scale = float(findsetting("ScaleFactor")) if isfloat(
            findsetting("ScaleFactor")) else 1

        if Hitsound(note.hs).isfinish():
            return " S,0,{},,{}\n".format(note.t, 0.25 * scale)
        else:
            return " S,0,{},,{}\n".format(note.t, 0.175 * scale)
예제 #3
0
 def tan_scale(note, freq, bpm):
     scale = float(findsetting("ScaleFactor")) if isfloat(
         findsetting("ScaleFactor")) else 1
     size = 0.50 if Hitsound(note.hs).isfinish() else 0.35
     period = 4. / freq
     scale_str = ""
     for x in range(freq, 0, -1):
         scale_str += " S,15,{},{},{},{}\n".format(
             int(note.t - 60000 / bpm * (x - 0.0) * period),
             int(note.t - 60000 / bpm * (x - 0.5) * period), size * scale,
             10 * size * scale)
         scale_str += " S,16,{},{},{},{}\n".format(
             int(note.t - 60000 / bpm * (x - 0.5) * period),
             int(note.t - 60000 / bpm * (x - 1.0) * period), 0,
             size * scale)
     return scale_str
예제 #4
0
    def overlay_clock(note, color):
        scale = float(findsetting("ScaleFactor")) if isfloat(
            findsetting("ScaleFactor")) else 1

        if Hitsound(note.hs).isfinish():
            return "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format("bigcirc_inv" if color == 8 else
                                                                          "taikobigcircleoverlay" if findsetting(
                                                                              "UseSkinElements")
                                                                          else "SB/notebig-overlay") \
                   + " S,0,{},,{}\n".format(note.t, 0.25 * scale)
        else:
            return "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format("hitcirc_inv" if color == 8 else
                                                                          "taikohitcircleoverlay" if findsetting(
                                                                              "UseSkinElements")
                                                                          else "SB/note-overlay") \
                   + " S,0,{},,{}\n".format(note.t, 0.175 * scale)
예제 #5
0
    def note_to_sb(self, note):
        r_string = ""
        playfield_length = int(findsetting("PlayfieldLength"))
        note_in = int(note.t - (60000 / self.bpm * (4 / self.scroll)))
        hitsound = Hitsound(note.hs)
        note_type = NoteType(note.note_type)
        """
        +------+
        | Note |
        +------+
        """
        r_string += "Sprite,Foreground,Centre,\"{}.png\",320,240\n".format(
            "taikohitcircle" if findsetting("UseSkinElements") else "SB/note")
        r_string += " M,0,{},{},{},{},{},{}\n".format(
            note_in, note.t,
            int(self.receptor_x() + playfield_length *
                (-1 if self.is_reverse else 1) *
                math.cos(self.k_angle if hitsound.iskat()
                         or note_type.isspinner() else self.d_angle)),
            int(self.receptor_y() + playfield_length *
                (-1 if self.is_upside_down else 1) *
                math.sin(self.k_angle if hitsound.iskat()
                         or note_type.isspinner() else self.d_angle)),
            self.receptor_x(), self.receptor_y())
        r_string += " R,0,{},,{}\n".format(
            note.t, self.k_angle
            if hitsound.iskat() or note_type.isspinner() else self.d_angle)
        r_string += muma.note_mods.sbUtils.sbUtils.scale_big(note)
        r_string += n_trans(note, self.color, note_in)

        if self.is_upside_down:
            r_string += " P,0,{},,V\n".format(note_in)
        if self.is_mirror:
            r_string += " P,0,{},,H\n".format(note_in)
        """
        +--------------+
        | Note Overlay |
        +--------------+
        """
        r_string += muma.note_mods.sbUtils.sbUtils.overlay(note, self.color)
        r_string += " M,0,{},{},{},{},{},{}\n".format(
            note_in, note.t,
            int(self.receptor_x() + playfield_length *
                (-1 if self.is_reverse else 1) *
                math.cos(self.k_angle if hitsound.iskat()
                         or note_type.isspinner() else self.d_angle)),
            int(self.receptor_y() + playfield_length *
                (-1 if self.is_upside_down else 1) *
                math.sin(self.k_angle if hitsound.iskat()
                         or note_type.isspinner() else self.d_angle)),
            self.receptor_x(), self.receptor_y())
        r_string += " R,0,{},,{}\n".format(
            note.t, self.k_angle
            if hitsound.iskat() or note_type.isspinner() else self.d_angle)
        r_string += muma.note_mods.sbUtils.sbUtils.scale_big(note)
        r_string += n_trans(note, self.color, note_in, True)
        if self.is_upside_down:
            r_string += " P,0,{},,V\n".format(note_in)
        if self.is_mirror:
            r_string += " P,0,{},,H\n".format(note_in)

        return r_string
예제 #6
0
def note_transform(n, transform_type, n_in, overlay=False):
    out = ""
    n_x = n.t - n_in
    n_type = NoteType(n.note_type)
    note_hs = Hitsound(n.hs)
    # 0: None / 1: Abekobe / 2: Confusion / 3: Flashlight / 4: Not Abekobe / 5: Hidden / 6: Hidden+ (Colors only)
    if note_hs.iskat():
        # 2 3 4 5 6
        for case in switch(transform_type):
            if case(0) and not overlay:
                out += " C,0,{},,100,160,255\n".format(n.t)
            if case(1) and not overlay:
                out += " C,0,{},,255,80,80\n".format(n.t)
            if case(2) and not overlay:
                n_x = int(n_x / 4)
                red = random.randint(0, 255)
                green = random.randint(0, 255)
                blue = random.randint(0, 255)
                out += " C,0,{},{},{},{},{},100,160,255\n".format(
                    n_in + n_x, n.t - n_x, red, green, blue)
            if case(3) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},{},0,0,0,100,160,255\n".format(
                    n_in + 3 * n_x, n.t - 3 * n_x)
            if case(4) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},{},255,80,80,100,160,255\n".format(
                    n_in + 4 * n_x, n.t - 2 * n_x)
            if case(5):
                n_x = int(n_x / 8)
                if not overlay:
                    out += " C,0,{},,100,160,255\n".format(n_in)
                out += " F,0,{},{},1,0\n".format(n_in + 3 * n_x, n.t - 3 * n_x)
            if case(6) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},,100,160,255\n".format(n_in)
                out += " F,0,{},{},1,0\n".format(n_in + 3 * n_x, n.t - 3 * n_x)
            if case(7) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},{},100,160,255,128,128,128\n".format(
                    n_in + 4 * n_x, n.t - 2 * n_x)
            if case(8) and not overlay:
                out += " C,0,{},,155,95,0\n".format(n.t)
    elif n_type.isslider():
        # 2 3 5 6
        for case in switch(transform_type):
            if case(0) and not overlay:
                out += " C,0,{},,255,200,0\n".format(n.t)
            if case(1) and not overlay:
                out += " C,0,{},,255,200,0\n".format(n.t)
            if case(2) and not overlay:
                n_x = int(n_x / 4)
                red = random.randint(0, 255)
                green = random.randint(0, 255)
                blue = random.randint(0, 255)
                out += " C,0,{},{},{},{},{},255,200,0\n".format(
                    n_in + n_x, n.t - n_x, red, green, blue)
            if case(3) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},{},0,0,0,255,200,0\n".format(
                    n_in + 3 * n_x, n.t - 3 * n_x)
            if case(4) and not overlay:
                out += " C,0,{},,255,200,0\n".format(n.t)
            if case(5):
                n_x = int(n_x / 8)
                if not overlay:
                    out += " C,0,{},,255,200,0\n".format(n.t)
                out += " F,0,{},{},1,0\n".format(n_in + 3 * n_x, n.t - 3 * n_x)
            if case(6) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},,255,200,0\n".format(n.t)
                out += " F,0,{},{},1,0\n".format(n_in + 3 * n_x, n.t - 3 * n_x)
            if case(7) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},{},255,200,0,128,128,128\n".format(
                    n_in + 4 * n_x, n.t - 2 * n_x)
            if case(8) and not overlay:
                out += " C,0,{},,0,55,255\n".format(n.t)
    elif n_type.isspinner():
        # 2 3 5 6
        for case in switch(transform_type):
            if case(0) and not overlay:
                out += " C,0,{},,128,128,128\n".format(n.t)
            if case(1) and not overlay:
                out += " C,0,{},,128,128,128\n".format(n.t)
            if case(2) and not overlay:
                n_x = int(n_x / 4)
                red = random.randint(0, 255)
                green = random.randint(0, 255)
                blue = random.randint(0, 255)
                out += " C,0,{},{},{},{},{},128,128,128\n".format(
                    n_in + n_x, n.t - n_x, red, green, blue)
            if case(3) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},{},0,0,0,128,128,128\n".format(
                    n_in + 3 * n_x, n.t - 3 * n_x)
            if case(4) and not overlay:
                out += " C,0,{},,128,128,128\n".format(n.t)
            if case(5):
                n_x = int(n_x / 8)
                if not overlay:
                    out += " C,0,{},,128,128,128\n".format(n.t)
                out += " F,0,{},{},1,0\n".format(n_in + 3 * n_x, n.t - 3 * n_x)
            if case(6) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},,128,128,128\n".format(n_in)
                out += " F,0,{},{},1,0\n".format(n_in + 3 * n_x, n.t - 3 * n_x)
            if case(7) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},{},100,160,255,128,128,128\n".format(
                    n_in + 4 * n_x, n.t - 2 * n_x)
            if case(8) and not overlay:
                out += " C,0,{},,127,127,127\n".format(n.t)
    else:
        # 2 3 4 5 6
        for case in switch(transform_type):
            if case(0) and not overlay:
                out += " C,0,{},,255,80,80\n".format(n.t)
            if case(1) and not overlay:
                out += " C,0,{},,100,160,255\n".format(n.t)
            if case(2) and not overlay:
                n_x = int(n_x / 4)
                red = random.randint(0, 255)
                green = random.randint(0, 255)
                blue = random.randint(0, 255)
                out += " C,0,{},{},{},{},{},255,80,80\n".format(
                    n_in + n_x, n.t - n_x, red, green, blue)
            if case(3) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},{},0,0,0,255,80,80\n".format(
                    n_in + 3 * n_x, n.t - 3 * n_x)
            if case(4) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},{},100,160,255,255,80,80\n".format(
                    n_in + 4 * n_x, n.t - 2 * n_x)
            if case(5):
                n_x = int(n_x / 8)
                if not overlay:
                    out += " C,0,{},,255,80,80\n".format(n_in)
                out += " F,0,{},{},1,0\n".format(n_in + 3 * n_x, n.t - 3 * n_x)
            if case(6) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},,255,80,80\n".format(n_in)
                out += " F,0,{},{},1,0\n".format(n_in + 3 * n_x, n.t - 3 * n_x)
            if case(7) and not overlay:
                n_x = int(n_x / 8)
                out += " C,0,{},{},255,80,80,128,128,128\n".format(
                    n_in + 4 * n_x, n.t - 2 * n_x)
            if case(8) and not overlay:
                out += " C,0,{},,0,175,175\n".format(n.t)
    return out