summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErik Reckase <e.reckase@gmail.com>2011-01-06 03:48:59 +0000
committerScott Draves <spot@draves.org>2015-02-15 12:20:14 -0500
commit6cfbf0cbb191898182f10d409809ca26b2ed21da (patch)
tree06ef46335ecc7e018681c82f40c12a694652d37c /src
parent6be5e2e3f2117c4284d9b062a36700f3cf088f79 (diff)
downloadpucket-6cfbf0cbb191898182f10d409809ca26b2ed21da.tar.gz
pucket-6cfbf0cbb191898182f10d409809ca26b2ed21da.tar.bz2
pucket-6cfbf0cbb191898182f10d409809ca26b2ed21da.zip
CMAP_SIZE can be used when creating the dmap - I had erroneously thought that cmap_size was necessary (the apo-corrected number of elements in the palette)
git-svn-id: https://flam3.googlecode.com/svn/trunk@153 77852712-ef1d-11de-8684-7d64432d61a3
Diffstat (limited to 'src')
-rw-r--r--src/rect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rect.c b/src/rect.c
index e5d1bdc..ddea9cf 100644
--- a/src/rect.c
+++ b/src/rect.c
@@ -776,10 +776,10 @@ static int render_rectangle(flam3_frame *spec, void *out,
/* compute the colormap entries. */
/* the input colormap is 256 long with entries from 0 to 1.0 */
- for (j = 0; j < cmap_size; j++) {
- dmap[j].index = cp.palette[(j * 256) / cmap_size].index / 256.0;
+ for (j = 0; j < CMAP_SIZE; j++) {
+ dmap[j].index = cp.palette[(j * 256) / CMAP_SIZE].index / 256.0;
for (k = 0; k < 4; k++)
- dmap[j].color[k] = (cp.palette[(j * 256) / cmap_size].color[k] * WHITE_LEVEL) * color_scalar;
+ dmap[j].color[k] = (cp.palette[(j * 256) / CMAP_SIZE].color[k] * WHITE_LEVEL) * color_scalar;
}
/* compute camera */