mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 07:28:00 -05:00
reccmp: support inlined functions that may have been compiled into both files
This commit is contained in:
parent
66a010a19f
commit
749a1f419b
2 changed files with 13 additions and 4 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -60,8 +60,8 @@ jobs:
|
|||
C:\msys64\usr\bin\wget.exe https://legoisland.org/download/ISLE.EXE
|
||||
C:\msys64\usr\bin\wget.exe https://legoisland.org/download/LEGO1.DLL
|
||||
pip install capstone
|
||||
python3 tools/reccmp/reccmp.py -H ISLEPROGRESS.HTML ISLE.EXE Release/ISLE.EXE Release/ISLE.PDB ISLE
|
||||
python3 tools/reccmp/reccmp.py -H LEGO1PROGRESS.HTML LEGO1.DLL Release/LEGO1.DLL Release/LEGO1.PDB LEGO1
|
||||
python3 tools/reccmp/reccmp.py -H ISLEPROGRESS.HTML ISLE.EXE Release/ISLE.EXE Release/ISLE.PDB .
|
||||
python3 tools/reccmp/reccmp.py -H LEGO1PROGRESS.HTML LEGO1.DLL Release/LEGO1.DLL Release/LEGO1.PDB .
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@master
|
||||
|
|
|
@ -259,6 +259,10 @@ def parse_asm(file, addr, size):
|
|||
total_accuracy = 0
|
||||
htmlinsert = []
|
||||
|
||||
# Generate basename of original file, used in locating OFFSET lines
|
||||
basename = os.path.basename(os.path.splitext(original)[0])
|
||||
pattern = '// OFFSET:'
|
||||
|
||||
for subdir, dirs, files in os.walk(source):
|
||||
for file in files:
|
||||
srcfilename = os.path.join(os.path.abspath(subdir), file)
|
||||
|
@ -273,9 +277,14 @@ def parse_asm(file, addr, size):
|
|||
if not line:
|
||||
break
|
||||
|
||||
if line.startswith('// OFFSET:'):
|
||||
par = line[10:].strip().split()
|
||||
line = line.strip()
|
||||
|
||||
if line.startswith(pattern):
|
||||
par = line[len(pattern):].strip().split()
|
||||
module = par[0]
|
||||
if module != basename:
|
||||
continue
|
||||
|
||||
addr = int(par[1], 16)
|
||||
|
||||
find_open_bracket = line
|
||||
|
|
Loading…
Reference in a new issue