Mercurial > hg > dmlib
comparison tools/64vw.c @ 2213:b1e392da8346
Check for minimum number of colors in external palette.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 14 Jun 2019 06:03:47 +0300 |
parents | 90ec1ec89c56 |
children | 5477e792def3 |
comparison
equal
deleted
inserted
replaced
2212:2edd3f2ddee2 | 2213:b1e392da8346 |
---|---|
388 | 388 |
389 if (optC64PaletteFile != NULL) | 389 if (optC64PaletteFile != NULL) |
390 { | 390 { |
391 if ((res = dmHandleExternalPalette(optC64PaletteFile, &optSpec.pal)) != DMERR_OK) | 391 if ((res = dmHandleExternalPalette(optC64PaletteFile, &optSpec.pal)) != DMERR_OK) |
392 goto exit; | 392 goto exit; |
393 | |
394 if (optSpec.pal->ncolors < D64_NCOLORS) | |
395 { | |
396 dmErrorMsg("Palette does not have enough colors (%d < %d)\n", | |
397 optSpec.pal->ncolors, D64_NCOLORS); | |
398 goto exit; | |
399 } | |
393 } | 400 } |
394 else | 401 else |
395 { | 402 { |
396 // No palette file specified, use internal palette | 403 // No palette file specified, use internal palette |
397 if (optC64Palette == NULL) | 404 if (optC64Palette == NULL) |