view data/ST/make_ecl.py @ 119:fad7b44cebf2

Switch from pygame + PyOpenGL to pyglet
author Thibaut Girka <thib@sitedethib.com>
date Wed, 07 Sep 2011 18:12:24 +0200
parents f0e6ae22d29a
children 1bc0ad774ed4
line wrap: on
line source

from pytouhou.formats.ecl import ECL
from math import pi

# Frame, sub, opcode, args
main = [(120, 0, 0, (-30.0, 80.0, 0.0, 16, 0, 0, 0)),
        (140, 0, 0, (-30.0, 130.0, 0.0, 16, 0, 0, 0)),

        (160, 0, 2, (192*2+30.0, 80.0, 0.0, 16, 0, 0, 0)),
        (180, 0, 2, (192*2+30.0, 130.0, 0.0, 16, 0, 0, 0)),

        (220, 0, 0, (-30.0, 80.0, 0.0, 16, 0, 0, 0)),
        (220, 0, 0, (-30.0, 130.0, 0.0, 16, 0, 0, 0)),

        (260, 0, 2, (192*2+30.0, 80.0, 0.0, 16, 0, 0, 0)),
        (260, 0, 2, (192*2+30.0, 130.0, 0.0, 16, 0, 0, 0)),

        (560, 2, 0, (0, -10, 0.0, 120, 0, 0, 0)),
        (780, 2, 0, (0, -10, 0.0, 120, 0, 0, 0)),
        (900, 2, 0, (0, -10, 0.0, 120, 0, 0, 0)),

        (1500, 3, 0, (192, -10, 0.0, 300, 0, 0, 0))]


subs = [
    # Frame, opcode, rank_mask, param_mask, args
    [(0, 97, 0xff00, 256, (0,)),
     (0, 108, 0xff00, 256, (1,)),
     (0, 107, 0xff00, 256, (1,)),
     (0, 45, 0xff00, 256, (-0.3, 0.8)),
     (0, 48, 0xff00, 256, (0.01,)),
     (0, 46, 0xff00, 256, (0.001,)),
     (0, 5, 0xff00, 256, (-10005, pi-0.3)),
     (0, 68, 0xff00, 256, (2, 6, 1, 1, 2.0, 0.0, -10005.0, 0.0, 1)),
     (2, 21, 0xff00, 256, (-10005, -10005, 0.2)),
     (2, 2, 0xff00, 256, (0, 7))],

    [(0, 75, 0xff00, 256, (1, 2, 10, 10, 2.0, 4.0, -pi, pi, 0)),
     (5, 1, 0xff00, 256, (0,))],

    [(0, 97, 0xff00, 256, (3,)),
     (0, 4, 0xff00, 256, (-10001, 15)),
     (0, 57, 0xff00, 256, (60, 192.0, 80.0, 0.0)),
     (0, 78, 0xff00, 256, ()),
     (0, 67, 0xff00, 256, (2, 6, 1, 4, 2.0, 4.0, 0.0, 0.0, 1)),
     (0, 79, 0xff00, 256, ()),
     (0, 77, 0xff00, 256, (20,)),
     (60, 65, 0xff00, 256, (20, 20, 192*2-20, 120)),
     (60, 47, 0xff00, 256, (8.0,)),

     (60, 50, 0xff00, 256, (-pi, pi)),

     (80, 3, 0xff00, 256, (60, 9, -10001)),

     (80, 66, 0xff00, 256, ()),
     (80, 76, 0xff00, 256, (0,)),
     (80, 51, 0xff00, 256, (0, 8.0))],

    [(0, 97, 0xff00, 256, (0,)),
     (0, 57, 0xff00, 256, (60, 192.0, 80.0, 0.0)),
     (60, 82, 0xff00, 256, (40, 15, -1, -1, 0.0, 6.0, -1, -1)),
     (60, 75, 0xff00, 256, (1, 3, 20, 1, 3.0, 6.0, -pi, pi, 1| 128)),
     (60, 76, 0xff00, 256, (110,))]
]

ecl = ECL()
ecl.subs = subs
ecl.main = main

with open('ecldata1.ecl', 'wb') as file:
    ecl.write(file)