From 59b0c4b4b5992d6fe0bdc0b88849169d167b98fe Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 7 Jun 2011 01:53:42 +0400 Subject: DREAMWEB: added all offsets --- devtools/tasmrecover/tasm/cpp.py | 7 +++++++ devtools/tasmrecover/tasm/parser.py | 3 +++ 2 files changed, 10 insertions(+) (limited to 'devtools/tasmrecover/tasm') diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py index fa2dd672fb..fe7f3ff9d6 100644 --- a/devtools/tasmrecover/tasm/cpp.py +++ b/devtools/tasmrecover/tasm/cpp.py @@ -521,6 +521,13 @@ namespace %s { """ %(self.namespace)) for f in self.failed: self.hd.write("\tvoid %s(Context &context);\n" %f) + + offsets_decl = "\n" + for k,v in self.context.get_offsets().items(): + offsets_decl += "\tconst static uint16 k%s = %d;\n" %(k.capitalize(), v[0]) + offsets_decl += "\n" + self.hd.write(offsets_decl); + self.hd.write("\n}\n\n#endif\n") self.hd.close() diff --git a/devtools/tasmrecover/tasm/parser.py b/devtools/tasmrecover/tasm/parser.py index 8dbf54c5a3..6342a17d84 100644 --- a/devtools/tasmrecover/tasm/parser.py +++ b/devtools/tasmrecover/tasm/parser.py @@ -64,6 +64,9 @@ class parser: def get_offset(self, name): name = name.lower() return self.__offsets[name] + + def get_offsets(self): + return self.__offsets def include(self, basedir, fname): path = fname.split('\\')[self.strip_path:] -- cgit v1.2.3