mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-22 13:53:02 +05:30
Fixed access of offset attribute in PldHeader
This commit is contained in:
parent
7736a50e7f
commit
8585702471
@ -6,6 +6,7 @@ import ctypes
|
||||
#--------------------------------------+
|
||||
|
||||
class PldHeader(ctypes.Structure):
|
||||
_pack_ = 1
|
||||
_fields_ = [
|
||||
("numOffset", ctypes.c_int),
|
||||
("offsets", ctypes.POINTER(ctypes.c_int))
|
||||
@ -217,6 +218,10 @@ if __name__ == "__main__":
|
||||
data = f.read()
|
||||
devil1pld.getheader(ctypes.byref(pldheader), data)
|
||||
devil1pld.printheader(ctypes.byref(pldheader))
|
||||
print(pldheader)
|
||||
print(pldheader.numOffset)
|
||||
for i in range(0, pldheader.numOffset):
|
||||
print(hex(pldheader.offsets[i]))
|
||||
|
||||
def textest(devil1tex, texheader):
|
||||
with open("pl01.pld_1.txp", "rb") as f:
|
||||
|
Loading…
Reference in New Issue
Block a user