# HG changeset patch # User frosch # Date 1201713726 0 # Node ID 73371bb829229a1348f7a656b4d76bb2d0d26aa5 # Parent 64c872ab3ed3aca102e65c14fea0b6b2e5a36793 (svn r12020) -Documentation: Correct description of TropicZone. diff -r 64c872ab3ed3 -r 73371bb82922 src/landscape.cpp --- a/src/landscape.cpp Wed Jan 30 10:27:45 2008 +0000 +++ b/src/landscape.cpp Wed Jan 30 17:22:06 2008 +0000 @@ -636,7 +636,7 @@ 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 -r 64c872ab3ed3 -r 73371bb82922 src/terraform_gui.cpp --- a/src/terraform_gui.cpp Wed Jan 30 10:27:45 2008 +0000 +++ b/src/terraform_gui.cpp Wed Jan 30 17:22:06 2008 +0000 @@ -56,7 +56,7 @@ _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 -r 64c872ab3ed3 -r 73371bb82922 src/tile_type.h --- a/src/tile_type.h Wed Jan 30 10:27:45 2008 +0000 +++ b/src/tile_type.h Wed Jan 30 17:22:06 2008 +0000 @@ -41,11 +41,20 @@ /** * 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 -r 64c872ab3ed3 -r 73371bb82922 src/tree_cmd.cpp --- a/src/tree_cmd.cpp Wed Jan 30 10:27:45 2008 +0000 +++ b/src/tree_cmd.cpp Wed Jan 30 17:22:06 2008 +0000 @@ -58,7 +58,7 @@ 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); }