예제 #1
0
        public void Load(Stream source_stream)
        {
            BinaryReader reader = new BinaryReader(source_stream, System.Text.Encoding.Default);

            header = new NiHeader();
            header.Read(reader);

            header.SetBlocksOffset(source_stream.Position);
            //header.Dump();

            int num_blocks = header.blocks.Length;

            for (int i = 0; i < num_blocks; i++)
            {
                header.blocks[i].Read(reader);
            }

            DumpNodes();
        }
예제 #2
0
        //TODO: nif

        static NiHeader GetHeader(Stream source_stream)
        {
            BinaryReader reader = new BinaryReader(source_stream, System.Text.Encoding.Default);

            NiHeader header = new NiHeader();

            header.Read(reader);

            header.SetBlocksOffset(source_stream.Position);
            //header.Dump();

            int num_blocks = header.blocks.Length;

            for (int i = 0; i < num_blocks; i++)
            {
                header.blocks[i].Read(reader);
            }
            return(header);
        }