changeset 2:0a7e6e3d5327

Improve anm and std documentation.
author Thibaut Girka <thib@sitedethib.com>
date Tue, 02 Aug 2011 15:45:13 +0200
parents b1bec4b5ccf3
children bd0f1253691d
files 06/anm.xml 06/std.xhtml
diffstat 2 files changed, 46 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/06/anm.xml
+++ b/06/anm.xml
@@ -164,8 +164,9 @@
 
 	<op>
 		<num>23</num>
-		<name>set_origin</name>
-		<desc>Apply transformations to the center of the quad, instead of its bottom-left corner.</desc>
+		<name>set_bottom_left_as_origin</name>
+		<desc>Set the sprite's bottom-left corner as its origin (otherwise, the sprite's origin is its center).
+		This parameter effectively translates the sprite by (width / 2., height / 2., 0.) once every other sprite operation has been executed.</desc>
 	</op>
 
 	<op>
--- a/06/std.xhtml
+++ b/06/std.xhtml
@@ -11,11 +11,11 @@
 		<h2>Header</h2>
 <pre>
 typedef struct {
-    uint16_t nb_objects; //TODO
-    uint16_t nb_faces; //TODO
-    uint32_t faces_offset; //TODO
-    uint32_t messages_offset; //TODO
-    uint32_t unknown; //TODO: always 0
+    uint16_t nb_objects; // Number of background objects contained in the file
+    uint16_t nb_faces; // Number of faces/quads for the aforementioned objects
+    uint32_t faces_offset;
+    uint32_t script_offset;
+    uint32_t unknown; // Always 0
     char stage_name[128]; // Name of the stage in SHIFT_JIS
     char song1_name[128]; // Name of the first song in SHIFT_JIS
     char song2_name[128]; // Name of the second song in SHIFT_JIS
@@ -50,13 +50,13 @@ typedef struct {
     float x; // x coordinate of the bottom-left corner of the quad
     float y; // y coordinate of the bottom-left corner of the quad
     float z; // z coordinate of the bottom-left corner of the quad
-    float width; // If 0, defaults to 32.0f
-    float height; // If 0, defaults to 32.0f
+    float width; // If not 0, override the sprite's width (else, use anm info)
+    float height; // If not 0, override the sprite's height (else, use anm info)
 } thstd_object_t;
 
 struct object {
     struct object_header header;
-    struct object_quad quads[]; // Stop when quads.unknown1 == 0x0004ff
+    struct object_quad quads[]; // Stop when quads.unknown == 0x0004ff
 };
 </pre>
 
@@ -77,42 +77,65 @@ typedef struct {
     float x;
     float y;
     float z;
-} thstd_face_t;
+} thstd_object_instance_t;
 // ends with 16 \xFF
 </pre>
 
 
 
 		<h2>Third Section</h2>
-		<p>This section is responsible for camera movement, color effects, and such things.</p>
+		<p>This section is responsible for camera movement, fog effects, and such things.</p>
 <pre>
 typedef struct {
     uint32_t frame_num;
-    uint16_t type; // 1=colormsg
-    uint16_t unknown; //TODO: Probably the size of the message, always 0x0c, ignored by the game
+    uint16_t type;
+    uint16_t size; // always 0x0c, ignored by the game
     uint32_t arg1;
     float arg2;
     float arg3;
-} thstd_message_t;
+} thstd_instr_t;
+
 
 typedef struct {
     uint8_t b;
     uint8_t g;
     uint8_t r;
-    uint8_t unknown1; // Seems useless. padding?
+    uint8_t unknown; //TODO: Seems useless. padding? Alpha?
 } color_t;
 
-typedef struct {
+
+typedef struct { // .type == 1
     color_t color;
-    float opacity_gradient_start; //TODO
-    float opacity_gradient_stop; //TODO
-} thstd_colormsg_t;
+    float fog_start;
+    float fog_end;
+} thstd_fog_instr_t;
 
-typedef struct {
+
+typedef struct { // type == 0
     float x;
     float y;
     float z;
-} thstd_cameramsg_t;
+} thstd_viewpos_instr_t;
+
+
+typedef struct { // type == 2
+    uint32_t unknown_x; //TODO
+    uint32_t center_dy; // y delta between the camera position and its view center
+    float dz; // z coordinate of the camera, divided by -835.979370
+} thstd_viewpos2_instr_t;
+
+
+typedef struct { // type == 3
+    uint32_t duration; // Duration of the interpolation, in frames
+    uint32_t unused[2];
+} thstd_start_interpolating_viewpos_instr_t;
+
+
+typedef struct { // type == 4
+    uint32_t duration; // Duration of the interpolation, in frames
+    uint32_t unused[2];
+} thstd_start_interpolating_fog_instr_t;
+
 // ends with 20 \xFF
 </pre>