~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/tunnelbridge_cmd.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Matthijs Kooijman
  • Date: 2009-06-09 21:46:28 UTC
  • mfrom: (1.1.7 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090609214628-6z5uodi6178z050l
[ Matthijs Kooijman ]
* New upstream release.
* Link against libicu to enable right-to-left language support. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: tunnelbridge_cmd.cpp 15718 2009-03-15 00:32:18Z rubidium $ */
 
1
/* $Id: tunnelbridge_cmd.cpp 16531 2009-06-07 15:26:33Z rubidium $ */
2
2
 
3
3
/** @file tunnelbridge_cmd.cpp
4
4
 * This file deals with tunnels and bridges (non-gui stuff)
993
993
 
994
994
                /* draw ramp */
995
995
 
996
 
                /* Draw Trambits as SpriteCombine */
997
 
                if (transport_type == TRANSPORT_ROAD) StartSpriteCombine();
 
996
                /* Draw Trambits and PBS Reservation as SpriteCombine */
 
997
                if (transport_type == TRANSPORT_ROAD || transport_type == TRANSPORT_RAIL) StartSpriteCombine();
998
998
 
999
999
                /* HACK set the height of the BB of a sloped ramp to 1 so a vehicle on
1000
1000
                 * it doesn't disappear behind it
1002
1002
                /* Bridge heads are drawn solid no matter how invisibility/transparency is set */
1003
1003
                AddSortableSpriteToDraw(psid->sprite, psid->pal, ti->x, ti->y, 16, 16, ti->tileh == SLOPE_FLAT ? 0 : 8, ti->z);
1004
1004
 
1005
 
                if (_settings_client.gui.show_track_reservation && transport_type == TRANSPORT_RAIL && GetTunnelBridgeReservation(ti->tile)) {
 
1005
                if (_game_mode != GM_MENU && _settings_client.gui.show_track_reservation && transport_type == TRANSPORT_RAIL && GetTunnelBridgeReservation(ti->tile)) {
1006
1006
                        const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile));
1007
1007
                        if (HasBridgeFlatRamp(ti->tileh, DiagDirToAxis(tunnelbridge_direction))) {
1008
1008
                                AddSortableSpriteToDraw(DiagDirToAxis(tunnelbridge_direction) == AXIS_X ? rti->base_sprites.single_y : rti->base_sprites.single_x, PALETTE_CRASH, ti->x, ti->y, 16, 16, 0, ti->z + 8);
1028
1028
                        }
1029
1029
                        EndSpriteCombine();
1030
1030
                } else if (transport_type == TRANSPORT_RAIL) {
 
1031
                        EndSpriteCombine();
1031
1032
                        if (HasCatenaryDrawn(GetRailType(ti->tile))) {
1032
1033
                                DrawCatenary(ti);
1033
1034
                        }