1 |
|
/* |
2 |
|
* video_blit.cpp - Video/graphics emulation, blitters |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2002 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2004 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
444 |
|
// Initialize the framebuffer update function |
445 |
|
// Returns FALSE, if the function was to be reduced to a simple memcpy() |
446 |
|
// --> In that case, VOSF is not necessary |
447 |
< |
bool Screen_blitter_init(XVisualInfo * visual_info, bool native_byte_order, video_depth mac_depth) |
447 |
> |
bool Screen_blitter_init(XVisualInfo * visual_info, bool native_byte_order, int mac_depth) |
448 |
|
{ |
449 |
|
#if REAL_ADDRESSING || DIRECT_ADDRESSING |
450 |
< |
if (mac_depth == VDEPTH_1BIT) { |
450 |
> |
if (mac_depth == 1) { |
451 |
|
|
452 |
|
// 1-bit mode uses a 1-bit X image, so there's no need for special blitting routines |
453 |
|
Screen_blit = Blit_Copy_Raw; |
474 |
|
|
475 |
|
// 2/4/8-bit mode on 8/16/32-bit screen? |
476 |
|
if (visualFormat.depth == 8) { |
477 |
< |
if (mac_depth == VDEPTH_2BIT) { |
477 |
> |
if (mac_depth == 2) { |
478 |
|
Screen_blit = Blit_Expand_2_To_8; |
479 |
|
blitter_found = true; |
480 |
< |
} else if (mac_depth == VDEPTH_4BIT) { |
480 |
> |
} else if (mac_depth == 4) { |
481 |
|
Screen_blit = Blit_Expand_4_To_8; |
482 |
|
blitter_found = true; |
483 |
|
} |
484 |
|
} else if (visualFormat.depth == 15 || visualFormat.depth == 16) { |
485 |
< |
if (mac_depth == VDEPTH_2BIT) { |
485 |
> |
if (mac_depth == 2) { |
486 |
|
Screen_blit = Blit_Expand_2_To_16; |
487 |
|
blitter_found = true; |
488 |
< |
} else if (mac_depth == VDEPTH_4BIT) { |
488 |
> |
} else if (mac_depth == 4) { |
489 |
|
Screen_blit = Blit_Expand_4_To_16; |
490 |
|
blitter_found = true; |
491 |
< |
} else if (mac_depth == VDEPTH_8BIT) { |
491 |
> |
} else if (mac_depth == 8) { |
492 |
|
Screen_blit = Blit_Expand_8_To_16; |
493 |
|
blitter_found = true; |
494 |
|
} |
495 |
|
} else if (visualFormat.depth == 24 || visualFormat.depth == 32) { |
496 |
< |
if (mac_depth == VDEPTH_2BIT) { |
496 |
> |
if (mac_depth == 2) { |
497 |
|
Screen_blit = Blit_Expand_2_To_32; |
498 |
|
blitter_found = true; |
499 |
< |
} else if (mac_depth == VDEPTH_4BIT) { |
499 |
> |
} else if (mac_depth == 4) { |
500 |
|
Screen_blit = Blit_Expand_4_To_32; |
501 |
|
blitter_found = true; |
502 |
< |
} else if (mac_depth == VDEPTH_8BIT) { |
502 |
> |
} else if (mac_depth == 8) { |
503 |
|
Screen_blit = Blit_Expand_8_To_32; |
504 |
|
blitter_found = true; |
505 |
|
} |