summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-12-24 15:08:19 +0000
committeralberth <alberth@openttd.org>2010-12-24 15:08:19 +0000
commit852e647bcc892e3cf65990968b9ad200e83af435 (patch)
tree7d2f7591d2ffc3fecd614630c9ba733d6d828959
parent9a5cce382fb56ea91f95a56bc7b83b0ccbb69e1b (diff)
downloadopenttd-852e647bcc892e3cf65990968b9ad200e83af435.tar.xz
(svn r21627) -Codechange: Remove _place_proc global variable.
-rw-r--r--src/airport_gui.cpp4
-rw-r--r--src/dock_gui.cpp16
-rw-r--r--src/industry_gui.cpp2
-rw-r--r--src/main_gui.cpp4
-rw-r--r--src/rail_gui.cpp26
-rw-r--r--src/road_gui.cpp18
-rw-r--r--src/terraform_gui.cpp28
-rw-r--r--src/tilehighlight_func.h4
-rw-r--r--src/town_gui.cpp2
-rw-r--r--src/tree_gui.cpp4
-rw-r--r--src/viewport.cpp1
11 files changed, 52 insertions, 57 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp
index 5d982b04c..57a843496 100644
--- a/src/airport_gui.cpp
+++ b/src/airport_gui.cpp
@@ -89,14 +89,14 @@ struct BuildAirToolbarWindow : Window {
{
switch (widget) {
case ATW_AIRPORT:
- if (HandlePlacePushButton(this, ATW_AIRPORT, SPR_CURSOR_AIRPORT, HT_RECT, NULL)) {
+ if (HandlePlacePushButton(this, ATW_AIRPORT, SPR_CURSOR_AIRPORT, HT_RECT)) {
ShowBuildAirportPicker(this);
this->last_user_action = widget;
}
break;
case ATW_DEMOLISH:
- HandlePlacePushButton(this, ATW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL, NULL);
+ HandlePlacePushButton(this, ATW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL);
this->last_user_action = widget;
break;
diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp
index efed01ece..0691a31ef 100644
--- a/src/dock_gui.cpp
+++ b/src/dock_gui.cpp
@@ -134,39 +134,39 @@ struct BuildDocksToolbarWindow : Window {
this->last_clicked_widget = (DockToolbarWidgets)widget;
switch (widget) {
case DTW_CANAL: // Build canal button
- HandlePlacePushButton(this, DTW_CANAL, SPR_CURSOR_CANAL, HT_RECT, NULL);
+ HandlePlacePushButton(this, DTW_CANAL, SPR_CURSOR_CANAL, HT_RECT);
break;
case DTW_LOCK: // Build lock button
- HandlePlacePushButton(this, DTW_LOCK, SPR_CURSOR_LOCK, HT_SPECIAL, NULL);
+ HandlePlacePushButton(this, DTW_LOCK, SPR_CURSOR_LOCK, HT_SPECIAL);
break;
case DTW_DEMOLISH: // Demolish aka dynamite button
- HandlePlacePushButton(this, DTW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL, NULL);
+ HandlePlacePushButton(this, DTW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL);
break;
case DTW_DEPOT: // Build depot button
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
- if (HandlePlacePushButton(this, DTW_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT, NULL)) ShowBuildDocksDepotPicker(this);
+ if (HandlePlacePushButton(this, DTW_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT)) ShowBuildDocksDepotPicker(this);
break;
case DTW_STATION: // Build station button
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
- if (HandlePlacePushButton(this, DTW_STATION, SPR_CURSOR_DOCK, HT_SPECIAL, NULL)) ShowBuildDockStationPicker(this);
+ if (HandlePlacePushButton(this, DTW_STATION, SPR_CURSOR_DOCK, HT_SPECIAL)) ShowBuildDockStationPicker(this);
break;
case DTW_BUOY: // Build buoy button
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
- HandlePlacePushButton(this, DTW_BUOY, SPR_CURSOR_BOUY, HT_RECT, NULL);
+ HandlePlacePushButton(this, DTW_BUOY, SPR_CURSOR_BOUY, HT_RECT);
break;
case DTW_RIVER: // Build river button (in scenario editor)
if (_game_mode != GM_EDITOR) return;
- HandlePlacePushButton(this, DTW_RIVER, SPR_CURSOR_RIVER, HT_RECT, NULL);
+ HandlePlacePushButton(this, DTW_RIVER, SPR_CURSOR_RIVER, HT_RECT);
break;
case DTW_BUILD_AQUEDUCT: // Build aqueduct button
- HandlePlacePushButton(this, DTW_BUILD_AQUEDUCT, SPR_CURSOR_AQUEDUCT, HT_SPECIAL, NULL);
+ HandlePlacePushButton(this, DTW_BUILD_AQUEDUCT, SPR_CURSOR_AQUEDUCT, HT_SPECIAL);
break;
default: break;
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 6bf3932c1..37c9841d0 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -517,7 +517,7 @@ public:
DoCommandP(0, this->selected_type, InteractiveRandom(), CMD_BUILD_INDUSTRY | CMD_MSG(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY));
this->HandleButtonClick(DPIW_FUND_WIDGET);
} else {
- HandlePlacePushButton(this, DPIW_FUND_WIDGET, SPR_CURSOR_INDUSTRY, HT_RECT, NULL);
+ HandlePlacePushButton(this, DPIW_FUND_WIDGET, SPR_CURSOR_INDUSTRY, HT_RECT);
}
break;
}
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 93fcfc27b..37b452033 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -93,10 +93,9 @@ void HandleOnEditText(const char *str)
* @param widget ID of the widget (=button) that called this function
* @param cursor How should the cursor image change? E.g. cursor with depot image in it
* @param mode Tile highlighting mode, e.g. drawing a rectangle or a dot on the ground
- * @param placeproc Procedure which will be called when someone clicks on the map
* @return true if the button is clicked, false if it's unclicked
*/
-bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, HighLightStyle mode, PlaceProc *placeproc)
+bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, HighLightStyle mode)
{
if (w->IsWidgetDisabled(widget)) return false;
@@ -110,7 +109,6 @@ bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, HighLightStyl
SetObjectToPlace(cursor, PAL_NONE, mode, w->window_class, w->window_number);
w->LowerWidget(widget);
- _place_proc = placeproc;
return true;
}
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index df2ce0a26..6e39d41d8 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -515,37 +515,37 @@ struct BuildRailToolbarWindow : Window {
_remove_button_clicked = false;
switch (widget) {
case RTW_BUILD_NS:
- HandlePlacePushButton(this, RTW_BUILD_NS, GetRailTypeInfo(_cur_railtype)->cursor.rail_ns, HT_LINE | HT_DIR_VL, NULL);
+ HandlePlacePushButton(this, RTW_BUILD_NS, GetRailTypeInfo(_cur_railtype)->cursor.rail_ns, HT_LINE | HT_DIR_VL);
this->last_user_action = widget;
break;
case RTW_BUILD_X:
- HandlePlacePushButton(this, RTW_BUILD_X, GetRailTypeInfo(_cur_railtype)->cursor.rail_swne, HT_LINE | HT_DIR_X, NULL);
+ HandlePlacePushButton(this, RTW_BUILD_X, GetRailTypeInfo(_cur_railtype)->cursor.rail_swne, HT_LINE | HT_DIR_X);
this->last_user_action = widget;
break;
case RTW_BUILD_EW:
- HandlePlacePushButton(this, RTW_BUILD_EW, GetRailTypeInfo(_cur_railtype)->cursor.rail_ew, HT_LINE | HT_DIR_HL, NULL);
+ HandlePlacePushButton(this, RTW_BUILD_EW, GetRailTypeInfo(_cur_railtype)->cursor.rail_ew, HT_LINE | HT_DIR_HL);
this->last_user_action = widget;
break;
case RTW_BUILD_Y:
- HandlePlacePushButton(this, RTW_BUILD_Y, GetRailTypeInfo(_cur_railtype)->cursor.rail_nwse, HT_LINE | HT_DIR_Y, NULL);
+ HandlePlacePushButton(this, RTW_BUILD_Y, GetRailTypeInfo(_cur_railtype)->cursor.rail_nwse, HT_LINE | HT_DIR_Y);
this->last_user_action = widget;
break;
case RTW_AUTORAIL:
- HandlePlacePushButton(this, RTW_AUTORAIL, GetRailTypeInfo(_cur_railtype)->cursor.autorail, HT_RAIL, NULL);
+ HandlePlacePushButton(this, RTW_AUTORAIL, GetRailTypeInfo(_cur_railtype)->cursor.autorail, HT_RAIL);
this->last_user_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_user_action = widget;
break;
case RTW_BUILD_DEPOT:
- if (HandlePlacePushButton(this, RTW_BUILD_DEPOT, GetRailTypeInfo(_cur_railtype)->cursor.depot, HT_RECT, NULL)) {
+ if (HandlePlacePushButton(this, RTW_BUILD_DEPOT, GetRailTypeInfo(_cur_railtype)->cursor.depot, HT_RECT)) {
ShowBuildTrainDepotPicker(this);
this->last_user_action = widget;
}
@@ -554,13 +554,13 @@ struct BuildRailToolbarWindow : Window {
case RTW_BUILD_WAYPOINT:
this->last_user_action = widget;
_waypoint_count = StationClass::GetCount(STAT_CLASS_WAYP);
- if (HandlePlacePushButton(this, RTW_BUILD_WAYPOINT, SPR_CURSOR_WAYPOINT, HT_RECT, NULL) && _waypoint_count > 1) {
+ if (HandlePlacePushButton(this, RTW_BUILD_WAYPOINT, SPR_CURSOR_WAYPOINT, HT_RECT) && _waypoint_count > 1) {
ShowBuildWaypointPicker(this);
}
break;
case RTW_BUILD_STATION:
- if (HandlePlacePushButton(this, RTW_BUILD_STATION, SPR_CURSOR_RAIL_STATION, HT_RECT, NULL)) {
+ if (HandlePlacePushButton(this, RTW_BUILD_STATION, SPR_CURSOR_RAIL_STATION, HT_RECT)) {
ShowStationBuilder(this);
this->last_user_action = widget;
}
@@ -568,7 +568,7 @@ struct BuildRailToolbarWindow : Window {
case RTW_BUILD_SIGNALS: {
this->last_user_action = widget;
- bool started = HandlePlacePushButton(this, RTW_BUILD_SIGNALS, ANIMCURSOR_BUILDSIGNALS, HT_RECT, NULL);
+ bool started = HandlePlacePushButton(this, RTW_BUILD_SIGNALS, ANIMCURSOR_BUILDSIGNALS, HT_RECT);
if (started && _settings_client.gui.enable_signal_gui != _ctrl_pressed) {
ShowSignalBuilder(this);
}
@@ -576,12 +576,12 @@ struct BuildRailToolbarWindow : Window {
}
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_user_action = widget;
break;
case RTW_BUILD_TUNNEL:
- HandlePlacePushButton(this, RTW_BUILD_TUNNEL, GetRailTypeInfo(_cur_railtype)->cursor.tunnel, HT_SPECIAL, NULL);
+ HandlePlacePushButton(this, RTW_BUILD_TUNNEL, GetRailTypeInfo(_cur_railtype)->cursor.tunnel, HT_SPECIAL);
this->last_user_action = widget;
break;
@@ -590,7 +590,7 @@ struct BuildRailToolbarWindow : Window {
break;
case RTW_CONVERT_RAIL:
- HandlePlacePushButton(this, RTW_CONVERT_RAIL, GetRailTypeInfo(_cur_railtype)->cursor.convert, HT_RECT, NULL);
+ HandlePlacePushButton(this, RTW_CONVERT_RAIL, GetRailTypeInfo(_cur_railtype)->cursor.convert, HT_RECT);
this->last_user_action = widget;
break;
diff --git a/src/road_gui.cpp b/src/road_gui.cpp
index 2097991b6..eda9c95df 100644
--- a/src/road_gui.cpp
+++ b/src/road_gui.cpp
@@ -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;
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index 5979f8831..11cb0a4d8 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -183,27 +183,27 @@ struct TerraformToolbarWindow : Window {
switch (widget) {
case TTW_LOWER_LAND: // Lower land button
- HandlePlacePushButton(this, TTW_LOWER_LAND, ANIMCURSOR_LOWERLAND, HT_POINT | HT_DIAGONAL, NULL);
+ HandlePlacePushButton(this, TTW_LOWER_LAND, ANIMCURSOR_LOWERLAND, HT_POINT | HT_DIAGONAL);
this->last_user_action = widget;
break;
case TTW_RAISE_LAND: // Raise land button
- HandlePlacePushButton(this, TTW_RAISE_LAND, ANIMCURSOR_RAISELAND, HT_POINT | HT_DIAGONAL, NULL);
+ HandlePlacePushButton(this, TTW_RAISE_LAND, ANIMCURSOR_RAISELAND, HT_POINT | HT_DIAGONAL);
this->last_user_action = widget;
break;
case TTW_LEVEL_LAND: // Level land button
- HandlePlacePushButton(this, TTW_LEVEL_LAND, SPR_CURSOR_LEVEL_LAND, HT_POINT | HT_DIAGONAL, NULL);
+ HandlePlacePushButton(this, TTW_LEVEL_LAND, SPR_CURSOR_LEVEL_LAND, HT_POINT | HT_DIAGONAL);
this->last_user_action = widget;
break;
case TTW_DEMOLISH: // Demolish aka dynamite button
- HandlePlacePushButton(this, TTW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL, NULL);
+ HandlePlacePushButton(this, TTW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL);
this->last_user_action = widget;
break;
case TTW_BUY_LAND: // Buy land button
- HandlePlacePushButton(this, TTW_BUY_LAND, SPR_CURSOR_BUY_LAND, HT_RECT, NULL);
+ HandlePlacePushButton(this, TTW_BUY_LAND, SPR_CURSOR_BUY_LAND, HT_RECT);
this->last_user_action = widget;
break;
@@ -214,14 +214,14 @@ struct TerraformToolbarWindow : Window {
break;
case TTW_PLACE_SIGN: // Place sign button
- HandlePlacePushButton(this, TTW_PLACE_SIGN, SPR_CURSOR_SIGN, HT_RECT, NULL);
+ HandlePlacePushButton(this, TTW_PLACE_SIGN, SPR_CURSOR_SIGN, HT_RECT);
this->last_user_action = widget;
break;
case TTW_PLACE_OBJECT: // Place object button
/* Don't show the place object button when there are no objects to place. */
if (ObjectClass::GetCount() == 0) return;
- if (HandlePlacePushButton(this, TTW_PLACE_OBJECT, SPR_CURSOR_TRANSMITTER, HT_RECT, NULL)) {
+ if (HandlePlacePushButton(this, TTW_PLACE_OBJECT, SPR_CURSOR_TRANSMITTER, HT_RECT)) {
ShowBuildObjectPicker(this);
this->last_user_action = widget;
}
@@ -616,37 +616,37 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
switch (widget) {
case ETTW_DEMOLISH: // Demolish aka dynamite button
- HandlePlacePushButton(this, ETTW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL, NULL);
+ HandlePlacePushButton(this, ETTW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL);
this->last_user_action = widget;
break;
case ETTW_LOWER_LAND: // Lower land button
- HandlePlacePushButton(this, ETTW_LOWER_LAND, ANIMCURSOR_LOWERLAND, HT_POINT, NULL);
+ HandlePlacePushButton(this, ETTW_LOWER_LAND, ANIMCURSOR_LOWERLAND, HT_POINT);
this->last_user_action = widget;
break;
case ETTW_RAISE_LAND: // Raise land button
- HandlePlacePushButton(this, ETTW_RAISE_LAND, ANIMCURSOR_RAISELAND, HT_POINT, NULL);
+ HandlePlacePushButton(this, ETTW_RAISE_LAND, ANIMCURSOR_RAISELAND, HT_POINT);
this->last_user_action = widget;
break;
case ETTW_LEVEL_LAND: // Level land button
- HandlePlacePushButton(this, ETTW_LEVEL_LAND, SPR_CURSOR_LEVEL_LAND, HT_POINT | HT_DIAGONAL, NULL);
+ HandlePlacePushButton(this, ETTW_LEVEL_LAND, SPR_CURSOR_LEVEL_LAND, HT_POINT | HT_DIAGONAL);
this->last_user_action = widget;
break;
case ETTW_PLACE_ROCKS: // Place rocks button
- HandlePlacePushButton(this, ETTW_PLACE_ROCKS, SPR_CURSOR_ROCKY_AREA, HT_RECT, NULL);
+ HandlePlacePushButton(this, ETTW_PLACE_ROCKS, SPR_CURSOR_ROCKY_AREA, HT_RECT);
this->last_user_action = widget;
break;
case ETTW_PLACE_DESERT: // Place desert button (in tropical climate)
- HandlePlacePushButton(this, ETTW_PLACE_DESERT, SPR_CURSOR_DESERT, HT_RECT, NULL);
+ HandlePlacePushButton(this, ETTW_PLACE_DESERT, SPR_CURSOR_DESERT, HT_RECT);
this->last_user_action = widget;
break;
case ETTW_PLACE_OBJECT: // Place transmitter button
- if (HandlePlacePushButton(this, ETTW_PLACE_OBJECT, SPR_CURSOR_TRANSMITTER, HT_RECT, NULL)) {
+ if (HandlePlacePushButton(this, ETTW_PLACE_OBJECT, SPR_CURSOR_TRANSMITTER, HT_RECT)) {
ShowBuildObjectPicker(this);
this->last_user_action = widget;
}
diff --git a/src/tilehighlight_func.h b/src/tilehighlight_func.h
index 6f37c5579..3edef509a 100644
--- a/src/tilehighlight_func.h
+++ b/src/tilehighlight_func.h
@@ -15,11 +15,10 @@
#include "gfx_type.h"
#include "tilehighlight_type.h"
-typedef void PlaceProc(TileIndex tile);
void PlaceProc_DemolishArea(TileIndex tile);
bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_tile, TileIndex end_tile);
-bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, HighLightStyle mode, PlaceProc *placeproc);
+bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, HighLightStyle mode);
void SetObjectToPlaceWnd(CursorID icon, PaletteID pal, HighLightStyle mode, Window *w);
void SetObjectToPlace(CursorID icon, PaletteID pal, HighLightStyle mode, WindowClass window_class, WindowNumber window_num);
void ResetObjectToPlace();
@@ -31,7 +30,6 @@ void VpSetPlaceSizingLimit(int limit);
void UpdateTileSelection();
-extern PlaceProc *_place_proc;
extern TileHighlightData _thd;
#endif /* TILEHIGHLIGHT_FUNC_H */
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 00421ccc2..6d08f22ea 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -1084,7 +1084,7 @@ public:
{
switch (widget) {
case TSEW_NEWTOWN:
- HandlePlacePushButton(this, TSEW_NEWTOWN, SPR_CURSOR_TOWN, HT_RECT, NULL);
+ HandlePlacePushButton(this, TSEW_NEWTOWN, SPR_CURSOR_TOWN, HT_RECT);
break;
case TSEW_RANDOMTOWN:
diff --git a/src/tree_gui.cpp b/src/tree_gui.cpp
index 0c69e5008..bc76c8be8 100644
--- a/src/tree_gui.cpp
+++ b/src/tree_gui.cpp
@@ -105,13 +105,13 @@ public:
case BTW_TYPE_31: case BTW_TYPE_32: case BTW_TYPE_33: case BTW_TYPE_34:
if (widget - BTW_TYPE_11 >= this->count) break;
- if (HandlePlacePushButton(this, widget, SPR_CURSOR_TREE, HT_RECT, NULL)) {
+ if (HandlePlacePushButton(this, widget, SPR_CURSOR_TREE, HT_RECT)) {
this->tree_to_plant = (TreeType)(this->base + widget - BTW_TYPE_11);
}
break;
case BTW_TYPE_RANDOM: // tree of random type.
- if (HandlePlacePushButton(this, BTW_TYPE_RANDOM, SPR_CURSOR_TREE, HT_RECT, NULL)) {
+ if (HandlePlacePushButton(this, BTW_TYPE_RANDOM, SPR_CURSOR_TREE, HT_RECT)) {
this->tree_to_plant = TREE_INVALID;
}
break;
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 87a8906d3..977a5766a 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -49,7 +49,6 @@
#include "table/strings.h"
-PlaceProc *_place_proc;
Point _tile_fract_coords;
struct StringSpriteToDraw {