Added interface for GEOHeader

This commit is contained in:
_ 2018-05-13 01:08:56 -07:00
parent 626fc66d64
commit accf440047

View File

@ -309,6 +309,18 @@ class TEXtures:
devil1tex.gettextures(self.cstruct, i, filedata, len(filedata)) devil1tex.gettextures(self.cstruct, i, filedata, len(filedata))
return 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 # Regular Python
#--------------------------------------+ #--------------------------------------+
@ -388,7 +400,12 @@ if __name__ == "__main__":
print(tbd.gettexturesize()) print(tbd.gettexturesize())
tx = TEXtures(0, tbd.gettexno(), data) 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() mainx()