Previous 15994 Revisions Next

r5502 Wednesday 26th August, 2009 at 11:16:49 UTC by Angelo Salese
[SNES]: Fixed again the half colour blending, hopefully now correct
[src/mame/video]snes.c

src/mame/video/snes.c
r5501r5502
167167            b = ((*colour & 0x7c00) >> 10) + ((scanlines[SUBSCREEN].buffer[offset] & 0x7c00) >> 10);
168168
169169            /* don't halve for the back colour */
170            if( (snes_ram[CGADSUB] & 0x40) && (scanlines[SUBSCREEN].zbuf[offset] || scanlines[SUBSCREEN].buffer[offset] != snes_cgram[FIXED_COLOUR]) )
170            if( (snes_ram[CGADSUB] & 0x40) && (scanlines[SUBSCREEN].zbuf[offset] || scanlines[SUBSCREEN].buffer[offset]) )
171171            {
172172               r >>= 1;
173173               g >>= 1;
r5501r5502
181181            b = ((*colour & 0x7c00) >> 10) + ((snes_cgram[FIXED_COLOUR] & 0x7c00) >> 10);
182182
183183            /* don't halve for the back colour */
184            if( (snes_ram[CGADSUB] & 0x40) && (scanlines[SUBSCREEN].zbuf[offset] || scanlines[SUBSCREEN].buffer[offset] != snes_cgram[FIXED_COLOUR]) )
184            if( (snes_ram[CGADSUB] & 0x40) && (scanlines[SUBSCREEN].zbuf[offset] || scanlines[SUBSCREEN].buffer[offset]) )
185185            {
186186               r >>= 1;
187187               g >>= 1;
r5501r5502
205205            if( b > 0x1f ) b = 0;
206206
207207            /* don't halve for the back colour */
208            if( (snes_ram[CGADSUB] & 0x40) && (scanlines[SUBSCREEN].zbuf[offset] || scanlines[SUBSCREEN].buffer[offset] != snes_cgram[FIXED_COLOUR]) )
208            if( (snes_ram[CGADSUB] & 0x40) && (scanlines[SUBSCREEN].zbuf[offset] || scanlines[SUBSCREEN].buffer[offset]) )
209209            {
210210               r >>= 1;
211211               g >>= 1;
r5501r5502
222222            if( b > 0x1f ) b = 0;
223223
224224            /* don't halve for the back colour */
225            if( (snes_ram[CGADSUB] & 0x40) && (scanlines[SUBSCREEN].zbuf[offset] || scanlines[SUBSCREEN].buffer[offset] != snes_cgram[FIXED_COLOUR]) )
225            if( (snes_ram[CGADSUB] & 0x40) && (scanlines[SUBSCREEN].zbuf[offset] || scanlines[SUBSCREEN].buffer[offset]) )
226226            {
227227               r >>= 1;
228228               g >>= 1;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team