/// <summary> /// Gets all TPLs that are required by the brlyt. /// </summary> /// <param name="wad"></param> /// <param name="banner"></param> /// <returns></returns> public static string[] GetBrlytTpls(WAD wad, bool banner) { if (!wad.HasBanner) { return(new string[0]); } string bannerName = "banner"; if (!banner) { bannerName = "icon"; } for (int i = 0; i < wad.BannerApp.Nodes.Count; i++) { if (wad.BannerApp.StringTable[i].ToLower() == bannerName + ".bin") { U8 bannerFile = U8.Load(wad.BannerApp.Data[i]); string[] tpls = new string[0]; for (int y = 0; y < bannerFile.Nodes.Count; y++) { if (bannerFile.StringTable[y].ToLower() == bannerName + ".brlyt") { tpls = Shared.MergeStringArrays(tpls, getBrlytTpls(bannerFile.Data[y])); } } return(tpls); } } return(new string[0]); }
/// <summary> /// Gets all TPLs that are required by the brlyt. /// </summary> /// <param name="wad"></param> /// <param name="banner"></param> /// <returns></returns> public static string[] GetBrlytTpls(WAD wad, bool banner) { if (!wad.HasBanner) { return(new string[0]); } string str = nameof(banner); if (!banner) { str = "icon"; } for (int index1 = 0; index1 < wad.BannerApp.Nodes.Count; ++index1) { if (wad.BannerApp.StringTable[index1].ToLower() == str + ".bin") { U8 u8 = U8.Load(wad.BannerApp.Data[index1]); string[] a = new string[0]; for (int index2 = 0; index2 < u8.Nodes.Count; ++index2) { if (u8.StringTable[index2].ToLower() == str + ".brlyt") { a = Shared.MergeStringArrays(a, GetBrlytTpls(u8.Data[index2])); } } return(a); } } return(new string[0]); }