version 1.14 | | version 1.15 |
---|
| | |
/* | | /* |
* static char *rcsid_button_c = | | * static char *rcsid_button_c = |
* "$Id: button.c,v 1.14 2001/06/11 18:47:05 michtoen Exp $"; | | * "$Id: button.c,v 1.15 2001/07/14 04:04:53 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
break; | | break; |
case CF_HANDLE: | | case CF_HANDLE: |
SET_ANIMATION(tmp, (tmp->value=tmp->stats.maxsp?!op->value:op->value)); | | SET_ANIMATION(tmp, (tmp->value=tmp->stats.maxsp?!op->value:op->value)); |
update_object(tmp); | | update_object(tmp,UP_OBJ_FACE); |
break; | | break; |
case SIGN: | | case SIGN: |
if (!tmp->stats.food || tmp->last_eat < tmp->stats.food) { | | if (!tmp->stats.food || tmp->last_eat < tmp->stats.food) { |
| | |
case ALTAR: | | case ALTAR: |
tmp->value = 1; | | tmp->value = 1; |
SET_ANIMATION(tmp, tmp->value); | | SET_ANIMATION(tmp, tmp->value); |
update_object(tmp); | | update_object(tmp,UP_OBJ_FACE); |
break; | | break; |
case BUTTON: | | case BUTTON: |
case PEDESTAL: | | case PEDESTAL: |
tmp->value=op->value; | | tmp->value=op->value; |
SET_ANIMATION(tmp, tmp->value); | | SET_ANIMATION(tmp, tmp->value); |
update_object(tmp); | | update_object(tmp,UP_OBJ_FACE); |
break; | | break; |
case MOOD_FLOOR: | | case MOOD_FLOOR: |
do_mood_floor(tmp, op); | | do_mood_floor(tmp, op); |
| | |
/* If this button hasn't changed, don't do anything */ | | /* If this button hasn't changed, don't do anything */ |
if (op->value != old_value) { | | if (op->value != old_value) { |
SET_ANIMATION(op, op->value); | | SET_ANIMATION(op, op->value); |
update_object(op); | | update_object(op, UP_OBJ_FACE); |
push_button(op); /* Make all other buttons the same */ | | push_button(op); /* Make all other buttons the same */ |
} | | } |
} | | } |
| | |
op->state=0; | | op->state=0; |
SET_ANIMATION(op, (op->stats.sp-1) * NUM_ANIMATIONS(op) / 8 + | | SET_ANIMATION(op, (op->stats.sp-1) * NUM_ANIMATIONS(op) / 8 + |
op->state); | | op->state); |
update_object(op); | | update_object(op,UP_OBJ_FACE); |
} | | } |
| | |
#define ARCH_SACRIFICE(xyz) ((xyz)->slaying) | | #define ARCH_SACRIFICE(xyz) ((xyz)->slaying) |
| | |
return 0; | | return 0; |
op->stats.ac = push; | | op->stats.ac = push; |
SET_ANIMATION (op, push); | | SET_ANIMATION (op, push); |
update_object (op); | | update_object (op, UP_OBJ_FACE); |
if (in_movement || ! push) | | if (in_movement || ! push) |
return 0; | | return 0; |
} | | } |
| | |
return 0; | | return 0; |
op->stats.ac = push; | | op->stats.ac = push; |
SET_ANIMATION (op, push); | | SET_ANIMATION (op, push); |
update_object(op); | | update_object(op,UP_OBJ_FACE); |
if (in_movement || ! push) | | if (in_movement || ! push) |
return 0; | | return 0; |
} | | } |
| | |
return 0; | | return 0; |
if (operate_altar (op, &cause)) { | | if (operate_altar (op, &cause)) { |
SET_ANIMATION (op, 1); | | SET_ANIMATION (op, 1); |
update_object(op); | | update_object(op,UP_OBJ_FACE); |
| | |
if (op->last_sp >= 0) { | | if (op->last_sp >= 0) { |
trigger_move (op, 1); | | trigger_move (op, 1); |
| | |
} | | } |
} else { | | } else { |
SET_ANIMATION (op, 0); | | SET_ANIMATION (op, 0); |
update_object(op); | | update_object(op,UP_OBJ_FACE); |
| | |
/* If trigger_altar has "last_sp > 0" set on the map, | | /* If trigger_altar has "last_sp > 0" set on the map, |
it will push the connected value only once per sacrifice. | | it will push the connected value only once per sacrifice. |
| | |
push = 1; | | push = 1; |
} | | } |
SET_ANIMATION (op, push); | | SET_ANIMATION (op, push); |
update_object(op); | | update_object(op,UP_OBJ_FACE); |
trigger_move (op, push); | | trigger_move (op, push); |
return 1; | | return 1; |
| | |