Beispiel #1
0
 public Section_AHDR(uint assetID, string assetType, AHDRFlags flags, Section_ADBG ADBG) : base(Section.AHDR)
 {
     this.assetID   = assetID;
     this.assetType = AssetTypeFromString(assetType);
     this.flags     = flags;
     this.ADBG      = ADBG;
 }
Beispiel #2
0
 public Section_AHDR(uint assetID, AssetType assetType, AHDRFlags flags, Section_ADBG ADBG) : base(Section.AHDR)
 {
     this.assetID   = assetID;
     this.assetType = assetType;
     this.flags     = flags;
     this.ADBG      = ADBG;
 }
Beispiel #3
0
        private void AddAsset(string[] j, ref List <uint> assetIDlist)
        {
            uint      assetID       = Convert.ToUInt32(j[0], 16);
            string    assetType     = j[1];
            AHDRFlags flags         = (AHDRFlags)Convert.ToInt32(j[2]);
            int       align         = Convert.ToInt32(j[3]);
            string    assetName     = j[4];
            string    assetFileName = j[5];
            int       checksum      = Convert.ToInt32(j[6], 16);

            assetIDlist.Add(assetID);

            Section_ADBG newADBG = new Section_ADBG(align, assetName, assetFileName, checksum);
            Section_AHDR newAHDR = new Section_AHDR(assetID, assetType, flags, newADBG);

            DICT.ATOC.AHDRList.Add(newAHDR);
        }
Beispiel #4
0
        public Section_AHDR(BinaryReader binaryReader) : base(binaryReader, Section.AHDR)
        {
            assetID    = Switch(binaryReader.ReadUInt32());
            assetType  = AssetTypeFromString(new string(binaryReader.ReadChars(4)));
            fileOffset = Switch(binaryReader.ReadInt32());
            fileSize   = Switch(binaryReader.ReadInt32());
            plusValue  = Switch(binaryReader.ReadInt32());
            flags      = (AHDRFlags)Switch(binaryReader.ReadInt32());

            string currentSectionName = new string(binaryReader.ReadChars(4));

            if (currentSectionName != Section.ADBG.ToString())
            {
                throw new Exception();
            }
            ADBG = new Section_ADBG(binaryReader);

            long savePosition = binaryReader.BaseStream.Position;

            binaryReader.BaseStream.Position = fileOffset;
            data = binaryReader.ReadBytes(fileSize);
            binaryReader.BaseStream.Position = savePosition;
        }