src/tree_cmd.cpp
branchgamebalance
changeset 9908 0fa543611bbe
parent 9906 6f41b8713b65
child 9910 0b2aebc8283e
--- a/src/tree_cmd.cpp	Thu Apr 19 14:48:10 2007 +0000
+++ b/src/tree_cmd.cpp	Tue Jun 12 11:56:35 2007 +0000
@@ -1,5 +1,7 @@
 /* $Id$ */
 
+/** @file tree_cmd.cpp */
+
 #include "stdafx.h"
 #include "openttd.h"
 #include "bridge_map.h"
@@ -53,7 +55,7 @@
 	if (tree != TREE_INVALID) {
 		MakeTree(tile, tree, GB(r, 22, 2), min(GB(r, 16, 3), 6), TREE_GROUND_GRASS, 0);
 
-		// above snowline?
+		/* above snowline? */
 		if (_opt.landscape == LT_ARCTIC && GetTileZ(tile) > GetSnowLine()) {
 			SetTreeGroundDensity(tile, TREE_GROUND_SNOW_DESERT, 3);
 			SetTreeCounter(tile, (TreeGround)GB(r, 24, 3));
@@ -207,6 +209,7 @@
 
 /** Plant a tree.
  * @param tile start tile of area-drag of tree plantation
+ * @param flags type of operation
  * @param p1 tree type, -1 means random.
  * @param p2 end tile of area-drag
  */
@@ -240,7 +243,7 @@
 
 			switch (GetTileType(tile)) {
 				case MP_TREES:
-					// no more space for trees?
+					/* no more space for trees? */
 					if (_game_mode != GM_EDITOR && GetTreeCount(tile) == 3) {
 						msg = STR_2803_TREE_ALREADY_HERE;
 						continue;
@@ -250,7 +253,7 @@
 						AddTreeCount(tile, 1);
 						MarkTileDirtyByTile(tile);
 					}
-					// 2x as expensive to add more trees to an existing tile
+					/* 2x as expensive to add more trees to an existing tile */
 					cost += _eco->GetPrice(CEconomy::BUILD_TREES) * 2;
 					break;
 
@@ -365,7 +368,7 @@
 
 	StartSpriteCombine();
 
-	if (!(_display_opt & DO_TRANS_BUILDINGS) || !_patches.invisible_trees) {
+	if (!HASBIT(_transparent_opt, TO_TREES) || !_patches.invisible_trees) {
 		TreeListEnt te[4];
 		uint i;
 
@@ -374,7 +377,7 @@
 		do {
 			SpriteID image = s[0].sprite + (--i == 0 ? GetTreeGrowth(ti->tile) : 3);
 			SpriteID pal;
-			if (_display_opt & DO_TRANS_BUILDINGS) {
+			if (HASBIT(_transparent_opt, TO_TREES)) {
 				SETBIT(image, PALETTE_MODIFIER_TRANSPARENT);
 				pal = PALETTE_TO_TRANSPARENT;
 			} else {
@@ -622,7 +625,7 @@
 		MakeTree(tile, tree, 0, 0, ct == CLEAR_ROUGH ? TREE_GROUND_ROUGH : TREE_GROUND_GRASS, 0);
 	}
 
-	// byte underflow
+	/* byte underflow */
 	if (--_trees_tick_ctr != 0) return;
 
 	/* place a tree at a random spot */