Пример #1
0
 public NroAssetHeader(BinaryReader reader)
 {
     Magic   = reader.ReadAscii(4);
     Version = reader.ReadUInt32();
     for (int i = 0; i < 3; i++)
     {
         NroAssetSections[i] = new NroAssetSection(reader, (NroAssetType)i);
     }
 }
Пример #2
0
        public IStorage OpenNroAssetSection(NroAssetType type, bool leaveOpen)
        {
            NroAssetSection header = AssetHeader.NroAssetSections[(int)type];

            if (header.Size <= 0)
            {
                return(new NullStorage(0));
            }

            return(AssetStorage.Slice(header.FileOffset, header.Size, leaveOpen));
        }