Exemple #1
0
        private void Read(Stream stream, long position)
        {
            stream.Position = position;
            BinaryReader reader = new BinaryReader(stream);

            Header = new FNTHeader(reader);
            reader.BaseStream.Position = Header.HeaderSize;
            Palette    = new FNTPalette(reader, Header.Glyphs.NumberOfColor);
            WidthTable = new FNTWidthTable(reader);
            Unknown    = new FNTUnknown(reader);
            Reserved   = new FNTReserved(reader, Header.Glyphs.Count);
            Compressed = new FNTCompressed(reader);
            if (Header.LastPosition != 0)
            {
                reader.BaseStream.Position = Header.LastPosition;
                Last = new FNTLast(reader, Header.Glyphs.Count);
            }
        }
Exemple #2
0
        private void Read(Stream stream, long position)
        {
            Console.WriteLine("---------------------------------------------------");
            Console.WriteLine("-----Font decompressor/compressor by Meloman19-----");
            Console.WriteLine("-------------------Persona 3/4/5-------------------");
            Console.WriteLine("----------Based on RikuKH3's decompressor----------");
            Console.WriteLine("---------------------------------------------------");

            stream.Position = position;
            BinaryReader reader = new BinaryReader(stream);

            Header = new FNTHeader(reader);
            reader.BaseStream.Position = Header.HeaderSize;
            Palette    = new FNTPalette(reader, Header.Glyphs.NumberOfColor);
            WidthTable = new FNTWidthTable(reader);
            Unknown    = new FNTUnknown(reader);
            Reserved   = new FNTReserved(reader, Header.Glyphs.Count);
            Compressed = new FNTCompressed(reader);
            if (Header.LastPosition != 0)
            {
                reader.BaseStream.Position = Header.LastPosition;
                Last = new FNTLast(reader, Header.Glyphs.Count);
            }
        }