src/mame/video/snes.c
| r5431 | r5432 | |
| 152 | 152 | (clip == SNES_CLIP_OUT && snes_ppu.clipmasks[5][offset]) ) |
| 153 | 153 | { |
| 154 | 154 | UINT16 r, g, b; |
| 155 | |
| 155 | 156 | if( mode == SNES_BLEND_ADD ) |
| 156 | 157 | { |
| 157 | 158 | if( snes_ppu.sub_add_mode ) /* Subscreen*/ |
| r5431 | r5432 | |
| 159 | 160 | r = (*colour & 0x1f) + (scanlines[SUBSCREEN].buffer[offset] & 0x1f); |
| 160 | 161 | g = ((*colour & 0x3e0) >> 5) + ((scanlines[SUBSCREEN].buffer[offset] & 0x3e0) >> 5); |
| 161 | 162 | b = ((*colour & 0x7c00) >> 10) + ((scanlines[SUBSCREEN].buffer[offset] & 0x7c00) >> 10); |
| 162 | | if( (snes_ram[CGADSUB] & 0x40) && (scanlines[SUBSCREEN].zbuf[offset]) ) /* FIXME: We shouldn't halve for the back colour */ |
| 163 | if( (snes_ram[CGADSUB] & 0x40) && (scanlines[SUBSCREEN].buffer[offset]) ) /* FIXME: We shouldn't halve for the back colour */ |
| 163 | 164 | { |
| 164 | 165 | r >>= 1; |
| 165 | 166 | g >>= 1; |
| r5431 | r5432 | |
| 193 | 194 | if( r > 0x1f ) r = 0; |
| 194 | 195 | if( g > 0x1f ) g = 0; |
| 195 | 196 | if( b > 0x1f ) b = 0; |
| 196 | | if( (snes_ram[CGADSUB] & 0x40) && (scanlines[SUBSCREEN].zbuf[offset]) ) /* FIXME: We shouldn't halve for the back colour */ |
| 197 | if( (snes_ram[CGADSUB] & 0x40) && (scanlines[SUBSCREEN].buffer[offset]) ) /* FIXME: We shouldn't halve for the back colour */ |
| 197 | 198 | { |
| 198 | 199 | r >>= 1; |
| 199 | 200 | g >>= 1; |