Difference for random_maps/special.c from version 1.16 to 1.17


version 1.16 version 1.17
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_special_c =   * static char *rcsid_special_c =
  *   "$Id: special.c,v 1.16 2002/07/15 04:25:40 mwedel Exp $";   *   "$Id: special.c,v 1.17 2002/09/07 05:55:18 mwedel Exp $";
  */   */
   
 /*  /*
Line 173
 
Line 173
   
 void place_special_exit(mapstruct * map, int hole_type,RMParms *RP) {  void place_special_exit(mapstruct * map, int hole_type,RMParms *RP) {
   int ix,iy,i=-1;    int ix,iy,i=-1;
   char buf[HUGE_BUF];      char buf[HUGE_BUF], *style, *decor, *mon;
   mapstruct *exit_style=find_style("/styles/misc","obscure_exits",-1);    mapstruct *exit_style=find_style("/styles/misc","obscure_exits",-1);
       int g_xsize,g_ysize;
      
   object *the_exit=get_object();    object *the_exit=get_object();
   if(!exit_style) return;    if(!exit_style) return;
Line 185
 
Line 186
     ix = RANDOM() % (MAP_WIDTH(map) -2) +1;      ix = RANDOM() % (MAP_WIDTH(map) -2) +1;
     iy = RANDOM() % (MAP_HEIGHT(map) -2) +1;      iy = RANDOM() % (MAP_HEIGHT(map) -2) +1;
     i = find_first_free_spot(the_exit->arch,map,ix,iy);      i = find_first_free_spot(the_exit->arch,map,ix,iy);
   };      }
      
   ix += freearr_x[i];    ix += freearr_x[i];
   iy += freearr_y[i];    iy += freearr_y[i];
Line 197
 
Line 198
   switch(hole_type) {    switch(hole_type) {
   case GLORY_HOLE:   /* treasures */    case GLORY_HOLE:   /* treasures */
     {      {
       int g_xsize,g_ysize;  
       g_xsize = RANDOM() %3 + 4 + RP->difficulty/4;        g_xsize = RANDOM() %3 + 4 + RP->difficulty/4;
       g_ysize = RANDOM() %3 + 4 + RP->difficulty/4;        g_ysize = RANDOM() %3 + 4 + RP->difficulty/4;
       write_parameters_to_string(buf, g_xsize, g_ysize,RP->wallstyle,RP->floorstyle,"none",   style = "onion";
                                  "none","onion","wealth2","none",RP->exitstyle,0,0,   decor = "wealth2";
                                  OPT_WALLS_ONLY,0,0,1,RP->dungeon_level,RP->dungeon_level,   mon = "none";
                                  RP->difficulty,RP->difficulty,-1,1,0,0,0,0);  
       the_exit->slaying = add_string("/!");  
       the_exit->msg = add_string(buf);  
       break;        break;
     }      }
   
   case ORC_ZONE:  /* hole with orcs in it. */    case ORC_ZONE:  /* hole with orcs in it. */
     {      {
       int g_xsize,g_ysize;  
       g_xsize = RANDOM() %3 + 4 + RP->difficulty/4;        g_xsize = RANDOM() %3 + 4 + RP->difficulty/4;
       g_ysize = RANDOM() %3 + 4 + RP->difficulty/4;        g_ysize = RANDOM() %3 + 4 + RP->difficulty/4;
       write_parameters_to_string(buf, g_xsize, g_ysize,RP->wallstyle,RP->floorstyle,"orc",   style = "onion";
                                  "none","onion","wealth2","none",RP->exitstyle,0,0,   decor = "wealth2";
                                  OPT_WALLS_ONLY,0,0,1,RP->dungeon_level,RP->dungeon_level,   mon = "orc";
                                  RP->difficulty,RP->difficulty,-1,1,0,0,0,0);  
       the_exit->slaying = add_string("/!");  
       the_exit->msg = add_string(buf);  
       break;        break;
     }      }
   
   case MINING_ZONE:  /* hole with orcs in it. */    case MINING_ZONE:  /* hole with orcs in it. */
     {      {
       int g_xsize,g_ysize;  
       g_xsize = RANDOM() %9 + 4 + RP->difficulty/4;        g_xsize = RANDOM() %9 + 4 + RP->difficulty/4;
       g_ysize = RANDOM() %9 + 4 + RP->difficulty/4;        g_ysize = RANDOM() %9 + 4 + RP->difficulty/4;
       write_parameters_to_string(buf, g_xsize, g_ysize,RP->wallstyle,RP->floorstyle,"none",   style = "maze";
                                  "none","maze","minerals2","none",RP->exitstyle,0,0,   decor = "minerals2";
    mon = "none";
    break;
        }
       }
   
       /* Need to be at least this size, otherwise the load
        * code will generate new size values which are too large.
        */
       if (g_xsize < 7) g_xsize = 7;
       if (g_ysize < 7) g_ysize = 7;
   
       write_parameters_to_string(buf, g_xsize, g_ysize,RP->wallstyle,RP->floorstyle,mon,
                                    "none",style,decor,"none",RP->exitstyle,0,0,
                                  OPT_WALLS_ONLY,0,0,1,RP->dungeon_level,RP->dungeon_level,                                   OPT_WALLS_ONLY,0,0,1,RP->dungeon_level,RP->dungeon_level,
                                  RP->difficulty,RP->difficulty,-1,1,0,0,0,0);                                   RP->difficulty,RP->difficulty,-1,1,0,0,0,0);
       the_exit->slaying = add_string("/!");        the_exit->slaying = add_string("/!");
       the_exit->msg = add_string(buf);        the_exit->msg = add_string(buf);
       break;  
     }  
   
    
   }  
   insert_ob_in_map(the_exit,map,NULL,0);    insert_ob_in_map(the_exit,map,NULL,0);
 }  }
      


Legend:
line(s) removed in v.1.16 
line(s) changed
 line(s) added in v.1.17

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