mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
massive speedup to noise_diamondsquare (not that it /really/ matters:)
This commit is contained in:
parent
7a3b63418b
commit
bebf3f9599
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue