Exemple #1
0
        /// <summary>
        ///     Loads a CP overworld character model from Pokémon.
        /// </summary>
        /// <param name="data">The data</param>
        /// <returns>The Model group with the character meshes</returns>
        public static RenderBase.OModelGroup load(Stream data)
        {
            RenderBase.OModelGroup models = new RenderBase.OModelGroup();

            OContainer container = PkmnContainer.load(data);

            models = CM.load(new MemoryStream(container.ElementAt(1).data));

            return(models);
        }
Exemple #2
0
        /// <summary>
        ///     Loads a CM overworld character model from Pokémon.
        /// </summary>
        /// <param name="data">The data</param>
        /// <returns>The Model group with the character meshes</returns>
        public static RenderBase.OModelGroup load(Stream data)
        {
            RenderBase.OModelGroup models = new RenderBase.OModelGroup();

            OContainer container = PkmnContainer.load(data);

            models = GfModel.load(new MemoryStream(container.First().data));

            List <RenderBase.OSkeletalAnimation> anms = GfMotion.load(new MemoryStream(container.ElementAt(1).data));

            foreach (RenderBase.OSkeletalAnimation anm in anms)
            {
                models.skeletalAnimation.Add(anm);
            }

            return(models);
        }