Exemplo n.º 1
0
        public void Write(WflContent content)
        {
            WriteHeader(content.Header);

            int sizesIndex = 0x20;
            int offsetIndex = 0x20;

            for (int i = 0; i < WflContent.CharactersCount; i++)
                _bw.Write(content.Sizes[sizesIndex++]);

            _bw.Write(ColorTableMagic);

            for (int i = 0; i < content.Colors.Length; i++)
                _bw.Write(content.Colors[i]);

            if (content.Header.TableType == WflHeader.LargeTable)
            {
                for (int i = 0; i < WflContent.CharactersCount; i++)
                    _bw.Write(content.Offsets[offsetIndex++]);

                sizesIndex += 0x20;
                offsetIndex += 0x20;

                for (int i = 0; i < WflContent.CharactersCount; i++)
                    _bw.Write(content.Sizes[sizesIndex++]);

                for (int i = 0; i < content.AdditionalTable.Length; i++)
                    _bw.Write(content.AdditionalTable[i]);

                for (int i = 0; i < WflContent.CharactersCount; i++)
                    _bw.Write(content.Offsets[offsetIndex++]);
            }
        }
Exemplo n.º 2
0
 public UiEncodingWindowSource(string displayName, DxTexture texture, WflContent info, char[] chars, ConcurrentDictionary<char, short> codes)
 {
     DisplayName = displayName;
     Texture = texture;
     Info = info;
     Chars = chars;
     Codes = codes;
 }
Exemplo n.º 3
0
        public void Write(WflContent content)
        {
            WriteHeader(content.Header);

            int sizesIndex  = 0x20;
            int offsetIndex = 0x20;

            for (int i = 0; i < WflContent.CharactersCount; i++)
            {
                _bw.Write(content.Sizes[sizesIndex++]);
            }

            _bw.Write(ColorTableMagic);

            for (int i = 0; i < content.Colors.Length; i++)
            {
                _bw.Write(content.Colors[i]);
            }

            if (content.Header.TableType == WflHeader.LargeTable)
            {
                for (int i = 0; i < WflContent.CharactersCount; i++)
                {
                    _bw.Write(content.Offsets[offsetIndex++]);
                }

                sizesIndex  += 0x20;
                offsetIndex += 0x20;

                for (int i = 0; i < WflContent.CharactersCount; i++)
                {
                    _bw.Write(content.Sizes[sizesIndex++]);
                }

                for (int i = 0; i < content.AdditionalTable.Length; i++)
                {
                    _bw.Write(content.AdditionalTable[i]);
                }

                for (int i = 0; i < WflContent.CharactersCount; i++)
                {
                    _bw.Write(content.Offsets[offsetIndex++]);
                }
            }
        }