protected override void SubtypeRead(DSBinaryReader bin)
        {
            //SUx00 = bin.ReadInt32();
            SUB_CONST_1 = bin.ReadInt32();
            if (bin.LongOffsets)
            {
                bin.Jump(4);
            }
            i_AttachObj = bin.ReadInt32();
            if (bin.LongOffsets)
            {
                bin.Jump(4);
            }
            ItemLot1    = bin.ReadInt32();
            SUB_CONST_2 = bin.ReadInt32();
            ItemLot2    = bin.ReadInt32();
            SUB_CONST_3 = bin.ReadInt32();
            ItemLot3    = bin.ReadInt32();
            SUB_CONST_4 = bin.ReadInt32();
            ItemLot4    = bin.ReadInt32();
            SUB_CONST_5 = bin.ReadInt32();
            ItemLot5    = bin.ReadInt32();
            SUB_CONST_6 = bin.ReadInt32();

            if (!bin.IsDeS)
            {
                InChest       = bin.ReadBoolean();
                StartDisabled = bin.ReadBoolean();
                SUB_CONST_7   = bin.ReadByte();
                SUB_CONST_8   = bin.ReadByte();
            }
        }
Esempio n. 2
0
        protected override void InternalRead(DSBinaryReader bin)
        {
            Name         = bin.ReadMsbString();
            BASE_CONST_1 = bin.ReadInt32();
            SolvedIndex  = bin.ReadInt32();
            bin.AssertInt32((int)Type);

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

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

            if (bin.LongOffsets)
            {
                bin.Jump(4);
            }

            int baseSubtypeDataOffset = bin.ReadInt32();

            if (bin.LongOffsets)
            {
                bin.Jump(4);
                bin.AssertInt32(OffsetDeltas64.Item1 >= 0
                    ? baseSubtypeDataOffset + OffsetDeltas64.Item1 : 0);
                bin.Jump(4);
                bin.AssertInt32(OffsetDeltas64.Item2 >= 0
                    ? baseSubtypeDataOffset + OffsetDeltas64.Item2 : 0);
                bin.Jump(4);
                bin.AssertInt32(OffsetDeltas64.Item3 >= 0
                    ? baseSubtypeDataOffset + OffsetDeltas64.Item3 : 0);
                bin.Jump(4);
            }
            else
            {
                bin.AssertInt32(OffsetDeltas.Item1 >= 0
                    ? baseSubtypeDataOffset + OffsetDeltas.Item1 : 0);
                bin.AssertInt32(OffsetDeltas.Item2 >= 0
                    ? baseSubtypeDataOffset + OffsetDeltas.Item2 : 0);
                bin.AssertInt32(OffsetDeltas.Item3 >= 0
                    ? baseSubtypeDataOffset + OffsetDeltas.Item3 : 0);
            }

            bin.StepInMSB(baseSubtypeDataOffset);
            {
                SubtypeRead(bin);
            }
            bin.StepOut();
        }
 protected override void SubtypeRead(DSBinaryReader bin)
 {
     SUB_CONST_1 = bin.ReadInt32();
     if (bin.LongOffsets)
     {
         bin.Jump(4);
     }
     SUB_CONST_2 = bin.ReadInt32();
     if (bin.LongOffsets)
     {
         bin.Jump(4);
     }
     EntityID = bin.ReadInt32();
 }
Esempio n. 4
0
        protected override void SubtypeRead(DSBinaryReader bin)
        {
            if (bin.IsDeS)
            {
                PlayerSubUnk = bin.ReadByte();
                bin.Jump(3);
            }
            else
            {
                SUB_CONST_1 = bin.ReadInt32();
            }

            SUB_CONST_2 = bin.ReadInt32();
            SUB_CONST_3 = bin.ReadInt32();
            SUB_CONST_4 = bin.ReadInt32();
        }
        protected override void InternalRead(DSBinaryReader bin)
        {
            Name       = bin.ReadMsbString();
            EventIndex = bin.ReadInt32();
            bin.AssertInt32((int)Type);
            Index = bin.ReadInt32();

            if (bin.LongOffsets)
            {
                bin.Jump(4);
            }

            long baseDataOffset;
            long subtypeDataOffset;

            if (bin.LongOffsets)
            {
                baseDataOffset    = bin.ReadInt64();
                subtypeDataOffset = bin.ReadInt64();
            }
            else
            {
                baseDataOffset    = bin.ReadInt32();
                subtypeDataOffset = bin.ReadInt32();
            }

            BASE_CONST_1 = bin.ReadInt32();

            bin.StepInMSB(baseDataOffset);
            {
                i_Part       = bin.ReadInt32();
                i_Region     = bin.ReadInt32();
                EntityID     = bin.ReadInt32();
                BASE_CONST_2 = bin.ReadInt32();
            }
            bin.StepOut();

            bin.StepInMSB(subtypeDataOffset);
            {
                SubtypeRead(bin);
            }
            bin.StepOut();
        }
Esempio n. 6
0
        protected override void SubtypeRead(DSBinaryReader bin)
        {
            SUB_CONST_1 = bin.ReadInt32();
            if (bin.LongOffsets)
            {
                bin.Jump(4);
            }

            if (!bin.IsDeS)
            {
                i_PartName = bin.ReadInt32();
            }

            BreakTerm   = bin.ReadSByte();
            NetSyncType = bin.ReadSByte();
            SUB_CONST_2 = bin.ReadByte();
            SUB_CONST_3 = bin.ReadByte();

            InitAnimID = bin.ReadInt16();
            SubUnk4    = bin.ReadInt16();

            SubUnk5     = bin.ReadInt32();
            SUB_CONST_4 = bin.ReadInt32();
        }
Esempio n. 7
0
        protected override void InternalRead(DSBinaryReader bin)
        {
            Name = bin.ReadMsbString();

            bin.AssertInt32((int)Type);

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

            if (bin.LongOffsets)
            {
                bin.Jump(4);
            }

            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.ReadInt32();
            DrawGroup2 = bin.ReadInt32();
            DrawGroup3 = bin.ReadInt32();
            DrawGroup4 = bin.ReadInt32();

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

            long baseDataOffset;
            long subtypeDataOffset;

            if (bin.LongOffsets)
            {
                bin.Jump(4);
                baseDataOffset    = bin.ReadInt64();
                subtypeDataOffset = bin.ReadInt64();
            }
            else
            {
                baseDataOffset    = bin.ReadInt32();
                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();
                PartsBaseUnk0           = bin.ReadByte();
                IsShadowSrc             = bin.ReadBoolean();
                IsShadowDest            = bin.ReadBoolean();
                IsShadowOnly            = bin.ReadBoolean();
                DrawByReflectCam        = bin.ReadBoolean();
                DrawOnlyReflectCam      = bin.ReadBoolean();
                IsUseDepthBiasFloat     = bin.ReadSByte();
                DisablePointLightEffect = bin.ReadSByte();

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

            bin.StepInMSB(subtypeDataOffset);
            {
                SubtypeRead(bin);
            }
            bin.StepOut();
        }
Esempio n. 8
0
 private void SubtypeReadDeS(DSBinaryReader bin)
 {
     bin.Jump(4); //skip region index(?), since it seems to be duplicate
     SoundType = (MsbSoundType)bin.ReadInt32();
     SoundID   = bin.ReadInt32();
 }