mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-09-23 11:52:28 +00:00
Renamed Audio PCK members to in game names
This commit is contained in:
@@ -21,7 +21,7 @@ namespace PckStudio.Core.IO.PckAudio
|
||||
private PckAudioFile _file;
|
||||
private ByteOrder _endianness;
|
||||
private List<string> LUT = new List<string>();
|
||||
private List<PckAudioFile.AudioCategory.EAudioType> _OriginalAudioTypeOrder = new List<PckAudioFile.AudioCategory.EAudioType>();
|
||||
private List<PckAudioFile.AudioTrackList.EAudioType> _OriginalAudioTypeOrder = new List<PckAudioFile.AudioTrackList.EAudioType>();
|
||||
|
||||
public PckAudioFileReader(ByteOrder endianness)
|
||||
{
|
||||
@@ -80,13 +80,13 @@ namespace PckStudio.Core.IO.PckAudio
|
||||
int categoryEntryCount = reader.ReadInt32();
|
||||
for (; 0 < categoryEntryCount; categoryEntryCount--)
|
||||
{
|
||||
var parameterType = (PckAudioFile.AudioCategory.EAudioParameterType)reader.ReadInt32();
|
||||
var audioType = (PckAudioFile.AudioCategory.EAudioType)reader.ReadInt32();
|
||||
var parameterType = (PckAudioFile.AudioTrackList.EAudioParameterType)reader.ReadInt32();
|
||||
var audioType = (PckAudioFile.AudioTrackList.EAudioType)reader.ReadInt32();
|
||||
string name = ReadString(reader);
|
||||
// AddCategory puts the file's categories out of order and causes some songs to be put in the wrong categories
|
||||
// This is my simple fix for the issue.
|
||||
_OriginalAudioTypeOrder.Add(audioType);
|
||||
_file.AddCategory(parameterType, audioType, name);
|
||||
_file.AddTrackList(parameterType, audioType, name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace PckStudio.Core.IO.PckAudio
|
||||
{
|
||||
List<string> credits = new List<string>();
|
||||
List<string> creditIds = new List<string>();
|
||||
foreach (PckAudioFile.AudioCategory.EAudioType c in _OriginalAudioTypeOrder)
|
||||
foreach (PckAudioFile.AudioTrackList.EAudioType c in _OriginalAudioTypeOrder)
|
||||
{
|
||||
int audioCount = reader.ReadInt32();
|
||||
for (; 0 < audioCount; audioCount--)
|
||||
@@ -104,7 +104,7 @@ namespace PckStudio.Core.IO.PckAudio
|
||||
switch (key)
|
||||
{
|
||||
case "CUENAME":
|
||||
_file.GetCategory(c).SongNames.Add(value);
|
||||
_file.GetTrackList(c).TrackNames.Add(value);
|
||||
break;
|
||||
case "CREDIT":
|
||||
credits.Add(value);
|
||||
|
||||
Reference in New Issue
Block a user