Skip to content

Commit

Permalink
Implemented NDS Reading and Exploring
Browse files Browse the repository at this point in the history
  • Loading branch information
Gericom committed Nov 11, 2014
1 parent dcff52d commit 9e1f095
Show file tree
Hide file tree
Showing 8 changed files with 1,074 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 3DS/SARC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public override Bitmap GetIcon()

public override FormatMatch IsFormat(EFEFile File)
{
if (File.Data.Length > 20 && File.Data[0] == 'S' && File.Data[1] == 'A' && File.Data[2] == 'R' && File.Data[3] == 'C') return FormatMatch.Content;
if (File.Data.Length > 20 && File.Data[0] == 'S' && File.Data[1] == 'A' && File.Data[2] == 'R' && File.Data[3] == 'C' && File.Data[0x14] == 'S' && File.Data[0x15] == 'F' && File.Data[0x16] == 'A' && File.Data[0x17] == 'T') return FormatMatch.Content;
return FormatMatch.No;
}

Expand Down
7 changes: 6 additions & 1 deletion CommonFiles/DAE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,12 @@ public override Bitmap GetIcon()

public override FormatMatch IsFormat(EFEFile File)
{
String s = Encoding.ASCII.GetString(File.Data);
String s;
try
{
s = Encoding.ASCII.GetString(File.Data);
}
catch { return FormatMatch.No; }
if(s.StartsWith("<?xml") && s.Contains("<COLLADA xmlns=\"http://www.collada.org/2005/11/COLLADASchema\" version=\"")) return FormatMatch.Content;
return FormatMatch.No;
}
Expand Down
1 change: 1 addition & 0 deletions LibEveryFileExplorer/Files/FileFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public abstract class FileFormatIdentifier
protected const String Category_Models = "Models";
protected const String Category_Palettes = "Palettes";
protected const String Category_Particles = "Particles";
protected const String Category_Roms = "Roms";
protected const String Category_Screens = "Screens";
protected const String Category_Shaders = "Shaders";
protected const String Category_Strings = "Strings";
Expand Down
Loading

0 comments on commit 9e1f095

Please sign in to comment.