diff options
author | Johannes Schickel | 2013-01-09 06:00:35 +0100 |
---|---|---|
committer | Johannes Schickel | 2013-01-09 06:01:28 +0100 |
commit | 8d5b4b75d406bb56130fb4ccd91edda4ba1f4906 (patch) | |
tree | f6f481c09553c1f454c31bbb88490de26e326069 /engines/kyra/screen_hof.cpp | |
parent | ff296175bc558ce5758a0948ab91333a6d3b918e (diff) | |
download | scummvm-rg350-8d5b4b75d406bb56130fb4ccd91edda4ba1f4906.tar.gz scummvm-rg350-8d5b4b75d406bb56130fb4ccd91edda4ba1f4906.tar.bz2 scummvm-rg350-8d5b4b75d406bb56130fb4ccd91edda4ba1f4906.zip |
KYRA: Make all hex constants use uppercase letters.
Done with:
git ls-files "*.cpp" *".h" | xargs sed -i -e 's/0x\([0-9a-f]*\)/0x\U\1/g'
Diffstat (limited to 'engines/kyra/screen_hof.cpp')
-rw-r--r-- | engines/kyra/screen_hof.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/kyra/screen_hof.cpp b/engines/kyra/screen_hof.cpp index a8ec2cc4ca..b7de7988b8 100644 --- a/engines/kyra/screen_hof.cpp +++ b/engines/kyra/screen_hof.cpp @@ -34,16 +34,16 @@ void Screen_HoF::generateGrayOverlay(const Palette &srcPal, uint8 *grayOverlay, for (int i = 0; i != lastColor; i++) { if (flag) { - int v = ((((srcPal[3 * i] & 0x3f) + (srcPal[3 * i + 1] & 0x3f) - + (srcPal[3 * i + 2] & 0x3f)) / 3) * factor) / 0x40; - tmpPal[3 * i] = tmpPal[3 * i + 1] = tmpPal[3 * i + 2] = v & 0xff; + int v = ((((srcPal[3 * i] & 0x3F) + (srcPal[3 * i + 1] & 0x3F) + + (srcPal[3 * i + 2] & 0x3F)) / 3) * factor) / 0x40; + tmpPal[3 * i] = tmpPal[3 * i + 1] = tmpPal[3 * i + 2] = v & 0xFF; } else { - int v = (((srcPal[3 * i] & 0x3f) * factor) / 0x40) + addR; - tmpPal[3 * i] = (v > 0x3f) ? 0x3f : v & 0xff; - v = (((srcPal[3 * i + 1] & 0x3f) * factor) / 0x40) + addG; - tmpPal[3 * i + 1] = (v > 0x3f) ? 0x3f : v & 0xff; - v = (((srcPal[3 * i + 2] & 0x3f) * factor) / 0x40) + addB; - tmpPal[3 * i + 2] = (v > 0x3f) ? 0x3f : v & 0xff; + int v = (((srcPal[3 * i] & 0x3F) * factor) / 0x40) + addR; + tmpPal[3 * i] = (v > 0x3F) ? 0x3F : v & 0xFF; + v = (((srcPal[3 * i + 1] & 0x3F) * factor) / 0x40) + addG; + tmpPal[3 * i + 1] = (v > 0x3F) ? 0x3F : v & 0xFF; + v = (((srcPal[3 * i + 2] & 0x3F) * factor) / 0x40) + addB; + tmpPal[3 * i + 2] = (v > 0x3F) ? 0x3F : v & 0xFF; } } |