for (sizepower = 0;(1 << sizepower) < size;sizepower++);
if (size != (1 << sizepower))
- Sys_Error("fractalnoise: size must be power of 2\n");
+ {
+ Con_Printf("fractalnoise: size must be power of 2\n");
+ return;
+ }
for (gridpower = 0;(1 << gridpower) < startgrid;gridpower++);
if (startgrid != (1 << gridpower))
- Sys_Error("fractalnoise: grid must be power of 2\n");
+ {
+ Con_Printf("fractalnoise: grid must be power of 2\n");
+ return;
+ }
startgrid = bound(0, startgrid, size);
g = g2 >> 1;
if (g)
{
- // subdivide, diamond-square algorythm (really this has little to do with squares)
+ // subdivide, diamond-square algorithm (really this has little to do with squares)
// diamond
for (y = 0;y < size;y += g2)
for (x = 0;x < size;x += g2)
for (sizepower = 0;(1 << sizepower) < size;sizepower++);
if (size != (1 << sizepower))
- Sys_Error("fractalnoise: size must be power of 2\n");
+ {
+ Con_Printf("fractalnoise: size must be power of 2\n");
+ return;
+ }
for (gridpower = 0;(1 << gridpower) < startgrid;gridpower++);
if (startgrid != (1 << gridpower))
- Sys_Error("fractalnoise: grid must be power of 2\n");
+ {
+ Con_Printf("fractalnoise: grid must be power of 2\n");
+ return;
+ }
startgrid = bound(0, startgrid, size);
g = g2 >> 1;
if (g)
{
- // subdivide, diamond-square algorythm (really this has little to do with squares)
+ // subdivide, diamond-square algorithm (really this has little to do with squares)
// diamond
for (y = 0;y < size;y += g2)
for (x = 0;x < size;x += g2)