--- a/src/airport_gui.cpp Mon Dec 03 23:39:38 2007 +0000
+++ b/src/airport_gui.cpp Tue Jan 22 21:00:30 2008 +0000
@@ -4,26 +4,30 @@
#include "stdafx.h"
#include "openttd.h"
-#include "table/sprites.h"
-#include "table/strings.h"
-#include "functions.h"
-#include "map.h"
-#include "window.h"
+#include "window_gui.h"
#include "gui.h"
-#include "viewport.h"
-#include "gfx.h"
-#include "sound.h"
-#include "command.h"
-#include "vehicle.h"
+#include "station_gui.h"
+#include "terraform_gui.h"
+#include "command_func.h"
#include "station.h"
#include "airport.h"
#include "depot.h"
-#include "strings.h"
#include "newgrf_callbacks.h"
+#include "sound_func.h"
+#include "window_func.h"
+#include "settings_type.h"
+#include "viewport_func.h"
+#include "gfx_func.h"
+#include "player_func.h"
+#include "widgets/dropdown_func.h"
+#include "strings_func.h"
//TODO: remove station.h once converted to newgrf airports. stations just used as temporary loader
#include "station.h"
+#include "table/sprites.h"
+#include "table/strings.h"
+
static struct {
byte layout_set;
byte numtracks;
@@ -120,7 +124,7 @@
break;
case WE_ABORT_PLACE_OBJ:
- RaiseWindowButtons(w);
+ w->RaiseButtons();
w = FindWindowById(WC_BUILD_STATION, 0);
if (w != 0)
@@ -188,8 +192,8 @@
if (WP(w, def_d).close) return;
for (byte j = 0; j < 4; j++) {
- SetWindowWidgetDisabledState(w, 8 + j, true);
- RaiseWindowWidget(w, 8 + j);
+ w->SetWidgetDisabledState(8 + j, true);
+ w->RaiseWidget(8 + j);
w->widget[8 + j].data = SPR_IMG_ARROW_NE_WHITE + j; //reset arrows to white
}
@@ -265,8 +269,8 @@
switch (e->we.click.widget) {
case 12: case 13:
_station_show_coverage = (e->we.click.widget != 12);
- SetWindowWidgetLoweredState(w, 12, !_station_show_coverage);
- SetWindowWidgetLoweredState(w, 13, _station_show_coverage);
+ w->SetWidgetLoweredState(12, !_station_show_coverage);
+ w->SetWidgetLoweredState(13, _station_show_coverage);
SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;
@@ -318,10 +322,10 @@
}
}
- SetWindowWidgetLoweredState(w, 8, (_airport.direction == DIR_NE));
- SetWindowWidgetLoweredState(w, 9, (_airport.direction == DIR_SE));
- SetWindowWidgetLoweredState(w, 10, (_airport.direction == DIR_SW));
- SetWindowWidgetLoweredState(w, 11, (_airport.direction == DIR_NW));
+ w->SetWidgetLoweredState( 8, (_airport.direction == DIR_NE));
+ w->SetWidgetLoweredState( 9, (_airport.direction == DIR_SE));
+ w->SetWidgetLoweredState(10, (_airport.direction == DIR_SW));
+ w->SetWidgetLoweredState(11, (_airport.direction == DIR_NW));
SndPlayFx(SND_15_BEEP);
SetWindowDirty(w);
break;