コード例 #1
0
        private void ReadFontIndices(ImgbArchiveAccessor accessor, out WpdArchiveListing listing, out WpdEntry[] textureEntries, out WpdEntry[] fontEntries, out string[] names)
        {
            listing = WpdArchiveListingReader.Read(accessor);

            List <WpdEntry> textures = new List <WpdEntry>(4);
            List <WpdEntry> fonts    = new List <WpdEntry>(4);

            foreach (WpdEntry entry in listing)
            {
                const string prefix = "wfnt";

                if (!entry.NameWithoutExtension.StartsWith(prefix))
                {
                    continue;
                }

                switch (entry.Extension)
                {
                case "txbh":
                    textures.Add(entry);
                    break;

                case "wfl":
                    fonts.Add(entry);
                    break;
                }
            }

            names          = SortAndExcludeNotPaired(textures, fonts);
            fontEntries    = fonts.ToArray();
            textureEntries = textures.ToArray();
        }
コード例 #2
0
ファイル: UiFileTableNode.cs プロジェクト: pinguallyj/Pulse
        private UiNode[] ExpandWpdChilds()
        {
            ImgbArchiveAccessor imgbAccessor = new ImgbArchiveAccessor(_listing, _indices, _binary);
            WpdArchiveListing   wpdListing   = WpdArchiveListingReader.Read(imgbAccessor);

            UiNode[] result = new UiNode[wpdListing.Count];
            for (int i = 0; i < result.Length; i++)
            {
                WpdEntry xgrEntry = wpdListing[i];
                result[i] = new UiWpdTableLeaf(xgrEntry.Name, xgrEntry, wpdListing)
                {
                    Parent = this
                };
            }
            return(result);
        }