From 4c04d0529ce2d5257f633ceb6efaf3482eaa1d20 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 8 Jan 2025 17:05:56 -0500 Subject: [PATCH] Slight cleanup across DatFile formats --- SabreTools.DatFiles/Formats/Hashfile.cs | 30 +++++++++++++++++++++++++ SabreTools.DatFiles/Formats/Missfile.cs | 1 - 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/SabreTools.DatFiles/Formats/Hashfile.cs b/SabreTools.DatFiles/Formats/Hashfile.cs index 9df69f79..85c6886a 100644 --- a/SabreTools.DatFiles/Formats/Hashfile.cs +++ b/SabreTools.DatFiles/Formats/Hashfile.cs @@ -231,6 +231,36 @@ namespace SabreTools.DatFiles.Formats } } + /// + /// Represents an MD2 hashfile + /// + internal sealed class Md2File : Hashfile + { + /// + /// Constructor designed for casting a base DatFile + /// + /// Parent DatFile to copy from + public Md2File(DatFile? datFile) : base(datFile) + { + _hash = HashType.MD2; + } + } + + /// + /// Represents an MD4 hashfile + /// + internal sealed class Md4File : Hashfile + { + /// + /// Constructor designed for casting a base DatFile + /// + /// Parent DatFile to copy from + public Md4File(DatFile? datFile) : base(datFile) + { + _hash = HashType.MD4; + } + } + /// /// Represents an MD5 hashfile /// diff --git a/SabreTools.DatFiles/Formats/Missfile.cs b/SabreTools.DatFiles/Formats/Missfile.cs index 429840da..d15067b5 100644 --- a/SabreTools.DatFiles/Formats/Missfile.cs +++ b/SabreTools.DatFiles/Formats/Missfile.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; using SabreTools.DatItems;