(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.
This commit is contained in:
belugas
2007-11-10 01:17:15 +00:00
parent 466193c574
commit f26a591e6c
25 changed files with 165 additions and 102 deletions

View File

@@ -22,6 +22,7 @@
#include "table/sprites.h"
#include "table/strings.h"
#include "sprite.h"
#include "transparency.h"
/**
* Based on newhouses equivalent, but adapted for newindustries
@@ -195,10 +196,10 @@ void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte r
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(image, SPRITE_MODIFIER_OPAQUE) && HASBIT(_transparent_opt, TO_INDUSTRIES)
!HASBIT(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_INDUSTRIES)
);
} else {
AddChildSpriteScreen(image, pal, (byte)dtss->delta_x, (byte)dtss->delta_y, HASBIT(_transparent_opt, TO_INDUSTRIES));
AddChildSpriteScreen(image, pal, (byte)dtss->delta_x, (byte)dtss->delta_y, IsTransparencySet(TO_INDUSTRIES));
}
}
}