fixup_datafile(3) - Linux man page
Name
fixup_datafile - Fixes truecolor images in compiled datafiles. Allegro game programming library.Synopsis
#include <allegro.h>void fixup_datafile(DATAFILE *data);
Description
Note that you can only call this once and expect it to work correctly, because 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 runtime, 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.