src/station_cmd.cpp
changeset 8570 f50de4804ff1
parent 8563 13b1a41e46f1
child 8571 53c94d717e99
equal deleted inserted replaced
8569:b2dbac0c0cf5 8570:f50de4804ff1
  2188 		DrawTramCatenary(ti, axis == AXIS_X ? ROAD_X : ROAD_Y);
  2188 		DrawTramCatenary(ti, axis == AXIS_X ? ROAD_X : ROAD_Y);
  2189 	}
  2189 	}
  2190 
  2190 
  2191 	const DrawTileSeqStruct *dtss;
  2191 	const DrawTileSeqStruct *dtss;
  2192 	foreach_draw_tile_seq(dtss, t->seq) {
  2192 	foreach_draw_tile_seq(dtss, t->seq) {
  2193 		SpriteID image = dtss->image;
  2193 		SpriteID image = dtss->image.sprite;
  2194 		if (relocation == 0 || HasBit(image, SPRITE_MODIFIER_USE_OFFSET)) {
  2194 		if (relocation == 0 || HasBit(image, SPRITE_MODIFIER_USE_OFFSET)) {
  2195 			image += total_offset;
  2195 			image += total_offset;
  2196 		} else {
  2196 		} else {
  2197 			image += relocation;
  2197 			image += relocation;
  2198 		}
  2198 		}
  2199 
  2199 
  2200 		SpriteID pal;
  2200 		SpriteID pal;
  2201 		if (!(!HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_BUILDINGS)) && HasBit(image, PALETTE_MODIFIER_COLOR)) {
  2201 		if (!(!HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_BUILDINGS)) && HasBit(image, PALETTE_MODIFIER_COLOR)) {
  2202 			pal = palette;
  2202 			pal = palette;
  2203 		} else {
  2203 		} else {
  2204 			pal = dtss->pal;
  2204 			pal = dtss->image.pal;
  2205 		}
  2205 		}
  2206 
  2206 
  2207 		if ((byte)dtss->delta_z != 0x80) {
  2207 		if ((byte)dtss->delta_z != 0x80) {
  2208 			AddSortableSpriteToDraw(
  2208 			AddSortableSpriteToDraw(
  2209 				image, pal,
  2209 				image, pal,
  2237 	}
  2237 	}
  2238 
  2238 
  2239 	const DrawTileSeqStruct *dtss;
  2239 	const DrawTileSeqStruct *dtss;
  2240 	foreach_draw_tile_seq(dtss, t->seq) {
  2240 	foreach_draw_tile_seq(dtss, t->seq) {
  2241 		Point pt = RemapCoords(dtss->delta_x, dtss->delta_y, dtss->delta_z);
  2241 		Point pt = RemapCoords(dtss->delta_x, dtss->delta_y, dtss->delta_z);
  2242 		DrawSprite(dtss->image + total_offset, pal, x + pt.x, y + pt.y);
  2242 		DrawSprite(dtss->image.sprite + total_offset, pal, x + pt.x, y + pt.y);
  2243 	}
  2243 	}
  2244 }
  2244 }
  2245 
  2245 
  2246 static uint GetSlopeZ_Station(TileIndex tile, uint x, uint y)
  2246 static uint GetSlopeZ_Station(TileIndex tile, uint x, uint y)
  2247 {
  2247 {