private void openQuick(string[] encdata) { // Gather encdatapaths = encdata; Array.Sort(encdatapaths); filepaths = encdatapaths.Skip(Main.oras ? 2 : 1).Take(encdatapaths.Length - (Main.oras ? 2 : 1)).ToArray(); masterZoneData = File.ReadAllBytes(encdatapaths[0]); zdLocations = new string[filepaths.Length]; rawLocations = new string[filepaths.Length]; tb_File5.Visible = Main.oras; // 5th File is only present with OR/AS. // Analyze for (int f = 0; f < filepaths.Length; f++) { string name = Path.GetFileNameWithoutExtension(filepaths[f]); int LocationNum = Convert.ToInt16(name.Substring(4, name.Length - 4)); ZoneData zo = new ZoneData(masterZoneData.Skip(f * ZoneData.Size).Take(ZoneData.Size).ToArray()); string LocationName = gameLocations[zo.ParentMap]; zdLocations[f] = LocationNum.ToString("000") + " - " + LocationName; rawLocations[f] = LocationName; } // Assign CB_LocationID.DataSource = zdLocations; CB_LocationID.Enabled = true; CB_LocationID_SelectedIndexChanged(null, null); NUD_WMap.Maximum = zdLocations.Length; // Cap map warp destinations to the amount of maps. }
public Zone(byte[][] Zone) { // A ZO is comprised of 4-5 files. // Array 0 is [Map Info] ZD = new ZoneData(Zone[0]); // Array 1 is [Overworld Entities & their Scripts] Entities = new ZoneEntities(Zone[1]); // Array 2 is [Map Script] MapScript = new ZoneScript(Zone[2]); // Array 3 is [Wild Encounters] Encounters = new ZoneEncounters(Zone[3]); // Array 4 is [???] - May not be present in all. if (Zone.Length <= 4) return; File5 = new ZoneUnknown(Zone[4]); }
private void openQuick(string[] encdata) { // Gather encdatapaths = encdata; Array.Sort(encdatapaths); filepaths = encdatapaths.Skip(Main.Config.ORAS ? 2 : 1).Take(encdatapaths.Length - (Main.Config.ORAS ? 2 : 1)).ToArray(); masterZoneData = File.ReadAllBytes(encdatapaths[0]); zdLocations = new string[filepaths.Length]; rawLocations = new string[filepaths.Length]; tb_File5.Visible = Main.Config.ORAS; // 5th File is only present with OR/AS. // Analyze for (int f = 0; f < filepaths.Length; f++) { string name = Path.GetFileNameWithoutExtension(filepaths[f]); int LocationNum = Convert.ToInt16(name.Substring(4, name.Length - 4)); ZoneData zo = new ZoneData(masterZoneData.Skip(f * ZoneData.Size).Take(ZoneData.Size).ToArray()); string LocationName = gameLocations[zo.ParentMap]; zdLocations[f] = LocationNum.ToString("000") + " - " + LocationName; rawLocations[f] = LocationName; } // Assign CB_LocationID.DataSource = zdLocations; CB_LocationID.Enabled = true; CB_LocationID_SelectedIndexChanged(null, null); NUD_WMap.Maximum = zdLocations.Length; // Cap map warp destinations to the amount of maps. }
public Zone(byte[][] Zone) { // A ZO is comprised of 4-5 files. // Array 0 is [Map Info] ZD = new ZoneData(Zone[0]); // Array 1 is [Overworld Entities & their Scripts] Entities = new ZoneEntities(Zone[1]); // Array 2 is [Map Script] MapScript = new ZoneScript(Zone[2]); // Array 3 is [Wild Encounters] Encounters = new ZoneEncounters(Zone[3]); // Array 4 is [???] - May not be present in all. if (Zone.Length <= 4) return; File5 = new ZoneUnknown(Zone[4]); }