Darklands world map
Files with this format: "darkland.map
".
Contains the wilderness map, with everything except for
the dynamically generated locations
(all non-cities listed in darkland.loc
).
The map is constructed from tiles contained in two .pic
files:
"mapicons.pic
" and "mapicon2.pic
".
Table of Contents
Offsets
Offsets
-
0x00
:
max_x_coord:
word = 0x147
-
Number of locations.
- This word is stored high-byte first
-
0x02
:
max_y_coord:
word = 0x3a3
-
Number of locations.
- This word is stored high-byte first
-
0x04
:
row_offsets:
array[ max_y_coord ] of word
-
File offsets to row data.
-
[next]:
map_data:
array[ max_y_coord ] of array[ ] of byte
-
Map data.
-
This data is RLE compressed: each byte represents 1-7 map tiles.
-
The top three bits are the repeat count,
and are always at least one (
001xxxxx
).
-
The next bit is the palette set:
0
for "mapicons.pic
",
1
for "mapicon2.pic
".
-
The four least bits indicate which row the tile comes from in the palette set.
-
Which column the map tile comes from depends on the four diagonally adjacent tiles:
the 1's bit comes from the northwest tile's row's 8's bit;
the 2's bit comes from the northeast tile's row's 4's bit;
the 4's bit comes from the southwest tile's row's 2's bit;
the 8's bit comes from the southeast tile's row's 1's bit.