cake
/
libg1m
Archived
1
0
Fork 0
This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
libg1m/include/libg1m/format/picture_cg.h

71 lines
1.8 KiB
C
Raw Normal View History

2016-11-02 16:32:30 +01:00
/* ************************************************************************** */
/* _____ _ */
/* libg1m/format/picture_cg.h |_ _|__ _ _| |__ ___ _ _ */
/* | Project: libg1m | |/ _ \| | | | '_ \ / _ \ | | | */
/* | | (_) | |_| | | | | __/ |_| | */
/* By: thomas <thomas@touhey.fr> |_|\___/ \__,_|_| |_|\___|\__, |.fr */
/* Last updated: 2016/11/02 14:15:46 |___/ */
/* */
/* ************************************************************************** */
#ifndef LIBG1M_FORMAT_PICTURE_CG_H
# define LIBG1M_FORMAT_PICTURE_CG_H
# include <stdint.h>
/* These are pictures for fx-CG. They only have one part.
*
* Some color depth things: */
enum g3p_colorsize {
g3p_color_4bit = 0x03,
g3p_color_16bit = 0x10
};
/* The subheader is: */
struct g3p_subheader {
/* some magic sequence: "CP0100Ly755"
* "CP" is check by a syscall */
uint8_t magic[11];
/* unused */
uint8_t unused[11];
/* plenty of unused space, or undocumented, for some reason */
uint8_t undocumented[130];
/* magic sequence? "0100" */
uint8_t magic2[4];
/* control sequence? <length of packed data + 4> */
uint32_t control;
/* undocumented, again */
uint16_t undocumented2;
/* dimensions */
uint16_t width;
uint16_t height;
/* color depth - see `g3p_colorsize` */
uint16_t color_depth;
/* undocumented, the third coming */
uint16_t undocumented3;
/* length of the deflated image */
uint32_t dimage_length;
};
/* And after the image: */
struct g3p_footer {
/* magic sequence: "0100" */
uint8_t magic[4];
/* some unused bytes? */
uint8_t unused[0x88];
};
# pragma pack()
#endif /* LIBG1M_FORMAT_PICTURE_CG_H */