mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-23 06:34:03 +00:00
"Support" PlayJ v2 by skipping fields
This commit is contained in:
@@ -101,7 +101,7 @@ namespace BurnOutSharp.Builders
|
||||
var entryHeader = ParseAudioFile(data, currentOffset);
|
||||
if (entryHeader == null)
|
||||
return null;
|
||||
|
||||
|
||||
playlist.AudioFiles[i] = entryHeader;
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace BurnOutSharp.Builders
|
||||
data.Seek(offset, SeekOrigin.Begin);
|
||||
|
||||
// Set the unknown value 2
|
||||
audioFile.UnknownValue2 = data.ReadUInt32();;
|
||||
audioFile.UnknownValue2 = data.ReadUInt32(); ;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -235,21 +235,26 @@ namespace BurnOutSharp.Builders
|
||||
if (entryHeader.Signature != SignatureUInt32)
|
||||
return null;
|
||||
|
||||
// Only V1 is supported currently
|
||||
// Only V1 is fully supported
|
||||
entryHeader.Version = data.ReadUInt32();
|
||||
if (entryHeader.Version != 0x00000000)
|
||||
return null;
|
||||
|
||||
entryHeader.TrackID = data.ReadUInt32();
|
||||
entryHeader.UnknownOffset1 = data.ReadUInt32();
|
||||
entryHeader.UnknownOffset2 = data.ReadUInt32();
|
||||
entryHeader.UnknownOffset3 = data.ReadUInt32();
|
||||
entryHeader.Unknown1 = data.ReadUInt32();
|
||||
entryHeader.Unknown2 = data.ReadUInt32();
|
||||
entryHeader.Year = data.ReadUInt32();
|
||||
entryHeader.TrackNumber = data.ReadByteValue();
|
||||
entryHeader.Subgenre = (Subgenre)data.ReadByteValue();
|
||||
entryHeader.Duration = data.ReadUInt32();
|
||||
if (entryHeader.Version == 0x00000000)
|
||||
{
|
||||
entryHeader.TrackID = data.ReadUInt32();
|
||||
entryHeader.UnknownOffset1 = data.ReadUInt32();
|
||||
entryHeader.UnknownOffset2 = data.ReadUInt32();
|
||||
entryHeader.UnknownOffset3 = data.ReadUInt32();
|
||||
entryHeader.Unknown1 = data.ReadUInt32();
|
||||
entryHeader.Unknown2 = data.ReadUInt32();
|
||||
entryHeader.Year = data.ReadUInt32();
|
||||
entryHeader.TrackNumber = data.ReadByteValue();
|
||||
entryHeader.Subgenre = (Subgenre)data.ReadByteValue();
|
||||
entryHeader.Duration = data.ReadUInt32();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Discard the following pieces until we can figure out what they are
|
||||
_ = data.ReadBytes(36);
|
||||
}
|
||||
|
||||
entryHeader.TrackLength = data.ReadUInt16();
|
||||
byte[] track = data.ReadBytes(entryHeader.TrackLength);
|
||||
|
||||
@@ -144,24 +144,6 @@ namespace BurnOutSharp.Models.PlayJ
|
||||
|
||||
#region V2 Notes
|
||||
|
||||
// Header Layout (V2) [WIP]
|
||||
// ------------------------------------------------------------------------------
|
||||
// 0x00 Signature UInt32
|
||||
// 0x04 Version UInt32 [0x0000000A]
|
||||
// 0x08 UNKNOWN byte[36]
|
||||
// 0x2A Track Length UInt16
|
||||
// 0x2C Track String
|
||||
// 0x2C+TL Artist Length UInt16
|
||||
// 0x2E+TL Artist String
|
||||
// 0x2E+TL+TAL Album Length UInt16
|
||||
// 0x30+TL+TAL Album String
|
||||
// 0x30+TL+TAL+AL Writer Length UInt16
|
||||
// 0x32+TL+TAL+AL Writer String
|
||||
// 0x32+TL+TAL+AL+WL Publisher Length UInt16
|
||||
// 0x34+TL+TAL+AL+WL Publisher String
|
||||
// 0x34+TL+TAL+AL+WL+PL Label Length UInt16
|
||||
// 0x36+TL+TAL+AL+WL+PL Label String
|
||||
|
||||
// In the third block:
|
||||
// lady.plj has 0x00000002 and references "ad006376_5.dat" after
|
||||
|
||||
|
||||
Reference in New Issue
Block a user