Beispiel #1
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();
                }
            }
        }