diff options
author | Vladimir Menshakov | 2011-08-24 23:34:46 +0400 |
---|---|---|
committer | Vladimir Menshakov | 2011-08-24 23:34:46 +0400 |
commit | ab1c8c27e993529f2f9b4ea02069797338f63574 (patch) | |
tree | dec2b9ba864e521f90dcad9f92e651d31a066b1b /devtools/tasmrecover | |
parent | fd9e50e24577714dc6583c1f3fdf14173e15a95f (diff) | |
download | scummvm-rg350-ab1c8c27e993529f2f9b4ea02069797338f63574.tar.gz scummvm-rg350-ab1c8c27e993529f2f9b4ea02069797338f63574.tar.bz2 scummvm-rg350-ab1c8c27e993529f2f9b4ea02069797338f63574.zip |
DREAMWEB: Added comments with string representation for the data segment
Diffstat (limited to 'devtools/tasmrecover')
-rw-r--r-- | devtools/tasmrecover/tasm/cpp.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py index d2b860ddf5..61edb41fb2 100644 --- a/devtools/tasmrecover/tasm/cpp.py +++ b/devtools/tasmrecover/tasm/cpp.py @@ -584,11 +584,17 @@ namespace %s { data_bin = self.data_seg data_impl = "\n\tstatic const uint8 src[] = {\n\t\t" n = 0 + comment = str() for v in data_bin: data_impl += "0x%02x, " %v n += 1 + + comment += chr(v) if (v >= 0x20 and v < 0x7f and v != ord('\\')) else "." if (n & 0xf) == 0: - data_impl += "\n\t\t" + data_impl += "\n\t\t//0x%04x: %s\n\t\t" %(n - 16, comment) + comment = str() + elif (n & 0x3) == 0: + comment += " " data_impl += "};\n\tds.assign(src, src + sizeof(src));\n" self.hd.write( """\n#include "dreamweb/runtime.h" |