mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-29 13:03:36 +01:00
28bea2e1ce
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.
16 lines
361 B
C
16 lines
361 B
C
#include <gint/image.h>
|
|
#include <gint/config.h>
|
|
#if GINT_RENDER_RGB
|
|
|
|
int image_decode_pixel(image_t const *img, int pixel)
|
|
{
|
|
if(IMAGE_IS_RGB16(img->format))
|
|
return pixel;
|
|
else if(IMAGE_IS_P8(img->format))
|
|
return img->palette[pixel+128];
|
|
else if(IMAGE_IS_P4(img->format))
|
|
return img->palette[pixel];
|
|
return -1;
|
|
}
|
|
|
|
#endif
|