equal
deleted
inserted
replaced
21 static void ShowBusStationPicker(void); |
21 static void ShowBusStationPicker(void); |
22 static void ShowTruckStationPicker(void); |
22 static void ShowTruckStationPicker(void); |
23 static void ShowRoadDepotPicker(void); |
23 static void ShowRoadDepotPicker(void); |
24 |
24 |
25 static bool _remove_button_clicked; |
25 static bool _remove_button_clicked; |
26 static bool _build_road_flag; |
|
27 |
26 |
28 static byte _place_road_flag; |
27 static byte _place_road_flag; |
29 |
28 |
30 static byte _road_depot_orientation; |
29 static byte _road_depot_orientation; |
31 static byte _road_station_picker_orientation; |
30 static byte _road_station_picker_orientation; |
109 |
108 |
110 typedef void OnButtonClick(Window *w); |
109 typedef void OnButtonClick(Window *w); |
111 |
110 |
112 static void BuildRoadClick_NE(Window *w) |
111 static void BuildRoadClick_NE(Window *w) |
113 { |
112 { |
114 _build_road_flag = 0; |
|
115 HandlePlacePushButton(w, 3, SPR_CURSOR_ROAD_NESW, 1, PlaceRoad_NE); |
113 HandlePlacePushButton(w, 3, SPR_CURSOR_ROAD_NESW, 1, PlaceRoad_NE); |
116 } |
114 } |
117 |
115 |
118 static void BuildRoadClick_NW(Window *w) |
116 static void BuildRoadClick_NW(Window *w) |
119 { |
117 { |
120 _build_road_flag = 0; |
|
121 HandlePlacePushButton(w, 4, SPR_CURSOR_ROAD_NWSE, 1, PlaceRoad_NW); |
118 HandlePlacePushButton(w, 4, SPR_CURSOR_ROAD_NWSE, 1, PlaceRoad_NW); |
122 } |
119 } |
123 |
120 |
124 |
121 |
125 static void BuildRoadClick_Demolish(Window *w) |
122 static void BuildRoadClick_Demolish(Window *w) |
145 if (HandlePlacePushButton(w, 8, SPR_CURSOR_TRUCK_STATION, 1, PlaceRoad_TruckStation)) ShowTruckStationPicker(); |
142 if (HandlePlacePushButton(w, 8, SPR_CURSOR_TRUCK_STATION, 1, PlaceRoad_TruckStation)) ShowTruckStationPicker(); |
146 } |
143 } |
147 |
144 |
148 static void BuildRoadClick_Bridge(Window *w) |
145 static void BuildRoadClick_Bridge(Window *w) |
149 { |
146 { |
150 _build_road_flag = 0; |
|
151 HandlePlacePushButton(w, 9, SPR_CURSOR_BRIDGE, 1, PlaceRoad_Bridge); |
147 HandlePlacePushButton(w, 9, SPR_CURSOR_BRIDGE, 1, PlaceRoad_Bridge); |
152 } |
148 } |
153 |
149 |
154 static void BuildRoadClick_Tunnel(Window *w) |
150 static void BuildRoadClick_Tunnel(Window *w) |
155 { |
151 { |
156 _build_road_flag = 0; |
|
157 HandlePlacePushButton(w, 10, SPR_CURSOR_ROAD_TUNNEL, 3, PlaceRoad_Tunnel); |
152 HandlePlacePushButton(w, 10, SPR_CURSOR_ROAD_TUNNEL, 3, PlaceRoad_Tunnel); |
158 } |
153 } |
159 |
154 |
160 static void BuildRoadClick_Remove(Window *w) |
155 static void BuildRoadClick_Remove(Window *w) |
161 { |
156 { |