Difference for random_maps/random_map.c from version 1.13 to 1.14


version 1.13 version 1.14
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_random_map_c =   * static char *rcsid_random_map_c =
  *   "$Id: random_map.c,v 1.13 2001/01/16 07:46:04 peterm Exp $";   *   "$Id: random_map.c,v 1.14 2001/01/16 08:20:53 peterm Exp $";
  */   */
   
 /*  /*
Line 80
 
Line 80
   
   /*  rotate the layout randomly */    /*  rotate the layout randomly */
   layout=rotate_layout(layout,RANDOM()%4,RP);    layout=rotate_layout(layout,RANDOM()%4,RP);
   /*  { int i,j;  #ifdef RMAP_DEBUG
    { int i,j;
   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]==0) layout[i][j]=' ';        if(layout[i][j]==0) layout[i][j]=' ';
Line 88
 
Line 89
       if(layout[i][j]==' ') layout[i][j]=0;        if(layout[i][j]==' ') layout[i][j]=0;
     }      }
     printf("\n");      printf("\n");
     }}*/      }}
   #endif
   /* allocate the map and set the floor */    /* allocate the map and set the floor */
   theMap = make_map_floor(layout,RP->floorstyle,RP);     theMap = make_map_floor(layout,RP->floorstyle,RP);
   
Line 168
 
Line 170
     if(!(RANDOM()%2)) doorify_layout(maze,RP);      if(!(RANDOM()%2)) doorify_layout(maze,RP);
   }    }
   
     if(strstr(RP->layoutstyle,"rogue")) {
       maze = roguelike_layout_gen(RP->Xsize,RP->Ysize,RP->layoutoptions1);
       RP->map_layout_style = ROGUELIKE_LAYOUT;
       /* no doorification */
     }
   
   if(maze == 0) /* unknown or unspecified layout type, pick one at random */    if(maze == 0) /* unknown or unspecified layout type, pick one at random */
     switch(RANDOM()%NROFLAYOUTS) {      switch(RANDOM()%NROFLAYOUTS) {
     case 0:      case 0:
Line 185
 
Line 193
       RP->map_layout_style = SPIRAL_LAYOUT;        RP->map_layout_style = SPIRAL_LAYOUT;
       if(!(RANDOM()%2)) doorify_layout(maze,RP);        if(!(RANDOM()%2)) doorify_layout(maze,RP);
       break;        break;
     case 4:      case 3:
       maze = roguelike_layout_gen(RP->Xsize,RP->Ysize,RP->layoutoptions1);        maze = roguelike_layout_gen(RP->Xsize,RP->Ysize,RP->layoutoptions1);
       RP->map_layout_style = ROGUELIKE_LAYOUT;        RP->map_layout_style = ROGUELIKE_LAYOUT;
       /* no doorifying...  done already */        /* no doorifying...  done already */
                 break;
     }      }
   
   maze = symmetrize_layout(maze, RP->symmetry_used,RP);    maze = symmetrize_layout(maze, RP->symmetry_used,RP);
Line 245
 
Line 253
   for(i=0;i<Xsize_orig;i++)    for(i=0;i<Xsize_orig;i++)
     free(maze[i]);      free(maze[i]);
   free(maze);    free(maze);
   /* reconnected disjointed spirals */    /* reconnect disjointed spirals */
   if(RP->map_layout_style==SPIRAL_LAYOUT)     if(RP->map_layout_style==SPIRAL_LAYOUT)
     connect_spirals(RP->Xsize,RP->Ysize,sym,sym_maze);      connect_spirals(RP->Xsize,RP->Ysize,sym,sym_maze);
     /* reconnect disjointed nethackmazes:  the routine for
      spirals will do the trick?*/
     if(RP->map_layout_style==ROGUELIKE_LAYOUT)
       connect_spirals(RP->Xsize,RP->Ysize,sym,sym_maze);
    
   return sym_maze;    return sym_maze;
 }  }
   


Legend:
line(s) removed in v.1.13 
line(s) changed
 line(s) added in v.1.14

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