From 39277404a22c6360ff9c6e4cc114e112e839c82f Mon Sep 17 00:00:00 2001
From: Jonathan G Rennison The landscape type, this currently only has the value 0: rocky tiles. Miscellaneous ground info
+ tile_height 0..255 Height of the lowest corner of the tile tile_hash 0..4294967295 Hash value derived from the coordinates of the tile, suitable for pseudo-randomising graphics
+ landscape_type NEW_LANDSCAPE_TYPE_XXX Landscape type
XXX = ROCKS
+ snow_present 0 or 1 Snow is present on this tile, at any density.This requires new_landscape, version 2. ground_density 0..3 Ground density (if snow_present is 1, this is the snow density).This requires new_landscape, version 2.
Variables that require one or more parameters:
diff --git a/docs/newgrf-newlandscape.html b/docs/newgrf-newlandscape.html
index e21e81f712..ed9b2367cc 100644
--- a/docs/newgrf-newlandscape.html
+++ b/docs/newgrf-newlandscape.html
@@ -84,6 +84,7 @@
42 newlandscape_tile_height Tile Height 43 newlandscape_tile_hash Tile Hash
+ 44 newlandscape_landscape_type Landscape Type 45 newlandscape_ground_info Ground info
@@ -110,6 +111,18 @@
60 newlandscape_land_info_nearby_tiles Land info of nearby tiles Landscape type (44, or mappable variable: newlandscape_landscape_type)
Ground info (45, or mappable variable: newlandscape_ground_info)
+
+
+
+ Bits Values Meaning
+ 0 - 3 0..3 Ground density (if snow is present, this is the snow density)
+ 4 0 or 1 Snow is present on this tile, at any density
+ The remaining bits are reserved for future use and should be masked.
+ This requires new_landscape, version 2.
This has the same value as industry tile (feature 9) variable 60.
diff --git a/src/newgrf_extension.cpp b/src/newgrf_extension.cpp index fde7c3a597..161c3ba8e1 100644 --- a/src/newgrf_extension.cpp +++ b/src/newgrf_extension.cpp @@ -157,6 +157,7 @@ extern const GRFVariableMapDefinition _grf_action2_remappable_variables[] = { GRFVariableMapDefinition(GSF_NEWLANDSCAPE, 0x42, "newlandscape_tile_height"), GRFVariableMapDefinition(GSF_NEWLANDSCAPE, 0x43, "newlandscape_tile_hash"), GRFVariableMapDefinition(GSF_NEWLANDSCAPE, 0x44, "newlandscape_landscape_type"), + GRFVariableMapDefinition(GSF_NEWLANDSCAPE, 0x45, "newlandscape_ground_info"), GRFVariableMapDefinition(GSF_NEWLANDSCAPE, 0x60, "newlandscape_land_info_nearby_tiles"), GRFVariableMapDefinition(), }; diff --git a/src/newgrf_newlandscape.cpp b/src/newgrf_newlandscape.cpp index 2301c01f2f..b394487368 100644 --- a/src/newgrf_newlandscape.cpp +++ b/src/newgrf_newlandscape.cpp @@ -49,6 +49,9 @@ std::vector