forked from mirror/OpenTTD
(svn r21627) -Codechange: Remove _place_proc global variable.
This commit is contained in:
@@ -386,28 +386,28 @@ struct BuildRoadToolbarWindow : Window {
|
||||
_one_way_button_clicked = false;
|
||||
switch (widget) {
|
||||
case RTW_ROAD_X:
|
||||
HandlePlacePushButton(this, RTW_ROAD_X, _road_type_infos[_cur_roadtype].cursor_nwse, HT_RECT, NULL);
|
||||
HandlePlacePushButton(this, RTW_ROAD_X, _road_type_infos[_cur_roadtype].cursor_nwse, HT_RECT);
|
||||
this->last_started_action = widget;
|
||||
break;
|
||||
|
||||
case RTW_ROAD_Y:
|
||||
HandlePlacePushButton(this, RTW_ROAD_Y, _road_type_infos[_cur_roadtype].cursor_nesw, HT_RECT, NULL);
|
||||
HandlePlacePushButton(this, RTW_ROAD_Y, _road_type_infos[_cur_roadtype].cursor_nesw, HT_RECT);
|
||||
this->last_started_action = widget;
|
||||
break;
|
||||
|
||||
case RTW_AUTOROAD:
|
||||
HandlePlacePushButton(this, RTW_AUTOROAD, _road_type_infos[_cur_roadtype].cursor_autoroad, HT_RECT, NULL);
|
||||
HandlePlacePushButton(this, RTW_AUTOROAD, _road_type_infos[_cur_roadtype].cursor_autoroad, HT_RECT);
|
||||
this->last_started_action = widget;
|
||||
break;
|
||||
|
||||
case RTW_DEMOLISH:
|
||||
HandlePlacePushButton(this, RTW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL, NULL);
|
||||
HandlePlacePushButton(this, RTW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL);
|
||||
this->last_started_action = widget;
|
||||
break;
|
||||
|
||||
case RTW_DEPOT:
|
||||
if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return;
|
||||
if (HandlePlacePushButton(this, RTW_DEPOT, SPR_CURSOR_ROAD_DEPOT, HT_RECT, NULL)) {
|
||||
if (HandlePlacePushButton(this, RTW_DEPOT, SPR_CURSOR_ROAD_DEPOT, HT_RECT)) {
|
||||
ShowRoadDepotPicker(this);
|
||||
this->last_started_action = widget;
|
||||
}
|
||||
@@ -415,7 +415,7 @@ struct BuildRoadToolbarWindow : Window {
|
||||
|
||||
case RTW_BUS_STATION:
|
||||
if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return;
|
||||
if (HandlePlacePushButton(this, RTW_BUS_STATION, SPR_CURSOR_BUS_STATION, HT_RECT, NULL)) {
|
||||
if (HandlePlacePushButton(this, RTW_BUS_STATION, SPR_CURSOR_BUS_STATION, HT_RECT)) {
|
||||
ShowRVStationPicker(this, ROADSTOP_BUS);
|
||||
this->last_started_action = widget;
|
||||
}
|
||||
@@ -423,7 +423,7 @@ struct BuildRoadToolbarWindow : Window {
|
||||
|
||||
case RTW_TRUCK_STATION:
|
||||
if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return;
|
||||
if (HandlePlacePushButton(this, RTW_TRUCK_STATION, SPR_CURSOR_TRUCK_STATION, HT_RECT, NULL)) {
|
||||
if (HandlePlacePushButton(this, RTW_TRUCK_STATION, SPR_CURSOR_TRUCK_STATION, HT_RECT)) {
|
||||
ShowRVStationPicker(this, ROADSTOP_TRUCK);
|
||||
this->last_started_action = widget;
|
||||
}
|
||||
@@ -437,12 +437,12 @@ struct BuildRoadToolbarWindow : Window {
|
||||
break;
|
||||
|
||||
case RTW_BUILD_BRIDGE:
|
||||
HandlePlacePushButton(this, RTW_BUILD_BRIDGE, SPR_CURSOR_BRIDGE, HT_RECT, NULL);
|
||||
HandlePlacePushButton(this, RTW_BUILD_BRIDGE, SPR_CURSOR_BRIDGE, HT_RECT);
|
||||
this->last_started_action = widget;
|
||||
break;
|
||||
|
||||
case RTW_BUILD_TUNNEL:
|
||||
HandlePlacePushButton(this, RTW_BUILD_TUNNEL, SPR_CURSOR_ROAD_TUNNEL, HT_SPECIAL, NULL);
|
||||
HandlePlacePushButton(this, RTW_BUILD_TUNNEL, SPR_CURSOR_ROAD_TUNNEL, HT_SPECIAL);
|
||||
this->last_started_action = widget;
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user