Difference for random_maps/rogue_layout.c from version 1.4 to 1.5


version 1.4 version 1.5
Line 25
 
Line 25
    4 = wall above     4 = wall above
    8 = wall below */     8 = wall below */
   int surround_index = 0;    int surround_index = 0;
   if((i > 0) && layout[i-1][j]!=0) surround_index |=1;    if((i > 0) && (layout[i-1][j]!=0&&layout[i-1][j]!='.')) surround_index +=1;
   if((i < Xsize-1) && layout[i+1][j]!=0) surround_index |=2;    if((i < Xsize-1) && (layout[i+1][j]!=0&&layout[i+1][j]!='.')) surround_index +=2;
   if((j > 0) && layout[i][j-1]!=0) surround_index |=4;    if((j > 0) && (layout[i][j-1]!=0&&layout[i][j-1]!='.')) surround_index +=4;
   if((j < Ysize-1) && layout[i][j+1]!=0) surround_index |=8;    if((j < Ysize-1) && (layout[i][j+1]!=0&&layout[i][j+1]!='.')) surround_index +=8;
   return surround_index;    return surround_index;
 }  }
   
Line 100
 
Line 100
   maze[walk->x][walk->y] = '>';    maze[walk->x][walk->y] = '>';
   
   /* convert all the '.' to 0, we're through with the '.' */    /* convert all the '.' to 0, we're through with the '.' */
   /* also, fix any 'dangling doors' */  
   for(i=0;i<xsize;i++)    for(i=0;i<xsize;i++)
     for(j=0;j<ysize;j++) {      for(j=0;j<ysize;j++) {
       if(maze[i][j]=='.') maze[i][j]=0;        if(maze[i][j]=='.') maze[i][j]=0;
       if(maze[i][j]=='D') {  /* remove bad door. */        if(maze[i][j]=='D') {  /* remove bad door. */
         int si = surround_check(maze,i,j,xsize,ysize);          int si = surround_check(maze,i,j,xsize,ysize);
         if(si!=3 && si!=12) maze[i][j]=0;          if(si!=3 && si!=12) {
             maze[i][j]=0;
             /* back up and recheck any nearby doors */
             i=0;j=0;
           }
       }        }
     }      }
                  


Legend:
line(s) removed in v.1.4 
line(s) changed
 line(s) added in v.1.5

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