mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2025-05-31 14:11:42 +05:30
Cleanup: #!s, prints, exceptions, more consistent naming
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/python3
|
||||
import ctypes
|
||||
from .__init__ import libc
|
||||
from __init__ import libc
|
||||
|
||||
#--------------------------------------+
|
||||
# Basic Struct
|
||||
@@ -141,7 +140,7 @@ del libc
|
||||
# Pythonic Object
|
||||
#--------------------------------------+
|
||||
|
||||
class GEOHeader:
|
||||
class pyGeoHeader:
|
||||
def __init__(self, filedata):
|
||||
self.cstruct = ctypes.pointer(Header())
|
||||
ptrofptr = ctypes.byref(self.cstruct)
|
||||
@@ -171,7 +170,7 @@ class GEOHeader:
|
||||
return hex(self.cstruct.contents.unknownOffset)
|
||||
|
||||
|
||||
class MEShHeader:
|
||||
class pyMeshHeader:
|
||||
def __init__(self, i, filedata):
|
||||
self.cstruct = ctypes.pointer(MeshHeader())
|
||||
ptrofptr = ctypes.byref(self.cstruct)
|
||||
@@ -198,11 +197,11 @@ class MEShHeader:
|
||||
def getflags(self):
|
||||
return self.cstruct.contents.flags
|
||||
|
||||
class MEsh:
|
||||
class pyMesh:
|
||||
def __init__(self, i, filedata):
|
||||
self.cstruct = Mesh()
|
||||
if filedata:
|
||||
mh = MEShHeader(i, filedata)
|
||||
mh = pyMeshHeader(i, filedata)
|
||||
# allocate memory for the size of batch * number of batches
|
||||
memsize = ctypes.sizeof(Batch) * mh.getbatchno()
|
||||
self.cstruct.b = ctypes.cast(
|
||||
|
Reference in New Issue
Block a user