equal
deleted
inserted
replaced
228 } else { |
228 } else { |
229 PlaceRoadStop(tile, (_ctrl_pressed << 5) | RoadTypeToRoadTypes(_cur_roadtype) << 2 | ROADSTOP_TRUCK, CMD_BUILD_ROAD_STOP | CMD_NO_WATER | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_station[ROADSTOP_TRUCK])); |
229 PlaceRoadStop(tile, (_ctrl_pressed << 5) | RoadTypeToRoadTypes(_cur_roadtype) << 2 | ROADSTOP_TRUCK, CMD_BUILD_ROAD_STOP | CMD_NO_WATER | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_station[ROADSTOP_TRUCK])); |
230 } |
230 } |
231 } |
231 } |
232 |
232 |
233 static void PlaceRoad_DemolishArea(TileIndex tile) |
|
234 { |
|
235 VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_DEMOLISH_AREA); |
|
236 } |
|
237 |
|
238 /** Enum referring to the widgets of the build road toolbar */ |
233 /** Enum referring to the widgets of the build road toolbar */ |
239 enum RoadToolbarWidgets { |
234 enum RoadToolbarWidgets { |
240 RTW_CLOSEBOX = 0, |
235 RTW_CLOSEBOX = 0, |
241 RTW_CAPTION, |
236 RTW_CAPTION, |
242 RTW_STICKY, |
237 RTW_STICKY, |
320 HandlePlacePushButton(w, RTW_AUTOROAD, _road_type_infos[_cur_roadtype].cursor_autoroad, VHM_RECT, PlaceRoad_AutoRoad); |
315 HandlePlacePushButton(w, RTW_AUTOROAD, _road_type_infos[_cur_roadtype].cursor_autoroad, VHM_RECT, PlaceRoad_AutoRoad); |
321 } |
316 } |
322 |
317 |
323 static void BuildRoadClick_Demolish(Window *w) |
318 static void BuildRoadClick_Demolish(Window *w) |
324 { |
319 { |
325 HandlePlacePushButton(w, RTW_DEMOLISH, ANIMCURSOR_DEMOLISH, VHM_RECT, PlaceRoad_DemolishArea); |
320 HandlePlacePushButton(w, RTW_DEMOLISH, ANIMCURSOR_DEMOLISH, VHM_RECT, PlaceProc_DemolishArea); |
326 } |
321 } |
327 |
322 |
328 static void BuildRoadClick_Depot(Window *w) |
323 static void BuildRoadClick_Depot(Window *w) |
329 { |
324 { |
330 if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return; |
325 if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return; |