massive speedup to noise_diamondsquare (not that it /really/ matters:)

This commit is contained in:
Bill Currie 2002-05-28 05:34:06 +00:00
parent 7a3b63418b
commit bebf3f9599

View file

@ -58,7 +58,7 @@ noise_diamondsquare (unsigned char *noise, unsigned int size,
int *noisebuf;
unsigned int gridpower, sizepower, g, g2, x, y;
#define n(x, y) noisebuf[((y) & size1) * size + ((x) & size1)]
#define n(x, y) noisebuf[(((y) & size1) << sizepower) + ((x) & size1)]
for (sizepower = 0; (1 << sizepower) < size; sizepower++);
if (size != (1 << sizepower))