Mercurial > hg > dmlib
changeset 537:32d9e67da189
Rename generic probing function to match the style of other lib64gfx functions.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 22 Nov 2012 22:16:51 +0200 |
parents | 18fc2890ba4b |
children | 3c968e027a58 |
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:16:06 2012 +0200 +++ b/lib64gfx.c Thu Nov 22 22:16:51 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; @@ -861,7 +861,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:16:06 2012 +0200 +++ b/lib64gfx.h Thu Nov 22 22:16:51 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);