mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-14 13:46:03 +00:00
Add DS/3DS to supported file types
This commit is contained in:
@@ -80,11 +80,21 @@
|
||||
/// </summary>
|
||||
MSI,
|
||||
|
||||
/// <summary>
|
||||
/// Nintendo 3DS cart image
|
||||
/// </summary>
|
||||
N3DS,
|
||||
|
||||
/// <summary>
|
||||
/// Half-Life No Cache File
|
||||
/// </summary>
|
||||
NCF,
|
||||
|
||||
/// <summary>
|
||||
/// Nintendo DS/DSi cart image
|
||||
/// </summary>
|
||||
Nitro,
|
||||
|
||||
/// <summary>
|
||||
/// Half-Life Package File
|
||||
/// </summary>
|
||||
|
||||
@@ -151,6 +151,12 @@ namespace BurnOutSharp.Tools
|
||||
|
||||
#endregion
|
||||
|
||||
#region N3DS
|
||||
|
||||
// No magic checks for N3DS
|
||||
|
||||
#endregion
|
||||
|
||||
#region NCF
|
||||
|
||||
if (magic.StartsWith(new byte?[] { 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 }))
|
||||
@@ -158,6 +164,12 @@ namespace BurnOutSharp.Tools
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nitro
|
||||
|
||||
// No magic checks for Nitro
|
||||
|
||||
#endregion
|
||||
|
||||
#region PAK
|
||||
|
||||
if (magic.StartsWith(new byte?[] { 0x50, 0x41, 0x43, 0x4B }))
|
||||
@@ -199,7 +211,7 @@ namespace BurnOutSharp.Tools
|
||||
return SupportedFileType.Quantum;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region RAR
|
||||
|
||||
// RAR archive version 1.50 onwards
|
||||
@@ -415,6 +427,18 @@ namespace BurnOutSharp.Tools
|
||||
|
||||
#endregion
|
||||
|
||||
#region N3DS
|
||||
|
||||
// 3DS cart image
|
||||
if (extension.Equals("3ds", StringComparison.OrdinalIgnoreCase))
|
||||
return SupportedFileType.N3DS;
|
||||
|
||||
// CIA package -- Not currently supported
|
||||
// else if (extension.Equals(value: "cia", StringComparison.OrdinalIgnoreCase))
|
||||
// return SupportedFileType.N3DS;
|
||||
|
||||
#endregion
|
||||
|
||||
#region NCF
|
||||
|
||||
if (extension.Equals("ncf", StringComparison.OrdinalIgnoreCase))
|
||||
@@ -422,6 +446,26 @@ namespace BurnOutSharp.Tools
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nitro
|
||||
|
||||
// DS cart image
|
||||
if (extension.Equals("nds", StringComparison.OrdinalIgnoreCase))
|
||||
return SupportedFileType.Nitro;
|
||||
|
||||
// DS development cart image
|
||||
else if (extension.Equals("srl", StringComparison.OrdinalIgnoreCase))
|
||||
return SupportedFileType.Nitro;
|
||||
|
||||
// DSi cart image
|
||||
else if (extension.Equals("dsi", StringComparison.OrdinalIgnoreCase))
|
||||
return SupportedFileType.Nitro;
|
||||
|
||||
// iQue DS cart image
|
||||
else if (extension.Equals("ids", StringComparison.OrdinalIgnoreCase))
|
||||
return SupportedFileType.Nitro;
|
||||
|
||||
#endregion
|
||||
|
||||
#region PAK
|
||||
|
||||
// No extensions registered for PAK
|
||||
@@ -537,7 +581,7 @@ namespace BurnOutSharp.Tools
|
||||
// return SupportedFileType.Quantum;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region RAR
|
||||
|
||||
if (extension.Equals("rar", StringComparison.OrdinalIgnoreCase))
|
||||
@@ -714,7 +758,7 @@ namespace BurnOutSharp.Tools
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get the internal version as reported by the resources
|
||||
/// </summary>
|
||||
|
||||
@@ -50,6 +50,8 @@ namespace Test
|
||||
|
||||
// Get the file type
|
||||
SupportedFileType ft = BurnOutSharp.Tools.Utilities.GetFileType(magic);
|
||||
if (ft == SupportedFileType.UNKNOWN)
|
||||
ft = BurnOutSharp.Tools.Utilities.GetFileType(Path.GetExtension(file).TrimStart('.'));
|
||||
|
||||
// MS-DOS executable and decendents
|
||||
if (ft == SupportedFileType.Executable)
|
||||
|
||||
Reference in New Issue
Block a user