Mercurial > hg > dmlib
comparison tools/lib64fmts.c @ 1712:1f4ed247763d
Indentation cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 06 Jun 2018 14:29:05 +0300 |
parents | 4fd94bf558b3 |
children | 95317672ff00 |
comparison
equal
deleted
inserted
replaced
1711:4fd94bf558b3 | 1712:1f4ed247763d |
---|---|
48 { | 48 { |
49 int res; | 49 int res; |
50 DMGrowBuf mem; | 50 DMGrowBuf mem; |
51 DMCompParams cfg; | 51 DMCompParams cfg; |
52 | 52 |
53 cfg.type = DM_COMP_RLE_MARKER; | |
54 cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_2; | |
55 cfg.rleMarkerB = 0xfe; | |
56 cfg.func = fmt->name; | 53 cfg.func = fmt->name; |
54 cfg.type = DM_COMP_RLE_MARKER; | |
55 cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_2; | |
56 cfg.rleMarkerB = 0xfe; | |
57 | 57 |
58 if ((res = dmDecodeGenericRLEAlloc(&mem, buf, &cfg)) != DMERR_OK) | 58 if ((res = dmDecodeGenericRLEAlloc(&mem, buf, &cfg)) != DMERR_OK) |
59 goto out; | 59 goto out; |
60 | 60 |
61 res = dmC64DecodeGenericBMP(img, &mem, fmt); | 61 res = dmC64DecodeGenericBMP(img, &mem, fmt); |
111 { | 111 { |
112 int res; | 112 int res; |
113 DMGrowBuf mem, tmp; | 113 DMGrowBuf mem, tmp; |
114 DMCompParams cfg; | 114 DMCompParams cfg; |
115 | 115 |
116 cfg.type = DM_COMP_RLE_MARKER; | |
117 cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; | |
118 cfg.rleMarkerB = buf->data[0x0d]; | |
119 cfg.func = fmt->name; | 116 cfg.func = fmt->name; |
117 cfg.type = DM_COMP_RLE_MARKER; | |
118 cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; | |
119 cfg.rleMarkerB = buf->data[0x0d]; | |
120 | 120 |
121 if ((res = dmDecodeGenericRLEAlloc(&mem, | 121 if ((res = dmDecodeGenericRLEAlloc(&mem, |
122 dmGrowBufCreateFromOffs(&tmp, buf, 0x0e), &cfg)) != DMERR_OK) | 122 dmGrowBufCreateFromOffs(&tmp, buf, 0x0e), &cfg)) != DMERR_OK) |
123 goto out; | 123 goto out; |
124 | 124 |
213 { | 213 { |
214 int res; | 214 int res; |
215 DMGrowBuf mem, tmp; | 215 DMGrowBuf mem, tmp; |
216 DMCompParams cfg; | 216 DMCompParams cfg; |
217 | 217 |
218 cfg.type = DM_COMP_RLE_MARKER; | |
219 cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_WORD_RUNS | DM_RLE_ORDER_1; | |
220 cfg.rleMarkerB = buf->data[8]; | |
221 cfg.rleMarkerW = buf->data[9]; | |
222 cfg.func = fmt->name; | 218 cfg.func = fmt->name; |
219 cfg.type = DM_COMP_RLE_MARKER; | |
220 cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_WORD_RUNS | DM_RLE_ORDER_1; | |
221 cfg.rleMarkerB = buf->data[8]; | |
222 cfg.rleMarkerW = buf->data[9]; | |
223 | 223 |
224 if ((res = dmDecodeGenericRLEAlloc(&mem, | 224 if ((res = dmDecodeGenericRLEAlloc(&mem, |
225 dmGrowBufCreateFromOffs(&tmp, buf, 10), &cfg)) != DMERR_OK) | 225 dmGrowBufCreateFromOffs(&tmp, buf, 10), &cfg)) != DMERR_OK) |
226 goto out; | 226 goto out; |
227 | 227 |
322 | 322 |
323 memcpy(tmp.data, buf->data, buf->len); | 323 memcpy(tmp.data, buf->data, buf->len); |
324 tmp.len = buf->len + 1; | 324 tmp.len = buf->len + 1; |
325 | 325 |
326 // Now do an RLE decode on the enlarged buffer | 326 // Now do an RLE decode on the enlarged buffer |
327 cfg.type = DM_COMP_RLE_MARKER; | |
328 cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; | |
329 cfg.rleMarkerB = 0xC2; | |
330 cfg.func = fmt->name; | 327 cfg.func = fmt->name; |
328 cfg.type = DM_COMP_RLE_MARKER; | |
329 cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; | |
330 cfg.rleMarkerB = 0xC2; | |
331 | 331 |
332 if ((res = dmDecodeGenericRLEAlloc(&mem, &tmp, &cfg)) != DMERR_OK) | 332 if ((res = dmDecodeGenericRLEAlloc(&mem, &tmp, &cfg)) != DMERR_OK) |
333 goto out; | 333 goto out; |
334 | 334 |
335 // And finally decode to bitmap struct | 335 // And finally decode to bitmap struct |
599 if (buf->data[14]) | 599 if (buf->data[14]) |
600 { | 600 { |
601 DMGrowBuf mem; | 601 DMGrowBuf mem; |
602 DMCompParams cfg; | 602 DMCompParams cfg; |
603 | 603 |
604 cfg.type = DM_COMP_RLE_MARKER; | |
605 cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; | |
606 cfg.rleMarkerB = buf->data[15]; | |
607 cfg.func = fmt->name; | 604 cfg.func = fmt->name; |
605 cfg.type = DM_COMP_RLE_MARKER; | |
606 cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; | |
607 cfg.rleMarkerB = buf->data[15]; | |
608 | 608 |
609 if ((res = dmDecodeGenericRLEAlloc( | 609 if ((res = dmDecodeGenericRLEAlloc( |
610 &mem, dmGrowBufCreateFromOffs(&tmp, buf, FUNPAINT2_HEADER_SIZE), &cfg)) == DMERR_OK) | 610 &mem, dmGrowBufCreateFromOffs(&tmp, buf, FUNPAINT2_HEADER_SIZE), &cfg)) == DMERR_OK) |
611 res = dmC64DecodeGenericBMP(img, &mem, fmt); | 611 res = dmC64DecodeGenericBMP(img, &mem, fmt); |
612 | 612 |