# HG changeset patch # User Matti Hamalainen # Date 1526005432 -10800 # Node ID 71e847ea9d22a0f36fa8d4499f48d8b60b19f620 # Parent c71b6c5204afb02152439528d06ffb857224d7f9 Move one function to a better place in the code. diff -r c71b6c5204af -r 71e847ea9d22 tools/lib64gfx.c --- a/tools/lib64gfx.c Fri May 11 05:23:07 2018 +0300 +++ b/tools/lib64gfx.c Fri May 11 05:23:52 2018 +0300 @@ -91,6 +91,20 @@ } +char * dmC64GetImageTypeString(char *buf, const size_t len, const int type) +{ + snprintf(buf, len, + "%s%s%s%s", + (type & D64_FMT_MC) ? "MultiColor " : "HiRes ", + (type & D64_FMT_ILACE) ? "Interlaced " : "", + (type & D64_FMT_FLI) ? "FLI " : "", + (type & D64_FMT_CHAR) ? "CHAR" : "" + ); + + return buf; +} + + static BOOL dmCompareAddr16(const Uint8 *buf, const size_t offs, const Uint16 addr) { return buf[offs ] == DM_GET_ADDR_LO(addr) && @@ -192,20 +206,6 @@ } -char * dmC64GetImageTypeString(char *buf, const size_t len, const int type) -{ - snprintf(buf, len, - "%s%s%s%s", - (type & D64_FMT_MC) ? "MultiColor " : "HiRes ", - (type & D64_FMT_ILACE) ? "Interlaced " : "", - (type & D64_FMT_FLI) ? "FLI " : "", - (type & D64_FMT_CHAR) ? "CHAR" : "" - ); - - return buf; -} - - int dmC64ConvertCSDataToImage(DMImage *img, int xoffs, int yoffs, const Uint8 *buf, int width, int height, BOOL multicolor, diff -r c71b6c5204af -r 71e847ea9d22 tools/lib64gfx.h --- a/tools/lib64gfx.h Fri May 11 05:23:07 2018 +0300 +++ b/tools/lib64gfx.h Fri May 11 05:23:52 2018 +0300 @@ -197,13 +197,13 @@ void dmC64ImageDump(FILE *fh, const DMC64Image *img, const DMC64ImageFormat *fmt); void dmSetDefaultC64Palette(DMImage *img); +char * dmC64GetImageTypeString(char *buf, const size_t len, const int type); DMC64Image *dmC64ImageAlloc(const DMC64ImageFormat *fmt); void dmC64ImageFree(DMC64Image *img); -char * dmC64GetImageTypeString(char *buf, const size_t len, const int type); int dmC64ConvertCSDataToImage(DMImage *img, int xoffs, int yoffs, const Uint8 *inBuf, int width, int height, BOOL multicolor, int *colors); int dmC64ProbeBMP(const Uint8 *buf, const size_t len, const DMC64ImageFormat **fmt);