fixup_datafile man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

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
       utilities)  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 using. 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 between 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,
       because	after  the  call the DATAFILE you fixed up is permanently con‐
       verted 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.

SEE ALSO
       set_gfx_mode(3), set_color_conversion(3)

Allegro				 version 4.4.2		     fixup_datafile(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net