mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-07-13 23:57:34 +02:00
Nothing interesting in this commit, just moving files around, making sure every target compiles every file, and controlling with macros instead. Basic support for fxg3a target in CMakeLists.txt, cmake/FindGint.cmake, giteapc.make and include/gint/config.h.in. The rest is forgettable.
22 lines
449 B
C
22 lines
449 B
C
#include <gint/image.h>
|
|
#include <gint/config.h>
|
|
#if GINT_RENDER_RGB
|
|
|
|
bool image_valid(image_t const *img)
|
|
{
|
|
if(!img)
|
|
return false;
|
|
|
|
if(IMAGE_IS_RGB16(img->format)) {
|
|
return (img->data != NULL);
|
|
}
|
|
if(IMAGE_IS_P8(img->format) || IMAGE_IS_P4(img->format)) {
|
|
return (img->data != NULL) && (img->palette != NULL) &&
|
|
(img->color_count != 0);
|
|
}
|
|
|
|
/* Invalid format */
|
|
return false;
|
|
}
|
|
|
|
#endif
|