src/rail_gui.cpp
branchnoai
changeset 9686 d3c195c226f9
parent 9641 855e32c08c9b
child 9694 e72987579514
equal deleted inserted replaced
9685:d988aad9fc52 9686:d3c195c226f9
     4 
     4 
     5 #include "stdafx.h"
     5 #include "stdafx.h"
     6 #include "openttd.h"
     6 #include "openttd.h"
     7 #include "table/sprites.h"
     7 #include "table/sprites.h"
     8 #include "table/strings.h"
     8 #include "table/strings.h"
       
     9 #include "strings.h"
     9 #include "functions.h"
    10 #include "functions.h"
    10 #include "landscape.h"
    11 #include "landscape.h"
    11 #include "date.h"
    12 #include "date.h"
    12 #include "map.h"
    13 #include "map.h"
    13 #include "tile.h"
    14 #include "tile.h"
   756 		/* Set up a clipping area for the '/' station preview */
   757 		/* Set up a clipping area for the '/' station preview */
   757 		if (FillDrawPixelInfo(&tmp_dpi, 7, 26 + y_offset, 66, 48)) {
   758 		if (FillDrawPixelInfo(&tmp_dpi, 7, 26 + y_offset, 66, 48)) {
   758 			old_dpi = _cur_dpi;
   759 			old_dpi = _cur_dpi;
   759 			_cur_dpi = &tmp_dpi;
   760 			_cur_dpi = &tmp_dpi;
   760 			if (!DrawStationTile(32, 16, _cur_railtype, AXIS_X, _railstation.station_class, _railstation.station_type)) {
   761 			if (!DrawStationTile(32, 16, _cur_railtype, AXIS_X, _railstation.station_class, _railstation.station_type)) {
   761 				StationPickerDrawSprite(32, 16, _cur_railtype, INVALID_ROADTYPE, 2);
   762 				StationPickerDrawSprite(32, 16, STATION_RAIL, _cur_railtype, INVALID_ROADTYPE, 2);
   762 			}
   763 			}
   763 			_cur_dpi = old_dpi;
   764 			_cur_dpi = old_dpi;
   764 		}
   765 		}
   765 
   766 
   766 		/* Set up a clipping area for the '\' station preview */
   767 		/* Set up a clipping area for the '\' station preview */
   767 		if (FillDrawPixelInfo(&tmp_dpi, 75, 26 + y_offset, 66, 48)) {
   768 		if (FillDrawPixelInfo(&tmp_dpi, 75, 26 + y_offset, 66, 48)) {
   768 			old_dpi = _cur_dpi;
   769 			old_dpi = _cur_dpi;
   769 			_cur_dpi = &tmp_dpi;
   770 			_cur_dpi = &tmp_dpi;
   770 			if (!DrawStationTile(32, 16, _cur_railtype, AXIS_Y, _railstation.station_class, _railstation.station_type)) {
   771 			if (!DrawStationTile(32, 16, _cur_railtype, AXIS_Y, _railstation.station_class, _railstation.station_type)) {
   771 				StationPickerDrawSprite(32, 16, _cur_railtype, INVALID_ROADTYPE, 3);
   772 				StationPickerDrawSprite(32, 16, STATION_RAIL, _cur_railtype, INVALID_ROADTYPE, 3);
   772 			}
   773 			}
   773 			_cur_dpi = old_dpi;
   774 			_cur_dpi = old_dpi;
   774 		}
   775 		}
   775 
   776 
   776 		DrawStringCentered(74, 15 + y_offset, STR_3002_ORIENTATION, 0);
   777 		DrawStringCentered(74, 15 + y_offset, STR_3002_ORIENTATION, 0);