32 |
32 |
33 The X and Y fields store coordinates, but they might also be abused to store arbitrary numbers. The other bits in the `flags` field can also be used to store an arbitrary number. Because the 8th bit is already used, only numbers 0-127 are possible. |
33 The X and Y fields store coordinates, but they might also be abused to store arbitrary numbers. The other bits in the `flags` field can also be used to store an arbitrary number. Because the 8th bit is already used, only numbers 0-127 are possible. |
34 |
34 |
35 When Hedgewars loads a drawn map with special points inside, `onSpecialPoint` is called for each special point. |
35 When Hedgewars loads a drawn map with special points inside, `onSpecialPoint` is called for each special point. |
36 |
36 |
37 ==== Usage in scripts ==== |
|
38 This section explains how the special points are used in various official scripts. |
|
39 |
|
40 ===== !HedgeEditor ===== |
|
41 !HedgeEditor uses special points to spawn various gears and other things such as mines, crates or waypoints. Consult the script file to find out how they work. |
|
42 |
|
43 ===== Racer ===== |
|
44 The special points are used to store coordinates of waypoints. This is utilized by the Official Racer Challenge on the official server. |
|
45 |
|
46 If `flags` is set to exactly 99, it's a coordinate for the “best racer ghost” or smoke trace. This is also used for Official Racer Challenge. |
|
47 |
|
48 ===== !TechRacer ===== |
|
49 |
|
50 * `flags == 0`: Waypoint |
|
51 * `flags == 99`: A position of the best racer ghost (like in Racer) |
|
52 * Otherwise: Place a gear or girder (see script source code for reference) |
|
53 |
|
54 === Compression === |
37 === Compression === |
55 |
38 |
56 Above description describes the raw data, but the final file will be changed. The raw data is first base64-encoded and then compressed with [https://doc.qt.io/qt-5/qbytearray.html#qCompress Qt's `qCompress` function]. |
39 Above description describes the raw data, but the final file will be changed. The raw data is first base64-encoded and then compressed with [https://doc.qt.io/qt-5/qbytearray.html#qCompress Qt's `qCompress` function]. |
57 |
40 |
58 == Sharing hand-drawn maps == |
41 == Sharing hand-drawn maps == |
59 Hand-drawn maps will be automatically transferred when playing online. |
42 Hand-drawn maps will be automatically transferred when playing online. |
60 |
43 |
61 But if you wish you can still share your creations in the [https://www.hedgewars.org/node/2849 Hand-Drawn Maps Submission Thread]. |
44 But if you wish you can still share your creations in the [https://www.hedgewars.org/node/2849 Hand-Drawn Maps Submission Thread]. |
|
45 |
|
46 --- |
|
47 |
|
48 == Appendix: Usage of special points in scripts == |
|
49 This section explains how the special points are used in various official scripts. |
|
50 |
|
51 === !HedgeEditor === |
|
52 !HedgeEditor uses special points to spawn various gears and other things such as mines, crates or waypoints. Consult the script file to find out how they work. |
|
53 |
|
54 === Racer === |
|
55 The special points are used to store coordinates of waypoints. This is utilized by the Official Racer Challenge on the official server. |
|
56 |
|
57 If `flags` is set to exactly 99, it's a coordinate for the “best racer ghost” or smoke trace. This is also used for Official Racer Challenge. |
|
58 |
|
59 === !TechRacer === |
|
60 |
|
61 Depending on the value of `flags`, a special point means … |
|
62 |
|
63 * `flags == 0`: Waypoint |
|
64 * `flags == 99`: A position of the best racer ghost (like in Racer) |
|
65 * Otherwise: Place a gear or girder (see script source code for reference) |