mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-29 10:12:02 +05:30
Fixed TEXturePack struct
This commit is contained in:
parent
be691baffb
commit
62841adcb9
@ -275,21 +275,18 @@ class PLDHeader:
|
||||
|
||||
class TEXturePack:
|
||||
def __init__(self, filedata):
|
||||
self.cstruct = TexturePack()
|
||||
self.th = ctypes.pointer(self.cstruct)
|
||||
devil1tex.getheader(ctypes.byref(self.th), filedata)
|
||||
devil1tex.printheader(self.th)
|
||||
self.cstruct = ctypes.pointer(TexturePack())
|
||||
devil1tex.getheader(ctypes.byref(self.cstruct), filedata)
|
||||
return
|
||||
|
||||
def show(self):
|
||||
devil1tex.printheader(ctypes.byref(self.cstruct))
|
||||
devil1tex.printheader(self.th)
|
||||
devil1tex.printheader(self.cstruct)
|
||||
|
||||
def getbatchno(self):
|
||||
return self.cstruct.batchNumber
|
||||
return self.cstruct.contents.batchNumber
|
||||
|
||||
def getfirstbatchoffset(self):
|
||||
return self.cstruct.firstBatchOffset
|
||||
return self.cstruct.contents.firstBatchOffset
|
||||
|
||||
class TEXtureBatchDescriptor:
|
||||
def __init__(self, i, filedata):
|
||||
@ -390,6 +387,8 @@ if __name__ == "__main__":
|
||||
data = f.read()
|
||||
txp = TEXturePack(data)
|
||||
txp.show()
|
||||
print(txp.getbatchno())
|
||||
print(txp.getfirstbatchoffset())
|
||||
#---------------------------------------+
|
||||
# main()
|
||||
mainx()
|
||||
|
Loading…
Reference in New Issue
Block a user