protected override object LoadData(Stream stream) { // We use a binary reader. BinaryReader reader = new BinaryReader(stream, System.Text.Encoding.ASCII); // Create a new scene to load to. Scene scene = new Scene(); // Peep the first chunk to make sure it's a 'main' chunk. if (MAXChunkHeader.Peep(reader).type != ChunkType.CHUNK_MAIN) { return(false); } // The first chunk is always the main chunk, so read it. MainChunk main = new MainChunk(); main.Read(scene, reader); return(scene); }
protected override object LoadData(Stream stream) { // We use a binary reader. BinaryReader reader = new BinaryReader(stream, System.Text.Encoding.ASCII); // Create a new scene to load to. Scene scene = new Scene(); // Peep the first chunk to make sure it's a 'main' chunk. if(MAXChunkHeader.Peep(reader).type != ChunkType.CHUNK_MAIN) return false; // The first chunk is always the main chunk, so read it. MainChunk main = new MainChunk(); main.Read(scene, reader); return scene; }