diff options
author | rubidium <rubidium@openttd.org> | 2008-04-21 14:33:33 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-21 14:33:33 +0000 |
commit | e947fde7013a09d58744604faaf3c574dae51c47 (patch) | |
tree | 4c1ef67d89a0fbc13b10c3ed8a9880350b14ab12 /src/rail_gui.cpp | |
parent | bbe13a0623eea9f46353fca57a35ae745040fbaf (diff) | |
download | openttd-e947fde7013a09d58744604faaf3c574dae51c47.tar.xz |
(svn r12819) -Codechange: handle more NewGRFs in the same way as TTDP does it, i.e. testing the low bits for 0xFF or 0 instead of all bits.
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r-- | src/rail_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index bfcad9ba7..748c74249 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -952,7 +952,7 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) const StationSpec *statspec = GetCustomStationSpec(_railstation.station_class, i); if (statspec != NULL && statspec->name != 0) { - if (HasBit(statspec->callbackmask, CBM_STATION_AVAIL) && GetStationCallback(CBID_STATION_AVAILABILITY, 0, 0, statspec, NULL, INVALID_TILE) == 0) { + if (HasBit(statspec->callbackmask, CBM_STATION_AVAIL) && GB(GetStationCallback(CBID_STATION_AVAILABILITY, 0, 0, statspec, NULL, INVALID_TILE), 0, 8) == 0) { GfxFillRect(8, y - 2, 127, y + 10, (1 << PALETTE_MODIFIER_GREYOUT)); } @@ -1097,7 +1097,7 @@ static void StationBuildWndProc(Window *w, WindowEvent *e) statspec = GetCustomStationSpec(_railstation.station_class, y); if (statspec != NULL && HasBit(statspec->callbackmask, CBM_STATION_AVAIL) && - GetStationCallback(CBID_STATION_AVAILABILITY, 0, 0, statspec, NULL, INVALID_TILE) == 0) return; + GB(GetStationCallback(CBID_STATION_AVAILABILITY, 0, 0, statspec, NULL, INVALID_TILE), 0, 8) == 0) return; _railstation.station_type = y; @@ -1510,7 +1510,7 @@ static void BuildWaypointWndProc(Window *w, WindowEvent *e) if (statspec != NULL && HasBit(statspec->callbackmask, CBM_STATION_AVAIL) && - GetStationCallback(CBID_STATION_AVAILABILITY, 0, 0, statspec, NULL, INVALID_TILE) == 0) { + GB(GetStationCallback(CBID_STATION_AVAILABILITY, 0, 0, statspec, NULL, INVALID_TILE), 0, 8) == 0) { GfxFillRect(4 + i * 68, 18, 67 + i * 68, 75, (1 << PALETTE_MODIFIER_GREYOUT)); } } @@ -1530,7 +1530,7 @@ static void BuildWaypointWndProc(Window *w, WindowEvent *e) const StationSpec *statspec = GetCustomStationSpec(STAT_CLASS_WAYP, type); if (statspec != NULL && HasBit(statspec->callbackmask, CBM_STATION_AVAIL) && - GetStationCallback(CBID_STATION_AVAILABILITY, 0, 0, statspec, NULL, INVALID_TILE) == 0) return; + GB(GetStationCallback(CBID_STATION_AVAILABILITY, 0, 0, statspec, NULL, INVALID_TILE), 0, 8) == 0) return; _cur_waypoint_type = type; SndPlayFx(SND_15_BEEP); |