author | Wuzzy |
Sun, 09 Dec 2018 00:09:42 +0000 | |
changeset 1675 | 81f665278a7c |
parent 1621 | 41a7f751b77b |
child 1681 | b41bffc4636e |
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 |
||
1621 | 7 |
== File format (outdated) == |
8 |
*NOTE*: This section is outdated. |
|
9 |
||
666 | 10 |
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. |
11 |
||
226 | 12 |
Drawn map is described by a list of points, which define polylines to draw and format of each polyline. |
13 |
||
14 |
Point is defined as |
|
15 |
|| Big-endian int16 || Big-endian int16 || Byte || |
|
16 |
|| *X* coordinate || *Y* coordinate || *flags* || |
|
17 |
||
18 |
where *flags* are: |
|
19 |
|| 8th bit || 7th bit || 6th-1st bits || |
|
1222 | 20 |
|| if set, this is a first point of polyline || if set, polyline is erasing || *width* (thickness) of line || |
226 | 21 |
|
1222 | 22 |
… where *width* defines `(width * 10) + 6` pixels width line to draw. |
226 | 23 |
|
1222 | 24 |
Second and further points of polyline have 8th bit of *flags* unset, the content of others are ignored for those. |
226 | 25 |
|
1222 | 26 |
A single-point polyline defines a circle. |
666 | 27 |
|
28 |
== Sharing hand-drawn maps == |
|
29 |
Hand-drawn maps will be automatically transferred when playing online. |
|
30 |
||
798
30c5f1ebd552
global replace of http with https for hedgewars.org wiki links
nemo
parents:
748
diff
changeset
|
31 |
But if you wish you can still share you creations in the [https://www.hedgewars.org/node/2849 Hand-Drawn Maps Submission Thread]. |