diff --git a/SabreTools.Serialization/Wrappers/N3DS.cs b/SabreTools.Serialization/Wrappers/N3DS.cs index 121006a7..02f79a2f 100644 --- a/SabreTools.Serialization/Wrappers/N3DS.cs +++ b/SabreTools.Serialization/Wrappers/N3DS.cs @@ -248,6 +248,23 @@ namespace SabreTools.Serialization.Wrappers #region Data + /// + /// Get the bit masks for a partition + /// + public BitMasks GetBitMasks(int partitionIndex) + { + if (Model.Partitions == null) + return 0; + if (partitionIndex < 0 || partitionIndex >= Model.Partitions.Length) + return 0; + + var partition = Model.Partitions[partitionIndex]; + if (partition?.Flags == null) + return 0; + + return partition.Flags.BitMasks; + } + /// /// Determines if a file header represents a CODE block ///