startgrid = bound(0, startgrid, size);
amplitude = 0xFFFF; // this gets halved before use
- noisebuf = Mem_Alloc (tempmempool, size * size * sizeof (*noisebuf));
+ noisebuf = malloc(size*size*sizeof(int));
memset(noisebuf, 0, size*size*sizeof(int));
for (g2 = startgrid;g2;g2 >>= 1)
for (y = 0;y < size;y++)
for (x = 0;x < size;x++)
*noise++ = (qbyte) (((n(x,y) - min) * 256) / max);
- Mem_Free (noisebuf);
+ free(noisebuf);
#undef n
}
void VectorVectors(const vec3_t forward, vec3_t right, vec3_t up)