summary |
shortlog |
changelog |
graph |
tags |
bookmarks |
branches |
files |
changeset |
file |
latest |
revisions |
annotate |
diff |
comparison |
raw |
help

DrawnMapFormat.wiki

changeset 2122 | 9f81b4289d36 |

parent 2121 | c79a36615390 |

--- a/DrawnMapFormat.wiki Thu Dec 05 17:58:12 2019 +0000 +++ b/DrawnMapFormat.wiki Thu Dec 05 18:11:15 2019 +0000 @@ -23,14 +23,16 @@ … where *width* defines `(width * 10) + 6` pixels width line to draw. -Second and further points of polyline have 8th bit of *flags* unset, the content of others are ignored for those. +Second and further points of polyline have the start bit in `flags` unset, the content of others are ignored for those. -A polyline begins when a point with the 8th bit in flags was set. Subsequent points will extend the line as long the “start” bit of those is not set. A new line starts when another point appears with the “start” bit being set. A single-point polyline defines a circle. +A polyline begins when a point with the start bit was set. Subsequent points will extend this line as long the “start” bit of those is not set. A new line starts when another point appears with the “start” bit being set. + +A single-point polyline defines a circle. === Special points === -The file format supports special points. Special points are points that are not actually drawn but used to store coordinates alongside arbitrary values. Points are considered special if the first point in the file does not have the “start” bit set. If this is the case, all points up until the first point with the “start” bit set are considered special. The first point with the “start” bit will then mark the start of the first “real” line, as usual. +The file format supports special points. Special points are points that are not actually drawn but used to store coordinates and arbitrary values. Points are considered special if the first point in the file does not have the “start” bit set. If this is the case, all points up until the first point with the “start” bit set are considered special. The first point with the “start” bit will then mark the start of the first “real” line, as usual. -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. +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 for data storage. When Hedgewars loads a drawn map with special points inside, `onSpecialPoint` is called for each special point.