/// <summary> /// </summary> /// <returns> /// </returns> private static List <PlayfieldData> ExtractPlayfieldData() { List <PlayfieldData> playfields = new List <PlayfieldData>(700); foreach (int recnum in extractor.GetRecordInstances(1000001)) { PlayfieldData pf = new PlayfieldData(); pf.PlayfieldId = recnum; // Console.WriteLine("Parsing PF " + recnum); if (extractor.GetRecordInstances(1000030).Contains(recnum)) { pf.Doors1 = PlayfieldParser.ParseDoors(extractor.GetRecordData(1000030, recnum)); } pf.Name = PlayfieldParser.ParseName(extractor.GetRecordData(1000001, recnum)); pf.Destinations = PlayfieldParser.ParseDestinations(extractor.GetRecordData(1000001, recnum)).Destinations; if (extractor.GetRecordInstances(1000021).Contains(recnum)) { pf.Walls = PlayfieldParser.ParseWalls(extractor.GetRecordData(1000021, recnum)); } playfields.Add(pf); } return(playfields); }
/// <summary> /// </summary> /// <returns> /// </returns> private static List <PlayfieldData> ExtractPlayfieldData() { List <PlayfieldData> playfields = new List <PlayfieldData>(700); int[] instances = extractor.GetRecordInstances(Extractor.RecordType.Playfield); foreach (int recnum in instances) { if (recnum < 120) { continue; } PlayfieldData pf = new PlayfieldData(); pf.PlayfieldId = recnum; int[] doors = extractor.GetRecordInstances(Extractor.RecordType.Door); if (doors.Contains(recnum)) { byte[] doorData = extractor.GetRecordData(Extractor.RecordType.Door, recnum); pf.Doors1 = PlayfieldParser.ParseDoors(doorData); } pf.Name = PlayfieldParser.ParseName(extractor.GetRecordData(Extractor.RecordType.Playfield, recnum)); pf.Destinations = PlayfieldParser.ParseDestinations(extractor.GetRecordData(Extractor.RecordType.Playfield, recnum)).Destinations; /*Console.WriteLine("Parsing PF " + recnum+" "+pf.Name); * if (recnum == 500) * { * Console.ReadLine(); * }*/ if (extractor.GetRecordInstances(Extractor.RecordType.Wall).Contains(recnum)) { pf.Walls = PlayfieldParser.ParseWalls(extractor.GetRecordData(Extractor.RecordType.Wall, recnum)); } playfields.Add(pf); } return(playfields); }