Difference for common/button.c from version 1.18 to 1.19


version 1.18 version 1.19
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_button_c =   * static char *rcsid_button_c =
  *   "$Id: button.c,v 1.18 2002/09/05 06:19:27 mwedel Exp $";   *   "$Id: button.c,v 1.19 2002/09/18 06:17:19 mwedel Exp $";
  */   */
   
 /*  /*
Line 60
 
Line 60
          
     if (QUERY_FLAG(ol->ob, FLAG_FREED)) return;      if (QUERY_FLAG(ol->ob, FLAG_FREED)) return;
     tmp = ol->ob;      tmp = ol->ob;
   
    /* if the criteria isn't appropriate, don't do anything */
    if (op->value && !QUERY_FLAG(tmp, FLAG_ACTIVATE_ON_PUSH)) continue;
    if (!op->value && !QUERY_FLAG(tmp, FLAG_ACTIVATE_ON_RELEASE)) continue;
   
     switch(tmp->type) {      switch(tmp->type) {
   
     case GATE:      case GATE:
     case HOLE:      case HOLE:
       tmp->value=tmp->stats.maxsp?!op->value:op->value;        tmp->value=tmp->stats.maxsp?!op->value:op->value;
       tmp->speed=0.5;        tmp->speed=0.5;
       update_ob_speed(tmp);        update_ob_speed(tmp);
       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,UP_OBJ_FACE);   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) {
         (*info_map_func)(NDI_UNIQUE | NDI_NAVY,tmp->map,tmp->msg);          (*info_map_func)(NDI_UNIQUE | NDI_NAVY,tmp->map,tmp->msg);
         if (tmp->stats.food) tmp->last_eat++;          if (tmp->stats.food) tmp->last_eat++;
       }        }
       break;        break;
   
     case ALTAR:      case ALTAR:
  tmp->value = 1;   tmp->value = 1;
  SET_ANIMATION(tmp, tmp->value);   SET_ANIMATION(tmp, tmp->value);
  update_object(tmp,UP_OBJ_FACE);   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,UP_OBJ_FACE);   update_object(tmp,UP_OBJ_FACE);
  break;   break;
   
     case MOOD_FLOOR:      case MOOD_FLOOR:
  do_mood_floor(tmp, op);   do_mood_floor(tmp, op);
  break;   break;
   
     case TIMED_GATE:      case TIMED_GATE:
  tmp->speed = tmp->arch->clone.speed;   tmp->speed = tmp->arch->clone.speed;
  update_ob_speed(tmp);  /* original values */   update_ob_speed(tmp);  /* original values */
         tmp->value = tmp->arch->clone.value;          tmp->value = tmp->arch->clone.value;
         tmp->stats.sp = 1;          tmp->stats.sp = 1;
         tmp->stats.hp = tmp->stats.maxhp;          tmp->stats.hp = tmp->stats.maxhp;
    /* Handle multipart gates.  We copy the value for the other parts
    * from the head - this ensures that the data will consistent
    */
    for (tmp=tmp->more; tmp!=NULL; tmp=tmp->more) {
        tmp->speed = tmp->head->speed;
        tmp->value = tmp->head->value;
        tmp->stats.sp = tmp->head->stats.sp;
        tmp->stats.hp = tmp->head->stats.hp;
        update_ob_speed(tmp);
    }
         break;          break;
   
     case DIRECTOR:      case DIRECTOR:
     case FIREWALL:      case FIREWALL:
  if(!QUERY_FLAG(tmp,FLAG_ANIMATE)&&tmp->type==FIREWALL) (*move_firewall_func)(tmp);   if(!QUERY_FLAG(tmp,FLAG_ANIMATE)&&tmp->type==FIREWALL) (*move_firewall_func)(tmp);
Line 107
 
Line 130
         animate_turning(tmp);          animate_turning(tmp);
  }   }
         break;          break;
   
     case TELEPORTER:      case TELEPORTER:
  (*move_teleporter_func)(tmp);   (*move_teleporter_func)(tmp);
  break;   break;
   
     case CREATOR:      case CREATOR:
  (*move_creator_func)(tmp);   (*move_creator_func)(tmp);
  break;   break;


Legend:
line(s) removed in v.1.18 
line(s) changed
 line(s) added in v.1.19

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:05