/// <summary>Get required section table</summary> /// <param name="type">Type of thre required section header</param> /// <returns>Section header or null</returns> public DexApi.map_item?GetMapItem(DexApi.TYPE type) { foreach (DexApi.map_item item in this.map_list) { if (item.type == type) { return(item); } } return(null); //TODO: Check for empty section }
private T GetMapItemT <T>(DexApi.TYPE type) where T : Table, new() { DexApi.map_item?mapItem = this.GetMapItem(type); if (mapItem == null) { return(null); } T result = new T(); result.ReadSection(this, mapItem.Value.offset, mapItem.Value.size); return(result); }