예제 #1
0
 public BannerFile(Filesystem parent, Directory parentDir, File headerFile)
     : base(parent, parentDir, -8, "banner.bin", headerFile, 0x68, 0, true)
 {
     endFile = null;
     fileSizeP = 0x840;
     refreshOffsets();
 }
예제 #2
0
 public Directory(Filesystem parent, Directory parentDir, bool system, string name, int id)
 {
     this.parent = parent;
     this.parentDirP = parentDir;
     this.isSystemFolderP = system;
     this.nameP = name;
     this.idP = id;
 }
예제 #3
0
 public InlineFile(File parent, int offs, int len, string name, Directory parentDir, CompressionType comp)
     : base(parent.parent, parentDir, parent.name + " - " + name + ":" + offs.ToString("X") + ":" + len)
 {
     parentFile = parent;
     inlineOffs = offs;
     inlineLen = len;
     this.comp = comp;
     this.fixedFile = true;
     this.canChangeOffset = false;
     refreshOffsets();
 }
예제 #4
0
        public OverlayFile(Filesystem parent, Directory parentDir,
            int id,  File alFile, int alBeg, int alEnd,
            File ovTableFile, uint ovTableOffs)
            : base(parent, parentDir, true, id, ":::", alFile, alBeg, alEnd)
        {
            this.nameP = string.Format(LanguageManager.Get("NitroClass", "OverlayFile"),
                id, ramAddr.ToString("X"), ramSize.ToString("X"));

            this.ovTableFile = ovTableFile;
            this.ovTableOffs = ovTableOffs;

            ovId = ovTableFile.getUintAt((int)ovTableOffs + 0x00);
            ramAddr = ovTableFile.getUintAt((int)ovTableOffs + 0x04);
            ramSize = ovTableFile.getUintAt((int)ovTableOffs + 0x08);
            bssSize = ovTableFile.getUintAt((int)ovTableOffs + 0x0C);
            staticInitStart = ovTableFile.getUintAt((int)ovTableOffs + 0x10);
            staticInitEnd = ovTableFile.getUintAt((int)ovTableOffs + 0x14);

            nameP = String.Format("{0:X8} - {1:X8}, OV {2}, FILE {3}", ramAddr, ramAddr + ramSize - 1, ovId, id);
        }
예제 #5
0
        private Directory loadDir(ByteArrayInputStream s, Directory parent)
        {
            int id = s.readInt();
            string name = s.ReadString();

            Directory d = new Directory(this, parent, false, name, id);
            addDir(d);
            if(parent != null) parent.childrenDirs.Add(d);

            int dirCount = s.readInt();
            for (int i = 0; i < dirCount; i++)
                d.childrenDirs.Add(loadDir(s, d));
            int fileCount = s.readInt();
            for (int i = 0; i < fileCount; i++)
            {
                int fid = s.readInt();
                int fsize = s.readInt();
                string fname = s.ReadString();
                NetFile f = new NetFile(this, d, fname, fid, fsize);
                d.childrenFiles.Add(f);
                addFile(f);
            }
            return d;
        }
예제 #6
0
 public InlineFile(File parent, int offs, int len, string name, Directory parentDir)
     : this(parent, offs, len, name, parentDir, CompressionType.NoComp)
 {
 }
예제 #7
0
 public NetFile(NetFilesystem parent, Directory parentDir, string name, int id, int ffileSize)
     : base(parent, parentDir, name, id)
 {
     this.netfs = parent;
     this.fileSizeP = ffileSize;
 }