aboutsummaryrefslogtreecommitdiff
path: root/graphics/pixelformat.h
diff options
context:
space:
mode:
authorPaul Gilbert2016-09-29 20:35:05 -0400
committerPaul Gilbert2016-09-29 20:35:05 -0400
commit019eda55fcb9117aef44d64d140ad451db6c9fcc (patch)
tree3a306600b3184a2c39c3edede3ffb404ed882bc2 /graphics/pixelformat.h
parentc48dfb70718f971a76049061a1c2f8bc2f37bb46 (diff)
downloadscummvm-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.h4
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 //
////////////////////////////////////////////////////////////////////////