diff options
author | Paul Gilbert | 2016-09-29 20:35:05 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-29 20:35:05 -0400 |
commit | 019eda55fcb9117aef44d64d140ad451db6c9fcc (patch) | |
tree | 3a306600b3184a2c39c3edede3ffb404ed882bc2 /graphics/pixelformat.h | |
parent | c48dfb70718f971a76049061a1c2f8bc2f37bb46 (diff) | |
download | scummvm-rg350-019eda55fcb9117aef44d64d140ad451db6c9fcc.tar.gz scummvm-rg350-019eda55fcb9117aef44d64d140ad451db6c9fcc.tar.bz2 scummvm-rg350-019eda55fcb9117aef44d64d140ad451db6c9fcc.zip |
GRAPHICS: Added a PixelFormat bpp method
Diffstat (limited to 'graphics/pixelformat.h')
-rw-r--r-- | graphics/pixelformat.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h index 9dd06241b7..7b966a8a15 100644 --- a/graphics/pixelformat.h +++ b/graphics/pixelformat.h @@ -215,6 +215,10 @@ struct PixelFormat { return (8 - aLoss); } + inline byte bpp() const { + return rBits() + gBits() + bBits() + aBits(); + } + //////////////////////////////////////////////////////////////////////// // Convenience functions for getting color components' maximum values // //////////////////////////////////////////////////////////////////////// |