Esempio n. 1
0
        /// <summary>
        ///     Loads a MM overworld chibi 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 = BCH.load(new MemoryStream(container.First().data));

            return(models);
        }
Esempio n. 2
0
        /// <summary>
        ///     Loads a BS animation file from Pokémon.
        /// </summary>
        /// <param name="data">The data</param>
        /// <returns>The Model group with the animations</returns>
        public static RenderBase.OModelGroup load(Stream data)
        {
            List <RenderBase.OModelGroup> models = new List <RenderBase.OModelGroup>();
            OContainer naCont = PkmnContainer.load(data); //Get NA containers from BS
            var        naList = naCont.GetList();

            foreach (var entry in naCont.Skip(1))
            {
                OContainer bchCont = PkmnContainer.load(new MemoryStream(entry.data)); //Get BCH from NA containers
                models.Add(BCH.load(new MemoryStream(bchCont.First().data)));
            }

            return(models[0]); //TODO: Figure out how to load all anim BCHs
        }
Esempio n. 3
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);
        }