mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-27 02:50:28 +00:00
Backport Tweak emphasis behavior to make it a bit closer to hardware
This commit is contained in:
parent
0908074346
commit
1f27d115d0
@ -627,23 +627,23 @@ public:
|
||||
double redColor = (uint8_t)(paletteBuffer[i] >> 16);
|
||||
double greenColor = (uint8_t)(paletteBuffer[i] >> 8);
|
||||
double blueColor = (uint8_t)paletteBuffer[i];
|
||||
if(j & 0x01) {
|
||||
//Intensify red
|
||||
redColor *= 1.1;
|
||||
greenColor *= 0.9;
|
||||
blueColor *= 0.9;
|
||||
}
|
||||
if(j & 0x02) {
|
||||
//Intensify green
|
||||
greenColor *= 1.1;
|
||||
redColor *= 0.9;
|
||||
blueColor *= 0.9;
|
||||
}
|
||||
if(j & 0x04) {
|
||||
//Intensify blue
|
||||
blueColor *= 1.1;
|
||||
redColor *= 0.9;
|
||||
greenColor *= 0.9;
|
||||
if((i & 0x0F) <= 0x0D) {
|
||||
//Emphasis doesn't affect columns $xE and $xF
|
||||
if(j & 0x01) {
|
||||
//Intensify red
|
||||
greenColor *= 0.84;
|
||||
blueColor *= 0.84;
|
||||
}
|
||||
if(j & 0x02) {
|
||||
//Intensify green
|
||||
redColor *= 0.84;
|
||||
blueColor *= 0.84;
|
||||
}
|
||||
if(j & 0x04) {
|
||||
//Intensify blue
|
||||
redColor *= 0.84;
|
||||
greenColor *= 0.84;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t r = (uint8_t)(redColor > 255 ? 255 : redColor);
|
||||
|
Loading…
Reference in New Issue
Block a user