1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-17 19:49:10 +00:00

(svn r2658) -Codechange: Use MAKE_TRANSPARENT to display a transparented sprite

This commit is contained in:
celestar
2005-07-20 22:05:13 +00:00
parent 18a93cca3d
commit 85f06d6e7b
10 changed files with 21 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
#include "stdafx.h"
#include "openttd.h"
#include "table/strings.h"
#include "table/sprites.h"
#include "map.h"
#include "tile.h"
#include "command.h"
@@ -125,7 +126,7 @@ static void DrawTile_Unmovable(TileInfo *ti)
image = PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile));
image += 0x8A48;
if (_display_opt & DO_TRANS_BUILDINGS)
image = (image & 0x3FFF) | 0x3224000;
MAKE_TRANSPARENT(image);
AddSortableSpriteToDraw(image, ti->x, ti->y, 16, 16, 25, ti->z);
} else if (ti->map5 == 3) {
@@ -151,7 +152,7 @@ static void DrawTile_Unmovable(TileInfo *ti)
image = dtus->image;
if (_display_opt & DO_TRANS_BUILDINGS)
image = (image & 0x3FFF) | 0x3224000;
MAKE_TRANSPARENT(image);
AddSortableSpriteToDraw(image,
ti->x | dtus->subcoord_x,
@@ -173,7 +174,7 @@ static void DrawTile_Unmovable(TileInfo *ti)
foreach_draw_tile_seq(dtss, t->seq) {
image = dtss->image;
if (_display_opt & DO_TRANS_BUILDINGS) {
image = (image & 0x3FFF) | 0x03224000;
MAKE_TRANSPARENT(image);
} else {
image |= ormod;
}