Ejemplo n.º 1
0
        // ---- METHODS ------------------------------------------------------------------------------------------------

        void IResData.Load(ResFileLoader loader)
        {
            loader.CheckSignature(_signature);
            Name   = loader.LoadString();
            Path   = loader.LoadString();
            _flags = loader.ReadUInt16();
            ushort numUserData = loader.ReadUInt16();

            FrameCount = loader.ReadInt32();
            ushort numAnim  = loader.ReadUInt16();
            ushort numCurve = loader.ReadUInt16();

            BakedSize    = loader.ReadUInt32();
            BindModel    = loader.Load <Model>();
            BindIndices  = loader.LoadCustom(() => loader.ReadUInt16s(numAnim));
            Names        = loader.LoadCustom(() => loader.LoadStrings(numAnim)); // Offset to name list.
            Curves       = loader.LoadList <AnimCurve>(numCurve);
            BaseDataList = loader.LoadCustom(() =>
            {
                bool[] baseData = new bool[numAnim];
                int i           = 0;
                while (i < numAnim)
                {
                    byte b = loader.ReadByte();
                    for (int j = 0; j < 8 && i < numAnim; j++)
                    {
                        baseData[i++] = b.GetBit(j);
                    }
                }
                return(baseData);
            });
            UserData = loader.LoadDict <UserData>();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Texture"/> class.
        /// </summary>
        public Texture()
        {
            CompSelR = GX2CompSel.ChannelR;
            CompSelG = GX2CompSel.ChannelG;
            CompSelB = GX2CompSel.ChannelB;
            CompSelA = GX2CompSel.ChannelA;

            Name        = "";
            Path        = "";
            Width       = 0;
            Height      = 0;
            Depth       = 1;
            Swizzle     = 0;
            Alignment   = 4096;
            ArrayLength = 1;
            Pitch       = 32;
            TileMode    = GX2TileMode.Mode2dTiledThin1;
            AAMode      = GX2AAMode.Mode1X;
            Dim         = GX2SurfaceDim.Dim2D;
            Format      = GX2SurfaceFormat.T_BC1_SRGB;

            Data    = new byte[0];
            MipData = new byte[0];
            Regs    = new uint[5];

            UserData = new ResDict <UserData>();
        }
Ejemplo n.º 3
0
        // ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------

        /// <summary>
        /// Initializes a new instance of the <see cref="ResFile"/> class.
        /// </summary>
        public ResFile()
        {
            System.Console.WriteLine("Creating res file....");

            Name      = "";
            Alignment = 8192;

            VersionMajor  = 3;
            VersionMajor2 = 4;
            VersionMinor  = 0;
            VersionMinor2 = 4;

            //Initialize Dictionaries
            Models              = new ResDict <Model>();
            Textures            = new ResDict <Texture>();
            SkeletalAnims       = new ResDict <SkeletalAnim>();
            ShaderParamAnims    = new ResDict <ShaderParamAnim>();
            ColorAnims          = new ResDict <ShaderParamAnim>();
            TexSrtAnims         = new ResDict <ShaderParamAnim>();
            TexPatternAnims     = new ResDict <TexPatternAnim>();
            BoneVisibilityAnims = new ResDict <VisibilityAnim>();
            MatVisibilityAnims  = new ResDict <VisibilityAnim>();
            ShapeAnims          = new ResDict <ShapeAnim>();
            SceneAnims          = new ResDict <SceneAnim>();
            ExternalFiles       = new ResDict <ExternalFile>();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Mesh"/> class.
        /// </summary>
        public VertexBuffer()
        {
            VertexSkinCount = 0;

            Attributes = new ResDict <VertexAttrib>();
            Buffers    = new List <Buffer>();
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Skeleton"/> class.
 /// </summary>
 public Skeleton()
 {
     MatrixToBoneList     = new List <ushort>();
     InverseModelMatrices = new List <Matrix3x4>();
     Bones         = new ResDict <Bone>();
     FlagsRotation = SkeletonFlagsRotation.EulerXYZ;
     FlagsScaling  = SkeletonFlagsScaling.Maya;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShaderAssign"/> class.
 /// </summary>
 public ShaderAssign()
 {
     ShaderArchiveName = "";
     ShadingModelName  = "";
     Revision          = 0;
     AttribAssigns     = new ResDict <ResString>();
     SamplerAssigns    = new ResDict <ResString>();
     ShaderOptions     = new ResDict <ResString>();
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Model"/> class.
 /// </summary>
 public Model()
 {
     Name          = "";
     Path          = "";
     Skeleton      = new Skeleton();
     VertexBuffers = new List <VertexBuffer>();
     Shapes        = new ResDict <Shape>();
     Materials     = new ResDict <Material>();
     UserData      = new ResDict <UserData>();
 }
Ejemplo n.º 8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SceneAnim"/> class.
        /// </summary>
        public SceneAnim()
        {
            Name = "";
            Path = "";

            CameraAnims = new ResDict <CameraAnim>();
            LightAnims  = new ResDict <LightAnim>();
            FogAnims    = new ResDict <FogAnim>();
            UserData    = new ResDict <UserData>();
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CameraAnim"/> class.
        /// </summary>
        public CameraAnim()
        {
            Name       = "";
            Flags      = CameraAnimFlags.EulerZXY;
            FrameCount = 0;
            BakedSize  = 0;

            BaseData = new CameraAnimData();
            Curves   = new List <AnimCurve>();
            UserData = new ResDict <UserData>();
        }
Ejemplo n.º 10
0
        // ---- METHODS ------------------------------------------------------------------------------------------------

        void IResData.Load(ResFileLoader loader)
        {
            loader.CheckSignature(_signature);
            Version = loader.ReadUInt32();
            SetVersionInfo(Version);

            ByteOrder = loader.ReadEnum <ByteOrder>(true);
            ushort sizHeader = loader.ReadUInt16();
            uint   sizFile   = loader.ReadUInt32();

            Alignment = loader.ReadUInt32();
            Name      = loader.LoadString();
            uint sizStringPool = loader.ReadUInt32();
            uint ofsStringPool = loader.ReadOffset();

            Models              = loader.LoadDict <Model>();
            Textures            = loader.LoadDict <Texture>();
            SkeletalAnims       = loader.LoadDict <SkeletalAnim>();
            ShaderParamAnims    = loader.LoadDict <ShaderParamAnim>();
            ColorAnims          = loader.LoadDict <ShaderParamAnim>();
            TexSrtAnims         = loader.LoadDict <ShaderParamAnim>();
            TexPatternAnims     = loader.LoadDict <TexPatternAnim>();
            BoneVisibilityAnims = loader.LoadDict <VisibilityAnim>();
            MatVisibilityAnims  = loader.LoadDict <VisibilityAnim>();
            ShapeAnims          = loader.LoadDict <ShapeAnim>();

            if (loader.ResFile.Version >= 0x02040000)
            {
                SceneAnims    = loader.LoadDict <SceneAnim>();
                ExternalFiles = loader.LoadDict <ExternalFile>();
                ushort numModel              = loader.ReadUInt16();
                ushort numTexture            = loader.ReadUInt16();
                ushort numSkeletalAnim       = loader.ReadUInt16();
                ushort numShaderParamAnim    = loader.ReadUInt16();
                ushort numColorAnim          = loader.ReadUInt16();
                ushort numTexSrtAnim         = loader.ReadUInt16();
                ushort numTexPatternAnim     = loader.ReadUInt16();
                ushort numBoneVisibilityAnim = loader.ReadUInt16();
                ushort numMatVisibilityAnim  = loader.ReadUInt16();
                ushort numShapeAnim          = loader.ReadUInt16();
                ushort numSceneAnim          = loader.ReadUInt16();
                ushort numExternalFile       = loader.ReadUInt16();
                uint   userPointer           = loader.ReadUInt32();
            }
            else //Note very old versions have no counts and is mostly unkown atm
            {
                uint userPointer  = loader.ReadUInt32();
                uint userPointer2 = loader.ReadUInt32();

                SceneAnims    = loader.LoadDict <SceneAnim>();
                ExternalFiles = loader.LoadDict <ExternalFile>();
            }
        }
Ejemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VisibilityAnim"/> class.
 /// </summary>
 public VisibilityAnim()
 {
     Name         = "";
     Path         = "";
     Flags        = 0;
     FrameCount   = 0;
     BakedSize    = 0;
     Curves       = new List <AnimCurve>();
     BindIndices  = new ushort[0];
     Names        = new List <string>();
     BaseDataList = new bool[0];
     UserData     = new ResDict <UserData>();
 }
Ejemplo n.º 12
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FogAnim"/> class.
        /// </summary>
        public FogAnim()
        {
            Name = "";
            DistanceAttnFuncName = "";
            Flags                 = 0;
            FrameCount            = 0;
            BakedSize             = 0;
            DistanceAttnFuncIndex = 0;

            BaseData = new FogAnimData();
            Curves   = new List <AnimCurve>();
            UserData = new ResDict <UserData>();
        }
Ejemplo n.º 13
0
        // ---- METHODS ------------------------------------------------------------------------------------------------

        void IResData.Load(ResFileLoader loader)
        {
            ShaderArchiveName = loader.LoadString();
            ShadingModelName  = loader.LoadString();
            Revision          = loader.ReadUInt32();
            byte   numAttribAssign  = loader.ReadByte();
            byte   numSamplerAssign = loader.ReadByte();
            ushort numShaderOption  = loader.ReadUInt16();

            AttribAssigns  = loader.LoadDict <ResString>();
            SamplerAssigns = loader.LoadDict <ResString>();
            ShaderOptions  = loader.LoadDict <ResString>();
        }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShapeAnim"/> class.
 /// </summary>
 public ShapeAnim()
 {
     Name             = "";
     Path             = "";
     Flags            = 0;
     BindModel        = new Model();
     BindIndices      = new ushort[0];
     VertexShapeAnims = new List <VertexShapeAnim>();
     FrameCount       = 0;
     BakedSize        = 0;
     BindIndices      = new ushort[0];
     UserData         = new ResDict <UserData>();
 }
Ejemplo n.º 15
0
        public ShaderParamAnim()
        {
            Name = "";
            Path = "";

            Flags       = 0;
            FrameCount  = 0;
            BakedSize   = 0;
            BindModel   = new Model();
            BindIndices = new ushort[0];

            ShaderParamMatAnims = new List <ShaderParamMatAnim>();
            UserData            = new ResDict <UserData>();
        }
Ejemplo n.º 16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SkeletalAnim"/> class.
 /// </summary>
 public SkeletalAnim()
 {
     Name = "";
     Path = "";
     FlagsAnimSettings = 0;
     FlagsScale        = SkeletalAnimFlagsScale.Maya;
     FlagsRotate       = SkeletalAnimFlagsRotate.EulerXYZ;
     FrameCount        = 0;
     BakedSize         = 0;
     BoneAnims         = new List <BoneAnim>();
     BindSkeleton      = new Skeleton();
     BindIndices       = new ushort[0];
     UserData          = new ResDict <UserData>();
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShapeAnim"/> class.
 /// </summary>
 public TexPatternAnim()
 {
     Name               = "";
     Path               = "";
     Flags              = 0;
     BindModel          = new Model();
     BindIndices        = new ushort[0];
     TexPatternMatAnims = new List <TexPatternMatAnim>();
     FrameCount         = 0;
     BakedSize          = 0;
     BindIndices        = new ushort[0];
     UserData           = new ResDict <UserData>();
     TextureRefs        = new ResDict <TextureRef>();
     TextureRefNames    = new List <TextureRef>();
 }
Ejemplo n.º 18
0
        // ---- METHODS ------------------------------------------------------------------------------------------------

        void IResData.Load(ResFileLoader loader)
        {
            loader.CheckSignature(_signature);
            Name = loader.LoadString();
            Path = loader.LoadString();
            ushort numUserData   = loader.ReadUInt16();
            ushort numCameraAnim = loader.ReadUInt16();
            ushort numLightAnim  = loader.ReadUInt16();
            ushort numFogAnim    = loader.ReadUInt16();

            CameraAnims = loader.LoadDict <CameraAnim>();
            LightAnims  = loader.LoadDict <LightAnim>();
            FogAnims    = loader.LoadDict <FogAnim>();
            UserData    = loader.LoadDict <UserData>();
        }
Ejemplo n.º 19
0
        void IResData.Load(ResFileLoader loader)
        {
            if (loader.ResFile.Version >= 0x02040000)
            {
                loader.CheckSignature(_signature);
                Name  = loader.LoadString();
                Path  = loader.LoadString();
                Flags = loader.ReadEnum <ShaderParamAnimFlags>(true);

                ushort numMatAnim = 0;
                if (loader.ResFile.Version >= 0x03040000)
                {
                    FrameCount = loader.ReadInt32();
                    numMatAnim = loader.ReadUInt16();
                    ushort numUserData  = loader.ReadUInt16();
                    int    numParamAnim = loader.ReadInt32();
                    int    numCurve     = loader.ReadInt32();
                    BakedSize = loader.ReadUInt32();
                }
                else
                {
                    FrameCount = loader.ReadUInt16();
                    numMatAnim = loader.ReadUInt16();
                    unk        = loader.ReadUInt32();
                    int numCurve = loader.ReadInt32();
                    BakedSize = loader.ReadUInt32();
                    int padding2 = loader.ReadInt32();
                }
                BindModel           = loader.Load <Model>();
                BindIndices         = loader.LoadCustom(() => loader.ReadUInt16s(numMatAnim));
                ShaderParamMatAnims = loader.LoadList <ShaderParamMatAnim>(numMatAnim);
                UserData            = loader.LoadDict <UserData>();
            }
            else
            {
                Flags      = loader.ReadEnum <ShaderParamAnimFlags>(true);
                FrameCount = loader.ReadInt16();
                ushort numMatAnim  = loader.ReadUInt16();
                ushort numUserData = loader.ReadUInt16();
                ushort unk         = loader.ReadUInt16();
                BakedSize           = loader.ReadUInt32();
                Name                = loader.LoadString();
                Path                = loader.LoadString();
                BindModel           = loader.Load <Model>();
                BindIndices         = loader.LoadCustom(() => loader.ReadUInt16s(numMatAnim));
                ShaderParamMatAnims = loader.LoadList <ShaderParamMatAnim>(numMatAnim);
            }
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Material"/> class.
        /// </summary>
        public Material()
        {
            Name  = "";
            Flags = MaterialFlags.Visible;

            ShaderAssign = new ShaderAssign();

            RenderInfos  = new ResDict <RenderInfo>();
            TextureRefs  = new List <TextureRef>();
            Samplers     = new ResDict <Sampler>();
            UserData     = new ResDict <UserData>();
            ShaderParams = new ResDict <ShaderParam>();

            ShaderParamData = new byte[0];
            VolatileFlags   = new byte[0];
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LightAnim"/> class.
        /// </summary>
        public LightAnim()
        {
            Name = "";
            DistanceAttnFuncName = "";
            AngleAttnFuncName    = "";
            Flags                 = 0;
            LightTypeIndex        = 0;
            AnimatedFields        = 0;
            FrameCount            = 0;
            BakedSize             = 0;
            DistanceAttnFuncIndex = 0;
            AngleAttnFuncIndex    = 0;

            BaseData = new LightAnimData();
            Curves   = new List <AnimCurve>();
            UserData = new ResDict <UserData>();
        }
Ejemplo n.º 22
0
        // ---- METHODS ------------------------------------------------------------------------------------------------

        void IResData.Load(ResFileLoader loader)
        {
            loader.CheckSignature(_signature);
            Name       = loader.LoadString();
            Path       = loader.LoadString();
            _flags     = loader.ReadUInt32();
            FrameCount = loader.ReadInt32();
            ushort numBoneAnim = loader.ReadUInt16();
            ushort numUserData = loader.ReadUInt16();
            int    numCurve    = loader.ReadInt32();

            BakedSize    = loader.ReadUInt32();
            BoneAnims    = loader.LoadList <BoneAnim>(numBoneAnim);
            BindSkeleton = loader.Load <Skeleton>();
            BindIndices  = loader.LoadCustom(() => loader.ReadUInt16s(numBoneAnim));
            UserData     = loader.LoadDict <UserData>();
        }
Ejemplo n.º 23
0
        void IResData.Load(ResFileLoader loader)
        {
            loader.CheckSignature(_signature);
            Flags = loader.ReadEnum <CameraAnimFlags>(true);
            loader.Seek(2);
            FrameCount = loader.ReadInt32();
            byte numCurve = loader.ReadByte();

            loader.Seek(1);
            ushort numUserData = loader.ReadUInt16();

            BakedSize = loader.ReadUInt32();
            Name      = loader.LoadString();
            Curves    = loader.LoadList <AnimCurve>(numCurve);
            BaseData  = loader.LoadCustom(() => new CameraAnimData(loader));
            UserData  = loader.LoadDict <UserData>();
        }
Ejemplo n.º 24
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>();
        }
Ejemplo n.º 25
0
        // ---- METHODS ------------------------------------------------------------------------------------------------

        void IResData.Load(ResFileLoader loader)
        {
            if (loader.ResFile.Version >= 0x02040000)
            {
                loader.CheckSignature(_signature);
                Name   = loader.LoadString();
                Path   = loader.LoadString();
                _flags = loader.ReadUInt32();

                if (loader.ResFile.Version >= 0x03040000)
                {
                    FrameCount  = loader.ReadInt32();
                    numBoneAnim = loader.ReadUInt16();
                    ushort numUserData = loader.ReadUInt16();
                    int    numCurve    = loader.ReadInt32();
                    BakedSize = loader.ReadUInt32();
                }
                else
                {
                    FrameCount  = loader.ReadUInt16();
                    numBoneAnim = loader.ReadUInt16();
                    ushort numUserData = loader.ReadUInt16();
                    ushort numCurve    = loader.ReadUInt16();
                    BakedSize = loader.ReadUInt32();
                    loader.Seek(4); //padding
                }

                BoneAnims    = loader.LoadList <BoneAnim>(numBoneAnim).ToList();
                BindSkeleton = loader.Load <Skeleton>();
                BindIndices  = loader.LoadCustom(() => loader.ReadUInt16s(numBoneAnim));
                UserData     = loader.LoadDict <UserData>();
            }
            else
            {
                _flags      = loader.ReadUInt32();
                FrameCount  = loader.ReadUInt16();
                numBoneAnim = loader.ReadUInt16();
                ushort numUserData = loader.ReadUInt16();
                ushort numCurve    = loader.ReadUInt16();
                Name         = loader.LoadString();
                Path         = loader.LoadString();
                BoneAnims    = loader.LoadList <BoneAnim>(numBoneAnim).ToList();
                BindSkeleton = loader.Load <Skeleton>();
                BindIndices  = loader.LoadCustom(() => loader.ReadUInt16s(numBoneAnim));
            }
        }
Ejemplo n.º 26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Shape"/> class.
 /// </summary>
 public Shape()
 {
     Name                   = "";
     Flags                  = ShapeFlags.HasVertexBuffer;
     MaterialIndex          = 0;
     BoneIndex              = 0;
     VertexBufferIndex      = 0;
     RadiusArray            = new List <float>();
     VertexSkinCount        = 0;
     TargetAttribCount      = 0;
     Meshes                 = new List <Mesh>();
     SkinBoneIndices        = new List <ushort>();
     KeyShapes              = new ResDict <KeyShape>();
     SubMeshBoundings       = new List <Bounding>();
     SubMeshBoundingNodes   = new List <BoundingNode>();
     SubMeshBoundingIndices = new List <ushort>();
     VertexBuffer           = new VertexBuffer();
 }
Ejemplo n.º 27
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Bone"/> class.
        /// </summary>
        public Bone()
        {
            Name              = "";
            UserData          = new ResDict <UserData>();
            ParentIndex       = ushort.MaxValue;
            SmoothMatrixIndex = -1;
            RigidMatrixIndex  = -1;
            BillboardIndex    = ushort.MaxValue;

            Scale    = new Vector3F(1, 1, 1);
            Rotation = new Vector4F(0, 0, 0, 0);
            Position = new Vector3F(0, 0, 0);

            Flags                    = BoneFlags.Visible;
            FlagsRotation            = BoneFlagsRotation.EulerXYZ;
            FlagsBillboard           = BoneFlagsBillboard.None;
            FlagsTransform           = BoneFlagsTransform.None;
            FlagsTransformCumulative = BoneFlagsTransformCumulative.None;
        }
Ejemplo n.º 28
0
        // ---- METHODS ------------------------------------------------------------------------------------------------

        void IResData.Load(ResFileLoader loader)
        {
            loader.CheckSignature(_signature);
            Dim      = loader.ReadEnum <GX2SurfaceDim>(true);
            Width    = loader.ReadUInt32();
            Height   = loader.ReadUInt32();
            Depth    = loader.ReadUInt32();
            MipCount = loader.ReadUInt32();
            Format   = loader.ReadEnum <GX2SurfaceFormat>(true);
            AAMode   = loader.ReadEnum <GX2AAMode>(true);
            Use      = loader.ReadEnum <GX2SurfaceUse>(true);
            uint sizData      = loader.ReadUInt32();
            uint imagePointer = loader.ReadUInt32();
            uint sizMipData   = loader.ReadUInt32();
            uint mipPointer   = loader.ReadUInt32();

            TileMode       = loader.ReadEnum <GX2TileMode>(true);
            Swizzle        = loader.ReadUInt32();
            Alignment      = loader.ReadUInt32();
            Pitch          = loader.ReadUInt32();
            MipOffsets     = loader.ReadUInt32s(13);
            ViewMipFirst   = loader.ReadUInt32();
            ViewMipCount   = loader.ReadUInt32();
            ViewSliceFirst = loader.ReadUInt32();
            ViewSliceCount = loader.ReadUInt32();
            CompSelR       = loader.ReadEnum <GX2CompSel>(true);
            CompSelG       = loader.ReadEnum <GX2CompSel>(true);
            CompSelB       = loader.ReadEnum <GX2CompSel>(true);
            CompSelA       = loader.ReadEnum <GX2CompSel>(true);
            Regs           = loader.ReadUInt32s(5);
            uint handle = loader.ReadUInt32();

            ArrayLength = loader.ReadUInt32(); // Possibly just a byte.
            Name        = loader.LoadString();
            Path        = loader.LoadString();
            Data        = loader.LoadCustom(() => loader.ReadBytes((int)sizData));
            MipData     = loader.LoadCustom(() => loader.ReadBytes((int)sizMipData));
            UserData    = loader.LoadDict <UserData>();
            ushort numUserData = loader.ReadUInt16();

            loader.Seek(2);
        }
Ejemplo n.º 29
0
        // ---- METHODS ------------------------------------------------------------------------------------------------

        void IResData.Load(ResFileLoader loader)
        {
            loader.CheckSignature(_signature);
            Name  = loader.LoadString();
            Path  = loader.LoadString();
            Flags = loader.ReadEnum <ShapeAnimFlags>(true);
            ushort numUserData = loader.ReadUInt16();

            FrameCount = loader.ReadInt32();
            ushort numVertexShapeAnim = loader.ReadUInt16();
            ushort numKeyShapeAnim    = loader.ReadUInt16();
            ushort numCurve           = loader.ReadUInt16();

            loader.Seek(2);
            BakedSize        = loader.ReadUInt32();
            BindModel        = loader.Load <Model>();
            BindIndices      = loader.LoadCustom(() => loader.ReadUInt16s(numVertexShapeAnim));
            VertexShapeAnims = loader.LoadList <VertexShapeAnim>(numVertexShapeAnim);
            UserData         = loader.LoadDict <UserData>();
        }
Ejemplo n.º 30
0
        // ---- METHODS ------------------------------------------------------------------------------------------------

        void IResData.Load(ResFileLoader loader)
        {
            loader.CheckSignature(_signature);
            Name  = loader.LoadString();
            Path  = loader.LoadString();
            Flags = loader.ReadEnum <TexPatternAnimFlags>(true);
            ushort numUserData = loader.ReadUInt16();

            FrameCount = loader.ReadInt32();
            ushort numTextureRef = loader.ReadUInt16();
            ushort numMatAnim    = loader.ReadUInt16();
            int    numPatAnim    = loader.ReadInt32();
            int    numCurve      = loader.ReadInt32();

            BakedSize          = loader.ReadUInt32();
            BindModel          = loader.Load <Model>();
            BindIndices        = loader.LoadCustom(() => loader.ReadUInt16s(numMatAnim));
            TexPatternMatAnims = loader.LoadList <TexPatternMatAnim>(numMatAnim);
            TextureRefs        = loader.LoadDict <TextureRef>();
            UserData           = loader.LoadDict <UserData>();
        }