mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-17 07:07:10 +00:00
CGE: Implement monochrome view mode button
This commit is contained in:
parent
b957eda759
commit
50d313a547
@ -299,7 +299,6 @@ void CGEEngine::setMapBrick(int x, int z) {
|
||||
}
|
||||
}
|
||||
|
||||
//static void switchColorMode();
|
||||
//static void switchDebug();
|
||||
//static void pullSprite();
|
||||
//static void NextStep();
|
||||
|
@ -1128,9 +1128,9 @@ void Vga::setColors(Dac *tab, int lum) {
|
||||
|
||||
if (_mono) {
|
||||
destP = _newColors;
|
||||
for (int idx = 0; idx < PAL_CNT; ++idx, ++palP) {
|
||||
for (int idx = 0; idx < PAL_CNT; ++idx, ++destP) {
|
||||
// Form a greyscalce colour from 30% R, 59% G, 11% B
|
||||
uint8 intensity = (destP->_r * 77) + (destP->_g * 151) + (destP->_b * 28);
|
||||
uint8 intensity = (((int)destP->_r * 77) + ((int)destP->_g * 151) + ((int)destP->_b * 28)) >> 8;
|
||||
destP->_r = intensity;
|
||||
destP->_g = intensity;
|
||||
destP->_b = intensity;
|
||||
|
Loading…
Reference in New Issue
Block a user