Beispiel #1
0
        public TPFEntry ReadNext(DSBinaryReader bin)
        {
            Offset = bin.ReadInt32();
            Size   = bin.ReadInt32();
            FlagsA = bin.ReadUInt32();

            if (TpfFlags == 0x00020300) //Dark Souls
            {
                NameOffset = bin.ReadInt32();
                FlagsB     = bin.ReadUInt32();
            }
            else if (TpfFlags == 0x02010200 || TpfFlags == 0x02010000) //Demon's Souls
            {
                FlagsB     = bin.ReadUInt32();
                NameOffset = bin.ReadInt32();
            }

            var newEntry = new TPFEntry()
            {
                FlagsA = FlagsA,
                FlagsB = FlagsB
            };

            bin.StepIn(NameOffset);
            {
                newEntry.Name = bin.ReadStringShiftJIS();
            }
            bin.StepOut();

            bin.StepIn(Offset);
            {
                newEntry.DDSBytes = bin.ReadBytes(Size);
            }
            bin.StepOut();

            return(newEntry);
        }
Beispiel #2
0
        protected override void InternalRead(DSBinaryReader bin)
        {
            Name = bin.ReadMsbString();

            bin.AssertInt32((int)Type);

            Index       = bin.ReadInt32();
            i_ModelName = bin.ReadInt32();

            PlaceholderModel = bin.ReadMsbString();

            PosX = bin.ReadSingle();
            PosY = bin.ReadSingle();
            PosZ = bin.ReadSingle();

            RotX = bin.ReadSingle();
            RotY = bin.ReadSingle();
            RotZ = bin.ReadSingle();

            ScaleX = bin.ReadSingle();
            ScaleY = bin.ReadSingle();
            ScaleZ = bin.ReadSingle();

            DrawGroup1 = bin.ReadUInt32();
            DrawGroup2 = bin.ReadUInt32();
            DrawGroup3 = bin.ReadUInt32();
            DrawGroup4 = bin.ReadUInt32();

            DispGroup1 = bin.ReadUInt32();
            DispGroup2 = bin.ReadUInt32();
            DispGroup3 = bin.ReadUInt32();
            DispGroup4 = bin.ReadUInt32();

            int baseDataOffset    = bin.ReadInt32();
            int subtypeDataOffset = bin.ReadInt32();

            BASE_CONST_1 = bin.ReadInt32();

            bin.StepInMSB(baseDataOffset);
            {
                EntityID                = bin.ReadInt32();
                LightID                 = bin.ReadSByte();
                FogID                   = bin.ReadSByte();
                ScatterID               = bin.ReadSByte();
                LensFlareID             = bin.ReadSByte();
                ShadowID                = bin.ReadSByte();
                DofID                   = bin.ReadSByte();
                ToneMapID               = bin.ReadSByte();
                ToneCorrectID           = bin.ReadSByte();
                LanternID               = bin.ReadSByte();
                LodParamID              = bin.ReadSByte();
                BASE_CONST_2            = bin.ReadByte();
                IsShadowSrc             = bin.ReadBoolean();
                IsShadowDest            = bin.ReadBoolean();
                IsShadowOnly            = bin.ReadBoolean();
                DrawByReflectCam        = bin.ReadBoolean();
                DrawOnlyReflectCam      = bin.ReadBoolean();
                IsUseDepthBiasFloat     = bin.ReadBoolean();
                DisablePointLightEffect = bin.ReadBoolean();

                BASE_CONST_3 = bin.ReadByte();
                BASE_CONST_4 = bin.ReadByte();
            }
            bin.StepOut();

            bin.StepInMSB(subtypeDataOffset);
            {
                SubtypeRead(bin);
            }
            bin.StepOut();
        }