aboutsummaryrefslogtreecommitdiff
path: root/graphics/pixelformat.h
diff options
context:
space:
mode:
authorJody Northup2009-06-15 10:10:22 +0000
committerJody Northup2009-06-15 10:10:22 +0000
commitc97bfd16f94873a437cb92a30ebd11879f114e0c (patch)
tree7dfd7195e2c5f0f0fb5cef3586c03e8082af5195 /graphics/pixelformat.h
parent8d306ebccfa7e88b2e4f4635bff3987e550f98d3 (diff)
downloadscummvm-rg350-c97bfd16f94873a437cb92a30ebd11879f114e0c.tar.gz
scummvm-rg350-c97bfd16f94873a437cb92a30ebd11879f114e0c.tar.bz2
scummvm-rg350-c97bfd16f94873a437cb92a30ebd11879f114e0c.zip
made Graphics::PixelFormat(ColorMode) constructor explicit, removed Graphics::PixelFormat(int bitFormat) constructor that was never really implemented anyway
svn-id: r41540
Diffstat (limited to 'graphics/pixelformat.h')
-rw-r--r--graphics/pixelformat.h35
1 files changed, 1 insertions, 34 deletions
diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h
index ef856e8735..b08321efd7 100644
--- a/graphics/pixelformat.h
+++ b/graphics/pixelformat.h
@@ -91,43 +91,10 @@ struct PixelFormat {
rShift = RShift, gShift = GShift, bShift = BShift, aShift = AShift;
}
- //Copy constructor
- //Is this necessary?
- inline PixelFormat(const PixelFormat &format) {
- bytesPerPixel = format.bytesPerPixel;
-
- rLoss = format.rLoss;
- gLoss = format.gLoss;
- bLoss = format.bLoss;
- aLoss = format.aLoss;
-
- rShift = format.rShift;
- gShift = format.gShift;
- bShift = format.bShift;
- aShift = format.aShift;
- }
-
- //Convenience constructor from bitformat number
- //TODO: BGR support
- //TODO: Specify alpha position
-/* PixelFormat(int bitFormat) {
- bytesPerPixel = ColorMasks<bitFormat>::kBytesPerPixel;
-
- rLoss = 8 - ColorMasks<bitFormat>::kRedBits;
- gLoss = 8 - ColorMasks<bitFormat>::kGreenBits;
- bLoss = 8 - ColorMasks<bitFormat>::kBlueBits;
- aLoss = 8 - ColorMasks<bitFormat>::kAlphaBits;
-
- rShift = ColorMasks<bitFormat>::kRedShift;
- gShift = ColorMasks<bitFormat>::kGreenShift;
- bShift = ColorMasks<bitFormat>::kBlueShift;
- aShift = ColorMasks<bitFormat>::kAlphaShift;
- };*/
-
//Convenience constructor from enum type
//TODO: BGR support
//TODO: Specify alpha position
- inline PixelFormat(ColorMode mode) {
+ explicit inline PixelFormat(ColorMode mode) {
switch (mode) {
case kFormatRGB555:
aLoss = 8;