public void prepareData(ref ChaosLevel theMap) { //TODO: Make all controls match the given map data chkUseTileset.Checked = tm.useTileset; tm = theMap; }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { //Note: there are totally 44 of these! Even though the game only has 13 or so playable levels! openFileDialog1.FileName = "*-pre.LDF"; openFileDialog1.Filter = "Map pre.LDF files|*-pre.ldf|All files|*.*"; DialogResult dres = openFileDialog1.ShowDialog(); if (dres == DialogResult.OK) { int newMap = openMaps.Length; Array.Resize(ref openMaps, openMaps.Length + 1); openMaps[newMap] = new ChaosLevel(); openMaps[newMap].readMapPreLDF(openFileDialog1.FileName); openMaps[newMap].readMapSetLDF(); openMaps[newMap].readMapEndLDF(); switchMaps(newMap); } }