Esempio n. 1
0
        private void LoadMapDPP(BinaryReader reader)
        {
            Nsbmd        nsbmd;
            BinaryWriter writer;

            string[]       materialListForNsbmd;
            PkmnMapDemuxer demuxer = new PkmnMapDemuxer(reader, type);

            mapHeader      = PkmnMapHeader.FromReader(reader);
            streamMovement = new ClosableMemoryStream();
            writer         = new BinaryWriter(streamMovement);
            writer.Write(demuxer.DemuxMovBytes(mapHeader));
            arrayMovement = MovLoader.LoadMov(streamMovement);
            streamObject  = new ClosableMemoryStream();
            writer        = new BinaryWriter(streamObject);
            writer.Write(demuxer.DemuxObjBytes(mapHeader));
            listObjects = ObjLoader.LoadObj(streamObject);
            streamNSBMD = new ClosableMemoryStream();
            writer      = new BinaryWriter(streamNSBMD);
            writer.Write(demuxer.DemuxBMDBytes(mapHeader, 0));
            streamBDHC = new ClosableMemoryStream();
            writer     = new BinaryWriter(streamBDHC);
            writer.Write(demuxer.DemuxBdhcBytes(mapHeader));
            nsbmd = new Nsbmd();
            var reader2 = new BinaryReader(streamNSBMD);

            nsbmd.LoadBMD0(reader2, (int)mapHeader.BMDOffset);
            actualModel = nsbmd;
            getMatrixInfo();
            materialListForNsbmd = actualModel.getTexNameArray();
            if (actualModel.actualTex != null)
            {
                nsbmd.MatchTextures();
            }
        }
Esempio n. 2
0
        private void LoadMapBW(BinaryReader reader)
        {
            Nsbmd        nsbmd;
            BinaryWriter writer;

            string[]          materialListForNsbmd;
            PkmnMapDemuxer_Bw bw = new PkmnMapDemuxer_Bw(reader, type);

            mapHeaderBW = PkmnMapHeader_Bw.FromReader(reader);
            streamNSBMD = new ClosableMemoryStream();
            writer      = new BinaryWriter(streamNSBMD);
            writer.Write(bw.DemuxBMDBytes(mapHeaderBW, 0));
            streamMovement = new ClosableMemoryStream();
            writer         = new BinaryWriter(streamMovement);
            writer.Write(bw.DemuxMovBytes(mapHeaderBW));
            arrayMovementBW = MovLoader.LoadMov_Bw(streamMovement);
            streamObject    = new ClosableMemoryStream();
            writer          = new BinaryWriter(streamObject);
            writer.Write(bw.DemuxObjBytes(mapHeaderBW));
            listObjectsBW = ObjLoader.LoadObj_Bw(streamObject);
            nsbmd         = new Nsbmd();
            var reader2 = new BinaryReader(streamNSBMD);

            reader2.BaseStream.Position = 0;
            nsbmd.LoadBMD0(reader2, (int)mapHeaderBW.BMDOffset);
            actualModel = nsbmd;
            getMatrixInfo();
            materialListForNsbmd = actualModel.getTexNameArray();
            if (actualModel.actualTex != null)
            {
                nsbmd.MatchTextures();
            }
        }