Mercurial > hg > dmlib
diff tools/libgfx.c @ 2414:69a5af2eb1ea
Remove useless dmMemset().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 13 Jan 2020 23:27:01 +0200 |
parents | 85700c9b7dc8 |
children | 16426e9dc238 |
line wrap: on
line diff
--- a/tools/libgfx.c Mon Jan 13 23:20:56 2020 +0200 +++ b/tools/libgfx.c Mon Jan 13 23:27:01 2020 +0200 @@ -1177,7 +1177,7 @@ goto error; } - dmMemset(palette, 0, PNG_MAX_PALETTE_LENGTH * sizeof(png_color)); + memset(palette, 0, PNG_MAX_PALETTE_LENGTH * sizeof(png_color)); for (int i = 0; i < img->pal->ncolors; i++) { @@ -1565,7 +1565,7 @@ pcx.fp = fp; // Create PCX header - dmMemset(&hdr, 0, sizeof(hdr)); + memset(&hdr, 0, sizeof(hdr)); if (spec.pixfmt == DM_PIXFMT_PALETTE || spec.pixfmt == DM_PIXFMT_GRAYSCALE) { @@ -1891,7 +1891,7 @@ break; case 1: - dmMemset(dp, 0, img->width); + memset(dp, 0, img->width); for (int nplane = 0; nplane < hdr.nplanes; nplane++) { @@ -2235,7 +2235,7 @@ if (iff->idsig == IFF_ID_ACBM) { // Initialize destination image data - dmMemset(img->data, 0, img->size); + memset(img->data, 0, img->size); for (int plane = 0; plane < nplanes; plane++) { @@ -2267,7 +2267,7 @@ if (iff->idsig == IFF_ID_ILBM) { // Clear planar decoding buffer - dmMemset(dp, 0, img->pitch); + memset(dp, 0, img->pitch); for (int plane = 0; plane < nplanes; plane++) { @@ -2332,7 +2332,7 @@ BOOL parsed = FALSE; int res = DMERR_OK; - dmMemset(&iff, 0, sizeof(iff)); + memset(&iff, 0, sizeof(iff)); // Read IFF FORM header if ((res = dmReadIFFChunkHdr(fp, &chunk)) != DMERR_OK) @@ -2912,7 +2912,7 @@ for (int plane = 0; plane < iff.bmhd.nplanes; plane++) { // Encode bitplane - dmMemset(buf, 0, bufLen); + memset(buf, 0, bufLen); for (int yc = 0; yc < img->height * spec->scaleY; yc++) { @@ -2943,7 +2943,7 @@ for (int plane = 0; plane < spec->nplanes; plane++) { // Encode bitplane - dmMemset(buf, 0, bufLen); + memset(buf, 0, bufLen); for (int xc = 0; xc < img->width * spec->scaleX; xc++) buf[xc / 8] |= ((sp[xc / spec->scaleX] >> plane) & 1) << (7 - (xc & 7)); @@ -2961,7 +2961,7 @@ // Write mask data, if any if (iff.bmhd.masking == IFF_MASK_HAS_MASK) { - dmMemset(buf, 0, bufLen); + memset(buf, 0, bufLen); for (int xc = 0; xc < img->width * spec->scaleX; xc++) buf[xc / 8] |= (sp[xc / spec->scaleX] == img->pal->ctransp) << (7 - (xc & 7));