diff options
author | tron <tron@openttd.org> | 2005-11-14 08:09:57 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-11-14 08:09:57 +0000 |
commit | 524fd25cbd2b32fd8166e196c5eab1f2f7e82a8a (patch) | |
tree | 80b15078ff5a1c09815ccb23f4c9e7629774dae4 /road_gui.c | |
parent | b34de09e627fc5f8d7579c96c8b4290593c1dd32 (diff) | |
download | openttd-524fd25cbd2b32fd8166e196c5eab1f2f7e82a8a.tar.xz |
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
Diffstat (limited to 'road_gui.c')
-rw-r--r-- | road_gui.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/road_gui.c b/road_gui.c index facebc49a..dbb0ea1af 100644 --- a/road_gui.c +++ b/road_gui.c @@ -159,12 +159,11 @@ static void BuildRoadClick_Tunnel(Window *w) static void BuildRoadClick_Remove(Window *w) { - if (w->disabled_state & (1<<11)) - return; + if (HASBIT(w->disabled_state, 11)) return; SetWindowDirty(w); SndPlayFx(SND_15_BEEP); - w->click_state ^= (1 << 11); - SetSelectionRed((w->click_state & (1 << 11)) != 0); + TOGGLEBIT(w->click_state, 11); + SetSelectionRed(HASBIT(w->click_state, 11) != 0); } static void BuildRoadClick_Landscaping(Window *w) |