| 2548 | } |
| 2549 | |
| 2550 | void DrawTrainDepotSprite(int x, int y, int dir, RailType railtype) |
| 2551 | { |
| 2552 | const DrawTileSprites *dts = &_depot_gfx_table[dir]; |
| 2553 | const RailTypeInfo *rti = GetRailTypeInfo(railtype); |
| 2554 | SpriteID image = rti->UsesOverlay() ? SPR_FLAT_GRASS_TILE : dts->ground.sprite; |
| 2555 | uint32_t offset = rti->GetRailtypeSpriteOffset(); |
| 2556 | |
| 2557 | if (image != SPR_FLAT_GRASS_TILE) image += offset; |
| 2558 | PaletteID palette = GetCompanyPalette(_local_company); |
| 2559 | |
| 2560 | DrawSprite(image, PAL_NONE, x, y); |
| 2561 | |
| 2562 | if (rti->UsesOverlay()) { |
| 2563 | SpriteID ground = GetCustomRailSprite(rti, INVALID_TILE, RTSG_GROUND); |
| 2564 | |
| 2565 | switch (dir) { |
| 2566 | case DIAGDIR_SW: DrawSprite(ground + RTO_X, PAL_NONE, x, y); break; |
| 2567 | case DIAGDIR_SE: DrawSprite(ground + RTO_Y, PAL_NONE, x, y); break; |
| 2568 | default: break; |
| 2569 | } |
| 2570 | } |
| 2571 | int depot_sprite = GetCustomRailSprite(rti, INVALID_TILE, RTSG_DEPOT); |
| 2572 | if (depot_sprite != 0) offset = depot_sprite - SPR_RAIL_DEPOT_SE_1; |
| 2573 | |
| 2574 | DrawRailTileSeqInGUI(x, y, dts, offset, 0, palette); |
| 2575 | } |
| 2576 | |
| 2577 | static int GetSlopePixelZ_Track(TileIndex tile, uint x, uint y, bool) |
| 2578 | { |
no test coverage detected