54 memset( frame->
data, 0, frame->
size );
66 char * destination = frame->
data;
68 int frameHeight = frame->
height;
70 while( frameHeight ) {
89 memset( frame->
data, 0, frame->
size );
104 char * destination = frame->
data;
106 int frameHeight = frame->
height;
108 while( frameHeight ) {
124 result->
originX = _image_origin_x;
125 result->
originY = _image_origin_y;
126 result->
offsetX = _frame_offset_x;
127 result->
offsetY = _frame_offset_y;
140 if ( _image_origin_x || _image_origin_y ) {
143 if ( _frame_offset_x || _frame_offset_y ) {
160 if ( _frame_height < 0 || _frame_width < 0 ) {
197 if ( layout_mode == 0 ) {
201 int i,di,x=0,y=0,z=0;
224 for( z=0; z<a; ++z ) {
225 for( y=0; y<result->
vertical; ++y ) {
227 ImageDescriptor * frame = cut_frame_from_atlas( _environment, result, x, y );
230 while( actual->
next ) {
231 actual = actual->
next;
233 actual->
next = frame;
266 for( z=0; z<result->
count; ++z ) {
267 ImageDescriptor * frame = cut_frame_from_atlas_gif( _environment, result, z );
270 while( actual->
next ) {
271 actual = actual->
next;
273 actual->
next = frame;
#define BITMAP_MODE_STANDARD
RGBi * malloc_palette(int _size)
Allocate a palette space.
char * resource_load_asserts(Environment *_environment, char *_filename)
int rgbi_extract_palette(Environment *_environment, unsigned char *_source, int _width, int _height, int _depth, RGBi _palette[], int _palette_size, int _sorted)
Extract the color palette from the given image.
int file_get_size(Environment *_environment, char *_filename)
AtlasDescriptor * atlas_descriptor_create(Environment *_environment, char *_filename, int _flags, int _image_origin_x, int _image_origin_y, int _frame_width, int _frame_height, int _frame_offset_x, int _frame_offset_y)
ImageDescriptor * image_descriptor_flip_x(Environment *_environment, ImageDescriptor *_source_image)
ImageDescriptor * image_descriptor_flip_y(Environment *_environment, ImageDescriptor *_source_image)
ImageDescriptor * image_descriptor_roll_x_left(Environment *_environment, ImageDescriptor *_source_image)
ImageDescriptor * image_descriptor_roll_x_right(Environment *_environment, ImageDescriptor *_source_image)
STBIDEF unsigned char * stbi_xload(char const *filename, int *x, int *y, int *frames)
STBIDEF int stbi_is_animated_gif(char const *filename)
STBIDEF stbi_uc * stbi_load(char const *filename, int *x, int *y, int *channels_in_file, int desired_channels)
struct _ImageDescriptor * frames
struct _ImageDescriptor * image
struct _ImageDescriptor * next
#define CRITICAL_INVALID_FRAME_WIDTH(s)
struct _ImageDescriptor ImageDescriptor
struct _RGBi RGBi
Structure to store color components (red, green and blue).
#define CRITICAL_IMAGES_LOAD_INVALID_AUTO_WITHOUT_GIF(v)
#define CRITICAL_IMAGE_LOAD_UNKNOWN_FORMAT(f)
struct _Environment Environment
Structure of compilation environment.
#define adiline5(s, a, b, c, d, e)
#define adiline3(s, a, b, c)
struct _AtlasDescriptor AtlasDescriptor
#define CRITICAL_INVALID_FRAME_HEIGHT(s)
#define CRITICAL_IMAGES_LOAD_INVALID_ORIGIN_WITH_GIF(f)
#define CRITICAL_IMAGES_LOAD_INVALID_OFFSET_WITH_GIF(f)