src/newgrf_station.cpp
branch0.6
changeset 10328 721fe18a2176
parent 10323 57d8fd25473e
equal deleted inserted replaced
10327:2274772a4424 10328:721fe18a2176
   751 	const DrawTileSprites *sprites;
   751 	const DrawTileSprites *sprites;
   752 	const DrawTileSeqStruct *seq;
   752 	const DrawTileSeqStruct *seq;
   753 	const RailtypeInfo *rti = GetRailTypeInfo(railtype);
   753 	const RailtypeInfo *rti = GetRailTypeInfo(railtype);
   754 	SpriteID relocation;
   754 	SpriteID relocation;
   755 	SpriteID image;
   755 	SpriteID image;
   756 	SpriteID pal = PLAYER_SPRITE_COLOR(_local_player);
   756 	SpriteID palette = PLAYER_SPRITE_COLOR(_local_player);
   757 	uint tile = 2;
   757 	uint tile = 2;
   758 
   758 
   759 	statspec = GetCustomStationSpec(sclass, station);
   759 	statspec = GetCustomStationSpec(sclass, station);
   760 	if (statspec == NULL) return false;
   760 	if (statspec == NULL) return false;
   761 
   761 
   789 			image += rti->total_offset;
   789 			image += rti->total_offset;
   790 		} else {
   790 		} else {
   791 			image += relocation;
   791 			image += relocation;
   792 		}
   792 		}
   793 
   793 
       
   794 		SpriteID pal;
       
   795 		if (HasBit(image, PALETTE_MODIFIER_TRANSPARENT) || HasBit(image, PALETTE_MODIFIER_COLOR)) {
       
   796 			if (seq->image.pal > 0) {
       
   797 				pal = seq->image.pal;
       
   798 			} else {
       
   799 				pal = palette;
       
   800 			}
       
   801 		} else {
       
   802 			pal = PAL_NONE;
       
   803 		}
       
   804 
   794 		if ((byte)seq->delta_z != 0x80) {
   805 		if ((byte)seq->delta_z != 0x80) {
   795 			pt = RemapCoords(seq->delta_x, seq->delta_y, seq->delta_z);
   806 			pt = RemapCoords(seq->delta_x, seq->delta_y, seq->delta_z);
   796 			DrawSprite(image, pal, x + pt.x, y + pt.y);
   807 			DrawSprite(image, pal, x + pt.x, y + pt.y);
   797 		}
   808 		}
   798 	}
   809 	}