public SBMusicPlaylistObject(FileRead fr = null, long curPos = 0, uint length = 0) { if (fr != null) { _sound_structure = new SoundStructure(fr); _segments = fr.read_uint32(); for (int i = 0; i < _segments; i++) { _segment_ids.Add(fr.read_uint32()); } _unk_double_1 = fr.read_double(); _unk_field64_1 = fr.read_uint64(); _tempo = fr.read_float(); _time_sig1 = fr.read_one_byte(); _time_sig2 = fr.read_one_byte(); _unk_field8_1 = fr.read_one_byte(); _unk_field32_1 = fr.read_uint32(); _transition_count = fr.read_uint32(); for (int i = 0; i < _transition_count; i++) { _transitions.Add(new MusicPlaylistObject_Transition(fr)); } _playlist_elements_count = fr.read_uint32(); uint element_count = (length - (uint)(fr.getPosition() - curPos)) / MusicPlaylistObject_PlaylistElement.SIZE; for (int i = 0; i < element_count; i++) { _playlist_elements.Add(new MusicPlaylistObject_PlaylistElement(fr)); } } }
public SBMusicSegmentObject(FileRead fr = null, long curPos = 0, uint length = 0) { if (fr != null) { _sound_structure = new SoundStructure(fr); _children = fr.read_uint32(); for (int i = 0; i < _children; i++) { _child_ids.Add(fr.read_uint32()); } _unk_double_1 = fr.read_double(); _unk_field64_1 = fr.read_uint64(); _tempo = fr.read_float(); _time_sig1 = fr.read_one_byte(); _time_sig2 = fr.read_one_byte(); _unk_field32_1 = fr.read_uint32(); _unk_field8_1 = fr.read_one_byte(); _time_length = fr.read_double(); _unk_field32_2 = fr.read_uint32(); _unk_field32_3 = fr.read_uint32(); _unk_field64_2 = fr.read_uint64(); _unk_field32_4 = fr.read_uint32(); _unk_field32_5 = fr.read_uint32(); _time_length_next = fr.read_double(); _unk_field32_6 = fr.read_uint32(); uint remaining = (length - (uint)(fr.getPosition() - curPos)); if (remaining > 0) { _unk_data = fr._file.ReadBytes((int)remaining); } else { _unk_data = null; } } }