diff options
author | D G Turner | 2011-12-02 00:23:19 +0000 |
---|---|---|
committer | D G Turner | 2011-12-02 00:23:19 +0000 |
commit | 757c1fe8e23020c2fa98f318d935b7cbed2e252e (patch) | |
tree | 61c6ddf6279ed4fcf0cd2e0222b38a77dcaea3bc /devtools/tasmrecover/tasm | |
parent | 3be628735bb9e1b36fafe96bd704fa0005a3d7b5 (diff) | |
download | scummvm-rg350-757c1fe8e23020c2fa98f318d935b7cbed2e252e.tar.gz scummvm-rg350-757c1fe8e23020c2fa98f318d935b7cbed2e252e.tar.bz2 scummvm-rg350-757c1fe8e23020c2fa98f318d935b7cbed2e252e.zip |
DEVTOOLS: Add support to tasm-recover to skip output of addr_* header.
Diffstat (limited to 'devtools/tasmrecover/tasm')
-rw-r--r-- | devtools/tasmrecover/tasm/cpp.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py index 648b434075..44df0a381c 100644 --- a/devtools/tasmrecover/tasm/cpp.py +++ b/devtools/tasmrecover/tasm/cpp.py @@ -33,7 +33,7 @@ def parse_bin(s): return v class cpp: - def __init__(self, context, namespace, skip_first = 0, blacklist = [], skip_output = [], skip_dispatch_call = False, header_omit_blacklisted = False, function_name_remapping = { }): + def __init__(self, context, namespace, skip_first = 0, blacklist = [], skip_output = [], skip_dispatch_call = False, skip_addr_constants = False, header_omit_blacklisted = False, function_name_remapping = { }): self.namespace = namespace fname = namespace.lower() + ".cpp" header = namespace.lower() + ".h" @@ -81,6 +81,7 @@ class cpp: self.failed = list(blacklist) self.skip_output = skip_output self.skip_dispatch_call = skip_dispatch_call + self.skip_addr_constants = skip_addr_constants self.header_omit_blacklisted = header_omit_blacklisted self.function_name_remapping = function_name_remapping self.translated = [] @@ -631,8 +632,9 @@ public: """) - for name,addr in self.proc_addr: - self.hd.write("\tstatic const uint16 addr_%s = 0x%04x;\n" %(name, addr)) + if self.skip_addr_constants == False: + for name,addr in self.proc_addr: + self.hd.write("\tstatic const uint16 addr_%s = 0x%04x;\n" %(name, addr)) for name,addr in self.used_data_offsets: |