public void Load(string fileName)
        {
            var resource = new ResourceFile_GTA5_pc <ClipDictionary>();

            resource.Load(fileName);

            clipDictionary = resource.ResourceData;
        }
        public void Load(Stream stream)
        {
            var resource = new ResourceFile_GTA5_pc <ClipDictionary>();

            resource.Load(stream);

            clipDictionary = resource.ResourceData;
        }
Beispiel #3
0
        public AwcAudioAnimClipDict(DataReader r, AwcChunkInfo info)
        {
            Data = r.ReadBytes(info.Size);

            if ((Data == null) || (Data.Length < 16))
            {
                return;
            }

            var data = Data;

            RpfResourceFileEntry resentry = new RpfResourceFileEntry();
            uint rsc7    = BitConverter.ToUInt32(data, 0);
            int  version = BitConverter.ToInt32(data, 4);

            resentry.SystemFlags   = BitConverter.ToUInt32(data, 8);
            resentry.GraphicsFlags = BitConverter.ToUInt32(data, 12);

            if (rsc7 != 0x37435352)
            {
            }                  //testing..
            if (version != 46) //46 is Clip Dictionary...
            {
            }

            int newlen = data.Length - 16;                                              //trim the header from the data passed to the next step.
            int arrlen = Math.Max(newlen, resentry.SystemSize + resentry.GraphicsSize); //expand it as necessary for the reader.

            byte[] newdata = new byte[arrlen];
            Buffer.BlockCopy(data, 16, newdata, 0, newlen);
            data = newdata;

            ResourceDataReader rd = new ResourceDataReader(resentry, data);

            ClipDict = rd.ReadBlock <ClipDictionary>();
        }