aboutsummaryrefslogtreecommitdiff
path: root/graphics/pixelformat.h
diff options
context:
space:
mode:
authorJody Northup2009-07-14 08:27:36 +0000
committerJody Northup2009-07-14 08:27:36 +0000
commitcdf751accda346f5d96e3fdfa2fd4a1b92ed4d19 (patch)
treeae0684ec45afbb635106c4934f48e3ab0912571d /graphics/pixelformat.h
parent6f66d6a42565a803aac300eb6e8541029f682a01 (diff)
downloadscummvm-rg350-cdf751accda346f5d96e3fdfa2fd4a1b92ed4d19.tar.gz
scummvm-rg350-cdf751accda346f5d96e3fdfa2fd4a1b92ed4d19.tar.bz2
scummvm-rg350-cdf751accda346f5d96e3fdfa2fd4a1b92ed4d19.zip
changed generic Graphics::PixelFormat constructor to take xBits instead of xLoss. Modified OSystem_SDL::getSupportedFormats and ScummEngine::init to account for this change.
svn-id: r42467
Diffstat (limited to 'graphics/pixelformat.h')
-rw-r--r--graphics/pixelformat.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h
index 380df985d9..d16de51ea7 100644
--- a/graphics/pixelformat.h
+++ b/graphics/pixelformat.h
@@ -57,16 +57,16 @@ struct PixelFormat {
rShift = gShift = bShift = aShift = 0;
}
- inline PixelFormat(int BytesPerPixel,
- int RLoss, int GLoss, int BLoss, int ALoss,
- int RShift, int GShift, int BShift, int AShift) {
+ inline PixelFormat(byte BytesPerPixel,
+ byte RBits, byte GBits, byte BBits, byte ABits,
+ byte RShift, byte GShift, byte BShift, byte AShift) {
bytesPerPixel = BytesPerPixel;
- rLoss = RLoss, gLoss = GLoss, bLoss = BLoss, aLoss = ALoss;
+ rLoss = 8 - RBits, gLoss = 8 - GBits, bLoss = 8 - BBits, aLoss = 8 - ABits;
rShift = RShift, gShift = GShift, bShift = BShift, aShift = AShift;
}
static inline PixelFormat createFormatCLUT8() {
- return PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0);
+ return PixelFormat(1, 0, 0, 0, 0, 0, 0, 0, 0);
}
inline bool operator==(const PixelFormat &fmt) const {