public Form1() { InitializeComponent(); tileset = new Tileset(); TilePalette.Update(tileset); MapEditor.Selected = TilePalette.Selected; MapEditor.CreateMap(tileset); }
private void OpenDialog_FileOk(object sender, CancelEventArgs e) { string fileName = OpenDialog.FileName; BinaryReader input = new BinaryReader(File.OpenRead(fileName)); MapEditor.CreateMap(tileset, input.ReadInt32(), input.ReadInt32()); for (int i = 0; i < MapEditor.Width; i++) { for (int j = 0; j < MapEditor.Height; j++) { MapEditor[i, j].Data = tileset.Sources[input.ReadString()]; MapEditor[i, j].ImageIndex = input.ReadInt32(); input.ReadInt32(); // Depth, currently useless for reading into this program } } input.ReadInt32(); // Number of Events, not yet implemented input.Close(); }
public NewMapForm(MapEditor m) { InitializeComponent(); editor = m; }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { MapEditor.CreateMap(tileset); }