mirror of
				https://notabug.org/scuti/lib3ddevil1
				synced 2025-05-31 14:11:42 +05:30 
			
		
		
		
	Added interface for GEOHeader
This commit is contained in:
		@@ -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()
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user