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

Comparing BasiliskII/src/AmigaOS/video_amiga.cpp (file contents):
Revision 1.16 by cebix, 2001-06-30T17:21:52Z vs.
Revision 1.17 by cebix, 2001-07-01T21:09:27Z

# Line 536 | Line 536 | void VideoExit(void)
536   *  Set palette
537   */
538  
539 < void video_set_palette(uint8 *pal)
539 > void video_set_palette(uint8 *pal, in num)
540   {
541          if ((display_type == DISPLAY_SCREEN_P96 || display_type == DISPLAY_SCREEN_CGFX)
542           && !IsDirectMode(VideoMonitor.mode)) {
543  
544                  // Convert palette to 32 bits
545                  ULONG table[2 + 256 * 3];
546 <                table[0] = 256 << 16;
547 <                table[256 * 3 + 1] = 0;
548 <                for (int i=0; i<256; i++) {
546 >                table[0] = num << 16;
547 >                table[num * 3 + 1] = 0;
548 >                for (int i=0; i<num; i++) {
549                          table[i*3+1] = pal[i*3] * 0x01010101;
550                          table[i*3+2] = pal[i*3+1] * 0x01010101;
551                          table[i*3+3] = pal[i*3+2] * 0x01010101;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines