diff options
author | kraxel <kraxel> | 2006-06-13 13:35:48 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2006-06-13 13:35:48 +0000 |
commit | 8992ff2c2c6e60d88f0e22a048f343947c458cc3 (patch) | |
tree | cce54e530a1f4c7c9a44e876ab9ce28a955e5ca7 /fb-gui.c | |
parent | 34eca660e8d21ada08c150e0d6e8ed048e1ab380 (diff) | |
download | fbida-8992ff2c2c6e60d88f0e22a048f343947c458cc3.tar.gz |
merge a bunch of fixed from Alan Curry
Diffstat (limited to 'fb-gui.c')
-rw-r--r-- | fb-gui.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -47,14 +47,19 @@ linear_palette(int r, int g, int b) size = 256 >> (8 - r); for (i = 0; i < size; i++) p_red[i] = calc_gamma(i,size); + p_cmap.len = size; size = 256 >> (8 - g); for (i = 0; i < size; i++) p_green[i] = calc_gamma(i,size); + if (p_cmap.len < size) + p_cmap.len = size; size = 256 >> (8 - b); for (i = 0; i < size; i++) p_blue[i] = calc_gamma(i,size); + if (p_cmap.len < size) + p_cmap.len = size; } static void @@ -70,6 +75,7 @@ dither_palette(int r, int g, int b) p_green[i] = calc_gamma(gs * ((i / b) % g), 255); p_blue[i] = calc_gamma(bs * ((i) % b), 255); } + p_cmap.len = 256; } static void shadow_lut_init_one(int32_t *lut, int bits, int shift) |