Mercurial > touhou-doc
annotate 06/ecl.xhtml @ 12:79dfd9765a67
I *really* should commit more often.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 04 Oct 2011 11:45:04 +0200 |
parents | 2a7b9d62c0c4 |
children | 2925b0e246c6 |
rev | line source |
---|---|
3
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
1 <?xml version="1.0" encoding="utf-8"?> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
2 <?xml-stylesheet type="text/css" href="../style.css"?> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
3 <!DOCTYPE html> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
5 <head> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
6 <title>ECL format</title> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
7 </head> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
8 <body> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
9 <h1>ECL format</h1> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
10 |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
11 <h2>Header</h2> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
12 <pre> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
13 typedef struct { |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
14 uint32_t sub_count; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
15 uint32_t main_offset; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
16 uint32_t padding[2]; // Always 0. |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
17 uint32_t subs_offsets[sub_count]; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
18 } thecl06_header_t; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
19 </pre> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
20 |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
21 |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
22 <h2>Sub</h2> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
23 <p>Starting at 0x10.<br/>They describe the appearance and comportment of a certain type of enemy</p> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
24 <p>Ends with frame_num = 0xffffffff and opcode = 0xffff, for a size of 0xc (the minimum) and default masks.</p> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
25 <p>Parameters are dependants of the opcode.</p> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
26 <pre> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
27 typedef struct { |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
28 uint32_t frame_num; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
29 uint16_t <a href="ecl.xml">opcode</a>; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
30 uint16_t size; // Never less than 0xc. |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
31 uint16_t rank_mask; // the first byte is always 0xff, and the second the mask of the ranks to which the instruction applies, 1 for easy, 8 for lunatic. |
7
2a7b9d62c0c4
Fix details, and details and documentation for a few instructions
Thibaut Girka <thib@sitedethib.com>
parents:
5
diff
changeset
|
32 uint16_t param_mask; // Unused in EoSD, always 255. It is used in other Touhou games to indicate whether an argument is an "address" or not, though. |
3
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
33 unsigned char params[size-0xc]; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
34 } thecl06_sub_t; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
35 </pre> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
36 |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
37 |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
38 <h2>Main</h2> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
39 <p>Each instruction contains its size (which is always greater than 8, or else the game crashs). The only values encountered in the game are 0x1c, 0x10 and 8, but values of 0x38 work (skip the next instruction).<br/> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
40 The frame_num must greater than or equal to the previous, or the instruction will be skipped.<br/> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
41 The parsing ends when frame_num is 0xffff.</p> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
42 <pre> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
43 typedef struct { |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
44 uint16_t frame_num; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
45 uint16_t unused1; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
46 uint16_t unused2; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
47 uint16_t size; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
48 uint8_t arguments[size-8]; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
49 } thecl_main_instr_t; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
50 </pre> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
51 |
12
79dfd9765a67
I *really* should commit more often.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
7
diff
changeset
|
52 <p id="enemy_sub">Most present instruction, that pops an enemy.</p> |
3
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
53 <pre> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
54 typedef struct { |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
55 uint16_t time; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
56 uint16_t sub; // Sub function to use. |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
57 uint16_t <a href="#type">type</a>; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
58 uint16_t size; // Really the size of the instruction. NOT ignored by the game. |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
59 float x; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
60 float y; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
61 float z; // Unused, always 0. |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
62 int16_t resistance; // From 0 to 0x7fff; greater is equal to 0. |
5
b3644dff344c
Way too much changes. :/
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
3
diff
changeset
|
63 int16_t object_dropped; // Between -2 and 2. |
b3644dff344c
Way too much changes. :/
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
3
diff
changeset
|
64 // 0000 to 00ff: power |
b3644dff344c
Way too much changes. :/
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
3
diff
changeset
|
65 // ff00 to ffff: random |
b3644dff344c
Way too much changes. :/
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
3
diff
changeset
|
66 // other: nothing |
3
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
67 uint16_t unknown1; |
5
b3644dff344c
Way too much changes. :/
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
3
diff
changeset
|
68 uint16_t unknown2; // 0 for normal enemies; 1 for mid-boss; 3 or 4 for boss. |
3
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
69 } thecl_enemy_t; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
70 </pre> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
71 |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
72 <p>Unknown, used only at the end of each stage.</p> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
73 <pre> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
74 typedef struct { |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
75 uint16_t time; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
76 uint16_t sub; // always 0. |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
77 uint16_t <a href="#type">type</a>; // always 0xa. |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
78 uint16_t size; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
79 float unused1; // always 0. |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
80 float unused2; // always 0. |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
81 } thecl_other1_t; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
82 </pre> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
83 |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
84 <p>Unknown, used only at the end of each stage. Always in group of 1, 2 or 3, with a sequence of (9), (8, 9) or (0xc, 8, 9).</p> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
85 <pre> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
86 typedef struct { |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
87 uint16_t time; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
88 uint16_t sub; // always 0. |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
89 uint16_t <a href="#type">type</a>; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
90 uint16_t size; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
91 } thecl_other2_t; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
92 </pre> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
93 |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
94 <h3 id="type">Type</h3> |
7
2a7b9d62c0c4
Fix details, and details and documentation for a few instructions
Thibaut Girka <thib@sitedethib.com>
parents:
5
diff
changeset
|
95 <p>Used in the game are: 0, 2, 4, 6 for the enemies (0x1c-long), 0xa for the 0x10-long instruction, and 8, 9 and 0xc for the 8-long one. Type might be quite a misnomer since those are pretty much flags.</p> |
3
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
96 <style type="text/css"> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
97 li.used { |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
98 font-weight: bold; |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
99 } |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
100 </style> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
101 <ol start="0"> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
102 <li class="used">normal enemy</li> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
103 <li>normal enemy</li> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
104 <li class="used">mirrored enemy</li> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
105 <li>mirrored enemy</li> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
106 <li class="used">normal enemy</li> |
7
2a7b9d62c0c4
Fix details, and details and documentation for a few instructions
Thibaut Girka <thib@sitedethib.com>
parents:
5
diff
changeset
|
107 <li>normal enemy (random placement)</li> |
3
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
108 <li class="used">mirrored enemy</li> |
7
2a7b9d62c0c4
Fix details, and details and documentation for a few instructions
Thibaut Girka <thib@sitedethib.com>
parents:
5
diff
changeset
|
109 <li>mirrored enemy (random placement)</li> |
3
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
110 <li class="used">starts the msg (which?)</li> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
111 <li class="used">nothing?</li> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
112 <li class="used">crash!?</li> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
113 <li>nothing?</li> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
114 <li class="used">nothing?</li> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
115 etc. |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
116 </ol> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
117 </body> |
bd0f1253691d
Add documentation of ECL format.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
118 </html> |