DEVTOOLS: Add support to tasm-recover to skip output of addr_* header.

This commit is contained in:
D G Turner 2011-12-02 00:23:19 +00:00
parent 3be628735b
commit 757c1fe8e2
2 changed files with 7 additions and 4 deletions

View File

@ -353,7 +353,8 @@ generator = cpp(context, "DreamGen", blacklist = [
'inventory',
'mainscreen',
'doload',
], skip_dispatch_call = True, header_omit_blacklisted = True,
], skip_dispatch_call = True, skip_addr_constants = False,
header_omit_blacklisted = True,
function_name_remapping = {
# This remaps the function naming at output for readability
'bothchannels' : 'bothChannels',

View File

@ -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: