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 |
} |
} |
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 |
} |
} |
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 |
} |
} |
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 |