trunk/src/emu/video/stvvdp2.c
| r21002 | r21003 | |
| 6630 | 6630 | UINT8 sprite_priorities[8]; |
| 6631 | 6631 | UINT8 sprite_ccr[8]; |
| 6632 | 6632 | int sprite_color_mode = STV_VDP2_SPCLMD; |
| 6633 | | rectangle mycliprect; |
| 6634 | 6633 | |
| 6635 | 6634 | if ( (stv_sprite_priorities_usage_valid == 1) && (stv_sprite_priorities_used[pri] == 0) ) |
| 6636 | 6635 | return; |
| r21002 | r21003 | |
| 6712 | 6711 | (STV_VDP2_SPW0A * 0x10) | |
| 6713 | 6712 | (STV_VDP2_SPW1A * 0x20) | |
| 6714 | 6713 | (STV_VDP2_SPSWA * 0x40); |
| 6715 | | mycliprect = cliprect; |
| 6716 | 6714 | |
| 6717 | | stv_vdp2_apply_window_on_layer(mycliprect); |
| 6715 | // stv_vdp2_apply_window_on_layer(mycliprect); |
| 6718 | 6716 | |
| 6719 | 6717 | if (interlace_framebuffer == 0 && double_x == 0 ) |
| 6720 | 6718 | { |
| 6721 | 6719 | if ( alpha_enabled == 0 ) |
| 6722 | 6720 | { |
| 6723 | | for ( y = mycliprect.min_y; y <= mycliprect.max_y; y++ ) |
| 6721 | for ( y = cliprect.min_y; y <= cliprect.max_y; y++ ) |
| 6724 | 6722 | { |
| 6725 | 6723 | if ( stv_sprite_priorities_usage_valid ) |
| 6726 | 6724 | if (stv_sprite_priorities_in_fb_line[y][pri] == 0) |
| r21002 | r21003 | |
| 6729 | 6727 | framebuffer_line = m_vdp1.framebuffer_display_lines[y]; |
| 6730 | 6728 | bitmap_line = &bitmap.pix32(y); |
| 6731 | 6729 | |
| 6732 | | for ( x = mycliprect.min_x; x <= mycliprect.max_x; x++ ) |
| 6730 | for ( x = cliprect.min_x; x <= cliprect.max_x; x++ ) |
| 6733 | 6731 | { |
| 6732 | if(!stv_vdp2_window_process(x,y)) |
| 6733 | continue; |
| 6734 | |
| 6734 | 6735 | pix = framebuffer_line[x]; |
| 6735 | 6736 | if ( (pix & 0x8000) && sprite_color_mode) |
| 6736 | 6737 | { |
| r21002 | r21003 | |
| 6800 | 6801 | } |
| 6801 | 6802 | else //alpha_enabled == 1 |
| 6802 | 6803 | { |
| 6803 | | for ( y = mycliprect.min_y; y <= mycliprect.max_y; y++ ) |
| 6804 | for ( y = cliprect.min_y; y <= cliprect.max_y; y++ ) |
| 6804 | 6805 | { |
| 6805 | 6806 | if ( stv_sprite_priorities_usage_valid ) |
| 6806 | 6807 | if (stv_sprite_priorities_in_fb_line[y][pri] == 0) |
| r21002 | r21003 | |
| 6809 | 6810 | framebuffer_line = m_vdp1.framebuffer_display_lines[y]; |
| 6810 | 6811 | bitmap_line = &bitmap.pix32(y); |
| 6811 | 6812 | |
| 6812 | | for ( x = mycliprect.min_x; x <= mycliprect.max_x; x++ ) |
| 6813 | for ( x = cliprect.min_x; x <= cliprect.max_x; x++ ) |
| 6813 | 6814 | { |
| 6815 | if(!stv_vdp2_window_process(x,y)) |
| 6816 | continue; |
| 6817 | |
| 6814 | 6818 | pix = framebuffer_line[x]; |
| 6815 | 6819 | if ( (pix & 0x8000) && sprite_color_mode) |
| 6816 | 6820 | { |
| r21002 | r21003 | |
| 6906 | 6910 | } |
| 6907 | 6911 | else |
| 6908 | 6912 | { |
| 6909 | | for ( y = mycliprect.min_y; y <= mycliprect.max_y / (interlace_framebuffer+1); y++ ) |
| 6913 | for ( y = cliprect.min_y; y <= cliprect.max_y / (interlace_framebuffer+1); y++ ) |
| 6910 | 6914 | { |
| 6911 | 6915 | if ( stv_sprite_priorities_usage_valid ) |
| 6912 | 6916 | if (stv_sprite_priorities_in_fb_line[y][pri] == 0) |
| r21002 | r21003 | |
| 6923 | 6927 | bitmap_line2 = &bitmap.pix32(2*y + 1); |
| 6924 | 6928 | } |
| 6925 | 6929 | |
| 6926 | | for ( x = mycliprect.min_x; x <= mycliprect.max_x /(double_x+1) ; x++ ) |
| 6930 | for ( x = cliprect.min_x; x <= cliprect.max_x /(double_x+1) ; x++ ) |
| 6927 | 6931 | { |
| 6932 | if(!stv_vdp2_window_process(x,y)) |
| 6933 | continue; |
| 6934 | |
| 6928 | 6935 | pix = framebuffer_line[x]; |
| 6929 | 6936 | if ( (pix & 0x8000) && sprite_color_mode) |
| 6930 | 6937 | { |