equal
deleted
inserted
replaced
23 #include "transparency.h" |
23 #include "transparency.h" |
24 #include "functions.h" |
24 #include "functions.h" |
25 #include "town.h" |
25 #include "town.h" |
26 #include "command_func.h" |
26 #include "command_func.h" |
27 #include "animated_tile_func.h" |
27 #include "animated_tile_func.h" |
|
28 #include "water.h" |
28 |
29 |
29 #include "table/sprites.h" |
30 #include "table/sprites.h" |
30 #include "table/strings.h" |
31 #include "table/strings.h" |
31 |
32 |
32 static uint32 GetGRFParameter(IndustryGfx indtile_id, byte parameter) |
33 static uint32 GetGRFParameter(IndustryGfx indtile_id, byte parameter) |
183 SpriteID image = dts->ground.sprite; |
184 SpriteID image = dts->ground.sprite; |
184 SpriteID pal = dts->ground.pal; |
185 SpriteID pal = dts->ground.pal; |
185 |
186 |
186 if (IS_CUSTOM_SPRITE(image)) image += stage; |
187 if (IS_CUSTOM_SPRITE(image)) image += stage; |
187 |
188 |
188 if (GB(image, 0, SPRITE_WIDTH) != 0) DrawGroundSprite(image, pal); |
189 if (GB(image, 0, SPRITE_WIDTH) != 0) { |
|
190 /* If the ground sprite is the default flat water sprite, draw also canal/river borders |
|
191 * Do not do this if the tile's WaterClass is 'land'. */ |
|
192 if (image == SPR_FLAT_WATER_TILE && IsIndustryTileOnWater(ti->tile)) { |
|
193 DrawWaterClassGround(ti); |
|
194 } else { |
|
195 DrawGroundSprite(image, pal); |
|
196 } |
|
197 } |
189 |
198 |
190 foreach_draw_tile_seq(dtss, dts->seq) { |
199 foreach_draw_tile_seq(dtss, dts->seq) { |
191 if (GB(dtss->image.sprite, 0, SPRITE_WIDTH) == 0) continue; |
200 if (GB(dtss->image.sprite, 0, SPRITE_WIDTH) == 0) continue; |
192 |
201 |
193 image = dtss->image.sprite; |
202 image = dtss->image.sprite; |