// ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------

        internal BoneAnimData(ResFileLoader loader, BoneAnimFlagsBase flags)
        {
            Flags     = 0; // Never in files.
            Scale     = flags.HasFlag(BoneAnimFlagsBase.Scale) ? loader.ReadVector3F() : Vector3F.Zero;
            Rotate    = flags.HasFlag(BoneAnimFlagsBase.Rotate) ? loader.ReadVector4F() : Vector4F.Zero;
            Padding   = 0; // Never in files.
            Translate = flags.HasFlag(BoneAnimFlagsBase.Translate) ? loader.ReadVector3F() : Vector3F.Zero;
        }
Esempio n. 2
0
        // ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------

        internal LightAnimData(ResFileLoader loader, LightAnimField flags)
        {
            Enable       = flags.HasFlag(LightAnimField.Enable) ? loader.ReadInt32() : 0;
            Position     = flags.HasFlag(LightAnimField.Position) ? loader.ReadVector3F() : Vector3F.Zero;
            Rotation     = flags.HasFlag(LightAnimField.Rotation) ? loader.ReadVector3F() : Vector3F.Zero;
            DistanceAttn = flags.HasFlag(LightAnimField.DistanceAttn) ? loader.ReadVector2F() : Vector2F.Zero;
            AngleAttn    = flags.HasFlag(LightAnimField.AngleAttn) ? loader.ReadVector2F() : Vector2F.Zero;
            Color0       = flags.HasFlag(LightAnimField.Color0) ? loader.ReadVector3F() : Vector3F.Zero;
            Color1       = flags.HasFlag(LightAnimField.Color1) ? loader.ReadVector3F() : Vector3F.Zero;
        }
Esempio n. 3
0
        // ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------

        internal CameraAnimData(ResFileLoader loader)
        {
            ClipNear    = loader.ReadSingle();
            ClipFar     = loader.ReadSingle();
            AspectRatio = loader.ReadSingle();
            FieldOfView = loader.ReadSingle();
            Position    = loader.ReadVector3F();
            Rotation    = loader.ReadVector3F();
            Twist       = loader.ReadSingle();
        }
Esempio n. 4
0
        // ---- METHODS ------------------------------------------------------------------------------------------------

        void IResData.Load(ResFileLoader loader)
        {
            Name = loader.LoadString();
            ushort idx = loader.ReadUInt16();

            ParentIndex       = loader.ReadUInt16();
            SmoothMatrixIndex = loader.ReadInt16();
            RigidMatrixIndex  = loader.ReadInt16();
            BillboardIndex    = loader.ReadUInt16();
            ushort numUserData = loader.ReadUInt16();

            _flags   = loader.ReadUInt32();
            Scale    = loader.ReadVector3F();
            Rotation = loader.ReadVector4F();
            Position = loader.ReadVector3F();
            UserData = loader.LoadDict <UserData>();
        }
Esempio n. 5
0
        // ---- METHODS ------------------------------------------------------------------------------------------------

        void IResData.Load(ResFileLoader loader)
        {
            if (loader.IsSwitch)
            {
                Name     = loader.LoadString();
                UserData = loader.LoadDictValues <UserData>();
                if (loader.ResFile.VersionMajor2 == 8 || loader.ResFile.VersionMajor2 == 9)
                {
                    loader.Seek(16);
                }

                ushort idx = loader.ReadUInt16();
                ParentIndex       = loader.ReadInt16();
                SmoothMatrixIndex = loader.ReadInt16();
                RigidMatrixIndex  = loader.ReadInt16();
                BillboardIndex    = loader.ReadInt16();
                ushort numUserData = loader.ReadUInt16();
                _flags   = loader.ReadUInt32();
                Scale    = loader.ReadVector3F();
                Rotation = loader.ReadVector4F();
                Position = loader.ReadVector3F();
            }
            else
            {
                Name = loader.LoadString();
                ushort idx = loader.ReadUInt16();
                ParentIndex       = loader.ReadInt16();
                SmoothMatrixIndex = loader.ReadInt16();
                RigidMatrixIndex  = loader.ReadInt16();
                BillboardIndex    = loader.ReadInt16();
                ushort numUserData = loader.ReadUInt16();
                _flags   = loader.ReadUInt32();
                Scale    = loader.ReadVector3F();
                Rotation = loader.ReadVector4F();
                Position = loader.ReadVector3F();
                UserData = loader.LoadDict <UserData>();

                if (loader.ResFile.Version < 0x03040000)
                {
                    InverseMatrix = loader.ReadMatrix3x4();
                }
            }
        }
Esempio n. 6
0
        // ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------

        internal FogAnimData(ResFileLoader loader)
        {
            DistanceAttn = loader.ReadVector2F();
            Color        = loader.ReadVector3F();
        }