Пример #1
0
        private void PatchEboot(string ebootFile, byte[] stringData, List <uint> stringOffsets)
        {
            Console.Write("Patching EBOOT...");

            using (Stream stream = File.Open(ebootFile, FileMode.Open)) {
                uint   vaddr     = PRX.AppendData(stream, stringData);
                uint[] lineAddrs = new uint[stringOffsets.Count];
                for (int i = 0; i < lineAddrs.Length; i++)
                {
                    lineAddrs[i] = stringOffsets[i] + vaddr;
                }

                foreach (PatchDef patch in EBOOT_PATCHES)
                {
                    patch.Apply(stream, lineAddrs);
                }
            }
        }
Пример #2
0
 public override void Apply(Stream stream, uint[] lineAddrs)
 {
     PRX.PatchLuiAddiuPair(stream, this.Offset, lineAddrs[this.Line]);
 }