XCom.XCTileset.ParseLine C# (CSharp) Method

ParseLine() public method

public ParseLine ( string keyword, string rest, StreamReader sr, VarCollection vars ) : void
keyword string
rest string
sr System.IO.StreamReader
vars VarCollection
return void
		public override void ParseLine(string keyword, string rest,StreamReader sr,VarCollection vars)
		{
			switch(keyword)
			{
				case "files":
				{
					Dictionary<string, IMapDesc> subset = new Dictionary<string, IMapDesc>();
					subsets[rest]=subset;
					string line = VarCollection.ReadLine(sr,vars);
					while(line!="end" && line!="END")
					{
						int idx = line.IndexOf(':');
						string fName = line.Substring(0,idx);
						string[] deps = line.Substring(idx+1).Split(' ');
						XCMapDesc imd = new XCMapDesc(fName, rootPath, blankPath, rmpPath, deps, myPal);
						maps[fName] =imd;
						subset[fName]=imd;
						line = VarCollection.ReadLine(sr,vars);
					}
				}
					break;
				case "order":
					mapOrder = rest.Split(' ');
					break;
				case "starttile":
					startTile = int.Parse(rest);
					break;
				case "startloc":
					string[] locs = rest.Split(' ');
					startLoc = new MapLocation[locs.Length];
					for(int i=0;i<locs.Length;i++)
					{
						string[] loc = locs[i].Split(',');
						int r = int.Parse(loc[0]);
						int c = int.Parse(loc[1]);
						int h = int.Parse(loc[2]);
						startLoc[i] = new MapLocation(r,c,h);
					}
					break;
				case "endtile":
					endTile = int.Parse(rest);
					break;
				default:
					xConsole.AddLine(string.Format("Unknown line in tileset {0}-> {1}:{2}",name,keyword,rest));
					break;
			}
		}
	}