diff tools/libgfx.h @ 2095:80786a28caf0

Mark image format flags with the color formats they support. This information is not yet used.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 05 Mar 2019 09:57:32 +0200
parents 4276b8c0fef0
children 81fb21dd3265
line wrap: on
line diff
--- a/tools/libgfx.h	Tue Mar 05 09:56:47 2019 +0200
+++ b/tools/libgfx.h	Tue Mar 05 09:57:32 2019 +0200
@@ -31,12 +31,15 @@
 };
 
 
+// Color formats (these can be used along with DM_FMT_*)
 enum
 {
-    DM_COLFMT_PALETTE,
-    DM_COLFMT_GRAYSCALE,
-    DM_COLFMT_RGB,
-    DM_COLFMT_RGBA,
+    DM_COLFMT_PALETTE    = 0x0010,
+    DM_COLFMT_GRAYSCALE  = 0x0020,
+    DM_COLFMT_RGB        = 0x0040,
+    DM_COLFMT_RGBA       = 0x0080,
+
+    DM_COLFMT_ANY        = 0x00f0,
 };
 
 
@@ -112,7 +115,7 @@
     char *fext;
     char *name;
     int  fmtid;  // DM_IMGFMT_*
-    int  flags;  // DM_FMT_* flags
+    int  flags;  // DM_FMT_* and DM_COLFMT_* flags
     int  (*probe)(const Uint8 *buf, const size_t len);
     int  (*read)(DMResource *fp, DMImage **pimg);
     int  (*write)(DMResource *fp, const DMImage *pimg, const DMImageConvSpec *spec);