Does anyone know how to import models from Kao the Kangaroo?
Maybe DGlorio?
Here is link to demo:
http://download.gamesurf.tiscali.it/demo/kao_demo.zip
and Blender script, some specification:
Code: Select all
import Blender
import struct
def load_bin(filename):
scn = Blender.Scene.GetCurrent()
if scn == None:
return "No scene to import to!"
file = open(filename, 'rb')
scn.objects.selected = []
mesh = Blender.Mesh.New("name")
meshOb = scn.objects.new(mesh)
file.seek(12,0)
numobjects = struct.unpack('L', file.read(4))[0]
file.seek(16,0)
numFaces = struct.unpack('L', file.read(4))[0]
file.seek(76,0)
numVerts = struct.unpack('L', file.read(4))[0]
file.seek(120,0)
faces = []
for i in xrange(numFaces):
x = struct.unpack('H',file.read(2))[0]
file.read(2)
y = struct.unpack('H',file.read(2))[0]
file.read(2)
z = struct.unpack('H',file.read(2))[0]
file.read(2)
file.read(2)
file.read(2)
faces.append([x,y,z])
verts = []
for i in xrange(numVerts):
verts.append(struct.unpack('fff', file.read(3*4)))
file.read(4)
mesh.verts.extend(verts)
mesh.faces.extend(faces)
Blender.Window.FileSelector(load_bin, 'import kao bin', '*.bin')
and script to quickbms for kao.pak:
Code: Select all
get pEOCDR asize
math pEOCDR -= 12
goto pEOCDR
get CDR_NUM long
get CDR_PTR long
idstring "T8FM" ## assumed magic
goto CDR_PTR
for i = 1 to CDR_NUM
getdstring R_NAME 80
get R_POS long
get R_SIZE long
log R_NAME R_POS R_SIZE
next i
If Windows is 64-bit, you need to download is3Engine.zip http://toastytech.com/files/Is3Engine.zip, put setup32.exe and launch.