annotate data/ST/make_ecl.py @ 115:f0e6ae22d29a

Add sample data
author Thibaut Girka <thib@sitedethib.com>
date Wed, 07 Sep 2011 00:40:14 +0200
parents
children 1bc0ad774ed4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
115
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
1 from pytouhou.formats.ecl import ECL
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
2 from math import pi
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
3
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
4 # Frame, sub, opcode, args
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
5 main = [(120, 0, 0, (-30.0, 80.0, 0.0, 16, 0, 0, 0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
6 (140, 0, 0, (-30.0, 130.0, 0.0, 16, 0, 0, 0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
7
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
8 (160, 0, 2, (192*2+30.0, 80.0, 0.0, 16, 0, 0, 0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
9 (180, 0, 2, (192*2+30.0, 130.0, 0.0, 16, 0, 0, 0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
10
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
11 (220, 0, 0, (-30.0, 80.0, 0.0, 16, 0, 0, 0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
12 (220, 0, 0, (-30.0, 130.0, 0.0, 16, 0, 0, 0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
13
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
14 (260, 0, 2, (192*2+30.0, 80.0, 0.0, 16, 0, 0, 0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
15 (260, 0, 2, (192*2+30.0, 130.0, 0.0, 16, 0, 0, 0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
16
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
17 (560, 2, 0, (0, -10, 0.0, 120, 0, 0, 0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
18 (780, 2, 0, (0, -10, 0.0, 120, 0, 0, 0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
19 (900, 2, 0, (0, -10, 0.0, 120, 0, 0, 0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
20
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
21 (1500, 3, 0, (192, -10, 0.0, 300, 0, 0, 0))]
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
22
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
23
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
24 subs = [
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
25 # Frame, opcode, rank_mask, param_mask, args
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
26 [(0, 97, 0xff00, 256, (0,)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
27 (0, 108, 0xff00, 256, (1,)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
28 (0, 107, 0xff00, 256, (1,)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
29 (0, 45, 0xff00, 256, (-0.3, 0.8)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
30 (0, 48, 0xff00, 256, (0.01,)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
31 (0, 46, 0xff00, 256, (0.001,)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
32 (0, 5, 0xff00, 256, (-10005, pi-0.3)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
33 (0, 68, 0xff00, 256, (2, 6, 1, 1, 2.0, 0.0, -10005.0, 0.0, 1)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
34 (2, 21, 0xff00, 256, (-10005, -10005, 0.2)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
35 (2, 2, 0xff00, 256, (0, 7))],
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
36
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
37 [(0, 75, 0xff00, 256, (1, 2, 10, 10, 2.0, 4.0, -pi, pi, 0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
38 (5, 1, 0xff00, 256, (0,))],
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
39
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
40 [(0, 97, 0xff00, 256, (3,)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
41 (0, 4, 0xff00, 256, (-10001, 15)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
42 (0, 57, 0xff00, 256, (60, 192.0, 80.0, 0.0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
43 (0, 78, 0xff00, 256, ()),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
44 (0, 67, 0xff00, 256, (2, 6, 1, 4, 2.0, 4.0, 0.0, 0.0, 1)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
45 (0, 79, 0xff00, 256, ()),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
46 (0, 77, 0xff00, 256, (20,)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
47 (60, 65, 0xff00, 256, (20, 20, 192*2-20, 120)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
48 (60, 47, 0xff00, 256, (8.0,)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
49
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
50 (60, 50, 0xff00, 256, (-pi, pi)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
51
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
52 (80, 3, 0xff00, 256, (60, 9, -10001)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
53
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
54 (80, 66, 0xff00, 256, ()),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
55 (80, 76, 0xff00, 256, (0,)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
56 (80, 51, 0xff00, 256, (0, 8.0))],
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
57
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
58 [(0, 97, 0xff00, 256, (0,)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
59 (0, 57, 0xff00, 256, (60, 192.0, 80.0, 0.0)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
60 (60, 82, 0xff00, 256, (40, 15, -1, -1, 0.0, 6.0, -1, -1)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
61 (60, 75, 0xff00, 256, (1, 3, 20, 1, 3.0, 6.0, -pi, pi, 1| 128)),
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
62 (60, 76, 0xff00, 256, (110,))]
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
63 ]
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
64
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
65 ecl = ECL()
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
66 ecl.subs = subs
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
67 ecl.main = main
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
68
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
69 with open('ecldata1.ecl', 'wb') as file:
f0e6ae22d29a Add sample data
Thibaut Girka <thib@sitedethib.com>
parents:
diff changeset
70 ecl.write(file)