(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT

This commit is contained in:
tron
2005-11-14 08:09:57 +00:00
parent b34de09e62
commit 524fd25cbd
20 changed files with 72 additions and 76 deletions

View File

@@ -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