diff options
-rw-r--r-- | devtools/tasmrecover/tasm/cpp.py | 20 | ||||
-rw-r--r-- | engines/dreamweb/README | 12 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 2 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 5 |
4 files changed, 31 insertions, 8 deletions
diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py index fe9e39c092..4e37dc8e5b 100644 --- a/devtools/tasmrecover/tasm/cpp.py +++ b/devtools/tasmrecover/tasm/cpp.py @@ -16,8 +16,16 @@ class cpp: self.namespace = namespace fname = namespace + ".cpp" header = namespace + ".h" + banner = "/* PLEASE DO NOT MODIFY THIS FILE. ALL CHANGES WILL BE LOST! LOOK FOR README FOR DETAILS */" self.fd = open(fname, "wt") self.hd = open(header, "wt") + hid = "TASMRECOVER_%s_STUBS_H__" %namespace.upper() + self.hd.write("""#ifndef %s +#define %s + +%s + +""" %(hid, hid, banner)) self.context = context self.data_seg = context.binary_data self.procs = context.proc_list @@ -29,11 +37,13 @@ class cpp: self.translated = [] self.proc_addr = [] self.forwards = [] - self.fd.write("""#include \"%s\" + self.fd.write("""%s + +#include \"%s\" namespace %s { -""" %(header, namespace)) +""" %(banner, header, namespace)) def expand_cb(self, match): name = match.group(0).lower() @@ -531,12 +541,8 @@ namespace %s { if (n & 0xf) == 0: data_impl += "\n\t\t" data_impl += "};\n\tcontext.ds.assign(src, src + sizeof(src));\n" - hid = "TASMRECOVER_%s_STUBS_H__" %self.namespace.upper() - self.hd.write("""#ifndef %s -#define %s -""" %(hid, hid)) self.hd.write( -"""\n#\tinclude "runtime.h" +"""\n#include "dreamweb/runtime.h" namespace %s { diff --git a/engines/dreamweb/README b/engines/dreamweb/README new file mode 100644 index 0000000000..d184613249 --- /dev/null +++ b/engines/dreamweb/README @@ -0,0 +1,12 @@ + +WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING + +Some files(dreamgen.*) in this directory is auto-generated. This means +(at least for some time) any changes to them will be lost. + +Please look into /devtools/tasmrecover directory, patch assembler source +or translator and run ./tasm-recover script. + +Then copy dreamgen.cpp/dreamgen.h to engine/dreamweb and check the diffs. + +If you'd like to reimplement something, blacklist it, then run script. diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 06de8814ca..211418e22f 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -1,3 +1,5 @@ +/* PLEASE DO NOT MODIFY THIS FILE. ALL CHANGES WILL BE LOST! LOOK FOR README FOR DETAILS */ + #include "dreamgen.h" namespace dreamgen { diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 38c04a3c92..5ded297e36 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -1,7 +1,10 @@ #ifndef TASMRECOVER_DREAMGEN_STUBS_H__ #define TASMRECOVER_DREAMGEN_STUBS_H__ -# include "runtime.h" +/* PLEASE DO NOT MODIFY THIS FILE. ALL CHANGES WILL BE LOST! LOOK FOR README FOR DETAILS */ + + +#include "dreamweb/runtime.h" namespace dreamgen { |