Mercurial > hg > openttd
comparison src/station_cmd.cpp @ 8570:2b1397dd930a draft
(svn r12148) -Codechange: Merge 'image' and 'pal' of DrawTileSeqStruct into one PalSpriteID
author | frosch <frosch@openttd.org> |
---|---|
date | Fri, 15 Feb 2008 18:34:26 +0000 |
parents | 992fa65afba1 |
children | b611278e4fed |
comparison
equal
deleted
inserted
replaced
8569:b003fa8b1ca3 | 8570:2b1397dd930a |
---|---|
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 { |