mirror of
https://github.com/gurrgur/er-patcher.git
synced 2026-06-13 09:47:54 +00:00
make vigniette removal work with game v1.03
This commit is contained in:
parent
01a6e8e910
commit
eab689a6cc
1 changed files with 6 additions and 4 deletions
10
er-patcher
10
er-patcher
|
|
@ -6,6 +6,7 @@ import subprocess
|
||||||
import argparse
|
import argparse
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import struct
|
import struct
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
@ -40,10 +41,11 @@ if __name__ == "__main__":
|
||||||
)
|
)
|
||||||
|
|
||||||
if patch.disable_vigniette:
|
if patch.disable_vigniette:
|
||||||
exe_hex = exe_hex.replace(
|
v_pattern = 'f3 0f 10 .. .. f3 0f 59 .. .. .. .. .. e8 .. .. .. .. f3 41 0f .. .. f3 45 0f .. .. 4c 8d .. .. .. .. .. .. 48'.replace(" ", "")
|
||||||
"f30f590514a76e01f3440f5cc8f3450f5ecb",
|
v_addr = re.search(v_pattern, exe_hex).span()[0]
|
||||||
"f30f590524b56e01f3440f5cc8f3450f5ecb"
|
v_offset = 46
|
||||||
)
|
v_patch = "f3 0f 5c c0 90".replace(" ", "") # SUBSS XMM0,XMM0; NOP; all NOP does work too
|
||||||
|
exe_hex = exe_hex[:v_addr + v_offset] + v_patch + exe_hex[v_addr + v_offset + len(v_patch):]
|
||||||
|
|
||||||
if patch.disable_ca:
|
if patch.disable_ca:
|
||||||
ca_addr = 94 + exe_hex.index("0f114360488d8b800000000f1087a00000000f1141f0488d87b00000000f10080f1109")
|
ca_addr = 94 + exe_hex.index("0f114360488d8b800000000f1087a00000000f1141f0488d87b00000000f10080f1109")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue