Mercurial > touhou-doc
comparison 06/std.xhtml @ 13:2925b0e246c6 default tip
Fix a lot of things, and add a TODO.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 17 Feb 2012 12:54:08 +0100 |
parents | 2a7b9d62c0c4 |
children |
comparison
equal
deleted
inserted
replaced
12:79dfd9765a67 | 13:2925b0e246c6 |
---|---|
30 </pre> | 30 </pre> |
31 | 31 |
32 <h2>First section</h2> | 32 <h2>First section</h2> |
33 <p>This section is responsible for creating objects from the stgxbg.anm file.</p> | 33 <p>This section is responsible for creating objects from the stgxbg.anm file.</p> |
34 <pre> | 34 <pre> |
35 struct object_header { | 35 typedef struct { |
36 uint16_t id; // Always equal to the object's number. Not used by the game. | 36 uint16_t id; // Always equal to the object's number. Not used by the game. |
37 uint16_t unknown1; //TODO | 37 uint16_t unknown; //TODO |
38 float unknown2; //TODO | 38 |
39 uint32_t unknown3; //TODO | 39 // The bounding box. |
40 float unknown4; //TODO | 40 float x; |
41 float unknown5; //TODO | 41 float y; |
42 float unknown6; //TODO | 42 float z; |
43 float unknown7; //TODO | 43 float width; |
44 }; | 44 float height; |
45 float depth; | |
46 } object_header_t; | |
45 | 47 |
46 typedef struct { | 48 typedef struct { |
47 uint16_t unknown; // 0 means a quad, 0xffff means the end. | 49 uint16_t unknown; // 0 means a quad, 0xffff means the end. |
48 uint16_t size; // 0x1c for a quad, 4 for the end marker. | 50 uint16_t size; // 0x1c for a quad, 4 for the end marker. |
49 uint16_t script_index; // Index of a script entry in the corresponding anm file | 51 uint16_t script_index; // Index of a script entry in the corresponding anm file |
53 float z; // z coordinate of the bottom-left corner of the quad | 55 float z; // z coordinate of the bottom-left corner of the quad |
54 float width; // If not 0, override the sprite's width (else, use anm info) | 56 float width; // If not 0, override the sprite's width (else, use anm info) |
55 float height; // If not 0, override the sprite's height (else, use anm info) | 57 float height; // If not 0, override the sprite's height (else, use anm info) |
56 } thstd_object_t; | 58 } thstd_object_t; |
57 | 59 |
58 struct object { | 60 typedef struct { |
59 struct object_header header; | 61 struct object_header header; |
60 struct object_quad quads[]; // Stop when quads.unknown == 0x0004ff | 62 struct object_quad quads[]; // Stop when quads.unknown == 0x0004ff |
61 }; | 63 } object_t; |
62 </pre> | 64 </pre> |
63 | 65 |
64 | 66 |
65 <h2>Second section</h2> | 67 <h2>Second section</h2> |
66 <p>This section is responsible for placing objects from section 1 in the space.</p> | 68 <p>This section is responsible for placing objects from section 1 in the space.</p> |
144 thstd_header_t header; | 146 thstd_header_t header; |
145 uint32_t* offsets; | 147 uint32_t* offsets; |
146 list_t objects; | 148 list_t objects; |
147 list_t faces; | 149 list_t faces; |
148 list_t messages; | 150 list_t messages; |
149 } PACK_ATTRIBUTE thstd_t; | 151 } thstd_t; |
150 </pre> | 152 </pre> |
151 </body> | 153 </body> |
152 </html> | 154 </html> |