aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorJohannes Schickel2015-12-14 05:14:09 +0100
committerJohannes Schickel2015-12-14 05:16:12 +0100
commit69220505b6109227984f0d5de97180e989d1adce (patch)
tree00cb48cb9642a08cef6faeb70a684d39467a8c95 /graphics
parent40421f1854a157703c3c8faddc1b622c39ecce4c (diff)
downloadscummvm-rg350-69220505b6109227984f0d5de97180e989d1adce.tar.gz
scummvm-rg350-69220505b6109227984f0d5de97180e989d1adce.tar.bz2
scummvm-rg350-69220505b6109227984f0d5de97180e989d1adce.zip
GRAPHICS: Add function to query TransparentSurface's builtin PixelFormat.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/transparent_surface.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/graphics/transparent_surface.h b/graphics/transparent_surface.h
index 4a23522aab..0cd7d5b2e9 100644
--- a/graphics/transparent_surface.h
+++ b/graphics/transparent_surface.h
@@ -75,6 +75,18 @@ struct TransparentSurface : public Graphics::Surface {
TransparentSurface();
TransparentSurface(const Graphics::Surface &surf, bool copyData = false);
+ /**
+ * Returns the pixel format all operations of TransparentSurface support.
+ *
+ * Unlike Surface TransparentSurface only works with a fixed pixel format.
+ * This format can be queried using this static function.
+ *
+ * @return Supported pixel format.
+ */
+ static PixelFormat getSupportedPixelFormat() {
+ return PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
+ }
+
void setColorKey(char r, char g, char b);
void disableColorKey();