public GetItemsByType ( DBPFTypeID Type ) : byte[]>>.List |
||
Type | DBPFTypeID | The Type of the entry. |
return | byte[]>>.List |
public List<KeyValuePair<uint, byte[]>> GetItemsByType(DBPFTypeID Type)
{
var result = new List<KeyValuePair<uint, byte[]>>();
var entries = m_EntriesByType[Type];
for (int i = 0; i < entries.Count; i++)
{
result.Add(new KeyValuePair<uint, byte[]>(entries[i].InstanceID, GetEntry(entries[i])));
}
return result;
}
/// <summary> /// Gets a track from a DBPF using its InstanceID. /// </summary> /// <param name="dbpf">The DBPF to search.</param> private void AddTracksFrom(DBPFFile dbpf) { var tracks = dbpf.GetItemsByType(DBPFTypeID.TRK); for (var i=0; i<tracks.Count; i++) { TracksById.Add(tracks[i].Key, new Track(tracks[i].Value)); } }