Пример #1
0
        private IFooter ReadFooter(BinaryReader br)
        {
            St_Footer footer = new St_Footer();

            footer.Read(br);

            return(footer);
        }
Пример #2
0
        public void LoadJumpTable()
        {
            string originalFilePath = Path.Combine(ProjectFolder.rootDir, ProjectFolder.unpackedGameFilesDir, JUMP_TABLE_FILE);

            FileStream   fs = new FileStream(originalFilePath, FileMode.Open);
            BinaryReader br = new BinaryReader(fs);

            footer.Read(br);
            header.Read(br);

            long streamEnd = br.BaseStream.Length - ElementHelper.GetElementSize(footer);

            while (br.BaseStream.Position != streamEnd)
            {
                var nextEntry = new JumpTableEntry();
                nextEntry.Read(br);
                jumpTableEntries.Add(nextEntry);
            }

            br.Close();
        }