129 |
|
} |
130 |
|
|
131 |
|
VideoModes.push_back(mode); |
132 |
+ |
video_init_depth_list(); |
133 |
|
VideoMonitor.mode = mode; |
134 |
|
} |
135 |
|
|
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; |