author | Wuzzy |
Tue, 21 Aug 2018 21:30:15 +0100 | |
changeset 1516 | 4b3e233e5ac0 |
parent 1222 | 111d15f81dbd |
child 1621 | 41a7f751b77b |
permissions | -rw-r--r-- |
432 | 1 |
#summary Short description of the file format of hand-drawn maps |
2 |
||
748 | 3 |
= Hand-drawn maps = |
666 | 4 |
== Introduction == |
5 |
Hand-drawn maps are maps which are created by the player using the in-game map editor. |
|
6 |
||
7 |
== File format == |
|
8 |
Hand-drawn maps are saved with a file name suffix of “.hwmap”. The saving location is freely chosen by the user; Hedgewars does not use any predefined location to save hand-drawn maps. |
|
9 |
||
226 | 10 |
Drawn map is described by a list of points, which define polylines to draw and format of each polyline. |
11 |
||
12 |
Point is defined as |
|
13 |
|| Big-endian int16 || Big-endian int16 || Byte || |
|
14 |
|| *X* coordinate || *Y* coordinate || *flags* || |
|
15 |
||
16 |
where *flags* are: |
|
17 |
|| 8th bit || 7th bit || 6th-1st bits || |
|
1222 | 18 |
|| if set, this is a first point of polyline || if set, polyline is erasing || *width* (thickness) of line || |
226 | 19 |
|
1222 | 20 |
… where *width* defines `(width * 10) + 6` pixels width line to draw. |
226 | 21 |
|
1222 | 22 |
Second and further points of polyline have 8th bit of *flags* unset, the content of others are ignored for those. |
226 | 23 |
|
1222 | 24 |
A single-point polyline defines a circle. |
666 | 25 |
|
26 |
== Sharing hand-drawn maps == |
|
27 |
Hand-drawn maps will be automatically transferred when playing online. |
|
28 |
||
798
30c5f1ebd552
global replace of http with https for hedgewars.org wiki links
nemo
parents:
748
diff
changeset
|
29 |
But if you wish you can still share you creations in the [https://www.hedgewars.org/node/2849 Hand-Drawn Maps Submission Thread]. |