]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - fractalnoise.c
made darkplaces compile successfully with g++ to test for errors C doesn't care about...
[xonotic/darkplaces.git] / fractalnoise.c
index 90419e3d4e4d4a3574aa5460f82545b05eab6440..eabe7ead9c45097e392b4925d80528261a2724bd 100644 (file)
@@ -24,7 +24,7 @@ void fractalnoise(qbyte *noise, int size, int startgrid)
        startgrid = bound(0, startgrid, size);
 
        amplitude = 0xFFFF; // this gets halved before use
        startgrid = bound(0, startgrid, size);
 
        amplitude = 0xFFFF; // this gets halved before use
-       noisebuf = Mem_Alloc(tempmempool, size*size*sizeof(int));
+       noisebuf = (int *)Mem_Alloc(tempmempool, size*size*sizeof(int));
        memset(noisebuf, 0, size*size*sizeof(int));
 
        for (g2 = startgrid;g2;g2 >>= 1)
        memset(noisebuf, 0, size*size*sizeof(int));
 
        for (g2 = startgrid;g2;g2 >>= 1)