diff options
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r-- | src/water_cmd.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index a15c3b96f..0b8ce0550 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -441,23 +441,11 @@ static void DrawWaterStuff(const TileInfo *ti, const WaterDrawTileStruct *wdts, DrawGroundSprite(image, PAL_NONE); for (; wdts->delta_x != 0x80; wdts++) { - SpriteID image = wdts->image; - SpriteID pal; - - if (image < 24) image += locks_base; - image += base; - - if (HASBIT(_transparent_opt, TO_BUILDINGS)) { - SETBIT(image, PALETTE_MODIFIER_TRANSPARENT); - pal = PALETTE_TO_TRANSPARENT; - } else { - pal = palette; - } - - AddSortableSpriteToDraw(image, pal, + AddSortableSpriteToDraw(wdts->image + base + ((wdts->image < 24) ? locks_base : 0), palette, ti->x + wdts->delta_x, ti->y + wdts->delta_y, wdts->width, wdts->height, - wdts->unk, ti->z + wdts->delta_z); + wdts->unk, ti->z + wdts->delta_z, + HASBIT(_transparent_opt, TO_BUILDINGS)); } } |