Example #1
0
File: Form1.cs Project: sru4607/FFR
 public Form1()
 {
     InitializeComponent();
     tileset = new Tileset();
     TilePalette.Update(tileset);
     MapEditor.Selected = TilePalette.Selected;
     MapEditor.CreateMap(tileset);
 }
Example #2
0
File: Form1.cs Project: sru4607/FFR
        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();
        }
Example #3
0
 public NewMapForm(MapEditor m)
 {
     InitializeComponent();
     editor = m;
 }
Example #4
0
File: Form1.cs Project: sru4607/FFR
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MapEditor.CreateMap(tileset);
 }