summaryrefslogtreecommitdiff
path: root/src/tree_cmd.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-11-10 01:17:15 +0000
committerbelugas <belugas@openttd.org>2007-11-10 01:17:15 +0000
commitf55fdfb7c42b2e2e39b165fd17f7671e14516303 (patch)
tree07b6a8f97a15f768d33fc0b7a3405373f3745b3b /src/tree_cmd.cpp
parent3a84801f5563ca73c47c56f9682582abe990abb7 (diff)
downloadopenttd-f55fdfb7c42b2e2e39b165fd17f7671e14516303.tar.xz
(svn r11399) -Feature(ette): transparency settings can now be saved and thus remembered.
-Codechange: Wrap all transparency settings in accessors, hiding the implementation -Change: Clicking "transparent building" menu will toggle Houses And Trees only. The other options can be used in the transparency gui. Initial patch by Smatz (FS#1349), with some rework by BigBB and your humble servant.
Diffstat (limited to 'src/tree_cmd.cpp')
-rw-r--r--src/tree_cmd.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp
index a901143a3..3e53fbee7 100644
--- a/src/tree_cmd.cpp
+++ b/src/tree_cmd.cpp
@@ -20,6 +20,7 @@
#include "sound.h"
#include "variables.h"
#include "genworld.h"
+#include "transparency.h"
/**
* List of tree placer algorithm.
@@ -427,7 +428,7 @@ static void DrawTile_Trees(TileInfo *ti)
StartSpriteCombine();
- if (!HASBIT(_transparent_opt, TO_TREES) || !_patches.invisible_trees) {
+ if (!IsTransparencySet(TO_TREES) || !_patches.invisible_trees) {
TreeListEnt te[4];
uint i;
@@ -460,7 +461,7 @@ static void DrawTile_Trees(TileInfo *ti)
if (tep == NULL) break;
- AddSortableSpriteToDraw(tep->image, tep->pal, ti->x + tep->x, ti->y + tep->y, 16 - tep->x, 16 - tep->y, 0x30, z, HASBIT(_transparent_opt, TO_TREES), -tep->x, -tep->y);
+ AddSortableSpriteToDraw(tep->image, tep->pal, ti->x + tep->x, ti->y + tep->y, 16 - tep->x, 16 - tep->y, 0x30, z, IsTransparencySet(TO_TREES), -tep->x, -tep->y);
tep->image = 0;
}
}