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