Exemple #1
0
 public Form1()
 {
     InitializeComponent();
     tileset = new Tileset();
     TilePalette.Update(tileset);
     MapEditor.Selected = TilePalette.Selected;
     MapEditor.CreateMap(tileset);
 }
Exemple #2
0
        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();
        }
Exemple #3
0
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MapEditor.CreateMap(tileset);
 }