PDA

View Full Version : Code for autoloading _1.txt files



throx
09-16-2003, 01:24 AM
In Form1.cs, look for the comment at the start of the following code block. It should be pretty obvious where it starts and stops



// Try it as a SEQ map first
if (!loadmap(f + ".map")) {
// If it didn't work, try a LoY map
if (!loadmap(f + ".txt")) {
bool foundmap = false;
for (int mapnum = 1; mapnum < 4; mapnum++)
{
if (loadmap(string.Format("{0}_{1}.txt", f, mapnum)))
{
foundmap = true;
break;
}
}
//... Missing map
if (!foundmap)
MessageBox.Show("Couldn't find a map for the zone: " + f, "Error");
}
else
this.Text = BaseTitle + si.Name;
}
else
this.Text = BaseTitle + si.Name;
mapPane1.map.fillConColors();