diff options
author | frosch <frosch@openttd.org> | 2008-01-30 17:22:06 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-01-30 17:22:06 +0000 |
commit | ccb13bdd52dd8a0b0a6eebbb6222ef56aa6e9837 (patch) | |
tree | 834594acaf672bdbcf810b84c3e44cbd20b7e2fe /src | |
parent | 1268a70466a4dd16a8af5f191c3aeba41dae286f (diff) | |
download | openttd-ccb13bdd52dd8a0b0a6eebbb6222ef56aa6e9837.tar.xz |
(svn r12020) -Documentation: Correct description of TropicZone.
Diffstat (limited to 'src')
-rw-r--r-- | src/landscape.cpp | 2 | ||||
-rw-r--r-- | src/terraform_gui.cpp | 2 | ||||
-rw-r--r-- | src/tile_type.h | 15 | ||||
-rw-r--r-- | src/tree_cmd.cpp | 2 |
4 files changed, 15 insertions, 6 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp index 74161c7b8..8745fa19f 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -636,7 +636,7 @@ void InitializeLandscape() for (x = 0; x < maxx; x++) { MakeClear(sizex * y + x, CLEAR_GRASS, 3); SetTileHeight(sizex * y + x, 0); - SetTropicZone(sizex * y + x, TROPICZONE_INVALID); + SetTropicZone(sizex * y + x, TROPICZONE_NORMAL); ClearBridgeMiddle(sizex * y + x); } MakeVoid(sizex * y + x); diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index b0d8cfee5..858aa85bc 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -56,7 +56,7 @@ static void GenerateDesertArea(TileIndex end, TileIndex start) _generating_world = true; BEGIN_TILE_LOOP(tile, size_x, size_y, TileXY(sx, sy)) { if (GetTileType(tile) != MP_WATER) { - SetTropicZone(tile, (_ctrl_pressed) ? TROPICZONE_INVALID : TROPICZONE_DESERT); + SetTropicZone(tile, (_ctrl_pressed) ? TROPICZONE_NORMAL : TROPICZONE_DESERT); DoCommandP(tile, 0, 0, NULL, CMD_LANDSCAPE_CLEAR); MarkTileDirtyByTile(tile); } diff --git a/src/tile_type.h b/src/tile_type.h index e954aa1fb..2d46a74d5 100644 --- a/src/tile_type.h +++ b/src/tile_type.h @@ -41,11 +41,20 @@ enum TileType { /** * Additional infos of a tile on a tropic game. * - * Each non-water tile in a tropic game is either a rainforest tile or a - * desert one. + * The tropiczone is not modified during gameplay. It mainly affects tree growth. (desert tiles are visible though) + * + * In randomly generated maps: + * TROPICZONE_DESERT: Generated everywhere, if there is neither water nor mountains (TileHeight >= 4) in a certain distance from the tile. + * TROPICZONE_RAINFOREST: Genereated everywhere, if there is no desert in a certain distance from the tile. + * TROPICZONE_NORMAL: Everywhere else, i.e. between desert and rainforest and on sea (if you clear the water). + * + * In scenarios: + * TROPICZONE_NORMAL: Default value. + * TROPICZONE_DESERT: Placed manually. + * TROPICZONE_RAINFOREST: Placed if you plant certain rainforest-trees. */ enum TropicZone { - TROPICZONE_INVALID = 0, ///< Invalid tropiczone-type + TROPICZONE_NORMAL = 0, ///< Normal tropiczone TROPICZONE_DESERT = 1, ///< Tile is desert TROPICZONE_RAINFOREST = 2, ///< Rainforest tile }; diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index 7fc9c133c..890243ed6 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -58,7 +58,7 @@ static TreeType GetRandomTreeType(TileIndex tile, uint seed) case LT_TROPIC: switch (GetTropicZone(tile)) { - case TROPICZONE_INVALID: return (TreeType)(seed * TREE_COUNT_SUB_TROPICAL / 256 + TREE_SUB_TROPICAL); + case TROPICZONE_NORMAL: return (TreeType)(seed * TREE_COUNT_SUB_TROPICAL / 256 + TREE_SUB_TROPICAL); case TROPICZONE_DESERT: return (TreeType)((seed > 12) ? TREE_INVALID : TREE_CACTUS); default: return (TreeType)(seed * TREE_COUNT_RAINFOREST / 256 + TREE_RAINFOREST); } |