logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

register_bitmap_file_type - Registers custom bitmap loading/saving functions. Allegro game programming

Description

       Informs  the load_bitmap() and save_bitmap() functions of a new file type, providing routines to read and
       write images in this format (either function may be NULL). The functions you supply must follow the  same
       prototype as load_bitmap() and save_bitmap(). Example:

          BITMAP *load_dump(const char *filename, RGB *pal)
          {
             ...
          }

          int save_dump(const char *filename, BITMAP *bmp, const RGB *pal)
          {
             ...
          }

             register_bitmap_file_type("dump", load_dump, save_dump);

Name

       register_bitmap_file_type  -  Registers  custom bitmap loading/saving functions. Allegro game programming
       library.

See Also

load_bitmap(3alleg4), save_bitmap(3alleg4)

Allegro                                           version 4.4.3               register_bitmap_file_type(3alleg4)

Synopsis

#include<allegro.h>voidregister_bitmap_file_type(constchar*ext,BITMAP*(*load)(constchar*filename,RGB*pal),int(*save)(constchar*filename,BITMAP*bmp,constRGB*pal));

See Also