aboutsummaryrefslogtreecommitdiff
path: root/graphics/pixelformat.h
diff options
context:
space:
mode:
authorJody Northup2009-07-06 07:40:28 +0000
committerJody Northup2009-07-06 07:40:28 +0000
commit22e09bedaaf125365c6905187db80e939a86df53 (patch)
tree641adbed4e6034a2e7bee4f0290090633b0be58d /graphics/pixelformat.h
parentf63b02b9200606069a605e27d828f4c8c59119fc (diff)
downloadscummvm-rg350-22e09bedaaf125365c6905187db80e939a86df53.tar.gz
scummvm-rg350-22e09bedaaf125365c6905187db80e939a86df53.tar.bz2
scummvm-rg350-22e09bedaaf125365c6905187db80e939a86df53.zip
Updated doxygen comments on API functions
svn-id: r42166
Diffstat (limited to 'graphics/pixelformat.h')
-rw-r--r--graphics/pixelformat.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h
index a1883291b9..bf18197f25 100644
--- a/graphics/pixelformat.h
+++ b/graphics/pixelformat.h
@@ -65,7 +65,11 @@ struct PixelFormat {
rShift = RShift, gShift = GShift, bShift = BShift, aShift = AShift;
}
- // "Factory" methods for convenience
+ /////////////////////////////////////////////////////////
+ // Convenience functions for creating standard formats //
+ /////////////////////////////////////////////////////////
+
+ // 256 color palette.
static inline PixelFormat createFormatCLUT8() {
return PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0);
}
@@ -201,6 +205,14 @@ struct PixelFormat {
}
};
+/**
+ * Determines the first matching format between two lists.
+ *
+ * @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::createFormatCLUT8() if no matching formats were found.
+ */
inline PixelFormat findCompatibleFormat(Common::List<PixelFormat> backend, Common::List<PixelFormat> frontend) {
#ifdef ENABLE_RGB_COLOR
for (Common::List<PixelFormat>::iterator i = backend.begin(); i != backend.end(); ++i) {