diff options
author | rubidium <rubidium@openttd.org> | 2007-07-26 14:07:11 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-07-26 14:07:11 +0000 |
commit | 02ab86631e59bc247b9f01c21b69e6f6b99a0d3f (patch) | |
tree | f9ea4c50fe8ce5b57839ce0b5407aac9a6f2b452 /src/town_cmd.cpp | |
parent | d031da78d8271b8d57a0e2cd33b6c7d6e4231421 (diff) | |
download | openttd-02ab86631e59bc247b9f01c21b69e6f6b99a0d3f.tar.xz |
(svn r10696) -Codechange: remove duplication of the "make sprite transparent" code.
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r-- | src/town_cmd.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index cb090c682..79e1fb347 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -163,20 +163,14 @@ static void DrawTile_Town(TileInfo *ti) /* Add a house on top of the ground? */ image = dcts->building.sprite; if (image != 0) { - if (HASBIT(_transparent_opt, TO_HOUSES)) { - SETBIT(image, PALETTE_MODIFIER_TRANSPARENT); - pal = PALETTE_TO_TRANSPARENT; - } else { - pal = dcts->building.pal; - } - - AddSortableSpriteToDraw(image, pal, + AddSortableSpriteToDraw(image, dcts->building.pal, ti->x + dcts->subtile_x, ti->y + dcts->subtile_y, dcts->width + 1, dcts->height + 1, dcts->dz, - ti->z + ti->z, + HASBIT(_transparent_opt, TO_HOUSES) ); if (HASBIT(_transparent_opt, TO_HOUSES)) return; |