Skip to content

Commit

Permalink
Reorganize NDS
Browse files Browse the repository at this point in the history
  • Loading branch information
mnadareski committed Aug 8, 2024
1 parent 36393f7 commit c52d3de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions NDecrypt.Nitro/DSTool.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using NDecrypt.Core;
using NDecrypt.Nitro.Headers;
using SabreTools.Models.Nitro;

namespace NDecrypt.Nitro
Expand Down Expand Up @@ -44,7 +42,7 @@ public bool ProcessFile()
using (BinaryReader reader = new BinaryReader(File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)))
using (BinaryWriter writer = new BinaryWriter(File.Open(filename, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite)))
{
Cart? cart = NDSHeader.Read(reader);
Cart? cart = Serializer.ReadCart(reader);
if (cart == null)
{
Console.WriteLine("Error: Not a DS or DSi Rom!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
using System.Text;
using SabreTools.Models.Nitro;

namespace NDecrypt.Nitro.Headers
namespace NDecrypt.Nitro
{
internal static class NDSHeader
internal static class Serializer
{
/// <summary>
/// Read from a stream and get an NDS/NDSi Cart, if possible
/// </summary>
/// <param name="reader">BinaryReader representing the input stream</param>
/// <returns>NDS/NDSi Cart object, null on error</returns>
public static Cart? Read(BinaryReader reader)
public static Cart? ReadCart(BinaryReader reader)
{
var cart = new Cart();

Expand Down

0 comments on commit c52d3de

Please sign in to comment.