diff options
author | Vladimir | 2011-06-07 00:36:31 +0400 |
---|---|---|
committer | Alyssa Milburn | 2011-06-15 17:30:14 +0200 |
commit | 0b0b22ccc2157c7260a55afe3add0629703c0b21 (patch) | |
tree | 4ab08d1fa1225a7de4553a8a1a2787daa9db1521 /devtools/tasmrecover | |
parent | cc784e9a0c0b0527548b1ea5cac06b4d9458042a (diff) | |
download | scummvm-rg350-0b0b22ccc2157c7260a55afe3add0629703c0b21.tar.gz scummvm-rg350-0b0b22ccc2157c7260a55afe3add0629703c0b21.tar.bz2 scummvm-rg350-0b0b22ccc2157c7260a55afe3add0629703c0b21.zip |
DREAMWEB: removed data declaration
Diffstat (limited to 'devtools/tasmrecover')
-rw-r--r-- | devtools/tasmrecover/tasm/cpp.py | 19 | ||||
-rw-r--r-- | devtools/tasmrecover/tasm/cpp.pyc | bin | 22205 -> 22024 bytes |
2 files changed, 5 insertions, 14 deletions
diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py index 53338c1d02..d63f568d78 100644 --- a/devtools/tasmrecover/tasm/cpp.py +++ b/devtools/tasmrecover/tasm/cpp.py @@ -497,20 +497,16 @@ namespace %s { self.fd.write("\n\n") print "%d ok, %d failed of %d, %.02g%% translated" %(done, failed, done + failed, 100.0 * done / (done + failed)) print "\n".join(self.failed) - data_decl = "struct Data : public Segment {\n\t\tData();\n" - data_impl = "Data::Data() {\n" data_bin = self.data_seg - data_impl += "\tstatic const uint8 src[] = {\n\t\t" + data_impl = "\n\tstatic const uint8 src[] = {\n\t\t" n = 0 for v in data_bin: - data_impl += "%s, " %v + data_impl += "0x%02x, " %v n += 1 if (n & 0xf) == 0: data_impl += "\n\t\t" - data_impl += "};\ndata.assign(src, src + sizeof(src));\n" + data_impl += "};\n\tcontext.data.assign(src, src + sizeof(src))" hid = "TASMRECOVER_%s_STUBS_H__" %self.namespace.upper() - data_decl += "\t};\n\n" - data_impl += "\t};\n\n" self.hd.write("""#ifndef %s #define %s """ %(hid, hid)) @@ -519,21 +515,16 @@ namespace %s { namespace %s { - %s - typedef RegisterContext<Data> Context; - void __dispatch_call(Context &context, unsigned addr); void __start(Context &context); -""" %(self.namespace, data_decl)) - self.fd.write(data_impl) - +""" %(self.namespace)) for f in self.failed: self.hd.write("\tvoid %s(Context &context);\n" %f) self.hd.write("\n}\n\n#endif\n") self.hd.close() - self.fd.write("\nvoid __start(Context &context) { %s(context); }\n" %start) + self.fd.write("\nvoid __start(Context &context) { %s; %s(context); }\n" %(data_impl, start)) self.fd.write("\nvoid __dispatch_call(Context &context, unsigned addr) {\n\tswitch(addr) {\n") self.proc_addr.sort(cmp = lambda x, y: x[1] - y[1]) diff --git a/devtools/tasmrecover/tasm/cpp.pyc b/devtools/tasmrecover/tasm/cpp.pyc Binary files differindex b0406b3252..c454ae4971 100644 --- a/devtools/tasmrecover/tasm/cpp.pyc +++ b/devtools/tasmrecover/tasm/cpp.pyc |