Difference for random_maps/random_map.c from version 1.33 to 1.34


version 1.33 version 1.34
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_random_map_c =   * static char *rcsid_random_map_c =
  *   "$Id: random_map.c,v 1.33 2003/03/07 07:33:13 mwedel Exp $";   *   "$Id: random_map.c,v 1.34 2003/03/09 00:18:41 mwedel Exp $";
  */   */
   
 /*  /*
Line 65
 
Line 65
     else      else
  RP->difficulty_given=1;   RP->difficulty_given=1;
   
       if(RP->Xsize<MIN_RANDOM_MAP_SIZE) RP->Xsize = MIN_RANDOM_MAP_SIZE + RANDOM()%25 + 5;
       if(RP->Ysize<MIN_RANDOM_MAP_SIZE) RP->Ysize = MIN_RANDOM_MAP_SIZE + RANDOM()%25 + 5;
   
     if(RP->expand2x > 0) {      if(RP->expand2x > 0) {
  RP->Xsize /=2;   RP->Xsize /=2;
  RP->Ysize /=2;   RP->Ysize /=2;
Line 132
 
Line 135
 char **layoutgen(RMParms *RP) {  char **layoutgen(RMParms *RP) {
     char **maze=0;      char **maze=0;
   
     if(RP->Xsize<MIN_RANDOM_MAP_SIZE) RP->Xsize = MIN_RANDOM_MAP_SIZE + RANDOM()%25 + 5;      if(RP->symmetry == RANDOM_SYM)
     if(RP->Ysize<MIN_RANDOM_MAP_SIZE) RP->Ysize = MIN_RANDOM_MAP_SIZE + RANDOM()%25 + 5;  
     
     if(RP->symmetry == RANDOM_SYM) {  
  RP->symmetry_used = (RANDOM() % ( XY_SYM))+1;   RP->symmetry_used = (RANDOM() % ( XY_SYM))+1;
       else RP->symmetry_used = RP->symmetry;
   
  if(RP->symmetry_used==Y_SYM||RP->symmetry_used==XY_SYM) RP->Ysize = RP->Ysize/2+1;   if(RP->symmetry_used==Y_SYM||RP->symmetry_used==XY_SYM) RP->Ysize = RP->Ysize/2+1;
  if(RP->symmetry_used==X_SYM||RP->symmetry_used==XY_SYM) RP->Xsize = RP->Xsize/2+1;   if(RP->symmetry_used==X_SYM||RP->symmetry_used==XY_SYM) RP->Xsize = RP->Xsize/2+1;
     }  
     else RP->symmetry_used = RP->symmetry;  
   
     if(RP->symmetry==Y_SYM||RP->symmetry==XY_SYM) RP->Ysize = RP->Ysize/2+1;      if(RP->Xsize<MIN_RANDOM_MAP_SIZE) RP->Xsize = MIN_RANDOM_MAP_SIZE + RANDOM()%5;
     if(RP->symmetry==X_SYM||RP->symmetry==XY_SYM) RP->Xsize = RP->Xsize/2+1;      if(RP->Ysize<MIN_RANDOM_MAP_SIZE) RP->Ysize = MIN_RANDOM_MAP_SIZE + RANDOM()%5;
   
     if(strstr(RP->layoutstyle,"onion")) {      if(strstr(RP->layoutstyle,"onion")) {
  maze = map_gen_onion(RP->Xsize,RP->Ysize,RP->layoutoptions1,RP->layoutoptions2);   maze = map_gen_onion(RP->Xsize,RP->Ysize,RP->layoutoptions1,RP->layoutoptions2);


Legend:
line(s) removed in v.1.33 
line(s) changed
 line(s) added in v.1.34

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