diff --git a/bindings/py3devil1.py b/bindings/py3devil1.py index 9b958cf..18d1e67 100755 --- a/bindings/py3devil1.py +++ b/bindings/py3devil1.py @@ -309,6 +309,18 @@ class TEXtures: devil1tex.gettextures(self.cstruct, i, filedata, len(filedata)) return +class GEOHeader: + def __init__(self, filedata): + self.cstruct = ctypes.pointer(Header()) + ptrofptr = ctypes.byref(self.cstruct) + if filedata: + devil1geo.getheader(ptrofptr, filedata) + return + + def show(self): + devil1geo.printheader(self.cstruct) + pass + #--------------------------------------+ # Regular Python #--------------------------------------+ @@ -388,7 +400,12 @@ if __name__ == "__main__": print(tbd.gettexturesize()) tx = TEXtures(0, tbd.gettexno(), data) + with open("pl00.pld_0", "rb") as f: + data = f.read() + gh = GEOHeader(data) + gh.show() + #---------------------------------------+ - main() + # main() mainx()