include/SDL_pixels.h
branchSDL-1.3
changeset 1681 80a5e6a4e1e2
parent 1676 e136f3ffdc1b
child 1682 7ae8018b2e5d
--- a/include/SDL_pixels.h	Wed Jun 14 08:41:13 2006 +0000
+++ b/include/SDL_pixels.h	Thu Jun 15 07:07:07 2006 +0000
@@ -108,7 +108,13 @@
 #define SDL_BITSPERPIXEL(X)	(((X) >> 8) & 0xFF)
 #define SDL_BYTESPERPIXEL(X)	(((X) >> 0) & 0xFF)
 
-#define SDL_ISPIXELFORMAT_FOURCC(format)    (((format) & 0x8000000) != 0)
+#define SDL_ISPIXELFORMAT_INDEXED(format)   \
+    ((SDL_PIXELTYPE(format) == SDL_PixelType_Index1) || \
+     (SDL_PIXELTYPE(format) == SDL_PixelType_Index4) || \
+     (SDL_PIXELTYPE(format) == SDL_PixelType_Index8))
+
+#define SDL_ISPIXELFORMAT_FOURCC(format)    \
+    ((format) && !((format) & 0x8000000))
 
 enum
 {