diff options
| author | 2026-03-16 16:03:52 -0400 | |
|---|---|---|
| committer | 2026-03-16 16:03:52 -0400 | |
| commit | a6fcd3f4c75651e08c4392dea8a77b7fed1c2fe5 (patch) | |
| tree | be60df9efc6961ceb2e96b8411a688ec4e5ed4d6 /Scripts | |
| download | WorldTuningTool-a6fcd3f4c75651e08c4392dea8a77b7fed1c2fe5.tar.gz WorldTuningTool-a6fcd3f4c75651e08c4392dea8a77b7fed1c2fe5.tar.bz2 WorldTuningTool-a6fcd3f4c75651e08c4392dea8a77b7fed1c2fe5.zip | |
Outline of new features
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'Scripts')
| -rwxr-xr-x | Scripts/generate_diffs.sh | 5 | ||||
| -rwxr-xr-x | Scripts/get_dxbc_hash.py | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/Scripts/generate_diffs.sh b/Scripts/generate_diffs.sh new file mode 100755 index 0000000..b0c5687 --- /dev/null +++ b/Scripts/generate_diffs.sh @@ -0,0 +1,5 @@ +#! /usr/bin/env sh + +#wine cmd_Decompiler.exe -d ../Shaders/Original/*.dxbc +#wine cmd_Decompiler.exe -d ../Shaders/*.shdr +#diff -u orig.asm edit.asm diff --git a/Scripts/get_dxbc_hash.py b/Scripts/get_dxbc_hash.py new file mode 100755 index 0000000..0c53107 --- /dev/null +++ b/Scripts/get_dxbc_hash.py @@ -0,0 +1,17 @@ +#! /usr/bin/env python3 + +import sys +import os.path +import struct + +if not os.path.isfile(sys.argv[1]): + print(f'File not found: {sys.argv[1]}') + sys.exit(1) + +for path in sys.argv[1:]: + print(path + ':') + with open(path, 'rb') as f: + if f.read(4).decode('ASCII') == 'DXBC': + print(' %08x-%08x-%08x-%08x' % (struct.unpack('<I', f.read(4))[0], struct.unpack('<I', f.read(4))[0], struct.unpack('<I', f.read(4))[0], struct.unpack('<I', f.read(4))[0])) + else: + print(' Invalid DXBC file.') |