comparison src/libgfx.h @ 1285:e4bda4909d72

Make libgfx error mode a global variable, at least for now.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 18 Aug 2017 14:08:08 +0300
parents f654435df15e
children b812fad6f33e
comparison
equal deleted inserted replaced
1284:28be63226b05 1285:e4bda4909d72
33 { 33 {
34 DM_IFMT_PALETTE, 34 DM_IFMT_PALETTE,
35 DM_IFMT_RGB, 35 DM_IFMT_RGB,
36 DM_IFMT_RGBA, 36 DM_IFMT_RGBA,
37 DM_IFMT_RGB_PLANE, 37 DM_IFMT_RGB_PLANE,
38 };
39
40
41 enum
42 {
43 DM_ERRMODE_FAIL = 0,
44 DM_ERRMODE_RECOV_1,
45 DM_ERRMODE_RECOV_2,
38 }; 46 };
39 47
40 48
41 // Bitmapped image struct (can be one of types specified by DM_IFMT_*) 49 // Bitmapped image struct (can be one of types specified by DM_IFMT_*)
42 typedef struct 50 typedef struct
76 #define DM_PROBE_SCORE_MAYBE 250 84 #define DM_PROBE_SCORE_MAYBE 250
77 #define DM_PROBE_SCORE_FALSE 0 85 #define DM_PROBE_SCORE_FALSE 0
78 86
79 87
80 extern DMImageFormat dmImageFormatList[IMGFMT_LAST]; 88 extern DMImageFormat dmImageFormatList[IMGFMT_LAST];
89 extern int dmGFXErrorMode;
81 90
82 91
83 DMImage * dmImageAlloc(int width, int height); 92 DMImage * dmImageAlloc(int width, int height);
84 void dmImageFree(DMImage *img); 93 void dmImageFree(DMImage *img);
85 int dmImageGetBytesPerPixel(int format); 94 int dmImageGetBytesPerPixel(int format);