public void TestDeserialiseMerlinStatic() { FileStream smallMazeFile = new FileStream(@"C:\Users\Philip\Desktop\HoverGame\HOVER\MAZES\MAZE1.MAZ", FileMode.Open); var classRegistry = new MfcClassRegistry(); classRegistry.RegisterClass("CMerlinStatic", typeof(CMerlinStatic)); classRegistry.RegisterClass("CMerlinLocation", typeof(CMerlinLocation)); MfcDeserialiser archive = new MfcDeserialiser(smallMazeFile, classRegistry); Maze maze = new Maze(); maze.Deserialise(archive); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); FileStream smallMazeFile = new FileStream(@"C:\Users\Philip\Desktop\HoverGame\HOVER\MAZES\small.MAZ", FileMode.Open); var classRegistry = new MfcClassRegistry(); classRegistry.AutoRegisterClasses(typeof(Maze).Assembly); MfcDeserialiser archive = new MfcDeserialiser(smallMazeFile, classRegistry); Maze maze = new Maze(); maze.Deserialise(archive); var form = new HoverForm(maze); MainLoop renderFrame = form.RunFrame; MessagePump.Run(form, renderFrame); }