Mercurial > hg > dmlib
comparison tools/libgfx.c @ 2202:455a3849b8ac
Comments and cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 14 Jun 2019 01:56:47 +0300 |
parents | 9a9493809b3a |
children | 1ea48084055e |
comparison
equal
deleted
inserted
replaced
2201:9f3fb4004c20 | 2202:455a3849b8ac |
---|---|
273 dmFree(pal); | 273 dmFree(pal); |
274 } | 274 } |
275 } | 275 } |
276 | 276 |
277 | 277 |
278 static int dmPaletteReadData(DMResource *fp, DMPalette *pal, int ncolors) | 278 static int dmPaletteReadData(DMResource *fp, DMPalette *pal, const int ncolors) |
279 { | 279 { |
280 if (pal->ncolors < ncolors) | 280 if (pal->ncolors < ncolors) |
281 return DMERR_INVALID_ARGS; | 281 return DMERR_INVALID_ARGS; |
282 | 282 |
283 for (int i = 0; i < ncolors; i++) | 283 for (int i = 0; i < ncolors; i++) |
295 | 295 |
296 return DMERR_OK; | 296 return DMERR_OK; |
297 } | 297 } |
298 | 298 |
299 | 299 |
300 static int dmPaletteWriteData(DMResource *fp, const DMPalette *pal, const int ncolors, const int npad) | 300 static int dmPaletteWriteData(DMResource *fp, const DMPalette *pal, |
301 const int ncolors, const int npad) | |
301 { | 302 { |
302 int i; | 303 int i; |
303 | 304 |
304 if (pal == NULL || fp == NULL) | 305 if (pal == NULL || fp == NULL) |
305 return DMERR_NULLPTR; | 306 return DMERR_NULLPTR; |