mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-14 05:30:53 +00:00
cleanup
svn-id: r5933
This commit is contained in:
parent
fc124552b8
commit
645c5418d6
@ -1455,7 +1455,8 @@ void Scumm::updatePalette() {
|
|||||||
int num = _palDirtyMax - first + 1;
|
int num = _palDirtyMax - first + 1;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
byte palette_colors[1024],*p = palette_colors;
|
byte palette_colors[1024];
|
||||||
|
byte *p = palette_colors;
|
||||||
|
|
||||||
for (i = _palDirtyMin; i <= _palDirtyMax; i++) {
|
for (i = _palDirtyMin; i <= _palDirtyMax; i++) {
|
||||||
byte *data;
|
byte *data;
|
||||||
@ -1469,18 +1470,18 @@ void Scumm::updatePalette() {
|
|||||||
// before uploading them to the backend.
|
// before uploading them to the backend.
|
||||||
|
|
||||||
if (noir_mode) {
|
if (noir_mode) {
|
||||||
double r, g, b;
|
int r, g, b;
|
||||||
double brightness;
|
byte brightness;
|
||||||
|
|
||||||
r = (double) data[0];
|
r = data[0];
|
||||||
g = (double) data[1];
|
g = data[1];
|
||||||
b = (double) data[2];
|
b = data[2];
|
||||||
|
|
||||||
brightness = (0.299 * r + 0.587 * g + 0.114 * b) + 0.5;
|
brightness = (byte)((0.299 * r + 0.587 * g + 0.114 * b) + 0.5);
|
||||||
|
|
||||||
*p++ = (byte) brightness;
|
*p++ = brightness;
|
||||||
*p++ = (byte) brightness;
|
*p++ = brightness;
|
||||||
*p++ = (byte) brightness;
|
*p++ = brightness;
|
||||||
*p++ = 0;
|
*p++ = 0;
|
||||||
} else {
|
} else {
|
||||||
*p++ = data[0];
|
*p++ = data[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user