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.18 by cebix, 2001-07-03T19:20:45Z

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines