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 | 833032adc09ce95c68d4a4b412221a0b3f88e670 (patch) | |
tree | 80b15078ff5a1c09815ccb23f4c9e7629774dae4 /rail_gui.c | |
parent | 357aba747578ecd3b8cc1a29bc740634211ada37 (diff) | |
download | openttd-833032adc09ce95c68d4a4b412221a0b3f88e670.tar.xz |
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
Diffstat (limited to 'rail_gui.c')
-rw-r--r-- | rail_gui.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/rail_gui.c b/rail_gui.c index 07f38ebc3..2d31d4fbb 100644 --- a/rail_gui.c +++ b/rail_gui.c @@ -285,18 +285,16 @@ static void BuildRailClick_Tunnel(Window *w) static void BuildRailClick_Remove(Window *w) { - if (w->disabled_state & (1<<16)) - return; + if (HASBIT(w->disabled_state, 16)) return; SetWindowDirty(w); SndPlayFx(SND_15_BEEP); - w->click_state ^= (1 << 16); - _remove_button_clicked = (w->click_state & (1 << 16)) != 0; - SetSelectionRed((w->click_state & (1 << 16)) != 0); + TOGGLEBIT(w->click_state, 16); + _remove_button_clicked = HASBIT(w->click_state, 16) != 0; + SetSelectionRed(HASBIT(w->click_state, 16) != 0); // handle station builder - if( w->click_state & (1 << 16) ) - { + if (HASBIT(w->click_state, 16)) { if(_remove_button_clicked) SetTileSelectSize(1, 1); else |