From 2f98c2a1a2140153394bfc9e9be98947fe54a169 Mon Sep 17 00:00:00 2001 From: _ <_> Date: Sun, 13 May 2018 14:07:21 -0700 Subject: [PATCH] Added getter attributes for geo header --- bindings/py3devil1.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/bindings/py3devil1.py b/bindings/py3devil1.py index 7c0ff40..e0de918 100755 --- a/bindings/py3devil1.py +++ b/bindings/py3devil1.py @@ -325,7 +325,24 @@ class GEOHeader: def show(self): devil1geo.printheader(self.cstruct) - pass + + def getmeshno(self): + return self.cstruct.contents.numMesh + + def getunknownb(self): + return self.cstruct.contents.unknownNumberB + + def getunknownc(self): + return self.cstruct.contents.unknownNumberC + + def getunknownd(self): + return self.cstruct.contents.unknownNumberD + + def getpadding(self): + return hex(self.cstruct.contents.padding) + + def getunknownoffset(self): + return hex(self.cstruct.contents.unknownOffset) class MEShHeader: @@ -486,6 +503,13 @@ if __name__ == "__main__": data = f.read() gh = GEOHeader(data) gh.show() + print("-------------") + print(gh.getmeshno()) + print(gh.getunknownb()) + print(gh.getunknownc()) + print(gh.getunknownd()) + print(gh.getpadding()) + print(gh.getunknownoffset()) mh = MEShHeader(3, data) mh.show() m = MEsh(0, data)