Difference for random_maps/wall.c from version 1.8 to 1.9


version 1.8 version 1.9
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_wall_c =   * static char *rcsid_wall_c =
  *   "$Id: wall.c,v 1.8 2002/07/15 04:25:40 mwedel Exp $";   *   "$Id: wall.c,v 1.9 2003/01/08 08:39:18 mwedel Exp $";
  */   */
   
 /*  /*
Line 75
 
Line 75
    8 = blocked below */     8 = blocked below */
   int surround_index = 0;    int surround_index = 0;
   
   if((i > 0) && blocked(map,i-1,j)) surround_index |=1;    if((i > 0) && (get_map_flags(map,NULL, i-1,j, NULL, NULL) & P_BLOCKED))
   if((i < RP->Xsize-1) && blocked(map,i+1,j)) surround_index |=2;      surround_index |=1;
   if((j > 0) && blocked(map,i,j-1)) surround_index |=4;    if((i < RP->Xsize-1) && (get_map_flags(map,NULL, i+1,j, NULL, NULL) & P_BLOCKED))
   if((j < RP->Ysize-1) && blocked(map,i,j+1)) surround_index |=8;      surround_index |=2;
     if((j > 0) && (get_map_flags(map, NULL, i,j-1, NULL, NULL) & P_BLOCKED))
       surround_index |=4;
     if((j < RP->Ysize-1) && (get_map_flags(map,NULL, i,j+1, NULL, NULL) & P_BLOCKED))
       surround_index |=8;
   
   return surround_index;    return surround_index;
 }  }
Line 109
 
Line 113
   mapstruct *style_map=0;    mapstruct *style_map=0;
   object *the_wall;    object *the_wall;
      
   
   /* get the style map */    /* get the style map */
   if(!strcmp(w_style,"none")) return;    if(!strcmp(w_style,"none")) return;
   sprintf(styledirname,"%s","/styles/wallstyles");    sprintf(styledirname,"%s","/styles/wallstyles");
Line 124
 
Line 127
   
  sprintf(RP->wall_name,"%s",the_wall->arch->name);   sprintf(RP->wall_name,"%s",the_wall->arch->name);
  if ((cp=strchr(RP->wall_name,'_'))!=NULL) *cp=0;   if ((cp=strchr(RP->wall_name,'_'))!=NULL) *cp=0;
   
  for(i=0;i<RP->Xsize;i++)   for(i=0;i<RP->Xsize;i++)
  for(j=0;j<RP->Ysize;j++) {   for(j=0;j<RP->Ysize;j++) {
    if(layout[i][j]=='#') {     if(layout[i][j]=='#') {
  object *thiswall=pick_joined_wall(the_wall,layout,i,j,RP);   object *thiswall=pick_joined_wall(the_wall,layout,i,j,RP);
  thiswall->x = i; thiswall->y = j;  
        thiswall->x = i;
        thiswall->y = j;
  SET_FLAG(thiswall,FLAG_NO_PASS); /* make SURE it's a wall */   SET_FLAG(thiswall,FLAG_NO_PASS); /* make SURE it's a wall */
  wall(map,i,j);  
  insert_ob_in_map(thiswall,map,thiswall,INS_NO_MERGE | INS_NO_WALK_ON);   insert_ob_in_map(thiswall,map,thiswall,INS_NO_MERGE | INS_NO_WALK_ON);
    }     }
  }   }
   }    }
   
     
 }  }
   
   


Legend:
line(s) removed in v.1.8 
line(s) changed
 line(s) added in v.1.9

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