mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-08 18:06:34 +00:00
Add and use WAD constants
This commit is contained in:
@@ -2,6 +2,7 @@ using System.IO;
|
||||
using System.Text;
|
||||
using BurnOutSharp.Models.WAD;
|
||||
using BurnOutSharp.Utilities;
|
||||
using static BurnOutSharp.Models.WAD.Constants;
|
||||
|
||||
namespace BurnOutSharp.Builders
|
||||
{
|
||||
@@ -133,7 +134,7 @@ namespace BurnOutSharp.Builders
|
||||
|
||||
byte[] signature = data.ReadBytes(4);
|
||||
header.Signature = Encoding.ASCII.GetString(signature);
|
||||
if (header.Signature != "WAD3")
|
||||
if (header.Signature != SignatureString)
|
||||
return null;
|
||||
|
||||
header.LumpCount = data.ReadUInt32();
|
||||
|
||||
11
BurnOutSharp.Models/WAD/Constants.cs
Normal file
11
BurnOutSharp.Models/WAD/Constants.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace BurnOutSharp.Models.WAD
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
public static readonly byte[] SignatureBytes = new byte[] { 0x57, 0x41, 0x44, 0x33 };
|
||||
|
||||
public const string SignatureString = "WAD3";
|
||||
|
||||
public const uint SignatureUInt32 = 0x33444157;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user