Re: [AD] Successives calls to fixup_datafile() |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2005-08-02, Omar Cornut <cornut@xxxxxxxxxx> wrote:
> Thank you for confirming the behavior. Can this be entered as
> a bug report/feature request, if not already?
How about this?
Index: docs/src/allegro._tx
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/allegro._tx,v
retrieving revision 1.353
diff -u -p -r1.353 allegro._tx
--- docs/src/allegro._tx 3 Aug 2005 19:55:38 -0000 1.353
+++ docs/src/allegro._tx 8 Aug 2005 13:50:13 -0000
@@ -10437,6 +10437,18 @@ directly from a specific datafile object
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 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.
+
@@Macro @DAT_ID(a, b, c, d);
@xref register_datafile_object, get_datafile_property
@xref Custom datafile objects, Using datafiles