mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 03:30:13 +01:00
Added osu parser, not fully implemented. Very much hardcoded to only play p names
This commit is contained in:
@@ -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}])
|
||||
|
||||
Reference in New Issue
Block a user