diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-08 13:52:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-08 13:52:43 +0400 |
commit | bb98f65112cd238a13fbbdc9143daab66d7d9daf (patch) | |
tree | d04d90d081e8ddcc0b9d3e5765ea11f06d033f54 /source/blender | |
parent | 17dcd1ea2dd80666b589067a69ab246839252c74 (diff) |
code cleanup: unused macros
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/freestyle/intern/geometry/Noise.cpp | 10 | ||||
-rw-r--r-- | source/blender/freestyle/intern/system/RandGen.cpp | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/freestyle/intern/geometry/Noise.cpp b/source/blender/freestyle/intern/geometry/Noise.cpp index 7409937e2ad..866b347a811 100644 --- a/source/blender/freestyle/intern/geometry/Noise.cpp +++ b/source/blender/freestyle/intern/geometry/Noise.cpp @@ -32,32 +32,28 @@ #include "Noise.h" -#define MINX -1000000 -#define MINY MINX -#define MINZ MINX - #define SCURVE(a) ((a) * (a) * (3.0 - 2.0 * (a))) +#if 0 // XXX Unused #define REALSCALE (2.0 / 65536.0) #define NREALSCALE (2.0 / 4096.0) #define HASH3D(a, b, c) hashTable[hashTable[hashTable[(a) & 0xfff] ^ ((b) & 0xfff)] ^ ((c) & 0xfff)] #define HASH(a, b, c) (xtab[(xtab[(xtab[(a) & 0xff] ^ (b)) & 0xff] ^ (c)) & 0xff] & 0xff) - #define INCRSUM(m, s, x, y, z) \ ((s) * (RTable[m] * 0.5 + RTable[m + 1] * (x) + RTable[m + 2] * (y) + RTable[m + 3] * (z))) #define MAXSIZE 500 - -#if 0 // XXX Unused #define NRAND() ((float)rand() / (float)RAND_MAX) #endif #define SEEDNRAND(x) (srand(x * RAND_MAX)) #define BM 0xff #define N 0x1000 +#if 0 // XXX Unused #define NP 12 /* 2^N */ #define NM 0xfff +#endif #define LERP(t, a, b) ((a) + (t) * ((b) - (a))) diff --git a/source/blender/freestyle/intern/system/RandGen.cpp b/source/blender/freestyle/intern/system/RandGen.cpp index b733b739b6d..2be8326ab5c 100644 --- a/source/blender/freestyle/intern/system/RandGen.cpp +++ b/source/blender/freestyle/intern/system/RandGen.cpp @@ -41,7 +41,9 @@ #define A1 0xDEEC #define A2 0x5 #define C 0xB +#if 0 // XXX Unused #define HI_BIT (1L << (2 * N - 1)) +#endif #define LOW(x) ((unsigned)(x) & MASK) #define HIGH(x) LOW((x) >> N) @@ -56,9 +58,12 @@ #define CARRY(x, y) ((unsigned long)((long)(x) + (long)(y)) > MASK) #define ADDEQU(x, y, z) (z = CARRY(x, (y)), x = LOW(x + (y))) #define SET3(x, x0, x1, x2) ((x)[0] = (x0), (x)[1] = (x1), (x)[2] = (x2)) +#if 0 // XXX, unused #define SETLOW(x, y, n) SET3(x, LOW((y)[n]), LOW((y)[(n)+1]), LOW((y)[(n)+2])) +#endif #define SEED(x0, x1, x2) (SET3(x, x0, x1, x2), SET3(a, A0, A1, A2), c = C) +#if 0 // XXX, unused #define REST(v) \ for (i = 0; i < 3; i++) { \ xsubi[i] = x[i]; \ @@ -79,6 +84,7 @@ v = F(); \ REST(v); \ } +#endif static unsigned x[3] = { X0, |