Mercurial > hg > dmlib
changeset 543:8fa705277207
Rename the generic probing function.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 22 Nov 2012 22:26:08 +0200 |
parents | 1f39c01e2895 |
children | ac0d0473d5e9 |
files | lib64gfx.c lib64gfx.h |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lib64gfx.c Thu Nov 22 22:25:44 2012 +0200 +++ b/lib64gfx.c Thu Nov 22 22:26:08 2012 +0200 @@ -488,7 +488,7 @@ // if it contains a supported "C64" image format. Returns the // "probe score", see libgfx.h for list of values. If a match // is found, pointer to format description is set to *pfmt. -int dmC64ProbeGeneric(const Uint8 *buf, const size_t len, const DMC64ImageFormat **pfmt) +int dmC64ProbeBMP(const Uint8 *buf, const size_t len, const DMC64ImageFormat **pfmt) { int i, scoreMax = DM_PROBE_SCORE_FALSE, scoreIndex = -1; @@ -859,7 +859,7 @@ if (probeOffs >= len) return -200; - if (dmC64ProbeGeneric(buf + probeOffs, len - probeOffs, fmt) == DM_PROBE_SCORE_FALSE) + if (dmC64ProbeBMP(buf + probeOffs, len - probeOffs, fmt) == DM_PROBE_SCORE_FALSE) return -201; }
--- a/lib64gfx.h Thu Nov 22 22:25:44 2012 +0200 +++ b/lib64gfx.h Thu Nov 22 22:26:08 2012 +0200 @@ -177,9 +177,11 @@ char * dmC64GetImageTypeString(char *buf, const size_t len, const int type); int dmC64ConvertCSData(DMImage *img, int xoffs, int yoffs, const Uint8 *inBuf, int width, int height, BOOL multicolor, int *colors); -int dmC64ProbeGeneric(const Uint8 *buf, const size_t len, const DMC64ImageFormat **fmt); + int dmC64DecodeGenericBMP(DMC64Image *img, const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt); int dmC64ConvertGenericBMP2Image(DMImage *screen, const DMC64Image *img); + +int dmC64ProbeBMP(const Uint8 *buf, const size_t len, const DMC64ImageFormat **fmt); int dmC64DecodeBMP(DMC64Image *img, const Uint8 *buf, const size_t len, const size_t probeOffs, const size_t loadOffs, const DMC64ImageFormat **fmt, const DMC64ImageFormat *forced); int dmReadDataFile(FILE *inFile, const char *filename, Uint8 **buf, size_t *size);