@@ -0,0 +1,1243 @@
+from collections import namedtuple%0Afrom struct import unpack%0A%0Aimport sark%0A%0A%0AImagePosition = namedtuple('ImagePosition', 'spritesheet image_number y collide x')%0A%0A%0Adef hex_to_sign(value):%0A    if value %3E= 0x8000:%0A        value -= 0x10000%0A    return value%0A%0A%0Adef byte_to_sign(value):%0A    if value %3E= 0x80:%0A        value -= 0x100%0A    return value%0A%0A%0Aspritesheets = %7B%0A    0: 'kn1.ob',%0A    4: 'kn2.ob',%0A    8: 'kn3.ob',%0A    12: 'kn4.ob',%0A    16: 'kn4.ob',%0A%7D%0A%0Acollide_type = %7B%0A    0: 'Collide.NON_SOLID',%0A    1: 'Collide.COLLIDEE',%0A    2: 'Collide.COLLIDER',%0A%7D%0A%0A%0Aline = sark.Line()%0Anext_line = True%0Awhile next_line:%0A    if line.disasm.startswith(%22AnimationFrame%22):%0A%0A        sprite, img_num, y, collide, x = unpack('%3C4BH', line.bytes)%0A        y = byte_to_sign(y)%0A        x = hex_to_sign(x)%0A        sprite = spritesheets%5Bsprite%5D%0A        collide = collide_type%5Bcollide%5D%0A%0A        test = %22ImagePosition('%7B%7D', %7B%7D, %7B%7D, %7B%7D, %7B%7D),%22.format(sprite, img_num, y, x, collide)%0A        print test%0A        line = line.next%0A    elif line.disasm.startswith('EndOfAnimFrame %3C0FFh, 0%3E'):%0A        line = line.next%0A        print '),'%0A        print '('%0A    elif line.disasm.startswith('EndOfAnimFrame %3C0FFh, 0FFh%3E'):%0A        next_line = False%0A    else:%0A        line = line.next%0A

Add ida script to convert ida anim to python anim