Mercurial > hg > dmlib
comparison tools/libgfx.h @ 1544:48823642c4fb
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 12 May 2018 21:00:22 +0300 |
parents | 416d7b3ba3b2 |
children | 3b613fcbf3ff |
comparison
equal
deleted
inserted
replaced
1543:416d7b3ba3b2 | 1544:48823642c4fb |
---|---|
35 DM_IFMT_RGB, | 35 DM_IFMT_RGB, |
36 DM_IFMT_RGBA, | 36 DM_IFMT_RGBA, |
37 }; | 37 }; |
38 | 38 |
39 | 39 |
40 // Error handling modes | |
40 enum | 41 enum |
41 { | 42 { |
42 DM_ERRMODE_FAIL = 0, | 43 DM_ERRMODE_FAIL = 0, |
43 DM_ERRMODE_RECOV_1, | 44 DM_ERRMODE_RECOV_1, |
44 DM_ERRMODE_RECOV_2, | 45 DM_ERRMODE_RECOV_2, |
46 }; | |
47 | |
48 | |
49 // Probe scores | |
50 enum | |
51 { | |
52 DM_PROBE_SCORE_FALSE = 0, | |
53 DM_PROBE_SCORE_MAYBE = 250, | |
54 DM_PROBE_SCORE_AVG = 500, | |
55 DM_PROBE_SCORE_GOOD = 750, | |
56 DM_PROBE_SCORE_MAX = 1000, | |
45 }; | 57 }; |
46 | 58 |
47 | 59 |
48 // Bitmapped image struct | 60 // Bitmapped image struct |
49 typedef struct | 61 typedef struct |
80 int (*read)(const char *filename, DMImage **pimg); | 92 int (*read)(const char *filename, DMImage **pimg); |
81 int (*readFILE)(FILE *fp, DMImage **pimg); | 93 int (*readFILE)(FILE *fp, DMImage **pimg); |
82 int (*write)(const char *filename, const DMImage *pimg, const DMImageConvSpec *spec); | 94 int (*write)(const char *filename, const DMImage *pimg, const DMImageConvSpec *spec); |
83 int (*writeFILE)(FILE *fp, const DMImage *pimg, const DMImageConvSpec *spec); | 95 int (*writeFILE)(FILE *fp, const DMImage *pimg, const DMImageConvSpec *spec); |
84 } DMImageFormat; | 96 } DMImageFormat; |
85 | |
86 | |
87 // Probe scores | |
88 #define DM_PROBE_SCORE_MAX 1000 | |
89 #define DM_PROBE_SCORE_GOOD 750 | |
90 #define DM_PROBE_SCORE_AVG 500 | |
91 #define DM_PROBE_SCORE_MAYBE 250 | |
92 #define DM_PROBE_SCORE_FALSE 0 | |
93 | 97 |
94 | 98 |
95 extern DMImageFormat dmImageFormatList[DM_IMGFMT_LAST]; | 99 extern DMImageFormat dmImageFormatList[DM_IMGFMT_LAST]; |
96 extern int dmGFXErrorMode; | 100 extern int dmGFXErrorMode; |
97 | 101 |