diff -ur ScummVM-cvs20020726/scummvm/script_v2.cpp ScummVM-cvs20020726+hack/scummvm/script_v2.cpp
old
|
new
|
|
1889 | 1889 | break; |
1890 | 1890 | |
1891 | 1891 | case 213: /* set palette */ |
| 1892 | // One case where this is used is to turn off Sam & Max film |
| 1893 | // noir mode. Unfortunately it only restores color to the |
| 1894 | // palette, it doesn't take palette manipulation (darkening, |
| 1895 | // etc.) into account. So, for instance, if you turn on film |
| 1896 | // noir mode in Sam & Max's office, turn off the light and turn |
| 1897 | // off film noir mode, the room will no longer look dark. |
| 1898 | // |
| 1899 | // This bug is present in the original interpreter, so it may |
| 1900 | // not be worth the trouble fixing it. |
1892 | 1901 | setPalette(pop()); |
1893 | 1902 | break; |
1894 | 1903 | |
… |
… |
|
2838 | 2847 | |
2839 | 2848 | case 114: |
2840 | 2849 | // Sam & Max film noir mode |
2841 | | if (_gameId == GID_SAMNMAX) |
2842 | | desaturatePalette(); |
2843 | | else |
| 2850 | if (_gameId == GID_SAMNMAX) { |
| 2851 | // At this point ScummVM will already have set |
| 2852 | // variable 0x8000 to indicate that the game is |
| 2853 | // in film noir mode. All we have to do here is |
| 2854 | // to mark the palette as "dirty", and the next |
| 2855 | // call to updatePalette() will take care of |
| 2856 | // the rest. |
| 2857 | // |
| 2858 | // Actually, for extra bug-compatibility we |
| 2859 | // should call desaturatePalette() here only, |
| 2860 | // instead of in updatePalette(). To see the |
| 2861 | // difference in behaviour, try turning on film |
| 2862 | // noir mode in Sam & Max's office. The |
| 2863 | // background will be grayscale, but Sam and |
| 2864 | // Max themselves will be in color. |
| 2865 | setDirtyColors(0, 255); |
| 2866 | } else |
2844 | 2867 | warning("stub o6_miscOps_114()"); |
2845 | 2868 | break; |
2846 | 2869 | |
diff -ur ScummVM-cvs20020726/scummvm/scummvm.cpp ScummVM-cvs20020726+hack/scummvm/scummvm.cpp
old
|
new
|
|
1376 | 1376 | int i; |
1377 | 1377 | byte *data = _currentPalette + first * 3; |
1378 | 1378 | |
| 1379 | byte palette_colors[1024],*p = palette_colors; |
| 1380 | |
1379 | 1381 | // Sam & Max film noir mode |
1380 | 1382 | if (_gameId == GID_SAMNMAX && readVar(0x8000)) |
1381 | 1383 | desaturatePalette(); |
1382 | | |
1383 | | byte palette_colors[1024],*p = palette_colors; |
1384 | 1384 | |
1385 | 1385 | for (i = 0; i != num; i++, data += 3, p+=4) { |
1386 | 1386 | p[0] = data[0]; |