aboutsummaryrefslogtreecommitdiff
path: root/devtools/tasmrecover
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-27 19:53:41 +0200
committerFilippos Karapetis2011-12-27 19:53:41 +0200
commitd0a302fb064d1bdf12c5c06e077b9037155650bc (patch)
tree681e6b8db682c0d4c86c2cead6ec0186f05dc645 /devtools/tasmrecover
parent08be0411b1bfba715d5c1b50b50a893a27e12f8c (diff)
downloadscummvm-rg350-d0a302fb064d1bdf12c5c06e077b9037155650bc.tar.gz
scummvm-rg350-d0a302fb064d1bdf12c5c06e077b9037155650bc.tar.bz2
scummvm-rg350-d0a302fb064d1bdf12c5c06e077b9037155650bc.zip
DREAMWEB: Add the ability to blacklist unused constants in tasm-recover
Diffstat (limited to 'devtools/tasmrecover')
-rwxr-xr-xdevtools/tasmrecover/tasm-recover22
-rw-r--r--devtools/tasmrecover/tasm/parser.py8
2 files changed, 28 insertions, 2 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 6845890667..9dc5034165 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -250,6 +250,28 @@ p = parser(skip_binary_data = [
'puzzletext',
'commandtext',
'traveltext',
+ # vars.asm - constants
+ 'openinvlist',
+ 'ryaninvlist',
+ 'pointerback',
+ 'mapflags',
+ 'startpal',
+ 'endpal',
+ 'maingamepal',
+ 'spritetable',
+ 'setlist',
+ 'freelist',
+ 'exlist',
+ 'peoplelist',
+ 'zoomspace',
+ 'printedlist',
+ 'listofchanges',
+ 'undertimedtext',
+ 'rainlist',
+ 'initialreelrouts',
+ 'initialvars',
+ 'lengthofbuffer',
+ 'lenofreelrouts',
# vgagrafx.asm
'cityname',
'extragraphics1',
diff --git a/devtools/tasmrecover/tasm/parser.py b/devtools/tasmrecover/tasm/parser.py
index 6fd3567b01..0782fff22f 100644
--- a/devtools/tasmrecover/tasm/parser.py
+++ b/devtools/tasmrecover/tasm/parser.py
@@ -253,8 +253,12 @@ class parser:
if len(cmd) >= 3:
cmd1 = cmd[1]
if cmd1 == 'equ':
- v = cmd[2]
- self.set_global(cmd0, op.const(self.fix_dollar(v)))
+ if not (cmd0.lower() in self.skip_binary_data):
+ v = cmd[2]
+ self.set_global(cmd0, op.const(self.fix_dollar(v)))
+ else:
+ print "skipping binary data for %s" % (cmd0.lower(),)
+ skipping_binary_data = True
elif cmd1 == 'db' or cmd1 == 'dw' or cmd1 == 'dd':
if not (cmd0.lower() in self.skip_binary_data):
binary_width = {'b': 1, 'w': 2, 'd': 4}[cmd1[1]]