summaryrefslogtreecommitdiff
path: root/src/unmovable_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
commitf26a591e6c4d561fdd2cb129e4c1a4750739f8d5 (patch)
tree07b6a8f97a15f768d33fc0b7a3405373f3745b3b /src/unmovable_cmd.cpp
parent466193c5742761d5e45ca5b4e34e3cab8e62affc (diff)
downloadopenttd-f26a591e6c4d561fdd2cb129e4c1a4750739f8d5.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/unmovable_cmd.cpp')
-rw-r--r--src/unmovable_cmd.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp
index b5b9fe4c6..f711e8aab 100644
--- a/src/unmovable_cmd.cpp
+++ b/src/unmovable_cmd.cpp
@@ -25,6 +25,7 @@
#include "genworld.h"
#include "bridge.h"
#include "autoslope.h"
+#include "transparency.h"
/** Destroy a HQ.
* During normal gameplay you can only implicitely destroy a HQ when you are
@@ -129,7 +130,7 @@ static void DrawTile_Unmovable(TileInfo *ti)
AddSortableSpriteToDraw(
dtus->image, PAL_NONE, ti->x | dtus->subcoord_x, ti->y | dtus->subcoord_y,
dtus->width, dtus->height, dtus->z_size, ti->z,
- HASBIT(_transparent_opt, TO_STRUCTURES)
+ IsTransparencySet(TO_STRUCTURES)
);
break;
}
@@ -140,7 +141,7 @@ static void DrawTile_Unmovable(TileInfo *ti)
DrawGroundSprite(SPR_CONCRETE_GROUND, PAL_NONE);
- AddSortableSpriteToDraw(SPR_STATUE_COMPANY, PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)), ti->x, ti->y, 16, 16, 25, ti->z, HASBIT(_transparent_opt, TO_STRUCTURES));
+ AddSortableSpriteToDraw(SPR_STATUE_COMPANY, PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)), ti->x, ti->y, 16, 16, 25, ti->z, IsTransparencySet(TO_STRUCTURES));
break;
case UNMOVABLE_OWNED_LAND:
@@ -172,7 +173,7 @@ static void DrawTile_Unmovable(TileInfo *ti)
ti->x + dtss->delta_x, ti->y + dtss->delta_y,
dtss->size_x, dtss->size_y,
dtss->size_z, ti->z + dtss->delta_z,
- HASBIT(_transparent_opt, TO_STRUCTURES)
+ IsTransparencySet(TO_STRUCTURES)
);
}
break;