mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r4383) - Codechange: Remove extraneous code from 4354; no need to get RailTypeInfo when we already have it...
This commit is contained in:
parent
5b33383f65
commit
f733f94677
@ -1329,7 +1329,7 @@ static void DrawTile_Track(TileInfo *ti)
|
|||||||
* up to the GRF file to decide that. */
|
* up to the GRF file to decide that. */
|
||||||
|
|
||||||
image = cust->ground_sprite;
|
image = cust->ground_sprite;
|
||||||
image += (image < _custom_sprites_base) ? rti->total_offset : GetRailTypeInfo(GetRailType(ti->tile))->custom_ground_offset;
|
image += (image < _custom_sprites_base) ? rti->total_offset : rti->custom_ground_offset;
|
||||||
|
|
||||||
DrawGroundSprite(image);
|
DrawGroundSprite(image);
|
||||||
|
|
||||||
|
@ -1955,7 +1955,7 @@ static void DrawTile_Station(TileInfo *ti)
|
|||||||
if (image & PALETTE_MODIFIER_COLOR) image |= image_or_modificator;
|
if (image & PALETTE_MODIFIER_COLOR) image |= image_or_modificator;
|
||||||
|
|
||||||
// For custom sprites, there's no railtype-based pitching.
|
// For custom sprites, there's no railtype-based pitching.
|
||||||
offset = (image & SPRITE_MASK) < _custom_sprites_base ? rti->total_offset : GetRailTypeInfo(railtype)->custom_ground_offset;
|
offset = (image & SPRITE_MASK) < _custom_sprites_base ? rti->total_offset : rti->custom_ground_offset;
|
||||||
image += offset;
|
image += offset;
|
||||||
|
|
||||||
// station_land array has been increased from 82 elements to 114
|
// station_land array has been increased from 82 elements to 114
|
||||||
|
@ -412,7 +412,7 @@ void DrawWaypointSprite(int x, int y, int stat_id, RailType railtype)
|
|||||||
cust = &stat->renderdata[2];
|
cust = &stat->renderdata[2];
|
||||||
|
|
||||||
img = cust->ground_sprite;
|
img = cust->ground_sprite;
|
||||||
img += (img < _custom_sprites_base) ? rti->total_offset : GetRailTypeInfo(railtype)->custom_ground_offset;
|
img += (img < _custom_sprites_base) ? rti->total_offset : rti->custom_ground_offset;
|
||||||
|
|
||||||
if (img & PALETTE_MODIFIER_COLOR) img = (img & SPRITE_MASK);
|
if (img & PALETTE_MODIFIER_COLOR) img = (img & SPRITE_MASK);
|
||||||
DrawSprite(img, x, y);
|
DrawSprite(img, x, y);
|
||||||
|
Loading…
Reference in New Issue
Block a user