/[projectaxis]/projectaxis/projectAxis/src/map/blotchmaker.cpp
ViewVC logotype

Diff of /projectaxis/projectAxis/src/map/blotchmaker.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by leiavoia, Sun Sep 14 01:00:50 2003 UTC revision 1.7 by vovansim, Sun Sep 14 23:55:48 2003 UTC
# Line 365  else { Line 365  else {
365                  case LR: // large ring                  case LR: // large ring
366                          for (short int a = -15; a <= 15; a++) {                          for (short int a = -15; a <= 15; a++) {
367                                  for (short int b = -15; b <= 15; b++) {                                  for (short int b = -15; b <= 15; b++) {
368                                          float h = sqrt( float(a*a) + float(b*b) );                                          float h = (float)sqrt( a*a + b*b );
369                                          if (h < 15 && h >= 13) { ApplyTile(x+a, y+b); }                                          if (h < 15 && h >= 13) { ApplyTile(x+a, y+b); }
370                                          }                                          }
371                                  }                                  }
# Line 373  else { Line 373  else {
373                  case MR: // medium ring                  case MR: // medium ring
374                          for (short int a = -8; a <= 8; a++) {                          for (short int a = -8; a <= 8; a++) {
375                                  for (short int b = -8; b <= 8; b++) {                                  for (short int b = -8; b <= 8; b++) {
376                                          float h = sqrt( float(a*a) + float(b*b) );                                          float h = (float)sqrt( a*a + b*b );
377                                          if (h < 8 && h >= 6) { ApplyTile(x+a, y+b); }                                          if (h < 8 && h >= 6) { ApplyTile(x+a, y+b); }
378                                          }                                          }
379                                  }                                  }
# Line 381  else { Line 381  else {
381                  case SR: // small ring                  case SR: // small ring
382                          for (short int a = -3; a <= 3; a++) {                          for (short int a = -3; a <= 3; a++) {
383                                  for (short int b = -3; b <= 3; b++) {                                  for (short int b = -3; b <= 3; b++) {
384                                          float h = sqrt( float(a*a) + float(b*b) );                                          float h = (float)sqrt( a*a + b*b );
385                                          if (h < 3 && h >= 2) { ApplyTile(x+a, y+b); }                                          if (h < 3 && h >= 2) { ApplyTile(x+a, y+b); }
386                                          }                                          }
387                                  }                                  }
# Line 645  int Blotchmaker::AdjustForEdgeAttraction Line 645  int Blotchmaker::AdjustForEdgeAttraction
645    
646  //find the center  //find the center
647  float center;  float center;
648  if (axis == 'X' || axis == 'x') {center = (map_cols-1) / 2.0;} else {center = (map_rows-1) / 2.0;}  if (axis == 'X' || axis == 'x') {center = (map_cols-1) / 2.0f;} else {center = (map_rows-1) / 2.0f;}
649  // minus one because this is for the array index which starts at zero!!!  // minus one because this is for the array index which starts at zero!!!
650    
651  //find the distance from the edge  //find the distance from the edge

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26