(svn r13838) -Codechange: Make industry tiles aware of WaterClasses.

This commit is contained in:
frosch
2008-07-26 16:14:10 +00:00
parent c64e3b4882
commit 6684bc12d5
12 changed files with 110 additions and 36 deletions

View File

@@ -25,6 +25,7 @@
#include "town.h"
#include "command_func.h"
#include "animated_tile_func.h"
#include "water.h"
#include "table/sprites.h"
#include "table/strings.h"
@@ -185,7 +186,15 @@ void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte r
if (IS_CUSTOM_SPRITE(image)) image += stage;
if (GB(image, 0, SPRITE_WIDTH) != 0) DrawGroundSprite(image, pal);
if (GB(image, 0, SPRITE_WIDTH) != 0) {
/* If the ground sprite is the default flat water sprite, draw also canal/river borders
* Do not do this if the tile's WaterClass is 'land'. */
if (image == SPR_FLAT_WATER_TILE && IsIndustryTileOnWater(ti->tile)) {
DrawWaterClassGround(ti);
} else {
DrawGroundSprite(image, pal);
}
}
foreach_draw_tile_seq(dtss, dts->seq) {
if (GB(dtss->image.sprite, 0, SPRITE_WIDTH) == 0) continue;