Mercurial > hg > dmlib
comparison src/libgfx.c @ 1292:92e99ea23811
Cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 18 Aug 2017 19:44:27 +0300 |
parents | 2c4acbc3e7bf |
children | 9f2117f1584a |
comparison
equal
deleted
inserted
replaced
1291:2c4acbc3e7bf | 1292:92e99ea23811 |
---|---|
131 | 131 |
132 return TRUE; | 132 return TRUE; |
133 } | 133 } |
134 | 134 |
135 | 135 |
136 int dmImageConvertTo(DMImage **dst, const DMImage *src, const DMImageConvSpec *spec) | |
137 { | |
138 return DMERR_OK; | |
139 } | |
140 | |
141 | |
142 int dmWriteImageData(DMImage *img, void *cbdata, int (*writeRowCB)(void *, Uint8 *, size_t), const DMImageConvSpec *spec) | 136 int dmWriteImageData(DMImage *img, void *cbdata, int (*writeRowCB)(void *, Uint8 *, size_t), const DMImageConvSpec *spec) |
143 { | 137 { |
144 int x, y, yscale, xscale, res = 0, rowSize, rowWidth; | 138 int x, y, yscale, xscale, res = 0, rowSize, rowWidth; |
145 Uint8 *row = NULL; | 139 Uint8 *row = NULL; |
146 | 140 |
177 case DM_IFMT_RGBA: | 171 case DM_IFMT_RGBA: |
178 qr = img->pal[c].r; | 172 qr = img->pal[c].r; |
179 qg = img->pal[c].g; | 173 qg = img->pal[c].g; |
180 qb = img->pal[c].b; | 174 qb = img->pal[c].b; |
181 qa = img->pal[c].a; | 175 qa = img->pal[c].a; |
176 | |
182 if (spec->planar) | 177 if (spec->planar) |
183 { | 178 { |
184 for (xscale = 0; xscale < spec->scaleX; xscale++) | 179 for (xscale = 0; xscale < spec->scaleX; xscale++) |
185 { | 180 { |
186 *ptr1++ = qr; | 181 *ptr1++ = qr; |