예제 #1
0
        public void Load( byte[] Tbl )
        {
            Refs = new List<TblBinFileReference>();

            for ( int i = 0; i < Tbl.Length - 8; i += 8 ) {
                TblBinFileReference r = new TblBinFileReference();
                r.Start = BitConverter.ToUInt32( Tbl, i );
                // this does some weird ass stuff with the file locations, last 6 bits of the location are used for the padding until the next file after the current one or something...?
                uint PaddingAfterFile = ( r.Start % FileAlignment );
                r.Start -= PaddingAfterFile;
                r.FilesizeOfDecompressedFile = BitConverter.ToUInt32( Tbl, i + 4 );
                r.End = BitConverter.ToUInt32( Tbl, i + 8 );
                r.End = r.End - ( r.End % FileAlignment ) - PaddingAfterFile;
                Refs.Add( r );
            }
        }
예제 #2
0
        public void Load(byte[] Tbl)
        {
            Refs = new List <TblBinFileReference>();

            for (int i = 0; i < Tbl.Length - 8; i += 8)
            {
                TblBinFileReference r = new TblBinFileReference();
                r.Start = BitConverter.ToUInt32(Tbl, i);
                // this does some weird ass stuff with the file locations, last 6 bits of the location are used for the padding until the next file after the current one or something...?
                uint PaddingAfterFile = (r.Start % FileAlignment);
                r.Start -= PaddingAfterFile;
                r.FilesizeOfDecompressedFile = BitConverter.ToUInt32(Tbl, i + 4);
                r.End = BitConverter.ToUInt32(Tbl, i + 8);
                r.End = r.End - (r.End % FileAlignment) - PaddingAfterFile;
                Refs.Add(r);
            }
        }