mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-09 02:16:46 +00:00
Add and use PAK constants
This commit is contained in:
@@ -2,6 +2,7 @@ using System.IO;
|
||||
using System.Text;
|
||||
using BurnOutSharp.Models.PAK;
|
||||
using BurnOutSharp.Utilities;
|
||||
using static BurnOutSharp.Models.PAK.Constants;
|
||||
|
||||
namespace BurnOutSharp.Builders
|
||||
{
|
||||
@@ -104,7 +105,7 @@ namespace BurnOutSharp.Builders
|
||||
|
||||
byte[] signature = data.ReadBytes(4);
|
||||
header.Signature = Encoding.ASCII.GetString(signature);
|
||||
if (header.Signature != "PACK")
|
||||
if (header.Signature != SignatureString)
|
||||
return null;
|
||||
|
||||
header.DirectoryOffset = data.ReadUInt32();
|
||||
|
||||
11
BurnOutSharp.Models/PAK/Constants.cs
Normal file
11
BurnOutSharp.Models/PAK/Constants.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace BurnOutSharp.Models.PAK
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
public static readonly byte[] SignatureBytes = new byte[] { 0x50, 0x41, 0x43, 0x4b };
|
||||
|
||||
public const string SignatureString = "PACK";
|
||||
|
||||
public const uint SignatureUInt32 = 0x4b434150;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user