Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
fixup_datafile(3)		 Allegro manual 	       fixup_datafile(3)

NAME
     fixup_datafile - Fixes truecolor images in compiled datafiles. Allegro game
     programming library.

SYNOPSIS
     #include <allegro.h>

     void fixup_datafile(DATAFILE *data);

DESCRIPTION
     If you are using compiled datafiles (produced by the dat2s and dat2c utili-
     ties)  on	a  platform that doesn't support constructors (currently any non
     GCC-based platform), or if the datafiles contain truecolor images, you must
     call this function once after your set the video mode that you will be  us-
     ing.  This  will ensure the datafiles are properly initialised in the first
     case and convert the color values into the appropriate format in the second
     case. It handles flipping between RGB and BGR formats, and  converting  be-
     tween different color depths whenever that can be done without changing the
     size  of  the  image (ie. changing 15<->16-bit hicolor for both bitmaps and
     RLE sprites, and 24<->32-bit truecolor for RLE sprites).

     Note that you can only call this once and expect it to work correctly,  be-
     cause  after the call the DATAFILE you fixed up is permanently converted to
     whatever is the current component ordering for your  screen  mode.  If  you
     call  fixup_datafile  again, the function assumes you have a freshly loaded
     datafile. It cannot "undo" the previous conversion.

     If your program supports changing resolution and/or color depth during run-
     time, you have two choices: either call fixup_datafile() just once and hope
     that the component ordering and bit depth doesn't change  when  the  screen
     mode  changes (unlikely). Or, you can reload your datafiles when the screen
     mode changes.

SEE ALSO
     set_gfx_mode(3), set_color_conversion(3)

Allegro 			  version 4.4.3 	       fixup_datafile(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=fixup_datafile&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help