diff --git a/bindings/main.py b/bindings/main.py index 290f681..8659ea2 100644 --- a/bindings/main.py +++ b/bindings/main.py @@ -1,4 +1,4 @@ -from py3devil1pld import PLDHeader +from py3devil1pld import PldHeader from py3devil1tex import TEXturePack, TEXtureBatchDescriptor, TEXtureBatch from py3devil1geo import GEOHeader, MEShHeader, MEsh @@ -68,9 +68,9 @@ if __name__ == "__main__": def mainx(): with open("pl01.pld", "rb") as f: data = f.read() - pld = PLDHeader(data) + pld = PldHeader(data) pld.show() - pld2 = PLDHeader() + pld2 = PldHeader() pld2.show() with open("pl01.pld_1.txp", "rb") as f: diff --git a/bindings/py3devil1pld.py b/bindings/py3devil1pld.py index c8fd904..8bc6c5d 100644 --- a/bindings/py3devil1pld.py +++ b/bindings/py3devil1pld.py @@ -6,7 +6,7 @@ from .__init__ import libc # Basic Struct #--------------------------------------+ -class PldHeader(ctypes.Structure): +class _PldHeader_(ctypes.Structure): _pack_ = 1 _fields_ = [ ("numOffset", ctypes.c_int), @@ -17,14 +17,14 @@ class Devil1PLD_FN(ctypes.Structure): _fields_ = [ ("getheader" , ctypes.CFUNCTYPE( ctypes.c_bool, - ctypes.POINTER(PldHeader), + ctypes.POINTER(_PldHeader_), ctypes.c_char_p)), ("sizeofsector", ctypes.CFUNCTYPE( ctypes.c_int, - ctypes.POINTER(PldHeader), + ctypes.POINTER(_PldHeader_), ctypes.c_int)), ("printheader" , ctypes.CFUNCTYPE(None, - ctypes.POINTER(PldHeader))) + ctypes.POINTER(_PldHeader_))) ] devil1pld = Devil1PLD_FN.in_dll(libc, "DEVIL1PLD") @@ -34,10 +34,10 @@ del libc # Pythonic Object #--------------------------------------+ -class PLDHeader: +class PldHeader: def __init__(self, filedata = None): # Store C Struct in order to call C functions - self.cstruct = PldHeader() + self.cstruct = _PldHeader_() if filedata: devil1pld.getheader(ctypes.byref(self.cstruct), filedata) self.eof = len(filedata)