rail_gui.c
changeset 3567 24ef003de86a
parent 3491 35d747bb5e82
child 3776 1545763bfc75
equal deleted inserted replaced
3566:21db83574baf 3567:24ef003de86a
   143 		DoCommandP(tile, 0, 0, CcPlaySound1E, CMD_REMOVE_FROM_RAILROAD_STATION | CMD_MSG(STR_CANT_REMOVE_PART_OF_STATION));
   143 		DoCommandP(tile, 0, 0, CcPlaySound1E, CMD_REMOVE_FROM_RAILROAD_STATION | CMD_MSG(STR_CANT_REMOVE_PART_OF_STATION));
   144 	else if (_railstation.dragdrop) {
   144 	else if (_railstation.dragdrop) {
   145 		VpStartPlaceSizing(tile, VPM_X_AND_Y_LIMITED);
   145 		VpStartPlaceSizing(tile, VPM_X_AND_Y_LIMITED);
   146 		VpSetPlaceSizingLimit(_patches.station_spread);
   146 		VpSetPlaceSizingLimit(_patches.station_spread);
   147 	} else {
   147 	} else {
   148 		// TODO: Custom station selector GUI. Now we just try using first custom station
   148 		// TODO: Custom station selector GUI.
   149 		// (and fall back to normal stations if it isn't available).
   149 		DoCommandP(tile, _railstation.orientation | (_railstation.numtracks<<8) | (_railstation.platlength<<16),_cur_railtype, CcStation,
   150 		DoCommandP(tile, _railstation.orientation | (_railstation.numtracks<<8) | (_railstation.platlength<<16),_cur_railtype|1<<4, CcStation,
       
   151 				CMD_BUILD_RAILROAD_STATION | CMD_NO_WATER | CMD_AUTO | CMD_MSG(STR_100F_CAN_T_BUILD_RAILROAD_STATION));
   150 				CMD_BUILD_RAILROAD_STATION | CMD_NO_WATER | CMD_AUTO | CMD_MSG(STR_100F_CAN_T_BUILD_RAILROAD_STATION));
   152 	}
   151 	}
   153 }
   152 }
   154 
   153 
   155 static void GenericPlaceSignals(TileIndex tile)
   154 static void GenericPlaceSignals(TileIndex tile)
   596 	if (sy > ey) uintswap(sy,ey);
   595 	if (sy > ey) uintswap(sy,ey);
   597 	w = ex - sx + 1;
   596 	w = ex - sx + 1;
   598 	h = ey - sy + 1;
   597 	h = ey - sy + 1;
   599 	if (!_railstation.orientation) uintswap(w,h);
   598 	if (!_railstation.orientation) uintswap(w,h);
   600 
   599 
   601 	// TODO: Custom station selector GUI. Now we just try using first custom station
   600 	// TODO: Custom station selector GUI.
   602 	// (and fall back to normal stations if it isn't available).
   601 	DoCommandP(TileXY(sx, sy), _railstation.orientation | (w << 8) | (h << 16), _cur_railtype, CcStation,
   603 	DoCommandP(TileXY(sx, sy), _railstation.orientation | (w << 8) | (h << 16), _cur_railtype | 1 << 4, CcStation,
       
   604 		CMD_BUILD_RAILROAD_STATION | CMD_NO_WATER | CMD_AUTO | CMD_MSG(STR_100F_CAN_T_BUILD_RAILROAD_STATION));
   602 		CMD_BUILD_RAILROAD_STATION | CMD_NO_WATER | CMD_AUTO | CMD_MSG(STR_100F_CAN_T_BUILD_RAILROAD_STATION));
   605 }
   603 }
   606 
   604 
   607 static void StationBuildWndProc(Window *w, WindowEvent *e)
   605 static void StationBuildWndProc(Window *w, WindowEvent *e)
   608 {
   606 {