… | |
… | |
122 | </tr> |
122 | </tr> |
123 | </table> |
123 | </table> |
124 | |
124 | |
125 | <h2>Primitive types used in the protocol.</h2> |
125 | <h2>Primitive types used in the protocol.</h2> |
126 | |
126 | |
127 | <p>Baaah... not much yet.</p> |
|
|
128 | |
|
|
129 | <h4>TYPE username</h4> |
127 | <h4>TYPE username</h4> |
130 | BASE TYPE: A<br /> |
128 | BASE TYPE: A<br /> |
131 | LENGTH: 12<br /> |
129 | LENGTH: 12<br /> |
132 | MULTIPLIER: <br /> |
130 | MULTIPLIER: <br /> |
|
|
131 | |
|
|
132 | <p>The basic user or login name, used throughout the protocol |
|
|
133 | as a handle to the user.</p> |
|
|
134 | |
133 | <h4>TYPE roomname</h4> |
135 | <h4>TYPE roomname</h4> |
134 | BASE TYPE: S<br /> |
136 | BASE TYPE: S<br /> |
135 | LENGTH: 25<br /> |
137 | LENGTH: 25<br /> |
136 | MULTIPLIER: <br /> |
138 | MULTIPLIER: <br /> |
137 | <!-- argh, how horribly broken --> |
139 | <!-- argh, how horribly broken --> |
|
|
140 | |
|
|
141 | <p>Many strings in the protocol are fixed-width for no good reason |
|
|
142 | (maybe this is one reason for using compression in enwer versions, as |
|
|
143 | the packets itself are wasting lots of space.</p> |
|
|
144 | |
138 | <h4>TYPE locale</h4> |
145 | <h4>TYPE locale</h4> |
139 | BASE TYPE: A<br /> |
146 | BASE TYPE: A<br /> |
140 | LENGTH: 5<br /> |
147 | LENGTH: 5<br /> |
141 | MULTIPLIER: <br /> |
148 | MULTIPLIER: <br /> |
|
|
149 | |
|
|
150 | <p>A kind of locale specifier. It seems the general format seems to be |
|
|
151 | lowercase language, underscore, uppercase location, e.g. en_US. More |
|
|
152 | fancy specifications don't fit.</p> |
|
|
153 | |
142 | <h4>TYPE flag</h4> |
154 | <h4>TYPE flag</h4> |
143 | BASE TYPE: U8<br /> |
155 | BASE TYPE: U8<br /> |
144 | LENGTH: <br /> |
156 | LENGTH: <br /> |
145 | MULTIPLIER: 1<br /> |
157 | MULTIPLIER: 1<br /> |
|
|
158 | |
|
|
159 | <p>Just a simple boolean value. 0 means false, and 1 generally true, |
|
|
160 | but I suggest ccepting != 0 as true.</p> |
|
|
161 | |
146 | <h4>TYPE komi16</h4> |
162 | <h4>TYPE komi16</h4> |
147 | BASE TYPE: I16<br /> |
163 | BASE TYPE: I16<br /> |
148 | LENGTH: <br /> |
164 | LENGTH: <br /> |
149 | MULTIPLIER: 2<br /> |
165 | MULTIPLIER: 2<br /> |
150 | <h4>TYPE komi32</h4> |
166 | <h4>TYPE komi32</h4> |
151 | BASE TYPE: I32<br /> |
167 | BASE TYPE: I32<br /> |
152 | LENGTH: <br /> |
168 | LENGTH: <br /> |
153 | MULTIPLIER: 2<br /> |
169 | MULTIPLIER: 2<br /> |
|
|
170 | |
|
|
171 | <p>Komi values are multiplied by 2 to make them integer in the |
|
|
172 | protocol. Of course, sometimes they are encoded in 16 bits, sometimes |
|
|
173 | in 32. Get used to this.</p> |
|
|
174 | |
154 | <h4>TYPE result</h4> |
175 | <h4>TYPE result</h4> |
155 | BASE TYPE: I32<br /> |
176 | BASE TYPE: I32<br /> |
156 | LENGTH: <br /> |
177 | LENGTH: <br /> |
157 | MULTIPLIER: 2<br /> |
178 | MULTIPLIER: 2<br /> |
|
|
179 | |
|
|
180 | <p>The game result is also multiplied by four to give it higher |
|
|
181 | resolution. There are also special values for wins by time etc.</p> |
|
|
182 | |
158 | <h4>TYPE score</h4> |
183 | <h4>TYPE score</h4> |
159 | BASE TYPE: I32<br /> |
184 | BASE TYPE: I32<br /> |
160 | LENGTH: <br /> |
185 | LENGTH: <br /> |
161 | MULTIPLIER: 4<br /> |
186 | MULTIPLIER: 4<br /> |
|
|
187 | |
|
|
188 | <p>A score value (used for displaying the score at the end of a game) |
|
|
189 | are multiplied by four for a change. I have not yet seen 0.25 scores, |
|
|
190 | please somebody tell me where they happen, or if they happen.</p> |
|
|
191 | |
162 | <h4>TYPE time</h4> |
192 | <h4>TYPE time</h4> |
163 | BASE TYPE: U32<br /> |
193 | BASE TYPE: U32<br /> |
164 | LENGTH: <br /> |
194 | LENGTH: <br /> |
165 | MULTIPLIER: 1000<br /> |
195 | MULTIPLIER: 1000<br /> |
166 | |
196 | |
|
|
197 | <p>Time values are multiplied by 1000, giving them millisecond |
|
|
198 | accuracy.</p> |
|
|
199 | |
167 | <h2>Constants, enumeration and set types used in the protocol.</h2> |
200 | <h2>Constants, enumeration and set types used in the protocol.</h2> |
168 | |
201 | |
169 | <p>Baaah... not yet.</p> |
202 | <p>Baaah... not yet.</p> |
170 | |
203 | |
171 | <h2>Structs used in send & receive messages</h2> |
204 | <h2>Structs used in send & receive messages</h2> |