Esempio n. 1
0
        public static PkgHeader[] GeneratePkgHeaders(BinaryReader br, uint count)
        {
            br.BaseStream.Seek(8, SeekOrigin.Begin);

            PkgHeader[] header = new PkgHeader[count];

            for (int i = 0; i < count; i++)
            {
                header[i] = new PkgHeader();

                header[i].unk0       = br.ReadUInt32();
                header[i].caffOffset = br.ReadUInt32();
                header[i].caffSize   = br.ReadUInt32();
            }

            return(header);
        }
Esempio n. 2
0
        public void UpdateInfo(PkgHeader pkgHeader, CaffHeader caffHeader, int index)
        {
            CaffName.Text = $"Caff {index}";

            CaffSize.Text   = $"Size(bytes): {pkgHeader.caffSize}";
            CaffOffset.Text = $"Offset(h): {pkgHeader.caffOffset}";

            DataChunkCount.Text = $".DATA chunk count: {caffHeader.chunkCount}";
            GpuChunkCount.Text  = $".GPU chunk count: {caffHeader.chunkSpreadCount - caffHeader.chunkCount}";

            Stream0Offset.Text = $"0 offset(h): {caffHeader.stream0Offset}";
            Stream0Size.Text   = $"0 size(bytes) - Compressed: {caffHeader.stream0CSize} -> Uncompressed: {caffHeader.stream0UncSize}";

            Stream1Offset.Text = $"1 offset(h): {caffHeader.stream0Offset + caffHeader.stream0CSize + pkgHeader.caffOffset}";
            Stream1Size.Text   = $"1 size(bytes) - Compressed: {caffHeader.stream1CSize} -> Uncompressed: {caffHeader.stream1UncSize}";

            Stream2Size.Text = $"2 size(bytes) - Compressed: {caffHeader.stream2CSize} -> Uncompressed: {caffHeader.stream2UncSize}";

            Stream3Size.Text = $"3 size(bytes) - Compressed: {caffHeader.stream3CSize} -> Uncompressed: {caffHeader.stream3UncSize}";
        }