Difference for random_maps/special.c from version 1.9 to 1.10


version 1.9 version 1.10
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_special_c =   * static char *rcsid_special_c =
  *   "$Id: special.c,v 1.9 2000/12/04 00:40:05 cvs Exp $";   *   "$Id: special.c,v 1.10 2000/12/15 03:09:19 peterm Exp $";
  */   */
   
 /*  /*
Line 31
 
Line 31
   
 #include <global.h>  #include <global.h>
 #include <random_map.h>  #include <random_map.h>
   #include <rproto.h>
   
 #define NUM_OF_SPECIAL_TYPES 4  #define NUM_OF_SPECIAL_TYPES 4
 #define NO_SPECIAL 0  #define NO_SPECIAL 0
Line 163
 
Line 164
   
 }  }
   
 void place_special_exit(mapstruct * map, int hole_type) {  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];
   mapstruct *exit_style=find_style("/styles/misc","obscure_exits",-1);    mapstruct *exit_style=find_style("/styles/misc","obscure_exits",-1);
Line 190
 
Line 191
   case GLORY_HOLE:   /* treasures */    case GLORY_HOLE:   /* treasures */
  {   {
  int g_xsize,g_ysize;   int g_xsize,g_ysize;
  g_xsize = RANDOM() %3 + 4 + difficulty/4;        g_xsize = RANDOM() %3 + 4 + RP->difficulty/4;
  g_ysize = RANDOM() %3 + 4 + difficulty/4;        g_ysize = RANDOM() %3 + 4 + RP->difficulty/4;
  write_parameters_to_string(buf, g_xsize, g_ysize,wallstyle,floorstyle,"none",        write_parameters_to_string(buf, g_xsize, g_ysize,RP->wallstyle,RP->floorstyle,"none",
  "none","onion","wealth2","none",exitstyle,0,0,                                   "none","onion","wealth2","none",RP->exitstyle,0,0,
  OPT_WALLS_ONLY,0,0,1,dungeon_level,dungeon_level,                                   OPT_WALLS_ONLY,0,0,1,RP->dungeon_level,RP->dungeon_level,
  difficulty,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;   break;
Line 203
 
Line 204
   case ORC_ZONE:  /* hole with orcs in it. */    case ORC_ZONE:  /* hole with orcs in it. */
  {   {
  int g_xsize,g_ysize;   int g_xsize,g_ysize;
  g_xsize = RANDOM() %3 + 4 + difficulty/4;        g_xsize = RANDOM() %3 + 4 + RP->difficulty/4;
  g_ysize = RANDOM() %3 + 4 + difficulty/4;        g_ysize = RANDOM() %3 + 4 + RP->difficulty/4;
  write_parameters_to_string(buf, g_xsize, g_ysize,wallstyle,floorstyle,"orc",        write_parameters_to_string(buf, g_xsize, g_ysize,RP->wallstyle,RP->floorstyle,"orc",
  "none","onion","wealth2","none",exitstyle,0,0,                                   "none","onion","wealth2","none",RP->exitstyle,0,0,
  OPT_WALLS_ONLY,0,0,1,dungeon_level,dungeon_level,                                   OPT_WALLS_ONLY,0,0,1,RP->dungeon_level,RP->dungeon_level,
  difficulty,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;   break;
Line 216
 
Line 217
   case MINING_ZONE:  /* hole with orcs in it. */    case MINING_ZONE:  /* hole with orcs in it. */
  {   {
  int g_xsize,g_ysize;   int g_xsize,g_ysize;
  g_xsize = RANDOM() %9 + 4 + difficulty/4;        g_xsize = RANDOM() %9 + 4 + RP->difficulty/4;
  g_ysize = RANDOM() %9 + 4 + difficulty/4;        g_ysize = RANDOM() %9 + 4 + RP->difficulty/4;
  write_parameters_to_string(buf, g_xsize, g_ysize,wallstyle,floorstyle,"none",        write_parameters_to_string(buf, g_xsize, g_ysize,RP->wallstyle,RP->floorstyle,"none",
  "none","maze","minerals2","none",exitstyle,0,0,                                   "none","maze","minerals2","none",RP->exitstyle,0,0,
  OPT_WALLS_ONLY,0,0,1,dungeon_level,dungeon_level,                                   OPT_WALLS_ONLY,0,0,1,RP->dungeon_level,RP->dungeon_level,
  difficulty,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;   break;
Line 233
 
Line 234
 }  }
      
        
 void place_specials_in_map(mapstruct *map, char **layout) {  void place_specials_in_map(mapstruct *map, char **layout,RMParms *RP) {
   mapstruct *special_map;    mapstruct *special_map;
   int ix,iy;  /* map insertion locatons */    int ix,iy;  /* map insertion locatons */
   int special_type; /* type of special to make */    int special_type; /* type of special to make */
Line 244
 
Line 245
   
  /* includes a special map into the random map being made. */   /* includes a special map into the random map being made. */
   case SPECIAL_SUBMAP: {    case SPECIAL_SUBMAP: {
  special_map = find_style("/styles/specialmaps",0,difficulty);       special_map = find_style("/styles/specialmaps",0,RP->difficulty);
  if(special_map==NULL) return;   if(special_map==NULL) return;
    
  if(find_spot_for_submap(map,layout,&ix,&iy,special_map->mapx,special_map->mapy))    if(find_spot_for_submap(map,layout,&ix,&iy,special_map->mapx,special_map->mapy))
Line 261
 
Line 262
   
   /* Make an exit to another random map, e.g. a gloryhole. */    /* Make an exit to another random map, e.g. a gloryhole. */
   case SPECIAL_EXIT: {    case SPECIAL_EXIT: {
  place_special_exit(map,0);      place_special_exit(map,0,RP);
  break;   break;
   }    }
   }    }


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

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