diff -r 5a8b295aa345 -r 4cc327ad39d5 src/tree_cmd.cpp --- a/src/tree_cmd.cpp Tue Mar 27 23:27:27 2007 +0000 +++ b/src/tree_cmd.cpp Sat Jun 02 19:59:29 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 += _price.build_trees * 2; break; @@ -314,7 +317,7 @@ struct TreeListEnt { SpriteID image; SpriteID pal; - byte x,y; + byte x, y; }; static void DrawTile_Trees(TileInfo *ti) @@ -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 */ @@ -645,7 +648,7 @@ /* not used */ } -static uint32 GetTileTrackStatus_Trees(TileIndex tile, TransportType mode) +static uint32 GetTileTrackStatus_Trees(TileIndex tile, TransportType mode, uint sub_mode) { return 0; }