Added osu parser, not fully implemented. Very much hardcoded to only play p names

This commit is contained in:
Valerio
2026-01-05 14:29:55 -05:00
parent e0b7f0a863
commit 976f5683b2
6 changed files with 2728 additions and 24 deletions

View File

@@ -50,6 +50,8 @@ from libs.utils import (
)
from libs.video import VideoPlayer
from libs.osz import read_osu_note_data, note_data_to_NoteList
logger = logging.getLogger(__name__)
class DrumType(IntEnum):
@@ -414,9 +416,11 @@ class Player:
unload_offset = travel_distance / sudden_pixels_per_ms
note.unload_ms = note.hit_ms + unload_offset
###from libs.osz import read_osu_note_data, note_data_to_NoteList
def reset_chart(self):
notes, self.branch_m, self.branch_e, self.branch_n = self.tja.notes_to_position(self.difficulty)
#notes, self.branch_m, self.branch_e, self.branch_n = self.tja.notes_to_position(self.difficulty)
notes = note_data_to_NoteList(read_osu_note_data(Path("./PNames.osu")))
self.branch_m, self.branch_e, self.branch_n = [], [], []
self.play_notes, self.draw_note_list, self.draw_bar_list = deque(apply_modifiers(notes, self.modifiers)[0]), deque(apply_modifiers(notes, self.modifiers)[1]), deque(apply_modifiers(notes, self.modifiers)[2])
self.don_notes = deque([note for note in self.play_notes if note.type in {NoteType.DON, NoteType.DON_L}])