aboutsummaryrefslogtreecommitdiff
path: root/graphics/pixelformat.h
diff options
context:
space:
mode:
authorJody Northup2009-07-08 16:07:58 +0000
committerJody Northup2009-07-08 16:07:58 +0000
commit828ed66555b99363fed62b4cbb83c36de68c3024 (patch)
tree954ef2912744813160ed95984808ac21c2b68a17 /graphics/pixelformat.h
parent3e47aaa151ff751af867c57344b063c30f5f75f3 (diff)
downloadscummvm-rg350-828ed66555b99363fed62b4cbb83c36de68c3024.tar.gz
scummvm-rg350-828ed66555b99363fed62b4cbb83c36de68c3024.tar.bz2
scummvm-rg350-828ed66555b99363fed62b4cbb83c36de68c3024.zip
Reinstated static inline Graphics::PixelFormat::createFormatCLUT8(), which I am told was not supposed to be removed with the others.
svn-id: r42268
Diffstat (limited to 'graphics/pixelformat.h')
-rw-r--r--graphics/pixelformat.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h
index d7f5e851ad..380df985d9 100644
--- a/graphics/pixelformat.h
+++ b/graphics/pixelformat.h
@@ -65,6 +65,10 @@ struct PixelFormat {
rShift = RShift, gShift = GShift, bShift = BShift, aShift = AShift;
}
+ static inline PixelFormat createFormatCLUT8() {
+ return PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0);
+ }
+
inline bool operator==(const PixelFormat &fmt) const {
// TODO: If aLoss==8, then the value of aShift is irrelevant, and should be ignored.
return 0 == memcmp(this, &fmt, sizeof(PixelFormat));
@@ -150,7 +154,7 @@ struct PixelFormat {
* @param backend The higher priority list, meant to be a list of formats supported by the backend
* @param frontend The lower priority list, meant to be a list of formats supported by the engine
* @return The first item on the backend list that also occurs on the frontend list
- * or PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0) if no matching formats were found.
+ * or PixelFormat::createFormatCLUT8() if no matching formats were found.
*/
inline PixelFormat findCompatibleFormat(Common::List<PixelFormat> backend, Common::List<PixelFormat> frontend) {
#ifdef ENABLE_RGB_COLOR
@@ -161,7 +165,7 @@ inline PixelFormat findCompatibleFormat(Common::List<PixelFormat> backend, Commo
}
}
#endif
- return PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0);
+ return PixelFormat::createFormatCLUT8();
}
} // end of namespace Graphics