mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-22 13:53:02 +05:30
Added interface for GEOHeader
This commit is contained in:
parent
626fc66d64
commit
accf440047
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user