diff --git a/libs/tja.py b/libs/tja.py index 7dd675f..91f0dec 100644 --- a/libs/tja.py +++ b/libs/tja.py @@ -56,6 +56,7 @@ class Note: moji: int = field(init=False) is_branch_start: bool = field(init=False) branch_params: str = field(init=False) + lyric: str = field(init=False) def __lt__(self, other): return self.hit_ms < other.hit_ms @@ -630,6 +631,7 @@ class TJAParser: prev_note = None is_section_start = False section_bar = None + lyric = "" for bar in notes: #Length of the bar is determined by number of notes excluding commands bar_length = sum(len(part) for part in bar if '#' not in part) @@ -736,6 +738,7 @@ class TJAParser: is_branching = True continue if '#LYRIC' in part: + lyric = part[6:] continue if '#JPOSSCROLL' in part: continue @@ -839,6 +842,7 @@ class TJAParser: note.bpm = bpm note.gogo_time = gogo_time note.moji = -1 + note.lyric = lyric if item in {'5', '6'}: note = Drumroll(note) note.color = 255 diff --git a/scenes/game.py b/scenes/game.py index ddc2be8..fd44e27 100644 --- a/scenes/game.py +++ b/scenes/game.py @@ -1057,6 +1057,7 @@ class Player: if note.display: tex.draw_texture('notes', str(note.type), frame=current_eighth % 2, x=x_position, y=y_position+192+(self.is_2p*176), center=True) tex.draw_texture('notes', 'moji', frame=note.moji, x=x_position - (168//2) + 64, y=323 + y_position+(self.is_2p*176)) + ray.draw_text(self.current_notes_draw[0].lyric, SCREEN_WIDTH//2 - (ray.measure_text(self.current_notes_draw[0].lyric, 40)//2), SCREEN_HEIGHT - 50, 40, ray.BLUE) def draw_modifiers(self):