Difference for random_maps/random_map.c from version 1.18 to 1.19


version 1.18 version 1.19
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_random_map_c =   * static char *rcsid_random_map_c =
  *   "$Id: random_map.c,v 1.18 2001/04/23 08:01:19 mardahl Exp $";   *   "$Id: random_map.c,v 1.19 2001/04/26 05:37:10 mardahl Exp $";
  */   */
   
 /*  /*
Line 35
 
Line 35
 #include <rproto.h>  #include <rproto.h>
 #include <sproto.h>  #include <sproto.h>
   
   void dump_layout(char **layout,RMParms *RP) {
    { int i,j;
     for(i=0;i<RP->Xsize;i++) {
       for(j=0;j<RP->Ysize;j++) {
         if(layout[i][j]==0) layout[i][j]=' ';
         printf("%c",layout[i][j]);
         if(layout[i][j]==' ') layout[i][j]=0;
       }
       printf("\n");
       }}
   }
 EXTERN FILE *logfile;  EXTERN FILE *logfile;
 mapstruct *generate_random_map(char *OutFileName, RMParms *RP) {  mapstruct *generate_random_map(char *OutFileName, RMParms *RP) {
   char **layout;    char **layout;
Line 61
 
Line 70
   /*  rotate the layout randomly */    /*  rotate the layout randomly */
   layout=rotate_layout(layout,RANDOM()%4,RP);    layout=rotate_layout(layout,RANDOM()%4,RP);
 #ifdef RMAP_DEBUG  #ifdef RMAP_DEBUG
  { int i,j;    dump_layout(layout,RP);
   for(i=0;i<RP->Xsize;i++) {  
     for(j=0;j<RP->Ysize;j++) {  
       if(layout[i][j]==0) layout[i][j]=' ';  
       printf("%c",layout[i][j]);  
       if(layout[i][j]==' ') layout[i][j]=0;  
     }  
     printf("\n");  
     }}  
 #endif  #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);


Legend:
line(s) removed in v.1.18 
line(s) changed
 line(s) added in v.1.19

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