diff options
author | rubidium <rubidium@openttd.org> | 2007-01-10 18:56:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-01-10 18:56:51 +0000 |
commit | f35ed4bbc2b05f1b83476b60948d64375f77f1b4 (patch) | |
tree | 1a1c59c13ddb1d152052f3a3a0bcffe4fb531173 /src/rail_gui.cpp | |
parent | a332d10fd938f345fff18e5f4a662a58f692f734 (diff) | |
download | openttd-f35ed4bbc2b05f1b83476b60948d64375f77f1b4.tar.xz |
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r-- | src/rail_gui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 4b651db5e..a84b4f212 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -37,7 +37,7 @@ static struct { bool dragdrop; bool newstations; - byte station_class; + StationClassIDByte station_class; byte station_type; byte station_count; } _railstation; @@ -107,7 +107,7 @@ static const uint16 _place_depot_extra[12] = { void CcRailDepot(bool success, TileIndex tile, uint32 p1, uint32 p2) { if (success) { - DiagDirection dir = p2; + DiagDirection dir = (DiagDirection)p2; SndPlayTileFx(SND_20_SPLAT_2, tile); ResetObjectToPlace(); @@ -834,7 +834,7 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) case 20: case 21: - _station_show_coverage = e->we.click.widget - 20; + _station_show_coverage = (e->we.click.widget != 20); SetWindowWidgetLoweredState(w, 20, !_station_show_coverage); SetWindowWidgetLoweredState(w, 21, _station_show_coverage); SndPlayFx(SND_15_BEEP); @@ -873,7 +873,7 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) case WE_DROPDOWN_SELECT: if (_railstation.station_class != e->we.dropdown.index) { - _railstation.station_class = e->we.dropdown.index; + _railstation.station_class = (StationClassID)e->we.dropdown.index; _railstation.station_type = 0; _railstation.station_count = GetNumCustomStations(_railstation.station_class); @@ -1023,7 +1023,7 @@ static void BuildTrainDepotWndProc(Window *w, WindowEvent *e) case 5: case 6: RaiseWindowWidget(w, _build_depot_direction + 3); - _build_depot_direction = e->we.click.widget - 3; + _build_depot_direction = (DiagDirection)(e->we.click.widget - 3); LowerWindowWidget(w, _build_depot_direction + 3); SndPlayFx(SND_15_BEEP); SetWindowDirty(w); |