Added getter attributes for geo header

This commit is contained in:
_ 2018-05-13 14:07:21 -07:00
parent a2d4aaae11
commit 2f98c2a1a2

View File

@ -325,7 +325,24 @@ class GEOHeader:
def show(self): def show(self):
devil1geo.printheader(self.cstruct) 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: class MEShHeader:
@ -486,6 +503,13 @@ if __name__ == "__main__":
data = f.read() data = f.read()
gh = GEOHeader(data) gh = GEOHeader(data)
gh.show() 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 = MEShHeader(3, data)
mh.show() mh.show()
m = MEsh(0, data) m = MEsh(0, data)