diff --git a/docs/landscape.html b/docs/landscape.html
index bf3208c3a1..226aa31b47 100644
--- a/docs/landscape.html
+++ b/docs/landscape.html
@@ -38,8 +38,8 @@
Bits 1..0 :
- Only meaningfull in tropic climate. It contains the definition of the two available zones |
- 00 | invalid zone |
+ Only meaningfull in tropic climate. It contains the definition of the available zones |
+ 00 | normal |
01 | desert |
02 | rain forest |
@@ -79,78 +79,92 @@
- m1: owner of the tile (normally 10)
+ - m2: see fields
+ - m3 bits 3..0: see fields
- m4 bits 7..5: type of hedge on the SW border of the tile (1 through 6, or 0=none)
- m4 bits 4..2: same as 7..5, but for the SE border
- m5 bits 7..5: update counter, incremented on every periodic processing for tile types,
other than 03, 07, 0B, 10 and above.
on wraparound, the tile is updated (for fields, the type of fields in m3 is increased, for other types the tile type in m5 is increased).
For snow and desert, these bits are not used, tile is updated on every periodic processing.
- - m5 bits 4..0: tile type:
+
- m5 bits 4..2: tile type:
- 00 |
- bare land |
+ 0 |
+ bare land / grass |
- 01 |
- 1/3 grass |
+ 1 |
+ rough land (density must be 3) |
- 02 |
- 2/3 grass |
+ 2 |
+ rocks (density must be 3) |
- 03 |
- full grass |
+ 3 |
+ fields (density must be 3)
+
+ - m2: index into the array of industries (farms), INVALID_INDUSTRY (0xFFFF) if farm has been removed
+ - m3 bits 3..0: field type (legal values: 0 through 9)
+
+ |
- 07 |
- rough land |
+ 4 |
+ snow |
- 0B |
- rocks |
+ 5 |
+ desert (density must be 1 or 3) |
+
+
+
+ - m5 bits 1..0: density:
+
+
+ 0 |
+ bare land |
+ |
+ |
+ |
+ 1/4 snow |
+ |
- 0F |
- fields; type of fields in m3 bits 3..0 (legal values: 0 through 9)
- m2: Index into the array of industries (farms), INVALID_INDUSTRY (0xFFFF) if farm has been removed |
+ 1 |
+ 1/3 grass |
+ |
+ |
+ |
+ 2/4 snow; |
+ 1/2 desert |
- 10 |
- 1/4 snow |
+ 2 |
+ 2/3 grass |
+ |
+ |
+ |
+ 3/4 snow |
+ |
- 11 |
- 2/4 snow |
-
-
-
- 12 |
- 3/4 snow |
-
-
-
- 13 |
- full snow |
-
-
-
- 15 |
- partial desert |
-
-
-
- 17 |
- full desert |
+ 3 |
+ full grass; |
+ rough land; |
+ rocks; |
+ fields; |
+ full snow; |
+ full desert |
@@ -168,105 +182,108 @@
|
+ - m1: owner of the tile
+ - m2: see waypoint and signals
+ - m3 bits 7..4: see signals
+ - m3 bits 3..0 = track type:
+
+
+ 0 |
+ conventional railway |
+
+
+
+ 1 |
+ electrified railway |
+
+
+
+ 2 |
+ monorail |
+
+
+
+ 3 |
+ maglev |
+
+
+
+ - m4 bits 7..4: see signals
+ - m4 bits 3..0: Ground type (values with fences are not valid for depots and checkpoints)
+
+
+ 0 |
+ on bare land |
+
+
+
+ 1 |
+ on grass, no fences |
+
+
+
+ 2 |
+ fence on the NW side |
+
+
+
+ 3 |
+ fence on the SE side |
+
+
+
+ 4 |
+ fences on the NW and SE sides |
+
+
+
+ 5 |
+ fence on the NE side |
+
+
+
+ 6 |
+ fence on the SW side |
+
+
+
+ 7 |
+ fences on the NE and SW sides |
+
+
+
+ 8 |
+ fence on the E side (track in the W corner) |
+
+
+
+ 9 |
+ fence on the W side (track in the E corner) |
+
+
+
+ A |
+ fence on the S side (track in the N corner) |
+
+
+
+ B |
+ fence on the N side (track in the S corner) |
+
+
+
+ C |
+ on snow or desert |
+
+
+
+ D |
+ on grass with fence and shore or water on the free halftile |
+
+
+
- m5 bit 7 clear: railway track
- - m1: owner of the track
- - m3 bits 3..0 = track type:
-
-
- 0 |
- conventional railway |
-
-
-
- 1 |
- electrified railway |
-
-
-
- 2 |
- monorail |
-
-
-
- 3 |
- maglev |
-
-
-
- - m4 bits 3..0:
-
-
- 0 |
- on bare land |
-
-
-
- 1 |
- on grass, no fences |
-
-
-
- 2 |
- fence on the NW side |
-
-
-
- 3 |
- fence on the SE side |
-
-
-
- 4 |
- fences on the NW and SE sides |
-
-
-
- 5 |
- fence on the NE side |
-
-
-
- 6 |
- fence on the SW side |
-
-
-
- 7 |
- fences on the NE and SW sides |
-
-
-
- 8 |
- fence on the E side (track in the W corner) |
-
-
-
- 9 |
- fence on the W side (track in the E corner) |
-
-
-
- A |
- fence on the S side (track in the N corner) |
-
-
-
- B |
- fence on the N side (track in the S corner) |
-
-
-
- C |
- on snow or desert |
-
-
-
- D |
- on grass with fence and shore or water on the free halftile |
-
-
-
- m5 bits 5..0: track layout: bit set = track present:
-
-
- - m5 bit 7 set: railway depot / checkpoints
-
- - m1: owner of the depot / checkpoint
- - m2: For waypoints, index into the array of waypoints.
- - m3 bits 3..0 = track type
- - m4 bits 3..0 = ground type, as per m4 bits 3..0 for railway tiles.
- - m5 value C0..C3: railway depot
+
- m5 bit 6 set = with signals:
+ There are at most 4 signals on a tile. The signals 0..3 belong to the directions:
- m5 bits 1..0 |
+ |
+ Track 0 (X) |
+ Track 1 (Y) |
+ Track 2 (north) |
+ Track 3 (south) |
+ Track 4 (west) |
+ Track 5 (east) |
- direction: exit towards: |
+ Signal 0 |
+ |
+ |
+ |
+ west |
+ |
+ south |
- 00 |
- NE |
+ Signal 1 |
+ |
+ |
+ |
+ east |
+ |
+ north |
- 01 |
- SE |
+ Signal 2 |
+ south-west |
+ north-west |
+ west |
+ |
+ south |
+ |
- 02 |
- SW |
-
-
-
- 03 |
- NW |
+ Signal 3 |
+ north-east |
+ south-east |
+ east |
+ |
+ north |
+ |
+
+ - m2 bit 6: Signal 0 and 1: set = semaphore signals, clear = light signals
+ - m2 bit 2: Signal 2 and 3: set = semaphore signals, clear = light signals
+ - m2 bits 5..4: type of signal 0 and 1 (same values as m2 bits 1..0)
+ - m2 bits 1..0: type of signal 2 and 3
+
+
+ 00: |
+ normal signals |
+
+
+
+ 01: |
+ pre-signals |
+
+
+
+ 10: |
+ exit-signals |
+
+
+
+ 11: |
+ combo-signals |
+
+
+
+
+ - m3 bits 7..4: bit set = signal 3..0 present
+ - m4 bits 7..4: bit clear = signal 3..0 shows red
+
- - m5 value 80..81: checkpoint
+
+
+ - m5 bit 7 set, bit 6 clear: checkpoint
+
+ - m2: index into the array of waypoints.
+ - m5 bit 0:
- bit 0 |
-
-
-
- clear |
+ 0 |
in X direction |
- set |
+ 1 |
in Y direction |
-
- - m5 bit 6 set = with signals:
-
- - m4 bits 7..4: bit clear = signal shows red; same bits as in m3
- - m2 bit 2 (6): set = semaphore signals, clear = light signals (lower and right tracks)
- - m2 bits 1..0 (5..4): type of signal (lower and right tracks)
-
+
+ - m5 bit 7 set, bit 6 set: railway depot
+
+ - m5 bits 1..0: exit towards
+
- 00: |
- normal signals |
+ 0 |
+ NE |
- 01: |
- pre-signals |
+ 1 |
+ SE |
- 10: |
- exit-signals |
+ 2 |
+ SW |
- 11: |
- combo-signals |
+ 3 |
+ NW |
-
- - m3 bits 7..4: bit set = signal present:
-
- - For track in the X direction:
-
-
- bit 6: |
- signal in the SW direction |
-
-
-
- bit 7: |
- signal in the NE direction |
-
-
-
-
- - For track in the Y direction:
-
-
- bit 6: |
- signal in the NW direction |
-
-
-
- bit 7: |
- signal in the SE direction |
-
-
-
-
- - For tracks in the W-E direction:
-
-
- bit 4: |
- signal in the W direction on the track in the S corner |
-
-
-
- bit 5: |
- signal in the E direction on the track in the S corner |
-
-
-
- bit 6: |
- signal in the W direction on the track in the N corner |
-
-
- bit 7: |
- signal in the E direction on the track in the N corner |
-
-
-
-
- - For tracks in the N-S direction:
-
-
- bit 4: |
- signal in the S direction on the track in the E corner |
-
-
-
- bit 5: |
- signal in the N direction on the track in the E corner |
-
-
-
- bit 6: |
- signal in the S direction on the track in the W corner |
-
-
-
- bit 7: |
- signal in the N direction on the track in the W corner |
-
-
-
-
-
- m6 bits 7..6 : Possibility of a bridge above, in the direction specified
@@ -480,11 +463,28 @@
|
- - m5 bits 7..6 clear: road
+
- m3 bit 7 set = on snow or desert
+ - m7 bits 7..5: present road types
+
+
+ bit 0 |
+ normal road |
+
+
+
+ bit 1 |
+ tram |
+
+
+
+ bit 2 |
+ reserved |
+
+
+
+ - m5 bits 7 clear: road or level-crossing
- - m1: owner of the road type #1
- m2: Index into the array of towns, 0 for non-town roads
- - m3 bit 7 set = on snow or desert
- m3 bits 6..4:
- - m3 bits 3..0: counter for the roadworks
- - m4 bits 3..0: road layout road type #1: bit set = road piece present:
-
-
- bit 0: |
- NW piece |
-
-
- bit 1: |
- SW piece |
-
-
- bit 2: |
- SE piece |
-
-
- bit 3: |
- NE piece |
-
-
+ - m5 bits 3..0: owner of road type 1 (tram); OWNER_NONE (10) is stored as OWNER_TOWN (0F)
+
- m7 bits 4..0: owner of road type 2 (reserved)
+
- m5 bit 6 clear: road
+
+ - m1: owner of the road type 0 (normal road)
+ - m3 bits 3..0: counter for the roadworks
+ - m4 bits 3..0: road layout road type 0 (normal road): bit set = road piece present:
+
+
+ bit 0: |
+ NW piece |
+
+
+ bit 1: |
+ SW piece |
+
+
+ bit 2: |
+ SE piece |
+
+
+ bit 3: |
+ NE piece |
+
+
+
+ - m4 bits 7..4: road layout road type 1 (tram)
+ - m6 bits 5..2: road layout road type 2 (reserved)
+ - m5 bits 5..4: bits to disallow vehicles to go a specific direction
+
+
+ bit 0: |
+ set = disallow driving in south-west or south-east direction |
+
+
+ bit 1: |
+ set = disallow driving in north-west or north-east direction |
+
+
+
+
- - m4 bits 7..4: road layout road type #2
-
- m5 bits 5..4: bits to disallow vehicles to go a specific direction
-
- m5 bits 3..0: owner of road type #2
-
- m6 bits 5..2: road layout road type #3
-
- m7 bits 7..5: road types
-
- m7 bits 4..0: owner of road type #3
+
- m5 bit 6 set: level crossing
+
+ - m1: owner of the railway track
+ - m3 bits 3..0: railway track type
+ - m4 bit 6: direction
+
+
+ 0 |
+ road in the X direction, rail in Y |
+
+
+ 1 |
+ road in the Y direction, rail in X |
+
+
+
+ - m4 bit 5: set if crossing lights are on
+ - m4 bits 4..0: owner of the road type 0 (normal road)
+
- m5 bit 7 set, bit 6 clear: road depot
- m1: owner of the depot
- - m3 bit 7 set = on snow or desert (not displayed, but set internally)
- - m5 bits 3..0 - direction: exit towards: 0 = NE, 1 = SE, 2 = SW, 3 = NW
- - m7 bits 7..5: road types
-
-
- - m5 bit 6 set, bit 7 clear: level crossing
-
- - m1: owner of the railway track
- - m2: Index into the array of towns, 0 for non-town roads
- - m3 bit 7 set = on snow or desert
- - m3 bits 6..4: 0 - on bare land, 1 - on grass, 2 or higher - paved
- - m3 bits 3..0: track type
- - m4 bit 6: clear - road in the X direction, set - road in the Y direction (railway track always perpendicular)
- - m4 bit 5: set if crossing lights are on
- - m4 bits 4..0: owner of the road type #1
- - m5 bits 3..0: owner of road type #2
-
- m7 bits 7..5: road types
-
- m7 bits 4..0: owner of road type #3
+
- m5 bits 3..0: exit towards:
+
+
+ 0 |
+ NE |
+
+
+
+ 1 |
+ SE |
+
+
+
+ 2 |
+ SW |
+
+
+
+ 3 |
+ NW |
+
+
+
- m6 bits 7..6 : Possibility of a bridge above, in the direction specified
@@ -585,12 +624,12 @@
- m1 : Random bits (newhouses)
- - m2 : index into the array of industries
+ - m2 : index into the array of towns
- m3 bit 7 :
- set : House is complete
- - m5 : age of House. Maximum been 255, which means 255 years and more
+ - m5 : year of house construction (relative to 1920); clamped to 0..255 (1920..2175)
- clear : House is in construction
@@ -601,8 +640,8 @@
- - m3 bit 6 : 9th bit of house type (m4), allowing 512 different types.
- - m3 bits 5..0 : triggers activated (newhouses)
+ - m3 bit 6 : bit 8 of house type (m4), allowing 512 different types.
+ - m3 bits 4..0 : triggers activated (newhouses)
- m4 : town building type (with m3[6] bit)
- m5 : see m3 bit 7
- m6 :
@@ -657,7 +696,8 @@
- m1: owner (normally 10)
- - m2 bits 5..4:
+
- m2 bits 7..6: ground density
+
- m2 bits 5..4: ground
@@ -667,12 +707,12 @@
1 |
- on rough land |
+ on rough land (density must be 3) |
2 |
- on snow or desert; m2 bits 7..6 - amount of snow or desert (for desert always set to 3 in TTD) |
+ on snow or desert |
@@ -747,7 +787,8 @@
- m1: owner of the station
- m2: index into the array of stations
- m3 bits 7..4: persistent random data for newstations
- - m3 bits 3..0: track type for railway stations, must be 0 for all the other stations
+ - m3 bits 3..0: track type for railway stations
+ - m3 bits 2..0: present road types for road stops
- m4: custom station id; 0 means standard graphics
- m5: graphics index (range from 0..255 for each station type):
@@ -780,24 +821,32 @@
- 00..03 |
- lorry loading area/truck station : exit towards:
+ | 00..05 |
+ road stops:
00 |
- NE |
+ exit towards NE |
01 |
- SE |
+ exit towards SE |
02 |
- SW |
+ exit towards SW |
03 |
- NW |
+ exit towards NW |
+
+
+ 04 |
+ drive through X |
+
+
+ 05 |
+ drive through Y |
|
@@ -836,7 +885,7 @@
- - m6 bits 3..5: the station type (rail, airport, truck, bus, oilrig, dock, buoy)
+ - m6 bits 5..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy)
- m6 bit 2: 1 when a drive through road stop is built over a town owned road, otherwise 0
- m6 bits 1..0 : Tropic zone definition
@@ -851,7 +900,9 @@
| |
- - m1: owner (for water and coasts normally 11)
+ - m1: owner (for sea, rivers, and coasts normally 11)
+ - m4: Owner of the water when ship depot
+ - m4: Random data for canal or river tiles
- m5: tile type:
- - m4: Owner of the water when ship depot
- - m4: Random data for canal or river tiles
- m6 bits 7..6 : Possibility of a bridge above, in the direction specified
- m6 bits 1..0 : Tropic zone definition
@@ -979,12 +1028,14 @@
- m1 bit 7: clear = under construction
- - m1 bits 4..2: construction counter, for buildings under construction incremented on every periodic tile processing
+ - m1 bits 3..2: construction counter, for buildings under construction incremented on every periodic tile processing
- m1 bits 1..0: stage of construction (3 = completed), incremented when the construction counter wraps around
the meaning is different for some animated tiles which are never under construction (types 01, 1E..20, 30, 58; see above)
- m2: index into the array of industries
+ - m3: animation state
+ - m4: animation loop
- m5: type (plus m6 bit 2):
(note: this is not the same as the industry type, which is stored in the array of industries)
@@ -1290,10 +1341,9 @@
| | |
+ - m6 bits 5..3: random triggers (NewGRF)
+ - m6 bit 2: bit 8 of type (see m5)
- m6 bits 1..0 : Tropic zone definition
- - m3: animation state
- - m4: animation loop
- - m6 bits 3..5: random triggers (NewGRF)
- m7: random bits (NewGRF)
|
@@ -1307,18 +1357,14 @@
|
- - m5 bits 7..4 clear: tunnel entrance/exit
-
- - m1: owner of the tunnel
- - m3 bits 3..0 = track type for railway tunnel, must be 0 for road tunnel
- - m4 bit 7 set = on snow or desert
- - m5 bits 3..2: 0 - railway tunnel, 1 - road tunnel
- - m5 bits 1..0 - direction: entrance towards: 0 = NE, 1 = SE, 2 = SW, 3 = NW
-
-
+ - m1: owner
+ - m2 bits 7..4: see bridge ramp
+ - m3 bits 3..0: track type for railway
+ - m3 bits 2..0: present road types for road
+ - m4 bit 7 set = on snow or desert
+ - m5 bits 7 clear: tunnel entrance/exit
- m5 bit 7 set: bridge ramp
- - m1: owner of the bridge
- m2 bits 7..4: bridge type:
@@ -1392,14 +1438,57 @@
200 |
tubular, steel |
+
+
+ B |
+ 320 |
+ tubular, steel |
+
+
+
+ C |
+ 380 |
+ tubular, silicon |
+
- - m3 bits 3..0 = type of track on the bridge, must be 0 for road bridge
- - m4 bit 7 set = on snow or desert
- - m5 bits 3..2: 0 - railway bridge, 1 - road bridge
- - m5 bits 1..0: DiagDirection onto the bridge
+ - m5 bits 3..2: transport type
+
+
+ 0 |
+ railway |
+
+
+
+ 1 |
+ road |
+
+
+ - m5 bits 1..0: direction onto the bridge / out of the tunnel
+
+
+ 0 |
+ NE |
+
+
+
+ 1 |
+ SE |
+
+
+
+ 2 |
+ SW |
+
+
+
+ 3 |
+ NW |
+
+
+
- m6 bits 7..6 : Possibility of a bridge above, in the direction specified
- m6 bits 1..0 : Tropic zone definition
@@ -1414,13 +1503,9 @@
|
- - m1 : owner of the object (for lighthouses and transmitters normally 10)
- - m2 :
-
- - for company statue (m5 = 02), TownID on which the statue is built in
-
-
- - m5 : tile type:
+
- m1: owner of the object (for lighthouses and transmitters normally 10)
+ - m2: see company statue
+
- m5: tile type:
00 |
@@ -1434,7 +1519,11 @@
02 |
- company statue |
+ company statue
+
+ - m2: TownID on which the statue is built in
+
+ |
diff --git a/docs/landscape_grid.html b/docs/landscape_grid.html
index 1bd02595c2..eb9ab8f820 100644
--- a/docs/landscape_grid.html
+++ b/docs/landscape_grid.html
@@ -6,6 +6,7 @@
OpenTTD Landscape Internals - #2
| | |