public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int endPosition)
        {
            if (dbg) Console.Out.WriteLine("|-| " + ChunkHeader.W3D_CHUNK_MESH);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_MESH;
            HeaderName = ChunkHeader.W3D_CHUNK_MESH.ToString();
        }
        ///<summary>
        ///ChunkChopper Constructer that starts the chunk chopping process and
        ///stores the root chunk in memory for future retreival.
        ///</summary>
        public ChunkChopper(BinaryReader bw, Boolean debugText, String filename)
        {
            _chkMap   = new ChunkMap();
            _bw       = bw;
            _debug    = debugText;
            _filename = filename;

            mainChunk = new RootChunk();
            while (_bw.BaseStream.Position < _bw.BaseStream.Length)
            {
                this.processMainChunks(mainChunk);
            }

            //printChunkHeirarchy(mainChunk, 0);
        }
        ///<summary>
        ///ChunkChopper Constructer that starts the chunk chopping process and
        ///stores the root chunk in memory for future retreival.
        ///</summary>
        public ChunkChopper(BinaryReader bw, Boolean debugText, String filename)
        {
            _chkMap = new ChunkMap();
            _bw = bw;
            _debug = debugText;
            _filename = filename;

            mainChunk = new RootChunk();
            while (_bw.BaseStream.Position < _bw.BaseStream.Length)
            {
                this.processMainChunks(mainChunk);
            }

            //printChunkHeirarchy(mainChunk, 0);
        }
Beispiel #4
0
        ///<summary>
        ///Overloaded Class Contructor
        ///</summary>
        public w3d(String fileName, Boolean debug)
        {
            //Initialize variables
            chkMap = new ChunkMap();
            debugText = debug;
            _filename = fileName;

            //Setup and open file for reading
            FileStream fileStream = new FileStream(@fileName, FileMode.Open);
            br = new BinaryReader(fileStream);

            //Start the parsing process.
            beginChunkChopping();

            //Close Binary Reader & close file
            fileStream.Close();
            br.Close();
        }
        ///<summary>
        ///Overloaded Class Contructor
        ///</summary>
        public w3d(String fileName, Boolean debug)
        {
            //Initialize variables
            chkMap    = new ChunkMap();
            debugText = debug;
            _filename = fileName;

            //Setup and open file for reading
            FileStream fileStream = new FileStream(@fileName, FileMode.Open);

            br = new BinaryReader(fileStream);

            //Start the parsing process.
            beginChunkChopping();

            //Close Binary Reader & close file
            fileStream.Close();
            br.Close();
        }
 public abstract void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int endPosition);
 public abstract void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int endPosition);