mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-15 05:36:03 +00:00
Handle unknown data better
This commit is contained in:
@@ -152,7 +152,7 @@ namespace BurnOutSharp.Builders
|
||||
|
||||
// Hack for unknown format data
|
||||
if (minorVersion == 22)
|
||||
_ = data.ReadUInt16();
|
||||
fileDescriptor.Unknown = data.ReadUInt16();
|
||||
|
||||
return fileDescriptor;
|
||||
}
|
||||
|
||||
@@ -40,5 +40,11 @@ namespace BurnOutSharp.Models.Quantum
|
||||
/// File date (DOS format)
|
||||
/// </summary>
|
||||
public ushort FileDate;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown data, Checksum?
|
||||
/// </summary>
|
||||
/// <remarks>Minor version 22</remarks>
|
||||
public ushort? Unknown;
|
||||
}
|
||||
}
|
||||
@@ -207,6 +207,8 @@ namespace BurnOutSharp.Wrappers
|
||||
Console.WriteLine($" Expanded file size = {fileDescriptor.ExpandedFileSize}");
|
||||
Console.WriteLine($" File time = {fileDescriptor.FileTime}");
|
||||
Console.WriteLine($" File date = {fileDescriptor.FileDate}");
|
||||
if (fileDescriptor.Unknown != null)
|
||||
Console.WriteLine($" Unknown (Checksum?) = {fileDescriptor.Unknown}");
|
||||
}
|
||||
}
|
||||
Console.WriteLine();
|
||||
|
||||
@@ -666,7 +666,7 @@ namespace BurnOutSharp.Tools
|
||||
case SupportedFileType.PAK: return new FileType.PAK();
|
||||
case SupportedFileType.PKZIP: return new FileType.PKZIP();
|
||||
case SupportedFileType.PLJ: return new FileType.PLJ();
|
||||
case SupportedFileType.Quantum: return null; // TODO: Update this line
|
||||
//case SupportedFileType.Quantum: return new FileType.Quantum();
|
||||
case SupportedFileType.RAR: return new FileType.RAR();
|
||||
case SupportedFileType.SevenZip: return new FileType.SevenZip();
|
||||
case SupportedFileType.SFFS: return new FileType.SFFS();
|
||||
|
||||
Reference in New Issue
Block a user