aboutsummaryrefslogtreecommitdiff
path: root/graphics/colormasks.h
diff options
context:
space:
mode:
authorJordi Vilalta Prat2008-01-27 19:47:41 +0000
committerJordi Vilalta Prat2008-01-27 19:47:41 +0000
commit66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985 (patch)
treee27aadabecd8dd910884280e6559ff9c94c3d73c /graphics/colormasks.h
parent278857698dc7b1623096fe1ad12511dc4c886c7e (diff)
downloadscummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.tar.gz
scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.tar.bz2
scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.zip
Removed trailing spaces.
svn-id: r30664
Diffstat (limited to 'graphics/colormasks.h')
-rw-r--r--graphics/colormasks.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/graphics/colormasks.h b/graphics/colormasks.h
index b8bfe26535..5b9f0517a9 100644
--- a/graphics/colormasks.h
+++ b/graphics/colormasks.h
@@ -33,7 +33,7 @@ struct ColorMasks {
/*
The ColorMasks template can be used to map bit format values
(like 555, 565, 1555, 4444) to corresponding bit masks and shift values.
-Currently this is only meant for
+Currently this is only meant for
The meaning of these is masks is the following:
kBytesPerPixel
@@ -41,17 +41,17 @@ The meaning of these is masks is the following:
kRedMask, kGreenMask, kBlueMask
-> bitmask, and this with the color to select only the bits of the corresponding color
-
+
The k*Bits and k*Shift values can be used to extract R,G,B. I.e. to get
the red color component of a pixel, as a 8-bit value, you would write
-
+
R = ((color & kRedMask) >> kRedShift) << (8-kRedBits)
-
+
Actually, instead of the simple left shift, one might want to use somewhat
- more sophisticated code (which fills up the least significant bits with
+ more sophisticated code (which fills up the least significant bits with
appropriate data).
-
-
+
+
The highBits / lowBits / qhighBits / qlowBits are special values that are
used in the super-optimized interpolation functions in scaler/intern.h
and scaler/aspect.cpp. Currently they are only available in 555 and 565 mode.