changeset 11:9f0e37b7eeab

Some fixes in the replay format.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 24 Aug 2011 15:40:37 +0200
parents d0e992b282a0
children 79dfd9765a67
files 06/t6rp.xhtml
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/06/t6rp.xhtml
+++ b/06/t6rp.xhtml
@@ -21,14 +21,14 @@ typedef struct {
     uint8_t player; // 0 = ReimuA, 1 = ReimuB, 2 = MarisaA, 3 = MarisaB
     uint8_t rank; // 0 = Easy, 3 = Lunatic, 4 = Extra
     uint32_t checksum; // (0x3f000318 + key + sum(c for c in decrypted_data)) % (2 ** 32)
-    uint16_t unknown2; //TODO: seems to be ignored by the game
+    uint16_t unknown2; //TODO: seems to be ignored by the game.
     uint8_t key;
     char crypted_data[]; // crypted(a, i) = (a + key + 7*i) % 256
                          // decrypted(c, i) = (c - key - 7*i) % 256
 } thrpy6_header_t;
 </pre>
 
-		<h2>Decrypting the data section.</h2>
+		<h2>Decrypting the data section</h2>
 		<p>As stated earlier, the data section is encrypted. Luckily, this encryption is quite simplistic, and encrypting/decrypting it is easy (see this snippet of python3 code):</p>
 <pre>
 def decrypt(key, data):
@@ -41,14 +41,14 @@ def encrypt(key, data):
 		<h2>Encrypted header</h2>
 <pre>
 typedef struct {
-    uint8_t unknown; //TODO: seems to be ignored by the game
+    uint8_t unknown; //TODO: seems to be ignored by the game. Padding?
     char date[9]; // null-terminated string
     char name[9]; // null-terminated string
-    uint16_t unknown2; //TODO: seems to be ignored by the game
-    uint32_t score; //TODO: Total score. seems to be ignored by the game
-    uint32_t unknown3; //TODO: seems to be ignored by the game
+    uint16_t unknown2; //TODO: seems to be ignored by the game. Padding?
+    uint32_t score; //TODO: Total score. seems to be ignored by the game.
+    uint32_t unknown3; //TODO: seems to be ignored by the game.
     float slowdown_rate; // As a percentage, not a proper rate
-    uint8_t unknwon[4]; //TODO: seems to have no effect
+    uint32_t unknown4; //TODO: seems to be ignored by the game.
     uint32_t stage1_offset; // Offset of a thrpy6_stage_t from the start of the file (including the unencrypted header)
     uint32_t stage2_offset;
     uint32_t stage3_offset;
@@ -64,7 +64,7 @@ typedef struct {
 typedef struct {
     uint32_t score;
     uint16_t random_seed;
-    uint16_t unknown1; //TODO: seems to be ignored by the game
+    uint16_t unknown1; //TODO: seems to be ignored by the game.
     uint8_t power;
     int8_t lives;
     int8_t bombs;
@@ -79,9 +79,9 @@ typedef struct {
 		<h2>Keystates</h2>
 <pre>
 struct {
-    uint32_t time; // Time of the event, most probably exprimed in frames
-    uint16_t keys; // 1 = shoot, 2 = bomb, 4 = focus, 8 = ?, 16 = up, 32 = down, 64 = left, 128 = right
-    uint16_t unknown; //TODO: seems to be ignored by the game
+    uint32_t time; // Time of the event, most probably exprimed in frames.
+    uint16_t keys; // 1 = shoot, 2 = bomb, 4 = focus, 8 = ?, 16 = up, 32 = down, 64 = left, 128 = right, 256 = skip dialogs
+    uint16_t unknown; //TODO: seems to be ignored by the game.
 } thrpy6_keystate_t;
 </pre>
 	</body>