src/dock_gui.cpp
branchnoai
changeset 9723 eee46cb39750
parent 9722 ebf0ece7d8f6
child 9724 b39bc69bb2f2
--- a/src/dock_gui.cpp	Fri Nov 23 16:59:30 2007 +0000
+++ b/src/dock_gui.cpp	Wed Jan 09 18:11:12 2008 +0000
@@ -6,16 +6,20 @@
 #include "openttd.h"
 #include "table/sprites.h"
 #include "table/strings.h"
-#include "functions.h"
-#include "map.h"
-#include "window.h"
+#include "tile_map.h"
 #include "station.h"
 #include "gui.h"
-#include "viewport.h"
-#include "gfx.h"
-#include "sound.h"
-#include "command.h"
+#include "terraform_gui.h"
+#include "window_gui.h"
+#include "station_gui.h"
+#include "command_func.h"
 #include "variables.h"
+#include "water.h"
+#include "window_func.h"
+#include "vehicle_func.h"
+#include "sound_func.h"
+#include "viewport_func.h"
+#include "gfx_func.h"
 
 static void ShowBuildDockStationPicker();
 static void ShowBuildDocksDepotPicker();
@@ -127,7 +131,7 @@
 	switch (e->event) {
 	case WE_PAINT:
 		DrawWindowWidgets(w);
-		SetWindowWidgetsDisabledState(w, !CanBuildVehicleInfrastructure(VEH_SHIP), 7, 8, 9, WIDGET_LIST_END);
+		w->SetWidgetsDisabledState(!CanBuildVehicleInfrastructure(VEH_SHIP), 7, 8, 9, WIDGET_LIST_END);
 		break;
 
 	case WE_CLICK:
@@ -170,7 +174,7 @@
 		break;
 
 	case WE_ABORT_PLACE_OBJ:
-		RaiseWindowButtons(w);
+		w->RaiseButtons();
 
 		w = FindWindowById(WC_BUILD_STATION, 0);
 		if (w != NULL) WP(w, def_d).close = true;
@@ -236,7 +240,7 @@
 static void BuildDockStationWndProc(Window *w, WindowEvent *e)
 {
 	switch (e->event) {
-	case WE_CREATE: LowerWindowWidget(w, _station_show_coverage + 3); break;
+	case WE_CREATE: w->LowerWidget(_station_show_coverage + 3); break;
 
 	case WE_PAINT: {
 		int rad = (_patches.modified_catchment) ? CA_DOCK : 4;
@@ -258,9 +262,9 @@
 		switch (e->we.click.widget) {
 			case 3:
 			case 4:
-				RaiseWindowWidget(w, _station_show_coverage + 3);
+				w->RaiseWidget(_station_show_coverage + 3);
 				_station_show_coverage = (e->we.click.widget != 3);
-				LowerWindowWidget(w, _station_show_coverage + 3);
+				w->LowerWidget(_station_show_coverage + 3);
 				SndPlayFx(SND_15_BEEP);
 				SetWindowDirty(w);
 				break;
@@ -317,7 +321,7 @@
 static void BuildDocksDepotWndProc(Window *w, WindowEvent *e)
 {
 	switch (e->event) {
-	case WE_CREATE: LowerWindowWidget(w, _ship_depot_direction + 3); break;
+	case WE_CREATE: w->LowerWidget(_ship_depot_direction + 3); break;
 
 	case WE_PAINT:
 		DrawWindowWidgets(w);
@@ -332,9 +336,9 @@
 		switch (e->we.click.widget) {
 		case 3:
 		case 4:
-			RaiseWindowWidget(w, _ship_depot_direction + 3);
+			w->RaiseWidget(_ship_depot_direction + 3);
 			_ship_depot_direction = (e->we.click.widget == 3 ? AXIS_X : AXIS_Y);
-			LowerWindowWidget(w, _ship_depot_direction + 3);
+			w->LowerWidget(_ship_depot_direction + 3);
 			SndPlayFx(SND_15_BEEP);
 			UpdateDocksDirection();
 			SetWindowDirty(w);