comparison tools/lib64fmts.c @ 1815:2b68b6955635

Rename "Koala Paint" to "Koala Painter".
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 21 Jun 2018 19:27:53 +0300
parents cfe9807a1e64
children 8d7b424197bc
comparison
equal deleted inserted replaced
1814:0b7062d874ef 1815:2b68b6955635
8 */ 8 */
9 #include "lib64gfx.h" 9 #include "lib64gfx.h"
10 10
11 11
12 12
13 static int fmtProbeKoalaPaintPacked(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 13 static int fmtProbeKoalaPainterPacked(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
14 { 14 {
15 // Attempt to prevent misprobes of unpacked Koala and Run Paint 15 // Attempt to prevent misprobes of unpacked Koala and Run Paint
16 if (buf->len > 30 && 16 if (buf->len > 30 &&
17 buf->len != 10006 && 17 buf->len != 10006 &&
18 buf->len != 10003 && 18 buf->len != 10003 &&
21 21
22 return DM_PROBE_SCORE_FALSE; 22 return DM_PROBE_SCORE_FALSE;
23 } 23 }
24 24
25 25
26 static int fmtDecodeKoalaPaintPacked(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 26 static int fmtDecodeKoalaPainterPacked(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
27 { 27 {
28 int res; 28 int res;
29 DMGrowBuf mem; 29 DMGrowBuf mem;
30 DMCompParams cfg; 30 DMCompParams cfg;
31 31
43 dmGrowBufFree(&mem); 43 dmGrowBufFree(&mem);
44 return res; 44 return res;
45 } 45 }
46 46
47 47
48 static int fmtEncodeKoalaPaintPacked(DMGrowBuf *buf, const DMC64Image *img, const DMC64ImageFormat *fmt) 48 static int fmtEncodeKoalaPainterPacked(DMGrowBuf *buf, const DMC64Image *img, const DMC64ImageFormat *fmt)
49 { 49 {
50 int res; 50 int res;
51 DMGrowBuf tmp; 51 DMGrowBuf tmp;
52 DMCompParams cfg; 52 DMCompParams cfg;
53 53
959 // unpacked versions of several formats. We'll reuse these here through 959 // unpacked versions of several formats. We'll reuse these here through
960 // this common formats data array, referred from dmC64ImageFormats[] 960 // this common formats data array, referred from dmC64ImageFormats[]
961 // 961 //
962 DMC64ImageCommonFormat dmC64CommonFormats[] = 962 DMC64ImageCommonFormat dmC64CommonFormats[] =
963 { 963 {
964 { // #0: Koala Paint type memory layout 964 { // #0: Koala Painter type memory layout
965 D64_FMT_MC, 965 D64_FMT_MC,
966 C64_SCR_WIDTH / 2, C64_SCR_HEIGHT, 966 C64_SCR_WIDTH / 2, C64_SCR_HEIGHT,
967 C64_SCR_CH_WIDTH , C64_SCR_CH_HEIGHT, 967 C64_SCR_CH_WIDTH , C64_SCR_CH_HEIGHT,
968 NULL, NULL, 968 NULL, NULL,
969 NULL, 969 NULL,
1200 fmtDecodeTruePaintPacked, NULL, 1200 fmtDecodeTruePaintPacked, NULL,
1201 { }, &dmC64CommonFormats[6] 1201 { }, &dmC64CommonFormats[6]
1202 }, 1202 },
1203 1203
1204 { 1204 {
1205 "kla", "Koala Paint (unpacked)", 0x6000, 10003, DM_FMT_RDWR, 1205 "kla", "Koala Painter (unpacked)", 0x6000, 10003, DM_FMT_RDWR,
1206 NULL, 1206 NULL,
1207 NULL, NULL, 1207 NULL, NULL,
1208 { }, &dmC64CommonFormats[0] 1208 { }, &dmC64CommonFormats[0]
1209 }, 1209 },
1210 1210
1211 { 1211 {
1212 "klp", "Koala Paint (packed)", 0x6000, 0, DM_FMT_RDWR, 1212 "klp", "Koala Painter (packed)", 0x6000, 0, DM_FMT_RDWR,
1213 fmtProbeKoalaPaintPacked, 1213 fmtProbeKoalaPainterPacked,
1214 fmtDecodeKoalaPaintPacked, fmtEncodeKoalaPaintPacked, 1214 fmtDecodeKoalaPainterPacked, fmtEncodeKoalaPainterPacked,
1215 { }, &dmC64CommonFormats[0] 1215 { }, &dmC64CommonFormats[0]
1216 }, 1216 },
1217 1217
1218 { 1218 {
1219 "aas", "Advanced Art Studio (unpacked)", 0x2000, 10018, DM_FMT_RDWR, 1219 "aas", "Advanced Art Studio (unpacked)", 0x2000, 10018, DM_FMT_RDWR,