From 18b98afabdc04874942b451b281ad28be967d1ae Mon Sep 17 00:00:00 2001
From: rubidium
Date: Sun, 21 Sep 2014 11:20:29 +0000
Subject: (svn r26877) -Update: documentation about the map array
---
docs/landscape.html | 92 +++++++++++++++++++++++-------------------------
docs/landscape_grid.html | 79 +++++++++++++++++++++++++++--------------
2 files changed, 98 insertions(+), 73 deletions(-)
diff --git a/docs/landscape.html b/docs/landscape.html
index abf01c9d8..2101ea965 100644
--- a/docs/landscape.html
+++ b/docs/landscape.html
@@ -15,20 +15,60 @@
For a graphical representation of the tile-layout have a look at
Landscape grid page.
- Eight attributes (counting "type_height") hold the informations about a tile.
+
Nine attributes (counting "type" and
+ "height") hold the informations about a tile.
These attributes are referred to as
- "type_height",
+ "type",
+ "height",
"m1", "m2",
"m3", "m4",
"m5", "m6"
and "m7".
The most important value is the class of a tile, stored in the upper 4 bits
- of the type_height attribute. The lower 4 bits are used to encode the height and
- slope data.
+ of the type attribute.
Frequently repeating patterns:
+ - type
+
+ -
+
+ Bits 7..4:
+
+ The tile type. |
+ 00 | Ground |
+ 01 | Railway tracks |
+ 02 | Roads |
+ 03 | Town building |
+ 04 | Trees |
+ 05 | Station tiles |
+ 06 | Water |
+ 07 | Void |
+ 08 | Industries |
+ 09 | Tunnel / bridge |
+ 0A | Objects |
+
+
+ Bits 3..2:
+
+ Presence and direction of bridge above. |
+ 00 | no bridge |
+ 01 | Axis X (North-East) |
+ 02 | Axis Y (South-West) |
+
+ -
+
+ Bits 1..0:
+
+ Only meaningfull in tropic climate. It contains the definition of the available zones |
+ 00 | normal |
+ 01 | desert |
+ 02 | rain forest |
+
+ In any other climate these 2 bits are theoretically free of use, however using them does not seem useful.
+
+
- m1
- - m6
-
- -
-
- Bits 7..6:
-
- Presence and direction of bridge above, for tiles that support this. |
- 00 | no bridge |
- 01 | Axis X (North-East) |
- 02 | Axis Y (South-West) |
-
- Some tiles, such as houses do not support bridges over them and use these bits for other purposes.
-
- -
-
- Bits 1..0:
-
- Only meaningfull in tropic climate. It contains the definition of the available zones |
- 00 | normal |
- 01 | desert |
- 02 | rain forest |
-
- In any other climate these 2 bits are theoretically free of use, however using them does not seem useful.
-
-
-
- m7:
Animation frame/state. Used for houses, industries, objects and stations.
@@ -196,9 +210,7 @@
- - m6 bits 7..6 : Possibility of a bridge above, in the direction specified
- m6 bits 4..2: type of hedge on NW border of the tile
- - m6 bits 1..0 : Tropic zone definition
@@ -510,8 +522,6 @@
m5 bit 4: pbs reservation state
- m6 bits 7..6 : Possibility of a bridge above, in the direction specified
- m6 bits 1..0 : Tropic zone definition
@@ -665,8 +675,6 @@
- m6 bits 7..6 : Possibility of a bridge above, in the direction specified
- m6 bits 1..0 : Tropic zone definition
@@ -713,7 +721,6 @@
bits 7..2 : lift position (for houses type 04 and 05)
- bits 1..0 : tropic zone specifier
m7 :
@@ -835,7 +842,6 @@
- m6 bits 1..0 : Tropic zone definition
@@ -969,7 +975,6 @@
m6 bits 5..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint)
m6 bit 2: pbs reservation state for railway stations/waypoints
- m6 bits 1..0 : Tropic zone definition
m7 bits 4..0: owner of road (road stops)
m7 bits 7..6: present road types (road stops)
m7: animation frame (railway stations/waypoints, airports)
@@ -1082,8 +1087,6 @@
- m6 bits 7..6 : Possibility of a bridge above, in the direction specified
- m6 bits 1..0 : Tropic zone definition
@@ -1101,7 +1104,7 @@
8 |
- Industry tile |
+ Industries |
|
@@ -1425,7 +1428,6 @@
m6 bits 5..3: random triggers (NewGRF)
m6 bit 2: bit 8 of type (see m5)
- m6 bits 1..0 : Tropic zone definition
m7: animation frame
@@ -1576,8 +1578,6 @@
- m6 bits 7..6 : Possibility of a bridge above, in the direction specified
- m6 bits 1..0 : Tropic zone definition
m7 bits 4..0: owner of road
m7 bit 5 set = on snow or desert
m7 bits 7..6: present road types for road
@@ -1598,8 +1598,6 @@
m2: index into the array of objects, bits 0 to 15 (upper bits in m5)
m3: random bits
m5: index into the array of objects, bits 16 to 23 (lower bits in m2)
- m6 bits 7..6 : Possibility of a bridge above, in the direction specified
- m6 bits 1..0 : Tropic zone definition
m7: animation counter
diff --git a/docs/landscape_grid.html b/docs/landscape_grid.html
index e2f3c1f97..0e0e86e34 100644
--- a/docs/landscape_grid.html
+++ b/docs/landscape_grid.html
@@ -28,13 +28,14 @@ the array so you can quickly see what is used and what is not.
- - type_height - 8 bits in size, stores tile height (lower 4 bits) and tile class (upper 4 bits)
+ - type - 8 bits in size, tile class (bits 4..7), bridge (bits 2..3) tropic zone (bits 0..1, only valid in tropic climate)
+ - height - 8 bits in size, stores tile height
- m1 - 8 bits in size, used to identify the owner of that tile (eg piece of rail, bridge, etc.)
- m2 - 16 bits in size, used to identify the index of the given tile (object) in the (object-)array
- m3 - 8 bits in size, is used for general storage
- m4 - 8 bits in size, is used for general storage
- m5 - 8 bits in size, is used for general storage
- - m6 - 8 bits in size, special meaning : lower 2 bits only valid in tropic climate, upper 2 bits for bridges
+ - m6 - 8 bits in size, is used for general storage
- m7 - 8 bits in size, is used for general storage
@@ -42,7 +43,8 @@ the array so you can quickly see what is used and what is not.
class |
- type_height (8) |
+ type (8) |
+ height (8) |
m1 (8) |
m2 (16) |
m3 (8) |
@@ -55,6 +57,7 @@ the array so you can quickly see what is used and what is not.
bits |
7654 3210 |
7654 3210 |
+ 7654 3210 |
FEDC BA98 7654 3210 |
7654 3210 |
7654 3210 |
@@ -66,69 +69,75 @@ the array so you can quickly see what is used and what is not.
0 |
ground |
XXXX XXXX |
+ XXXX XXXX |
OOO~ ~~~~ |
OOOO OOOO OOOO OOOO |
XXXX OOOO |
XXXX XXOO |
XXXX XXXX |
- XXOX XXXX |
+ OOOX XXOO |
OOOO OOOO |
farmland |
-inherit- |
-inherit- |
+ -inherit- |
XXXX XXXX XXXX XXXX |
XXXX XXXX |
-inherit- |
-inherit- |
- XXOX XXXX |
+ OOOX XXOO |
OOOO OOOO |
1 |
rail |
XXXX XXXX |
+ XXXX XXXX |
OOOX XXXX |
OOOO XXXX OOOO OOOO |
OOOO XXXX |
OOOO XXXX |
XXXX XXXX |
- XXOO OOXX |
+ OOOO OOOO |
OOOO OOOO |
rail with signals |
-inherit- |
-inherit- |
+ -inherit- |
OOOO XXXX XXXX XXXX |
XXXX XXXX |
XXXX XXXX |
-inherit- |
- XXOO OOXX |
+ OOOO OOOO |
OOOO OOOO |
depot |
-inherit- |
-inherit- |
+ -inherit- |
XXXX XXXX XXXX XXXX |
OOOO XXXX |
OOOO XXXX |
XXOX OOXX |
- XXOO OOXX |
+ OOOO OOOO |
OOOO OOOO |
2 |
road |
XXXX XXXX |
+ XXXX XXXX |
OOOX XXXX |
XXXX XXXX XXXX XXXX |
XXXX XXXX |
OOOO OOOO |
XXXX XXXX |
- XXXX XOXX |
+ OOXX XOOO |
XXXO XXXX |
@@ -136,10 +145,11 @@ the array so you can quickly see what is used and what is not.
-inherit- |
-inherit- |
-inherit- |
+ -inherit- |
XXXX XXXX |
-inherit- |
XXXX OOOX |
- XXXX XOXX |
+ OOXX XOOO |
XXXX XXXX |
@@ -147,10 +157,11 @@ the array so you can quickly see what is used and what is not.
-inherit- |
-inherit- |
-inherit- |
+ -inherit- |
OOOO OOOO |
OOOO OOOO |
XXOO OOXX |
- XXOO OOXX |
+ OOOO OOOO |
XXXO OOOO |
@@ -158,35 +169,38 @@ the array so you can quickly see what is used and what is not.
house |
XXXX XXXX |
XXXX XXXX |
+ XXXX XXXX |
XXXX XXXX XXXX XXXX |
XXO~ ~~XX |
XXXX XXXX |
XXXX XXXX |
- XXXX XXXX |
+ XXXX XXOO |
XXXX XXXX |
4 |
trees |
XXXX XXXX |
+ XXXX XXXX |
OOO~ ~~~~ |
OOOO OOOX XXXX XXXX |
~~XX XXXX |
OOOO OOOO |
XXOO OXXX |
- OOOO OOXX |
+ OOOO OOOO |
OOOO OOOO |
5 |
rail station |
XXXX XXXX |
+ XXXX XXXX |
OXXX XXXX |
XXXX XXXX XXXX XXXX |
XXXX XXXX |
XXXX XXXX |
XXXX XXXX |
- OOXX XXXX |
+ OOXX XXOO |
XXXX XXXX |
@@ -199,16 +213,18 @@ the array so you can quickly see what is used and what is not.
-inherit- |
-inherit- |
-inherit- |
+ -inherit- |
road stop |
-inherit- |
-inherit- |
-inherit- |
+ -inherit- |
XXXX OOOO |
OOOO OOOO |
~~~~ ~XXX |
- OOXX XOXX |
+ OOXX XOOO |
XXOX XXXX |
@@ -216,10 +232,11 @@ the array so you can quickly see what is used and what is not.
-inherit- |
-inherit- |
-inherit- |
+ -inherit- |
OOOO OOOO |
OOOO OOOO |
~~~~ ~XXX |
- OOXX XOXX |
+ OOXX XOOO |
OOOO OOOO |
@@ -227,10 +244,11 @@ the array so you can quickly see what is used and what is not.
-inherit- |
-inherit- |
-inherit- |
+ -inherit- |
XXXX OOOO |
OOOO OOOO |
XXXX XXXX |
- OOXX XOXX |
+ OOXX XOOO |
XXXX XXXX |
@@ -238,10 +256,11 @@ the array so you can quickly see what is used and what is not.
-inherit- |
-inherit- |
-inherit- |
+ -inherit- |
OOOO OOOO |
OOOO OOOO |
~~~~ ~~~~ |
- OOXX XOXX |
+ OOXX XOOO |
OOOO OOOO |
@@ -249,68 +268,74 @@ the array so you can quickly see what is used and what is not.
-inherit- |
-inherit- |
-inherit- |
+ -inherit- |
OOOO OOOO |
OOOO OOOO |
~~~~ ~~~~ |
- OOXX XOXX |
+ OOXX XOOO |
OOOO OOOO |
6 |
sea, shore |
XXXX XXXX |
+ XXXX XXXX |
OXXX XXXX |
OOOO OOOO OOOO OOOO |
OOOO OOOO |
OOOO OOOO |
X~~X XXXX |
- XXOO OOXX |
+ OOOO OOOO |
OOOO OOOO |
canal, river |
-inherit- |
-inherit- |
+ -inherit- |
OOOO OOOO OOOO OOOO |
OOOO OOOO |
XXXX XXXX |
-inherit- |
- XXOO OOXX |
+ OOOO OOOO |
OOOO OOOO |
shipdepot |
-inherit- |
-inherit- |
+ -inherit- |
XXXX XXXX XXXX XXXX |
OOOO OOOO |
OOOO OOOO |
-inherit- |
- XXOO OOXX |
+ OOOO OOOO |
OOOO OOOO |
8 |
industry |
XXXX XXXX |
+ XXXX XXXX |
XXXO XXXX |
XXXX XXXX XXXX XXXX |
XXXX XXXX |
XXXX XXXX |
XXXX XXXX |
- OOXX XXXX |
+ OOXX XXOO |
XXXX XXXX |
9 |
tunnel entrance |
XXXX XXXX |
+ XXXX XXXX |
OOOX XXXX |
OOOO OOOO OOOO OOOO |
XXXX XXXX |
OOOO OOOO |
XOOX XXXX |
- XXOO OOXX |
+ OOOO OOOO |
XXXX XXXX |
@@ -321,19 +346,21 @@ the array so you can quickly see what is used and what is not.
-inherit- |
-inherit- |
-inherit- |
- XXXX XXXX |
+ -inherit- |
+ OOXX XXOO |
-inherit- |
A |
objects |
XXXX XXXX |
+ XXXX XXXX |
OXXX XXXX |
XXXX XXXX XXXX XXXX |
XXXX XXXX |
OOOO OOOO |
XXXX XXXX |
- XXOO OOXX |
+ OOOO OOOO |
XXXX XXXX |
--
cgit v1.2.3-54-g00ecf