ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/video.cpp
(Generate patch)

Comparing BasiliskII/src/video.cpp (file contents):
Revision 1.14 by cebix, 2001-06-30T17:21:51Z vs.
Revision 1.15 by cebix, 2001-06-30T22:23:43Z

# Line 169 | Line 169 | static void load_ramp_palette(void)
169          }
170  
171          int num = (VidLocal.desc->mode.depth == VDEPTH_16BIT ? 32 : 256);
172        int inc = 256 / num, value = 0;
172          uint8 *p = VidLocal.palette;
173          for (int i=0; i<num; i++) {
174 <                uint8 red = value, green = value, blue = value;
174 >                uint8 red = (i * 256 / num), green = red, blue = red;
175                  if (have_gamma) {
176                          red = red_gamma[red >> (8 - data_width)];
177                          green = green_gamma[green >> (8 - data_width)];
# Line 181 | Line 180 | static void load_ramp_palette(void)
180                  *p++ = red;
181                  *p++ = green;
182                  *p++ = blue;
184                value += inc;
183          }
184  
185          video_set_palette(VidLocal.palette);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines