コード例 #1
0
        void IResData.Load(BfshaFileLoader loader)
        {
            Strings.Clear();
            loader.Seek(-0x14, System.IO.SeekOrigin.Current);
            uint Signature   = loader.ReadUInt32();
            uint blockOffset = loader.ReadUInt32();
            long BlockSize   = loader.ReadInt64();
            uint StringCount = loader.ReadUInt32();

            for (int i = 0; i < StringCount + 1; i++)
            {
                ushort size = loader.ReadUInt16();
                Strings.Add(loader.ReadString(BinaryStringFormat.ZeroTerminated));
                loader.Align(2);
            }
        }
コード例 #2
0
        void IResData.Load(BfshaFileLoader loader)
        {
            ShaderVariations = new List <ShaderVariation>();
            StringTable      = new StringTable();

            loader.CheckSignature(_signature);
            uint padding = loader.ReadUInt32();

            SetVersionInfo(loader.ReadUInt32());
            ByteOrder         = loader.ReadEnum <ByteOrder>(false);
            Alignment         = loader.ReadByte();
            TargetAddressSize = loader.ReadByte(); //Thanks MasterF0X for pointing out the layout of the these
            uint   OffsetToFileName      = loader.ReadUInt32();
            ushort flag                  = loader.ReadUInt16();
            ushort blockOffset           = loader.ReadUInt16();
            uint   RelocationTableOffset = loader.ReadUInt32();
            uint   sizFile               = loader.ReadUInt32();

            loader.Seek(64); //Padding

            if (OffsetToFileName != 0)
            {
                using (loader.TemporarySeek(OffsetToFileName, SeekOrigin.Begin))
                {
                    Name = loader.ReadString(BinaryStringFormat.ZeroTerminated);
                }
            }

            //GRSC Section
            loader.CheckSignature(_grscSignature);
            loader.Seek(12); //Block header
            Unknown  = loader.ReadUInt16();
            Unknown2 = loader.ReadUInt16();
            Unknown3 = loader.ReadByte();
            Unknown4 = loader.ReadUInt32();
            uint VariationCount = loader.ReadUInt32();

            ShaderVariations = loader.LoadList <ShaderVariation>((int)VariationCount);
            loader.ReadInt64();
            Unknown5 = loader.ReadUInt64();
        }
コード例 #3
0
        // ---- METHODS ------------------------------------------------------------------------------------------------

        void IResData.Load(BfshaFileLoader loader)
        {
            String = loader.ReadString(BinaryStringFormat.ZeroTerminated, Encoding ?? loader.Encoding);
        }